diff --git a/miniconda3/pkgs/libsolv-0.7.30-h6f1ccf3_2/lib/pkgconfig/libsolv.pc b/miniconda3/pkgs/libsolv-0.7.30-h6f1ccf3_2/lib/pkgconfig/libsolv.pc new file mode 100644 index 0000000000000000000000000000000000000000..0e1d657ead888623b2a9f22d7d8a7e1ba3fc09df --- /dev/null +++ b/miniconda3/pkgs/libsolv-0.7.30-h6f1ccf3_2/lib/pkgconfig/libsolv.pc @@ -0,0 +1,8 @@ +libdir=/home/task_176035639968744/conda-bld/libsolv-suite_1760357031527/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pla/lib +includedir=/home/task_176035639968744/conda-bld/libsolv-suite_1760357031527/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pla/include + +Name: libsolv +Description: Library for solving packages +Version: 0.7.30 +Libs: -L${libdir} -lsolv +Cflags: -I${includedir} diff --git a/miniconda3/pkgs/libsolv-0.7.30-h6f1ccf3_2/lib/pkgconfig/libsolvext.pc b/miniconda3/pkgs/libsolv-0.7.30-h6f1ccf3_2/lib/pkgconfig/libsolvext.pc new file mode 100644 index 0000000000000000000000000000000000000000..86ad20acd0589b4fff7994b45512c2270528b7db --- /dev/null +++ b/miniconda3/pkgs/libsolv-0.7.30-h6f1ccf3_2/lib/pkgconfig/libsolvext.pc @@ -0,0 +1,9 @@ +libdir=/home/task_176035639968744/conda-bld/libsolv-suite_1760357031527/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pla/lib +includedir=/home/task_176035639968744/conda-bld/libsolv-suite_1760357031527/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pla/include + +Name: libsolvext +Description: Library for reading repositories +Version: 0.7.30 +Requires: libsolv +Libs: -L${libdir} -lsolvext +Cflags: -I${includedir} diff --git a/miniconda3/pkgs/libsolv-0.7.30-h6f1ccf3_2/share/cmake/Modules/FindLibSolv.cmake b/miniconda3/pkgs/libsolv-0.7.30-h6f1ccf3_2/share/cmake/Modules/FindLibSolv.cmake new file mode 100644 index 0000000000000000000000000000000000000000..166e79dcd16202c369013027a81e6d47b4df481a --- /dev/null +++ b/miniconda3/pkgs/libsolv-0.7.30-h6f1ccf3_2/share/cmake/Modules/FindLibSolv.cmake @@ -0,0 +1,95 @@ +# FindLibSolv - Find libsolv headers and libraries. +# +# Sample: +# +# SET( LibSolv_USE_STATIC_LIBS OFF ) +# FIND_PACKAGE( LibSolv REQUIRED ext ) +# IF( LibSolv_FOUND ) +# INCLUDE_DIRECTORIES( ${LibSolv_INCLUDE_DIRS} ) +# TARGET_LINK_LIBRARIES( ... ${LibSolv_LIBRARIES} ) +# ENDIF() +# +# Variables used by this module need to be set before calling find_package +# (not that they are cmale cased like the modiulemane itself): +# +# LibSolv_USE_STATIC_LIBS Can be set to ON to force the use of the static +# libsolv libraries. Defaults to OFF. +# +# Supported components: +# +# ext Also include libsolvext +# +# Variables provided by this module: +# +# LibSolv_FOUND Include dir, libsolv and all extra libraries +# specified in the COMPONENTS list were found. +# +# LibSolv_LIBRARIES Link to these to use all the libraries you specified. +# +# LibSolv_INCLUDE_DIRS Include directories. +# +# For each component you specify in find_package(), the following (UPPER-CASE) +# variables are set to pick and choose components instead of just using LibSolv_LIBRARIES: +# +# LIBSOLV_FOUND TRUE if libsolv was found +# LIBSOLV_LIBRARY libsolv libraries +# +# LIBSOLV_${COMPONENT}_FOUND TRUE if the library component was found +# LIBSOLV_${COMPONENT}_LIBRARY The libraries for the specified component +# + +# Support preference of static libs by adjusting CMAKE_FIND_LIBRARY_SUFFIXES +IF(LibSolv_USE_STATIC_LIBS) + SET( _ORIG_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES}) + SET(CMAKE_FIND_LIBRARY_SUFFIXES .a ) +ENDIF() + +# Look for the header files +UNSET(LibSolv_INCLUDE_DIRS CACHE) +FIND_PATH(LibSolv_INCLUDE_DIRS NAMES solv/solvable.h) + +# Look for the core library +UNSET(LIBSOLV_LIBRARY CACHE) +FIND_LIBRARY(LIBSOLV_LIBRARY NAMES solv) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(LibSolv DEFAULT_MSG LIBSOLV_LIBRARY LibSolv_INCLUDE_DIRS) +MARK_AS_ADVANCED( + LIBSOLV_FOUND + LIBSOLV_LIBRARY +) + +# Prepare return values and collectiong more components +SET(LibSolv_FOUND ${LIBSOLV_FOUND}) +SET(LibSolv_LIBRARIES ${LIBSOLV_LIBRARY}) +MARK_AS_ADVANCED( + LibSolv_FOUND + LibSolv_LIBRARIES + LibSolv_INCLUDE_DIRS +) + +# Look for components +FOREACH(COMPONENT ${LibSolv_FIND_COMPONENTS}) + STRING(TOUPPER ${COMPONENT} _UPPERCOMPONENT) + UNSET(LIBSOLV_${_UPPERCOMPONENT}_LIBRARY CACHE) + FIND_LIBRARY(LIBSOLV_${_UPPERCOMPONENT}_LIBRARY NAMES solv${COMPONENT}) + SET(LibSolv_${COMPONENT}_FIND_REQUIRED ${LibSolv_FIND_REQUIRED}) + SET(LibSolv_${COMPONENT}_FIND_QUIETLY ${LibSolv_FIND_QUIETLY}) + FIND_PACKAGE_HANDLE_STANDARD_ARGS(LibSolv_${COMPONENT} DEFAULT_MSG LIBSOLV_${_UPPERCOMPONENT}_LIBRARY) + MARK_AS_ADVANCED( + LIBSOLV_${_UPPERCOMPONENT}_FOUND + LIBSOLV_${_UPPERCOMPONENT}_LIBRARY + ) + IF(LIBSOLV_${_UPPERCOMPONENT}_FOUND) + SET(LibSolv_LIBRARIES ${LibSolv_LIBRARIES} ${LIBSOLV_${_UPPERCOMPONENT}_LIBRARY}) + ELSE() + SET(LibSolv_FOUND FALSE) + ENDIF() +ENDFOREACH() + +# restore CMAKE_FIND_LIBRARY_SUFFIXES +IF(Solv_USE_STATIC_LIBS) + SET(CMAKE_FIND_LIBRARY_SUFFIXES ${_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES} ) +ENDIF() + +IF(LibSolv_FOUND AND NOT LibSolv_FIND_QUIETLY) + MESSAGE(STATUS "Found LibSolv: ${LibSolv_INCLUDE_DIRS} ${LibSolv_LIBRARIES}") +ENDIF() diff --git a/miniconda3/pkgs/libsolv-0.7.30-h6f1ccf3_2/share/man/man1/dumpsolv.1 b/miniconda3/pkgs/libsolv-0.7.30-h6f1ccf3_2/share/man/man1/dumpsolv.1 new file mode 100644 index 0000000000000000000000000000000000000000..eed45fef954f8489cdceab74bf80e1f34d48814c --- /dev/null +++ b/miniconda3/pkgs/libsolv-0.7.30-h6f1ccf3_2/share/man/man1/dumpsolv.1 @@ -0,0 +1,45 @@ +'\" t +.\" Title: dumpsolv +.\" Author: [see the "Author" section] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 07/25/2017 +.\" Manual: LIBSOLV +.\" Source: libsolv +.\" Language: English +.\" +.TH "DUMPSOLV" "1" "07/25/2017" "libsolv" "LIBSOLV" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +dumpsolv \- print a solv file into a human readable format +.SH "SYNOPSIS" +.sp +\fBdumpsolv\fR [\fIOPTIONS\fR] [\fIFILE\&.solv\fR] +.SH "DESCRIPTION" +.sp +The dumpsolv tool reads a solv files and writes its contents to standard output\&. If no input file is given, it reads the solv file from standard input\&. +.PP +\fB\-j\fR +.RS 4 +Write the contents in JSON format\&. +.RE +.SH "AUTHOR" +.sp +Michael Schroeder diff --git a/miniconda3/pkgs/libsolv-0.7.30-h6f1ccf3_2/share/man/man1/installcheck.1 b/miniconda3/pkgs/libsolv-0.7.30-h6f1ccf3_2/share/man/man1/installcheck.1 new file mode 100644 index 0000000000000000000000000000000000000000..492bd801ee1ebba3b6df0d8fb555416a4160b7bc --- /dev/null +++ b/miniconda3/pkgs/libsolv-0.7.30-h6f1ccf3_2/share/man/man1/installcheck.1 @@ -0,0 +1,42 @@ +'\" t +.\" Title: installcheck +.\" Author: [see the "Author" section] +.\" Generator: DocBook XSL Stylesheets vsnapshot +.\" Date: 09/14/2018 +.\" Manual: LIBSOLV +.\" Source: libsolv +.\" Language: English +.\" +.TH "INSTALLCHECK" "1" "09/14/2018" "libsolv" "LIBSOLV" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +installcheck \- find out which packages cannot be installed +.SH "SYNOPSIS" +.sp +\fBinstallcheck\fR \fIARCH\fR \fIREPO1\fR \fIREPO2\fR\&... \fB\-\-nocheck\fR \fINREPO1\fR \fINREPO2\fR\&... +.SH "DESCRIPTION" +.sp +The installcheck tool checks if all packages in \fIREPO1\fR\&...\fIREPON\fR are installable\&. A package is installable if there is a set of packages from the repositories that satisfies its dependencies\&. The repositories after the \fB\-\-nocheck\fR option are only used for dependency resolving, but the tool does not check if the packages in them are installable\&. +.sp +A Repository can be a solv file, a rpmmd \fBprimary\&.xml\&.gz\fR file, a SUSE \fBpackages\fR or \fBpackages\&.gz\fR file, or a Debian \fBPackages\fR or \fBPackages\&.gz\fR file\&. +.SH "AUTHOR" +.sp +Michael Schroeder diff --git a/miniconda3/pkgs/libsolv-0.7.30-h6f1ccf3_2/share/man/man1/mergesolv.1 b/miniconda3/pkgs/libsolv-0.7.30-h6f1ccf3_2/share/man/man1/mergesolv.1 new file mode 100644 index 0000000000000000000000000000000000000000..65fd7562a53dd4a684cb6147d72413d0ac0c72ed --- /dev/null +++ b/miniconda3/pkgs/libsolv-0.7.30-h6f1ccf3_2/share/man/man1/mergesolv.1 @@ -0,0 +1,45 @@ +'\" t +.\" Title: mergesolv +.\" Author: [see the "Author" section] +.\" Generator: DocBook XSL Stylesheets vsnapshot +.\" Date: 09/14/2018 +.\" Manual: LIBSOLV +.\" Source: libsolv +.\" Language: English +.\" +.TH "MERGESOLV" "1" "09/14/2018" "libsolv" "LIBSOLV" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +mergesolv \- merge multiple files in solv format into a single one +.SH "SYNOPSIS" +.sp +\fBmergesolv\fR [\fIOPTIONS\fR] \fIFILE1\&.solv\fR \fIFILE2\&.solv\fR \&... +.SH "DESCRIPTION" +.sp +The mergesolv tool reads all solv files specified on the command line, and writes a merged version to standard output\&. +.PP +\fB\-X\fR +.RS 4 +Autoexpand SUSE pattern and product provides into packages\&. +.RE +.SH "AUTHOR" +.sp +Michael Schroeder diff --git a/miniconda3/pkgs/libsolv-0.7.30-h6f1ccf3_2/share/man/man1/repo2solv.1 b/miniconda3/pkgs/libsolv-0.7.30-h6f1ccf3_2/share/man/man1/repo2solv.1 new file mode 100644 index 0000000000000000000000000000000000000000..0a8c3cf1dac019fb497cb372b989c2b6ad74d12b --- /dev/null +++ b/miniconda3/pkgs/libsolv-0.7.30-h6f1ccf3_2/share/man/man1/repo2solv.1 @@ -0,0 +1,79 @@ +'\" t +.\" Title: repo2solv +.\" Author: [see the "Author" section] +.\" Generator: DocBook XSL Stylesheets vsnapshot +.\" Date: 10/22/2018 +.\" Manual: LIBSOLV +.\" Source: libsolv +.\" Language: English +.\" +.TH "REPO2SOLV" "1" "10/22/2018" "libsolv" "LIBSOLV" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +repo2solv \- convert repository metadata into a solv file +.SH "SYNOPSIS" +.sp +\fBrepo2solv\fR [\fIOPTIONS\fR] \fIDIR\fR +.SH "DESCRIPTION" +.sp +The repo2solv tool converts repository metadata in the directory \fIDIR\fR into a solv file written to standard output\&. +.sp +Note that repo2solv does not verify signatures or checksum, it is expected that this is done by the tool that downloads the metadata\&. +.sp +If no metadata is detected, repo2solv assumes the "plaindir" format and generates the solv file from all rpm files it finds\&. +.PP +\fB\-o\fR \fIOUTFILE\fR +.RS 4 +Write the solv file to +\fIOUTFILE\fR +instead of stdout\&. +.RE +.PP +\fB\-R\fR +.RS 4 +Also recurse into subdirectories in "plaindir" mode\&. +.RE +.PP +\fB\-F\fR +.RS 4 +Put the complete filelist in the output\&. The default is to just include the "importent" parts of the file list, except for "plaindir" mode, which always includes all files\&. +.RE +.PP +\fB\-C\fR +.RS 4 +Add changelog entires to the output\&. +.RE +.PP +\fB\-A\fR +.RS 4 +Add appdata pseudo packages to the output\&. This is an experimental feature\&. +.RE +.PP +\fB\-X\fR +.RS 4 +Autoexpand SUSE pattern and product provides into packages\&. +.RE +.SH "SEE ALSO" +.sp +dumpsolv(1) +.SH "AUTHOR" +.sp +Michael Schroeder diff --git a/miniconda3/pkgs/libsolv-0.7.30-h6f1ccf3_2/share/man/man1/solv.1 b/miniconda3/pkgs/libsolv-0.7.30-h6f1ccf3_2/share/man/man1/solv.1 new file mode 100644 index 0000000000000000000000000000000000000000..aae1c6d50e9d997d8f5b08affee405fbdb2f890e --- /dev/null +++ b/miniconda3/pkgs/libsolv-0.7.30-h6f1ccf3_2/share/man/man1/solv.1 @@ -0,0 +1,102 @@ +'\" t +.\" Title: solv +.\" Author: [see the "Author" section] +.\" Generator: DocBook XSL Stylesheets vsnapshot +.\" Date: 10/22/2018 +.\" Manual: LIBSOLV +.\" Source: libsolv +.\" Language: English +.\" +.TH "SOLV" "1" "10/22/2018" "libsolv" "LIBSOLV" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +solv \- example package manager based on libsolv +.SH "SYNOPSIS" +.sp +\fBsolv\fR install [OPTIONS] PKG\&... +.sp +\fBsolv\fR erase [OPTIONS] PKG\&... +.sp +\fBsolv\fR list [OPTIONS] PKG\&... +.sp +\fBsolv\fR info [OPTIONS] PKG\&... +.sp +\fBsolv\fR search [OPTIONS] STRING\&... +.sp +\fBsolv\fR verify [OPTIONS] PKG\&... +.sp +\fBsolv\fR update [OPTIONS] PKG\&... +.sp +\fBsolv\fR dist\-upgrade [OPTIONS] PKG\&... +.sp +\fBsolv\fR repolist [OPTIONS] +.SH "DESCRIPTION" +.sp +The solv tool demos some features of the libsolv library\&. It is not meant to replace a real package manager, for example it does not cache downloaded packages\&. +.PP +\fB\-\-root\fR \fIROOTDIR\fR +.RS 4 +Install packages using +\fIROOTDIR\fR +as root of the filesystem\&. This also means that the package database of +\fIROOTDIR\fR +will be used\&. +.RE +.PP +\fB\-\-clean\fR +.RS 4 +Also get rid of no longer needed packages when erasing, like libraries that have been used by the erased packages\&. +.RE +.PP +\fB\-\-best\fR +.RS 4 +Force usage of the best package (normally the one with the highest version) for install and update operations\&. +.RE +.PP +\fB\-\-testcase\fR +.RS 4 +Write a testcase after dependency solving\&. +.RE +.sp +The following options can be used to filter the packages\&. If the same option is used multiple times, the result is ORed together\&. +.PP +\fB\-i\fR +.RS 4 +Limit the packages to installed ones\&. +.RE +.PP +\fB\-r\fR \fIREPO\fR +.RS 4 +Limit the packages to the specified repository\&. +.RE +.PP +\fB\-\-arch\fR \fIARCHITECTURE\fR +.RS 4 +Limit the packages to the specified package architecture\&. +.RE +.PP +\fB\-\-type\fR \fITYPE\fR +.RS 4 +Limit the packages to the specified package type\&. +.RE +.SH "AUTHOR" +.sp +Michael Schroeder diff --git a/miniconda3/pkgs/libsolv-0.7.30-h6f1ccf3_2/share/man/man1/testsolv.1 b/miniconda3/pkgs/libsolv-0.7.30-h6f1ccf3_2/share/man/man1/testsolv.1 new file mode 100644 index 0000000000000000000000000000000000000000..b487f27cb108e09a061fc53ac5322461efdf5ef6 --- /dev/null +++ b/miniconda3/pkgs/libsolv-0.7.30-h6f1ccf3_2/share/man/man1/testsolv.1 @@ -0,0 +1,62 @@ +'\" t +.\" Title: testsolv +.\" Author: [see the "Author" section] +.\" Generator: DocBook XSL Stylesheets vsnapshot +.\" Date: 03/25/2024 +.\" Manual: LIBSOLV +.\" Source: libsolv +.\" Language: English +.\" +.TH "TESTSOLV" "1" "03/25/2024" "libsolv" "LIBSOLV" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +testsolv \- run a libsolv testcase through the solver +.SH "SYNOPSIS" +.sp +\fBtestsolv\fR [\fIOPTIONS\fR] \fITESTCASE\fR +.SH "DESCRIPTION" +.sp +The testsolv tools can be used to run a testcase\&. Testcases can either be manually created to test specific features, or they can be written by libsolv\(cqs testcase_write function\&. This is useful to evaluate bug reports about the solver\&. +.PP +\fB\-v\fR +.RS 4 +Increase the debug level of the solver\&. This option can be specified multiple times to further increase the amount of debug data\&. +.RE +.PP +\fB\-r\fR +.RS 4 +Write the output in testcase format instead of human readable text\&. The output can then be used in the result section of the test case\&. If the +\fB\-r\fR +option is given twice, the output is formatted for verbatim inclusion\&. +.RE +.PP +\fB\-l\fR \fIPKGSPEC\fR +.RS 4 +Instead of running the solver, list packages in the repositories\&. +.RE +.PP +\fB\-s\fR \fISOLUTIONSPEC\fR +.RS 4 +This is used in the solver test suite to test the calculated solutions to encountered problems\&. +.RE +.SH "AUTHOR" +.sp +Michael Schroeder diff --git a/miniconda3/pkgs/libsolv-0.7.30-h6f1ccf3_2/share/man/man3/libsolv-bindings.3 b/miniconda3/pkgs/libsolv-0.7.30-h6f1ccf3_2/share/man/man3/libsolv-bindings.3 new file mode 100644 index 0000000000000000000000000000000000000000..d5533d0d922d5c1bc40562f92b9b06bf78224688 --- /dev/null +++ b/miniconda3/pkgs/libsolv-0.7.30-h6f1ccf3_2/share/man/man3/libsolv-bindings.3 @@ -0,0 +1,7084 @@ +'\" t +.\" Title: Libsolv-Bindings +.\" Author: [see the "Author" section] +.\" Generator: DocBook XSL Stylesheets vsnapshot +.\" Date: 07/09/2024 +.\" Manual: LIBSOLV +.\" Source: libsolv +.\" Language: English +.\" +.TH "LIBSOLV\-BINDINGS" "3" "07/09/2024" "libsolv" "LIBSOLV" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +libsolv-bindings \- access libsolv from perl/python/ruby +.SH "DESCRIPTION" +.sp +Libsolv\(cqs language bindings offer an abstract, object orientated interface to the library\&. The supported languages are currently perl, python, ruby and tcl\&. All example code (except in the specifics sections, of course) lists first the \(lqC\-ish\(rq interface, then the syntax for perl, python, and ruby (in that order)\&. +.SH "PERL SPECIFICS" +.sp +Libsolv\(cqs perl bindings can be loaded with the following statement: +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBuse solv\fR; +.fi +.if n \{\ +.RE +.\} +.sp +Objects are either created by calling the new() method on a class or they are returned by calling methods on other objects\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +my \fI$pool\fR \fB= solv::Pool\->new()\fR; +my \fI$repo\fR \fB=\fR \fI$pool\fR\fB\->add_repo("my_first_repo")\fR; +.fi +.if n \{\ +.RE +.\} +.sp +Swig encapsulates all objects as tied hashes, thus the attributes can be accessed by treating the object as standard hash reference: +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fI$pool\fR\fB\->{appdata} = 42\fR; +\fBprintf "appdata is %d\en",\fR \fI$pool\fR\fB\->{appdata}\fR; +.fi +.if n \{\ +.RE +.\} +.sp +A special exception to this are iterator objects, they are encapsulated as tied arrays so that it is possible to iterate with a for() statement: +.sp +.if n \{\ +.RS 4 +.\} +.nf +my \fI$iter\fR \fB=\fR \fI$pool\fR\fB\->solvables_iter()\fR; +\fBfor my\fR \fI$solvable\fR \fB(\fR\fI@$iter\fR\fB) { \&.\&.\&. }\fR; +.fi +.if n \{\ +.RE +.\} +.sp +As a downside of this approach, iterator objects cannot have attributes\&. +.sp +If an array needs to be passed to a method it is usually done by reference, if a method returns an array it returns it on the perl stack: +.sp +.if n \{\ +.RS 4 +.\} +.nf +my \fI@problems\fR \fB=\fR \fI$solver\fR\fB\->solve(\e\fR\fI@jobs\fR\fB)\fR; +.fi +.if n \{\ +.RE +.\} +.sp +Due to a bug in swig, stringification does not work for libsolv\(cqs objects\&. Instead, you have to call the object\(cqs str() method\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBprint\fR \fI$dep\fR\fB\->str() \&. "\e\fR\fIn\fR\fB"\fR; +.fi +.if n \{\ +.RE +.\} +.sp +Swig implements all constants as numeric variables (instead of the more natural constant subs), so don\(cqt forget the leading \(lq$\(rq when accessing a constant\&. Also do not forget to prepend the namespace of the constant: +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fI$pool\fR\fB\->set_flag($solv::Pool::POOL_FLAG_OBSOLETEUSESCOLORS, 1)\fR; +.fi +.if n \{\ +.RE +.\} +.SH "PYTHON SPECIFICS" +.sp +The python bindings can be loaded with: +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBimport solv\fR +.fi +.if n \{\ +.RE +.\} +.sp +Objects are either created by calling the constructor method for a class or they are returned by calling methods on other objects\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fIpool\fR \fB= solv\&.Pool()\fR +\fIrepo\fR \fB=\fR \fIpool\fR\fB\&.add_repo("my_first_repo")\fR +.fi +.if n \{\ +.RE +.\} +.sp +Attributes can be accessed as usual: +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fIpool\fR\fB\&.appdata = 42\fR +\fBprint "appdata is %d" % (\fR\fIpool\fR\fB\&.appdata)\fR +.fi +.if n \{\ +.RE +.\} +.sp +Iterators also work as expected: +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBfor\fR \fIsolvable\fR \fBin\fR \fIpool\fR\fB\&.solvables_iter():\fR +.fi +.if n \{\ +.RE +.\} +.sp +Arrays are passed and returned as list objects: +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fIjobs\fR \fB= []\fR +\fIproblems\fR \fB=\fR \fIsolver\fR\fB\&.solve(\fR\fIjobs\fR\fB)\fR +.fi +.if n \{\ +.RE +.\} +.sp +The bindings define stringification for many classes, some also have a \fIrepr\fR method to ease debugging\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBprint\fR \fIdep\fR +\fBprint repr(\fR\fIrepo\fR\fB)\fR +.fi +.if n \{\ +.RE +.\} +.sp +Constants are attributes of the corresponding classes: +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fIpool\fR\fB\&.set_flag(solv\&.Pool\&.POOL_FLAG_OBSOLETEUSESCOLORS, 1)\fR; +.fi +.if n \{\ +.RE +.\} +.SH "RUBY SPECIFICS" +.sp +The ruby bindings can be loaded with: +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBrequire \*(Aqsolv\*(Aq\fR +.fi +.if n \{\ +.RE +.\} +.sp +Objects are either created by calling the new method on a class or they are returned by calling methods on other objects\&. Note that all classes start with an uppercase letter in ruby, so the class is called \(lqSolv\(rq\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fIpool\fR \fB= Solv::Pool\&.new\fR +\fIrepo\fR \fB=\fR \fIpool\fR\fB\&.add_repo("my_first_repo")\fR +.fi +.if n \{\ +.RE +.\} +.sp +Attributes can be accessed as usual: +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fIpool\fR\fB\&.appdata = 42\fR +\fBputs "appdata is #{\fR\fIpool\fR\fB\&.appdata}"\fR +.fi +.if n \{\ +.RE +.\} +.sp +Iterators also work as expected: +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBfor\fR \fIsolvable\fR \fBin\fR \fIpool\fR\fB\&.solvables_iter() do \&.\&.\&.\fR +.fi +.if n \{\ +.RE +.\} +.sp +Arrays are passed and returned as array objects: +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fIjobs\fR \fB= []\fR +\fIproblems\fR \fB=\fR \fIsolver\fR\fB\&.solve(\fR\fIjobs\fR\fB)\fR +.fi +.if n \{\ +.RE +.\} +.sp +Most classes define a to_s method, so objects can be easily stringified\&. Many also define an inspect() method\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBputs\fR \fIdep\fR +\fBputs\fR \fIrepo\fR\fB\&.inspect\fR +.fi +.if n \{\ +.RE +.\} +.sp +Constants live in the namespace of the class they belong to: +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fIpool\fR\fB\&.set_flag(Solv::Pool::POOL_FLAG_OBSOLETEUSESCOLORS, 1)\fR; +.fi +.if n \{\ +.RE +.\} +.sp +Note that boolean methods have an added trailing \(lq?\(rq, to be consistent with other ruby modules: +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBputs "empty" if\fR \fIrepo\fR\fB\&.isempty?\fR +.fi +.if n \{\ +.RE +.\} +.SH "TCL SPECIFICS" +.sp +Libsolv\(cqs tcl bindings can be loaded with the following statement: +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBpackage require solv\fR +.fi +.if n \{\ +.RE +.\} +.sp +Objects are either created by calling class name prefixed with \(lqnew_\(rq, or they are returned by calling methods on other objects\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBset pool [solv::new_Pool]\fR +\fBset repo [\fR\fI$pool\fR \fBadd_repo "my_first_repo"]\fR +.fi +.if n \{\ +.RE +.\} +.sp +Swig provides a \(lqcget\(rq method to read object attributes, and a \(lqconfigure\(rq method to write them: +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fI$pool\fR \fBconfigure \-appdata 42\fR +\fBputs "appdata is [\fR\fI$pool\fR \fBcget \-appdata]"\fR +.fi +.if n \{\ +.RE +.\} +.sp +The tcl bindings provide a little helper to work with iterators in a foreach style: +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBset iter [\fR\fI$pool\fR \fBsolvables_iter]\fR +\fBsolv::iter s\fR \fI$iter\fR \fB{ \&.\&.\&. }\fR +.fi +.if n \{\ +.RE +.\} +.sp +libsolv\(cqs arrays are mapped to tcl\(cqs lists: +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBset jobs [list\fR \fI$job1 $job2\fR\fB]\fR +\fBset problems [\fR\fI$solver\fR \fBsolve\fR \fI$jobs\fR\fB]\fR +\fBputs "We have [llength\fR \fI$problems\fR\fB] problems\&.\&.\&."\fR +.fi +.if n \{\ +.RE +.\} +.sp +Stringification is done by calling the object\(cqs \(lqstr\(rq method\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBputs [\fR\fI$dep\fR \fBstr]\fR +.fi +.if n \{\ +.RE +.\} +.sp +There is one exception: you have to use \(lqstringify\(rq for Datamatch objects, as swig reports a clash with the \(lqstr\(rq attribute\&. +.sp +Some classes also support a \(lq==\(rq method for equality tests, and a \(lq!=\(rq method\&. +.sp +Swig implements all constants as numeric variables, constants belonging to a libsolv class are prefixed with the class name: +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fI$pool\fR \fBset_flag\fR \fI$solv::Pool_POOL_FLAG_OBSOLETEUSESCOLORS\fR \fB1\fR +\fBputs [\fR\fI$solvable\fR \fBlookup_str\fR \fI$solv::SOLVABLE_SUMMARY\fR\fB]\fR +.fi +.if n \{\ +.RE +.\} +.SH "LUA SPECIFICS" +.sp +Libsolv\(cqs lua bindings can be loaded with the following statement: +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBrequire("solv")\fR +.fi +.if n \{\ +.RE +.\} +.sp +Objects are either created by calling the constructor method for a class or they are returned by calling methods on other objects\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fIpool\fR \fB= solv\&.Pool()\fR +\fIrepo\fR \fB=\fR \fIpool\fR\fB:add_repo("my_first_repo")\fR +.fi +.if n \{\ +.RE +.\} +.sp +Note the \(lq:method\(rq syntax that makes lua add the object as first argument\&. +.sp +Attributes can be accessed as usual: +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fIpool\fR\fB\&.appdata = 42\fR +\fBprint("appdata is "\&.\&.pool\&.appdata)\fR +.fi +.if n \{\ +.RE +.\} +.sp +Iterators also work as expected: +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBfor\fR \fIsolvable\fR \fBin\fR \fIpool\fR\fB\&.solvables do \&.\&.\&.\fR +.fi +.if n \{\ +.RE +.\} +.sp +Note that some functions return a table instead of an iterator, so you need to use \(lqipairs\(rq for iteration: +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBfor\fR \fI_\fR\fB,solvable\fR \fBin ipairs(\fR\fIjob\fR\fB\&.solvables()) do \&.\&.\&.\fR +.fi +.if n \{\ +.RE +.\} +.sp +Arrays are passed and returned as tables: +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fIjobs\fR \fB= {}\fR +\fIproblems\fR \fB=\fR \fIsolver\fR\fB\&.solve(\fR\fIjobs\fR\fB)\fR +\fBif #problems != 0 then \&.\&.\&.\fR +.fi +.if n \{\ +.RE +.\} +.sp +The bindings define a \(lq__tostring\(rq method for many classes: +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBprint(\fR\fIdep\fR\fB)\fR +\fBprint(("Package: %\fR\fIs\fR\fB"):format(\fR\fIsolvable\fR\fB))\fR +.fi +.if n \{\ +.RE +.\} +.sp +Constants live in the namespace of the class they belong to: +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fIpool\fR\fB:set_flag(Solv\&.Pool\&.POOL_FLAG_OBSOLETEUSESCOLORS, 1)\fR; +.fi +.if n \{\ +.RE +.\} +.SH "THE SOLV CLASS" +.sp +This is the main namespace of the library, you cannot create objects of this type but it contains some useful constants\&. +.SS "CONSTANTS" +.sp +Relational flag constants, the first three can be or\-ed together +.PP +\fBREL_LT\fR +.RS 4 +the \(lqless than\(rq bit +.RE +.PP +\fBREL_EQ\fR +.RS 4 +the \(lqequals to\(rq bit +.RE +.PP +\fBREL_GT\fR +.RS 4 +the \(lqgreater than\(rq bit +.RE +.PP +\fBREL_ARCH\fR +.RS 4 +used for relations that describe an extra architecture filter, the version part of the relation is interpreted as architecture\&. +.RE +.sp +Special Solvable Ids +.PP +\fBSOLVID_META\fR +.RS 4 +Access the meta section of a repository or repodata area\&. This is like an extra Solvable that has the Id SOLVID_META\&. +.RE +.PP +\fBSOLVID_POS\fR +.RS 4 +Use the data position stored inside of the pool instead of accessing some solvable by Id\&. The bindings have the Datapos objects as an abstraction mechanism, so you most likely do not need this constant\&. +.RE +.sp +Constant string Ids +.PP +\fBID_NULL\fR +.RS 4 +Always zero +.RE +.PP +\fBID_EMPTY\fR +.RS 4 +Always one, describes the empty string +.RE +.PP +\fBSOLVABLE_NAME\fR +.RS 4 +The keyname Id of the name of the solvable\&. +.RE +.PP +\fB\&...\fR +.RS 4 +see the libsolv\-constantids manpage for a list of fixed Ids\&. +.RE +.SH "THE POOL CLASS" +.sp +The pool is libsolv\(cqs central resource manager\&. A pool consists of Solvables, Repositories, Dependencies, each indexed by Ids\&. +.SS "CLASS METHODS" +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBPool *Pool()\fR +my \fI$pool\fR \fB= solv::Pool\->new()\fR; +\fIpool\fR \fB= solv\&.Pool()\fR +\fIpool\fR \fB= Solv::Pool\&.new()\fR +.fi +.if n \{\ +.RE +.\} +.sp +Create a new pool instance\&. In most cases you just need one pool\&. Note that the returned object "owns" the pool, i\&.e\&. if the object is freed, the pool is also freed\&. You can use the disown method to break this ownership relation\&. +.SS "ATTRIBUTES" +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBvoid *appdata;\fR /* read/write */ +\fI$pool\fR\fB\->{appdata}\fR +\fIpool\fR\fB\&.appdata\fR +\fIpool\fR\fB\&.appdata\fR +.fi +.if n \{\ +.RE +.\} +.sp +Application specific data that may be used in any way by the code using the pool\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBSolvable solvables[];\fR /* read only */ +my \fI$solvable\fR \fB=\fR \fI$pool\fR\fB\->{solvables}\->[\fR\fI$solvid\fR\fB]\fR; +\fIsolvable\fR \fB=\fR \fIpool\fR\fB\&.solvables[\fR\fIsolvid\fR\fB]\fR +\fIsolvable\fR \fB=\fR \fIpool\fR\fB\&.solvables[\fR\fIsolvid\fR\fB]\fR +.fi +.if n \{\ +.RE +.\} +.sp +Look up a Solvable by its id\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBRepo repos[];\fR /* read only */ +my \fI$repo\fR \fB=\fR \fI$pool\fR\fB\->{repos}\->[\fR\fI$repoid\fR\fB]\fR; +\fIrepo\fR \fB=\fR \fIpool\fR\fB\&.repos[\fR\fIrepoid\fR\fB]\fR +\fIrepo\fR \fB=\fR \fIpool\fR\fB\&.repos[\fR\fIrepoid\fR\fB]\fR +.fi +.if n \{\ +.RE +.\} +.sp +Look up a Repository by its id\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBRepo *installed;\fR /* read/write */ +\fI$pool\fR\fB\->{installed} =\fR \fI$repo\fR; +\fIpool\fR\fB\&.installed =\fR \fIrepo\fR +\fIpool\fR\fB\&.installed =\fR \fIrepo\fR +.fi +.if n \{\ +.RE +.\} +.sp +Define which repository contains all the installed packages\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBconst char *errstr;\fR /* read only */ +my \fI$err\fR \fB=\fR \fI$pool\fR\fB\->{errstr}\fR; +\fIerr\fR \fB=\fR \fIpool\fR\fB\&.errstr\fR +\fIerr\fR \fB=\fR \fIpool\fR\fB\&.errstr\fR +.fi +.if n \{\ +.RE +.\} +.sp +Return the last error string that was stored in the pool\&. +.SS "CONSTANTS" +.PP +\fBPOOL_FLAG_PROMOTEEPOCH\fR +.RS 4 +Promote the epoch of the providing dependency to the requesting dependency if it does not contain an epoch\&. Used at some time in old rpm versions, modern systems should never need this\&. +.RE +.PP +\fBPOOL_FLAG_FORBIDSELFCONFLICTS\fR +.RS 4 +Disallow the installation of packages that conflict with themselves\&. Debian always allows self\-conflicting packages, rpm used to forbid them but switched to also allowing them since rpm\-4\&.9\&.0\&. +.RE +.PP +\fBPOOL_FLAG_OBSOLETEUSESPROVIDES\fR +.RS 4 +Make obsolete type dependency match against provides instead of just the name and version of packages\&. Very old versions of rpm used the name/version, then it got switched to provides and later switched back again to just name/version\&. +.RE +.PP +\fBPOOL_FLAG_IMPLICITOBSOLETEUSESPROVIDES\fR +.RS 4 +An implicit obsoletes is the internal mechanism to remove the old package on an update\&. The default is to remove all packages with the same name, rpm\-5 switched to also removing packages providing the same name\&. +.RE +.PP +\fBPOOL_FLAG_OBSOLETEUSESCOLORS\fR +.RS 4 +Rpm\(cqs multilib implementation distinguishes between 32bit and 64bit packages (the terminology is that they have a different color)\&. If obsoleteusescolors is set, packages with different colors will not obsolete each other\&. +.RE +.PP +\fBPOOL_FLAG_IMPLICITOBSOLETEUSESCOLORS\fR +.RS 4 +Same as POOL_FLAG_OBSOLETEUSESCOLORS, but used to find out if packages of the same name can be installed in parallel\&. For current Fedora systems, POOL_FLAG_OBSOLETEUSESCOLORS should be false and POOL_FLAG_IMPLICITOBSOLETEUSESCOLORS should be true (this is the default if FEDORA is defined when libsolv is compiled)\&. +.RE +.PP +\fBPOOL_FLAG_NOINSTALLEDOBSOLETES\fR +.RS 4 +Since version 4\&.9\&.0 rpm considers the obsoletes of installed packages when checking for dependency conflicts, thus you may not install a package that is obsoleted by some other installed package unless you also erase the other package\&. +.RE +.PP +\fBPOOL_FLAG_HAVEDISTEPOCH\fR +.RS 4 +Mandriva added a new field called distepoch that gets checked in version comparison if the epoch/version/release of two packages are the same\&. +.RE +.PP +\fBPOOL_FLAG_NOOBSOLETESMULTIVERSION\fR +.RS 4 +If a package is installed in multiversion mode, rpm used to ignore both the implicit obsoletes and the obsolete dependency of a package\&. This was changed to ignoring just the implicit obsoletes, thus you may install multiple versions of the same name, but obsoleted packages still get removed\&. +.RE +.PP +\fBPOOL_FLAG_ADDFILEPROVIDESFILTERED\fR +.RS 4 +Make the addfileprovides method only add files from the standard locations (i\&.e\&. the \(lqbin\(rq and \(lqetc\(rq directories)\&. This is useful if you have only few packages that use non\-standard file dependencies, but you still want the fast speed that addfileprovides() generates\&. +.RE +.PP +\fBPOOL_FLAG_NOWHATPROVIDESAUX\fR +.RS 4 +Disable the creation of the auxiliary whatprovides index\&. This saves a bit of memory but also makes the whatprovides lookups a bit slower\&. +.RE +.PP +\fBPOOL_FLAG_WHATPROVIDESWITHDISABLED\fR +.RS 4 +Make the whatprovides index also contain disabled packages\&. This means that you do not need to recreate the index if a package is enabled/disabled, i\&.e\&. the pool→considered bitmap is changed\&. +.RE +.SS "METHODS" +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBvoid free()\fR +\fI$pool\fR\fB\->free()\fR; +\fIpool\fR\fB\&.free()\fR +\fIpool\fR\fB\&.free()\fR +.fi +.if n \{\ +.RE +.\} +.sp +Force a free of the pool\&. After this call, you must not access any object that still references the pool\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBvoid disown()\fR +\fI$pool\fR\fB\->disown()\fR; +\fIpool\fR\fB\&.disown()\fR +\fIpool\fR\fB\&.disown()\fR +.fi +.if n \{\ +.RE +.\} +.sp +Break the ownership relation between the binding object and the pool\&. After this call, the pool will not get freed even if the object goes out of scope\&. This also means that you must manually call the free method to free the pool data\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBvoid setdebuglevel(int\fR \fIlevel\fR\fB)\fR +\fI$pool\fR\fB\->setdebuglevel(\fR\fI$level\fR\fB)\fR; +\fIpool\fR\fB\&.setdebuglevel(\fR\fIlevel\fR\fB)\fR +\fIpool\fR\fB\&.setdebuglevel(\fR\fIlevel\fR\fB)\fR +.fi +.if n \{\ +.RE +.\} +.sp +Set the debug level\&. A value of zero means no debug output, the higher the value, the more output is generated\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBint set_flag(int\fR \fIflag\fR\fB, int\fR \fIvalue\fR\fB)\fR +my \fI$oldvalue\fR \fB=\fR \fI$pool\fR\fB\->set_flag(\fR\fI$flag\fR\fB,\fR \fI$value\fR\fB)\fR; +\fIoldvalue\fR \fB=\fR \fIpool\fR\fB\&.set_flag(\fR\fIflag\fR\fB,\fR \fIvalue\fR\fB)\fR +\fIoldvalue\fR \fB=\fR \fIpool\fR\fB\&.set_flag(\fR\fIflag\fR\fB,\fR \fIvalue\fR\fB)\fR +.fi +.if n \{\ +.RE +.\} +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBint get_flag(int\fR \fIflag\fR\fB)\fR +my \fI$value\fR \fB=\fR \fI$pool\fR\fB\->get_flag(\fR\fI$flag\fR\fB)\fR; +\fIvalue\fR \fB=\fR \fIpool\fR\fB\&.get_flag(\fR\fIflag\fR\fB)\fR +\fIvalue\fR \fB=\fR \fIpool\fR\fB\&.get_flag(\fR\fIflag\fR\fB)\fR +.fi +.if n \{\ +.RE +.\} +.sp +Set/get a pool specific flag\&. The flags define how the system works, e\&.g\&. how the package manager treats obsoletes\&. The default flags should be sane for most applications, but in some cases you may want to tweak a flag, for example if you want to solve package dependencies for some other system\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBvoid set_rootdir(const char *\fR\fIrootdir\fR\fB)\fR +\fI$pool\fR\fB\->set_rootdir(\fR\fIrootdir\fR\fB)\fR; +\fIpool\fR\fB\&.set_rootdir(\fR\fIrootdir\fR\fB)\fR +\fIpool\fR\fB\&.set_rootdir(\fR\fIrootdir\fR\fB)\fR +.fi +.if n \{\ +.RE +.\} +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBconst char *get_rootdir()\fR +my \fI$rootdir\fR \fB=\fR \fI$pool\fR\fB\->get_rootdir()\fR; +\fIrootdir\fR \fB=\fR \fIpool\fR\fB\&.get_rootdir()\fR +\fIrootdir\fR \fB=\fR \fIpool\fR\fB\&.get_rootdir()\fR +.fi +.if n \{\ +.RE +.\} +.sp +Set/get the rootdir to use\&. This is useful if you want package management to work only in some directory, for example if you want to setup a chroot jail\&. Note that the rootdir will only be prepended to file paths if the \fBREPO_USE_ROOTDIR\fR flag is used\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBvoid setarch(const char *\fR\fIarch\fR \fB= 0)\fR +\fI$pool\fR\fB\->setarch()\fR; +\fIpool\fR\fB\&.setarch()\fR +\fIpool\fR\fB\&.setarch()\fR +.fi +.if n \{\ +.RE +.\} +.sp +Set the architecture for your system\&. The architecture is used to determine which packages are installable\&. It defaults to the result of \(lquname \-m\(rq\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBRepo add_repo(const char *\fR\fIname\fR\fB)\fR +\fI$repo\fR \fB=\fR \fI$pool\fR\fB\->add_repo(\fR\fI$name\fR\fB)\fR; +\fIrepo\fR \fB=\fR \fIpool\fR\fB\&.add_repo(\fR\fIname\fR\fB)\fR +\fIrepo\fR \fB=\fR \fIpool\fR\fB\&.add_repo(\fR\fIname\fR\fB)\fR +.fi +.if n \{\ +.RE +.\} +.sp +Add a Repository with the specified name to the pool\&. The repository is empty on creation, use the repository methods to populate it with packages\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBRepoiterator repos_iter()\fR +\fBfor my\fR \fI$repo\fR \fB(\fR\fI@\fR\fB{\fR\fI$pool\fR\fB\->repos_iter()})\fR +\fBfor\fR \fIrepo\fR \fBin\fR \fIpool\fR\fB\&.repos_iter():\fR +\fBfor\fR \fIrepo\fR \fBin\fR \fIpool\fR\fB\&.repos_iter()\fR +.fi +.if n \{\ +.RE +.\} +.sp +Iterate over the existing repositories\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBSolvableiterator solvables_iter()\fR +\fBfor my\fR \fI$solvable\fR \fB(\fR\fI@\fR\fB{\fR\fI$pool\fR\fB\->solvables_iter()})\fR +\fBfor\fR \fIsolvable\fR \fBin\fR \fIpool\fR\fB\&.solvables_iter():\fR +\fBfor\fR \fIsolvable\fR \fBin\fR \fIpool\fR\fB\&.solvables_iter()\fR +.fi +.if n \{\ +.RE +.\} +.sp +Iterate over the existing solvables\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBDep Dep(const char *\fR\fIstr\fR\fB, bool\fR \fIcreate\fR \fB= 1)\fR +my \fI$dep\fR \fB=\fR \fI$pool\fR\fB\->Dep(\fR\fI$string\fR\fB)\fR; +\fIdep\fR \fB=\fR \fIpool\fR\fB\&.Dep(\fR\fIstring\fR\fB)\fR +\fIdep\fR \fB=\fR \fIpool\fR\fB\&.Dep(\fR\fIstring\fR\fB)\fR +.fi +.if n \{\ +.RE +.\} +.sp +Create an object describing a string or dependency\&. If the string is currently not in the pool and \fIcreate\fR is false, \fBundef\fR/\fBNone\fR/\fBnil\fR is returned\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBvoid addfileprovides()\fR +\fI$pool\fR\fB\->addfileprovides()\fR; +\fIpool\fR\fB\&.addfileprovides()\fR +\fIpool\fR\fB\&.addfileprovides()\fR +.fi +.if n \{\ +.RE +.\} +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBId *addfileprovides_queue()\fR +my \fI@ids\fR \fB=\fR \fI$pool\fR\fB\->addfileprovides_queue()\fR; +\fIids\fR \fB=\fR \fIpool\fR\fB\&.addfileprovides_queue()\fR +\fIids\fR \fB=\fR \fIpool\fR\fB\&.addfileprovides_queue()\fR +.fi +.if n \{\ +.RE +.\} +.sp +Some package managers like rpm allow dependencies on files contained in other packages\&. To allow libsolv to deal with those dependencies in an efficient way, you need to call the addfileprovides method after creating and reading all repositories\&. This method will scan all dependency for file names and then scan all packages for matching files\&. If a filename has been matched, it will be added to the provides list of the corresponding package\&. The addfileprovides_queue variant works the same way but returns an array containing all file dependencies\&. This information can be stored in the meta section of the repositories to speed up the next time the repository is loaded and addfileprovides is called\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBvoid createwhatprovides()\fR +\fI$pool\fR\fB\->createwhatprovides()\fR; +\fIpool\fR\fB\&.createwhatprovides()\fR +\fIpool\fR\fB\&.createwhatprovides()\fR +.fi +.if n \{\ +.RE +.\} +.sp +Create the internal \(lqwhatprovides\(rq hash over all of the provides of all installable packages\&. This method must be called before doing any lookups on provides\&. It\(cqs encouraged to do it right after all repos are set up, usually right after the call to addfileprovides()\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBSolvable *whatprovides(DepId\fR \fIdep\fR\fB)\fR +my \fI@solvables\fR \fB=\fR \fI$pool\fR\fB\->whatprovides(\fR\fI$dep\fR\fB)\fR; +\fIsolvables\fR \fB=\fR \fIpool\fR\fB\&.whatprovides(\fR\fIdep\fR\fB)\fR +\fIsolvables\fR \fB=\fR \fIpool\fR\fB\&.whatprovides(\fR\fIdep\fR\fB)\fR +.fi +.if n \{\ +.RE +.\} +.sp +Return all solvables that provide the specified dependency\&. You can use either a Dep object or a simple Id as argument\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBSolvable *best_solvables(Solvable *\fR\fIsolvables\fR\fB, int\fR \fIflags\fR \fB= 0)\fR +my \fI@solvables\fR \fB=\fR \fI$pool\fR\fB\->best_solvables(\fR\fI$solvables\fR\fB)\fR; +\fIsolvables\fR \fB=\fR \fIpool\fR\fB\&.best_solvables(\fR\fIsolvables\fR\fB)\fR +\fIsolvables\fR \fB=\fR \fIpool\fR\fB\&.best_solvables(\fR\fIsolvables\fR\fB)\fR +.fi +.if n \{\ +.RE +.\} +.sp +Filter list of solvables by repo priority, architecture and version\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBSolvable *whatcontainsdep(Id\fR \fIkeyname\fR\fB, DepId\fR \fIdep\fR\fB, Id\fR \fImarker\fR \fB= \-1)\fR +my \fI@solvables\fR \fB=\fR \fI$pool\fR\fB\->whatcontainsdep(\fR\fI$keyname\fR\fB,\fR \fI$dep\fR\fB)\fR; +\fIsolvables\fR \fB=\fR \fIpool\fR\fB\&.whatcontainsdep(\fR\fIkeyname\fR\fB,\fR \fIdep\fR\fB)\fR +\fIsolvables\fR \fB=\fR \fIpool\fR\fB\&.whatcontainsdep(\fR\fIkeyname\fR\fB,\fR \fIdep\fR\fB)\fR +.fi +.if n \{\ +.RE +.\} +.sp +Return all solvables for which keyname contains the dependency\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBSolvable *whatmatchesdep(Id\fR \fIkeyname\fR\fB, DepId\fR \fIdep\fR\fB, Id\fR \fImarker\fR \fB= \-1)\fR +my \fI@solvables\fR \fB=\fR \fI$pool\fR\fB\->whatmatchesdep(\fR\fI$keyname\fR\fB,\fR \fI$sdep\fR\fB)\fR; +\fIsolvables\fR \fB=\fR \fIpool\fR\fB\&.whatmatchesdep(\fR\fIkeyname\fR\fB,\fR \fIdep\fR\fB)\fR +\fIsolvables\fR \fB=\fR \fIpool\fR\fB\&.whatmatchesdep(\fR\fIkeyname\fR\fB,\fR \fIdep\fR\fB)\fR +.fi +.if n \{\ +.RE +.\} +.sp +Return all solvables that have dependencies in keyname that match the dependency\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBSolvable *whatmatchessolvable(Id\fR \fIkeyname\fR\fB, Solvable\fR \fIsolvable\fR\fB, Id\fR \fImarker\fR \fB= \-1)\fR +my \fI@solvables\fR \fB=\fR \fI$pool\fR\fB\->whatmatchessolvable(\fR\fI$keyname\fR\fB,\fR \fI$solvable\fR\fB)\fR; +\fIsolvables\fR \fB=\fR \fIpool\fR\fB\&.whatmatchessolvable(\fR\fIkeyname\fR\fB,\fR \fIsolvable\fR\fB)\fR +\fIsolvables\fR \fB=\fR \fIpool\fR\fB\&.whatmatchessolvable(\fR\fIkeyname\fR\fB,\fR \fIsolvable\fR\fB)\fR +.fi +.if n \{\ +.RE +.\} +.sp +Return all solvables that match package dependencies against solvable\(cqs provides\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBId *matchprovidingids(const char *\fR\fImatch\fR\fB, int\fR \fIflags\fR\fB)\fR +my \fI@ids\fR \fB=\fR \fI$pool\fR\fB\->matchprovidingids(\fR\fI$match\fR\fB,\fR \fI$flags\fR\fB)\fR; +\fIids\fR \fB=\fR \fIpool\fR\fB\&.matchprovidingids(\fR\fImatch\fR\fB,\fR \fIflags\fR\fB)\fR +\fIids\fR \fB=\fR \fIpool\fR\fB\&.matchprovidingids(\fR\fImatch\fR\fB,\fR \fIflags\fR\fB)\fR +.fi +.if n \{\ +.RE +.\} +.sp +Search the names of all provides and return the ones matching the specified string\&. See the Dataiterator class for the allowed flags\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBId towhatprovides(Id *\fR\fIids\fR\fB)\fR +my \fI$offset\fR \fB=\fR \fI$pool\fR\fB\->towhatprovides(\e\fR\fI@ids\fR\fB)\fR; +\fIoffset\fR \fB=\fR \fIpool\fR\fB\&.towhatprovides(\fR\fIids\fR\fB)\fR +\fIoffset\fR \fB=\fR \fIpool\fR\fB\&.towhatprovides(\fR\fIids\fR\fB)\fR +.fi +.if n \{\ +.RE +.\} +.sp +\(lqInternalize\(rq an array containing Ids\&. The returned value can be used to create solver jobs working on a specific set of packages\&. See the Solver class for more information\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBvoid set_namespaceproviders(DepId\fR \fIns\fR\fB, DepId\fR \fIevr\fR\fB, bool\fR \fIvalue\fR \fB= 1)\fR +\fI$pool\fR\fB\->set_namespaceproviders(\fR\fI$ns\fR\fB,\fR \fI$evr\fR\fB, 1)\fR; +\fIpool\fR\fB\&.set_namespaceproviders(\fR\fIns\fR\fB,\fR \fIevr\fR\fB,\fR \fITrue\fR\fB)\fR +\fIpool\fR\fB\&.set_namespaceproviders(\fR\fIns\fR\fB,\fR \fIevr\fR\fB,\fR \fItrue\fR\fB)\fR +.fi +.if n \{\ +.RE +.\} +.sp +Manually set a namespace provides entry in the whatprovides index\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBvoid flush_namespaceproviders(DepId\fR \fIns\fR\fB, DepId\fR \fIevr\fR\fB)\fR +\fI$pool\fR\fB\->flush_namespaceproviders(\fR\fI$ns\fR\fB,\fR \fI$evr\fR\fB)\fR; +\fI$pool\fR\fB\&.flush_namespaceproviders(\fR\fIns\fR\fB,\fR \fIevr\fR\fB)\fR +\fI$pool\fR\fB\&.flush_namespaceproviders(\fR\fIns\fR\fB,\fR \fIevr\fR\fB)\fR +.fi +.if n \{\ +.RE +.\} +.sp +Flush the cache of all namespaceprovides matching the specified namespace dependency\&. You can use zero as a wildcard argument\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBbool isknownarch(DepId\fR \fIid\fR\fB)\fR +my \fI$bool\fR \fB=\fR \fI$pool\fR\fB\->isknownarch(\fR\fI$id\fR\fB)\fR; +\fIbool\fR \fB=\fR \fIpool\fR\fB\&.isknownarch(\fR\fIid\fR\fB)\fR +\fIbool\fR \fB=\fR \fIpool\fR\fB\&.isknownarch?(\fR\fIid\fR\fB)\fR +.fi +.if n \{\ +.RE +.\} +.sp +Return true if the specified Id describes a known architecture\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBSolver Solver()\fR +my \fI$solver\fR \fB=\fR \fI$pool\fR\fB\->Solver()\fR; +\fIsolver\fR \fB=\fR \fIpool\fR\fB\&.Solver()\fR +\fIsolver\fR \fB=\fR \fIpool\fR\fB\&.Solver()\fR +.fi +.if n \{\ +.RE +.\} +.sp +Create a new solver object\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBJob Job(int\fR \fIhow\fR\fB, Id\fR \fIwhat\fR\fB)\fR +my \fI$job\fR \fB=\fR \fI$pool\fR\fB\->Job(\fR\fI$how\fR\fB,\fR \fI$what\fR\fB)\fR; +\fIjob\fR \fB=\fR \fIpool\fR\fB\&.Job(\fR\fIhow\fR\fB,\fR \fIwhat\fR\fB)\fR +\fIjob\fR \fB=\fR \fIpool\fR\fB\&.Job(\fR\fIhow\fR\fB,\fR \fIwhat\fR\fB)\fR +.fi +.if n \{\ +.RE +.\} +.sp +Create a new Job object\&. Kind of low level, in most cases you would instead use a Selection or Dep job constructor\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBSelection Selection()\fR +my \fI$sel\fR \fB=\fR \fI$pool\fR\fB\->Selection()\fR; +\fIsel\fR \fB=\fR \fIpool\fR\fB\&.Selection()\fR +\fIsel\fR \fB=\fR \fIpool\fR\fB\&.Selection()\fR +.fi +.if n \{\ +.RE +.\} +.sp +Create an empty selection\&. Useful as a starting point for merging other selections\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBSelection Selection_all()\fR +my \fI$sel\fR \fB=\fR \fI$pool\fR\fB\->Selection_all()\fR; +\fIsel\fR \fB=\fR \fIpool\fR\fB\&.Selection_all()\fR +\fIsel\fR \fB=\fR \fIpool\fR\fB\&.Selection_all()\fR +.fi +.if n \{\ +.RE +.\} +.sp +Create a selection containing all packages\&. Useful as starting point for intersecting other selections or for update/distupgrade jobs\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBSelection select(const char *\fR\fIname\fR\fB, int\fR \fIflags\fR\fB)\fR +my \fI$sel\fR \fB=\fR \fI$pool\fR\fB\->select(\fR\fI$name\fR\fB,\fR \fI$flags\fR\fB)\fR; +\fIsel\fR \fB=\fR \fIpool\fR\fB\&.select(\fR\fIname\fR\fB,\fR \fIflags\fR\fB)\fR +\fIsel\fR \fB=\fR \fIpool\fR\fB\&.select(\fR\fIname\fR\fB,\fR \fIflags\fR\fB)\fR +.fi +.if n \{\ +.RE +.\} +.sp +Create a selection by matching packages against the specified string\&. See the Selection class for a list of flags and how to create solver jobs from a selection\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBSelection matchdeps(const char *\fR\fIname\fR\fB, int\fR \fIflags\fR\fB, Id\fR \fIkeyname\fR\fB, Id\fR \fImarker\fR \fB= \-1)\fR +my \fI$sel\fR \fB=\fR \fI$pool\fR\fB\->matchdeps(\fR\fI$name\fR\fB,\fR \fI$flags\fR\fB,\fR \fI$keyname\fR\fB)\fR; +\fIsel\fR \fB=\fR \fIpool\fR\fB\&.matchdeps(\fR\fIname\fR\fB,\fR \fIflags\fR\fB,\fR \fIkeyname\fR\fB)\fR +\fIsel\fR \fB=\fR \fIpool\fR\fB\&.matchdeps(\fR\fIname\fR\fB,\fR \fIflags\fR\fB,\fR \fIkeyname\fR\fB)\fR +.fi +.if n \{\ +.RE +.\} +.sp +Create a selection by matching package dependencies against the specified string\&. This can be used if you want to match other dependency types than \(lqprovides\(rq\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBSelection matchdepid(DepId\fR \fIdep\fR\fB, int\fR \fIflags\fR\fB, Id\fR \fIkeyname\fR\fB, Id\fR \fImarker\fR \fB= \-1)\fR +my \fI$sel\fR \fB=\fR \fI$pool\fR\fB\->matchdepid(\fR\fI$dep\fR\fB,\fR \fI$flags\fR\fB,\fR \fI$keyname\fR\fB)\fR; +\fIsel\fR \fB=\fR \fIpool\fR\fB\&.matchdepid(\fR\fIdep\fR\fB,\fR \fIflags\fR\fB,\fR \fIkeyname\fR\fB)\fR +\fIsel\fR \fB=\fR \fIpool\fR\fB\&.matchdepid(\fR\fIdep\fR\fB,\fR \fIflags\fR\fB,\fR \fIkeyname\fR\fB)\fR +.fi +.if n \{\ +.RE +.\} +.sp +Create a selection by matching package dependencies against the specified dependency\&. This may be faster than matchdeps and also works with complex dependencies\&. The downside is that you cannot use globs or case insensitive matching\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBSelection matchsolvable(Solvable\fR \fIsolvable\fR\fB, int\fR \fIflags\fR\fB, Id\fR \fIkeyname\fR\fB, Id\fR \fImarker\fR \fB= \-1)\fR +my \fI$sel\fR \fB=\fR \fI$pool\fR\fB\->matchsolvable(\fR\fI$solvable\fR\fB,\fR \fI$flags\fR\fB,\fR \fI$keyname\fR\fB)\fR; +\fIsel\fR \fB=\fR \fIpool\fR\fB\&.matchsolvable(\fR\fIsolvable\fR\fB,\fR \fIflags\fR\fB,\fR \fIkeyname\fR\fB)\fR +\fIsel\fR \fB=\fR \fIpool\fR\fB\&.matchsolvable(\fR\fIsolvable\fR\fB,\fR \fIflags\fR\fB,\fR \fIkeyname\fR\fB)\fR +.fi +.if n \{\ +.RE +.\} +.sp +Create a selection by matching package dependencies against the specified solvable\(cqs provides\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBvoid setpooljobs(Jobs *\fR\fIjobs\fR\fB)\fR +\fI$pool\fR\fB\->setpooljobs(\e\fR\fI@jobs\fR\fB)\fR; +\fIpool\fR\fB\&.setpooljobs(\fR\fIjobs\fR\fB)\fR +\fIpool\fR\fB\&.setpooljobs(\fR\fIjobs\fR\fB)\fR +.fi +.if n \{\ +.RE +.\} +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBJob *getpooljobs()\fR +\fI@jobs\fR \fB=\fR \fI$pool\fR\fB\->getpooljobs()\fR; +\fIjobs\fR \fB=\fR \fIpool\fR\fB\&.getpooljobs()\fR +\fIjobs\fR \fB=\fR \fIpool\fR\fB\&.getpooljobs()\fR +.fi +.if n \{\ +.RE +.\} +.sp +Get/Set fixed jobs stored in the pool\&. Those jobs are automatically appended to all solver jobs, they are meant for fixed configurations like which packages can be multiversion installed, which packages were userinstalled, or which packages must not be erased\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBvoid set_loadcallback(Callable *\fR\fIcallback\fR\fB)\fR +\fI$pool\fR\fB\->setloadcallback(\e\fR\fI&callbackfunction\fR\fB)\fR; +\fIpool\fR\fB\&.setloadcallback(\fR\fIcallbackfunction\fR\fB)\fR +\fIpool\fR\fB\&.setloadcallback { |\fR\fIrepodata\fR\fB| \&.\&.\&. }\fR +.fi +.if n \{\ +.RE +.\} +.sp +Set the callback function called when repository metadata needs to be loaded on demand\&. To make use of this feature, you need to create repodata stubs that tell the library which data is available but not loaded\&. If later on the data needs to be accessed, the callback function is called with a repodata argument\&. You can then load the data (maybe fetching it first from a remote server)\&. The callback should return true if the data has been made available\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +/* bindings only */ +\fI$pool\fR\fB\->appdata_disown()\fR +\fIpool\fR\fB\&.appdata_disown()\fR +\fIpool\fR\fB\&.appdata_disown()\fR +.fi +.if n \{\ +.RE +.\} +.sp +Decrement the reference count of the appdata object\&. This can be used to break circular references (e\&.g\&. if the pool\(cqs appdata value points to some meta data structure that contains a pool handle)\&. If used incorrectly, this method can lead to application crashes, so beware\&. (This method is a no\-op for ruby and tcl\&.) +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBId *get_considered_list()\fR +my \fI@ids\fR \fB=\fR \fI$pool\fR\fB\->get_considered_list()\fR; +\fIids\fR \fB=\fR \fIpool\fR\fB\&.get_considered_list()\fR +\fIids\fR \fB=\fR \fIpool\fR\fB\&.get_considered_list()\fR +.fi +.if n \{\ +.RE +.\} +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBvoid set_considered_list(Id *\fR\fIids\fR\fB)\fR +\fI$pool\fR\fB\->set_considered_list(\e\fR\fI@ids\fR\fB)\fR; +\fIpool\fR\fB\&.set_considered_list(\fR\fIids\fR\fB)\fR +\fIpool\fR\fB\&.set_considered_list(\fR\fIids\fR\fB)\fR +.fi +.if n \{\ +.RE +.\} +.sp +Get/set the list of solvables that are eligible for installation\&. Note that you need to recreate the whatprovides hash after changing the list\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBId *get_disabled_list()\fR +my \fI@ids\fR \fB=\fR \fI$pool\fR\fB\->get_disabled_list()\fR; +\fIids\fR \fB=\fR \fIpool\fR\fB\&.get_disabled_list()\fR +\fIids\fR \fB=\fR \fIpool\fR\fB\&.get_disabled_list()\fR +.fi +.if n \{\ +.RE +.\} +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBvoid set_disabled_list(Id *\fR\fIids\fR\fB)\fR +\fI$pool\fR\fB\->set_disabled_list(\e\fR\fI@ids\fR\fB)\fR; +\fIpool\fR\fB\&.set_disabled_list(\fR\fIids\fR\fB)\fR +\fIpool\fR\fB\&.set_disabled_list(\fR\fIids\fR\fB)\fR +.fi +.if n \{\ +.RE +.\} +.sp +Get/set the list of solvables that are not eligible for installation\&. This is basically the inverse of the \(lqconsidered\(rq methods above, i\&.e\&. calling \(lqset_disabled_list()\(rq with an empty list will make all solvables eligible for installation\&. Note you need to recreate the whatprovides hash after changing the list\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBconst char *solvableset2str(Solvable *\fR\fIsolvables\fR\fB)\fR +my \fI$str\fR \fB=\fR \fI$pool\fR\fB\->solvableset2str(\fR\fI$solvables\fR\fB)\fR; +\fIstr\fR \fB=\fR \fIpool\fR\fB\&.solvableset2str(\fR\fIsolvables\fR\fB)\fR +\fIstr\fR \fB=\fR \fIpool\fR\fB\&.solvableset2str(\fR\fIsolvables\fR\fB)\fR +.fi +.if n \{\ +.RE +.\} +.sp +Return a string describing a list of solvables\&. The method tries to reduce the output by using version ranges if possible\&. +.SS "DATA RETRIEVAL METHODS" +.sp +In the following functions, the \fIkeyname\fR argument describes what to retrieve\&. For the standard cases you can use the available Id constants\&. For example, +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fB$solv::SOLVABLE_SUMMARY\fR +\fBsolv\&.SOLVABLE_SUMMARY\fR +\fBSolv::SOLVABLE_SUMMARY\fR +.fi +.if n \{\ +.RE +.\} +.sp +selects the \(lqSummary\(rq entry of a solvable\&. The \fIsolvid\fR argument selects the desired solvable by Id\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBconst char *lookup_str(Id\fR \fIsolvid\fR\fB, Id\fR \fIkeyname\fR\fB)\fR +my \fI$string\fR \fB=\fR \fI$pool\fR\fB\->lookup_str(\fR\fI$solvid\fR\fB,\fR \fI$keyname\fR\fB)\fR; +\fIstring\fR \fB=\fR \fIpool\fR\fB\&.lookup_str(\fR\fIsolvid\fR\fB,\fR \fIkeyname\fR\fB)\fR +\fIstring\fR \fB=\fR \fIpool\fR\fB\&.lookup_str(\fR\fIsolvid\fR\fB,\fR \fIkeyname\fR\fB)\fR +.fi +.if n \{\ +.RE +.\} +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBId lookup_id(Id\fR \fIsolvid\fR\fB, Id\fR \fIkeyname\fR\fB)\fR +my \fI$id\fR \fB=\fR \fI$pool\fR\fB\->lookup_id(\fR\fI$solvid\fR\fB,\fR \fI$keyname\fR\fB)\fR; +\fIid\fR \fB=\fR \fIpool\fR\fB\&.lookup_id(\fR\fIsolvid\fR\fB,\fR \fIkeyname\fR\fB)\fR +\fIid\fR \fB=\fR \fIpool\fR\fB\&.lookup_id(\fR\fIsolvid\fR\fB,\fR \fIkeyname\fR\fB)\fR +.fi +.if n \{\ +.RE +.\} +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBunsigned long long lookup_num(Id\fR \fIsolvid\fR\fB, Id\fR \fIkeyname\fR\fB, unsigned long long\fR \fInotfound\fR \fB= 0)\fR +my \fI$num\fR \fB=\fR \fI$pool\fR\fB\->lookup_num(\fR\fI$solvid\fR\fB,\fR \fI$keyname\fR\fB)\fR; +\fInum\fR \fB=\fR \fIpool\fR\fB\&.lookup_num(\fR\fIsolvid\fR\fB,\fR \fIkeyname\fR\fB)\fR +\fInum\fR \fB=\fR \fIpool\fR\fB\&.lookup_num(\fR\fIsolvid\fR\fB,\fR \fIkeyname\fR\fB)\fR +.fi +.if n \{\ +.RE +.\} +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBbool lookup_void(Id\fR \fIsolvid\fR\fB, Id\fR \fIkeyname\fR\fB)\fR +my \fI$bool\fR \fB=\fR \fI$pool\fR\fB\->lookup_void(\fR\fI$solvid\fR\fB,\fR \fI$keyname\fR\fB)\fR; +\fIbool\fR \fB=\fR \fIpool\fR\fB\&.lookup_void(\fR\fIsolvid\fR\fB,\fR \fIkeyname\fR\fB)\fR +\fIbool\fR \fB=\fR \fIpool\fR\fB\&.lookup_void(\fR\fIsolvid\fR\fB,\fR \fIkeyname\fR\fB)\fR +.fi +.if n \{\ +.RE +.\} +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBId *lookup_idarray(Id\fR \fIsolvid\fR\fB, Id\fR \fIkeyname\fR\fB)\fR +my \fI@ids\fR \fB=\fR \fI$pool\fR\fB\->lookup_idarray(\fR\fI$solvid\fR\fB,\fR \fI$keyname\fR\fB)\fR; +\fIids\fR \fB=\fR \fIpool\fR\fB\&.lookup_idarray(\fR\fIsolvid\fR\fB,\fR \fIkeyname\fR\fB)\fR +\fIids\fR \fB=\fR \fIpool\fR\fB\&.lookup_idarray(\fR\fIsolvid\fR\fB,\fR \fIkeyname\fR\fB)\fR +.fi +.if n \{\ +.RE +.\} +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBChksum lookup_checksum(Id\fR \fIsolvid\fR\fB, Id\fR \fIkeyname\fR\fB)\fR +my \fI$chksum\fR \fB=\fR \fI$pool\fR\fB\->lookup_checksum(\fR\fI$solvid\fR\fB,\fR \fI$keyname\fR\fB)\fR; +\fIchksum\fR \fB=\fR \fIpool\fR\fB\&.lookup_checksum(\fR\fIsolvid\fR\fB,\fR \fIkeyname\fR\fB)\fR +\fIchksum\fR \fB=\fR \fIpool\fR\fB\&.lookup_checksum(\fR\fIsolvid\fR\fB,\fR \fIkeyname\fR\fB)\fR +.fi +.if n \{\ +.RE +.\} +.sp +Lookup functions\&. Return the data element stored in the specified solvable\&. You should probably use the methods of the Solvable class instead\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBDataiterator Dataiterator(Id\fR \fIkeyname\fR\fB, const char *\fR\fImatch\fR \fB= 0, int\fR \fIflags\fR \fB= 0)\fR +my \fI$di\fR \fB=\fR \fI$pool\fR\fB\->Dataiterator(\fR\fI$keyname\fR\fB,\fR \fI$match\fR\fB,\fR \fI$flags\fR\fB)\fR; +\fIdi\fR \fB=\fR \fIpool\fR\fB\&.Dataiterator(\fR\fIkeyname\fR\fB,\fR \fImatch\fR\fB,\fR \fIflags\fR\fB)\fR +\fIdi\fR \fB=\fR \fIpool\fR\fB\&.Dataiterator(\fR\fIkeyname\fR\fB,\fR \fImatch\fR\fB,\fR \fIflags\fR\fB)\fR +.fi +.if n \{\ +.RE +.\} +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBDataiterator Dataiterator_solvid(Id\fR \fIsolvid\fR\fB, Id\fR \fIkeyname\fR\fB, const char *\fR\fImatch\fR \fB= 0, int\fR \fIflags\fR \fB= 0)\fR +my \fI$di\fR \fB=\fR \fI$pool\fR\fB\->Dataiterator(\fR\fI$solvid\fR\fB,\fR \fI$keyname\fR\fB,\fR \fI$match\fR\fB,\fR \fI$flags\fR\fB)\fR; +\fIdi\fR \fB=\fR \fIpool\fR\fB\&.Dataiterator(\fR\fIsolvid\fR\fB,\fR \fIkeyname\fR\fB,\fR \fImatch\fR\fB,\fR \fIflags\fR\fB)\fR +\fIdi\fR \fB=\fR \fIpool\fR\fB\&.Dataiterator(\fR\fIsolvid\fR\fB,\fR \fIkeyname\fR\fB,\fR \fImatch\fR\fB,\fR \fIflags\fR\fB)\fR +.fi +.if n \{\ +.RE +.\} +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBfor my\fR \fI$d\fR \fB(\fR\fI@$di\fR\fB)\fR +\fBfor\fR \fId\fR \fBin\fR \fIdi\fR\fB:\fR +\fBfor\fR \fId\fR \fBin\fR \fIdi\fR +.fi +.if n \{\ +.RE +.\} +.sp +Iterate over the matching data elements\&. See the Dataiterator class for more information\&. The Dataiterator method iterates over all solvables in the pool, whereas the Dataiterator_solvid only iterates over the specified solvable\&. +.SS "ID METHODS" +.sp +The following methods deal with Ids, i\&.e\&. integers representing objects in the pool\&. They are considered \(lqlow level\(rq, in most cases you would not use them but instead the object orientated methods\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBRepo id2repo(Id\fR \fIid\fR\fB)\fR +\fI$repo\fR \fB=\fR \fI$pool\fR\fB\->id2repo(\fR\fI$id\fR\fB)\fR; +\fIrepo\fR \fB=\fR \fIpool\fR\fB\&.id2repo(\fR\fIid\fR\fB)\fR +\fIrepo\fR \fB=\fR \fIpool\fR\fB\&.id2repo(\fR\fIid\fR\fB)\fR +.fi +.if n \{\ +.RE +.\} +.sp +Lookup an existing Repository by id\&. You can also do this by using the \fBrepos\fR attribute\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBSolvable id2solvable(Id\fR \fIid\fR\fB)\fR +\fI$solvable\fR \fB=\fR \fI$pool\fR\fB\->id2solvable(\fR\fI$id\fR\fB)\fR; +\fIsolvable\fR \fB=\fR \fIpool\fR\fB\&.id2solvable(\fR\fIid\fR\fB)\fR +\fIsolvable\fR \fB=\fR \fIpool\fR\fB\&.id2solvable(\fR\fIid\fR\fB)\fR +.fi +.if n \{\ +.RE +.\} +.sp +Lookup an existing Repository by id\&. You can also do this by using the \fBsolvables\fR attribute\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBconst char *solvid2str(Id\fR \fIid\fR\fB)\fR +my \fI$str\fR \fB=\fR \fI$pool\fR\fB\->solvid2str(\fR\fI$id\fR\fB)\fR; +\fIstr\fR \fB=\fR \fIpool\fR\fB\&.solvid2str(\fR\fIid\fR\fB)\fR +\fIstr\fR \fB=\fR \fIpool\fR\fB\&.solvid2str(\fR\fIid\fR\fB)\fR +.fi +.if n \{\ +.RE +.\} +.sp +Return a string describing the Solvable with the specified id\&. The string consists of the name, version, and architecture of the Solvable\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBconst char *solvidset2str(Id *\fR\fIsolvids\fR\fB)\fR +my \fI$str\fR \fB=\fR \fI$pool\fR\fB\->solvidset2str(\e\fR\fI@solvids\fR\fB)\fR; +\fIstr\fR \fB=\fR \fIpool\fR\fB\&.solvidset2str(\fR\fIsolvids\fR\fB)\fR +\fIstr\fR \fB=\fR \fIpool\fR\fB\&.solvidset2str(\fR\fIsolvids\fR\fB)\fR +.fi +.if n \{\ +.RE +.\} +.sp +Return a string describing a list of solvables\&. The method tries to reduce the output by using version ranges if possible\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBId str2id(const char *\fR\fIstr\fR\fB, bool\fR \fIcreate\fR \fB= 1)\fR +my \fI$id\fR \fB=\fR \fIpool\fR\fB\->str2id(\fR\fI$string\fR\fB)\fR; +\fIid\fR \fB=\fR \fIpool\fR\fB\&.str2id(\fR\fIstring\fR\fB)\fR +\fIid\fR \fB=\fR \fIpool\fR\fB\&.str2id(\fR\fIstring\fR\fB)\fR +.fi +.if n \{\ +.RE +.\} +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBconst char *id2str(Id\fR \fIid\fR\fB)\fR +\fI$string\fR \fB=\fR \fIpool\fR\fB\->id2str(\fR\fI$id\fR\fB)\fR; +\fIstring\fR \fB=\fR \fIpool\fR\fB\&.id2str(\fR\fIid\fR\fB)\fR +\fIstring\fR \fB=\fR \fIpool\fR\fB\&.id2str(\fR\fIid\fR\fB)\fR +.fi +.if n \{\ +.RE +.\} +.sp +Convert a string into an Id and back\&. If the string is currently not in the pool and \fIcreate\fR is false, zero is returned\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBId rel2id(Id\fR \fIname\fR\fB, Id\fR \fIevr\fR\fB, int\fR \fIflags\fR\fB, bool\fR \fIcreate\fR \fB= 1)\fR +my \fI$id\fR \fB=\fR \fIpool\fR\fB\->rel2id(\fR\fI$nameid\fR\fB,\fR \fI$evrid\fR\fB,\fR \fI$flags\fR\fB)\fR; +\fIid\fR \fB=\fR \fIpool\fR\fB\&.rel2id(\fR\fInameid\fR\fB,\fR \fIevrid\fR\fB,\fR \fIflags\fR\fB)\fR +\fIid\fR \fB=\fR \fIpool\fR\fB\&.rel2id(\fR\fInameid\fR\fB,\fR \fIevrid\fR\fB,\fR \fIflags\fR\fB)\fR +.fi +.if n \{\ +.RE +.\} +.sp +Create a \(lqrelational\(rq dependency\&. Such dependencies consist of a name part, \fIflags\fR describing the relation, and a version part\&. The flags are: +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fB$solv::REL_EQ | $solv::REL_GT | $solv::REL_LT\fR +\fBsolv\&.REL_EQ | solv\&.REL_GT | solv\&.REL_LT\fR +\fBSolv::REL_EQ | Solv::REL_GT | Solv::REL_LT\fR +.fi +.if n \{\ +.RE +.\} +.sp +Thus, if you want a \(lq<=\(rq relation, you would use \fBREL_LT | REL_EQ\fR\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBId id2langid(Id\fR \fIid\fR\fB, const char *\fR\fIlang\fR\fB, bool\fR \fIcreate\fR \fB= 1)\fR +my \fI$id\fR \fB=\fR \fI$pool\fR\fB\->id2langid(\fR\fI$id\fR\fB,\fR \fI$language\fR\fB)\fR; +\fIid\fR \fB=\fR \fIpool\fR\fB\&.id2langid(\fR\fIid\fR\fB,\fR \fIlanguage\fR\fB)\fR +\fIid\fR \fB=\fR \fIpool\fR\fB\&.id2langid(\fR\fIid\fR\fB,\fR \fIlanguage\fR\fB)\fR +.fi +.if n \{\ +.RE +.\} +.sp +Create a language specific Id from some other id\&. This function simply converts the id into a string, appends a dot and the specified language to the string and converts the result back into an Id\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBconst char *dep2str(Id\fR \fIid\fR\fB)\fR +\fI$string\fR \fB=\fR \fIpool\fR\fB\->dep2str(\fR\fI$id\fR\fB)\fR; +\fIstring\fR \fB=\fR \fIpool\fR\fB\&.dep2str(\fR\fIid\fR\fB)\fR +\fIstring\fR \fB=\fR \fIpool\fR\fB\&.dep2str(\fR\fIid\fR\fB)\fR +.fi +.if n \{\ +.RE +.\} +.sp +Convert a dependency id into a string\&. If the id is just a string, this function has the same effect as id2str()\&. For relational dependencies, the result is the correct \(lqname relation evr\(rq string\&. +.SH "THE DEPENDENCY CLASS" +.sp +The dependency class is an object orientated way to work with strings and dependencies\&. Internally, dependencies are represented as Ids, i\&.e\&. simple numbers\&. Dependency objects can be constructed by using the Pool\(cqs Dep() method\&. +.SS "ATTRIBUTES" +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBPool *pool;\fR /* read only */ +\fI$dep\fR\fB\->{pool}\fR +\fIdep\fR\fB\&.pool\fR +\fIdep\fR\fB\&.pool\fR +.fi +.if n \{\ +.RE +.\} +.sp +Back reference to the pool this dependency belongs to\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBId id;\fR /* read only */ +\fI$dep\fR\fB\->{id}\fR +\fIdep\fR\fB\&.id\fR +\fIdep\fR\fB\&.id\fR +.fi +.if n \{\ +.RE +.\} +.sp +The id of this dependency\&. +.SS "METHODS" +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBDep Rel(int\fR \fIflags\fR\fB, DepId\fR \fIevrid\fR\fB, bool\fR \fIcreate\fR \fB= 1)\fR +my \fI$reldep\fR \fB=\fR \fI$dep\fR\fB\->Rel(\fR\fI$flags\fR\fB,\fR \fI$evrdep\fR\fB)\fR; +\fIreldep\fR \fB=\fR \fIdep\fR\fB\&.Rel(\fR\fIflags\fR\fB,\fR \fIevrdep\fR\fB)\fR +\fIreldep\fR \fB=\fR \fIdep\fR\fB\&.Rel(\fR\fIflags\fR\fB,\fR \fIevrdep\fR\fB)\fR +.fi +.if n \{\ +.RE +.\} +.sp +Create a relational dependency from the caller dependency, the flags, and a dependency describing the \(lqversion\(rq part\&. See the pool\(cqs rel2id method for a description of the flags\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBSelection Selection_name(int\fR \fIsetflags\fR \fB= 0)\fR +my \fI$sel\fR \fB=\fR \fI$dep\fR\fB\->Selection_name()\fR; +\fIsel\fR \fB=\fR \fIdep\fR\fB\&.Selection_name()\fR +\fIsel\fR \fB=\fR \fIdep\fR\fB\&.Selection_name()\fR +.fi +.if n \{\ +.RE +.\} +.sp +Create a Selection from a dependency\&. The selection consists of all packages that have a name equal to the dependency\&. If the dependency is of a relational type, the packages version must also fulfill the dependency\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBSelection Selection_provides(int\fR \fIsetflags\fR \fB= 0)\fR +my \fI$sel\fR \fB=\fR \fI$dep\fR\fB\->Selection_provides()\fR; +\fIsel\fR \fB=\fR \fIdep\fR\fB\&.Selection_provides()\fR +\fIsel\fR \fB=\fR \fIdep\fR\fB\&.Selection_provides()\fR +.fi +.if n \{\ +.RE +.\} +.sp +Create a Selection from a dependency\&. The selection consists of all packages that have at least one provides matching the dependency\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBconst char *str()\fR +my \fI$str\fR \fB=\fR \fI$dep\fR\fB\->str()\fR; +\fIstr\fR \fB=\fR \fI$dep\fR\fB\&.str()\fR +\fIstr\fR \fB=\fR \fI$dep\fR\fB\&.str()\fR +.fi +.if n \{\ +.RE +.\} +.sp +Return a string describing the dependency\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fB\fR +my \fI$str\fR \fB=\fR \fI$dep\fR\fB\->str\fR; +\fIstr\fR \fB= str(\fR\fIdep\fR\fB)\fR +\fIstr\fR \fB=\fR \fIdep\fR\fB\&.to_s\fR +.fi +.if n \{\ +.RE +.\} +.sp +Same as calling the str() method\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fB\fR +\fBif (\fR\fI$dep1\fR \fB==\fR \fI$dep2\fR\fB)\fR +\fBif\fR \fIdep1\fR \fB==\fR \fIdep2\fR\fB:\fR +\fBif\fR \fIdep1\fR \fB==\fR \fIdep2\fR +.fi +.if n \{\ +.RE +.\} +.sp +Two dependencies are equal if they are part of the same pool and have the same ids\&. +.SH "THE REPOSITORY CLASS" +.sp +A Repository describes a group of packages, normally coming from the same source\&. Repositories are created by the Pool\(cqs add_repo() method\&. +.SS "ATTRIBUTES" +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBPool *pool;\fR /* read only */ +\fI$repo\fR\fB\->{pool}\fR +\fIrepo\fR\fB\&.pool\fR +\fIrepo\fR\fB\&.pool\fR +.fi +.if n \{\ +.RE +.\} +.sp +Back reference to the pool this dependency belongs to\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBId id;\fR /* read only */ +\fI$repo\fR\fB\->{id}\fR +\fIrepo\fR\fB\&.id\fR +\fIrepo\fR\fB\&.id\fR +.fi +.if n \{\ +.RE +.\} +.sp +The id of the repository\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBconst char *name;\fR /* read/write */ +\fI$repo\fR\fB\->{name}\fR +\fIrepo\fR\fB\&.name\fR +\fIrepo\fR\fB\&.name\fR +.fi +.if n \{\ +.RE +.\} +.sp +The repositories name\&. To libsolv, the name is just a string with no specific meaning\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBint priority;\fR /* read/write */ +\fI$repo\fR\fB\->{priority}\fR +\fIrepo\fR\fB\&.priority\fR +\fIrepo\fR\fB\&.priority\fR +.fi +.if n \{\ +.RE +.\} +.sp +The priority of the repository\&. A higher number means that packages of this repository will be chosen over other repositories, even if they have a greater package version\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBint subpriority;\fR /* read/write */ +\fI$repo\fR\fB\->{subpriority}\fR +\fIrepo\fR\fB\&.subpriority\fR +\fIrepo\fR\fB\&.subpriority\fR +.fi +.if n \{\ +.RE +.\} +.sp +The sub\-priority of the repository\&. This value is compared when the priorities of two repositories are the same\&. It is useful to make the library prefer on\-disk repositories to remote ones\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBint nsolvables;\fR /* read only */ +\fI$repo\fR\fB\->{nsolvables}\fR +\fIrepo\fR\fB\&.nsolvables\fR +\fIrepo\fR\fB\&.nsolvables\fR +.fi +.if n \{\ +.RE +.\} +.sp +The number of solvables in this repository\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBvoid *appdata;\fR /* read/write */ +\fI$repo\fR\fB\->{appdata}\fR +\fIrepo\fR\fB\&.appdata\fR +\fIrepo\fR\fB\&.appdata\fR +.fi +.if n \{\ +.RE +.\} +.sp +Application specific data that may be used in any way by the code using the repository\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBDatapos *meta;\fR /* read only */ +\fI$repo\fR\fB\->{meta}\fR +\fIrepo\fR\fB\&.meta\fR +\fIrepo\fR\fB\&.meta\fR +.fi +.if n \{\ +.RE +.\} +.sp +Return a Datapos object of the repodata\(cqs metadata\&. You can use the lookup methods of the Datapos class to lookup metadata attributes, like the repository timestamp\&. +.SS "CONSTANTS" +.PP +\fBREPO_REUSE_REPODATA\fR +.RS 4 +Reuse the last repository data area (\(lqrepodata\(rq) instead of creating a new area\&. +.RE +.PP +\fBREPO_NO_INTERNALIZE\fR +.RS 4 +Do not internalize the added repository data\&. This is useful if you plan to add more data because internalization is a costly operation\&. +.RE +.PP +\fBREPO_LOCALPOOL\fR +.RS 4 +Use the repodata\(cqs pool for Id storage instead of the global pool\&. Useful if you don\(cqt want to pollute the global pool with many unneeded ids, like when storing the filelist\&. +.RE +.PP +\fBREPO_USE_LOADING\fR +.RS 4 +Use the repodata that is currently being loaded instead of creating a new one\&. This only makes sense if used in a load callback\&. +.RE +.PP +\fBREPO_EXTEND_SOLVABLES\fR +.RS 4 +Do not create new solvables for the new data, but match existing solvables and add the data to them\&. Repository metadata is often split into multiple parts, with one primary file describing all packages and other parts holding information that is normally not needed, like the changelog\&. +.RE +.PP +\fBREPO_USE_ROOTDIR\fR +.RS 4 +Prepend the pool\(cqs rootdir to the path when doing file operations\&. +.RE +.PP +\fBREPO_NO_LOCATION\fR +.RS 4 +Do not add a location element to the solvables\&. Useful if the solvables are not in the final position, so you can add the correct location later in your code\&. +.RE +.PP +\fBSOLV_ADD_NO_STUBS\fR +.RS 4 +Do not create stubs for repository parts that can be downloaded on demand\&. +.RE +.PP +\fBSUSETAGS_RECORD_SHARES\fR +.RS 4 +This is specific to the add_susetags() method\&. Susetags allows one to refer to already read packages to save disk space\&. If this data sharing needs to work over multiple calls to add_susetags, you need to specify this flag so that the share information is made available to subsequent calls\&. +.RE +.SS "METHODS" +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBvoid free(bool\fR \fIreuseids\fR \fB= 0)\fR +\fI$repo\fR\fB\->free()\fR; +\fIrepo\fR\fB\&.free()\fR +\fIrepo\fR\fB\&.free()\fR +.fi +.if n \{\ +.RE +.\} +.sp +Free the repository and all solvables it contains\&. If \fIreuseids\fR is set to true, the solvable ids and the repository id may be reused by the library when added new solvables\&. Thus you should leave it false if you are not sure that somebody holds a reference\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBvoid empty(bool\fR \fIreuseids\fR \fB= 0)\fR +\fI$repo\fR\fB\->empty()\fR; +\fIrepo\fR\fB\&.empty()\fR +\fIrepo\fR\fB\&.empty()\fR +.fi +.if n \{\ +.RE +.\} +.sp +Free all the solvables in a repository\&. The repository will be empty after this call\&. See the free() method for the meaning of \fIreuseids\fR\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBbool isempty()\fR +\fI$repo\fR\fB\->isempty()\fR +\fIrepo\fR\fB\&.empty()\fR +\fIrepo\fR\fB\&.empty?\fR +.fi +.if n \{\ +.RE +.\} +.sp +Return true if there are no solvables in this repository\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBvoid internalize()\fR +\fI$repo\fR\fB\->internalize()\fR; +\fIrepo\fR\fB\&.internalize()\fR +\fIrepo\fR\fB\&.internalize()\fR +.fi +.if n \{\ +.RE +.\} +.sp +Internalize added data\&. Data must be internalized before it is available to the lookup and data iterator functions\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBbool write(FILE *\fR\fIfp\fR\fB)\fR +\fI$repo\fR\fB\->write(\fR\fI$fp\fR\fB)\fR +\fIrepo\fR\fB\&.write(\fR\fIfp\fR\fB)\fR +\fIrepo\fR\fB\&.write(\fR\fIfp\fR\fB)\fR +.fi +.if n \{\ +.RE +.\} +.sp +Write a repo as a \(lqsolv\(rq file\&. These files can be read very fast and thus are a good way to cache repository data\&. Returns false if there was some error writing the file\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBSolvableiterator solvables_iter()\fR +\fBfor my\fR \fI$solvable\fR \fB(\fR\fI@\fR\fB{\fR\fI$repo\fR\fB\->solvables_iter()})\fR +\fBfor\fR \fIsolvable\fR \fBin\fR \fIrepo\fR\fB\&.solvables_iter():\fR +\fBfor\fR \fIsolvable\fR \fBin\fR \fIrepo\fR\fB\&.solvables_iter()\fR +.fi +.if n \{\ +.RE +.\} +.sp +Iterate over all solvables in a repository\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBRepodata add_repodata(int\fR \fIflags\fR \fB= 0)\fR +my \fI$repodata\fR \fB=\fR \fI$repo\fR\fB\->add_repodata()\fR; +\fIrepodata\fR \fB=\fR \fIrepo\fR\fB\&.add_repodata()\fR +\fIrepodata\fR \fB=\fR \fIrepo\fR\fB\&.add_repodata()\fR +.fi +.if n \{\ +.RE +.\} +.sp +Add a new repodata area to the repository\&. This is normally automatically done by the repo_add methods, so you need this method only in very rare circumstances\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBvoid create_stubs()\fR +\fI$repo\fR\fB\->create_stubs()\fR; +\fIrepo\fR\fB\&.create_stubs()\fR +\fIrepo\fR\fB\&.create_stubs()\fR +.fi +.if n \{\ +.RE +.\} +.sp +Calls the create_stubs() repodata method for the last repodata of the repository\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBbool iscontiguous()\fR +\fI$repo\fR\fB\->iscontiguous()\fR +\fIrepo\fR\fB\&.iscontiguous()\fR +\fIrepo\fR\fB\&.iscontiguous?\fR +.fi +.if n \{\ +.RE +.\} +.sp +Return true if the solvables of this repository are all in a single block with no holes, i\&.e\&. they have consecutive ids\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBRepodata first_repodata()\fR +my \fI$repodata\fR \fB=\fR \fI$repo\fR\fB\->first_repodata()\fR; +\fIrepodata\fR \fB=\fR \fIrepo\fR\fB\&.first_repodata()\fR +\fIrepodata\fR \fB=\fR \fIrepo\fR\fB\&.first_repodata()\fR +.fi +.if n \{\ +.RE +.\} +.sp +Checks if all repodatas but the first repodata are extensions, and return the first repodata if this is the case\&. Useful if you want to do a store/retrieve sequence on the repository to reduce the memory using and enable paging, as this does not work if the repository contains multiple non\-extension repodata areas\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBSelection Selection(int\fR \fIsetflags\fR \fB= 0)\fR +my \fI$sel\fR \fB=\fR \fI$repo\fR\fB\->Selection()\fR; +\fIsel\fR \fB=\fR \fIrepo\fR\fB\&.Selection()\fR +\fIsel\fR \fB=\fR \fIrepo\fR\fB\&.Selection()\fR +.fi +.if n \{\ +.RE +.\} +.sp +Create a Selection consisting of all packages in the repository\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBDataiterator Dataiterator(Id\fR \fIkey\fR\fB, const char *\fR\fImatch\fR \fB= 0, int\fR \fIflags\fR \fB= 0)\fR +my \fI$di\fR \fB=\fR \fI$repo\fR\fB\->Dataiterator(\fR\fI$keyname\fR\fB,\fR \fI$match\fR\fB,\fR \fI$flags\fR\fB)\fR; +\fIdi\fR \fB=\fR \fIrepo\fR\fB\&.Dataiterator(\fR\fIkeyname\fR\fB,\fR \fImatch\fR\fB,\fR \fIflags\fR\fB)\fR +\fIdi\fR \fB=\fR \fIrepo\fR\fB\&.Dataiterator(\fR\fIkeyname\fR\fB,\fR \fImatch\fR\fB,\fR \fIflags\fR\fB)\fR +.fi +.if n \{\ +.RE +.\} +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBDataiterator Dataiterator_meta(Id\fR \fIkey\fR\fB, const char *\fR\fImatch\fR \fB= 0, int\fR \fIflags\fR \fB= 0)\fR +my \fI$di\fR \fB=\fR \fI$repo\fR\fB\->Dataiterator_meta(\fR\fI$keyname\fR\fB,\fR \fI$match\fR\fB,\fR \fI$flags\fR\fB)\fR; +\fIdi\fR \fB=\fR \fIrepo\fR\fB\&.Dataiterator_meta(\fR\fIkeyname\fR\fB,\fR \fImatch\fR\fB,\fR \fIflags\fR\fB)\fR +\fIdi\fR \fB=\fR \fIrepo\fR\fB\&.Dataiterator_meta(\fR\fIkeyname\fR\fB,\fR \fImatch\fR\fB,\fR \fIflags\fR\fB)\fR +.fi +.if n \{\ +.RE +.\} +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBfor my\fR \fI$d\fR \fB(\fR\fI@$di\fR\fB)\fR +\fBfor\fR \fId\fR \fBin\fR \fIdi\fR\fB:\fR +\fBfor\fR \fId\fR \fBin\fR \fIdi\fR +.fi +.if n \{\ +.RE +.\} +.sp +Iterate over the matching data elements in this repository\&. See the Dataiterator class for more information\&. The Dataiterator() method iterates over all solvables in a repository, whereas the Dataiterator_meta method only iterates over the repository\(cqs meta data\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fB\fR +my \fI$str\fR \fB=\fR \fI$repo\fR\fB\->str\fR; +\fIstr\fR \fB= str(\fR\fIrepo\fR\fB)\fR +\fIstr\fR \fB=\fR \fIrepo\fR\fB\&.to_s\fR +.fi +.if n \{\ +.RE +.\} +.sp +Return the name of the repository, or "Repo#" if no name is set\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fB\fR +\fBif (\fR\fI$repo1\fR \fB==\fR \fI$repo2\fR\fB)\fR +\fBif\fR \fIrepo1\fR \fB==\fR \fIrepo2\fR\fB:\fR +\fBif\fR \fIrepo1\fR \fB==\fR \fIrepo2\fR +.fi +.if n \{\ +.RE +.\} +.sp +Two repositories are equal if they belong to the same pool and have the same id\&. +.SS "DATA ADD METHODS" +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBSolvable add_solvable()\fR +\fI$repo\fR\fB\->add_solvable()\fR; +\fIrepo\fR\fB\&.add_solvable()\fR +\fIrepo\fR\fB\&.add_solvable()\fR +.fi +.if n \{\ +.RE +.\} +.sp +Add a single empty solvable to the repository\&. Returns a Solvable object, see the Solvable class for more information\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBbool add_solv(const char *\fR\fIname\fR\fB, int\fR \fIflags\fR \fB= 0)\fR +\fI$repo\fR\fB\->add_solv(\fR\fI$name\fR\fB)\fR; +\fIrepo\fR\fB\&.add_solv(\fR\fIname\fR\fB)\fR +\fIrepo\fR\fB\&.add_solv(\fR\fIname\fR\fB)\fR +.fi +.if n \{\ +.RE +.\} +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBbool add_solv(FILE *\fR\fIfp\fR\fB, int\fR \fIflags\fR \fB= 0)\fR +\fI$repo\fR\fB\->add_solv(\fR\fI$fp\fR\fB)\fR; +\fIrepo\fR\fB\&.add_solv(\fR\fIfp\fR\fB)\fR +\fIrepo\fR\fB\&.add_solv(\fR\fIfp\fR\fB)\fR +.fi +.if n \{\ +.RE +.\} +.sp +Read a \(lqsolv\(rq file and add its contents to the repository\&. These files can be written with the write() method and are normally used as fast cache for repository metadata\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBbool add_rpmdb(int\fR \fIflags\fR \fB= 0)\fR +\fI$repo\fR\fB\->add_rpmdb()\fR; +\fIrepo\fR\fB\&.add_rpmdb()\fR +\fIrepo\fR\fB\&.add_rpmdb()\fR +.fi +.if n \{\ +.RE +.\} +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBbool add_rpmdb_reffp(FILE *\fR\fIreffp\fR\fB, int\fR \fIflags\fR \fB= 0)\fR +\fI$repo\fR\fB\->add_rpmdb_reffp(\fR\fI$reffp\fR\fB)\fR; +\fIrepo\fR\fB\&.add_rpmdb_reffp(\fR\fIreffp\fR\fB)\fR +\fIrepo\fR\fB\&.add_rpmdb_reffp(\fR\fIreffp\fR\fB)\fR +.fi +.if n \{\ +.RE +.\} +.sp +Add the contents of the rpm database to the repository\&. If a solv file containing an old version of the database is available, it can be passed as reffp to speed up reading\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBSolvable add_rpm(const char *\fR\fIfilename\fR\fB, int\fR \fIflags\fR \fB= 0)\fR +my \fI$solvable\fR \fB=\fR \fI$repo\fR\fB\->add_rpm(\fR\fI$filename\fR\fB)\fR; +\fIsolvable\fR \fB=\fR \fIrepo\fR\fB\&.add_rpm(\fR\fIfilename\fR\fB)\fR +\fIsolvable\fR \fB=\fR \fIrepo\fR\fB\&.add_rpm(\fR\fIfilename\fR\fB)\fR +.fi +.if n \{\ +.RE +.\} +.sp +Add the metadata of a single rpm package to the repository\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBbool add_rpmdb_pubkeys(int\fR \fIflags\fR \fB= 0)\fR +\fI$repo\fR\fB\->add_rpmdb_pubkeys()\fR; +\fIrepo\fR\fB\&.add_rpmdb_pubkeys()\fR +\fIrepo\fR\fB\&.add_rpmdb_pubkeys()\fR +.fi +.if n \{\ +.RE +.\} +.sp +Add all pubkeys contained in the rpm database to the repository\&. Note that newer rpm versions also allow storing the pubkeys in some directory instead of the rpm database\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBSolvable add_pubkey(const char *\fR\fIkeyfile\fR\fB, int\fR \fIflags\fR \fB= 0)\fR +my \fI$solvable\fR \fB=\fR \fI$repo\fR\fB\->add_pubkey(\fR\fI$keyfile\fR\fB)\fR; +\fIsolvable\fR \fB=\fR \fIrepo\fR\fB\&.add_pubkey(\fR\fIkeyfile\fR\fB)\fR +\fIsolvable\fR \fB=\fR \fIrepo\fR\fB\&.add_pubkey(\fR\fIkeyfile\fR\fB)\fR +.fi +.if n \{\ +.RE +.\} +.sp +Add a pubkey from a file to the repository\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBbool add_rpmmd(FILE *\fR\fIfp\fR\fB, const char *\fR\fIlanguage\fR\fB, int\fR \fIflags\fR \fB= 0)\fR +\fI$repo\fR\fB\->add_rpmmd(\fR\fI$fp\fR\fB,\fR \fIundef\fR\fB)\fR; +\fIrepo\fR\fB\&.add_rpmmd(\fR\fIfp\fR\fB,\fR \fINone\fR\fB)\fR +\fIrepo\fR\fB\&.add_rpmmd(\fR\fIfp\fR\fB,\fR \fInil\fR\fB)\fR +.fi +.if n \{\ +.RE +.\} +.sp +Add metadata stored in the "rpm\-md" format (i\&.e\&. from files in the \(lqrepodata\(rq directory) to a repository\&. Supported files are "primary", "filelists", "other", "suseinfo"\&. Do not forget to specify the \fBREPO_EXTEND_SOLVABLES\fR for extension files like "filelists" and "other"\&. Use the \fIlanguage\fR parameter if you have language extension files, otherwise simply use a \fBundef\fR/\fBNone\fR/\fBnil\fR parameter\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBbool add_repomdxml(FILE *\fR\fIfp\fR\fB, int\fR \fIflags\fR \fB= 0)\fR +\fI$repo\fR\fB\->add_repomdxml(\fR\fI$fp\fR\fB)\fR; +\fIrepo\fR\fB\&.add_repomdxml(\fR\fIfp\fR\fB)\fR +\fIrepo\fR\fB\&.add_repomdxml(\fR\fIfp\fR\fB)\fR +.fi +.if n \{\ +.RE +.\} +.sp +Add the repomd\&.xml meta description from the "rpm\-md" format to the repository\&. This file contains information about the repository like keywords, and also a list of all database files with checksums\&. The data is added to the "meta" section of the repository, i\&.e\&. no package gets created\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBbool add_updateinfoxml(FILE *\fR\fIfp\fR\fB, int\fR \fIflags\fR \fB= 0)\fR +\fI$repo\fR\fB\->add_updateinfoxml(\fR\fI$fp\fR\fB)\fR; +\fIrepo\fR\fB\&.add_updateinfoxml(\fR\fIfp\fR\fB)\fR +\fIrepo\fR\fB\&.add_updateinfoxml(\fR\fIfp\fR\fB)\fR +.fi +.if n \{\ +.RE +.\} +.sp +Add the updateinfo\&.xml file containing available maintenance updates to the repository\&. All updates are created as special packages that have a "patch:" prefix in their name\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBbool add_deltainfoxml(FILE *\fR\fIfp\fR\fB, int\fR \fIflags\fR \fB= 0)\fR +\fI$repo\fR\fB\->add_deltainfoxml(\fR\fI$fp\fR\fB)\fR; +\fIrepo\fR\fB\&.add_deltainfoxml(\fR\fIfp\fR\fB)\fR +\fIrepo\fR\fB\&.add_deltainfoxml(\fR\fIfp\fR\fB)\fR +.fi +.if n \{\ +.RE +.\} +.sp +Add the deltainfo\&.xml file (also called prestodelta\&.xml) containing available delta\-rpms to the repository\&. The data is added to the "meta" section, i\&.e\&. no package gets created\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBbool add_debdb(int\fR \fIflags\fR \fB= 0)\fR +\fI$repo\fR\fB\->add_debdb()\fR; +\fIrepo\fR\fB\&.add_debdb()\fR +\fIrepo\fR\fB\&.add_debdb()\fR +.fi +.if n \{\ +.RE +.\} +.sp +Add the contents of the debian installed package database to the repository\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBbool add_debpackages(FILE *\fR\fIfp\fR\fB, int\fR \fIflags\fR \fB= 0)\fR +\fI$repo\fR\fB\->add_debpackages(\fR\fI$fp\fR\fB)\fR; +\fIrepo\fR\fB\&.add_debpackages(\fR\fI$fp\fR\fB)\fR +\fIrepo\fR\fB\&.add_debpackages(\fR\fI$fp\fR\fB)\fR +.fi +.if n \{\ +.RE +.\} +.sp +Add the contents of the debian repository metadata (the "packages" file) to the repository\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBSolvable add_deb(const char *\fR\fIfilename\fR\fB, int\fR \fIflags\fR \fB= 0)\fR +my \fI$solvable\fR \fB=\fR \fI$repo\fR\fB\->add_deb(\fR\fI$filename\fR\fB)\fR; +\fIsolvable\fR \fB=\fR \fIrepo\fR\fB\&.add_deb(\fR\fIfilename\fR\fB)\fR +\fIsolvable\fR \fB=\fR \fIrepo\fR\fB\&.add_deb(\fR\fIfilename\fR\fB)\fR +.fi +.if n \{\ +.RE +.\} +.sp +Add the metadata of a single deb package to the repository\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBbool add_mdk(FILE *\fR\fIfp\fR\fB, int\fR \fIflags\fR \fB= 0)\fR +\fI$repo\fR\fB\->add_mdk(\fR\fI$fp\fR\fB)\fR; +\fIrepo\fR\fB\&.add_mdk(\fR\fIfp\fR\fB)\fR +\fIrepo\fR\fB\&.add_mdk(\fR\fIfp\fR\fB)\fR +.fi +.if n \{\ +.RE +.\} +.sp +Add the contents of the mageia/mandriva repository metadata (the "synthesis\&.hdlist" file) to the repository\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBbool add_mdk_info(FILE *\fR\fIfp\fR\fB, int\fR \fIflags\fR \fB= 0)\fR +\fI$repo\fR\fB\->add_mdk_info(\fR\fI$fp\fR\fB)\fR; +\fIrepo\fR\fB\&.add_mdk_info(\fR\fIfp\fR\fB)\fR +\fIrepo\fR\fB\&.add_mdk_info(\fR\fIfp\fR\fB)\fR +.fi +.if n \{\ +.RE +.\} +.sp +Extend the packages from the synthesis file with the info\&.xml and files\&.xml data\&. Do not forget to specify \fBREPO_EXTEND_SOLVABLES\fR\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBbool add_arch_repo(FILE *\fR\fIfp\fR\fB, int\fR \fIflags\fR \fB= 0)\fR +\fI$repo\fR\fB\->add_arch_repo(\fR\fI$fp\fR\fB)\fR; +\fIrepo\fR\fB\&.add_arch_repo(\fR\fIfp\fR\fB)\fR +\fIrepo\fR\fB\&.add_arch_repo(\fR\fIfp\fR\fB)\fR +.fi +.if n \{\ +.RE +.\} +.sp +Add the contents of the archlinux repository metadata (the "\&.db\&.tar" file) to the repository\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBbool add_arch_local(const char *\fR\fIdir\fR\fB, int\fR \fIflags\fR \fB= 0)\fR +\fI$repo\fR\fB\->add_arch_local(\fR\fI$dir\fR\fB)\fR; +\fIrepo\fR\fB\&.add_arch_local(\fR\fIdir\fR\fB)\fR +\fIrepo\fR\fB\&.add_arch_local(\fR\fIdir\fR\fB)\fR +.fi +.if n \{\ +.RE +.\} +.sp +Add the contents of the archlinux installed package database to the repository\&. The \fIdir\fR parameter is usually set to "/var/lib/pacman/local"\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBbool add_content(FILE *\fR\fIfp\fR\fB, int\fR \fIflags\fR \fB= 0)\fR +\fI$repo\fR\fB\->add_content(\fR\fI$fp\fR\fB)\fR; +\fIrepo\fR\fB\&.add_content(\fR\fIfp\fR\fB)\fR +\fIrepo\fR\fB\&.add_content(\fR\fIfp\fR\fB)\fR +.fi +.if n \{\ +.RE +.\} +.sp +Add the \(lqcontent\(rq meta description from the susetags format to the repository\&. This file contains information about the repository like keywords, and also a list of all database files with checksums\&. The data is added to the "meta" section of the repository, i\&.e\&. no package gets created\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBbool add_susetags(FILE *\fR\fIfp\fR\fB, Id\fR \fIdefvendor\fR\fB, const char *\fR\fIlanguage\fR\fB, int\fR \fIflags\fR \fB= 0)\fR +\fI$repo\fR\fB\->add_susetags(\fR\fI$fp\fR\fB,\fR \fI$defvendor\fR\fB,\fR \fI$language\fR\fB)\fR; +\fIrepo\fR\fB\&.add_susetags(\fR\fIfp\fR\fB,\fR \fIdefvendor\fR\fB,\fR \fIlanguage\fR\fB)\fR +\fIrepo\fR\fB\&.add_susetags(\fR\fIfp\fR\fB,\fR \fIdefvendor\fR\fB,\fR \fIlanguage\fR\fB)\fR +.fi +.if n \{\ +.RE +.\} +.sp +Add repository metadata in the susetags format to the repository\&. Like with add_rpmmd, you can specify a language if you have language extension files\&. The \fIdefvendor\fR parameter provides a default vendor for packages with missing vendors, it is usually provided in the content file\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBbool add_products(const char *\fR\fIdir\fR\fB, int\fR \fIflags\fR \fB= 0)\fR +\fI$repo\fR\fB\->add_products(\fR\fI$dir\fR\fB)\fR; +\fIrepo\fR\fB\&.add_products(\fR\fIdir\fR\fB)\fR +\fIrepo\fR\fB\&.add_products(\fR\fIdir\fR\fB)\fR +.fi +.if n \{\ +.RE +.\} +.sp +Add the installed SUSE products database to the repository\&. The \fIdir\fR parameter is usually "/etc/products\&.d"\&. +.SH "THE SOLVABLE CLASS" +.sp +A solvable describes all the information of one package\&. Each solvable belongs to one repository, it can be added and filled manually but in most cases solvables will get created by the repo_add methods\&. +.SS "ATTRIBUTES" +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBRepo *repo;\fR /* read only */ +\fI$solvable\fR\fB\->{repo}\fR +\fIsolvable\fR\fB\&.repo\fR +\fIsolvable\fR\fB\&.repo\fR +.fi +.if n \{\ +.RE +.\} +.sp +The repository this solvable belongs to\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBPool *pool;\fR /* read only */ +\fI$solvable\fR\fB\->{pool}\fR +\fIsolvable\fR\fB\&.pool\fR +\fIsolvable\fR\fB\&.pool\fR +.fi +.if n \{\ +.RE +.\} +.sp +The pool this solvable belongs to, same as the pool of the repo\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBId id;\fR /* read only */ +\fI$solvable\fR\fB\->{id}\fR +\fIsolvable\fR\fB\&.id\fR +\fIsolvable\fR\fB\&.id\fR +.fi +.if n \{\ +.RE +.\} +.sp +The specific id of the solvable\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBchar *name;\fR /* read/write */ +\fI$solvable\fR\fB\->{name}\fR +\fIsolvable\fR\fB\&.name\fR +\fIsolvable\fR\fB\&.name\fR +.fi +.if n \{\ +.RE +.\} +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBchar *evr;\fR /* read/write */ +\fI$solvable\fR\fB\->{evr}\fR +\fIsolvable\fR\fB\&.evr\fR +\fIsolvable\fR\fB\&.evr\fR +.fi +.if n \{\ +.RE +.\} +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBchar *arch;\fR /* read/write */ +\fI$solvable\fR\fB\->{arch}\fR +\fIsolvable\fR\fB\&.arch\fR +\fIsolvable\fR\fB\&.arch\fR +.fi +.if n \{\ +.RE +.\} +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBchar *vendor;\fR /* read/write */ +\fI$solvable\fR\fB\->{vendor}\fR +\fIsolvable\fR\fB\&.vendor\fR +\fIsolvable\fR\fB\&.vendor\fR +.fi +.if n \{\ +.RE +.\} +.sp +Easy access to often used attributes of solvables\&. They are internally stored as Ids\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBId nameid;\fR /* read/write */ +\fI$solvable\fR\fB\->{nameid}\fR +\fIsolvable\fR\fB\&.nameid\fR +\fIsolvable\fR\fB\&.nameid\fR +.fi +.if n \{\ +.RE +.\} +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBId evrid;\fR /* read/write */ +\fI$solvable\fR\fB\->{evrid}\fR +\fIsolvable\fR\fB\&.evrid\fR +\fIsolvable\fR\fB\&.evrid\fR +.fi +.if n \{\ +.RE +.\} +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBId archid;\fR /* read/write */ +\fI$solvable\fR\fB\->{archid}\fR +\fIsolvable\fR\fB\&.archid\fR +\fIsolvable\fR\fB\&.archid\fR +.fi +.if n \{\ +.RE +.\} +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBId vendorid;\fR /* read/write */ +\fI$solvable\fR\fB\->{vendorid}\fR +\fIsolvable\fR\fB\&.vendorid\fR +\fIsolvable\fR\fB\&.vendorid\fR +.fi +.if n \{\ +.RE +.\} +.sp +Raw interface to the ids\&. Useful if you want to search for a specific id and want to avoid the string compare overhead\&. +.SS "METHODS" +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBconst char *lookup_str(Id\fR \fIkeyname\fR\fB)\fR +my \fI$string\fR \fB=\fR \fI$solvable\fR\fB\->lookup_str(\fR\fI$keyname\fR\fB)\fR; +\fIstring\fR \fB=\fR \fIsolvable\fR\fB\&.lookup_str(\fR\fIkeyname\fR\fB)\fR +\fIstring\fR \fB=\fR \fIsolvable\fR\fB\&.lookup_str(\fR\fIkeyname\fR\fB)\fR +.fi +.if n \{\ +.RE +.\} +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBId lookup_id(Id\fR \fIkeyname\fR\fB)\fR +my \fI$id\fR \fB=\fR \fI$solvable\fR\fB\->lookup_id(\fR\fI$keyname\fR\fB)\fR; +\fIid\fR \fB=\fR \fIsolvable\fR\fB\&.lookup_id(\fR\fIkeyname\fR\fB)\fR +\fIid\fR \fB=\fR \fIsolvable\fR\fB\&.lookup_id(\fR\fIkeyname\fR\fB)\fR +.fi +.if n \{\ +.RE +.\} +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBunsigned long long lookup_num(Id\fR \fIkeyname\fR\fB, unsigned long long\fR \fInotfound\fR \fB= 0)\fR +my \fI$num\fR \fB=\fR \fI$solvable\fR\fB\->lookup_num(\fR\fI$keyname\fR\fB)\fR; +\fInum\fR \fB=\fR \fIsolvable\fR\fB\&.lookup_num(\fR\fIkeyname\fR\fB)\fR +\fInum\fR \fB=\fR \fIsolvable\fR\fB\&.lookup_num(\fR\fIkeyname\fR\fB)\fR +.fi +.if n \{\ +.RE +.\} +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBbool lookup_void(Id\fR \fIkeyname\fR\fB)\fR +my \fI$bool\fR \fB=\fR \fI$solvable\fR\fB\->lookup_void(\fR\fI$keyname\fR\fB)\fR; +\fIbool\fR \fB=\fR \fIsolvable\fR\fB\&.lookup_void(\fR\fIkeyname\fR\fB)\fR +\fIbool\fR \fB=\fR \fIsolvable\fR\fB\&.lookup_void(\fR\fIkeyname\fR\fB)\fR +.fi +.if n \{\ +.RE +.\} +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBChksum lookup_checksum(Id\fR \fIkeyname\fR\fB)\fR +my \fI$chksum\fR \fB=\fR \fI$solvable\fR\fB\->lookup_checksum(\fR\fI$keyname\fR\fB)\fR; +\fIchksum\fR \fB=\fR \fIsolvable\fR\fB\&.lookup_checksum(\fR\fIkeyname\fR\fB)\fR +\fIchksum\fR \fB=\fR \fIsolvable\fR\fB\&.lookup_checksum(\fR\fIkeyname\fR\fB)\fR +.fi +.if n \{\ +.RE +.\} +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBId *lookup_idarray(Id\fR \fIkeyname\fR\fB, Id\fR \fImarker\fR \fB= \-1)\fR +my \fI@ids\fR \fB=\fR \fI$solvable\fR\fB\->lookup_idarray(\fR\fI$keyname\fR\fB)\fR; +\fIids\fR \fB=\fR \fIsolvable\fR\fB\&.lookup_idarray(\fR\fIkeyname\fR\fB)\fR +\fIids\fR \fB=\fR \fIsolvable\fR\fB\&.lookup_idarray(\fR\fIkeyname\fR\fB)\fR +.fi +.if n \{\ +.RE +.\} +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBDep *lookup_deparray(Id\fR \fIkeyname\fR\fB, Id\fR \fImarker\fR \fB= \-1)\fR +my \fI@deps\fR \fB=\fR \fI$solvable\fR\fB\->lookup_deparray(\fR\fI$keyname\fR\fB)\fR; +\fIdeps\fR \fB=\fR \fIsolvable\fR\fB\&.lookup_deparray(\fR\fIkeyname\fR\fB)\fR +\fIdeps\fR \fB=\fR \fIsolvable\fR\fB\&.lookup_deparray(\fR\fIkeyname\fR\fB)\fR +.fi +.if n \{\ +.RE +.\} +.sp +Generic lookup methods\&. Retrieve data stored for the specific keyname\&. The lookup_idarray() method will return an array of Ids, use lookup_deparray if you want an array of Dependency objects instead\&. Some Id arrays contain two parts of data divided by a specific marker, for example the provides array uses the SOLVABLE_FILEMARKER id to store both the ids provided by the package and the ids added by the addfileprovides method\&. The default, \-1, translates to the correct marker for the keyname and returns the first part of the array, use 1 to select the second part or 0 to retrieve all ids including the marker\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBconst char *lookup_location(unsigned int *\fR\fIOUTPUT\fR\fB)\fR +my \fB(\fR\fI$location\fR\fB,\fR \fI$mediano\fR\fB) =\fR \fI$solvable\fR\fB\->lookup_location()\fR; +\fIlocation\fR\fB,\fR \fImediano\fR \fB=\fR \fIsolvable\fR\fB\&.lookup_location()\fR +\fIlocation\fR\fB,\fR \fImediano\fR \fB=\fR \fIsolvable\fR\fB\&.lookup_location()\fR +.fi +.if n \{\ +.RE +.\} +.sp +Return a tuple containing the on\-media location and an optional media number for multi\-part repositories (e\&.g\&. repositories spawning multiple DVDs)\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBconst char *lookup_sourcepkg()\fR +my \fI$sourcepkg\fR \fB=\fR \fI$solvable\fR\fB\->lookup_sourcepkg()\fR; +\fIsourcepkg\fR \fB=\fR \fIsolvable\fR\fB\&.lookup_sourcepkg()\fR +\fIsourcepkg\fR \fB=\fR \fIsolvable\fR\fB\&.lookup_sourcepkg()\fR +.fi +.if n \{\ +.RE +.\} +.sp +Return a sourcepkg name associated with solvable\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBDataiterator Dataiterator(Id\fR \fIkeyname\fR\fB, const char *\fR\fImatch\fR \fB= 0, int\fR \fIflags\fR \fB= 0)\fR +my \fI$di\fR \fB=\fR \fI$solvable\fR\fB\->Dataiterator(\fR\fI$keyname\fR\fB,\fR \fI$match\fR\fB,\fR \fI$flags\fR\fB)\fR; +\fIdi\fR \fB=\fR \fIsolvable\fR\fB\&.Dataiterator(\fR\fIkeyname\fR\fB,\fR \fImatch\fR\fB,\fR \fIflags\fR\fB)\fR +\fIdi\fR \fB=\fR \fIsolvable\fR\fB\&.Dataiterator(\fR\fIkeyname\fR\fB,\fR \fImatch\fR\fB,\fR \fIflags\fR\fB)\fR +.fi +.if n \{\ +.RE +.\} +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBfor my\fR \fI$d\fR \fB(\fR\fI@$di\fR\fB)\fR +\fBfor\fR \fId\fR \fBin\fR \fIdi\fR\fB:\fR +\fBfor\fR \fId\fR \fBin\fR \fIdi\fR +.fi +.if n \{\ +.RE +.\} +.sp +Iterate over the matching data elements\&. See the Dataiterator class for more information\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBvoid add_deparray(Id\fR \fIkeyname\fR\fB, DepId\fR \fIdep\fR\fB, Id\fR \fImarker\fR \fB= \-1)\fR +\fI$solvable\fR\fB\->add_deparray(\fR\fI$keyname\fR\fB,\fR \fI$dep\fR\fB)\fR; +\fIsolvable\fR\fB\&.add_deparray(\fR\fIkeyname\fR\fB,\fR \fIdep\fR\fB)\fR +\fIsolvable\fR\fB\&.add_deparray(\fR\fIkeyname\fR\fB,\fR \fIdep\fR\fB)\fR +.fi +.if n \{\ +.RE +.\} +.sp +Add a new dependency to the attributes stored in keyname\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBvoid unset(Id\fR \fIkeyname\fR\fB)\fR +\fI$solvable\fR\fB\->unset(\fR\fI$keyname\fR\fB)\fR; +\fIsolvable\fR\fB\&.unset(\fR\fIkeyname\fR\fB)\fR +\fIsolvable\fR\fB\&.unset(\fR\fIkeyname\fR\fB)\fR +.fi +.if n \{\ +.RE +.\} +.sp +Delete data stored for the specific keyname\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBbool installable()\fR +\fI$solvable\fR\fB\->installable()\fR +\fIsolvable\fR\fB\&.installable()\fR +\fIsolvable\fR\fB\&.installable?\fR +.fi +.if n \{\ +.RE +.\} +.sp +Return true if the solvable is installable on the system\&. Solvables are not installable if the system does not support their architecture\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBbool isinstalled()\fR +\fI$solvable\fR\fB\->isinstalled()\fR +\fIsolvable\fR\fB\&.isinstalled()\fR +\fIsolvable\fR\fB\&.isinstalled?\fR +.fi +.if n \{\ +.RE +.\} +.sp +Return true if the solvable is installed on the system\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBbool identical(Solvable *\fR\fIother\fR\fB)\fR +\fI$solvable\fR\fB\->identical(\fR\fI$other\fR\fB)\fR +\fIsolvable\fR\fB\&.identical(\fR\fIother\fR\fB)\fR +\fIsolvable\fR\fB\&.identical?(\fR\fIother\fR\fB)\fR +.fi +.if n \{\ +.RE +.\} +.sp +Return true if the two solvables are identical\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBint evrcmp(Solvable *\fR\fIother\fR\fB)\fR +\fI$solvable\fR\fB\->evrcmp(\fR\fI$other\fR\fB)\fR +\fIsolvable\fR\fB\&.evrcmp(\fR\fIother\fR\fB)\fR +\fIsolvable\fR\fB\&.evrcmp(\fR\fIother\fR\fB)\fR +.fi +.if n \{\ +.RE +.\} +.sp +Returns \-1 if the epoch/version/release of the solvable is less than the one from the other solvable, 1 if it is greater, and 0 if they are equal\&. Note that "equal" does not mean that the evr is identical\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBint matchesdep(Id\fR \fIkeyname\fR\fB, DepId\fR \fIid\fR\fB, Id\fR \fImarker\fR \fB= \-1)\fR +\fI$solvable\fR\fB\->matchesdep(\fR\fI$keyname\fR\fB,\fR \fI$dep\fR\fB)\fR +\fIsolvable\fR\fB\&.matchesdep(\fR\fIkeyname\fR\fB,\fR \fIdep\fR\fB)\fR +\fIsolvable\fR\fB\&.matchesdep?(\fR\fIkeyname\fR\fB,\fR \fIdep\fR\fB)\fR +.fi +.if n \{\ +.RE +.\} +.sp +Return true if the dependencies stored in keyname match the specified dependency\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBSelection Selection(int\fR \fIsetflags\fR \fB= 0)\fR +my \fI$sel\fR \fB=\fR \fI$solvable\fR\fB\->Selection()\fR; +\fIsel\fR \fB=\fR \fIsolvable\fR\fB\&.Selection()\fR +\fIsel\fR \fB=\fR \fIsolvable\fR\fB\&.Selection()\fR +.fi +.if n \{\ +.RE +.\} +.sp +Create a Selection containing just the single solvable\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBconst char *str()\fR +my \fI$str\fR \fB=\fR \fI$solvable\fR\fB\->str()\fR; +\fIstr\fR \fB=\fR \fI$solvable\fR\fB\&.str()\fR +\fIstr\fR \fB=\fR \fI$solvable\fR\fB\&.str()\fR +.fi +.if n \{\ +.RE +.\} +.sp +Return a string describing the solvable\&. The string consists of the name, version, and architecture of the Solvable\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fB\fR +my \fI$str\fR \fB=\fR \fI$solvable\fR\fB\->str\fR; +\fIstr\fR \fB= str(\fR\fIsolvable\fR\fB)\fR +\fIstr\fR \fB=\fR \fIsolvable\fR\fB\&.to_s\fR +.fi +.if n \{\ +.RE +.\} +.sp +Same as calling the str() method\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fB\fR +\fBif (\fR\fI$solvable1\fR \fB==\fR \fI$solvable2\fR\fB)\fR +\fBif\fR \fIsolvable1\fR \fB==\fR \fIsolvable2\fR\fB:\fR +\fBif\fR \fIsolvable1\fR \fB==\fR \fIsolvable2\fR +.fi +.if n \{\ +.RE +.\} +.sp +Two solvables are equal if they are part of the same pool and have the same ids\&. +.SH "THE DATAITERATOR CLASS" +.sp +Dataiterators can be used to do complex string searches or to iterate over arrays\&. They can be created via the constructors in the Pool, Repo, and Solvable classes\&. The Repo and Solvable constructors will limit the search to the repository or the specific package\&. +.SS "CONSTANTS" +.PP +\fBSEARCH_STRING\fR +.RS 4 +Return a match if the search string matches the value\&. +.RE +.PP +\fBSEARCH_STRINGSTART\fR +.RS 4 +Return a match if the value starts with the search string\&. +.RE +.PP +\fBSEARCH_STRINGEND\fR +.RS 4 +Return a match if the value ends with the search string\&. +.RE +.PP +\fBSEARCH_SUBSTRING\fR +.RS 4 +Return a match if the search string can be matched somewhere in the value\&. +.RE +.PP +\fBSEARCH_GLOB\fR +.RS 4 +Do a glob match of the search string against the value\&. +.RE +.PP +\fBSEARCH_REGEX\fR +.RS 4 +Do a regular expression match of the search string against the value\&. +.RE +.PP +\fBSEARCH_NOCASE\fR +.RS 4 +Ignore case when matching strings\&. Works for all the above match types\&. +.RE +.PP +\fBSEARCH_FILES\fR +.RS 4 +Match the complete filenames of the file list, not just the base name\&. +.RE +.PP +\fBSEARCH_COMPLETE_FILELIST\fR +.RS 4 +When matching the file list, check every file of the package not just the subset from the primary metadata\&. +.RE +.PP +\fBSEARCH_CHECKSUMS\fR +.RS 4 +Allow the matching of checksum entries\&. +.RE +.SS "METHODS" +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBvoid prepend_keyname(Id\fR \fIkeyname\fR\fB)\fR; +\fI$di\fR\fB\->prepend_keyname(\fR\fI$keyname\fR\fB)\fR; +\fIdi\fR\fB\&.prepend_keyname(\fR\fIkeyname\fR\fB)\fR +\fIdi\fR\fB\&.prepend_keyname(\fR\fIkeyname\fR\fB)\fR +.fi +.if n \{\ +.RE +.\} +.sp +Do a sub\-search in the array stored in keyname\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBvoid skip_solvable()\fR; +\fI$di\fR\fB\->skip_solvable()\fR; +\fIdi\fR\fB\&.skip_solvable()\fR +\fIdi\fR\fB\&.skip_solvable()\fR +.fi +.if n \{\ +.RE +.\} +.sp +Stop matching the current solvable and advance to the next one\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fB\fR +\fBfor my\fR \fI$d\fR \fB(\fR\fI@$di\fR\fB)\fR +\fBfor\fR \fId\fR \fBin\fR \fIdi\fR\fB:\fR +\fBfor\fR \fId\fR \fBin\fR \fIdi\fR +.fi +.if n \{\ +.RE +.\} +.sp +Iterate through the matches\&. If there is a match, the object in d will be of type Datamatch\&. +.SH "THE DATAMATCH CLASS" +.sp +Objects of this type will be created for every value matched by a dataiterator\&. +.SS "ATTRIBUTES" +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBPool *pool;\fR /* read only */ +\fI$d\fR\fB\->{pool}\fR +\fId\fR\fB\&.pool\fR +\fId\fR\fB\&.pool\fR +.fi +.if n \{\ +.RE +.\} +.sp +Back pointer to pool\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBRepo *repo;\fR /* read only */ +\fI$d\fR\fB\->{repo}\fR +\fId\fR\fB\&.repo\fR +\fId\fR\fB\&.repo\fR +.fi +.if n \{\ +.RE +.\} +.sp +The repository containing the matched object\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBSolvable *solvable;\fR /* read only */ +\fI$d\fR\fB\->{solvable}\fR +\fId\fR\fB\&.solvable\fR +\fId\fR\fB\&.solvable\fR +.fi +.if n \{\ +.RE +.\} +.sp +The solvable containing the value that was matched\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBId solvid;\fR /* read only */ +\fI$d\fR\fB\->{solvid}\fR +\fId\fR\fB\&.solvid\fR +\fId\fR\fB\&.solvid\fR +.fi +.if n \{\ +.RE +.\} +.sp +The id of the solvable that matched\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBId\fR \fIkey_id\fR; +\fI$d\fR\fB\->{\fR\fIkey_id\fR\fB}\fR +\fId\fR\fB\&.key_id\fR +\fId\fR\fB\&.key_id\fR +.fi +.if n \{\ +.RE +.\} +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBconst char *\fR\fIkey_idstr\fR; +\fI$d\fR\fB\->{\fR\fIkey_idstr\fR\fB}\fR +\fId\fR\fB\&.key_idstr\fR +\fId\fR\fB\&.key_idstr\fR +.fi +.if n \{\ +.RE +.\} +.sp +The keyname that matched, either as id or string\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBId\fR \fItype_id\fR; +\fI$d\fR\fB\->{\fR\fItype_id\fR\fB}\fR +\fId\fR\fB\&.type_id\fR +\fId\fR\fB\&.type_id\fR +.fi +.if n \{\ +.RE +.\} +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBconst char *\fR\fItype_idstr\fR; +\fI$d\fR\fB\->{\fR\fItype_idstr\fR\fB}\fR; +\fId\fR\fB\&.type_idstr\fR +\fId\fR\fB\&.type_idstr\fR +.fi +.if n \{\ +.RE +.\} +.sp +The key type of the value that was matched, either as id or string\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBId\fR \fIid\fR; +\fI$d\fR\fB\->{id}\fR +\fId\fR\fB\&.id\fR +\fId\fR\fB\&.id\fR +.fi +.if n \{\ +.RE +.\} +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBId\fR \fIidstr\fR; +\fI$d\fR\fB\->{idstr}\fR +\fId\fR\fB\&.idstr\fR +\fId\fR\fB\&.idstr\fR +.fi +.if n \{\ +.RE +.\} +.sp +The Id of the value that was matched (only valid for id types), either as id or string\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBDep *dep;\fR /* read only */ +\fI$d\fR\fB\->{dep}\fR +\fId\fR\fB\&.dep\fR +\fId\fR\fB\&.dep\fR +.fi +.if n \{\ +.RE +.\} +.sp +The id of the value that was matched converted to a dependency object\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBconst char *\fR\fIstr\fR; +\fI$d\fR\fB\->{str}\fR +\fId\fR\fB\&.str\fR +\fId\fR\fB\&.str\fR +.fi +.if n \{\ +.RE +.\} +.sp +The string value that was matched (only valid for string types)\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBunsigned long long\fR \fInum\fR; +\fI$d\fR\fB\->{num}\fR +\fId\fR\fB\&.num\fR +\fId\fR\fB\&.num\fR +.fi +.if n \{\ +.RE +.\} +.sp +The numeric value that was matched (only valid for numeric types)\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBunsigned int\fR \fInum2\fR; +\fI$d\fR\fB\->{num2}\fR +\fId\fR\fB\&.num2\fR +\fId\fR\fB\&.num2\fR +.fi +.if n \{\ +.RE +.\} +.sp +The secondary numeric value that was matched (only valid for types containing two values)\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBunsigned int\fR \fIbinary\fR; +\fI$d\fR\fB\->{binary}\fR +\fId\fR\fB\&.binary\fR +\fId\fR\fB\&.binary\fR +.fi +.if n \{\ +.RE +.\} +.sp +The value in binary form, useful for checksums and other data that cannot be represented as a string\&. +.SS "METHODS" +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBDatapos pos()\fR +my \fI$pos\fR \fB=\fR \fI$d\fR\fB\->pos()\fR; +\fIpos\fR \fB=\fR \fId\fR\fB\&.pos()\fR +\fIpos\fR \fB=\fR \fId\fR\fB\&.pos()\fR +.fi +.if n \{\ +.RE +.\} +.sp +The position object of the current match\&. It can be used to do sub\-searches starting at the match (if it is of an array type)\&. See the Datapos class for more information\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBDatapos parentpos()\fR +my \fI$pos\fR \fB=\fR \fI$d\fR\fB\->parentpos()\fR; +\fIpos\fR \fB=\fR \fId\fR\fB\&.parentpos()\fR +\fIpos\fR \fB=\fR \fId\fR\fB\&.parentpos()\fR +.fi +.if n \{\ +.RE +.\} +.sp +The position object of the array containing the current match\&. It can be used to do sub\-searches, see the Datapos class for more information\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fB\fR +my \fI$str\fR \fB=\fR \fI$d\fR\fB\->str\fR; +\fIstr\fR \fB= str(\fR\fId\fR\fB)\fR +\fIstr\fR \fB=\fR \fId\fR\fB\&.to_s\fR +.fi +.if n \{\ +.RE +.\} +.sp +Return the stringification of the matched value\&. Stringification depends on the search flags, for file list entries it will return just the base name unless SEARCH_FILES is used, for checksums it will return an empty string unless SEARCH_CHECKSUMS is used\&. Numeric values are currently stringified to an empty string\&. +.SH "THE SELECTION CLASS" +.sp +Selections are a way to easily deal with sets of packages\&. There are multiple constructors to create them, the most useful is probably the select() method in the Pool class\&. +.SS "CONSTANTS" +.PP +\fBSELECTION_NAME\fR +.RS 4 +Create the selection by matching package names\&. +.RE +.PP +\fBSELECTION_PROVIDES\fR +.RS 4 +Create the selection by matching package provides\&. +.RE +.PP +\fBSELECTION_FILELIST\fR +.RS 4 +Create the selection by matching package files\&. +.RE +.PP +\fBSELECTION_CANON\fR +.RS 4 +Create the selection by matching the canonical representation of the package\&. This is normally a combination of the name, the version, and the architecture of a package\&. +.RE +.PP +\fBSELECTION_DOTARCH\fR +.RS 4 +Allow an "\&." suffix when matching names or provides\&. +.RE +.PP +\fBSELECTION_REL\fR +.RS 4 +Allow the specification of a relation when matching names or dependencies, e\&.g\&. "name >= 1\&.2"\&. +.RE +.PP +\fBSELECTION_GLOB\fR +.RS 4 +Allow glob matching for package names, package provides, and file names\&. +.RE +.PP +\fBSELECTION_NOCASE\fR +.RS 4 +Ignore case when matching package names, package provides, and file names\&. +.RE +.PP +\fBSELECTION_FLAT\fR +.RS 4 +Return only one selection element describing the selected packages\&. The default is to create multiple elements for all globbed packages\&. Multiple elements are useful if you want to turn the selection into an install job, in that case you want an install job for every globbed package\&. +.RE +.PP +\fBSELECTION_SKIP_KIND\fR +.RS 4 +Remove a "packagekind:" prefix from the package names\&. +.RE +.PP +\fBSELECTION_MATCH_DEPSTR\fR +.RS 4 +When matching dependencies, do a string match on the result of dep2str instead of using the normal dependency intersect algorithm\&. +.RE +.PP +\fBSELECTION_INSTALLED_ONLY\fR +.RS 4 +Limit the package search to installed packages\&. +.RE +.PP +\fBSELECTION_SOURCE_ONLY\fR +.RS 4 +Limit the package search to source packages only\&. +.RE +.PP +\fBSELECTION_WITH_SOURCE\fR +.RS 4 +Extend the package search to also match source packages\&. The default is only to match binary packages\&. +.RE +.PP +\fBSELECTION_WITH_DISABLED\fR +.RS 4 +Extend the package search to also include disabled packages\&. +.RE +.PP +\fBSELECTION_WITH_BADARCH\fR +.RS 4 +Extend the package search to also include packages that are not installable on the configured architecture\&. +.RE +.PP +\fBSELECTION_WITH_ALL\fR +.RS 4 +Shortcut for selecting the three modifiers above\&. +.RE +.PP +\fBSELECTION_ADD\fR +.RS 4 +Add the result of the match to the current selection instead of replacing it\&. +.RE +.PP +\fBSELECTION_SUBTRACT\fR +.RS 4 +Remove the result of the match to the current selection instead of replacing it\&. +.RE +.PP +\fBSELECTION_FILTER\fR +.RS 4 +Intersect the result of the match to the current selection instead of replacing it\&. +.RE +.SS "ATTRIBUTES" +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBPool *pool;\fR /* read only */ +\fI$d\fR\fB\->{pool}\fR +\fId\fR\fB\&.pool\fR +\fId\fR\fB\&.pool\fR +.fi +.if n \{\ +.RE +.\} +.sp +Back pointer to pool\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBint flags;\fR /* read only */ +\fI$sel\fR\fB\->{flags}\fR +\fIflags\fR \fB=\fR \fIsel\fR\fB\&.flags\fR +\fIflags\fR \fB=\fR \fIsel\fR\fB\&.flags\fR +.fi +.if n \{\ +.RE +.\} +.sp +The result flags of the selection\&. The flags are a subset of the ones used when creating the selection, they describe which method was used to get the result\&. For example, if you create the selection with \(lqSELECTION_NAME | SELECTION_PROVIDES\(rq, the resulting flags will either be SELECTION_NAME or SELECTION_PROVIDES depending if there was a package that matched the name or not\&. If there was no match at all, the flags will be zero\&. +.SS "METHODS" +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBbool isempty()\fR +\fI$sel\fR\fB\->isempty()\fR +\fIsel\fR\fB\&.isempty()\fR +\fIsel\fR\fB\&.isempty?\fR +.fi +.if n \{\ +.RE +.\} +.sp +Return true if the selection is empty, i\&.e\&. no package could be matched\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBSelection clone(int\fR \fIflags\fR \fB= 0)\fR +my \fI$cloned\fR \fB=\fR \fI$sel\fR\fB\->clone()\fR; +\fIcloned\fR \fB=\fR \fIsel\fR\fB\&.clone()\fR +\fIcloned\fR \fB=\fR \fIsel\fR\fB\&.clone()\fR +.fi +.if n \{\ +.RE +.\} +.sp +Return a copy of a selection\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBvoid filter(Selection *\fR\fIother\fR\fB)\fR +\fI$sel\fR\fB\->filter(\fR\fI$other\fR\fB)\fR; +\fIsel\fR\fB\&.filter(\fR\fIother\fR\fB)\fR +\fIsel\fR\fB\&.filter(\fR\fIother\fR\fB)\fR +.fi +.if n \{\ +.RE +.\} +.sp +Intersect two selections\&. Packages will only stay in the selection if there are also included in the other selecting\&. Does an in\-place modification\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBvoid add(Selection *\fR\fIother\fR\fB)\fR +\fI$sel\fR\fB\->add(\fR\fI$other\fR\fB)\fR; +\fIsel\fR\fB\&.add(\fR\fIother\fR\fB)\fR +\fIsel\fR\fB\&.add(\fR\fIother\fR\fB)\fR +.fi +.if n \{\ +.RE +.\} +.sp +Build the union of two selections\&. All packages of the other selection will be added to the set of packages of the selection object\&. Does an in\-place modification\&. Note that the selection flags are no longer meaningful after the add operation\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBvoid subtract(Selection *\fR\fIother\fR\fB)\fR +\fI$sel\fR\fB\->subtract(\fR\fI$other\fR\fB)\fR; +\fIsel\fR\fB\&.subtract(\fR\fIother\fR\fB)\fR +\fIsel\fR\fB\&.subtract(\fR\fIother\fR\fB)\fR +.fi +.if n \{\ +.RE +.\} +.sp +Remove the packages of the other selection from the packages of the selection object\&. Does an in\-place modification\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBvoid add_raw(Id\fR \fIhow\fR\fB, Id\fR \fIwhat\fR\fB)\fR +\fI$sel\fR\fB\->add_raw(\fR\fI$how\fR\fB,\fR \fI$what\fR\fB)\fR; +\fIsel\fR\fB\&.add_raw(\fR\fIhow\fR\fB,\fR \fIwhat\fR\fB)\fR +\fIsel\fR\fB\&.add_raw(\fR\fIhow\fR\fB,\fR \fIwhat\fR\fB)\fR +.fi +.if n \{\ +.RE +.\} +.sp +Add a raw element to the selection\&. Check the Job class for information about the how and what parameters\&. Note that the selection flags are no longer meaningful after the add_raw operation\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBJob *jobs(int\fR \fIaction\fR\fB)\fR +my \fI@jobs\fR \fB=\fR \fI$sel\fR\fB\->jobs(\fR\fI$action\fR\fB)\fR; +\fIjobs\fR \fB=\fR \fIsel\fR\fB\&.jobs(\fR\fIaction\fR\fB)\fR +\fIjobs\fR \fB=\fR \fIsel\fR\fB\&.jobs(\fR\fIaction\fR\fB)\fR +.fi +.if n \{\ +.RE +.\} +.sp +Convert a selection into an array of Job objects\&. The action parameter is or\-ed to the \(lqhow\(rq part of the job, it describes the type of job (e\&.g\&. install, erase)\&. See the Job class for the action and action modifier constants\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBSolvable *solvables()\fR +my \fI@solvables\fR \fB=\fR \fI$sel\fR\fB\->solvables()\fR; +\fIsolvables\fR \fB=\fR \fIsel\fR\fB\&.solvables()\fR +\fIsolvables\fR \fB=\fR \fIsel\fR\fB\&.solvables()\fR +.fi +.if n \{\ +.RE +.\} +.sp +Convert a selection into an array of Solvable objects\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBvoid select(const char *\fR\fIname\fR\fB, int\fR \fIflags\fR\fB)\fR +\fI$sel\fR\fB\->select(\fR\fI$name\fR\fB,\fR \fI$flags\fR\fB)\fR; +\fIsel\fR\fB\&.select(\fR\fIname\fR\fB,\fR \fIflags\fR\fB)\fR +\fIsel\fR\fB\&.select(\fR\fIname\fR\fB,\fR \fIflags\fR\fB)\fR +.fi +.if n \{\ +.RE +.\} +.sp +Do a select operation and combine the result with the current selection\&. You can choose the desired combination method by using either the SELECTION_ADD, SELECTION_SUBTRACT, or SELECTION_FILTER flag\&. If none of the flags are used, SELECTION_FILTER|SELECTION_WITH_ALL is assumed\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBvoid matchdeps(const char *\fR\fIname\fR\fB, int\fR \fIflags\fR\fB, Id\fR \fIkeyname\fR\fB, Id\fR \fImarker\fR \fB= \-1)\fR +\fI$sel\fR\fB\->matchdeps(\fR\fI$name\fR\fB,\fR \fI$flags\fR\fB,\fR \fI$keyname\fR\fB)\fR; +\fIsel\fR\fB\&.matchdeps(\fR\fIname\fR\fB,\fR \fIflags\fR\fB,\fR \fIkeyname\fR\fB)\fR +\fIsel\fR\fB\&.matchdeps(\fR\fIname\fR\fB,\fR \fIflags\fR\fB,\fR \fIkeyname\fR\fB)\fR +.fi +.if n \{\ +.RE +.\} +.sp +Do a matchdeps operation and combine the result with the current selection\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBvoid matchdepid(DepId\fR \fIdep\fR\fB, int\fR \fIflags\fR\fB, Id\fR \fIkeyname\fR\fB, Id\fR \fImarker\fR \fB= \-1)\fR +\fI$sel\fR\fB\->matchdepid(\fR\fI$dep\fR\fB,\fR \fI$flags\fR\fB,\fR \fI$keyname\fR\fB)\fR; +\fIsel\fR\fB\&.matchdepid(\fR\fIdep\fR\fB,\fR \fIflags\fR\fB,\fR \fIkeyname\fR\fB)\fR +\fIsel\fR\fB\&.matchdepid(\fR\fIdep\fR\fB,\fR \fIflags\fR\fB,\fR \fIkeyname\fR\fB)\fR +.fi +.if n \{\ +.RE +.\} +.sp +Do a matchdepid operation and combine the result with the current selection\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBvoid matchsolvable(Solvable\fR \fIsolvable\fR\fB, int\fR \fIflags\fR\fB, Id\fR \fIkeyname\fR\fB, Id\fR \fImarker\fR \fB= \-1)\fR +\fI$sel\fR\fB\->matchsolvable(\fR\fI$solvable\fR\fB,\fR \fI$flags\fR\fB,\fR \fI$keyname\fR\fB)\fR; +\fIsel\fR\fB\&.matchsolvable(\fR\fIsolvable\fR\fB,\fR \fIflags\fR\fB,\fR \fIkeyname\fR\fB)\fR +\fIsel\fR\fB\&.matchsolvable(\fR\fIsolvable\fR\fB,\fR \fIflags\fR\fB,\fR \fIkeyname\fR\fB)\fR +.fi +.if n \{\ +.RE +.\} +.sp +Do a matchsolvable operation and combine the result with the current selection\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fB\fR +my \fI$str\fR \fB=\fR \fI$sel\fR\fB\->str\fR; +\fIstr\fR \fB= str(\fR\fIsel\fR\fB)\fR +\fIstr\fR \fB=\fR \fIsel\fR\fB\&.to_s\fR +.fi +.if n \{\ +.RE +.\} +.sp +Return a string describing the selection\&. +.SH "THE JOB CLASS" +.sp +Jobs are the way to specify to the dependency solver what to do\&. Most of the times jobs will get created by calling the jobs() method on a Selection object, but there is also a Job() constructor in the Pool class\&. +.SS "CONSTANTS" +.sp +Selection constants: +.PP +\fBSOLVER_SOLVABLE\fR +.RS 4 +The \(lqwhat\(rq part is the id of a solvable\&. +.RE +.PP +\fBSOLVER_SOLVABLE_NAME\fR +.RS 4 +The \(lqwhat\(rq part is the id of a package name\&. +.RE +.PP +\fBSOLVER_SOLVABLE_PROVIDES\fR +.RS 4 +The \(lqwhat\(rq part is the id of a package provides\&. +.RE +.PP +\fBSOLVER_SOLVABLE_ONE_OF\fR +.RS 4 +The \(lqwhat\(rq part is an offset into the \(lqwhatprovides\(rq data, created by calling the towhatprovides() pool method\&. +.RE +.PP +\fBSOLVER_SOLVABLE_REPO\fR +.RS 4 +The \(lqwhat\(rq part is the id of a repository\&. +.RE +.PP +\fBSOLVER_SOLVABLE_ALL\fR +.RS 4 +The \(lqwhat\(rq part is ignored, all packages are selected\&. +.RE +.PP +\fBSOLVER_SOLVABLE_SELECTMASK\fR +.RS 4 +A mask containing all the above selection bits\&. +.RE +.sp +Action constants: +.PP +\fBSOLVER_NOOP\fR +.RS 4 +Do nothing\&. +.RE +.PP +\fBSOLVER_INSTALL\fR +.RS 4 +Install a package of the specified set of packages\&. It tries to install the best matching package (i\&.e\&. the highest version of the packages from the repositories with the highest priority)\&. +.RE +.PP +\fBSOLVER_ERASE\fR +.RS 4 +Erase all of the packages from the specified set\&. If a package is not installed, erasing it will keep it from getting installed\&. +.RE +.PP +\fBSOLVER_UPDATE\fR +.RS 4 +Update the matching installed packages to their best version\&. If none of the specified packages are installed, try to update the installed packages to the specified versions\&. See the section about targeted updates about more information\&. +.RE +.PP +\fBSOLVER_WEAKENDEPS\fR +.RS 4 +Allow one to break the dependencies of the matching packages\&. Handle with care\&. +.RE +.PP +\fBSOLVER_MULTIVERSION\fR +.RS 4 +Mark the matched packages for multiversion install\&. If they get to be installed because of some other job, the installation will keep the old version of the package installed (for rpm this is done by using \(lq\-i\(rq instead of \(lq\-U\(rq)\&. +.RE +.PP +\fBSOLVER_LOCK\fR +.RS 4 +Do not change the state of the matched packages, i\&.e\&. when they are installed they stay installed, if not they are not selected for installation\&. +.RE +.PP +\fBSOLVER_DISTUPGRADE\fR +.RS 4 +Update the matching installed packages to the best version included in one of the repositories\&. After this operation, all come from one of the available repositories except orphaned packages\&. Orphaned packages are packages that have no relation to the packages in the repositories, i\&.e\&. no package in the repositories have the same name or obsolete the orphaned package\&. This action brings the installed packages in sync with the ones in the repository\&. By default it also turns of arch/vendor/version locking for the affected packages to simulate a fresh installation\&. This means that distupgrade can actually downgrade packages if only lower versions of a package are available in the repositories\&. You can tweak this behavior with the SOLVER_FLAG_DUP_ solver flags\&. +.RE +.PP +\fBSOLVER_DROP_ORPHANED\fR +.RS 4 +Erase all the matching installed packages if they are orphaned\&. This only makes sense if there is a \(lqdistupgrade all packages\(rq job\&. The default is to erase orphaned packages only if they block the installation of other packages\&. +.RE +.PP +\fBSOLVER_VERIFY\fR +.RS 4 +Fix dependency problems of matching installed packages\&. The default is to ignore dependency problems for installed packages\&. +.RE +.PP +\fBSOLVER_USERINSTALLED\fR +.RS 4 +The matching installed packages are considered to be installed by a user, thus not installed to fulfill some dependency\&. This is needed input for the calculation of unneeded packages for jobs that have the SOLVER_CLEANDEPS flag set\&. +.RE +.PP +\fBSOLVER_ALLOWUNINSTALL\fR +.RS 4 +Allow the solver to deinstall the matching installed packages if they get into the way of resolving a dependency\&. This is like the SOLVER_FLAG_ALLOW_UNINSTALL flag, but limited to a specific set of packages\&. +.RE +.PP +\fBSOLVER_FAVOR\fR +.RS 4 +Prefer the specified packages if the solver encounters an alternative\&. If a job contains multiple matching favor/disfavor elements, the last one takes precedence\&. +.RE +.PP +\fBSOLVER_DISFAVOR\fR +.RS 4 +Avoid the specified packages if the solver encounters an alternative\&. This can also be used to block recommended or supplemented packages from being installed\&. +.RE +.PP +\fBSOLVER_EXCLUDEFROMWEAK\fR +.RS 4 +Avoid the specified packages to satisfy recommended or supplemented dependencies\&. Unlike SOLVER_DISFAVOR, it does not interfere with other rules\&. +.RE +.PP +\fBSOLVER_JOBMASK\fR +.RS 4 +A mask containing all the above action bits\&. +.RE +.sp +Action modifier constants: +.PP +\fBSOLVER_WEAK\fR +.RS 4 +Makes the job a weak job\&. The solver tries to fulfill weak jobs, but does not report a problem if it is not possible to do so\&. +.RE +.PP +\fBSOLVER_ESSENTIAL\fR +.RS 4 +Makes the job an essential job\&. If there is a problem with the job, the solver will not propose to remove the job as one solution (unless all other solutions are also to remove essential jobs)\&. +.RE +.PP +\fBSOLVER_CLEANDEPS\fR +.RS 4 +The solver will try to also erase all packages dragged in through dependencies when erasing the package\&. This needs SOLVER_USERINSTALLED jobs to maximize user satisfaction\&. +.RE +.PP +\fBSOLVER_FORCEBEST\fR +.RS 4 +Insist on the best package for install, update, and distupgrade jobs\&. If this flag is not used, the solver will use the second\-best package if the best package cannot be installed for some reason\&. When this flag is used, the solver will generate a problem instead\&. +.RE +.PP +\fBSOLVER_TARGETED\fR +.RS 4 +Forces targeted operation update and distupgrade jobs\&. See the section about targeted updates about more information\&. +.RE +.sp +Set constants\&. +.PP +\fBSOLVER_SETEV\fR +.RS 4 +The job specified the exact epoch and version of the package set\&. +.RE +.PP +\fBSOLVER_SETEVR\fR +.RS 4 +The job specified the exact epoch, version, and release of the package set\&. +.RE +.PP +\fBSOLVER_SETARCH\fR +.RS 4 +The job specified the exact architecture of the packages from the set\&. +.RE +.PP +\fBSOLVER_SETVENDOR\fR +.RS 4 +The job specified the exact vendor of the packages from the set\&. +.RE +.PP +\fBSOLVER_SETREPO\fR +.RS 4 +The job specified the exact repository of the packages from the set\&. +.RE +.PP +\fBSOLVER_SETNAME\fR +.RS 4 +The job specified the exact name of the packages from the set\&. +.RE +.PP +\fBSOLVER_NOAUTOSET\fR +.RS 4 +Turn of automatic set flag generation for SOLVER_SOLVABLE jobs\&. +.RE +.PP +\fBSOLVER_SETMASK\fR +.RS 4 +A mask containing all the above set bits\&. +.RE +.sp +See the section about set bits for more information\&. +.SS "ATTRIBUTES" +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBPool *pool;\fR /* read only */ +\fI$job\fR\fB\->{pool}\fR +\fId\fR\fB\&.pool\fR +\fId\fR\fB\&.pool\fR +.fi +.if n \{\ +.RE +.\} +.sp +Back pointer to pool\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBId how;\fR /* read/write */ +\fI$job\fR\fB\->{how}\fR +\fId\fR\fB\&.how\fR +\fId\fR\fB\&.how\fR +.fi +.if n \{\ +.RE +.\} +.sp +Union of the selection, action, action modifier, and set flags\&. The selection part describes the semantics of the \(lqwhat\(rq Id\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBId what;\fR /* read/write */ +\fI$job\fR\fB\->{what}\fR +\fId\fR\fB\&.what\fR +\fId\fR\fB\&.what\fR +.fi +.if n \{\ +.RE +.\} +.sp +Id describing the set of packages, the meaning depends on the selection part of the \(lqhow\(rq attribute\&. +.SS "METHODS" +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBSolvable *solvables()\fR +my \fI@solvables\fR \fB=\fR \fI$job\fR\fB\->solvables()\fR; +\fIsolvables\fR \fB=\fR \fIjob\fR\fB\&.solvables()\fR +\fIsolvables\fR \fB=\fR \fIjob\fR\fB\&.solvables()\fR +.fi +.if n \{\ +.RE +.\} +.sp +Return the set of solvables of the job as an array of Solvable objects\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBbool isemptyupdate()\fR +\fI$job\fR\fB\->isemptyupdate()\fR +\fIjob\fR\fB\&.isemptyupdate()\fR +\fIjob\fR\fB\&.isemptyupdate?\fR +.fi +.if n \{\ +.RE +.\} +.sp +Convenience function to find out if the job describes an update job with no matching packages, i\&.e\&. a job that does nothing\&. Some package managers like \(lqzypper\(rq like to turn those jobs into install jobs, i\&.e\&. an update of a not\-installed package will result into the installation of the package\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fB\fR +my \fI$str\fR \fB=\fR \fI$job\fR\fB\->str\fR; +\fIstr\fR \fB= str(\fR\fIjob\fR\fB)\fR +\fIstr\fR \fB=\fR \fIjob\fR\fB\&.to_s\fR +.fi +.if n \{\ +.RE +.\} +.sp +Return a string describing the job\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fB\fR +\fBif (\fR\fI$job1\fR \fB==\fR \fI$job2\fR\fB)\fR +\fBif\fR \fIjob1\fR \fB==\fR \fIjob2\fR\fB:\fR +\fBif\fR \fIjob1\fR \fB==\fR \fIjob2\fR +.fi +.if n \{\ +.RE +.\} +.sp +Two jobs are equal if they belong to the same pool and both the \(lqhow\(rq and the \(lqwhat\(rq attributes are the same\&. +.SS "TARGETED UPDATES" +.sp +Libsolv has two modes for upgrades and distupgrade: targeted and untargeted\&. Untargeted mode means that the installed packages from the specified set will be updated to the best version\&. Targeted means that packages that can be updated to a package in the specified set will be updated to the best package of the set\&. +.sp +Here\(cqs an example to explain the subtle difference\&. Suppose that you have package A installed in version "1\&.1", "A\-1\&.2" is available in one of the repositories and there is also package "B" that obsoletes package A\&. +.sp +An untargeted update of "A" will update the installed "A\-1\&.1" to package "B", because that is the newest version (B obsoletes A and is thus newer)\&. +.sp +A targeted update of "A" will update "A\-1\&.1" to "A\-1\&.2", as the set of packages contains both "A\-1\&.1" and "A\-1\&.2", and "A\-1\&.2" is the newer one\&. +.sp +An untargeted update of "B" will do nothing, as "B" is not installed\&. +.sp +An targeted update of "B" will update "A\-1\&.1" to "B"\&. +.sp +Note that the default is to do "auto\-targeting", thus if the specified set of packages does not include an installed package, the solver will assume targeted operation even if SOLVER_TARGETED is not used\&. +.sp +This mostly matches the intent of the user, with one exception: In the example above, an update of "A\-1\&.2" will update "A\-1\&.1" to "A\-1\&.2" (targeted mode), but a second update of "A\-1\&.2" will suddenly update to "B", as untargeted mode is chosen because "A\-1\&.2" is now installed\&. +.sp +If you want to have full control over when targeting mode is chosen, turn off auto\-targeting with the SOLVER_FLAG_NO_AUTOTARGET solver option\&. In that case, all updates are considered to be untargeted unless they include the SOLVER_TARGETED flag\&. +.SS "SET BITS" +.sp +Set bits specify which parts of the specified packages where specified by the user\&. It is used by the solver when checking if an operation is allowed or not\&. For example, the solver will normally not allow the downgrade of an installed package\&. But it will not report a problem if the SOLVER_SETEVR flag is used, as it then assumes that the user specified the exact version and thus knows what he is doing\&. +.sp +So if a package "screen\-1\-1" is installed for the x86_64 architecture and version "2\-1" is only available for the i586 architecture, installing package "screen\-2\&.1" will ask the user for confirmation because of the different architecture\&. When using the Selection class to create jobs the set bits are automatically added, e\&.g\&. selecting \(lqscreen\&.i586\(rq will automatically add SOLVER_SETARCH, and thus no problem will be reported\&. +.SH "THE SOLVER CLASS" +.sp +Dependency solving is what this library is about\&. A solver object is needed for solving to store the result of the solver run\&. The solver object can be used multiple times for different jobs, reusing it allows the solver to re\-use the dependency rules it already computed\&. +.SS "CONSTANTS" +.sp +Flags to modify some of the solver\(cqs behavior: +.PP +\fBSOLVER_FLAG_ALLOW_DOWNGRADE\fR +.RS 4 +Allow the solver to downgrade packages without asking for confirmation (i\&.e\&. reporting a problem)\&. +.RE +.PP +\fBSOLVER_FLAG_ALLOW_ARCHCHANGE\fR +.RS 4 +Allow the solver to change the architecture of an installed package without asking for confirmation\&. Note that changes to/from noarch are always considered to be allowed\&. +.RE +.PP +\fBSOLVER_FLAG_ALLOW_VENDORCHANGE\fR +.RS 4 +Allow the solver to change the vendor of an installed package without asking for confirmation\&. Each vendor is part of one or more vendor equivalence classes, normally installed packages may only change their vendor if the new vendor shares at least one equivalence class\&. +.RE +.PP +\fBSOLVER_FLAG_ALLOW_NAMECHANGE\fR +.RS 4 +Allow the solver to change the name of an installed package, i\&.e\&. install a package with a different name that obsoletes the installed package\&. This option is on by default\&. +.RE +.PP +\fBSOLVER_FLAG_ALLOW_UNINSTALL\fR +.RS 4 +Allow the solver to erase installed packages to fulfill the jobs\&. This flag also includes the above flags\&. You may want to set this flag if you only have SOLVER_ERASE jobs, as in that case it\(cqs better for the user to check the transaction overview instead of approving every single package that needs to be erased\&. +.RE +.PP +\fBSOLVER_FLAG_DUP_ALLOW_DOWNGRADE\fR +.RS 4 +Like SOLVER_FLAG_ALLOW_DOWNGRADE, but used in distupgrade mode\&. +.RE +.PP +\fBSOLVER_FLAG_DUP_ALLOW_ARCHCHANGE\fR +.RS 4 +Like SOLVER_FLAG_ALLOW_ARCHCHANGE, but used in distupgrade mode\&. +.RE +.PP +\fBSOLVER_FLAG_DUP_ALLOW_VENDORCHANGE\fR +.RS 4 +Like SOLVER_FLAG_ALLOW_VENDORCHANGE, but used in distupgrade mode\&. +.RE +.PP +\fBSOLVER_FLAG_DUP_ALLOW_NAMECHANGE\fR +.RS 4 +Like SOLVER_FLAG_ALLOW_NAMECHANGE, but used in distupgrade mode\&. +.RE +.PP +\fBSOLVER_FLAG_NO_UPDATEPROVIDE\fR +.RS 4 +If multiple packages obsolete an installed package, the solver checks the provides of every such package and ignores all packages that do not provide the installed package name\&. Thus, you can have an official update candidate that provides the old name, and other packages that also obsolete the package but are not considered for updating\&. If you cannot use this feature, you can turn it off by setting this flag\&. +.RE +.PP +\fBSOLVER_FLAG_NEED_UPDATEPROVIDE\fR +.RS 4 +This is somewhat the opposite of SOLVER_FLAG_NO_UPDATEPROVIDE: Only packages that provide the installed package names are considered for updating\&. +.RE +.PP +\fBSOLVER_FLAG_SPLITPROVIDES\fR +.RS 4 +Make the solver aware of special provides of the form \(lq:\(rq used in SUSE systems to support package splits\&. +.RE +.PP +\fBSOLVER_FLAG_IGNORE_RECOMMENDED\fR +.RS 4 +Do not process optional (aka weak) dependencies\&. +.RE +.PP +\fBSOLVER_FLAG_ADD_ALREADY_RECOMMENDED\fR +.RS 4 +Install recommended or supplemented packages even if they have no connection to the current transaction\&. You can use this feature to implement a simple way for the user to install new recommended packages that were not available in the past\&. +.RE +.PP +\fBSOLVER_FLAG_NO_INFARCHCHECK\fR +.RS 4 +Turn off the inferior architecture checking that is normally done by the solver\&. Normally, the solver allows only the installation of packages from the "best" architecture if a package is available for multiple architectures\&. +.RE +.PP +\fBSOLVER_FLAG_BEST_OBEY_POLICY\fR +.RS 4 +Make the SOLVER_FORCEBEST job option consider only packages that meet the policies for installed packages, i\&.e\&. no downgrades, no architecture change, no vendor change (see the first flags of this section)\&. If the flag is not specified, the solver will enforce the installation of the best package ignoring the installed packages, which may conflict with the set policy\&. +.RE +.PP +\fBSOLVER_FLAG_NO_AUTOTARGET\fR +.RS 4 +Do not enable auto\-targeting up update and distupgrade jobs\&. See the section on targeted updates for more information\&. +.RE +.PP +\fBSOLVER_FLAG_KEEP_ORPHANS\fR +.RS 4 +Do not allow orphaned packages to be deinstalled if they get in the way of resolving other packages\&. +.RE +.PP +\fBSOLVER_FLAG_BREAK_ORPHANS\fR +.RS 4 +Ignore dependencies of orphaned packages that get in the way of resolving non\-orphaned ones\&. Setting the flag might result in no longer working packages in case they are orphaned\&. +.RE +.PP +\fBSOLVER_FLAG_FOCUS_INSTALLED\fR +.RS 4 +Resolve installed packages before resolving the given jobs\&. Setting this flag means that the solver will prefer picking a package version that fits the other installed packages over updating installed packages\&. +.RE +.PP +\fBSOLVER_FLAG_FOCUS_BEST\fR +.RS 4 +First resolve the given jobs, then the dependencies of the resulting packages, then resolve all already installed packages\&. This will result in more packages being updated as when the flag is not used\&. +.RE +.PP +\fBSOLVER_FLAG_FOCUS_NEW\fR +.RS 4 +First resolve the given jobs, then the dependencies of the resulting packages ignoreing the ones provided by currently installed packages\&. After that resolve all already installed packages\&. This is similar to SOLVER_FLAG_FOCUS_BEST but less aggressive in updating packages\&. +.RE +.PP +\fBSOLVER_FLAG_INSTALL_ALSO_UPDATES\fR +.RS 4 +Update the package if a job is already fulfilled by an installed package\&. +.RE +.PP +\fBSOLVER_FLAG_YUM_OBSOLETES\fR +.RS 4 +Turn on yum\-like package split handling\&. See the yum documentation for more details\&. +.RE +.PP +\fBSOLVER_FLAG_URPM_REORDER\fR +.RS 4 +Turn on urpm like package reordering for kernel packages\&. See the urpm documentation for more details\&. +.RE +.sp +Basic rule types: +.PP +\fBSOLVER_RULE_UNKNOWN\fR +.RS 4 +A rule of an unknown class\&. You should never encounter those\&. +.RE +.PP +\fBSOLVER_RULE_PKG\fR +.RS 4 +A rule generated because of a package dependency\&. +.RE +.PP +\fBSOLVER_RULE_UPDATE\fR +.RS 4 +A rule to implement the update policy of installed packages\&. Every installed package has an update rule that consists of the packages that may replace the installed package\&. +.RE +.PP +\fBSOLVER_RULE_FEATURE\fR +.RS 4 +Feature rules are fallback rules used when an update rule is disabled\&. They include all packages that may replace the installed package ignoring the update policy, i\&.e\&. they contain downgrades, arch changes and so on\&. Without them, the solver would simply erase installed packages if their update rule gets disabled\&. +.RE +.PP +\fBSOLVER_RULE_JOB\fR +.RS 4 +Job rules implement the job given to the solver\&. +.RE +.PP +\fBSOLVER_RULE_DISTUPGRADE\fR +.RS 4 +These are simple negative assertions that make sure that only packages are kept that are also available in one of the repositories\&. +.RE +.PP +\fBSOLVER_RULE_INFARCH\fR +.RS 4 +Infarch rules are also negative assertions, they disallow the installation of packages when there are packages of the same name but with a better architecture\&. +.RE +.PP +\fBSOLVER_RULE_CHOICE\fR +.RS 4 +Choice rules are used to make sure that the solver prefers updating to installing different packages when some dependency is provided by multiple packages with different names\&. The solver may always break choice rules, so you will not see them when a problem is found\&. +.RE +.PP +\fBSOLVER_RULE_LEARNT\fR +.RS 4 +These rules are generated by the solver to keep it from running into the same problem multiple times when it has to backtrack\&. They are the main reason why a sat solver is faster than other dependency solver implementations\&. +.RE +.sp +Special dependency rule types: +.PP +\fBSOLVER_RULE_PKG_NOT_INSTALLABLE\fR +.RS 4 +This rule was added to prevent the installation of a package of an architecture that does not work on the system\&. +.RE +.PP +\fBSOLVER_RULE_PKG_NOTHING_PROVIDES_DEP\fR +.RS 4 +The package contains a required dependency which was not provided by any package\&. +.RE +.PP +\fBSOLVER_RULE_PKG_REQUIRES\fR +.RS 4 +The package contains a required dependency which was provided by at least one package\&. +.RE +.PP +\fBSOLVER_RULE_PKG_SELF_CONFLICT\fR +.RS 4 +The package conflicts with itself\&. This is not allowed by older rpm versions\&. +.RE +.PP +\fBSOLVER_RULE_PKG_CONFLICTS\fR +.RS 4 +The package conflices with some other package\&. +.RE +.PP +\fBSOLVER_RULE_PKG_SAME_NAME\fR +.RS 4 +This rules make sure that only one version of a package is installed in the system\&. +.RE +.PP +\fBSOLVER_RULE_PKG_OBSOLETES\fR +.RS 4 +To fulfill the dependencies two packages need to be installed, but one of the packages obsoletes the other one\&. +.RE +.PP +\fBSOLVER_RULE_PKG_IMPLICIT_OBSOLETES\fR +.RS 4 +To fulfill the dependencies two packages need to be installed, but one of the packages has provides a dependency that is obsoleted by the other one\&. See the POOL_FLAG_IMPLICITOBSOLETEUSESPROVIDES flag\&. +.RE +.PP +\fBSOLVER_RULE_PKG_INSTALLED_OBSOLETES\fR +.RS 4 +To fulfill the dependencies a package needs to be installed that is obsoleted by an installed package\&. See the POOL_FLAG_NOINSTALLEDOBSOLETES flag\&. +.RE +.PP +\fBSOLVER_RULE_PKG_RECOMMENDS\fR +.RS 4 +The package contains a recommended dependency\&. +.RE +.PP +\fBSOLVER_RULE_PKG_SUPPLEMENTS\fR +.RS 4 +The package contains a dependency to specify it supplements another package\&. +.RE +.PP +\fBSOLVER_RULE_PKG_CONSTRAINS\fR +.RS 4 +The package contains a constraint against some other package (disttype conda)\&. +.RE +.PP +\fBSOLVER_RULE_JOB_NOTHING_PROVIDES_DEP\fR +.RS 4 +The user asked for installation of a package providing a specific dependency, but no available package provides it\&. +.RE +.PP +\fBSOLVER_RULE_JOB_UNKNOWN_PACKAGE\fR +.RS 4 +The user asked for installation of a package with a specific name, but no available package has that name\&. +.RE +.PP +\fBSOLVER_RULE_JOB_PROVIDED_BY_SYSTEM\fR +.RS 4 +The user asked for the erasure of a dependency that is provided by the system (i\&.e\&. for special hardware or language dependencies), this cannot be done with a job\&. +.RE +.PP +\fBSOLVER_RULE_JOB_UNSUPPORTED\fR +.RS 4 +The user asked for something that is not yet implemented, e\&.g\&. the installation of all packages at once\&. +.RE +.sp +Policy error constants +.PP +\fBPOLICY_ILLEGAL_DOWNGRADE\fR +.RS 4 +The solver ask for permission before downgrading packages\&. +.RE +.PP +\fBPOLICY_ILLEGAL_ARCHCHANGE\fR +.RS 4 +The solver ask for permission before changing the architecture of installed packages\&. +.RE +.PP +\fBPOLICY_ILLEGAL_VENDORCHANGE\fR +.RS 4 +The solver ask for permission before changing the vendor of installed packages\&. +.RE +.PP +\fBPOLICY_ILLEGAL_NAMECHANGE\fR +.RS 4 +The solver ask for permission before replacing an installed packages with a package that has a different name\&. +.RE +.sp +Solution element type constants +.PP +\fBSOLVER_SOLUTION_JOB\fR +.RS 4 +The problem can be solved by removing the specified job\&. +.RE +.PP +\fBSOLVER_SOLUTION_POOLJOB\fR +.RS 4 +The problem can be solved by removing the specified job that is defined in the pool\&. +.RE +.PP +\fBSOLVER_SOLUTION_INFARCH\fR +.RS 4 +The problem can be solved by allowing the installation of the specified package with an inferior architecture\&. +.RE +.PP +\fBSOLVER_SOLUTION_DISTUPGRADE\fR +.RS 4 +The problem can be solved by allowing to keep the specified package installed\&. +.RE +.PP +\fBSOLVER_SOLUTION_BEST\fR +.RS 4 +The problem can be solved by allowing to install the specified package that is not the best available package\&. +.RE +.PP +\fBSOLVER_SOLUTION_ERASE\fR +.RS 4 +The problem can be solved by allowing to erase the specified package\&. +.RE +.PP +\fBSOLVER_SOLUTION_REPLACE\fR +.RS 4 +The problem can be solved by allowing to replace the package with some other package\&. +.RE +.PP +\fBSOLVER_SOLUTION_REPLACE_DOWNGRADE\fR +.RS 4 +The problem can be solved by allowing to replace the package with some other package that has a lower version\&. +.RE +.PP +\fBSOLVER_SOLUTION_REPLACE_ARCHCHANGE\fR +.RS 4 +The problem can be solved by allowing to replace the package with some other package that has a different architecture\&. +.RE +.PP +\fBSOLVER_SOLUTION_REPLACE_VENDORCHANGE\fR +.RS 4 +The problem can be solved by allowing to replace the package with some other package that has a different vendor\&. +.RE +.PP +\fBSOLVER_SOLUTION_REPLACE_NAMECHANGE\fR +.RS 4 +The problem can be solved by allowing to replace the package with some other package that has a different name\&. +.RE +.sp +Reason constants +.PP +\fBSOLVER_REASON_UNRELATED\fR +.RS 4 +The package status did not change as it was not related to any job\&. +.RE +.PP +\fBSOLVER_REASON_UNIT_RULE\fR +.RS 4 +The package was installed/erased/kept because of a unit rule, i\&.e\&. a rule where all literals but one were false\&. +.RE +.PP +\fBSOLVER_REASON_KEEP_INSTALLED\fR +.RS 4 +The package was chosen when trying to keep as many packages installed as possible\&. +.RE +.PP +\fBSOLVER_REASON_RESOLVE_JOB\fR +.RS 4 +The decision happened to fulfill a job rule\&. +.RE +.PP +\fBSOLVER_REASON_UPDATE_INSTALLED\fR +.RS 4 +The decision happened to fulfill a package update request\&. +.RE +.PP +\fBSOLVER_REASON_CLEANDEPS_ERASE\fR +.RS 4 +The package was erased when cleaning up dependencies from other erased packages\&. +.RE +.PP +\fBSOLVER_REASON_RESOLVE\fR +.RS 4 +The package was installed to fulfill package dependencies\&. +.RE +.PP +\fBSOLVER_REASON_WEAKDEP\fR +.RS 4 +The package was installed because of a weak dependency (Recommends or Supplements)\&. +.RE +.PP +\fBSOLVER_REASON_RESOLVE_ORPHAN\fR +.RS 4 +The decision about the package was made when deciding the fate of orphaned packages\&. +.RE +.PP +\fBSOLVER_REASON_RECOMMENDED\fR +.RS 4 +This is a special case of SOLVER_REASON_WEAKDEP\&. +.RE +.PP +\fBSOLVER_REASON_SUPPLEMENTED\fR +.RS 4 +This is a special case of SOLVER_REASON_WEAKDEP\&. +.RE +.PP +\fBSOLVER_REASON_UNSOLVABLE\fR +.RS 4 +This is a special case where a rule cannot be fulfilled\&. +.RE +.PP +\fBSOLVER_REASON_PREMISE\fR +.RS 4 +This is a special case for the premises of learnt rules\&. +.RE +.SS "ATTRIBUTES" +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBPool *pool;\fR /* read only */ +\fI$job\fR\fB\->{pool}\fR +\fId\fR\fB\&.pool\fR +\fId\fR\fB\&.pool\fR +.fi +.if n \{\ +.RE +.\} +.sp +Back pointer to pool\&. +.SS "METHODS" +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBint set_flag(int\fR \fIflag\fR\fB, int\fR \fIvalue\fR\fB)\fR +my \fI$oldvalue\fR \fB=\fR \fI$solver\fR\fB\->set_flag(\fR\fI$flag\fR\fB,\fR \fI$value\fR\fB)\fR; +\fIoldvalue\fR \fB=\fR \fIsolver\fR\fB\&.set_flag(\fR\fIflag\fR\fB,\fR \fIvalue\fR\fB)\fR +\fIoldvalue\fR \fB=\fR \fIsolver\fR\fB\&.set_flag(\fR\fIflag\fR\fB,\fR \fIvalue\fR\fB)\fR +.fi +.if n \{\ +.RE +.\} +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBint get_flag(int\fR \fIflag\fR\fB)\fR +my \fI$value\fR \fB=\fR \fI$solver\fR\fB\->get_flag(\fR\fI$flag\fR\fB)\fR; +\fIvalue\fR \fB=\fR \fIsolver\fR\fB\&.get_flag(\fR\fIflag\fR\fB)\fR +\fIvalue\fR \fB=\fR \fIsolver\fR\fB\&.get_flag(\fR\fIflag\fR\fB)\fR +.fi +.if n \{\ +.RE +.\} +.sp +Set/get a solver specific flag\&. The flags define the policies the solver has to obey\&. The flags are explained in the CONSTANTS section of this class\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBProblem *solve(Job *\fR\fIjobs\fR\fB)\fR +my \fI@problems\fR \fB=\fR \fI$solver\fR\fB\->solve(\e\fR\fI@jobs\fR\fB)\fR; +\fIproblems\fR \fB=\fR \fIsolver\fR\fB\&.solve(\fR\fIjobs\fR\fB)\fR +\fIproblems\fR \fB=\fR \fIsolver\fR\fB\&.solve(\fR\fIjobs\fR\fB)\fR +.fi +.if n \{\ +.RE +.\} +.sp +Solve a problem specified in the job list (plus the jobs defined in the pool)\&. Returns an array of problems that need user interaction, or an empty array if no problems were encountered\&. See the Problem class on how to deal with problems\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBTransaction transaction()\fR +my \fI$trans\fR \fB=\fR \fI$solver\fR\fB\->transaction()\fR; +\fItrans\fR \fB=\fR \fIsolver\fR\fB\&.transaction()\fR +\fItrans\fR \fB=\fR \fIsolver\fR\fB\&.transaction()\fR +.fi +.if n \{\ +.RE +.\} +.sp +Return the transaction to implement the calculated package changes\&. A transaction is available even if problems were found, this is useful for interactive user interfaces that show both the job result and the problems\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBSolvable *get_recommended(bool\fR \fInoselected\fR\fB=0)\fR +my \fI@solvables\fR \fB=\fR \fI$solver\fR\fB\->get_recommended()\fR; +\fIsolvables\fR \fB=\fR \fIsolver\fR\fB\&.get_recommended()\fR +\fIsolvables\fR \fB=\fR \fIsolver\fR\fB\&.get_recommended()\fR +.fi +.if n \{\ +.RE +.\} +.sp +Return all solvables that are recommended by the solver run result\&. This includes solvables included in the result; set noselected if you want to filter those\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBSolvable *get_suggested(bool\fR \fInoselected\fR\fB=0)\fR +my \fI@solvables\fR \fB=\fR \fI$solver\fR\fB\->get_suggested()\fR; +\fIsolvables\fR \fB=\fR \fIsolver\fR\fB\&.get_suggested()\fR +\fIsolvables\fR \fB=\fR \fIsolver\fR\fB\&.get_suggested()\fR +.fi +.if n \{\ +.RE +.\} +.sp +Return all solvables that are suggested by the solver run result\&. This includes solvables included in the result; set noselected if you want to filter those\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fIDecision\fR \fB= get_decision(Solvable *\fR\fIs\fR\fB)\fR +my \fI$decision\fR \fB=\fR \fI$solver\fR\fB\->get_decision(\fR\fI$solvable\fR\fB)\fR; +\fIdecision\fR \fB=\fR \fIsolver\fR\fB\&.get_decision(\fR\fIsolvable\fR\fB)\fR; +\fIdecision\fR \fB=\fR \fIsolver\fR\fB\&.get_decision(\fR\fIsolvable\fR\fB)\fR; +.fi +.if n \{\ +.RE +.\} +.sp +Return a decision object that describes why a specific solvable was installed or erased\&. See the Decision class for more information\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBDecision *get_decisionlist(Solvable *\fR\fIs\fR\fB)\fR +my \fI@decisions\fR \fB=\fR \fI$solver\fR\fB\->get_decisionlist(\fR\fI$solvable\fR\fB)\fR; +\fIdecisions\fR \fB=\fR \fIsolver\fR\fB\&.get_decisionlist(\fR\fIsolvable\fR\fB)\fR +\fIdecisions\fR \fB=\fR \fIsolver\fR\fB\&.get_decisionlist(\fR\fIsolvable\fR\fB)\fR +.fi +.if n \{\ +.RE +.\} +.sp +Return a list of decisions that caused the specific solvable to be installed or erased\&. This is usually more useful than the get_decision() method, as it returns every involved decision instead of just a single one\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBAlternative *alternatives()\fR +my \fI@alternatives\fR \fB=\fR \fI$solver\fR\fB\->alternatives()\fR; +\fIalternatives\fR \fB=\fR \fIsolver\fR\fB\&.alternatives()\fR +\fIalternatives\fR \fB=\fR \fIsolver\fR\fB\&.alternatives()\fR +.fi +.if n \{\ +.RE +.\} +.sp +Return all alternatives recorded in the solver run\&. See the Alternative class for more information\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBint alternatives_count()\fR +my \fI$cnt\fR \fB=\fR \fI$solver\fR\fB\->alternatives_count()\fR; +\fIcnt\fR \fB=\fR \fIsolver\fR\fB\&.alternatives_count()\fR +\fIcnt\fR \fB=\fR \fIsolver\fR\fB\&.alternatives_count()\fR +.fi +.if n \{\ +.RE +.\} +.sp +Return the number of alternatives without creating alternative objects\&. +.SH "THE PROBLEM CLASS" +.sp +Problems are the way of the solver to interact with the user\&. You can simply list all problems and terminate your program, but a better way is to present solutions to the user and let him pick the ones he likes\&. +.SS "ATTRIBUTES" +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBSolver *solv;\fR /* read only */ +\fI$problem\fR\fB\->{solv}\fR +\fIproblem\fR\fB\&.solv\fR +\fIproblem\fR\fB\&.solv\fR +.fi +.if n \{\ +.RE +.\} +.sp +Back pointer to solver object\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBId id;\fR /* read only */ +\fI$problem\fR\fB\->{id}\fR +\fIproblem\fR\fB\&.id\fR +\fIproblem\fR\fB\&.id\fR +.fi +.if n \{\ +.RE +.\} +.sp +Id of the problem\&. The first problem has Id 1, they are numbered consecutively\&. +.SS "METHODS" +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBRule findproblemrule()\fR +my \fI$probrule\fR \fB=\fR \fI$problem\fR\fB\->findproblemrule()\fR; +\fIprobrule\fR \fB=\fR \fIproblem\fR\fB\&.findproblemrule()\fR +\fIprobrule\fR \fB=\fR \fIproblem\fR\fB\&.findproblemrule()\fR +.fi +.if n \{\ +.RE +.\} +.sp +Return the rule that caused the problem\&. Of course in most situations there is no single responsible rule, but many rules that interconnect with each created the problem\&. Nevertheless, the solver uses some heuristic approach to find a rule that somewhat describes the problem best to the user\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBRule *findallproblemrules(bool\fR \fIunfiltered\fR \fB= 0)\fR +my \fI@probrules\fR \fB=\fR \fI$problem\fR\fB\->findallproblemrules()\fR; +\fIprobrules\fR \fB=\fR \fIproblem\fR\fB\&.findallproblemrules()\fR +\fIprobrules\fR \fB=\fR \fIproblem\fR\fB\&.findallproblemrules()\fR +.fi +.if n \{\ +.RE +.\} +.sp +Return all rules responsible for the problem\&. The returned set of rules contains all the needed information why there was a problem, but it\(cqs hard to present them to the user in a sensible way\&. The default is to filter out all update and job rules (unless the returned rules only consist of those types)\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBDecision *get_decisionlist()\fR +my \fI@decisions\fR \fB=\fR \fI$problem\fR\fB\->get_decisionlist()\fR; +\fIdecisions\fR \fB=\fR \fIproblem\fR\fB\&.get_decisionlist()\fR +\fIdecisions\fR \fB=\fR \fIproblem\fR\fB\&.get_decisionlist()\fR +.fi +.if n \{\ +.RE +.\} +.sp +Return a list of decisions proving the problem\&. This is somewhat similar to the findallproblemrules(), but the output is in an order that makes it easier to understand why the solver could not find a solution\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBDecisionset *get_decisionsetlist()\fR +my \fI@decisionsets\fR \fB=\fR \fI$problem\fR\fB\->get_decisionsetlist()\fR; +\fIdecisionsets\fR \fB=\fR \fIproblem\fR\fB\&.get_decisionsetlist()\fR +\fIdecisionsets\fR \fB=\fR \fIproblem\fR\fB\&.get_decisionsetlist()\fR +.fi +.if n \{\ +.RE +.\} +.sp +Like the get_decisionlist() method, but the decisions are merged into individual sets\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBRule *get_learnt()\fR +my \fI@learnt\fR \fB=\fR \fI$problem\fR\fB\->get_learnt()\fR; +\fIlearnt\fR \fB=\fR \fIproblem\fR\fB\&.get_learnt()\fR +\fIlearnt\fR \fB=\fR \fIproblem\fR\fB\&.get_lerant()\fR +.fi +.if n \{\ +.RE +.\} +.sp +Return a list of learnt rules that are part of the problem proof\&. This is useful for presenting a complete proof to the user\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBSolution *solutions()\fR +my \fI@solutions\fR \fB=\fR \fI$problem\fR\fB\->solutions()\fR; +\fIsolutions\fR \fB=\fR \fIproblem\fR\fB\&.solutions()\fR +\fIsolutions\fR \fB=\fR \fIproblem\fR\fB\&.solutions()\fR +.fi +.if n \{\ +.RE +.\} +.sp +Return an array containing multiple possible solutions to fix the problem\&. See the solution class for more information\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBint solution_count()\fR +my \fI$cnt\fR \fB=\fR \fI$problem\fR\fB\->solution_count()\fR; +\fIcnt\fR \fB=\fR \fIproblem\fR\fB\&.solution_count()\fR +\fIcnt\fR \fB=\fR \fIproblem\fR\fB\&.solution_count()\fR +.fi +.if n \{\ +.RE +.\} +.sp +Return the number of solutions without creating solution objects\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fB\fR +my \fI$str\fR \fB=\fR \fI$problem\fR\fB\->str\fR; +\fIstr\fR \fB= str(\fR\fIproblem\fR\fB)\fR +\fIstr\fR \fB=\fR \fIproblem\fR\fB\&.to_s\fR +.fi +.if n \{\ +.RE +.\} +.sp +Return a string describing the problem\&. This is a convenience function, it is a shorthand for calling findproblemrule(), then ruleinfo() on the problem rule and problemstr() on the ruleinfo object\&. +.SH "THE RULE CLASS" +.sp +Rules are the basic block of sat solving\&. Each package dependency gets translated into one or multiple rules\&. +.SS "ATTRIBUTES" +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBSolver *solv;\fR /* read only */ +\fI$rule\fR\fB\->{solv}\fR +\fIrule\fR\fB\&.solv\fR +\fIrule\fR\fB\&.solv\fR +.fi +.if n \{\ +.RE +.\} +.sp +Back pointer to solver object\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBId id;\fR /* read only */ +\fI$rule\fR\fB\->{id}\fR +\fIrule\fR\fB\&.id\fR +\fIrule\fR\fB\&.id\fR +.fi +.if n \{\ +.RE +.\} +.sp +The id of the rule\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBint type;\fR /* read only */ +\fI$rule\fR\fB\->{type}\fR +\fIrule\fR\fB\&.type\fR +\fIrule\fR\fB\&.type\fR +.fi +.if n \{\ +.RE +.\} +.sp +The basic type of the rule\&. See the constant section of the solver class for the type list\&. +.SS "METHODS" +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBRuleinfo info()\fR +my \fI$ruleinfo\fR \fB=\fR \fI$rule\fR\fB\->info()\fR; +\fIruleinfo\fR \fB=\fR \fIrule\fR\fB\&.info()\fR +\fIruleinfo\fR \fB=\fR \fIrule\fR\fB\&.info()\fR +.fi +.if n \{\ +.RE +.\} +.sp +Return a Ruleinfo object that contains information about why the rule was created\&. But see the allinfos() method below\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBRuleinfo *allinfos()\fR +my \fI@ruleinfos\fR \fB=\fR \fI$rule\fR\fB\->allinfos()\fR; +\fIruleinfos\fR \fB=\fR \fIrule\fR\fB\&.allinfos()\fR +\fIruleinfos\fR \fB=\fR \fIrule\fR\fB\&.allinfos()\fR +.fi +.if n \{\ +.RE +.\} +.sp +As the same dependency rule can get created because of multiple dependencies, one Ruleinfo is not enough to describe the reason\&. Thus the allinfos() method returns an array of all infos about a rule\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBDecision *get_decisionlist()\fR +my \fI@decisions\fR \fB=\fR \fI$rule\fR\fB\->get_decisionlist()\fR; +\fIdecisions\fR \fB=\fR \fIrule\fR\fB\&.get_decisionlist()\fR +\fIdecisions\fR \fB=\fR \fIrule\fR\fB\&.get_decisionlist()\fR +.fi +.if n \{\ +.RE +.\} +.sp +Return a list of decisions proving a learnt rule\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBDecision *get_decisionsetlist()\fR +my \fI@decisionsets\fR \fB=\fR \fI$rule\fR\fB\->get_decisionsetlist()\fR; +\fIdecisionsets\fR \fB=\fR \fIrule\fR\fB\&.get_decisionsetlist()\fR +\fIdecisionsets\fR \fB=\fR \fIrule\fR\fB\&.get_decisionsetlist()\fR +.fi +.if n \{\ +.RE +.\} +.sp +Like the get_decisionlist() method, but the decisions are merged into individual sets\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBRule *get_learnt()\fR +my \fI@learnt\fR \fB=\fR \fI$rule\fR\fB\->get_learnt()\fR; +\fIlearnt\fR \fB=\fR \fIrule\fR\fB\&.get_learnt()\fR +\fIlearnt\fR \fB=\fR \fIrule\fR\fB\&.get_lerant()\fR +.fi +.if n \{\ +.RE +.\} +.sp +Return a list of learnt rules that are part of the learnt rule proof\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fB\fR +\fBif (\fR\fI$rule1\fR \fB==\fR \fI$rule2\fR\fB)\fR +\fBif\fR \fIrule1\fR \fB==\fR \fIrule2\fR\fB:\fR +\fBif\fR \fIrule1\fR \fB==\fR \fIrule2\fR +.fi +.if n \{\ +.RE +.\} +.sp +Two rules are equal if they belong to the same solver and have the same id\&. +.SH "THE RULEINFO CLASS" +.sp +A Ruleinfo describes one reason why a rule was created\&. +.SS "ATTRIBUTES" +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBSolver *solv;\fR /* read only */ +\fI$ruleinfo\fR\fB\->{solv}\fR +\fIruleinfo\fR\fB\&.solv\fR +\fIruleinfo\fR\fB\&.solv\fR +.fi +.if n \{\ +.RE +.\} +.sp +Back pointer to solver object\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBint type;\fR /* read only */ +\fI$ruleinfo\fR\fB\->{type}\fR +\fIruleinfo\fR\fB\&.type\fR +\fIruleinfo\fR\fB\&.type\fR +.fi +.if n \{\ +.RE +.\} +.sp +The type of the ruleinfo\&. See the constant section of the solver class for the rule type list and the special type list\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBDep *dep;\fR /* read only */ +\fI$ruleinfo\fR\fB\->{dep}\fR +\fIruleinfo\fR\fB\&.dep\fR +\fIruleinfo\fR\fB\&.dep\fR +.fi +.if n \{\ +.RE +.\} +.sp +The dependency leading to the creation of the rule\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBDep *dep_id;\fR /* read only */ +\fI$ruleinfo\fR\fB\->{\fR\fIdep_id\fR\fB}\fR +\fIruleinfo\fR\fB\&.dep_id\fR +\fIruleinfo\fR\fB\&.dep_id\fR +.fi +.if n \{\ +.RE +.\} +.sp +The Id of the dependency leading to the creation of the rule, or zero\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBSolvable *solvable;\fR /* read only */ +\fI$ruleinfo\fR\fB\->{solvable}\fR +\fIruleinfo\fR\fB\&.solvable\fR +\fIruleinfo\fR\fB\&.solvable\fR +.fi +.if n \{\ +.RE +.\} +.sp +The involved Solvable, e\&.g\&. the one containing the dependency\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBSolvable *othersolvable;\fR /* read only */ +\fI$ruleinfo\fR\fB\->{othersolvable}\fR +\fIruleinfo\fR\fB\&.othersolvable\fR +\fIruleinfo\fR\fB\&.othersolvable\fR +.fi +.if n \{\ +.RE +.\} +.sp +The other involved Solvable (if any), e\&.g\&. the one providing the dependency\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBconst char *problemstr()\fR; +my \fI$str\fR \fB=\fR \fI$ruleinfo\fR\fB\->problemstr()\fR; +\fIstr\fR \fB=\fR \fIruleinfo\fR\fB\&.problemstr()\fR +\fIstr\fR \fB=\fR \fIruleinfo\fR\fB\&.problemstr()\fR +.fi +.if n \{\ +.RE +.\} +.sp +A string describing the ruleinfo from a problem perspective\&. This probably only makes sense if the rule is part of a problem\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fB\fR +my \fI$str\fR \fB=\fR \fI$ruleinfo\fR\fB\->str\fR; +\fIstr\fR \fB= str(\fR\fIruleinfo\fR\fB)\fR +\fIstr\fR \fB=\fR \fIruleinfo\fR\fB\&.to_s\fR +.fi +.if n \{\ +.RE +.\} +.sp +A string describing the ruleinfo, i\&.e\&. the reason why the corresponding rule has been created\&. +.SH "THE SOLUTION CLASS" +.sp +A solution solves one specific problem\&. It consists of multiple solution elements that all need to be executed\&. +.SS "ATTRIBUTES" +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBSolver *solv;\fR /* read only */ +\fI$solution\fR\fB\->{solv}\fR +\fIsolution\fR\fB\&.solv\fR +\fIsolution\fR\fB\&.solv\fR +.fi +.if n \{\ +.RE +.\} +.sp +Back pointer to solver object\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBId problemid;\fR /* read only */ +\fI$solution\fR\fB\->{problemid}\fR +\fIsolution\fR\fB\&.problemid\fR +\fIsolution\fR\fB\&.problemid\fR +.fi +.if n \{\ +.RE +.\} +.sp +Id of the problem the solution solves\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBId id;\fR /* read only */ +\fI$solution\fR\fB\->{id}\fR +\fIsolution\fR\fB\&.id\fR +\fIsolution\fR\fB\&.id\fR +.fi +.if n \{\ +.RE +.\} +.sp +Id of the solution\&. The first solution has Id 1, they are numbered consecutively\&. +.SS "METHODS" +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBSolutionelement *elements(bool\fR \fIexpandreplaces\fR \fB= 0)\fR +my \fI@solutionelements\fR \fB=\fR \fI$solution\fR\fB\->elements()\fR; +\fIsolutionelements\fR \fB=\fR \fIsolution\fR\fB\&.elements()\fR +\fIsolutionelements\fR \fB=\fR \fIsolution\fR\fB\&.elements()\fR +.fi +.if n \{\ +.RE +.\} +.sp +Return an array containing the elements describing what needs to be done to implement the specific solution\&. If expandreplaces is true, elements of type SOLVER_SOLUTION_REPLACE will be replaced by one or more elements replace elements describing the policy mismatches\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBint element_count()\fR +my \fI$cnt\fR \fB=\fR \fI$solution\fR\fB\->solution_count()\fR; +\fIcnt\fR \fB=\fR \fIsolution\fR\fB\&.element_count()\fR +\fIcnt\fR \fB=\fR \fIsolution\fR\fB\&.element_count()\fR +.fi +.if n \{\ +.RE +.\} +.sp +Return the number of solution elements without creating objects\&. Note that the count does not match the number of objects returned by the elements() method of expandreplaces is set to true\&. +.SH "THE SOLUTIONELEMENT CLASS" +.sp +A solution element describes a single action of a solution\&. The action is always either to remove one specific job or to add a new job that installs or erases a single specific package\&. +.SS "ATTRIBUTES" +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBSolver *solv;\fR /* read only */ +\fI$solutionelement\fR\fB\->{solv}\fR +\fIsolutionelement\fR\fB\&.solv\fR +\fIsolutionelement\fR\fB\&.solv\fR +.fi +.if n \{\ +.RE +.\} +.sp +Back pointer to solver object\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBId problemid;\fR /* read only */ +\fI$solutionelement\fR\fB\->{problemid}\fR +\fIsolutionelement\fR\fB\&.problemid\fR +\fIsolutionelement\fR\fB\&.problemid\fR +.fi +.if n \{\ +.RE +.\} +.sp +Id of the problem the element (partly) solves\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBId solutionid;\fR /* read only */ +\fI$solutionelement\fR\fB\->{solutionid}\fR +\fIsolutionelement\fR\fB\&.solutionid\fR +\fIsolutionelement\fR\fB\&.solutionid\fR +.fi +.if n \{\ +.RE +.\} +.sp +Id of the solution the element is a part of\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBId id;\fR /* read only */ +\fI$solutionelement\fR\fB\->{id}\fR +\fIsolutionelement\fR\fB\&.id\fR +\fIsolutionelement\fR\fB\&.id\fR +.fi +.if n \{\ +.RE +.\} +.sp +Id of the solution element\&. The first element has Id 1, they are numbered consecutively\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBId type;\fR /* read only */ +\fI$solutionelement\fR\fB\->{type}\fR +\fIsolutionelement\fR\fB\&.type\fR +\fIsolutionelement\fR\fB\&.type\fR +.fi +.if n \{\ +.RE +.\} +.sp +Type of the solution element\&. See the constant section of the solver class for the existing types\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBSolvable *solvable;\fR /* read only */ +\fI$solutionelement\fR\fB\->{solvable}\fR +\fIsolutionelement\fR\fB\&.solvable\fR +\fIsolutionelement\fR\fB\&.solvable\fR +.fi +.if n \{\ +.RE +.\} +.sp +The installed solvable that needs to be replaced for replacement elements\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBSolvable *replacement;\fR /* read only */ +\fI$solutionelement\fR\fB\->{replacement}\fR +\fIsolutionelement\fR\fB\&.replacement\fR +\fIsolutionelement\fR\fB\&.replacement\fR +.fi +.if n \{\ +.RE +.\} +.sp +The solvable that needs to be installed to fix the problem\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBint jobidx;\fR /* read only */ +\fI$solutionelement\fR\fB\->{jobidx}\fR +\fIsolutionelement\fR\fB\&.jobidx\fR +\fIsolutionelement\fR\fB\&.jobidx\fR +.fi +.if n \{\ +.RE +.\} +.sp +The index of the job that needs to be removed to fix the problem, or \-1 if the element is of another type\&. Note that it\(cqs better to change the job to SOLVER_NOOP type so that the numbering of other elements does not get disturbed\&. This method works both for types SOLVER_SOLUTION_JOB and SOLVER_SOLUTION_POOLJOB\&. +.SS "METHODS" +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBSolutionelement *replaceelements()\fR +my \fI@solutionelements\fR \fB=\fR \fI$solutionelement\fR\fB\->replaceelements()\fR; +\fIsolutionelements\fR \fB=\fR \fIsolutionelement\fR\fB\&.replaceelements()\fR +\fIsolutionelements\fR \fB=\fR \fIsolutionelement\fR\fB\&.replaceelements()\fR +.fi +.if n \{\ +.RE +.\} +.sp +If the solution element is of type SOLVER_SOLUTION_REPLACE, return an array of elements describing the policy mismatches, otherwise return a copy of the element\&. See also the \(lqexpandreplaces\(rq option in the solution\(cqs elements() method\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBint illegalreplace()\fR +my \fI$illegal\fR \fB=\fR \fI$solutionelement\fR\fB\->illegalreplace()\fR; +\fIillegal\fR \fB=\fR \fIsolutionelement\fR\fB\&.illegalreplace()\fR +\fIillegal\fR \fB=\fR \fIsolutionelement\fR\fB\&.illegalreplace()\fR +.fi +.if n \{\ +.RE +.\} +.sp +Return an integer that contains the policy mismatch bits or\-ed together, or zero if there was no policy mismatch\&. See the policy error constants in the solver class\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBJob Job()\fR +my \fI$job\fR \fB=\fR \fI$solutionelement\fR\fB\->Job()\fR; +\fIillegal\fR \fB=\fR \fIsolutionelement\fR\fB\&.Job()\fR +\fIillegal\fR \fB=\fR \fIsolutionelement\fR\fB\&.Job()\fR +.fi +.if n \{\ +.RE +.\} +.sp +Create a job that implements the solution element\&. Add this job to the array of jobs for all elements of type different to SOLVER_SOLUTION_JOB and SOLVER_SOLUTION_POOLJOB\&. For the latter two, a SOLVER_NOOB Job is created, you should replace the old job with the new one\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fB\fR +my \fI$str\fR \fB=\fR \fI$solutionelement\fR\fB\->str\fR; +\fIstr\fR \fB= str(\fR\fIsolutionelement\fR\fB)\fR +\fIstr\fR \fB=\fR \fIsolutionelement\fR\fB\&.to_s\fR +.fi +.if n \{\ +.RE +.\} +.sp +A string describing the change the solution element consists of\&. +.SH "THE TRANSACTION CLASS" +.sp +Transactions describe the output of a solver run\&. A transaction contains a number of transaction elements, each either the installation of a new package or the removal of an already installed package\&. The Transaction class supports a classify() method that puts the elements into different groups so that a transaction can be presented to the user in a meaningful way\&. +.SS "CONSTANTS" +.sp +Transaction element types, both active and passive +.PP +\fBSOLVER_TRANSACTION_IGNORE\fR +.RS 4 +This element does nothing\&. Used to map element types that do not match the view mode\&. +.RE +.PP +\fBSOLVER_TRANSACTION_INSTALL\fR +.RS 4 +This element installs a package\&. +.RE +.PP +\fBSOLVER_TRANSACTION_ERASE\fR +.RS 4 +This element erases a package\&. +.RE +.PP +\fBSOLVER_TRANSACTION_MULTIINSTALL\fR +.RS 4 +This element installs a package with a different version keeping the other versions installed\&. +.RE +.PP +\fBSOLVER_TRANSACTION_MULTIREINSTALL\fR +.RS 4 +This element reinstalls an installed package keeping the other versions installed\&. +.RE +.sp +Transaction element types, active view +.PP +\fBSOLVER_TRANSACTION_REINSTALL\fR +.RS 4 +This element re\-installs a package, i\&.e\&. installs the same package again\&. +.RE +.PP +\fBSOLVER_TRANSACTION_CHANGE\fR +.RS 4 +This element installs a package with same name, version, architecture but different content\&. +.RE +.PP +\fBSOLVER_TRANSACTION_UPGRADE\fR +.RS 4 +This element installs a newer version of an installed package\&. +.RE +.PP +\fBSOLVER_TRANSACTION_DOWNGRADE\fR +.RS 4 +This element installs an older version of an installed package\&. +.RE +.PP +\fBSOLVER_TRANSACTION_OBSOLETES\fR +.RS 4 +This element installs a package that obsoletes an installed package\&. +.RE +.sp +Transaction element types, passive view +.PP +\fBSOLVER_TRANSACTION_REINSTALLED\fR +.RS 4 +This element re\-installs a package, i\&.e\&. installs the same package again\&. +.RE +.PP +\fBSOLVER_TRANSACTION_CHANGED\fR +.RS 4 +This element replaces an installed package with one of the same name, version, architecture but different content\&. +.RE +.PP +\fBSOLVER_TRANSACTION_UPGRADED\fR +.RS 4 +This element replaces an installed package with a new version\&. +.RE +.PP +\fBSOLVER_TRANSACTION_DOWNGRADED\fR +.RS 4 +This element replaces an installed package with an old version\&. +.RE +.PP +\fBSOLVER_TRANSACTION_OBSOLETED\fR +.RS 4 +This element replaces an installed package with a package that obsoletes it\&. +.RE +.sp +Pseudo element types for showing extra information used by classify() +.PP +\fBSOLVER_TRANSACTION_ARCHCHANGE\fR +.RS 4 +This element replaces an installed package with a package of a different architecture\&. +.RE +.PP +\fBSOLVER_TRANSACTION_VENDORCHANGE\fR +.RS 4 +This element replaces an installed package with a package of a different vendor\&. +.RE +.sp +Transaction mode flags +.PP +\fBSOLVER_TRANSACTION_SHOW_ACTIVE\fR +.RS 4 +Filter for active view types\&. The default is to return passive view type, i\&.e\&. to show how the installed packages get changed\&. +.RE +.PP +\fBSOLVER_TRANSACTION_SHOW_OBSOLETES\fR +.RS 4 +Do not map the obsolete view type into INSTALL/ERASE elements\&. +.RE +.PP +\fBSOLVER_TRANSACTION_SHOW_ALL\fR +.RS 4 +If multiple packages replace an installed package, only the best of them is kept as OBSOLETE element, the other ones are mapped to INSTALL/ERASE elements\&. This is because most applications want to show just one package replacing the installed one\&. The SOLVER_TRANSACTION_SHOW_ALL makes the library keep all OBSOLETE elements\&. +.RE +.PP +\fBSOLVER_TRANSACTION_SHOW_MULTIINSTALL\fR +.RS 4 +The library maps MULTIINSTALL elements to simple INSTALL elements\&. This flag can be used to disable the mapping\&. +.RE +.PP +\fBSOLVER_TRANSACTION_CHANGE_IS_REINSTALL\fR +.RS 4 +Use this flag if you want to map CHANGE elements to the REINSTALL type\&. +.RE +.PP +\fBSOLVER_TRANSACTION_OBSOLETE_IS_UPGRADE\fR +.RS 4 +Use this flag if you want to map OBSOLETE elements to the UPGRADE type\&. +.RE +.PP +\fBSOLVER_TRANSACTION_MERGE_ARCHCHANGES\fR +.RS 4 +Do not add extra categories for every architecture change, instead cumulate them in one category\&. +.RE +.PP +\fBSOLVER_TRANSACTION_MERGE_VENDORCHANGES\fR +.RS 4 +Do not add extra categories for every vendor change, instead cumulate them in one category\&. +.RE +.PP +\fBSOLVER_TRANSACTION_RPM_ONLY\fR +.RS 4 +Special view mode that just returns IGNORE, ERASE, INSTALL, MULTIINSTALL elements\&. Useful if you want to find out what to feed to the underlying package manager\&. +.RE +.sp +Transaction order flags +.PP +\fBSOLVER_TRANSACTION_KEEP_ORDERDATA\fR +.RS 4 +Do not throw away the dependency graph used for ordering the transaction\&. This flag is needed if you want to do manual ordering\&. +.RE +.SS "ATTRIBUTES" +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBPool *pool;\fR /* read only */ +\fI$trans\fR\fB\->{pool}\fR +\fItrans\fR\fB\&.pool\fR +\fItrans\fR\fB\&.pool\fR +.fi +.if n \{\ +.RE +.\} +.sp +Back pointer to pool\&. +.SS "METHODS" +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBbool isempty()\fR +\fI$trans\fR\fB\->isempty()\fR +\fItrans\fR\fB\&.isempty()\fR +\fItrans\fR\fB\&.isempty?\fR +.fi +.if n \{\ +.RE +.\} +.sp +Returns true if the transaction does not do anything, i\&.e\&. has no elements\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBSolvable *newsolvables()\fR +my \fI@newsolvables\fR \fB=\fR \fI$trans\fR\fB\->newsolvables()\fR; +\fInewsolvables\fR \fB=\fR \fItrans\fR\fB\&.newsolvables()\fR +\fInewsolvables\fR \fB=\fR \fItrans\fR\fB\&.newsolvables()\fR +.fi +.if n \{\ +.RE +.\} +.sp +Return all packages that are to be installed by the transaction\&. These are the packages that need to be downloaded from the repositories\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBSolvable *keptsolvables()\fR +my \fI@keptsolvables\fR \fB=\fR \fI$trans\fR\fB\->keptsolvables()\fR; +\fIkeptsolvables\fR \fB=\fR \fItrans\fR\fB\&.keptsolvables()\fR +\fIkeptsolvables\fR \fB=\fR \fItrans\fR\fB\&.keptsolvables()\fR +.fi +.if n \{\ +.RE +.\} +.sp +Return all installed packages that the transaction will keep installed\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBSolvable *steps()\fR +my \fI@steps\fR \fB=\fR \fI$trans\fR\fB\->steps()\fR; +\fIsteps\fR \fB=\fR \fItrans\fR\fB\&.steps()\fR +\fIsteps\fR \fB=\fR \fItrans\fR\fB\&.steps()\fR +.fi +.if n \{\ +.RE +.\} +.sp +Return all solvables that need to be installed (if the returned solvable is not already installed) or erased (if the returned solvable is installed)\&. A step is also called a transaction element\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBint steptype(Solvable *\fR\fIsolvable\fR\fB, int\fR \fImode\fR\fB)\fR +my \fI$type\fR \fB=\fR \fI$trans\fR\fB\->steptype(\fR\fI$solvable\fR\fB,\fR \fI$mode\fR\fB)\fR; +\fItype\fR \fB=\fR \fItrans\fR\fB\&.steptype(\fR\fIsolvable\fR\fB,\fR \fImode\fR\fB)\fR +\fItype\fR \fB=\fR \fItrans\fR\fB\&.steptype(\fR\fIsolvable\fR\fB,\fR \fImode\fR\fB)\fR +.fi +.if n \{\ +.RE +.\} +.sp +Return the transaction type of the specified solvable\&. See the CONSTANTS sections for the mode argument flags and the list of returned types\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBTransactionClass *classify(int\fR \fImode\fR \fB= 0)\fR +my \fI@classes\fR \fB=\fR \fI$trans\fR\fB\->classify()\fR; +\fIclasses\fR \fB=\fR \fItrans\fR\fB\&.classify()\fR +\fIclasses\fR \fB=\fR \fItrans\fR\fB\&.classify()\fR +.fi +.if n \{\ +.RE +.\} +.sp +Group the transaction elements into classes so that they can be displayed in a structured way\&. You can use various mapping mode flags to tweak the result to match your preferences, see the mode argument flag in the CONSTANTS section\&. See the TransactionClass class for how to deal with the returned objects\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBSolvable othersolvable(Solvable *\fR\fIsolvable\fR\fB)\fR +my \fI$other\fR \fB=\fR \fI$trans\fR\fB\->othersolvable(\fR\fI$solvable\fR\fB)\fR; +\fIother\fR \fB=\fR \fItrans\fR\fB\&.othersolvable(\fR\fIsolvable\fR\fB)\fR +\fIother\fR \fB=\fR \fItrans\fR\fB\&.othersolvable(\fR\fIsolvable\fR\fB)\fR +.fi +.if n \{\ +.RE +.\} +.sp +Return the \(lqother\(rq solvable for a given solvable\&. For installed packages the other solvable is the best package with the same name that replaces the installed package, or the best package of the obsoleting packages if the package does not get replaced by one with the same name\&. +.sp +For to be installed packages, the \(lqother\(rq solvable is the best installed package with the same name that will be replaced, or the best packages of all the packages that are obsoleted if the new package does not replace a package with the same name\&. +.sp +Thus, the \(lqother\(rq solvable is normally the package that is also shown for a given package\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBSolvable *allothersolvables(Solvable *\fR\fIsolvable\fR\fB)\fR +my \fI@others\fR \fB=\fR \fI$trans\fR\fB\->allothersolvables(\fR\fI$solvable\fR\fB)\fR; +\fIothers\fR \fB=\fR \fItrans\fR\fB\&.allothersolvables(\fR\fIsolvable\fR\fB)\fR +\fIothers\fR \fB=\fR \fItrans\fR\fB\&.allothersolvables(\fR\fIsolvable\fR\fB)\fR +.fi +.if n \{\ +.RE +.\} +.sp +For installed packages, returns all of the packages that replace us\&. For to be installed packages, returns all of the packages that the new package replaces\&. The special \(lqother\(rq solvable is always the first entry of the returned array\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBlong long calc_installsizechange()\fR +my \fI$change\fR \fB=\fR \fI$trans\fR\fB\->calc_installsizechange()\fR; +\fIchange\fR \fB=\fR \fItrans\fR\fB\&.calc_installsizechange()\fR +\fIchange\fR \fB=\fR \fItrans\fR\fB\&.calc_installsizechange()\fR +.fi +.if n \{\ +.RE +.\} +.sp +Return the size change of the installed system in kilobytes (kibibytes)\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBvoid order(int\fR \fIflags\fR \fB= 0)\fR +\fI$trans\fR\fB\->order()\fR; +\fItrans\fR\fB\&.order()\fR +\fItrans\fR\fB\&.order()\fR +.fi +.if n \{\ +.RE +.\} +.sp +Order the steps in the transactions so that dependent packages are updated before packages that depend on them\&. For rpm, you can also use rpmlib\(cqs ordering functionality, debian\(cqs dpkg does not provide a way to order a transaction\&. +.SS "ACTIVE/PASSIVE VIEW" +.sp +Active view lists what new packages get installed, while passive view shows what happens to the installed packages\&. Most often there\(cqs not much difference between the two modes, but things get interesting if multiple packages get replaced by one new package\&. Say you have installed packages A\-1\-1 and B\-1\-1, and now install A\-2\-1 which has a new dependency that obsoletes B\&. The transaction elements will be +.sp +.if n \{\ +.RS 4 +.\} +.nf +updated A\-1\-1 (other: A\-2\-1) +obsoleted B\-1\-1 (other: A\-2\-1) +.fi +.if n \{\ +.RE +.\} +.sp +in passive mode, but +.sp +.if n \{\ +.RS 4 +.\} +.nf +update A\-2\-1 (other: A\-1\-1) +erase B +.fi +.if n \{\ +.RE +.\} +.sp +in active mode\&. If the mode contains SOLVER_TRANSACTION_SHOW_ALL, the passive mode list will be unchanged but the active mode list will just contain A\-2\-1\&. +.SH "THE TRANSACTIONCLASS CLASS" +.sp +Objects of this type are returned by the classify() Transaction method\&. +.SS "ATTRIBUTES" +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBTransaction *transaction;\fR /* read only */ +\fI$class\fR\fB\->{transaction}\fR +\fIclass\fR\fB\&.transaction\fR +\fIclass\fR\fB\&.transaction\fR +.fi +.if n \{\ +.RE +.\} +.sp +Back pointer to transaction object\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBint type;\fR /* read only */ +\fI$class\fR\fB\->{type}\fR +\fIclass\fR\fB\&.type\fR +\fIclass\fR\fB\&.type\fR +.fi +.if n \{\ +.RE +.\} +.sp +The type of the transaction elements in the class\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBint count;\fR /* read only */ +\fI$class\fR\fB\->{count}\fR +\fIclass\fR\fB\&.count\fR +\fIclass\fR\fB\&.count\fR +.fi +.if n \{\ +.RE +.\} +.sp +The number of elements in the class\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBconst char *\fR\fIfromstr\fR; +\fI$class\fR\fB\->{fromstr}\fR +\fIclass\fR\fB\&.fromstr\fR +\fIclass\fR\fB\&.fromstr\fR +.fi +.if n \{\ +.RE +.\} +.sp +The old vendor or architecture\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBconst char *\fR\fItostr\fR; +\fI$class\fR\fB\->{tostr}\fR +\fIclass\fR\fB\&.tostr\fR +\fIclass\fR\fB\&.tostr\fR +.fi +.if n \{\ +.RE +.\} +.sp +The new vendor or architecture\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBId\fR \fIfromid\fR; +\fI$class\fR\fB\->{fromid}\fR +\fIclass\fR\fB\&.fromid\fR +\fIclass\fR\fB\&.fromid\fR +.fi +.if n \{\ +.RE +.\} +.sp +The id of the old vendor or architecture\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBId\fR \fItoid\fR; +\fI$class\fR\fB\->{toid}\fR +\fIclass\fR\fB\&.toid\fR +\fIclass\fR\fB\&.toid\fR +.fi +.if n \{\ +.RE +.\} +.sp +The id of the new vendor or architecture\&. +.SS "METHODS" +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBvoid solvables()\fR; +my \fI@solvables\fR \fB=\fR \fI$class\fR\fB\->solvables()\fR; +\fIsolvables\fR \fB=\fR \fIclass\fR\fB\&.solvables()\fR +\fIsolvables\fR \fB=\fR \fIclass\fR\fB\&.solvables()\fR +.fi +.if n \{\ +.RE +.\} +.sp +Return the solvables for all transaction elements in the class\&. +.SH "CHECKSUMS" +.sp +Checksums (also called hashes) are used to make sure that downloaded data is not corrupt and also as a fingerprint mechanism to check if data has changed\&. +.SS "CLASS METHODS" +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBChksum Chksum(Id\fR \fItype\fR\fB)\fR +my \fI$chksum\fR \fB= solv::Chksum\->new(\fR\fI$type\fR\fB)\fR; +\fIchksum\fR \fB= solv\&.Chksum(\fR\fItype\fR\fB)\fR +\fIchksum\fR \fB= Solv::Chksum\&.new(\fR\fItype\fR\fB)\fR +.fi +.if n \{\ +.RE +.\} +.sp +Create a checksum object\&. Currently the following types are supported: +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBREPOKEY_TYPE_MD5\fR +\fBREPOKEY_TYPE_SHA1\fR +\fBREPOKEY_TYPE_SHA224\fR +\fBREPOKEY_TYPE_SHA256\fR +\fBREPOKEY_TYPE_SHA384\fR +\fBREPOKEY_TYPE_SHA512\fR +.fi +.if n \{\ +.RE +.\} +.sp +These keys are constants in the \fBsolv\fR class\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBChksum Chksum(Id\fR \fItype\fR\fB, const char *\fR\fIhex\fR\fB)\fR +my \fI$chksum\fR \fB= solv::Chksum\->new(\fR\fI$type\fR\fB,\fR \fI$hex\fR\fB)\fR; +\fIchksum\fR \fB= solv\&.Chksum(\fR\fItype\fR\fB,\fR \fIhex\fR\fB)\fR +\fIchksum\fR \fB= Solv::Chksum\&.new(\fR\fItype\fR\fB,\fR \fIhex\fR\fB)\fR +.fi +.if n \{\ +.RE +.\} +.sp +Create an already finalized checksum object from a hex string\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBChksum Chksum_from_bin(Id\fR \fItype\fR\fB, char *\fR\fIbin\fR\fB)\fR +my \fI$chksum\fR \fB= solv::Chksum\->from_bin(\fR\fI$type\fR\fB,\fR \fI$bin\fR\fB)\fR; +\fIchksum\fR \fB= solv\&.Chksum\&.from_bin(\fR\fItype\fR\fB,\fR \fIbin\fR\fB)\fR +\fIchksum\fR \fB= Solv::Chksum\&.from_bin(\fR\fItype\fR\fB,\fR \fIbin\fR\fB)\fR +.fi +.if n \{\ +.RE +.\} +.sp +Create an already finalized checksum object from a binary checksum\&. +.SS "ATTRIBUTES" +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBId type;\fR /* read only */ +\fI$chksum\fR\fB\->{type}\fR +\fIchksum\fR\fB\&.type\fR +\fIchksum\fR\fB\&.type\fR +.fi +.if n \{\ +.RE +.\} +.sp +Return the type of the checksum object\&. +.SS "METHODS" +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBvoid add(const char *\fR\fIstr\fR\fB)\fR +\fI$chksum\fR\fB\->add(\fR\fI$str\fR\fB)\fR; +\fIchksum\fR\fB\&.add(\fR\fIstr\fR\fB)\fR +\fIchksum\fR\fB\&.add(\fR\fIstr\fR\fB)\fR +.fi +.if n \{\ +.RE +.\} +.sp +Add a (binary) string to the checksum\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBvoid add_fp(FILE *\fR\fIfp\fR\fB)\fR +\fI$chksum\fR\fB\->add_fp(\fR\fI$file\fR\fB)\fR; +\fIchksum\fR\fB\&.add_fp(\fR\fIfile\fR\fB)\fR +\fIchksum\fR\fB\&.add_fp(\fR\fIfile\fR\fB)\fR +.fi +.if n \{\ +.RE +.\} +.sp +Add the contents of a file to the checksum\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBvoid add_stat(const char *\fR\fIfilename\fR\fB)\fR +\fI$chksum\fR\fB\->add_stat(\fR\fI$filename\fR\fB)\fR; +\fIchksum\fR\fB\&.add_stat(\fR\fIfilename\fR\fB)\fR +\fIchksum\fR\fB\&.add_stat(\fR\fIfilename\fR\fB)\fR +.fi +.if n \{\ +.RE +.\} +.sp +Stat the file and add the dev/ino/size/mtime member to the checksum\&. If the stat fails, the members are zeroed\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBvoid add_fstat(int\fR \fIfd\fR\fB)\fR +\fI$chksum\fR\fB\->add_fstat(\fR\fI$fd\fR\fB)\fR; +\fIchksum\fR\fB\&.add_fstat(\fR\fIfd\fR\fB)\fR +\fIchksum\fR\fB\&.add_fstat(\fR\fIfd\fR\fB)\fR +.fi +.if n \{\ +.RE +.\} +.sp +Same as add_stat, but instead of the filename a file descriptor is used\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBunsigned char *raw()\fR +my \fI$raw\fR \fB=\fR \fI$chksum\fR\fB\->raw()\fR; +\fIraw\fR \fB=\fR \fIchksum\fR\fB\&.raw()\fR +\fIraw\fR \fB=\fR \fIchksum\fR\fB\&.raw()\fR +.fi +.if n \{\ +.RE +.\} +.sp +Finalize the checksum and return the result as raw bytes\&. This means that the result can contain NUL bytes or unprintable characters\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBconst char *hex()\fR +my \fI$raw\fR \fB=\fR \fI$chksum\fR\fB\->hex()\fR; +\fIraw\fR \fB=\fR \fIchksum\fR\fB\&.hex()\fR +\fIraw\fR \fB=\fR \fIchksum\fR\fB\&.hex()\fR +.fi +.if n \{\ +.RE +.\} +.sp +Finalize the checksum and return the result as hex string\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBconst char *typestr()\fR +my \fI$typestr\fR \fB=\fR \fI$chksum\fR\fB\->typestr()\fR; +\fItypestr\fR \fB=\fR \fIchksum\fR\fB\&.typestr\fR +\fItypestr\fR \fB=\fR \fIchksum\fR\fB\&.typestr\fR +.fi +.if n \{\ +.RE +.\} +.sp +Return the type of the checksum as a string, e\&.g\&. "sha256"\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fB\fR +\fBif (\fR\fI$chksum1\fR \fB==\fR \fI$chksum2\fR\fB)\fR +\fBif\fR \fIchksum1\fR \fB==\fR \fIchksum2\fR\fB:\fR +\fBif\fR \fIchksum1\fR \fB==\fR \fIchksum2\fR +.fi +.if n \{\ +.RE +.\} +.sp +Checksums are equal if they are of the same type and the finalized results are the same\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fB\fR +my \fI$str\fR \fB=\fR \fI$chksum\fR\fB\->str\fR; +\fIstr\fR \fB= str(\fR\fIchksum\fR\fB)\fR +\fIstr\fR \fB=\fR \fIchksum\fR\fB\&.to_s\fR +.fi +.if n \{\ +.RE +.\} +.sp +If the checksum is finished, the checksum is returned as ":" string\&. Otherwise ":unfinished" is returned\&. +.SH "FILE MANAGEMENT" +.sp +This functions were added because libsolv uses standard \fBFILE\fR pointers to read/write files, but languages like perl have their own implementation of files\&. The libsolv functions also support decompression and compression, the algorithm is selected by looking at the file name extension\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBFILE *xfopen(char *\fR\fIfn\fR\fB, char *\fR\fImode\fR \fB= "r")\fR +my \fI$file\fR \fB= solv::xfopen(\fR\fI$path\fR\fB)\fR; +\fIfile\fR \fB= solv\&.xfopen(\fR\fIpath\fR\fB)\fR +\fIfile\fR \fB= Solv::xfopen(\fR\fIpath\fR\fB)\fR +.fi +.if n \{\ +.RE +.\} +.sp +Open a file at the specified path\&. The mode argument is passed on to the stdio library\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBFILE *xfopen_fd(char *\fR\fIfn\fR\fB, int\fR \fIfileno\fR\fB)\fR +my \fI$file\fR \fB= solv::xfopen_fd(\fR\fI$path\fR\fB,\fR \fI$fileno\fR\fB)\fR; +\fIfile\fR \fB= solv\&.xfopen_fd(\fR\fIpath\fR\fB,\fR \fIfileno\fR\fB)\fR +\fIfile\fR \fB= Solv::xfopen_fd(\fR\fIpath\fR\fB,\fR \fIfileno\fR\fB)\fR +.fi +.if n \{\ +.RE +.\} +.sp +Create a file handle from the specified file descriptor\&. The path argument is only used to select the correct (de\-)compression algorithm, use an empty path if you want to make sure to read/write raw data\&. The file descriptor is dup()ed before the file handle is created\&. +.SS "METHODS" +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBint fileno()\fR +my \fI$fileno\fR \fB=\fR \fI$file\fR\fB\->fileno()\fR; +\fIfileno\fR \fB=\fR \fIfile\fR\fB\&.fileno()\fR +\fIfileno\fR \fB=\fR \fIfile\fR\fB\&.fileno()\fR +.fi +.if n \{\ +.RE +.\} +.sp +Return file file descriptor of the file\&. If the file is not open, \-1 is returned\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBvoid cloexec(bool\fR \fIstate\fR\fB)\fR +\fI$file\fR\fB\->cloexec(\fR\fI$state\fR\fB)\fR; +\fIfile\fR\fB\&.cloexec(\fR\fIstate\fR\fB)\fR +\fIfile\fR\fB\&.cloexec(\fR\fIstate\fR\fB)\fR +.fi +.if n \{\ +.RE +.\} +.sp +Set the close\-on\-exec flag of the file descriptor\&. The xfopen function returns files with close\-on\-exec turned on, so if you want to pass a file to some other process you need to call cloexec(0) before calling exec\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBint dup()\fR +my \fI$fileno\fR \fB=\fR \fI$file\fR\fB\->dup()\fR; +\fIfileno\fR \fB=\fR \fIfile\fR\fB\&.dup()\fR +\fIfileno\fR \fB=\fR \fIfile\fR\fB\&.dup()\fR +.fi +.if n \{\ +.RE +.\} +.sp +Return a copy of the descriptor of the file\&. If the file is not open, \-1 is returned\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBbool flush()\fR +\fI$file\fR\fB\->flush()\fR; +\fIfile\fR\fB\&.flush()\fR +\fIfile\fR\fB\&.flush()\fR +.fi +.if n \{\ +.RE +.\} +.sp +Flush the file\&. Returns false if there was an error\&. Flushing a closed file always returns true\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBbool close()\fR +\fI$file\fR\fB\->close()\fR; +\fIfile\fR\fB\&.close()\fR +\fIfile\fR\fB\&.close()\fR +.fi +.if n \{\ +.RE +.\} +.sp +Close the file\&. This is needed for languages like Ruby that do not destruct objects right after they are no longer referenced\&. In that case, it is good style to close open files so that the file descriptors are freed right away\&. Returns false if there was an error\&. +.SH "THE REPODATA CLASS" +.sp +The Repodata stores attributes for packages and the repository itself, each repository can have multiple repodata areas\&. You normally only need to directly access them if you implement lazy downloading of repository data\&. Repodata areas are created by calling the repository\(cqs add_repodata() method or by using repo_add methods without the REPO_REUSE_REPODATA or REPO_USE_LOADING flag\&. +.SS "ATTRIBUTES" +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBRepo *repo;\fR /* read only */ +\fI$data\fR\fB\->{repo}\fR +\fIdata\fR\fB\&.repo\fR +\fIdata\fR\fB\&.repo\fR +.fi +.if n \{\ +.RE +.\} +.sp +Back pointer to repository object\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBId id;\fR /* read only */ +\fI$data\fR\fB\->{id}\fR +\fIdata\fR\fB\&.id\fR +\fIdata\fR\fB\&.id\fR +.fi +.if n \{\ +.RE +.\} +.sp +The id of the repodata area\&. Repodata ids of different repositories overlap\&. +.SS "METHODS" +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBinternalize()\fR +\fI$data\fR\fB\->internalize()\fR; +\fIdata\fR\fB\&.internalize()\fR +\fIdata\fR\fB\&.internalize()\fR +.fi +.if n \{\ +.RE +.\} +.sp +Internalize newly added data\&. The lookup functions will only see the new data after it has been internalized\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBbool write(FILE *\fR\fIfp\fR\fB)\fR +\fI$data\fR\fB\->write(\fR\fI$fp\fR\fB)\fR; +\fIdata\fR\fB\&.write(\fR\fIfp\fR\fB)\fR +\fIdata\fR\fB\&.write(\fR\fIfp\fR\fB)\fR +.fi +.if n \{\ +.RE +.\} +.sp +Write the contents of the repodata area as solv file\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBId str2dir(const char *\fR\fIdir\fR\fB, bool\fR \fIcreate\fR \fB= 1)\fR +my \fI$did\fR \fB=\fR \fIdata\fR\fB\->str2dir(\fR\fI$dir\fR\fB)\fR; +\fIdid\fR \fB=\fR \fIdata\fR\fB\&.str2dir(\fR\fIdir\fR\fB)\fR +\fIdid\fR \fB=\fR \fIdata\fR\fB\&.str2dir(\fR\fIdir\fR\fB)\fR +.fi +.if n \{\ +.RE +.\} +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBconst char *dir2str(Id\fR \fIdid\fR\fB, const char *\fR\fIsuffix\fR \fB= 0)\fR +\fI$dir\fR \fB=\fR \fIpool\fR\fB\->dir2str(\fR\fI$did\fR\fB)\fR; +\fIdir\fR \fB=\fR \fIpool\fR\fB\&.dir2str(\fR\fIdid\fR\fB)\fR +\fIdir\fR \fB=\fR \fIpool\fR\fB\&.dir2str(\fR\fIdid\fR\fB)\fR +.fi +.if n \{\ +.RE +.\} +.sp +Convert a string (directory) into an Id and back\&. If the string is currently not in the pool and \fIcreate\fR is false, zero is returned\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBvoid add_dirstr(Id\fR \fIsolvid\fR\fB, Id\fR \fIkeyname\fR\fB, Id\fR \fIdir\fR\fB, const char *\fR\fIstr\fR\fB)\fR +\fI$data\fR\fB\->add_dirstr(\fR\fI$solvid\fR\fB,\fR \fI$keyname\fR\fB,\fR \fI$dir\fR\fB,\fR \fI$string\fR\fB)\fR; +\fIdata\fR\fB\&.add_dirstr(\fR\fIsolvid\fR\fB,\fR \fIkeyname\fR\fB,\fR \fIdir\fR\fB,\fR \fIstring\fR\fB)\fR +\fIdata\fR\fB\&.add_dirstr(\fR\fIsolvid\fR\fB,\fR \fIkeyname\fR\fB,\fR \fIdir\fR\fB,\fR \fIstring\fR\fB)\fR +.fi +.if n \{\ +.RE +.\} +.sp +Add a file path consisting of a dirname Id and a basename string\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBbool add_solv(FILE *\fR\fIfp\fR\fB, int\fR \fIflags\fR \fB= 0)\fR +\fI$data\fR\fB\->add_solv(\fR\fI$fp\fR\fB)\fR; +\fIdata\fR\fB\&.add_solv(\fR\fIfp\fR\fB)\fR +\fIdata\fR\fB\&.add_solv(\fR\fIfp\fR\fB)\fR +.fi +.if n \{\ +.RE +.\} +.sp +Replace a stub repodata object with the data from a solv file\&. This method automatically adds the REPO_USE_LOADING flag\&. It should only be used from a load callback\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBvoid create_stubs()\fR +\fI$data\fR\fB\->create_stubs()\fR; +\fIdata\fR\fB\&.create_stubs()\fR +\fIdata\fR\fB\&.create_stubs()\fR +.fi +.if n \{\ +.RE +.\} +.sp +Create stub repodatas from the information stored in the repodata meta area\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBvoid extend_to_repo()\fR +\fI$data\fR\fB\->extend_to_repo()\fR; +\fIdata\fR\fB\&.extend_to_repo()\fR +\fIdata\fR\fB\&.extend_to_repo()\fR +.fi +.if n \{\ +.RE +.\} +.sp +Extend the repodata so that it has the same size as the repo it belongs to\&. This method is needed when setting up a new extension repodata so that it matches the repository size\&. It is also needed when switching to a just written repodata extension to make the repodata match the written extension (which is always of the size of the repo)\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fB\fR +\fBif (\fR\fI$data1\fR \fB==\fR \fI$data2\fR\fB)\fR +\fBif\fR \fIdata1\fR \fB==\fR \fIdata2\fR\fB:\fR +\fBif\fR \fIdata1\fR \fB==\fR \fIdata2\fR +.fi +.if n \{\ +.RE +.\} +.sp +Two repodata objects are equal if they belong to the same repository and have the same id\&. +.SS "DATA RETRIEVAL METHODS" +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBconst char *lookup_str(Id\fR \fIsolvid\fR\fB, Id\fR \fIkeyname\fR\fB)\fR +my \fI$string\fR \fB=\fR \fI$data\fR\fB\->lookup_str(\fR\fI$solvid\fR\fB,\fR \fI$keyname\fR\fB)\fR; +\fIstring\fR \fB=\fR \fIdata\fR\fB\&.lookup_str(\fR\fIsolvid\fR\fB,\fR \fIkeyname\fR\fB)\fR +\fIstring\fR \fB=\fR \fIdata\fR\fB\&.lookup_str(\fR\fIsolvid\fR\fB,\fR \fIkeyname\fR\fB)\fR +.fi +.if n \{\ +.RE +.\} +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBconst char *lookup_id(Id\fR \fIsolvid\fR\fB, Id\fR \fIkeyname\fR\fB)\fR +my \fI$string\fR \fB=\fR \fI$data\fR\fB\->lookup_id(\fR\fI$solvid\fR\fB,\fR \fI$keyname\fR\fB)\fR; +\fIstring\fR \fB=\fR \fIdata\fR\fB\&.lookup_id(\fR\fIsolvid\fR\fB,\fR \fIkeyname\fR\fB)\fR +\fIstring\fR \fB=\fR \fIdata\fR\fB\&.lookup_id(\fR\fIsolvid\fR\fB,\fR \fIkeyname\fR\fB)\fR +.fi +.if n \{\ +.RE +.\} +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBunsigned long long lookup_num(Id\fR \fIsolvid\fR\fB, Id\fR \fIkeyname\fR\fB, unsigned long long\fR \fInotfound\fR \fB= 0)\fR +my \fI$num\fR \fB=\fR \fI$data\fR\fB\->lookup_num(\fR\fI$solvid\fR\fB,\fR \fI$keyname\fR\fB)\fR; +\fInum\fR \fB=\fR \fIdata\fR\fB\&.lookup_num(\fR\fIsolvid\fR\fB,\fR \fIkeyname\fR\fB)\fR +\fInum\fR \fB=\fR \fIdata\fR\fB\&.lookup_num(\fR\fIsolvid\fR\fB,\fR \fIkeyname\fR\fB)\fR +.fi +.if n \{\ +.RE +.\} +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBbool lookup_void(Id\fR \fIsolvid\fR\fB, Id\fR \fIkeyname\fR\fB)\fR +my \fI$bool\fR \fB=\fR \fI$data\fR\fB\->lookup_void(\fR\fI$solvid\fR\fB,\fR \fI$keyname\fR\fB)\fR; +\fIbool\fR \fB=\fR \fIdata\fR\fB\&.lookup_void(\fR\fIsolvid\fR\fB,\fR \fIkeyname\fR\fB)\fR +\fIbool\fR \fB=\fR \fIdata\fR\fB\&.lookup_void(\fR\fIsolvid\fR\fB,\fR \fIkeyname\fR\fB)\fR +.fi +.if n \{\ +.RE +.\} +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBId *lookup_idarray(Id\fR \fIsolvid\fR\fB, Id\fR \fIkeyname\fR\fB)\fR +my \fI@ids\fR \fB=\fR \fI$data\fR\fB\->lookup_idarray(\fR\fI$solvid\fR\fB,\fR \fI$keyname\fR\fB)\fR; +\fIids\fR \fB=\fR \fIdata\fR\fB\&.lookup_idarray(\fR\fIsolvid\fR\fB,\fR \fIkeyname\fR\fB)\fR +\fIids\fR \fB=\fR \fIdata\fR\fB\&.lookup_idarray(\fR\fIsolvid\fR\fB,\fR \fIkeyname\fR\fB)\fR +.fi +.if n \{\ +.RE +.\} +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBChksum lookup_checksum(Id\fR \fIsolvid\fR\fB, Id\fR \fIkeyname\fR\fB)\fR +my \fI$chksum\fR \fB=\fR \fI$data\fR\fB\->lookup_checksum(\fR\fI$solvid\fR\fB,\fR \fI$keyname\fR\fB)\fR; +\fIchksum\fR \fB=\fR \fIdata\fR\fB\&.lookup_checksum(\fR\fIsolvid\fR\fB,\fR \fIkeyname\fR\fB)\fR +\fIchksum\fR \fB=\fR \fIdata\fR\fB\&.lookup_checksum(\fR\fIsolvid\fR\fB,\fR \fIkeyname\fR\fB)\fR +.fi +.if n \{\ +.RE +.\} +.sp +Lookup functions\&. Return the data element stored in the specified solvable\&. The methods probably only make sense to retrieve data from the special SOLVID_META solvid that stores repodata meta information\&. +.SS "DATA STORAGE METHODS" +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBvoid set_str(Id\fR \fIsolvid\fR\fB, Id\fR \fIkeyname\fR\fB, const char *\fR\fIstr\fR\fB)\fR +\fI$data\fR\fB\->set_str(\fR\fI$solvid\fR\fB,\fR \fI$keyname\fR\fB,\fR \fI$str\fR\fB)\fR; +\fIdata\fR\fB\&.set_str(\fR\fIsolvid\fR\fB,\fR \fIkeyname\fR\fB,\fR \fIstr\fR\fB)\fR +\fIdata\fR\fB\&.set_str(\fR\fIsolvid\fR\fB,\fR \fIkeyname\fR\fB,\fR \fIstr\fR\fB)\fR +.fi +.if n \{\ +.RE +.\} +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBvoid set_id(Id\fR \fIsolvid\fR\fB, Id\fR \fIkeyname\fR\fB, DepId\fR \fIid\fR\fB)\fR +\fI$data\fR\fB\->set_id(\fR\fI$solvid\fR\fB,\fR \fI$keyname\fR\fB,\fR \fI$id\fR\fB)\fR; +\fIdata\fR\fB\&.set_id(\fR\fIsolvid\fR\fB,\fR \fIkeyname\fR\fB,\fR \fIid\fR\fB)\fR +\fIdata\fR\fB\&.set_id(\fR\fIsolvid\fR\fB,\fR \fIkeyname\fR\fB,\fR \fIid\fR\fB)\fR +.fi +.if n \{\ +.RE +.\} +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBvoid set_num(Id\fR \fIsolvid\fR\fB, Id\fR \fIkeyname\fR\fB, unsigned long long\fR \fInum\fR\fB)\fR +\fI$data\fR\fB\->set_num(\fR\fI$solvid\fR\fB,\fR \fI$keyname\fR\fB,\fR \fI$num\fR\fB)\fR; +\fIdata\fR\fB\&.set_num(\fR\fIsolvid\fR\fB,\fR \fIkeyname\fR\fB,\fR \fInum\fR\fB)\fR +\fIdata\fR\fB\&.set_num(\fR\fIsolvid\fR\fB,\fR \fIkeyname\fR\fB,\fR \fInum\fR\fB)\fR +.fi +.if n \{\ +.RE +.\} +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBvoid set_void(Id\fR \fIsolvid\fR\fB, Id\fR \fIkeyname\fR\fB)\fR +\fI$data\fR\fB\->set_void(\fR\fI$solvid\fR\fB,\fR \fI$keyname\fR\fB)\fR; +\fIdata\fR\fB\&.set_void(\fR\fIsolvid\fR\fB,\fR \fIkeyname\fR\fB)\fR +\fIdata\fR\fB\&.set_void(\fR\fIsolvid\fR\fB,\fR \fIkeyname\fR\fB)\fR +.fi +.if n \{\ +.RE +.\} +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBvoid set_poolstr(Id\fR \fIsolvid\fR\fB, Id\fR \fIkeyname\fR\fB, const char *\fR\fIstr\fR\fB)\fR +\fI$data\fR\fB\->set_poolstr(\fR\fI$solvid\fR\fB,\fR \fI$keyname\fR\fB,\fR \fI$str\fR\fB)\fR; +\fIdata\fR\fB\&.set_poolstr(\fR\fIsolvid\fR\fB,\fR \fIkeyname\fR\fB,\fR \fIstr\fR\fB)\fR +\fIdata\fR\fB\&.set_poolstr(\fR\fIsolvid\fR\fB,\fR \fIkeyname\fR\fB,\fR \fIstr\fR\fB)\fR +.fi +.if n \{\ +.RE +.\} +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBvoid set_checksum(Id\fR \fIsolvid\fR\fB, Id\fR \fIkeyname\fR\fB, Chksum *\fR\fIchksum\fR\fB)\fR +\fI$data\fR\fB\->set_checksum(\fR\fI$solvid\fR\fB,\fR \fI$keyname\fR\fB,\fR \fI$chksum\fR\fB)\fR; +\fIdata\fR\fB\&.set_checksum(\fR\fIsolvid\fR\fB,\fR \fIkeyname\fR\fB,\fR \fIchksum\fR\fB)\fR +\fIdata\fR\fB\&.set_checksum(\fR\fIsolvid\fR\fB,\fR \fIkeyname\fR\fB,\fR \fIchksum\fR\fB)\fR +.fi +.if n \{\ +.RE +.\} +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBvoid set_sourcepkg(Id\fR \fIsolvid\fR\fB, const char *\fR\fIsourcepkg\fR\fB)\fR +\fI$data\fR\fB\&.set_sourcepkg(\fR\fI$solvid\fR\fB,\fR \fI$sourcepkg\fR\fB)\fR; +\fIdata\fR\fB\&.set_sourcepkg(\fR\fIsolvid\fR\fB,\fR \fIsourcepkg\fR\fB)\fR +\fIdata\fR\fB\&.set_sourcepkg(\fR\fIsolvid\fR\fB,\fR \fIsourcepkg\fR\fB)\fR +.fi +.if n \{\ +.RE +.\} +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBvoid set_location(Id\fR \fIsolvid\fR\fB, unsigned int\fR \fImediano\fR\fB, const char *\fR\fIlocation\fR\fB)\fR +\fI$data\fR\fB\&.set_location(\fR\fI$solvid\fR\fB,\fR \fI$mediano\fR\fB,\fR \fI$location\fR\fB)\fR; +\fIdata\fR\fB\&.set_location(\fR\fIsolvid\fR\fB,\fR \fImediano\fR\fB,\fR \fIlocation\fR\fB)\fR +\fIdata\fR\fB\&.set_location(\fR\fIsolvid\fR\fB,\fR \fImediano\fR\fB,\fR \fIlocation\fR\fB)\fR +.fi +.if n \{\ +.RE +.\} +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBvoid add_idarray(Id\fR \fIsolvid\fR\fB, Id\fR \fIkeyname\fR\fB, DepId\fR \fIid\fR\fB)\fR +\fI$data\fR\fB\->add_idarray(\fR\fI$solvid\fR\fB,\fR \fI$keyname\fR\fB,\fR \fI$id\fR\fB)\fR; +\fIdata\fR\fB\&.add_idarray(\fR\fIsolvid\fR\fB,\fR \fIkeyname\fR\fB,\fR \fIid\fR\fB)\fR +\fIdata\fR\fB\&.add_idarray(\fR\fIsolvid\fR\fB,\fR \fIkeyname\fR\fB,\fR \fIid\fR\fB)\fR +.fi +.if n \{\ +.RE +.\} +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBId new_handle()\fR +my \fI$handle\fR \fB=\fR \fI$data\fR\fB\->new_handle()\fR; +\fIhandle\fR \fB=\fR \fIdata\fR\fB\&.new_handle()\fR +\fIhandle\fR \fB=\fR \fIdata\fR\fB\&.new_handle()\fR +.fi +.if n \{\ +.RE +.\} +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBvoid add_flexarray(Id\fR \fIsolvid\fR\fB, Id\fR \fIkeyname\fR\fB, Id\fR \fIhandle\fR\fB)\fR +\fI$data\fR\fB\->add_flexarray(\fR\fI$solvid\fR\fB,\fR \fI$keyname\fR\fB,\fR \fI$handle\fR\fB)\fR; +\fIdata\fR\fB\&.add_flexarray(\fR\fIsolvid\fR\fB,\fR \fIkeyname\fR\fB,\fR \fIhandle\fR\fB)\fR +\fIdata\fR\fB\&.add_flexarray(\fR\fIsolvid\fR\fB,\fR \fIkeyname\fR\fB,\fR \fIhandle\fR\fB)\fR +.fi +.if n \{\ +.RE +.\} +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBvoid unset(Id\fR \fIsolvid\fR\fB, Id\fR \fIkeyname\fR\fB)\fR +\fI$data\fR\fB\->unset(\fR\fI$solvid\fR\fB,\fR \fI$keyname\fR\fB)\fR; +\fIdata\fR\fB\&.unset(\fR\fIsolvid\fR\fB,\fR \fIkeyname\fR\fB)\fR +\fIdata\fR\fB\&.unset(\fR\fIsolvid\fR\fB,\fR \fIkeyname\fR\fB)\fR +.fi +.if n \{\ +.RE +.\} +.sp +Data storage methods\&. Probably only useful to store data in the special SOLVID_META solvid that stores repodata meta information\&. Note that repodata areas can have their own Id pool (see the REPO_LOCALPOOL flag), so be careful if you need to store ids\&. Arrays are created by calling the add function for every element\&. A flexarray is an array of sub\-structures, call new_handle to create a new structure, use the handle as solvid to fill the structure with data and call add_flexarray to put the structure in an array\&. +.SH "THE DATAPOS CLASS" +.sp +Datapos objects describe a specific position in the repository data area\&. Thus they are only valid until the repository is modified in some way\&. Datapos objects can be created by the pos() and parentpos() methods of a Datamatch object or by accessing the \(lqmeta\(rq attribute of a repository\&. +.SS "ATTRIBUTES" +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBRepo *repo;\fR /* read only */ +\fI$data\fR\fB\->{repo}\fR +\fIdata\fR\fB\&.repo\fR +\fIdata\fR\fB\&.repo\fR +.fi +.if n \{\ +.RE +.\} +.sp +Back pointer to repository object\&. +.SS "METHODS" +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBDataiterator(Id\fR \fIkeyname\fR\fB, const char *\fR\fImatch\fR\fB, int\fR \fIflags\fR\fB)\fR +my \fI$di\fR \fB=\fR \fI$datapos\fR\fB\->Dataiterator(\fR\fI$keyname\fR\fB,\fR \fI$match\fR\fB,\fR \fI$flags\fR\fB)\fR; +\fIdi\fR \fB=\fR \fIdatapos\fR\fB\&.Dataiterator(\fR\fIkeyname\fR\fB,\fR \fImatch\fR\fB,\fR \fIflags\fR\fB)\fR +\fIdi\fR \fB=\fR \fIdatapos\fR\fB\&.Dataiterator(\fR\fIkeyname\fR\fB,\fR \fImatch\fR\fB,\fR \fIflags\fR\fB)\fR +.fi +.if n \{\ +.RE +.\} +.sp +Create a Dataiterator at the position of the datapos object\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBconst char *lookup_deltalocation(unsigned int *\fR\fIOUTPUT\fR\fB)\fR +my \fB(\fR\fI$location\fR\fB,\fR \fI$mediano\fR\fB) =\fR \fI$datapos\fR\fB\->lookup_deltalocation()\fR; +\fIlocation\fR\fB,\fR \fImediano\fR \fB=\fR \fIdatapos\fR\fB\&.lookup_deltalocation()\fR +\fIlocation\fR\fB,\fR \fImediano\fR \fB=\fR \fIdatapos\fR\fB\&.lookup_deltalocation()\fR +.fi +.if n \{\ +.RE +.\} +.sp +Return a tuple containing the on\-media location and an optional media number for a delta rpm\&. This obviously only works if the data position points to structure describing a delta rpm\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBconst char *lookup_deltaseq()\fR +my \fI$seq\fR \fB=\fR \fI$datapos\fR\fB\->lookup_deltaseq()\fR; +\fIseq\fR \fB=\fR \fIdatapos\fR\fB\&.lookup_deltaseq()\fR; +\fIseq\fR \fB=\fR \fIdatapos\fR\fB\&.lookup_deltaseq()\fR; +.fi +.if n \{\ +.RE +.\} +.sp +Return the delta rpm sequence from the structure describing a delta rpm\&. +.SS "DATA RETRIEVAL METHODS" +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBconst char *lookup_str(Id\fR \fIkeyname\fR\fB)\fR +my \fI$string\fR \fB=\fR \fI$datapos\fR\fB\->lookup_str(\fR\fI$keyname\fR\fB)\fR; +\fIstring\fR \fB=\fR \fIdatapos\fR\fB\&.lookup_str(\fR\fIkeyname\fR\fB)\fR +\fIstring\fR \fB=\fR \fIdatapos\fR\fB\&.lookup_str(\fR\fIkeyname\fR\fB)\fR +.fi +.if n \{\ +.RE +.\} +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBId lookup_id(Id\fR \fIsolvid\fR\fB, Id\fR \fIkeyname\fR\fB)\fR +my \fI$id\fR \fB=\fR \fI$datapos\fR\fB\->lookup_id(\fR\fI$keyname\fR\fB)\fR; +\fIid\fR \fB=\fR \fIdatapos\fR\fB\&.lookup_id(\fR\fIkeyname\fR\fB)\fR +\fIid\fR \fB=\fR \fIdatapos\fR\fB\&.lookup_id(\fR\fIkeyname\fR\fB)\fR +.fi +.if n \{\ +.RE +.\} +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBunsigned long long lookup_num(Id\fR \fIkeyname\fR\fB, unsigned long long\fR \fInotfound\fR \fB= 0)\fR +my \fI$num\fR \fB=\fR \fI$datapos\fR\fB\->lookup_num(\fR\fI$keyname\fR\fB)\fR; +\fInum\fR \fB=\fR \fIdatapos\fR\fB\&.lookup_num(\fR\fIkeyname\fR\fB)\fR +\fInum\fR \fB=\fR \fIdatapos\fR\fB\&.lookup_num(\fR\fIkeyname\fR\fB)\fR +.fi +.if n \{\ +.RE +.\} +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBbool lookup_void(Id\fR \fIkeyname\fR\fB)\fR +my \fI$bool\fR \fB=\fR \fI$datapos\fR\fB\->lookup_void(\fR\fI$keyname\fR\fB)\fR; +\fIbool\fR \fB=\fR \fIdatapos\fR\fB\&.lookup_void(\fR\fIkeyname\fR\fB)\fR +\fIbool\fR \fB=\fR \fIdatapos\fR\fB\&.lookup_void(\fR\fIkeyname\fR\fB)\fR +.fi +.if n \{\ +.RE +.\} +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBId *lookup_idarray(Id\fR \fIkeyname\fR\fB)\fR +my \fI@ids\fR \fB=\fR \fI$datapos\fR\fB\->lookup_idarray(\fR\fI$keyname\fR\fB)\fR; +\fIids\fR \fB=\fR \fIdatapos\fR\fB\&.lookup_idarray(\fR\fIkeyname\fR\fB)\fR +\fIids\fR \fB=\fR \fIdatapos\fR\fB\&.lookup_idarray(\fR\fIkeyname\fR\fB)\fR +.fi +.if n \{\ +.RE +.\} +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBChksum lookup_checksum(Id\fR \fIkeyname\fR\fB)\fR +my \fI$chksum\fR \fB=\fR \fI$datapos\fR\fB\->lookup_checksum(\fR\fI$keyname\fR\fB)\fR; +\fIchksum\fR \fB=\fR \fIdatapos\fR\fB\&.lookup_checksum(\fR\fIkeyname\fR\fB)\fR +\fIchksum\fR \fB=\fR \fIdatapos\fR\fB\&.lookup_checksum(\fR\fIkeyname\fR\fB)\fR +.fi +.if n \{\ +.RE +.\} +.sp +Lookup functions\&. Note that the returned Ids are always translated into the Ids of the global pool even if the repodata area contains its own pool\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBDataiterator Dataiterator(Id\fR \fIkeyname\fR\fB, const char *\fR\fImatch\fR \fB= 0, int\fR \fIflags\fR \fB= 0)\fR +my \fI$di\fR \fB=\fR \fI$datapos\fR\fB\->Dataiterator(\fR\fI$keyname\fR\fB,\fR \fI$match\fR\fB,\fR \fI$flags\fR\fB)\fR; +\fIdi\fR \fB=\fR \fIdatapos\fR\fB\&.Dataiterator(\fR\fIkeyname\fR\fB,\fR \fImatch\fR\fB,\fR \fIflags\fR\fB)\fR +\fIdi\fR \fB=\fR \fIdatapos\fR\fB\&.Dataiterator(\fR\fIkeyname\fR\fB,\fR \fImatch\fR\fB,\fR \fIflags\fR\fB)\fR +.fi +.if n \{\ +.RE +.\} +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBfor my\fR \fI$d\fR \fB(\fR\fI@$di\fR\fB)\fR +\fBfor\fR \fId\fR \fBin\fR \fIdi\fR\fB:\fR +\fBfor\fR \fId\fR \fBin\fR \fIdi\fR +.fi +.if n \{\ +.RE +.\} +.sp +Iterate over the matching data elements\&. See the Dataiterator class for more information\&. +.SH "THE ALTERNATIVE CLASS" +.sp +An Alternative object describes a branch point in the solving process\&. The solver found more than one good way to fulfill a dependency and chose one\&. It recorded the other possibilities in the alternative object so that they can be presented to the user in the case a different solution is preferable\&. +.SS "ATTRIBUTES" +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBSolver *solv;\fR /* read only */ +\fI$alternative\fR\fB\->{solv}\fR +\fIalternative\fR\fB\&.solv\fR +\fIalternative\fR\fB\&.solv\fR +.fi +.if n \{\ +.RE +.\} +.sp +Back pointer to solver object\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBId type;\fR /* read only */ +\fI$alternative\fR\fB\->{type}\fR +\fIalternative\fR\fB\&.type\fR +\fIalternative\fR\fB\&.type\fR +.fi +.if n \{\ +.RE +.\} +.sp +The type of the alternative\&. Alternatives can be created because of rule fulfillment, because of recommended packages, and because of suggested packages (currently unused)\&. See below for a list of valid types\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBRule rule;\fR /* read only */ +\fI$alternative\fR\fB\->{rule}\fR +\fIalternative\fR\fB\&.rule\fR +\fIalternative\fR\fB\&.rule\fR +.fi +.if n \{\ +.RE +.\} +.sp +The rule that caused the creation of the alternative (SOLVER_ALTERNATIVE_TYPE_RULE)\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBDep *dep;\fR /* read only */ +\fI$ruleinfo\fR\fB\->{dep}\fR +\fIruleinfo\fR\fB\&.dep\fR +\fIruleinfo\fR\fB\&.dep\fR +.fi +.if n \{\ +.RE +.\} +.sp +The dependency that caused the creation of the alternative (SOLVER_ALTERNATIVE_TYPE_RECOMMENDS)\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBDep *depsolvable;\fR /* read only */ +\fI$ruleinfo\fR\fB\->{depsolvable}\fR +\fIruleinfo\fR\fB\&.depsolvable\fR +\fIruleinfo\fR\fB\&.depsolvable\fR +.fi +.if n \{\ +.RE +.\} +.sp +The package containing the dependency (SOLVER_ALTERNATIVE_TYPE_RECOMMENDS)\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBSolvable chosen;\fR /* read only */ +\fI$alternative\fR\fB\->{chosen}\fR +\fIalternative\fR\fB\&.chosen\fR +\fIalternative\fR\fB\&.chosen\fR +.fi +.if n \{\ +.RE +.\} +.sp +The solvable that the solver chose from the alternative\(cqs package set\&. +.SS "CONSTANTS" +.PP +\fBSOLVER_ALTERNATIVE_TYPE_RULE\fR +.RS 4 +The alternative was created when fulfilling a rule\&. +.RE +.PP +\fBSOLVER_ALTERNATIVE_TYPE_RECOMMENDS\fR +.RS 4 +The alternative was created when fulfilling a recommends dependency\&. +.RE +.PP +\fBSOLVER_ALTERNATIVE_TYPE_SUGGESTS\fR +.RS 4 +The alternative was created when fulfilling a suggests dependency\&. +.RE +.SS "METHODS" +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBSolvable *choices()\fR +my \fI@choices\fR \fB=\fR \fI$alternative\fR\fB\->choices()\fR; +\fIchoices\fR \fB=\fR \fIalternative\fR\fB\&.choices\fR +\fIchoices\fR \fB=\fR \fIalternative\fR\fB\&.choices\fR +.fi +.if n \{\ +.RE +.\} +.sp +Return the set of solvables that the solver could choose from when creating the alternative\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fB\fR +my \fI$str\fR \fB=\fR \fI$alternative\fR\fB\->str\fR; +\fIstr\fR \fB= str(\fR\fIalternative\fR\fB)\fR +\fIstr\fR \fB=\fR \fIalternative\fR\fB\&.to_s\fR +.fi +.if n \{\ +.RE +.\} +.sp +Return a string describing the alternative\&. +.SH "THE DECISION CLASS" +.sp +A decision is created when the solver fulfills dependencies\&. It can be either to install a package to satisfy a dependency or to conflict a dependency because it conflicts with another package or its dependencies cannot be met\&. Most decisions are caused by rule processing, but there are some other types like orphaned package handling or weak dependency handling\&. +.SS "ATTRIBUTES" +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBSolver *solv;\fR /* read only */ +\fI$decision\fR\fB\->{solv}\fR +\fIdecision\fR\fB\&.solv\fR +\fIdecision\fR\fB\&.solv\fR +.fi +.if n \{\ +.RE +.\} +.sp +Back pointer to solver object\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBId p;\fR /* read only */ +\fI$decision\fR\fB\->{p}\fR +\fIdecision\fR\fB\&.p\fR +\fIdecision\fR\fB\&.p\fR +.fi +.if n \{\ +.RE +.\} +.sp +The decision package id, positive for installs and negative for conflicts\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBint reason;\fR /* read only */ +\fI$decision\fR\fB\->{reason}\fR +\fIdecision\fR\fB\&.reason\fR +\fIdecision\fR\fB\&.reason\fR +.fi +.if n \{\ +.RE +.\} +.sp +The reason for the decision\&. See the SOLVER_REASON_ constants\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBint infoid;\fR /* read only */ +\fI$decision\fR\fB\->{infoid}\fR +\fIdecision\fR\fB\&.infoid\fR +\fIdecision\fR\fB\&.infoid\fR +.fi +.if n \{\ +.RE +.\} +.sp +Extra info for the decision\&. This is the rule id for decisions caused by rule fulfillment\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBSolvable solvable;\fR /* read only */ +\fI$decision\fR\fB\->{solvable}\fR +\fIdecision\fR\fB\&.solvable\fR +\fIdecision\fR\fB\&.solvable\fR +.fi +.if n \{\ +.RE +.\} +.sp +The decision package object\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBRule rule()\fR /* read only */ +\fI$decision\fR\fB\->{rule}\fR +\fIdecision\fR\fB\&.rule\fR +\fIdecision\fR\fB\&.rule\fR +.fi +.if n \{\ +.RE +.\} +.sp +The rule object for decisions that where caused by rule fulfilment\&. +.SS "METHODS" +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBRuleinfo info()\fR +my \fI$info\fR \fB=\fR \fI$decision\fR\fB\->info()\fR; +\fIinfo\fR \fB=\fR \fIdecision\fR\fB\&.info()\fR +\fIinfo\fR \fB=\fR \fIdecision\fR\fB\&.info()\fR +.fi +.if n \{\ +.RE +.\} +.sp +Return a Ruleinfo object describing the decision\&. Some reasons like SOLVER_REASON_WEAKDEP are not caused by rules, but can be expressed by a Ruleinfo object\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBRuleinfo *allinfos()\fR +my \fI@infos\fR \fB=\fR \fI$decision\fR\fB\->allinfos()\fR; +\fIinfos\fR \fB=\fR \fIdecision\fR\fB\&.allinfos()\fR +\fIinfos\fR \fB=\fR \fIdecision\fR\fB\&.allinfos()\fR +.fi +.if n \{\ +.RE +.\} +.sp +Same as info(), but all Ruleinfo objects describing the decision are returned\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBconst char *reasonstr()\fR +my \fIstr\fR \fB=\fR \fI$decision\fR\fB\->reasonstr()\fR +\fIstr\fR \fB=\fR \fIdecision\fR\fB\&.reasonstr()\fR +\fIstr\fR \fB=\fR \fIdecision\fR\fB\&.reasonstr()\fR +.fi +.if n \{\ +.RE +.\} +.sp +Return a string describing why a decision was done (but without the decision itself)\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fB\fR +my \fI$str\fR \fB=\fR \fI$decison\fR\fB\->str\fR; +\fIstr\fR \fB= str(\fR\fIdecision\fR\fB)\fR +\fIstr\fR \fB=\fR \fIdecision\fR\fB\&.to_s\fR +.fi +.if n \{\ +.RE +.\} +.sp +Return a string describing the decision (but without the reason)\&. +.SH "THE DECISIONSET CLASS" +.sp +A decisionset consists of multiple decisions of the same reason and type that can be presented to the user as a single action\&. +.SS "ATTRIBUTES" +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBSolver *solv;\fR /* read only */ +\fI$decision\fR\fB\->{solv}\fR +\fIdecision\fR\fB\&.solv\fR +\fIdecision\fR\fB\&.solv\fR +.fi +.if n \{\ +.RE +.\} +.sp +Back pointer to solver object\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBId p;\fR /* read only */ +\fI$decision\fR\fB\->{p}\fR +\fIdecision\fR\fB\&.p\fR +\fIdecision\fR\fB\&.p\fR +.fi +.if n \{\ +.RE +.\} +.sp +The package id of the first decision, positive for installs and negative for conflicts\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBint reason;\fR /* read only */ +\fI$decision\fR\fB\->{reason}\fR +\fIdecision\fR\fB\&.reason\fR +\fIdecision\fR\fB\&.reason\fR +.fi +.if n \{\ +.RE +.\} +.sp +The reason for the decisions in the set\&. See the SOLVER_REASON_ constants\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBint type;\fR /* read only */ +\fI$ruleinfo\fR\fB\->{type}\fR +\fIruleinfo\fR\fB\&.type\fR +\fIruleinfo\fR\fB\&.type\fR +.fi +.if n \{\ +.RE +.\} +.sp +The type of the decision info\&. See the constant section of the solver class for the rule type list and the special type list\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBDep *dep;\fR /* read only */ +\fI$ruleinfo\fR\fB\->{dep}\fR +\fIruleinfo\fR\fB\&.dep\fR +\fIruleinfo\fR\fB\&.dep\fR +.fi +.if n \{\ +.RE +.\} +.sp +The dependency that caused the decision +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBDep *dep_id;\fR /* read only */ +\fI$ruleinfo\fR\fB\->{\fR\fIdep_id\fR\fB}\fR +\fIruleinfo\fR\fB\&.dep_id\fR +\fIruleinfo\fR\fB\&.dep_id\fR +.fi +.if n \{\ +.RE +.\} +.sp +The Id of the dependency that caused the decision\&. +.SS "METHODS" +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBDecision *decisions()\fR +my \fI@decisions\fR \fB=\fR \fI$decisionset\fR\fB\->decisions()\fR; +\fIdecisions\fR \fB=\fR \fIdecisionset\fR\fB\&.decisions()\fR +\fIdecisions\fR \fB=\fR \fIdecisionset\fR\fB\&.decisions()\fR +.fi +.if n \{\ +.RE +.\} +.sp +Return all the decisions of the set\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBSolvable *solvables()\fR +my \fI@pkgs\fR \fB=\fR \fI$decisionset\fR\fB\->solvables()\fR; +\fIpkgs\fR \fB=\fR \fIdecisionset\fR\fB\&.solvables()\fR +\fIpkgs\fR \fB=\fR \fIdecisionset\fR\fB\&.solvables()\fR +.fi +.if n \{\ +.RE +.\} +.sp +Return all the packages that were decided in the set\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBconst char *reasonstr()\fR +my \fIstr\fR \fB=\fR \fI$decision\fR\fB\->reasonstr()\fR; +\fIstr\fR \fB=\fR \fIdecision\fR\fB\&.reasonstr()\fR +\fIstr\fR \fB=\fR \fIdecision\fR\fB\&.reasonstr()\fR +.fi +.if n \{\ +.RE +.\} +.sp +Return a string describing why the decisions were done (but without the decisions themself)\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fB\fR +my \fI$str\fR \fB=\fR \fI$decison\fR\fB\->str\fR; +\fIstr\fR \fB= str(\fR\fIdecision\fR\fB)\fR +\fIstr\fR \fB=\fR \fIdecision\fR\fB\&.to_s\fR +.fi +.if n \{\ +.RE +.\} +.sp +Return a string describing the decisions (but without the reason)\&. +.SH "AUTHOR" +.sp +Michael Schroeder diff --git a/miniconda3/pkgs/libsolv-0.7.30-h6f1ccf3_2/share/man/man3/libsolv-constantids.3 b/miniconda3/pkgs/libsolv-0.7.30-h6f1ccf3_2/share/man/man3/libsolv-constantids.3 new file mode 100644 index 0000000000000000000000000000000000000000..8dd0ed658936ae25b310778947d95f011eee9fa2 --- /dev/null +++ b/miniconda3/pkgs/libsolv-0.7.30-h6f1ccf3_2/share/man/man3/libsolv-constantids.3 @@ -0,0 +1,906 @@ +'\" t +.\" Title: Libsolv-Constantids +.\" Author: [see the "Author" section] +.\" Generator: DocBook XSL Stylesheets vsnapshot +.\" Date: 03/02/2022 +.\" Manual: LIBSOLV +.\" Source: libsolv +.\" Language: English +.\" +.TH "LIBSOLV\-CONSTANTIDS" "3" "03/02/2022" "libsolv" "LIBSOLV" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +libsolv-constantids \- fixed Ids for often used strings +.SH "DESCRIPTION" +.sp +Constant Ids are Ids of strings that are often needed\&. They are defined to ease programming and reduce the number of pool_str2id calls\&. The constant Ids are part of the binary ABI of libsolv, a minor version update will only add new constants and not change existing Ids to maintain compatibility\&. The on\-disk solv format does not use the fixed Ids, but instead references the strings, so solv files can still be read when the ABI is broken\&. +.SH "SPECIAL STRINGS" +.PP +\fBID_EMPTY ""\fR +.RS 4 +The empty string\&. It will always have Id 1\&. +.RE +.PP +\fBSYSTEM_SYSTEM "system:system"\fR +.RS 4 +The name of the always installed "system" solvable\&. +.RE +.SH "SOLVABLE ATTRIBUTES" +.sp +These are Ids for keynames of attributes\&. They can be used in the lookup and storage functions to select the correct attribute in the solvable\&. The descriptions below describe the intended semantics of the values stored in the attribute with the keyname\&. +.PP +\fBSOLVABLE_NAME "solvable:name"\fR +.RS 4 +The name of the package\&. +.RE +.PP +\fBSOLVABLE_ARCH "solvable:arch"\fR +.RS 4 +The architecture of the package\&. See the Solvable Architecture section for predefined architecture Id values\&. +.RE +.PP +\fBSOLVABLE_EVR "solvable:evr"\fR +.RS 4 +The version of the package\&. It usually consists of some combination of the Epoch, the Version, and the Release of the solvable\&. +.RE +.PP +\fBSOLVABLE_VENDOR "solvable:vendor"\fR +.RS 4 +A vendor string\&. Usually the company or group that created the binary package\&. +.RE +.PP +\fBSOLVABLE_PROVIDES "solvable:provides"\fR +.RS 4 +Stores an array of dependency Ids that describe the capabilities that the package provides\&. +.RE +.PP +\fBSOLVABLE_OBSOLETES "solvable:obsoletes"\fR +.RS 4 +Stores an array of dependency Ids that describe the packages that this package replaces\&. +.RE +.PP +\fBSOLVABLE_CONFLICTS "solvable:conflicts"\fR +.RS 4 +Stores an array of dependency Ids that describe the capabilities that this package conflicts with, i\&.e\&. that can\(cqt be installed together with this package\&. +.RE +.PP +\fBSOLVABLE_REQUIRES "solvable:requires"\fR +.RS 4 +Stores an array of dependency Ids that describe the capabilities that also must be installed when this package is installed\&. +.RE +.PP +\fBSOLVABLE_RECOMMENDS "solvable:recommends"\fR +.RS 4 +Stores an array of dependency Ids that describe the capabilities that also should be installed when this package is installed\&. It\(cqs not an error if not all capabilities can be met\&. +.RE +.PP +\fBSOLVABLE_SUGGESTS "solvable:suggests"\fR +.RS 4 +Stores an array of dependency Ids that describe the capabilities that also useful to have installed when this package is installed\&. This is intended to provide a hint to the user about other packages\&. +.RE +.PP +\fBSOLVABLE_SUPPLEMENTS "solvable:supplements"\fR +.RS 4 +Stores an array of dependency Ids that define that this package should be installed if one of the capabilities is met\&. This is like the recommends attribute, but works in the reverse way\&. +.RE +.PP +\fBSOLVABLE_ENHANCES "solvable:enhances"\fR +.RS 4 +Stores an array of dependency Ids that define that this package is useful to have installed if one of the capabilities is met\&. This is like the suggests attribute, but works in the reverse way\&. +.RE +.PP +\fBSOLVABLE_SUMMARY "solvable:summary"\fR +.RS 4 +The summary should be a short string without any newlines that describes what a package does\&. +.RE +.PP +\fBSOLVABLE_DESCRIPTION "solvable:description"\fR +.RS 4 +The description should be a more verbose description about what a package does\&. It may consist of multiple lines\&. +.RE +.PP +\fBSOLVABLE_DISTRIBUTION "solvable:distribution"\fR +.RS 4 +The distribution is a short string that describes the OS and OS version this package is built for\&. +.RE +.PP +\fBSOLVABLE_AUTHORS "solvable:authors"\fR +.RS 4 +A list of authors of this package\&. This attribute was used in SUSE packages\&. +.RE +.PP +\fBSOLVABLE_PACKAGER "solvable:packager"\fR +.RS 4 +The person who created the binary package, see also the vendor attribute\&. +.RE +.PP +\fBSOLVABLE_GROUP "solvable:group"\fR +.RS 4 +The package group that this package belongs to\&. See also the keywords attribute\&. +.RE +.PP +\fBSOLVABLE_URL "solvable:url"\fR +.RS 4 +An URL that points to more information about the package\&. +.RE +.PP +\fBSOLVABLE_KEYWORDS "solvable:keywords"\fR +.RS 4 +list of keyword string IDs used for tagging this package\&. +.RE +.PP +\fBSOLVABLE_LICENSE "solvable:license"\fR +.RS 4 +The license(s) of this package\&. +.RE +.PP +\fBSOLVABLE_BUILDTIME "solvable:buildtime"\fR +.RS 4 +The seconds since the unix epoch when the binary package was created\&. +.RE +.PP +\fBSOLVABLE_BUILDHOST "solvable:buildhost"\fR +.RS 4 +The name of the host on which the binary package was created\&. +.RE +.PP +\fBSOLVABLE_EULA "solvable:eula"\fR +.RS 4 +If this attribute is present the user should be asked to accept the end user license agreement before the package gets installed\&. +.RE +.PP +\fBSOLVABLE_CPEID "solvable:cpeid"\fR +.RS 4 +A Common Platform Enumeration string describes the platform this package is intended for\&. See also the distribution attribute\&. +.RE +.PP +\fBSOLVABLE_MESSAGEINS "solvable:messageins"\fR +.RS 4 +A message that should be displayed to the user when the package gets installed\&. +.RE +.PP +\fBSOLVABLE_MESSAGEDEL "solvable:messagedel"\fR +.RS 4 +A message that should be displayed to the user when the package gets erased\&. +.RE +.PP +\fBSOLVABLE_INSTALLSIZE "solvable:installsize"\fR +.RS 4 +The disk space in bytes needed when installing the package\&. +.RE +.PP +\fBSOLVABLE_DISKUSAGE "solvable:diskusage"\fR +.RS 4 +A SUSE extension that stores for each directory the needed amount of disk space in kilobytes and inodes\&. +.RE +.PP +\fBSOLVABLE_FILELIST "solvable:filelist"\fR +.RS 4 +A list of files that the package contains\&. +.RE +.PP +\fBSOLVABLE_INSTALLTIME "solvable:installtime"\fR +.RS 4 +The seconds since the unix epoch when the binary package was installed on the system\&. +.RE +.PP +\fBSOLVABLE_MEDIADIR "solvable:mediadir"\fR +.RS 4 +The directory on the repository that contains the package\&. If this attribute is set to void, the package architecture is used as directory\&. +.RE +.PP +\fBSOLVABLE_MEDIAFILE "solvable:mediafile"\fR +.RS 4 +The filename on the repository that contains the package\&. If this attribute is set to void, the canonical file name of the package is used (i\&.e\&. a combination of the name, version, architecture)\&. +.RE +.PP +\fBSOLVABLE_MEDIANR "solvable:medianr"\fR +.RS 4 +The media number\&. This is an integer describing on which of a multi\-part media set this package is on\&. +.RE +.PP +\fBSOLVABLE_MEDIABASE "solvable:mediabase"\fR +.RS 4 +This attribute can be used to overwrite the repositories base url\&. +.RE +.PP +\fBSOLVABLE_DOWNLOADSIZE "solvable:downloadsize"\fR +.RS 4 +The size of the binary package in bytes\&. +.RE +.PP +\fBSOLVABLE_SOURCEARCH "solvable:sourcearch"\fR +.RS 4 +The architecture of the source package that this package belongs to\&. +.RE +.PP +\fBSOLVABLE_SOURCENAME "solvable:sourcename"\fR +.RS 4 +The name of the source package that this package belongs to\&. If set to void, the package name attribute is used instead\&. +.RE +.PP +\fBSOLVABLE_SOURCEEVR "solvable:sourceevr"\fR +.RS 4 +The version of the source package that this package belongs to\&. If set to void, the package version attribute is used instead\&. +.RE +.PP +\fBSOLVABLE_TRIGGERS "solvable:triggers"\fR +.RS 4 +A list of package triggers for this package\&. Used in the transaction ordering code\&. +.RE +.PP +\fBSOLVABLE_CHECKSUM "solvable:checksum"\fR +.RS 4 +The checksum of the binary package\&. See the Data Types section for a list of supported algorithms\&. +.RE +.PP +\fBSOLVABLE_PKGID "solvable:pkgid"\fR +.RS 4 +A string identifying a package\&. For rpm packages, this is the md5sum over the package header and the payload\&. +.RE +.PP +\fBSOLVABLE_HDRID "solvable:hdrid"\fR +.RS 4 +A string identifying a package\&. For rpm packages, this is the sha1sum over just the package header\&. +.RE +.PP +\fBSOLVABLE_LEADSIGID "solvable:leadsigid"\fR +.RS 4 +A string identifying the signature part of a package\&. For rpm packages, this is the md5sum from the start of the file up to the package header (i\&.e\&. it includes the lead, the signature header, and the padding)\&. +.RE +.PP +\fBSOLVABLE_HEADEREND "solvable:headerend"\fR +.RS 4 +The offset of the payload in rpm binary packages\&. You can use this information to download just the header if you want to display information not included in the repository metadata\&. +.RE +.PP +\fBSOLVABLE_CHANGELOG "solvable:changelog"\fR +.RS 4 +The array containing all the changelog structures\&. +.RE +.PP +\fBSOLVABLE_CHANGELOG_AUTHOR "solvable:changelog:author"\fR +.RS 4 +The author of a changelog entry\&. +.RE +.PP +\fBSOLVABLE_CHANGELOG_TIME "solvable:changelog:time"\fR +.RS 4 +The seconds since the unix epoch when the changelog entry was written\&. +.RE +.PP +\fBSOLVABLE_CHANGELOG_TEXT "solvable:changelog:text"\fR +.RS 4 +The text of a changelog entry\&. +.RE +.SH "SPECIAL SOLVABLE ATTRIBUTES" +.PP +\fBRPM_RPMDBID "rpm:dbid"\fR +.RS 4 +The rpm database id of this (installed) package\&. Usually a small integer number\&. +.RE +.PP +\fBSOLVABLE_PATCHCATEGORY "solvable:patchcategory"\fR +.RS 4 +The category field for patch solvables\&. Should be named \(lqupdate:category\(rq instead\&. +.RE +.PP +\fBUPDATE_REBOOT "update:reboot"\fR +.RS 4 +If this attribute is present the system should be rebooted after the update is installed\&. +.RE +.PP +\fBUPDATE_RESTART "update:restart"\fR +.RS 4 +If this attribute is present the software manager should be run again after the update is installed\&. +.RE +.PP +\fBUPDATE_RELOGIN "update:relogin"\fR +.RS 4 +If this attribute is present the user should log off and on again after the update is installed\&. +.RE +.PP +\fBUPDATE_MESSAGE "update:message"\fR +.RS 4 +A message that should be shown to the user to warn him about anything non\-standard\&. +.RE +.PP +\fBUPDATE_SEVERITY "update:severity"\fR +.RS 4 +The severity of the update\&. +.RE +.PP +\fBUPDATE_RIGHTS "update:rights"\fR +.RS 4 +Any legal or other rights of the update\&. +.RE +.PP +\fBUPDATE_COLLECTION "update:collection"\fR +.RS 4 +The array containing the package list of the update\&. +.RE +.PP +\fBUPDATE_COLLECTION_NAME "update:collection:name"\fR +.RS 4 +The name of the updated package\&. +.RE +.PP +\fBUPDATE_COLLECTION_EVR "update:collection:evr"\fR +.RS 4 +The version of the updated package\&. +.RE +.PP +\fBUPDATE_COLLECTION_ARCH "update:collection:arch"\fR +.RS 4 +The architecture of the updated package\&. +.RE +.PP +\fBUPDATE_COLLECTION_FILENAME "update:collection:filename"\fR +.RS 4 +The file name of the updated package\&. +.RE +.PP +\fBUPDATE_REFERENCE "update:reference"\fR +.RS 4 +The array containing the reference list of the update\&. +.RE +.PP +\fBUPDATE_REFERENCE_TYPE "update:reference:type"\fR +.RS 4 +The type of the reference, e\&.g\&. bugzilla\&. +.RE +.PP +\fBUPDATE_REFERENCE_HREF "update:reference:href"\fR +.RS 4 +The URL of the reference\&. +.RE +.PP +\fBUPDATE_REFERENCE_ID "update:reference:id"\fR +.RS 4 +The identification string of the reference, e\&.g\&. the bug number\&. +.RE +.PP +\fBUPDATE_REFERENCE_TITLE "update:reference:title"\fR +.RS 4 +The title of the reference, e\&.g\&. the bug summary\&. +.RE +.PP +\fBPRODUCT_REFERENCEFILE "product:referencefile"\fR +.RS 4 +The basename of the product file in the package\&. +.RE +.PP +\fBPRODUCT_SHORTLABEL "product:shortlabel"\fR +.RS 4 +An identification string of the product\&. +.RE +.PP +\fBPRODUCT_DISTPRODUCT "product:distproduct"\fR +.RS 4 +Obsolete, do not use\&. Was a SUSE Code\-10 product name\&. +.RE +.PP +\fBPRODUCT_DISTVERSION "product:distversion"\fR +.RS 4 +Obsolete, do not use\&. Was a SUSE Code\-10 product version\&. +.RE +.PP +\fBPRODUCT_TYPE "product:type"\fR +.RS 4 +The type of the product, e\&.g\&. \(lqbase\(rq\&. +.RE +.PP +\fBPRODUCT_URL "product:url"\fR +.RS 4 +An array of product URLs\&. +.RE +.PP +\fBPRODUCT_URL_TYPE "product:url:type"\fR +.RS 4 +An array of product URL types\&. +.RE +.PP +\fBPRODUCT_FLAGS "product:flags"\fR +.RS 4 +An array of product flags\&. +.RE +.PP +\fBPRODUCT_PRODUCTLINE "product:productline"\fR +.RS 4 +A product line string used for product registering\&. +.RE +.PP +\fBPRODUCT_REGISTER_TARGET "product:regtarget"\fR +.RS 4 +A target for product registering\&. +.RE +.PP +\fBPRODUCT_REGISTER_RELEASE "product:regrelease"\fR +.RS 4 +A release string for product registering\&. +.RE +.PP +\fBPUBKEY_KEYID "pubkey:keyid"\fR +.RS 4 +The keyid of a pubkey, consisting of 8 bytes in hex\&. +.RE +.PP +\fBPUBKEY_FINGERPRINT "pubkey:fingerprint"\fR +.RS 4 +The fingerprint of a pubkey, usually a sha1sum in hex\&. Old V3 RSA keys use a md5sum instead\&. +.RE +.PP +\fBPUBKEY_EXPIRES "pubkey:expires"\fR +.RS 4 +The seconds since the unix epoch when the pubkey expires\&. +.RE +.PP +\fBPUBKEY_SUBKEYOF "pubkey:subkeyof"\fR +.RS 4 +The keyid of the master pubkey for subkeys\&. +.RE +.PP +\fBPUBKEY_DATA "pubkey:data"\fR +.RS 4 +The MPI data of the pubkey\&. +.RE +.PP +\fBSOLVABLE_ISVISIBLE "solvable:isvisible"\fR +.RS 4 +An attribute describing if the package should be listed to the user or not\&. Used for SUSE patterns\&. +.RE +.PP +\fBSOLVABLE_CATEGORY "solvable:category"\fR +.RS 4 +The category of a pattern\&. +.RE +.PP +\fBSOLVABLE_INCLUDES "solvable:includes"\fR +.RS 4 +A list of other patterns that this pattern includes\&. +.RE +.PP +\fBSOLVABLE_EXTENDS "solvable:extends"\fR +.RS 4 +A list of other patterns that this pattern extends\&. +.RE +.PP +\fBSOLVABLE_ICON "solvable:icon"\fR +.RS 4 +The icon name of a pattern\&. +.RE +.PP +\fBSOLVABLE_ORDER "solvable:order"\fR +.RS 4 +An ordering clue of a pattern\&. +.RE +.PP +\fBSUSETAGS_SHARE_NAME "susetags:share:name"\fR +.RS 4 +Internal attribute to implement susetags shared records\&. Holds the name of the solvable used for sharing attributes\&. +.RE +.PP +\fBSUSETAGS_SHARE_EVR "susetags:share:evr"\fR +.RS 4 +Internal attribute to implement susetags shared records\&. Holds the version of the solvable used for sharing attributes\&. +.RE +.PP +\fBSUSETAGS_SHARE_ARCH "susetags:share:arch"\fR +.RS 4 +Internal attribute to implement susetags shared records\&. Holds the architecture of the solvable used for sharing attributes\&. +.RE +.SH "SOLVABLE ARCHITECTURES" +.sp +Predefined architecture values for commonly used architectures\&. +.PP +\fBARCH_SRC "src"\fR +.RS 4 +Used for binary packages that contain the package sources\&. +.RE +.PP +\fBARCH_NOSRC "nosrc"\fR +.RS 4 +Used for binary packages that contain some of the package sources, but not all files (because of restrictions)\&. +.RE +.PP +\fBARCH_NOARCH "noarch"\fR +.RS 4 +This package can be installed on any architecture\&. Used for rpm\&. +.RE +.PP +\fBARCH_ALL "all"\fR +.RS 4 +This package can be installed on any architecture\&. Used for Debian\&. +.RE +.PP +\fBARCH_ANY "any"\fR +.RS 4 +This package can be installed on any architecture\&. Used for Archlinux and Haiku\&. +.RE +.SH "DEPENDENCY IDS" +.sp +Namespaces are special modifiers that change the meaning of a dependency\&. Namespace dependencies are created with the REL_NAMESPACE flag\&. To make custom namespaces work you have to implement a namespace callback function\&. +.sp +The dependency markers partition the dependency array in two parts with different semantics\&. +.PP +\fBNAMESPACE_MODALIAS "namespace:modalias"\fR +.RS 4 +The dependency is a special modalias dependency that matches installed hardware\&. +.RE +.PP +\fBNAMESPACE_SPLITPROVIDES "namespace:splitprovides"\fR +.RS 4 +The dependency is a special splitprovides dependency used to implement updates that include a package split\&. A splitprovides dependency contains a filename and a package name, it is matched if a package with the provided package name is installed that contains the filename\&. This namespace is implemented in libsolv, so you do not need a callback\&. +.RE +.PP +\fBNAMESPACE_LANGUAGE "namespace:language"\fR +.RS 4 +The dependency describes a language\&. The callback should return true if the language was selected by the user\&. +.RE +.PP +\fBNAMESPACE_FILESYSTEM "namespace:filesystem"\fR +.RS 4 +The dependency describes a filesystem\&. The callback should return true if the filesystem is needed\&. +.RE +.PP +\fBNAMESPACE_OTHERPROVIDERS "namespace:otherproviders"\fR +.RS 4 +This is a hack to allow self\-conflicting packages\&. It is not needed with current rpm version, so do not use this namespace\&. +.RE +.PP +\fBSOLVABLE_PREREQMARKER "solvable:prereqmarker"\fR +.RS 4 +This marker partitions the normal require dependencies from the prerequires\&. It is not needed for dependency solving, but it is used by the transaction ordering algorithm when a dependency cycle needs to be broken (non\-prereq deps get broken first)\&. +.RE +.PP +\fBSOLVABLE_FILEMARKER "solvable:filemarker"\fR +.RS 4 +This marker partitions the package provides dependencies from the synthetic file provides dependencies added by pool_addfileprovides()\&. +.RE +.SH "DATA TYPES" +.sp +Each attribute data is stored with a type, so that the lookup functions know how to interpret the data\&. The following types are available: +.PP +\fBREPOKEY_TYPE_VOID "repokey:type:void"\fR +.RS 4 +No data is stored with this attribute\&. Thus you can only test if the attribute exists or not\&. Useful to store boolean values\&. +.RE +.PP +\fBREPOKEY_TYPE_CONSTANT "repokey:type:constant"\fR +.RS 4 +The data is a constant 32bit number\&. The number is stored in the key area, so using it does not cost extra storage space (but you need the extra key space)\&. +.RE +.PP +\fBREPOKEY_TYPE_CONSTANTID "repokey:type:constantid"\fR +.RS 4 +The data is a constant Id\&. The Id is stored in the key area, so using it does not cost extra storage space (but you need the extra key space)\&. +.RE +.PP +\fBREPOKEY_TYPE_ID "repokey:type:id"\fR +.RS 4 +The data is an Id\&. +.RE +.PP +\fBREPOKEY_TYPE_NUM "repokey:type:num"\fR +.RS 4 +The data is an unsigned 64bit number\&. +.RE +.PP +\fBREPOKEY_TYPE_U32 "repokey:type:num32"\fR +.RS 4 +The data is an unsigned 32bit number\&. Obsolete, do not use\&. +.RE +.PP +\fBREPOKEY_TYPE_DIR "repokey:type:dir"\fR +.RS 4 +The data is an Id of a directory\&. +.RE +.PP +\fBREPOKEY_TYPE_STR "repokey:type:str"\fR +.RS 4 +The data is a regular string\&. +.RE +.PP +\fBREPOKEY_TYPE_BINARY "repokey:type:binary"\fR +.RS 4 +The data is a binary blob\&. +.RE +.PP +\fBREPOKEY_TYPE_IDARRAY "repokey:type:idarray"\fR +.RS 4 +The data is an array of non\-zero Ids\&. +.RE +.PP +\fBREPOKEY_TYPE_REL_IDARRAY "repokey:type:relidarray"\fR +.RS 4 +The data is an array of non\-zero Ids ordered so that it needs less space\&. +.RE +.PP +\fBREPOKEY_TYPE_DIRSTRARRAY "repokey:type:dirstrarray"\fR +.RS 4 +The data is a tuple consisting of a directory Id and a basename\&. Used to store file names\&. +.RE +.PP +\fBREPOKEY_TYPE_DIRNUMNUMARRAY "repokey:type:dirnumnumarray"\fR +.RS 4 +The data is a triple consisting of a directory Id and two 32bit unsigned integers\&. Used to store disk usage information\&. +.RE +.PP +\fBREPOKEY_TYPE_MD5 "repokey:type:md5"\fR +.RS 4 +The data is a binary md5sum\&. +.RE +.PP +\fBREPOKEY_TYPE_SHA1 "repokey:type:sha1"\fR +.RS 4 +The data is a binary sha1sum\&. +.RE +.PP +\fBREPOKEY_TYPE_SHA256 "repokey:type:sha256"\fR +.RS 4 +The data is a binary sha256sum\&. +.RE +.PP +\fBREPOKEY_TYPE_FIXARRAY "repokey:type:fixarray"\fR +.RS 4 +The data is an array of structures that have all the same layout (i\&.e\&. the same keynames and keytypes in the same order)\&. +.RE +.PP +\fBREPOKEY_TYPE_FLEXARRAY "repokey:type:flexarray"\fR +.RS 4 +The data is an array of structures that have a different layout\&. +.RE +.PP +\fBREPOKEY_TYPE_DELETED "repokey:type:deleted"\fR +.RS 4 +The data does not exist\&. Used to mark an attribute that was deleted\&. +.RE +.SH "REPOSITORY METADATA" +.sp +This attributes contain meta information about the repository\&. +.PP +\fBREPOSITORY_SOLVABLES "repository:solvables"\fR +.RS 4 +This attribute holds the array including all of the solvables\&. It is only used in the on\-disk solv files, internally the solvables are stored in the pool\(cqs solvable array for fast access\&. +.RE +.PP +\fBREPOSITORY_DELTAINFO "repository:deltainfo"\fR +.RS 4 +This attribute holds the array including all of the delta packages\&. +.RE +.PP +\fBREPOSITORY_EXTERNAL "repository:external"\fR +.RS 4 +This attribute holds the array including all of the data to construct stub repodata areas to support on\-demand loading of metadata\&. +.RE +.PP +\fBREPOSITORY_KEYS "repository:keys"\fR +.RS 4 +This should really be named "repository:external:keys", it contains an array if Ids that consists of (keyname, keytype) pairs that describe the keys of the stub\&. +.RE +.PP +\fBREPOSITORY_LOCATION "repository:location"\fR +.RS 4 +This is used to provide a file name in the stub\&. +.RE +.PP +\fBREPOSITORY_ADDEDFILEPROVIDES "repository:addedfileprovides"\fR +.RS 4 +This attribute holds an array of filename Ids, that tell the library, that all of the Ids were already added to the solvable provides\&. +.RE +.PP +\fBREPOSITORY_RPMDBCOOKIE "repository:rpmdbcookie"\fR +.RS 4 +An attribute that stores a sha256sum over the file stats of the Packages database\&. It\(cqs used to detect rebuilds of the database, as in that case the database Ids of every package are newly distributed\&. +.RE +.PP +\fBREPOSITORY_TIMESTAMP "repository:timestamp"\fR +.RS 4 +The seconds since the unix epoch when the repository was created\&. +.RE +.PP +\fBREPOSITORY_EXPIRE "repository:expire"\fR +.RS 4 +The seconds after the timestamp when the repository will expire\&. +.RE +.PP +\fBREPOSITORY_UPDATES "repository:updates"\fR +.RS 4 +An array of structures describing what this repository updates\&. +.RE +.PP +\fBREPOSITORY_DISTROS "repository:distros"\fR +.RS 4 +Also an array of structures describing what this repository updates\&. Seems to be the newer name of REPOSITORY_UPDATES\&. +.RE +.PP +\fBREPOSITORY_PRODUCT_LABEL "repository:product:label"\fR +.RS 4 +Should really be called "repository:updates:label"\&. What distribution is updated with this repository\&. +.RE +.PP +\fBREPOSITORY_PRODUCT_CPEID "repository:product:cpeid"\fR +.RS 4 +The cpeid of the platform updated by this repository\&. Is both used in REPOSITORY_UPDATES and REPOSITORY_DISTROS to maximize confusion\&. +.RE +.PP +\fBREPOSITORY_REPOID "repository:repoid"\fR +.RS 4 +An array of Id strings describing keywords/tags about the repository itself\&. +.RE +.PP +\fBREPOSITORY_KEYWORDS "repository:keywords"\fR +.RS 4 +An array of Id strings describing keywords/tags about the content of the repository\&. +.RE +.PP +\fBREPOSITORY_REVISION "repository:revision"\fR +.RS 4 +An arbitrary string describing the revision of the repository\&. +.RE +.PP +\fBREPOSITORY_TOOLVERSION "repository:toolversion"\fR +.RS 4 +Some string describing somewhat the version of libsolv used to create the solv file\&. +.RE +.SH "REPOSITORY METADATA FOR SUSETAGS REPOS" +.sp +Attributes describing repository files in a susetags repository\&. \fBSUSETAGS_DATADIR "susetags:datadir"\fR:: The directory that contains the packages\&. +.PP +\fBSUSETAGS_DESCRDIR "susetags:descrdir"\fR +.RS 4 +The directory that contains the repository file resources\&. +.RE +.PP +\fBSUSETAGS_DEFAULTVENDOR "susetags:defaultvendor"\fR +.RS 4 +The default vendor used when a package does not specify a vendor\&. +.RE +.PP +\fBSUSETAGS_FILE "susetags:file"\fR +.RS 4 +An array of file resources of the repository\&. +.RE +.PP +\fBSUSETAGS_FILE_NAME "susetags:file:name"\fR +.RS 4 +The filename of the resource\&. +.RE +.PP +\fBSUSETAGS_FILE_TYPE "susetags:file:type"\fR +.RS 4 +The type of the resource, e\&.g\&. \(lqMETA\(rq\&. +.RE +.PP +\fBSUSETAGS_FILE_CHECKSUM "susetags:file:checksum"\fR +.RS 4 +The file checksum of the resource\&. +.RE +.SH "REPOSITORY METADATA FOR RPMMD REPOS" +.PP +\fBREPOSITORY_REPOMD "repository:repomd"\fR +.RS 4 +An array of file resources of the repository\&. +.RE +.PP +\fBREPOSITORY_REPOMD_TYPE "repository:repomd:type"\fR +.RS 4 +The type of the resource, e\&.g\&. \(lqprimary\(rq\&. +.RE +.PP +\fBREPOSITORY_REPOMD_LOCATION "repository:repomd:location"\fR +.RS 4 +The location (aka filename) of the resource +.RE +.PP +\fBREPOSITORY_REPOMD_TIMESTAMP "repository:repomd:timestamp"\fR +.RS 4 +The seconds since the unix epoch when the resource was created\&. +.RE +.PP +\fBREPOSITORY_REPOMD_CHECKSUM "repository:repomd:checksum"\fR +.RS 4 +The file checksum of the resource\&. +.RE +.PP +\fBREPOSITORY_REPOMD_OPENCHECKSUM "repository:repomd:openchecksum"\fR +.RS 4 +The checksum over the uncompressed contents of the resource\&. +.RE +.PP +\fBREPOSITORY_REPOMD_SIZE "repository:repomd:size"\fR +.RS 4 +The size of the resource file\&. +.RE +.SH "DELTA PACKAGE ATTRIBUTES" +.PP +\fBDELTA_PACKAGE_NAME "delta:pkgname"\fR +.RS 4 +The target package name for the delta package\&. Applying the delta will recreate the target package\&. +.RE +.PP +\fBDELTA_PACKAGE_EVR "delta:pkgevr"\fR +.RS 4 +The version of the target package\&. +.RE +.PP +\fBDELTA_PACKAGE_ARCH "delta:pkgarch"\fR +.RS 4 +The architecture of the target package\&. +.RE +.PP +\fBDELTA_LOCATION_DIR "delta:locdir"\fR +.RS 4 +The directory in the repository that contains the delta package\&. +.RE +.PP +\fBDELTA_LOCATION_NAME "delta:locname"\fR +.RS 4 +The first part of the file name of the delta package\&. +.RE +.PP +\fBDELTA_LOCATION_EVR "delta:locevr"\fR +.RS 4 +The version part of the file name of the delta package\&. +.RE +.PP +\fBDELTA_LOCATION_SUFFIX "delta:locsuffix"\fR +.RS 4 +The suffix part of the file name of the delta package\&. +.RE +.PP +\fBDELTA_LOCATION_BASE "delta:locbase"\fR +.RS 4 +This attribute can be used to overwrite the repositories base url for the delta\&. +.RE +.PP +\fBDELTA_DOWNLOADSIZE "delta:downloadsize"\fR +.RS 4 +The size of the delta rpm file\&. +.RE +.PP +\fBDELTA_CHECKSUM "delta:checksum"\fR +.RS 4 +The checksum of the delta rpm file\&. +.RE +.PP +\fBDELTA_BASE_EVR "delta:baseevr"\fR +.RS 4 +The version of the package the delta was built against\&. +.RE +.PP +\fBDELTA_SEQ_NAME "delta:seqname"\fR +.RS 4 +The first part of the delta sequence, the base package name\&. +.RE +.PP +\fBDELTA_SEQ_EVR "delta:seqevr"\fR +.RS 4 +The evr part of the delta sequence, the base package evr\&. Identical to the DELTA_BASE_EVR attribute\&. +.RE +.PP +\fBDELTA_SEQ_NUM "delta:seqnum"\fR +.RS 4 +The last part of the delta sequence, the content selection string\&. +.RE +.SH "AUTHOR" +.sp +Michael Schroeder diff --git a/miniconda3/pkgs/libsolv-0.7.30-h6f1ccf3_2/share/man/man3/libsolv-history.3 b/miniconda3/pkgs/libsolv-0.7.30-h6f1ccf3_2/share/man/man3/libsolv-history.3 new file mode 100644 index 0000000000000000000000000000000000000000..9ccec7ec63ff55c58da761092d27695534ede521 --- /dev/null +++ b/miniconda3/pkgs/libsolv-0.7.30-h6f1ccf3_2/share/man/man3/libsolv-history.3 @@ -0,0 +1,119 @@ +'\" t +.\" Title: Libsolv-History +.\" Author: [see the "Author" section] +.\" Generator: DocBook XSL Stylesheets vsnapshot +.\" Date: 03/02/2022 +.\" Manual: LIBSOLV +.\" Source: libsolv +.\" Language: English +.\" +.TH "LIBSOLV\-HISTORY" "3" "03/02/2022" "libsolv" "LIBSOLV" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +libsolv-history \- how the libsolv library came into existence +.SH "HISTORY" +.sp +This project was started in May 2007 when the zypp folks decided to switch to a database to speed up installation\&. As I am not a big fan of databases, I (mls) wondered if there would be really some merit of using one for solving, as package dependencies of all packages have to be read in anyway\&. +.sp +Back in 2002, I researched that using a dictionary approach for storing dependencies can reduce the packages file to 1/3 of its size\&. Extending this idea a bit more, I decided to store all strings and relations as unique 32\-bit numbers\&. This has three big advantages: +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +because of the unification, testing whether two strings are equal is the same as testing the equality of two numbers, thus very fast +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +much space is saved, as numbers do not take up as much space as strings the internal memory representation does not take more space on a 64\-bit system where a pointer is twice the size of a 32\-bit number +.RE +.sp +Thus, the solv format was created, which stores a repository as a string dictionary, a relation dictionary and then all packages dependencies\&. Tests showed that reading and merging multiple solv repositories takes just some milliseconds\&. +.SS "Early solver experiments" +.sp +Having a new repository format was one big step, but the other area where libzypp needed improvement was the solver\&. Libzypp\(cqs solver was a port from the Red Carpet solver, which was written to update packages in an already installed system\&. Using it for the complete installation progress brought it to its limits\&. Also, the added extensions like support for weak dependencies and patches made it fragile and unpredictable\&. +.sp +As I was not very pleased with the way the solver worked, I looked at other solver algorithms\&. I checked smart, yum and apt, but could not find a convincing algorithm\&. My own experiments also were not very convincing, they worked fine for some problems but failed miserably for other corner cases\&. +.SS "Using SAT for solving" +.sp +SUSE\(cqs hack week at the end of June 2007 turned out to be a turning point for the solver\&. Googling for solver algorithms, I stumbled over some note saying that some people are trying to use SAT algorithms to improve solving on Debian\&. Looking at the SAT entry in Wikipedia, it was easy to see that this indeed was the missing piece: SAT algorithms are well researched and there are quite some open source implementations\&. I decided to look at the minisat code, as it is one of the fastest solvers while consisting of not too many lines of code\&. +.sp +Of course, directly using minisat would not work, as a package solver does not need to find just one correct solution, but it also has to optimize some metrics, i\&.e\&. keep as many packages installed as possible\&. Thus, I needed to write my own solver, incorporating the ideas and algorithms used in minisat\&. This wasn\(cqt very hard, and at the end of the hack week the solver calculated the first right solutions\&. +.SS "Selling it to libzypp" +.sp +With those encouraging results, I went to Klaus Kaempf, the system management architect at SUSE\&. We spoke about how to convince the team to make libzypp switch to the new solver\&. Fortunately, libzypp comes with a plethora of solver test cases, so we decided to make the solver pass most of the test cases first\&. Klaus wrote a "deptestomatic" implementation to check the test cases\&. Together with Stephan Kulow, who is responsible for the openSUSE distribution, we tweaked and extended the solver until most of the test cases looked good\&. +.sp +Duncan Mac\-Vicar Prett, the team lead of the YaST team, also joined development by creating Ruby bindings for the solver\&. Later, Klaus improved the bindings and ported them to some other languages\&. +.SS "The attribute store" +.sp +The progress with the repository format and the solver attracted another hacker to the project: Michael Matz from the compiler team\&. He started with improving the repository parsers so that patches and content files also generate solvables\&. After that, he concentrated on storing all of the other metadata of the repositories that are not used for solving, like the package summaries and descriptions\&. At the end of October, a first version of this "attribute store" was checked in\&. Its design goals were: +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +space efficient storage of attributes +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +paging/on demand loading of data +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +page compression +.RE +.sp +The first version of the attribute store used a different format for storing information, we later merged this format with the solv file format\&. +.SS "libzypp integration" +.sp +Integration of the sat\-solver into libzypp also started in October 2007 by Stefan Schubert and Michael Andres from the YaST team\&. The first versions supported both the old solver and the new one by using the old repository read functions and converting the old package data in\-memory into a sat solver pool\&. Solvers could be switched with the environment variable ZYPP_SAT_SOLVER\&. The final decision to move to the new solver was made in January of 2008, first just by making the new solver the default one, later by completely throwing out the old solver code\&. This had the advantage that the internal solvable storage could also be done by using the solver pool, something Michael Matz already played with in a proof of concept implementation showing some drastic speed gains\&. The last traces of the old database code were removed in February\&. +.SH "AUTHOR" +.sp +Michael Schroeder diff --git a/miniconda3/pkgs/libsolv-0.7.30-h6f1ccf3_2/share/man/man3/libsolv-pool.3 b/miniconda3/pkgs/libsolv-0.7.30-h6f1ccf3_2/share/man/man3/libsolv-pool.3 new file mode 100644 index 0000000000000000000000000000000000000000..52ae62686f213b2c7e3619c27faf183afa5792ca --- /dev/null +++ b/miniconda3/pkgs/libsolv-0.7.30-h6f1ccf3_2/share/man/man3/libsolv-pool.3 @@ -0,0 +1,1337 @@ +'\" t +.\" Title: Libsolv-Pool +.\" Author: [see the "Author" section] +.\" Generator: DocBook XSL Stylesheets vsnapshot +.\" Date: 03/25/2024 +.\" Manual: LIBSOLV +.\" Source: libsolv +.\" Language: English +.\" +.TH "LIBSOLV\-POOL" "3" "03/25/2024" "libsolv" "LIBSOLV" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +libsolv-pool \- Libsolv\*(Aqs pool object +.SH "PUBLIC ATTRIBUTES" +.PP +\fBvoid *appdata\fR +.RS 4 +A no\-purpose pointer free to use for the library user\&. Freeing the pool simply discards the pointer\&. +.RE +.PP +\fBStringpool ss\fR +.RS 4 +The pool of unified strings\&. +.RE +.PP +\fBReldep *rels\fR +.RS 4 +The pool of unified relation dependencies\&. +.RE +.PP +\fBint nrels\fR +.RS 4 +Number of allocated relation dependencies\&. +.RE +.PP +\fBRepo **repos\fR +.RS 4 +The array of repository pointers, indexed by repository Id\&. +.RE +.PP +\fBint nrepos\fR +.RS 4 +Number of allocated repository array elements, i\&.e\&. the size of the repos array\&. +.RE +.PP +\fBint urepos\fR +.RS 4 +Number of used (i\&.e\&. non\-zero) repository array elements\&. +.RE +.PP +\fBRepo *installed\fR +.RS 4 +Pointer to the repo holding the installed packages\&. You are free to read this attribute, but you should use pool_set_installed() if you want to change it\&. +.RE +.PP +\fBSolvable *solvables\fR +.RS 4 +The array of Solvable objects\&. +.RE +.PP +\fBint nsolvables\fR +.RS 4 +Number of Solvable objects, i\&.e\&. the size of the solvables array\&. Note that the array may contain freed solvables, in that case the repo pointer of the solvable will be zero\&. +.RE +.PP +\fBint disttype\fR +.RS 4 +The distribution type of your system, e\&.g\&. DISTTYPE_DEB\&. You are free to read this attribute, but you should use pool_setdisttype() if you want to change it\&. +.RE +.PP +\fBId *whatprovidesdata\fR +.RS 4 +Multi\-purpose Id storage holding zero terminated arrays of Ids\&. pool_whatprovides() returns an offset into this data\&. +.RE +.PP +\fBMap *considered\fR +.RS 4 +Optional bitmap that can make the library ignore solvables\&. If a bitmap is set, only solvables that have a set bit in the bitmap at their Id are considered usable\&. +.RE +.PP +\fBint debugmask\fR +.RS 4 +A mask that defines which debug events should be reported\&. pool_setdebuglevel() sets this mask\&. +.RE +.PP +\fBDatapos pos\fR +.RS 4 +An object storing some position in the repository data\&. Functions like dataiterator_set_pos() set this object, accessing data with a pseudo solvable Id of SOLVID_POS uses it\&. +.RE +.PP +\fBQueue pooljobs\fR +.RS 4 +A queue where fixed solver jobs can be stored\&. This jobs are automatically added when solver_solve() is called, they are useful to store configuration data like which packages should be multiversion installed\&. +.RE +.SH "CREATION AND DESTRUCTION" +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBPool *pool_create()\fR; +.fi +.if n \{\ +.RE +.\} +.sp +Create a new instance of a pool\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBvoid pool_free(Pool *\fR\fIpool\fR\fB)\fR; +.fi +.if n \{\ +.RE +.\} +.sp +Free a pool and all of the data it contains, e\&.g\&. the solvables, repositories, strings\&. +.SH "DEBUGGING AND ERROR REPORTING" +.SS "Constants" +.PP +\fBSOLV_FATAL\fR +.RS 4 +Report the error and call \(lqexit(1)\(rq afterwards\&. You cannot mask this level\&. Reports to stderr instead of stdout\&. +.RE +.PP +\fBSOLV_ERROR\fR +.RS 4 +Used to report errors\&. Reports to stderr instead of stdout\&. +.RE +.PP +\fBSOLV_WARN\fR +.RS 4 +Used to report warnings\&. +.RE +.PP +\fBSOLV_DEBUG_STATS\fR +.RS 4 +Used to report statistical data\&. +.RE +.PP +\fBSOLV_DEBUG_RULE_CREATION\fR +.RS 4 +Used to report information about the solver\(cqs creation of rules\&. +.RE +.PP +\fBSOLV_DEBUG_PROPAGATE\fR +.RS 4 +Used to report information about the solver\(cqs unit rule propagation process\&. +.RE +.PP +\fBSOLV_DEBUG_ANALYZE\fR +.RS 4 +Used to report information about the solver\(cqs learnt rule generation mechanism\&. +.RE +.PP +\fBSOLV_DEBUG_UNSOLVABLE\fR +.RS 4 +Used to report information about the solver dealing with conflicting rules\&. +.RE +.PP +\fBSOLV_DEBUG_SOLUTIONS\fR +.RS 4 +Used to report information about the solver creating solutions to solve problems\&. +.RE +.PP +\fBSOLV_DEBUG_POLICY\fR +.RS 4 +Used to report information about the solver searching for an optimal solution\&. +.RE +.PP +\fBSOLV_DEBUG_RESULT\fR +.RS 4 +Used by the debug functions to output results\&. +.RE +.PP +\fBSOLV_DEBUG_JOB\fR +.RS 4 +Used to report information about the job rule generation process\&. +.RE +.PP +\fBSOLV_DEBUG_SOLVER\fR +.RS 4 +Used to report information about what the solver is currently doing\&. +.RE +.PP +\fBSOLV_DEBUG_TRANSACTION\fR +.RS 4 +Used to report information about the transaction generation and ordering process\&. +.RE +.PP +\fBSOLV_DEBUG_TO_STDERR\fR +.RS 4 +Write debug messages to stderr instead of stdout\&. +.RE +.SS "Functions" +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBvoid pool_debug(Pool *\fR\fIpool\fR\fB, int\fR \fItype\fR\fB, const char *\fR\fIformat\fR\fB, \&.\&.\&.)\fR; +.fi +.if n \{\ +.RE +.\} +.sp +Report a message of the type \fItype\fR\&. You can filter debug messages by setting a debug mask\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBvoid pool_setdebuglevel(Pool *\fR\fIpool\fR\fB, int\fR \fIlevel\fR\fB)\fR; +.fi +.if n \{\ +.RE +.\} +.sp +Set a predefined debug mask\&. A higher level generally means more bits in the mask are set, thus more messages are printed\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBvoid pool_setdebugmask(Pool *\fR\fIpool\fR\fB, int\fR \fImask\fR\fB)\fR; +.fi +.if n \{\ +.RE +.\} +.sp +Set the debug mask to filter debug messages\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBint pool_error(Pool *\fR\fIpool\fR\fB, int\fR \fIret\fR\fB, const char *\fR\fIformat\fR\fB, \&.\&.\&.)\fR; +.fi +.if n \{\ +.RE +.\} +.sp +Set the pool\(cqs error string\&. The \fIret\fR value is simply used as a return value of the function so that you can write code like return pool_error(\&...);\&. If the debug mask contains the \fBSOLV_ERROR\fR bit, pool_debug() is also called with the message and type \fBSOLV_ERROR\fR\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBextern char *pool_errstr(Pool *\fR\fIpool\fR\fB)\fR; +.fi +.if n \{\ +.RE +.\} +.sp +Return the current error string stored in the pool\&. Like with the libc\(cqs errno value, the string is only meaningful after a function returned an error\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBvoid pool_setdebugcallback(Pool *\fR\fIpool\fR\fB, void (*\fR\fIdebugcallback\fR\fB)(Pool *, void *\fR\fIdata\fR\fB, int\fR \fItype\fR\fB, const char *\fR\fIstr\fR\fB), void *\fR\fIdebugcallbackdata\fR\fB)\fR; +.fi +.if n \{\ +.RE +.\} +.sp +Set a custom debug callback function\&. Instead of writing to stdout or stderr, the callback function will be called\&. +.SH "POOL CONFIGURATION" +.SS "Constants" +.PP +\fBDISTTYPE_RPM\fR +.RS 4 +Used for systems which use rpm as low level package manager\&. +.RE +.PP +\fBDISTTYPE_DEB\fR +.RS 4 +Used for systems which use dpkg as low level package manager\&. +.RE +.PP +\fBDISTTYPE_ARCH\fR +.RS 4 +Used for systems which use the arch linux package manager\&. +.RE +.PP +\fBDISTTYPE_HAIKU\fR +.RS 4 +Used for systems which use haiku packages\&. +.RE +.PP +\fBPOOL_FLAG_PROMOTEEPOCH\fR +.RS 4 +Promote the epoch of the providing dependency to the requesting dependency if it does not contain an epoch\&. Used at some time in old rpm versions, modern systems should never need this\&. +.RE +.PP +\fBPOOL_FLAG_FORBIDSELFCONFLICTS\fR +.RS 4 +Disallow the installation of packages that conflict with themselves\&. Debian always allows self\-conflicting packages, rpm used to forbid them but switched to also allowing them recently\&. +.RE +.PP +\fBPOOL_FLAG_OBSOLETEUSESPROVIDES\fR +.RS 4 +Make obsolete type dependency match against provides instead of just the name and version of packages\&. Very old versions of rpm used the name/version, then it got switched to provides and later switched back again to just name/version\&. +.RE +.PP +\fBPOOL_FLAG_IMPLICITOBSOLETEUSESPROVIDES\fR +.RS 4 +An implicit obsoletes is the internal mechanism to remove the old package on an update\&. The default is to remove all packages with the same name, rpm\-5 switched to also removing packages providing the same name\&. +.RE +.PP +\fBPOOL_FLAG_OBSOLETEUSESCOLORS\fR +.RS 4 +Rpm\(cqs multilib implementation (used in RedHat and Fedora) distinguishes between 32bit and 64bit packages (the terminology is that they have a different color)\&. If obsoleteusescolors is set, packages with different colors will not obsolete each other\&. +.RE +.PP +\fBPOOL_FLAG_IMPLICITOBSOLETEUSESCOLORS\fR +.RS 4 +Same as POOL_FLAG_OBSOLETEUSESCOLORS, but used to find out if packages of the same name can be installed in parallel\&. For current Fedora systems, POOL_FLAG_OBSOLETEUSESCOLORS should be false and POOL_FLAG_IMPLICITOBSOLETEUSESCOLORS should be true (this is the default if FEDORA is defined when libsolv is compiled)\&. +.RE +.PP +\fBPOOL_FLAG_NOINSTALLEDOBSOLETES\fR +.RS 4 +New versions of rpm consider the obsoletes of installed packages when checking for dependency, thus you may not install a package that is obsoleted by some other installed package, unless you also erase the other package\&. +.RE +.PP +\fBPOOL_FLAG_HAVEDISTEPOCH\fR +.RS 4 +Mandriva added a new field called distepoch that gets checked in version comparison if the epoch/version/release of two packages are the same\&. +.RE +.PP +\fBPOOL_FLAG_NOOBSOLETESMULTIVERSION\fR +.RS 4 +If a package is installed in multiversionmode, rpm used to ignore both the implicit obsoletes and the obsolete dependency of a package\&. This was changed to ignoring just the implicit obsoletes, thus you may install multiple versions of the same name, but obsoleted packages still get removed\&. +.RE +.PP +\fBPOOL_FLAG_ADDFILEPROVIDESFILTERED\fR +.RS 4 +Make the addfileprovides method only add files from the standard locations (i\&.e\&. the \(lqbin\(rq and \(lqetc\(rq directories)\&. This is useful if you have only few packages that use non\-standard file dependencies, but you still want the fast speed that addfileprovides() generates\&. +.RE +.SS "Functions" +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBint pool_setdisttype(Pool *\fR\fIpool\fR\fB, int\fR \fIdisttype\fR\fB)\fR; +.fi +.if n \{\ +.RE +.\} +.sp +Set the package type of your system\&. The disttype is used for example to define package comparison semantics\&. Libsolv\(cqs default disttype should match the package manager of your system, so you only need to use this function if you want to use the library to solve packaging problems for different systems\&. The Function returns the old disttype on success, and \-1 if the new disttype is not supported\&. Note that any pool_setarch and pool_setarchpolicy calls need to come after the pool_setdisttype call, as they make use of the noarch/any/all architecture id\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBint pool_set_flag(Pool *\fR\fIpool\fR\fB, int\fR \fIflag\fR\fB, int\fR \fIvalue\fR\fB)\fR; +.fi +.if n \{\ +.RE +.\} +.sp +Set a flag to a new value\&. Returns the old value of the flag\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBint pool_get_flag(Pool *\fR\fIpool\fR\fB, int\fR \fIflag\fR\fB)\fR; +.fi +.if n \{\ +.RE +.\} +.sp +Get the value of a pool flag\&. See the constants section about the meaning of the flags\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBvoid pool_set_rootdir(Pool *\fR\fIpool\fR\fB, const char *\fR\fIrootdir\fR\fB)\fR; +.fi +.if n \{\ +.RE +.\} +.sp +Set a specific root directory\&. Some library functions support a flag that tells the function to prepend the rootdir to file and directory names\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBconst char *pool_get_rootdir(Pool *\fR\fIpool\fR\fB)\fR; +.fi +.if n \{\ +.RE +.\} +.sp +Return the current value of the root directory\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBchar *pool_prepend_rootdir(Pool *\fR\fIpool\fR\fB, const char *\fR\fIdir\fR\fB)\fR; +.fi +.if n \{\ +.RE +.\} +.sp +Prepend the root directory to the \fIdir\fR argument string\&. The returned string has been newly allocated and needs to be freed after use\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBchar *pool_prepend_rootdir_tmp(Pool *\fR\fIpool\fR\fB, const char *\fR\fIdir\fR\fB)\fR; +.fi +.if n \{\ +.RE +.\} +.sp +Same as pool_prepend_rootdir, but uses the pool\(cqs temporary space for allocation\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBvoid pool_set_installed(Pool *\fR\fIpool\fR\fB, Repo *\fR\fIrepo\fR\fB)\fR; +.fi +.if n \{\ +.RE +.\} +.sp +Set which repository should be treated as the \(lqinstalled\(rq repository, i\&.e\&. the one that holds information about the installed packages\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBvoid pool_set_languages(Pool *\fR\fIpool\fR\fB, const char **\fR\fIlanguages\fR\fB, int\fR \fInlanguages\fR\fB)\fR; +.fi +.if n \{\ +.RE +.\} +.sp +Set the language of your system\&. The library provides lookup functions that return localized strings, for example for package descriptions\&. You can set an array of languages to provide a fallback mechanism if one language is not available\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBvoid pool_setarch(Pool *\fR\fIpool\fR\fB, const char *\fR\fIarch\fR\fB)\fR; +.fi +.if n \{\ +.RE +.\} +.sp +Set the architecture of your system\&. The architecture is used to determine which packages are installable and which packages cannot be installed\&. The \fIarch\fR argument is normally the \(lqmachine\(rq value of the \(lquname\(rq system call\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBvoid pool_setarchpolicy(Pool *, const char *)\fR; +.fi +.if n \{\ +.RE +.\} +.sp +Set the architecture policy for your system\&. This is the general version of pool_setarch (in fact pool_setarch calls pool_setarchpolicy internally)\&. See the section about architecture policies for more information\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBvoid pool_addvendorclass(Pool *\fR\fIpool\fR\fB, const char **\fR\fIvendorclass\fR\fB)\fR; +.fi +.if n \{\ +.RE +.\} +.sp +Add a new vendor equivalence class to the system\&. A vendor equivalence class defines if an installed package of one vendor can be replaced by a package coming from a different vendor\&. The \fIvendorclass\fR argument must be a NULL terminated array of strings\&. See the section about vendor policies for more information\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBvoid pool_setvendorclasses(Pool *\fR\fIpool\fR\fB, const char **\fR\fIvendorclasses\fR\fB)\fR; +.fi +.if n \{\ +.RE +.\} +.sp +Set all allowed vendor equivalences\&. The vendorclasses argument must be an NULL terminated array consisting of all allowed classes concatenated\&. Each class itself must be NULL terminated, thus the last class ends with two NULL elements, one to finish the class and one to finish the list of classes\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBvoid pool_set_custom_vendorcheck(Pool *\fR\fIpool\fR\fB, int (*\fR\fIvendorcheck\fR\fB)(Pool *, Solvable *, Solvable *))\fR; +.fi +.if n \{\ +.RE +.\} +.sp +Define a custom vendor check mechanism\&. You can use this if libsolv\(cqs internal vendor equivalence class mechanism does not match your needs\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBvoid pool_setloadcallback(Pool *\fR\fIpool\fR\fB, int (*\fR\fIcb\fR\fB)(Pool *, Repodata *, void *), void *\fR\fIloadcbdata\fR\fB)\fR; +.fi +.if n \{\ +.RE +.\} +.sp +Define a callback function that gets called when repository metadata needs to be loaded on demand\&. See the section about on demand loading in the libsolv\-repodata manual\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBvoid pool_setnamespacecallback(Pool *\fR\fIpool\fR\fB, Id (*\fR\fIcb\fR\fB)(Pool *, void *,\fR \fIId\fR\fB,\fR \fIId\fR\fB), void *\fR\fInscbdata\fR\fB)\fR; +.fi +.if n \{\ +.RE +.\} +.sp +Define a callback function to implement custom namespace support\&. See the section about namespace dependencies\&. +.SH "ID POOL MANAGEMENT" +.SS "Constants" +.PP +\fBID_EMPTY\fR +.RS 4 +The Id of the empty string, it is always Id 1\&. +.RE +.PP +\fBREL_LT\fR +.RS 4 +Represents a \(lq<\(rq relation\&. +.RE +.PP +\fBREL_EQ\fR +.RS 4 +Represents a \(lq=\(rq relation\&. +.RE +.PP +\fBREL_GT\fR +.RS 4 +Represents a \(lq>\(rq relation\&. You can use combinations of REL_GT, REL_EQ, and REL_LT or\-ed together to create any relation you like\&. +.RE +.PP +\fBREL_AND\fR +.RS 4 +A boolean AND operation, the \(lqname\(rq and \(lqevr\(rq parts of the relation can be two sub\-dependencies\&. Packages must match both parts of the dependency\&. +.RE +.PP +\fBREL_OR\fR +.RS 4 +A boolean OR operation, the \(lqname\(rq and \(lqevr\(rq parts of the relation can be two sub\-dependencies\&. Packages can match any part of the dependency\&. +.RE +.PP +\fBREL_WITH\fR +.RS 4 +Like REL_AND, but packages must match both dependencies simultaneously\&. See the section about boolean dependencies about more information\&. +.RE +.PP +\fBREL_NAMESPACE\fR +.RS 4 +A special namespace relation\&. See the section about namespace dependencies for more information\&. +.RE +.PP +\fBREL_ARCH\fR +.RS 4 +An architecture filter dependency\&. The \(lqname\(rq part of the relation is a sub\-dependency, the \(lqevr\(rq part is the Id of an architecture that the matching packages must have (note that this is an exact match ignoring architecture policies)\&. +.RE +.PP +\fBREL_FILECONFLICT\fR +.RS 4 +An internal file conflict dependency used to represent file conflicts\&. See the pool_add_fileconflicts_deps() function\&. +.RE +.PP +\fBREL_COND\fR +.RS 4 +A conditional dependency, the \(lqname\(rq sub\-dependency is only considered if the \(lqevr\(rq sub\-dependency is fulfilled\&. See the section about boolean dependencies about more information\&. +.RE +.PP +\fBREL_UNLESS\fR +.RS 4 +A conditional dependency, the \(lqname\(rq sub\-dependency is only considered if the \(lqevr\(rq sub\-dependency is not fulfilled\&. See the section about boolean dependencies about more information\&. +.RE +.PP +\fBREL_COMPAT\fR +.RS 4 +A compat dependency used in Haiku to represent version ranges\&. The \(lqname\(rq part is the actual version, the \(lqevr\(rq part is the backwards compatibility version\&. +.RE +.PP +\fBREL_KIND\fR +.RS 4 +A pseudo dependency that limits the solvables to a specific kind\&. The kind is expected to be a prefix of the solvable name, e\&.g\&. \(lqpatch:foo\(rq would be of kind \(lqpatch\(rq\&. \(lqREL_KIND\(rq is only supported in the selection functions\&. +.RE +.PP +\fBREL_MULTIARCH\fR +.RS 4 +A debian multiarch annotation\&. The most common value for the \(lqevr\(rq part is \(lqany\(rq\&. +.RE +.PP +\fBREL_ELSE\fR +.RS 4 +The else part of a \(lqREL_COND\(rq or \(lqREL_UNLESS\(rq dependency\&. See the section about boolean dependencies\&. +.RE +.PP +\fBREL_ERROR\fR +.RS 4 +An illegal dependency\&. This is useful to encode dependency parse errors\&. +.RE +.SS "Functions" +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBId pool_str2id(Pool *\fR\fIpool\fR\fB, const char *\fR\fIstr\fR\fB, int\fR \fIcreate\fR\fB)\fR; +.fi +.if n \{\ +.RE +.\} +.sp +Add a string to the pool of unified strings, returning the Id of the string\&. If \fIcreate\fR is zero, new strings will not be added to the pool, instead Id 0 is returned\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBId pool_strn2id(Pool *\fR\fIpool\fR\fB, const char *\fR\fIstr\fR\fB, unsigned int\fR \fIlen\fR\fB, int\fR \fIcreate\fR\fB)\fR; +.fi +.if n \{\ +.RE +.\} +.sp +Same as pool_str2id, but only \fIlen\fR characters of the string are used\&. This can be used to add substrings to the pool\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBId pool_rel2id(Pool *\fR\fIpool\fR\fB, Id\fR \fIname\fR\fB, Id\fR \fIevr\fR\fB, int\fR \fIflags\fR\fB, int\fR \fIcreate\fR\fB)\fR; +.fi +.if n \{\ +.RE +.\} +.sp +Create a relational dependency from to other dependencies, \fIname\fR and \fIevr\fR, and a \fIflag\fR\&. See the \fBREL_\fR constants for the supported flags\&. As with pool_str2id, \fIcreate\fR defines if new dependencies will get added or Id zero will be returned instead\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBId pool_id2langid(Pool *\fR\fIpool\fR\fB, Id\fR \fIid\fR\fB, const char *\fR\fIlang\fR\fB, int\fR \fIcreate\fR\fB)\fR; +.fi +.if n \{\ +.RE +.\} +.sp +Attach a language suffix to a string Id\&. This function can be used to create language keyname Ids from keynames, it is functional equivalent to converting the \fIid\fR argument to a string, adding a \(lq:\(rq character and the \fIlang\fR argument to the string and then converting the result back into an Id\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBconst char *pool_id2str(const Pool *\fR\fIpool\fR\fB, Id\fR \fIid\fR\fB)\fR; +.fi +.if n \{\ +.RE +.\} +.sp +Convert an Id back into a string\&. If the Id is a relational Id, the \(lqname\(rq part will be converted instead\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBconst char *pool_id2rel(const Pool *\fR\fIpool\fR\fB, Id\fR \fIid\fR\fB)\fR; +.fi +.if n \{\ +.RE +.\} +.sp +Return the relation string of a relational Id\&. Returns an empty string if the passed Id is not a relation\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBconst char *pool_id2evr(const Pool *\fR\fIpool\fR\fB, Id\fR \fIid\fR\fB)\fR; +.fi +.if n \{\ +.RE +.\} +.sp +Return the \(lqevr\(rq part of a relational Id as string\&. Returns an empty string if the passed Id is not a relation\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBconst char *pool_dep2str(Pool *\fR\fIpool\fR\fB, Id\fR \fIid\fR\fB)\fR; +.fi +.if n \{\ +.RE +.\} +.sp +Convert an Id back into a string\&. If the passed Id belongs to a relation, a string representing the relation is returned\&. Note that in that case the string is allocated on the pool\(cqs temporary space\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBvoid pool_freeidhashes(Pool *\fR\fIpool\fR\fB)\fR; +.fi +.if n \{\ +.RE +.\} +.sp +Free the hashes used to unify strings and relations\&. You can use this function to save memory if you know that you will no longer create new strings and relations\&. +.SH "SOLVABLE FUNCTIONS" +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBSolvable *pool_id2solvable(const Pool *\fR\fIpool\fR\fB, Id\fR \fIp\fR\fB)\fR; +.fi +.if n \{\ +.RE +.\} +.sp +Convert a solvable Id into a pointer to the solvable data\&. Note that the pointer may become invalid if new solvables are created or old solvables deleted, because the array storing all solvables may get reallocated\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBId pool_solvable2id(const Pool *\fR\fIpool\fR\fB, Solvable *\fR\fIs\fR\fB)\fR; +.fi +.if n \{\ +.RE +.\} +.sp +Convert a pointer to the solvable data into a solvable Id\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBconst char *pool_solvid2str(Pool *\fR\fIpool\fR\fB, Id\fR \fIp\fR\fB)\fR; +.fi +.if n \{\ +.RE +.\} +.sp +Return a string representing the solvable with the Id \fIp\fR\&. The string will be some canonical representation of the solvable, usually a combination of the name, the version, and the architecture\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBconst char *pool_solvable2str(Pool *\fR\fIpool\fR\fB, Solvable *\fR\fIs\fR\fB)\fR; +.fi +.if n \{\ +.RE +.\} +.sp +Same as pool_solvid2str, but instead of the Id, a pointer to the solvable is passed\&. +.SH "DEPENDENCY MATCHING" +.SS "Constants" +.PP +\fBEVRCMP_COMPARE\fR +.RS 4 +Compare all parts of the version, treat missing parts as empty strings\&. +.RE +.PP +\fBEVRCMP_MATCH_RELEASE\fR +.RS 4 +A special mode for rpm version string matching\&. If a version misses a release part, it matches all releases\&. In that case the special values \(lq\-2\(rq and \(lq2\(rq are returned, depending on which of the two versions did not have a release part\&. +.RE +.PP +\fBEVRCMP_MATCH\fR +.RS 4 +A generic match, missing parts always match\&. +.RE +.PP +\fBEVRCMP_COMPARE_EVONLY\fR +.RS 4 +Only compare the epoch and the version parts, ignore the release part\&. +.RE +.SS "Functions" +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBint pool_evrcmp(const Pool *\fR\fIpool\fR\fB, Id\fR \fIevr1id\fR\fB, Id\fR \fIevr2id\fR\fB, int\fR \fImode\fR\fB)\fR; +.fi +.if n \{\ +.RE +.\} +.sp +Compare two version Ids, return \-1 if the first version is less than the second version, 0 if they are identical, and 1 if the first version is bigger than the second one\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBint pool_evrcmp_str(const Pool *\fR\fIpool\fR\fB, const char *\fR\fIevr1\fR\fB, const char *\fR\fIevr2\fR\fB, int\fR \fImode\fR\fB)\fR; +.fi +.if n \{\ +.RE +.\} +.sp +Same as pool_evrcmp(), but uses strings instead of Ids\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBint pool_evrmatch(const Pool *\fR\fIpool\fR\fB, Id\fR \fIevrid\fR\fB, const char *\fR\fIepoch\fR\fB, const char *\fR\fIversion\fR\fB, const char *\fR\fIrelease\fR\fB)\fR; +.fi +.if n \{\ +.RE +.\} +.sp +Match a version Id against an epoch, a version and a release string\&. Passing NULL means that the part should match everything\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBint pool_match_dep(Pool *\fR\fIpool\fR\fB, Id\fR \fId1\fR\fB, Id\fR \fId2\fR\fB)\fR; +.fi +.if n \{\ +.RE +.\} +.sp +Returns \(lq1\(rq if the dependency \fId1\fR (the provider) is matched by the dependency \fId2\fR, otherwise \(lq0\(rq is returned\&. For two dependencies to match, both the \(lqname\(rq parts must match and the version range described by the \(lqevr\(rq parts must overlap\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBint pool_match_nevr(Pool *\fR\fIpool\fR\fB, Solvable *\fR\fIs\fR\fB, Id\fR \fId\fR\fB)\fR; +.fi +.if n \{\ +.RE +.\} +.sp +Like pool_match_dep, but the provider is the "self\-provides" dependency of the Solvable \fIs\fR, i\&.e\&. the dependency \(lqs→name = s→evr\(rq\&. +.SH "WHATPROVIDES INDEX" +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBvoid pool_createwhatprovides(Pool *\fR\fIpool\fR\fB)\fR; +.fi +.if n \{\ +.RE +.\} +.sp +Create an index that maps dependency Ids to sets of packages that provide the dependency\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBvoid pool_freewhatprovides(Pool *\fR\fIpool\fR\fB)\fR; +.fi +.if n \{\ +.RE +.\} +.sp +Free the whatprovides index to save memory\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBId pool_whatprovides(Pool *\fR\fIpool\fR\fB, Id\fR \fId\fR\fB)\fR; +.fi +.if n \{\ +.RE +.\} +.sp +Return an offset into the Pool\(cqs whatprovidesdata array\&. The solvables with the Ids stored starting at that offset provide the dependency \fId\fR\&. The solvable list is zero terminated\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBId *pool_whatprovides_ptr(Pool *\fR\fIpool\fR\fB, Id\fR \fId\fR\fB)\fR; +.fi +.if n \{\ +.RE +.\} +.sp +Instead of returning the offset, return the pointer to the Ids stored at that offset\&. Note that this pointer has a very limit validity time, as any call that adds new values to the whatprovidesdata area may reallocate the array\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBId pool_queuetowhatprovides(Pool *\fR\fIpool\fR\fB, Queue *\fR\fIq\fR\fB)\fR; +.fi +.if n \{\ +.RE +.\} +.sp +Add the contents of the Queue \fIq\fR to the end of the whatprovidesdata array, returning the offset into the array\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBvoid pool_addfileprovides(Pool *\fR\fIpool\fR\fB)\fR; +.fi +.if n \{\ +.RE +.\} +.sp +Some package managers like rpm allow dependencies on files contained in other packages\&. To allow libsolv to deal with those dependencies in an efficient way, you need to call the addfileprovides method after creating and reading all repositories\&. This method will scan all dependency for file names and then scan all packages for matching files\&. If a filename has been matched, it will be added to the provides list of the corresponding package\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBvoid pool_addfileprovides_queue(Pool *\fR\fIpool\fR\fB, Queue *\fR\fIidq\fR\fB, Queue *\fR\fIidqinst\fR\fB)\fR; +.fi +.if n \{\ +.RE +.\} +.sp +Same as pool_addfileprovides, but the added Ids are returned in two Queues, \fIidq\fR for all repositories except the one containing the \(lqinstalled\(rq packages, \fIidqinst\fR for the latter one\&. This information can be stored in the meta section of the repositories to speed up the next time the repository is loaded and addfileprovides is called +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBvoid pool_set_whatprovides(\fR\fIpool\fR\fB, Id\fR \fIid\fR\fB, Id\fR \fIoffset\fR\fB)\fR; +.fi +.if n \{\ +.RE +.\} +.sp +Manually set an entry in the whatprovides index\&. You\(cqll never do this for package dependencies, as those entries are created by calling the pool_createwhatprovides() function\&. But this function is useful for namespace provides if you do not want to use a namespace callback to lazily set the provides\&. The offset argument is a offset in the whatprovides array, thus you can use \(lq1\(rq as a false value and \(lq2\(rq as true value\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBvoid pool_flush_namespaceproviders(Pool *\fR\fIpool\fR\fB, Id\fR \fIns\fR\fB, Id\fR \fIevr\fR\fB)\fR; +.fi +.if n \{\ +.RE +.\} +.sp +Clear the cache of the providers for namespace dependencies matching namespace \fIns\fR\&. If the \fIevr\fR argument is non\-zero, the namespace dependency for exactly that dependency is cleared, otherwise all matching namespace dependencies are cleared\&. See the section about Namespace dependencies for further information\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBvoid pool_add_fileconflicts_deps(Pool *\fR\fIpool\fR\fB, Queue *\fR\fIconflicts\fR\fB)\fR; +.fi +.if n \{\ +.RE +.\} +.sp +Some package managers like rpm report conflicts when a package installation overwrites a file of another installed package with different content\&. As file content information is not stored in the repository metadata, those conflicts can only be detected after the packages are downloaded\&. Libsolv provides a function to check for such conflicts, pool_findfileconflicts()\&. If conflicts are found, they can be added as special \fBREL_FILECONFLICT\fR provides dependencies, so that the solver will know about the conflict when it is re\-run\&. +.SH "UTILITY FUNCTIONS" +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBchar *pool_alloctmpspace(Pool *\fR\fIpool\fR\fB, int\fR \fIlen\fR\fB)\fR; +.fi +.if n \{\ +.RE +.\} +.sp +Allocate space on the pool\(cqs temporary space area\&. This space has a limited lifetime, it will be automatically freed after a fixed amount (currently 16) of other pool_alloctmpspace() calls are done\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBvoid pool_freetmpspace(Pool *\fR\fIpool\fR\fB, const char *\fR\fIspace\fR\fB)\fR; +.fi +.if n \{\ +.RE +.\} +.sp +Give the space allocated with pool_alloctmpspace back to the system\&. You do not have to use this function, as the space is automatically reclaimed, but it can be useful to extend the lifetime of other pointers to the pool\(cqs temporary space area\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBconst char *pool_bin2hex(Pool *\fR\fIpool\fR\fB, const unsigned char *\fR\fIbuf\fR\fB, int\fR \fIlen\fR\fB)\fR; +.fi +.if n \{\ +.RE +.\} +.sp +Convert some binary data to hexadecimal, returning a string allocated in the pool\(cqs temporary space area\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBchar *pool_tmpjoin(Pool *\fR\fIpool\fR\fB, const char *\fR\fIstr1\fR\fB, const char *\fR\fIstr2\fR\fB, const char *\fR\fIstr3\fR\fB)\fR; +.fi +.if n \{\ +.RE +.\} +.sp +Join three strings and return the result in the pool\(cqs temporary space area\&. You can use NULL arguments if you just want to join less strings\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBchar *pool_tmpappend(Pool *\fR\fIpool\fR\fB, const char *\fR\fIstr1\fR\fB, const char *\fR\fIstr2\fR\fB, const char *\fR\fIstr3\fR\fB)\fR; +.fi +.if n \{\ +.RE +.\} +.sp +Like pool_tmpjoin(), but if the first argument is the last allocated space in the pool\(cqs temporary space area, it will be replaced with the result of the join and no new temporary space slot will be used\&. Thus you can join more than three strings by a combination of one pool_tmpjoin() and multiple pool_tmpappend() calls\&. Note that the \fIstr1\fR pointer is no longer usable after the call\&. +.SH "DATA LOOKUP" +.SS "Constants" +.PP +\fBSOLVID_POS\fR +.RS 4 +Use the data position stored in the pool for the lookup instead of looking up the data of a solvable\&. +.RE +.PP +\fBSOLVID_META\fR +.RS 4 +Use the data stored in the meta section of a repository (or repodata area) instead of looking up the data of a solvable\&. This constant does not work for the pool\(cqs lookup functions, use it for the repo\(cqs or repodata\(cqs lookup functions instead\&. It\(cqs just listed for completeness\&. +.RE +.SS "Functions" +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBconst char *pool_lookup_str(Pool *\fR\fIpool\fR\fB, Id\fR \fIsolvid\fR\fB, Id\fR \fIkeyname\fR\fB)\fR; +.fi +.if n \{\ +.RE +.\} +.sp +Return the string value stored under the attribute \fIkeyname\fR in solvable \fIsolvid\fR\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBunsigned long long pool_lookup_num(Pool *\fR\fIpool\fR\fB, Id\fR \fIsolvid\fR\fB, Id\fR \fIkeyname\fR\fB, unsigned long long\fR \fInotfound\fR\fB)\fR; +.fi +.if n \{\ +.RE +.\} +.sp +Return the 64bit unsigned number stored under the attribute \fIkeyname\fR in solvable \fIsolvid\fR\&. If no such number is found, the value of the \fInotfound\fR argument is returned instead\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBId pool_lookup_id(Pool *\fR\fIpool\fR\fB, Id\fR \fIsolvid\fR\fB, Id\fR \fIkeyname\fR\fB)\fR; +.fi +.if n \{\ +.RE +.\} +.sp +Return the Id stored under the attribute \fIkeyname\fR in solvable \fIsolvid\fR\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBint pool_lookup_idarray(Pool *\fR\fIpool\fR\fB, Id\fR \fIsolvid\fR\fB, Id\fR \fIkeyname\fR\fB, Queue *\fR\fIq\fR\fB)\fR; +.fi +.if n \{\ +.RE +.\} +.sp +Fill the queue \fIq\fR with the content of the Id array stored under the attribute \fIkeyname\fR in solvable \fIsolvid\fR\&. Returns \(lq1\(rq if an array was found, otherwise the queue will be empty and \(lq0\(rq will be returned\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBint pool_lookup_void(Pool *\fR\fIpool\fR\fB, Id\fR \fIsolvid\fR\fB, Id\fR \fIkeyname\fR\fB)\fR; +.fi +.if n \{\ +.RE +.\} +.sp +Returns \(lq1\(rq if a void value is stored under the attribute \fIkeyname\fR in solvable \fIsolvid\fR, otherwise \(lq0\(rq\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBconst char *pool_lookup_checksum(Pool *\fR\fIpool\fR\fB, Id\fR \fIsolvid\fR\fB, Id\fR \fIkeyname\fR\fB, Id *\fR\fItypep\fR\fB)\fR; +.fi +.if n \{\ +.RE +.\} +.sp +Return the checksum that is stored under the attribute \fIkeyname\fR in solvable \fIsolvid\fR\&. The type of the checksum will be returned over the \fItypep\fR pointer\&. If no such checksum is found, NULL will be returned and the type will be set to zero\&. Note that the result is stored in the Pool\(cqs temporary space area\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBconst unsigned char *pool_lookup_bin_checksum(Pool *\fR\fIpool\fR\fB, Id\fR \fIsolvid\fR\fB, Id\fR \fIkeyname\fR\fB, Id *\fR\fItypep\fR\fB)\fR; +.fi +.if n \{\ +.RE +.\} +.sp +Return the checksum that is stored under the attribute \fIkeyname\fR in solvable \fIsolvid\fR\&. Returns the checksum as binary data, you can use the returned type to calculate the length of the checksum\&. No temporary space area is needed\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBconst char *pool_lookup_deltalocation(Pool *\fR\fIpool\fR\fB, Id\fR \fIsolvid\fR\fB, unsigned int *\fR\fImedianrp\fR\fB)\fR; +.fi +.if n \{\ +.RE +.\} +.sp +This is a utility lookup function to return the delta location for a delta rpm\&. As solvables cannot store deltas, you have to use SOLVID_POS as argument and set the Pool\(cqs datapos pointer to point to valid delta rpm data\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBvoid pool_search(Pool *\fR\fIpool\fR\fB, Id\fR \fIsolvid\fR\fB, Id\fR \fIkeyname\fR\fB, const char *\fR\fImatch\fR\fB, int\fR \fIflags\fR\fB, int (*\fR\fIcallback\fR\fB)(void *\fR\fIcbdata\fR\fB, Solvable *\fR\fIs\fR\fB, Repodata *\fR\fIdata\fR\fB, Repokey *\fR\fIkey\fR\fB, KeyValue *\fR\fIkv\fR\fB), void *\fR\fIcbdata\fR\fB)\fR; +.fi +.if n \{\ +.RE +.\} +.sp +Perform a search on all data stored in the pool\&. You can limit the search area by using the \fIsolvid\fR and \fIkeyname\fR arguments\&. The values can be optionally matched against the \fImatch\fR argument, use NULL if you do not want this matching\&. See the Dataiterator manpage about the possible matches modes and the \fIflags\fR argument\&. For all (matching) values, the callback function is called with the \fIcbdata\fR callback argument and the data describing the value\&. +.SH "JOB AND SELECTION FUNCTIONS" +.sp +A Job consists of two Ids, \fIhow\fR and \fIwhat\fR\&. The \fIhow\fR part describes the action, the job flags, and the selection method while the \fIwhat\fR part is in input for the selection\&. A Selection is a queue consisting of multiple jobs (thus the number of elements in the queue must be a multiple of two)\&. See the Solver manpage for more information about jobs\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBconst char *pool_job2str(Pool *\fR\fIpool\fR\fB, Id\fR \fIhow\fR\fB, Id\fR \fIwhat\fR\fB, Id\fR \fIflagmask\fR\fB)\fR; +.fi +.if n \{\ +.RE +.\} +.sp +Convert a job into a string\&. Useful for debugging purposes\&. The \fIflagmask\fR can be used to mask the flags of the job, use \(lq0\(rq if you do not want to see such flags, \(lq\-1\(rq to see all flags, or a combination of the flags you want to see\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBvoid pool_job2solvables(Pool *\fR\fIpool\fR\fB, Queue *\fR\fIpkgs\fR\fB, Id\fR \fIhow\fR\fB, Id\fR \fIwhat\fR\fB)\fR; +.fi +.if n \{\ +.RE +.\} +.sp +Return a list of solvables that the specified job selects\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBint pool_isemptyupdatejob(Pool *\fR\fIpool\fR\fB, Id\fR \fIhow\fR\fB, Id\fR \fIwhat\fR\fB)\fR; +.fi +.if n \{\ +.RE +.\} +.sp +Return \(lq1\(rq if the job is an update job that does not work with any installed package, i\&.e\&. the job is basically a no\-op\&. You can use this to turn no\-op update jobs into install jobs (as done by package managers like \(lqzypper\(rq)\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBconst char *pool_selection2str(Pool *\fR\fIpool\fR\fB, Queue *\fR\fIselection\fR\fB, Id\fR \fIflagmask\fR\fB)\fR; +.fi +.if n \{\ +.RE +.\} +.sp +Convert a selection into a string\&. Useful for debugging purposes\&. See the pool_job2str() function for the \fIflagmask\fR argument\&. +.SH "ODDS AND ENDS" +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBvoid pool_freeallrepos(Pool *\fR\fIpool\fR\fB, int\fR \fIreuseids\fR\fB)\fR; +.fi +.if n \{\ +.RE +.\} +.sp +Free all repos from the pool (including all solvables)\&. If \fIreuseids\fR is true, all Ids of the solvables are free to be reused the next time solvables are created\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +\fBvoid pool_clear_pos(Pool *\fR\fIpool\fR\fB)\fR; +.fi +.if n \{\ +.RE +.\} +.sp +Clear the data position stored in the pool\&. +.SH "ARCHITECTURE POLICIES" +.sp +An architecture policy defines a list of architectures that can be installed on the system, and also the relationship between them (i\&.e\&. the ordering)\&. Architectures can be delimited with three different characters: +.PP +\fB\*(Aq:\*(Aq\fR +.RS 4 +No relationship between the architectures\&. A package of one architecture can not be replaced with one of the other architecture\&. +.RE +.PP +\fB\*(Aq>\*(Aq\fR +.RS 4 +The first architecture is better than the second one\&. An installed package of the second architecture may be replaced with one from the first architecture and vice versa\&. The solver will select the better architecture if the versions are the same\&. +.RE +.PP +\fB\*(Aq=\*(Aq\fR +.RS 4 +The two architectures are freely exchangeable\&. Used to define aliases for architectures\&. +.RE +.sp +An example would be \*(Aqx86_64:i686=athlon>i586\*(Aq\&. This means that x86_64 packages can only be replaced by other x86_64 packages, i686 packages can be replaced by i686 and i586 packages (but i686 packages will be preferred) and athlon is another name for the i686 architecture\&. +.sp +You can turn off the architecture replacement checks with the Solver\(cqs SOLVER_FLAG_ALLOW_ARCHCHANGE flag\&. +.SH "VENDOR POLICIES" +.sp +Different vendors often compile packages with different features, so Libsolv only replace installed packages of one vendor with packages coming from the same vendor\&. Also, while the version of a package is normally defined by the upstream project, the release part of the version is set by the vendor\(cqs package maintainer, so it\(cqs not meaningful to do version comparisons for packages coming from different vendors\&. +.sp +Vendor in this case means the SOLVABLE_VENDOR string stored in each solvable\&. Sometimes a vendor changes names, or multiple vendors form a group that coordinate their package building, so libsolv offers a way to define that a group of vendors are compatible\&. You do that be defining vendor equivalence classes, packages from a vendor from one class may be replaced with packages from all the other vendors in the class\&. +.sp +There can be multiple equivalence classes, the set of allowed vendor changes for an installed package is calculated by building the union of all of the equivalence classes the vendor of the installed package is part of\&. +.sp +You can turn off the vendor replacement checks with the Solver\(cqs SOLVER_FLAG_ALLOW_VENDORCHANGE flag\&. +.SH "BOOLEAN DEPENDENCIES" +.sp +Boolean Dependencies allow building complex expressions from simple dependencies\&. Note that depending on the package manager only a subset of those may be useful\&. For example, debian currently only allows an "OR" expression\&. +.PP +\fBREL_OR\fR +.RS 4 +The expression is true if either the first dependency or the second one is true\&. This is useful for package dependencies like \(lqRequires\(rq, where you can specify that either one of the packages need to be installed\&. +.RE +.PP +\fBREL_AND\fR +.RS 4 +The expression is true if both dependencies are true\&. The packages fulfilling the dependencies may be different, i\&.e\&. \(lqSupplements: perl REL_AND python\(rq is true if both a package providing perl and a package providing python are installed\&. +.RE +.PP +\fBREL_WITH\fR +.RS 4 +The expression is true if both dependencies are true and are fulfilled by the same package\&. Thus \(lqSupplements: perl REL_WITH python\(rq would only be true if a package is installed that provides both dependencies (some kind of multi\-language interpreter)\&. +.RE +.PP +\fBREL_COND\fR +.RS 4 +The expression is true if the first dependency is true or the second dependency is false\&. \(lqA REL_COND B\(rq is equivalent to \(lqA REL_OR (NOT B)\(rq (except that libsolv does not expose \(lqNOT\(rq)\&. +.RE +.PP +\fBREL_UNLESS\fR +.RS 4 +The expression is true if the first dependency is true and the second dependency is false\&. \(lqA REL_UNLESS B\(rq is equivalent to \(lqA REL_AND (NOT B)\(rq (except that libsolv does not expose \(lqNOT\(rq)\&. +.RE +.PP +\fBREL_ELSE\fR +.RS 4 +The \(lqelse\(rq part of a \(lqREL_COND\(rq or \(lqREL_UNLESS\(rq dependency\&. It has to be directly in the evr part of the condition, e\&.g\&. \(lqfoo REL_COND (bar REL_ELSE baz)\(rq\&. For \(lqREL_COND\(rq this is equivalent to writing \(lq(foo REL_COND bar) REL_AND (bar REL_OR baz)\(rq\&. For \(lqREL_UNLESS\(rq this is equivalent to writing \(lq(foo REL_UNLESS bar) REL_OR (bar REL_AND baz)\(rq\&. +.RE +.sp +Each sub\-dependency of a boolean dependency can in turn be a boolean dependency, so you can chain them to create complex dependencies\&. +.SH "NAMESPACE DEPENDENCIES" +.sp +Namespace dependencies can be used to implement dependencies on attributes external to libsolv\&. An example would be a dependency on the language set by the user\&. This types of dependencies are usually only used for \(lqConflicts\(rq or \(lqSupplements\(rq dependencies, as the underlying package manager does not know how to deal with them\&. +.sp +If the library needs to evaluate a namespace dependency, it calls the namespace callback function set in the pool\&. The callback function can return a set of packages that \(lqprovide\(rq the dependency\&. If the dependency is provided by the system, the returned set should consist of just the system solvable (Solvable Id 1)\&. +.sp +The returned set of packages must be returned as offset into the whatprovidesdata array\&. You can use the pool_queuetowhatprovides function to convert a queue into such an offset\&. To ease programming the callback function, the return values \(lq0\(rq and \(lq1\(rq are not interpreted as an offset\&. \(lq0\(rq means that no package is in the return set, \(lq1\(rq means that just the system solvable is in the set\&. +.sp +The returned set is cached, so that for each namespace dependency the callback is just called once\&. If you need to flush the cache (maybe because the user has selected a different language), use the pool_flush_namespaceproviders() function\&. +.SH "AUTHOR" +.sp +Michael Schroeder diff --git a/miniconda3/pkgs/libsolv-0.7.30-h6f1ccf3_2/share/man/man3/libsolv.3 b/miniconda3/pkgs/libsolv-0.7.30-h6f1ccf3_2/share/man/man3/libsolv.3 new file mode 100644 index 0000000000000000000000000000000000000000..91d22903dd6d1f0e5d2abc9f969178b9dba73e6e --- /dev/null +++ b/miniconda3/pkgs/libsolv-0.7.30-h6f1ccf3_2/share/man/man3/libsolv.3 @@ -0,0 +1,64 @@ +'\" t +.\" Title: Libsolv +.\" Author: [see the "Author" section] +.\" Generator: DocBook XSL Stylesheets vsnapshot +.\" Date: 03/02/2022 +.\" Manual: LIBSOLV +.\" Source: libsolv +.\" Language: English +.\" +.TH "LIBSOLV" "3" "03/02/2022" "libsolv" "LIBSOLV" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +libsolv \- package dependency solver library using a satisfiability algorithm +.SH "DOCUMENTATION" +.sp +The libsolv documentation is split into multiple parts: +.PP +\fBlibsolv\-history\fR +.RS 4 +how the libsolv library came into existence +.RE +.PP +\fBlibsolv\-constantids\fR +.RS 4 +fixed Ids for often used strings +.RE +.PP +\fBlibsolv\-bindings\fR +.RS 4 +access libsolv from perl/python/ruby +.RE +.PP +\fBlibsolv\-pool\fR +.RS 4 +libsolv\(cqs pool object +.RE +.SH "POINTER VALIDITY" +.sp +Note that all pointers to objects that have an Id have only a limited validity period, with the exception of Repo pointers\&. They are only guaranteed to be valid until a new object of that type is added or an object of that type is removed\&. Thus pointers to Solvable objects are only valid until another solvable is created, because adding a Solvable may relocate the Pool\(cqs Solvable array\&. This is also true for Pool strings, you should use solv_strdup() to create a copy of the string if you want to use it at some later time\&. You should use the Ids in the code and not the pointers, except for short times where you know that the pointer is safe\&. +.sp +Note also that the data lookup functions or the dataiterator also return values with limited lifetime, this is especially true for data stored in the paged data segment of solv files\&. This is normally data that consists of big strings like package descriptions or is not often needed like package checksums\&. Thus looking up a description of a solvable and then looking up the description of a different solvable or even the checksum of the same solvable may invalidate the first result\&. (The dataiterator supports a dataiterator_strdup() function to create a safe copy\&.) +.sp +The language bindings already deal with pointer validity, so you do not have to worry about this issue when using the bindings\&. +.SH "AUTHOR" +.sp +Michael Schroeder diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/include/libssh2.h b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/include/libssh2.h new file mode 100644 index 0000000000000000000000000000000000000000..f47858aed3145777ea1a3c55992614597be54773 --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/include/libssh2.h @@ -0,0 +1,1516 @@ +/* Copyright (C) Sara Golemon + * Copyright (C) Daniel Stenberg + * Copyright (C) Simon Josefsson + * All rights reserved. + * + * Redistribution and use in source and binary forms, + * with or without modification, are permitted provided + * that the following conditions are met: + * + * Redistributions of source code must retain the above + * copyright notice, this list of conditions and the + * following disclaimer. + * + * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * Neither the name of the copyright holder nor the names + * of any other contributors may be used to endorse or + * promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND + * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, + * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE + * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef LIBSSH2_H +#define LIBSSH2_H 1 + +#define LIBSSH2_COPYRIGHT "The libssh2 project and its contributors." + +/* We use underscore instead of dash when appending DEV in dev versions just + to make the BANNER define (used by src/session.c) be a valid SSH + banner. Release versions have no appended strings and may of course not + have dashes either. */ +#define LIBSSH2_VERSION "1.11.1" + +/* The numeric version number is also available "in parts" by using these + defines: */ +#define LIBSSH2_VERSION_MAJOR 1 +#define LIBSSH2_VERSION_MINOR 11 +#define LIBSSH2_VERSION_PATCH 1 + +/* This is the numeric version of the libssh2 version number, meant for easier + parsing and comparisons by programs. The LIBSSH2_VERSION_NUM define will + always follow this syntax: + + 0xXXYYZZ + + Where XX, YY and ZZ are the main version, release and patch numbers in + hexadecimal (using 8 bits each). All three numbers are always represented + using two digits. 1.2 would appear as "0x010200" while version 9.11.7 + appears as "0x090b07". + + This 6-digit (24 bits) hexadecimal number does not show pre-release number, + and it is always a greater number in a more recent release. It makes + comparisons with greater than and less than work. +*/ +#define LIBSSH2_VERSION_NUM 0x010b01 + +/* + * This is the date and time when the full source package was created. The + * timestamp is not stored in the source code repo, as the timestamp is + * properly set in the tarballs by the maketgz script. + * + * The format of the date should follow this template: + * + * "Mon Feb 12 11:35:33 UTC 2007" + */ +#define LIBSSH2_TIMESTAMP "Wed Oct 16 08:03:21 UTC 2024" + +#ifndef RC_INVOKED + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef _WIN32 +# include +# include +#endif + +#include +#include +#include +#include + +/* Allow alternate API prefix from CFLAGS or calling app */ +#ifndef LIBSSH2_API +# ifdef _WIN32 +# if defined(LIBSSH2_EXPORTS) || defined(_WINDLL) +# ifdef LIBSSH2_LIBRARY +# define LIBSSH2_API __declspec(dllexport) +# else +# define LIBSSH2_API __declspec(dllimport) +# endif /* LIBSSH2_LIBRARY */ +# else +# define LIBSSH2_API +# endif +# else /* !_WIN32 */ +# define LIBSSH2_API +# endif /* _WIN32 */ +#endif /* LIBSSH2_API */ + +#ifdef HAVE_SYS_UIO_H +# include +#endif + +#ifdef _MSC_VER +typedef unsigned char uint8_t; +typedef unsigned short int uint16_t; +typedef unsigned int uint32_t; +typedef __int32 int32_t; +typedef __int64 int64_t; +typedef unsigned __int64 uint64_t; +typedef unsigned __int64 libssh2_uint64_t; +typedef __int64 libssh2_int64_t; +#if (!defined(HAVE_SSIZE_T) && !defined(ssize_t)) +typedef SSIZE_T ssize_t; +#define HAVE_SSIZE_T +#endif +#else +#include +typedef unsigned long long libssh2_uint64_t; +typedef long long libssh2_int64_t; +#endif + +#ifdef _WIN32 +typedef SOCKET libssh2_socket_t; +#define LIBSSH2_INVALID_SOCKET INVALID_SOCKET +#define LIBSSH2_SOCKET_CLOSE(s) closesocket(s) +#else /* !_WIN32 */ +typedef int libssh2_socket_t; +#define LIBSSH2_INVALID_SOCKET -1 +#define LIBSSH2_SOCKET_CLOSE(s) close(s) +#endif /* _WIN32 */ + +/* Compile-time deprecation macros */ +#if !defined(LIBSSH2_DISABLE_DEPRECATION) && !defined(LIBSSH2_LIBRARY) +# if defined(_MSC_VER) +# if _MSC_VER >= 1400 +# define LIBSSH2_DEPRECATED(version, message) \ + __declspec(deprecated("since libssh2 " # version ". " message)) +# elif _MSC_VER >= 1310 +# define LIBSSH2_DEPRECATED(version, message) \ + __declspec(deprecated) +# endif +# elif defined(__GNUC__) && !defined(__INTEL_COMPILER) +# if (defined(__clang__) && __clang_major__ >= 3) || \ + (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5)) +# define LIBSSH2_DEPRECATED(version, message) \ + __attribute__((deprecated("since libssh2 " # version ". " message))) +# elif __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ > 0) +# define LIBSSH2_DEPRECATED(version, message) \ + __attribute__((deprecated)) +# endif +# elif defined(__SUNPRO_C) && __SUNPRO_C >= 0x5130 +# define LIBSSH2_DEPRECATED(version, message) \ + __attribute__((deprecated)) +# endif +#endif + +#ifndef LIBSSH2_DEPRECATED +#define LIBSSH2_DEPRECATED(version, message) +#endif + +/* + * Determine whether there is small or large file support on windows. + */ + +#if defined(_MSC_VER) && !defined(_WIN32_WCE) +# if (_MSC_VER >= 900) && (_INTEGRAL_MAX_BITS >= 64) +# define LIBSSH2_USE_WIN32_LARGE_FILES +# else +# define LIBSSH2_USE_WIN32_SMALL_FILES +# endif +#endif + +#if defined(__MINGW32__) && !defined(LIBSSH2_USE_WIN32_LARGE_FILES) +# define LIBSSH2_USE_WIN32_LARGE_FILES +#endif + +#if defined(__WATCOMC__) && !defined(LIBSSH2_USE_WIN32_LARGE_FILES) +# define LIBSSH2_USE_WIN32_LARGE_FILES +#endif + +#if defined(__POCC__) +# undef LIBSSH2_USE_WIN32_LARGE_FILES +#endif + +#if defined(_WIN32) && !defined(LIBSSH2_USE_WIN32_LARGE_FILES) && \ + !defined(LIBSSH2_USE_WIN32_SMALL_FILES) +# define LIBSSH2_USE_WIN32_SMALL_FILES +#endif + +/* + * Large file (>2Gb) support using WIN32 functions. + */ + +#ifdef LIBSSH2_USE_WIN32_LARGE_FILES +# include +# define LIBSSH2_STRUCT_STAT_SIZE_FORMAT "%I64d" +typedef struct _stati64 libssh2_struct_stat; +typedef __int64 libssh2_struct_stat_size; +#endif + +/* + * Small file (<2Gb) support using WIN32 functions. + */ + +#ifdef LIBSSH2_USE_WIN32_SMALL_FILES +# ifndef _WIN32_WCE +# define LIBSSH2_STRUCT_STAT_SIZE_FORMAT "%d" +typedef struct _stat libssh2_struct_stat; +typedef off_t libssh2_struct_stat_size; +# endif +#endif + +#ifndef LIBSSH2_STRUCT_STAT_SIZE_FORMAT +# ifdef __VMS +/* We have to roll our own format here because %z is a C99-ism we don't + have. */ +# if __USE_OFF64_T || __USING_STD_STAT +# define LIBSSH2_STRUCT_STAT_SIZE_FORMAT "%Ld" +# else +# define LIBSSH2_STRUCT_STAT_SIZE_FORMAT "%d" +# endif +# else +# define LIBSSH2_STRUCT_STAT_SIZE_FORMAT "%zd" +# endif +typedef struct stat libssh2_struct_stat; +typedef off_t libssh2_struct_stat_size; +#endif + +/* Part of every banner, user specified or not */ +#define LIBSSH2_SSH_BANNER "SSH-2.0-libssh2_" LIBSSH2_VERSION + +#define LIBSSH2_SSH_DEFAULT_BANNER LIBSSH2_SSH_BANNER +#define LIBSSH2_SSH_DEFAULT_BANNER_WITH_CRLF LIBSSH2_SSH_DEFAULT_BANNER "\r\n" + +/* Defaults for pty requests */ +#define LIBSSH2_TERM_WIDTH 80 +#define LIBSSH2_TERM_HEIGHT 24 +#define LIBSSH2_TERM_WIDTH_PX 0 +#define LIBSSH2_TERM_HEIGHT_PX 0 + +/* 1/4 second */ +#define LIBSSH2_SOCKET_POLL_UDELAY 250000 +/* 0.25 * 120 == 30 seconds */ +#define LIBSSH2_SOCKET_POLL_MAXLOOPS 120 + +/* Maximum size to allow a payload to compress to, plays it safe by falling + short of spec limits */ +#define LIBSSH2_PACKET_MAXCOMP 32000 + +/* Maximum size to allow a payload to deccompress to, plays it safe by + allowing more than spec requires */ +#define LIBSSH2_PACKET_MAXDECOMP 40000 + +/* Maximum size for an inbound compressed payload, plays it safe by + overshooting spec limits */ +#define LIBSSH2_PACKET_MAXPAYLOAD 40000 + +/* Malloc callbacks */ +#define LIBSSH2_ALLOC_FUNC(name) void *name(size_t count, void **abstract) +#define LIBSSH2_REALLOC_FUNC(name) void *name(void *ptr, size_t count, \ + void **abstract) +#define LIBSSH2_FREE_FUNC(name) void name(void *ptr, void **abstract) + +typedef struct _LIBSSH2_USERAUTH_KBDINT_PROMPT +{ + unsigned char *text; + size_t length; + unsigned char echo; +} LIBSSH2_USERAUTH_KBDINT_PROMPT; + +typedef struct _LIBSSH2_USERAUTH_KBDINT_RESPONSE +{ + char *text; + unsigned int length; /* FIXME: change type to size_t */ +} LIBSSH2_USERAUTH_KBDINT_RESPONSE; + +typedef struct _LIBSSH2_SK_SIG_INFO { + uint8_t flags; + uint32_t counter; + unsigned char *sig_r; + size_t sig_r_len; + unsigned char *sig_s; + size_t sig_s_len; +} LIBSSH2_SK_SIG_INFO; + +/* 'publickey' authentication callback */ +#define LIBSSH2_USERAUTH_PUBLICKEY_SIGN_FUNC(name) \ + int name(LIBSSH2_SESSION *session, unsigned char **sig, size_t *sig_len, \ + const unsigned char *data, size_t data_len, void **abstract) + +/* 'keyboard-interactive' authentication callback */ +/* FIXME: name_len, instruction_len -> size_t, num_prompts -> unsigned int? */ +#define LIBSSH2_USERAUTH_KBDINT_RESPONSE_FUNC(name_) \ + void name_(const char *name, int name_len, const char *instruction, \ + int instruction_len, int num_prompts, \ + const LIBSSH2_USERAUTH_KBDINT_PROMPT *prompts, \ + LIBSSH2_USERAUTH_KBDINT_RESPONSE *responses, void **abstract) + +/* SK authentication callback */ +#define LIBSSH2_USERAUTH_SK_SIGN_FUNC(name) \ + int name(LIBSSH2_SESSION *session, LIBSSH2_SK_SIG_INFO *sig_info, \ + const unsigned char *data, size_t data_len, \ + int algorithm, uint8_t flags, \ + const char *application, const unsigned char *key_handle, \ + size_t handle_len, \ + void **abstract) + +/* Flags for SK authentication */ +#define LIBSSH2_SK_PRESENCE_REQUIRED 0x01 +#define LIBSSH2_SK_VERIFICATION_REQUIRED 0x04 + +/* FIXME: update lengths to size_t (or ssize_t): */ + +/* Callbacks for special SSH packets */ +#define LIBSSH2_IGNORE_FUNC(name) \ + void name(LIBSSH2_SESSION *session, const char *message, int message_len, \ + void **abstract) + +#define LIBSSH2_DEBUG_FUNC(name) \ + void name(LIBSSH2_SESSION *session, int always_display, \ + const char *message, int message_len, \ + const char *language, int language_len, \ + void **abstract) + +#define LIBSSH2_DISCONNECT_FUNC(name) \ + void name(LIBSSH2_SESSION *session, int reason, \ + const char *message, int message_len, \ + const char *language, int language_len, \ + void **abstract) + +#define LIBSSH2_PASSWD_CHANGEREQ_FUNC(name) \ + void name(LIBSSH2_SESSION *session, char **newpw, int *newpw_len, \ + void **abstract) + +#define LIBSSH2_MACERROR_FUNC(name) \ + int name(LIBSSH2_SESSION *session, const char *packet, int packet_len, \ + void **abstract) + +#define LIBSSH2_X11_OPEN_FUNC(name) \ + void name(LIBSSH2_SESSION *session, LIBSSH2_CHANNEL *channel, \ + const char *shost, int sport, void **abstract) + +#define LIBSSH2_AUTHAGENT_FUNC(name) \ + void name(LIBSSH2_SESSION *session, LIBSSH2_CHANNEL *channel, \ + void **abstract) + +#define LIBSSH2_ADD_IDENTITIES_FUNC(name) \ + void name(LIBSSH2_SESSION *session, void *buffer, \ + const char *agent_path, void **abstract) + +#define LIBSSH2_AUTHAGENT_SIGN_FUNC(name) \ + int name(LIBSSH2_SESSION* session, \ + unsigned char *blob, unsigned int blen, \ + const unsigned char *data, unsigned int dlen, \ + unsigned char **signature, unsigned int *sigLen, \ + const char *agentPath, \ + void **abstract) + +#define LIBSSH2_CHANNEL_CLOSE_FUNC(name) \ + void name(LIBSSH2_SESSION *session, void **session_abstract, \ + LIBSSH2_CHANNEL *channel, void **channel_abstract) + +/* I/O callbacks */ +#define LIBSSH2_RECV_FUNC(name) \ + ssize_t name(libssh2_socket_t socket, \ + void *buffer, size_t length, \ + int flags, void **abstract) +#define LIBSSH2_SEND_FUNC(name) \ + ssize_t name(libssh2_socket_t socket, \ + const void *buffer, size_t length, \ + int flags, void **abstract) + +/* libssh2_session_callback_set() constants */ +#define LIBSSH2_CALLBACK_IGNORE 0 +#define LIBSSH2_CALLBACK_DEBUG 1 +#define LIBSSH2_CALLBACK_DISCONNECT 2 +#define LIBSSH2_CALLBACK_MACERROR 3 +#define LIBSSH2_CALLBACK_X11 4 +#define LIBSSH2_CALLBACK_SEND 5 +#define LIBSSH2_CALLBACK_RECV 6 +#define LIBSSH2_CALLBACK_AUTHAGENT 7 +#define LIBSSH2_CALLBACK_AUTHAGENT_IDENTITIES 8 +#define LIBSSH2_CALLBACK_AUTHAGENT_SIGN 9 + +/* libssh2_session_method_pref() constants */ +#define LIBSSH2_METHOD_KEX 0 +#define LIBSSH2_METHOD_HOSTKEY 1 +#define LIBSSH2_METHOD_CRYPT_CS 2 +#define LIBSSH2_METHOD_CRYPT_SC 3 +#define LIBSSH2_METHOD_MAC_CS 4 +#define LIBSSH2_METHOD_MAC_SC 5 +#define LIBSSH2_METHOD_COMP_CS 6 +#define LIBSSH2_METHOD_COMP_SC 7 +#define LIBSSH2_METHOD_LANG_CS 8 +#define LIBSSH2_METHOD_LANG_SC 9 +#define LIBSSH2_METHOD_SIGN_ALGO 10 + +/* flags */ +#define LIBSSH2_FLAG_SIGPIPE 1 +#define LIBSSH2_FLAG_COMPRESS 2 +#define LIBSSH2_FLAG_QUOTE_PATHS 3 + +typedef struct _LIBSSH2_SESSION LIBSSH2_SESSION; +typedef struct _LIBSSH2_CHANNEL LIBSSH2_CHANNEL; +typedef struct _LIBSSH2_LISTENER LIBSSH2_LISTENER; +typedef struct _LIBSSH2_KNOWNHOSTS LIBSSH2_KNOWNHOSTS; +typedef struct _LIBSSH2_AGENT LIBSSH2_AGENT; + +/* SK signature callback */ +typedef struct _LIBSSH2_PRIVKEY_SK { + int algorithm; + uint8_t flags; + const char *application; + const unsigned char *key_handle; + size_t handle_len; + LIBSSH2_USERAUTH_SK_SIGN_FUNC((*sign_callback)); + void **orig_abstract; +} LIBSSH2_PRIVKEY_SK; + +int +libssh2_sign_sk(LIBSSH2_SESSION *session, + unsigned char **sig, + size_t *sig_len, + const unsigned char *data, + size_t data_len, + void **abstract); + +typedef struct _LIBSSH2_POLLFD { + unsigned char type; /* LIBSSH2_POLLFD_* below */ + + union { + libssh2_socket_t socket; /* File descriptors -- examined with + system select() call */ + LIBSSH2_CHANNEL *channel; /* Examined by checking internal state */ + LIBSSH2_LISTENER *listener; /* Read polls only -- are inbound + connections waiting to be accepted? */ + } fd; + + unsigned long events; /* Requested Events */ + unsigned long revents; /* Returned Events */ +} LIBSSH2_POLLFD; + +/* Poll FD Descriptor Types */ +#define LIBSSH2_POLLFD_SOCKET 1 +#define LIBSSH2_POLLFD_CHANNEL 2 +#define LIBSSH2_POLLFD_LISTENER 3 + +/* Note: Win32 Doesn't actually have a poll() implementation, so some of these + values are faked with select() data */ +/* Poll FD events/revents -- Match sys/poll.h where possible */ +#define LIBSSH2_POLLFD_POLLIN 0x0001 /* Data available to be read or + connection available -- + All */ +#define LIBSSH2_POLLFD_POLLPRI 0x0002 /* Priority data available to + be read -- Socket only */ +#define LIBSSH2_POLLFD_POLLEXT 0x0002 /* Extended data available to + be read -- Channel only */ +#define LIBSSH2_POLLFD_POLLOUT 0x0004 /* Can may be written -- + Socket/Channel */ +/* revents only */ +#define LIBSSH2_POLLFD_POLLERR 0x0008 /* Error Condition -- Socket */ +#define LIBSSH2_POLLFD_POLLHUP 0x0010 /* HangUp/EOF -- Socket */ +#define LIBSSH2_POLLFD_SESSION_CLOSED 0x0010 /* Session Disconnect */ +#define LIBSSH2_POLLFD_POLLNVAL 0x0020 /* Invalid request -- Socket + Only */ +#define LIBSSH2_POLLFD_POLLEX 0x0040 /* Exception Condition -- + Socket/Win32 */ +#define LIBSSH2_POLLFD_CHANNEL_CLOSED 0x0080 /* Channel Disconnect */ +#define LIBSSH2_POLLFD_LISTENER_CLOSED 0x0080 /* Listener Disconnect */ + +#define HAVE_LIBSSH2_SESSION_BLOCK_DIRECTION +/* Block Direction Types */ +#define LIBSSH2_SESSION_BLOCK_INBOUND 0x0001 +#define LIBSSH2_SESSION_BLOCK_OUTBOUND 0x0002 + +/* Hash Types */ +#define LIBSSH2_HOSTKEY_HASH_MD5 1 +#define LIBSSH2_HOSTKEY_HASH_SHA1 2 +#define LIBSSH2_HOSTKEY_HASH_SHA256 3 + +/* Hostkey Types */ +#define LIBSSH2_HOSTKEY_TYPE_UNKNOWN 0 +#define LIBSSH2_HOSTKEY_TYPE_RSA 1 +#define LIBSSH2_HOSTKEY_TYPE_DSS 2 /* deprecated */ +#define LIBSSH2_HOSTKEY_TYPE_ECDSA_256 3 +#define LIBSSH2_HOSTKEY_TYPE_ECDSA_384 4 +#define LIBSSH2_HOSTKEY_TYPE_ECDSA_521 5 +#define LIBSSH2_HOSTKEY_TYPE_ED25519 6 + +/* Disconnect Codes (defined by SSH protocol) */ +#define SSH_DISCONNECT_HOST_NOT_ALLOWED_TO_CONNECT 1 +#define SSH_DISCONNECT_PROTOCOL_ERROR 2 +#define SSH_DISCONNECT_KEY_EXCHANGE_FAILED 3 +#define SSH_DISCONNECT_RESERVED 4 +#define SSH_DISCONNECT_MAC_ERROR 5 +#define SSH_DISCONNECT_COMPRESSION_ERROR 6 +#define SSH_DISCONNECT_SERVICE_NOT_AVAILABLE 7 +#define SSH_DISCONNECT_PROTOCOL_VERSION_NOT_SUPPORTED 8 +#define SSH_DISCONNECT_HOST_KEY_NOT_VERIFIABLE 9 +#define SSH_DISCONNECT_CONNECTION_LOST 10 +#define SSH_DISCONNECT_BY_APPLICATION 11 +#define SSH_DISCONNECT_TOO_MANY_CONNECTIONS 12 +#define SSH_DISCONNECT_AUTH_CANCELLED_BY_USER 13 +#define SSH_DISCONNECT_NO_MORE_AUTH_METHODS_AVAILABLE 14 +#define SSH_DISCONNECT_ILLEGAL_USER_NAME 15 + +/* Error Codes (defined by libssh2) */ +#define LIBSSH2_ERROR_NONE 0 + +/* The library once used -1 as a generic error return value on numerous places + through the code, which subsequently was converted to + LIBSSH2_ERROR_SOCKET_NONE uses over time. As this is a generic error code, + the goal is to never ever return this code but instead make sure that a + more accurate and descriptive error code is used. */ +#define LIBSSH2_ERROR_SOCKET_NONE -1 + +#define LIBSSH2_ERROR_BANNER_RECV -2 +#define LIBSSH2_ERROR_BANNER_SEND -3 +#define LIBSSH2_ERROR_INVALID_MAC -4 +#define LIBSSH2_ERROR_KEX_FAILURE -5 +#define LIBSSH2_ERROR_ALLOC -6 +#define LIBSSH2_ERROR_SOCKET_SEND -7 +#define LIBSSH2_ERROR_KEY_EXCHANGE_FAILURE -8 +#define LIBSSH2_ERROR_TIMEOUT -9 +#define LIBSSH2_ERROR_HOSTKEY_INIT -10 +#define LIBSSH2_ERROR_HOSTKEY_SIGN -11 +#define LIBSSH2_ERROR_DECRYPT -12 +#define LIBSSH2_ERROR_SOCKET_DISCONNECT -13 +#define LIBSSH2_ERROR_PROTO -14 +#define LIBSSH2_ERROR_PASSWORD_EXPIRED -15 +#define LIBSSH2_ERROR_FILE -16 +#define LIBSSH2_ERROR_METHOD_NONE -17 +#define LIBSSH2_ERROR_AUTHENTICATION_FAILED -18 +#define LIBSSH2_ERROR_PUBLICKEY_UNRECOGNIZED \ + LIBSSH2_ERROR_AUTHENTICATION_FAILED +#define LIBSSH2_ERROR_PUBLICKEY_UNVERIFIED -19 +#define LIBSSH2_ERROR_CHANNEL_OUTOFORDER -20 +#define LIBSSH2_ERROR_CHANNEL_FAILURE -21 +#define LIBSSH2_ERROR_CHANNEL_REQUEST_DENIED -22 +#define LIBSSH2_ERROR_CHANNEL_UNKNOWN -23 +#define LIBSSH2_ERROR_CHANNEL_WINDOW_EXCEEDED -24 +#define LIBSSH2_ERROR_CHANNEL_PACKET_EXCEEDED -25 +#define LIBSSH2_ERROR_CHANNEL_CLOSED -26 +#define LIBSSH2_ERROR_CHANNEL_EOF_SENT -27 +#define LIBSSH2_ERROR_SCP_PROTOCOL -28 +#define LIBSSH2_ERROR_ZLIB -29 +#define LIBSSH2_ERROR_SOCKET_TIMEOUT -30 +#define LIBSSH2_ERROR_SFTP_PROTOCOL -31 +#define LIBSSH2_ERROR_REQUEST_DENIED -32 +#define LIBSSH2_ERROR_METHOD_NOT_SUPPORTED -33 +#define LIBSSH2_ERROR_INVAL -34 +#define LIBSSH2_ERROR_INVALID_POLL_TYPE -35 +#define LIBSSH2_ERROR_PUBLICKEY_PROTOCOL -36 +#define LIBSSH2_ERROR_EAGAIN -37 +#define LIBSSH2_ERROR_BUFFER_TOO_SMALL -38 +#define LIBSSH2_ERROR_BAD_USE -39 +#define LIBSSH2_ERROR_COMPRESS -40 +#define LIBSSH2_ERROR_OUT_OF_BOUNDARY -41 +#define LIBSSH2_ERROR_AGENT_PROTOCOL -42 +#define LIBSSH2_ERROR_SOCKET_RECV -43 +#define LIBSSH2_ERROR_ENCRYPT -44 +#define LIBSSH2_ERROR_BAD_SOCKET -45 +#define LIBSSH2_ERROR_KNOWN_HOSTS -46 +#define LIBSSH2_ERROR_CHANNEL_WINDOW_FULL -47 +#define LIBSSH2_ERROR_KEYFILE_AUTH_FAILED -48 +#define LIBSSH2_ERROR_RANDGEN -49 +#define LIBSSH2_ERROR_MISSING_USERAUTH_BANNER -50 +#define LIBSSH2_ERROR_ALGO_UNSUPPORTED -51 +#define LIBSSH2_ERROR_MAC_FAILURE -52 +#define LIBSSH2_ERROR_HASH_INIT -53 +#define LIBSSH2_ERROR_HASH_CALC -54 + +/* this is a define to provide the old (<= 1.2.7) name */ +#define LIBSSH2_ERROR_BANNER_NONE LIBSSH2_ERROR_BANNER_RECV + +/* Global API */ +#define LIBSSH2_INIT_NO_CRYPTO 0x0001 + +/* + * libssh2_init() + * + * Initialize the libssh2 functions. This typically initialize the + * crypto library. It uses a global state, and is not thread safe -- + * you must make sure this function is not called concurrently. + * + * Flags can be: + * 0: Normal initialize + * LIBSSH2_INIT_NO_CRYPTO: Do not initialize the crypto library (ie. + * OPENSSL_add_cipher_algoritms() for OpenSSL + * + * Returns 0 if succeeded, or a negative value for error. + */ +LIBSSH2_API int libssh2_init(int flags); + +/* + * libssh2_exit() + * + * Exit the libssh2 functions and free's all memory used internal. + */ +LIBSSH2_API void libssh2_exit(void); + +/* + * libssh2_free() + * + * Deallocate memory allocated by earlier call to libssh2 functions. + */ +LIBSSH2_API void libssh2_free(LIBSSH2_SESSION *session, void *ptr); + +/* + * libssh2_session_supported_algs() + * + * Fills algs with a list of supported acryptographic algorithms. Returns a + * non-negative number (number of supported algorithms) on success or a + * negative number (an error code) on failure. + * + * NOTE: on success, algs must be deallocated (by calling libssh2_free) when + * not needed anymore + */ +LIBSSH2_API int libssh2_session_supported_algs(LIBSSH2_SESSION* session, + int method_type, + const char ***algs); + +/* Session API */ +LIBSSH2_API LIBSSH2_SESSION * +libssh2_session_init_ex(LIBSSH2_ALLOC_FUNC((*my_alloc)), + LIBSSH2_FREE_FUNC((*my_free)), + LIBSSH2_REALLOC_FUNC((*my_realloc)), void *abstract); +#define libssh2_session_init() libssh2_session_init_ex(NULL, NULL, NULL, NULL) + +LIBSSH2_API void **libssh2_session_abstract(LIBSSH2_SESSION *session); + +typedef void (libssh2_cb_generic)(void); + +LIBSSH2_API libssh2_cb_generic * +libssh2_session_callback_set2(LIBSSH2_SESSION *session, int cbtype, + libssh2_cb_generic *callback); + +LIBSSH2_DEPRECATED(1.11.1, "Use libssh2_session_callback_set2()") +LIBSSH2_API void *libssh2_session_callback_set(LIBSSH2_SESSION *session, + int cbtype, void *callback); +LIBSSH2_API int libssh2_session_banner_set(LIBSSH2_SESSION *session, + const char *banner); +#ifndef LIBSSH2_NO_DEPRECATED +LIBSSH2_DEPRECATED(1.4.0, "Use libssh2_session_banner_set()") +LIBSSH2_API int libssh2_banner_set(LIBSSH2_SESSION *session, + const char *banner); + +LIBSSH2_DEPRECATED(1.2.8, "Use libssh2_session_handshake()") +LIBSSH2_API int libssh2_session_startup(LIBSSH2_SESSION *session, int sock); +#endif +LIBSSH2_API int libssh2_session_handshake(LIBSSH2_SESSION *session, + libssh2_socket_t sock); +LIBSSH2_API int libssh2_session_disconnect_ex(LIBSSH2_SESSION *session, + int reason, + const char *description, + const char *lang); +#define libssh2_session_disconnect(session, description) \ + libssh2_session_disconnect_ex((session), SSH_DISCONNECT_BY_APPLICATION, \ + (description), "") + +LIBSSH2_API int libssh2_session_free(LIBSSH2_SESSION *session); + +LIBSSH2_API const char *libssh2_hostkey_hash(LIBSSH2_SESSION *session, + int hash_type); + +LIBSSH2_API const char *libssh2_session_hostkey(LIBSSH2_SESSION *session, + size_t *len, int *type); + +LIBSSH2_API int libssh2_session_method_pref(LIBSSH2_SESSION *session, + int method_type, + const char *prefs); +LIBSSH2_API const char *libssh2_session_methods(LIBSSH2_SESSION *session, + int method_type); +LIBSSH2_API int libssh2_session_last_error(LIBSSH2_SESSION *session, + char **errmsg, + int *errmsg_len, int want_buf); +LIBSSH2_API int libssh2_session_last_errno(LIBSSH2_SESSION *session); +LIBSSH2_API int libssh2_session_set_last_error(LIBSSH2_SESSION* session, + int errcode, + const char *errmsg); +LIBSSH2_API int libssh2_session_block_directions(LIBSSH2_SESSION *session); + +LIBSSH2_API int libssh2_session_flag(LIBSSH2_SESSION *session, int flag, + int value); +LIBSSH2_API const char *libssh2_session_banner_get(LIBSSH2_SESSION *session); + +/* Userauth API */ +LIBSSH2_API char *libssh2_userauth_list(LIBSSH2_SESSION *session, + const char *username, + unsigned int username_len); +LIBSSH2_API int libssh2_userauth_banner(LIBSSH2_SESSION *session, + char **banner); +LIBSSH2_API int libssh2_userauth_authenticated(LIBSSH2_SESSION *session); + +LIBSSH2_API int +libssh2_userauth_password_ex(LIBSSH2_SESSION *session, + const char *username, + unsigned int username_len, + const char *password, + unsigned int password_len, + LIBSSH2_PASSWD_CHANGEREQ_FUNC + ((*passwd_change_cb))); + +#define libssh2_userauth_password(session, username, password) \ + libssh2_userauth_password_ex((session), (username), \ + (unsigned int)strlen(username), \ + (password), (unsigned int)strlen(password), \ + NULL) + +LIBSSH2_API int +libssh2_userauth_publickey_fromfile_ex(LIBSSH2_SESSION *session, + const char *username, + unsigned int username_len, + const char *publickey, + const char *privatekey, + const char *passphrase); + +#define libssh2_userauth_publickey_fromfile(session, username, publickey, \ + privatekey, passphrase) \ + libssh2_userauth_publickey_fromfile_ex((session), (username), \ + (unsigned int)strlen(username), \ + (publickey), \ + (privatekey), (passphrase)) + +LIBSSH2_API int +libssh2_userauth_publickey(LIBSSH2_SESSION *session, + const char *username, + const unsigned char *pubkeydata, + size_t pubkeydata_len, + LIBSSH2_USERAUTH_PUBLICKEY_SIGN_FUNC + ((*sign_callback)), + void **abstract); + +LIBSSH2_API int +libssh2_userauth_hostbased_fromfile_ex(LIBSSH2_SESSION *session, + const char *username, + unsigned int username_len, + const char *publickey, + const char *privatekey, + const char *passphrase, + const char *hostname, + unsigned int hostname_len, + const char *local_username, + unsigned int local_username_len); + +#define libssh2_userauth_hostbased_fromfile(session, username, publickey, \ + privatekey, passphrase, hostname) \ + libssh2_userauth_hostbased_fromfile_ex((session), (username), \ + (unsigned int)strlen(username), \ + (publickey), \ + (privatekey), (passphrase), \ + (hostname), \ + (unsigned int)strlen(hostname), \ + (username), \ + (unsigned int)strlen(username)) + +LIBSSH2_API int +libssh2_userauth_publickey_frommemory(LIBSSH2_SESSION *session, + const char *username, + size_t username_len, + const char *publickeyfiledata, + size_t publickeyfiledata_len, + const char *privatekeyfiledata, + size_t privatekeyfiledata_len, + const char *passphrase); + +/* + * response_callback is provided with filled by library prompts array, + * but client must allocate and fill individual responses. Responses + * array is already allocated. Responses data will be freed by libssh2 + * after callback return, but before subsequent callback invocation. + */ +LIBSSH2_API int +libssh2_userauth_keyboard_interactive_ex(LIBSSH2_SESSION* session, + const char *username, + unsigned int username_len, + LIBSSH2_USERAUTH_KBDINT_RESPONSE_FUNC + ((*response_callback))); + +#define libssh2_userauth_keyboard_interactive(session, username, \ + response_callback) \ + libssh2_userauth_keyboard_interactive_ex((session), (username), \ + (unsigned int)strlen(username), \ + (response_callback)) + +LIBSSH2_API int +libssh2_userauth_publickey_sk(LIBSSH2_SESSION *session, + const char *username, + size_t username_len, + const unsigned char *pubkeydata, + size_t pubkeydata_len, + const char *privatekeydata, + size_t privatekeydata_len, + const char *passphrase, + LIBSSH2_USERAUTH_SK_SIGN_FUNC + ((*sign_callback)), + void **abstract); + +LIBSSH2_API int libssh2_poll(LIBSSH2_POLLFD *fds, unsigned int nfds, + long timeout); + +/* Channel API */ +#define LIBSSH2_CHANNEL_WINDOW_DEFAULT (2*1024*1024) +#define LIBSSH2_CHANNEL_PACKET_DEFAULT 32768 +#define LIBSSH2_CHANNEL_MINADJUST 1024 + +/* Extended Data Handling */ +#define LIBSSH2_CHANNEL_EXTENDED_DATA_NORMAL 0 +#define LIBSSH2_CHANNEL_EXTENDED_DATA_IGNORE 1 +#define LIBSSH2_CHANNEL_EXTENDED_DATA_MERGE 2 + +#define SSH_EXTENDED_DATA_STDERR 1 + +/* Returned by any function that would block during a read/write operation */ +#define LIBSSH2CHANNEL_EAGAIN LIBSSH2_ERROR_EAGAIN + +LIBSSH2_API LIBSSH2_CHANNEL * +libssh2_channel_open_ex(LIBSSH2_SESSION *session, const char *channel_type, + unsigned int channel_type_len, + unsigned int window_size, unsigned int packet_size, + const char *message, unsigned int message_len); + +#define libssh2_channel_open_session(session) \ + libssh2_channel_open_ex((session), "session", sizeof("session") - 1, \ + LIBSSH2_CHANNEL_WINDOW_DEFAULT, \ + LIBSSH2_CHANNEL_PACKET_DEFAULT, NULL, 0) + +LIBSSH2_API LIBSSH2_CHANNEL * +libssh2_channel_direct_tcpip_ex(LIBSSH2_SESSION *session, const char *host, + int port, const char *shost, int sport); +#define libssh2_channel_direct_tcpip(session, host, port) \ + libssh2_channel_direct_tcpip_ex((session), (host), (port), "127.0.0.1", 22) + +LIBSSH2_API LIBSSH2_CHANNEL * +libssh2_channel_direct_streamlocal_ex(LIBSSH2_SESSION * session, + const char *socket_path, + const char *shost, int sport); + +LIBSSH2_API LIBSSH2_LISTENER * +libssh2_channel_forward_listen_ex(LIBSSH2_SESSION *session, const char *host, + int port, int *bound_port, + int queue_maxsize); +#define libssh2_channel_forward_listen(session, port) \ + libssh2_channel_forward_listen_ex((session), NULL, (port), NULL, 16) + +LIBSSH2_API int libssh2_channel_forward_cancel(LIBSSH2_LISTENER *listener); + +LIBSSH2_API LIBSSH2_CHANNEL * +libssh2_channel_forward_accept(LIBSSH2_LISTENER *listener); + +LIBSSH2_API int libssh2_channel_setenv_ex(LIBSSH2_CHANNEL *channel, + const char *varname, + unsigned int varname_len, + const char *value, + unsigned int value_len); + +#define libssh2_channel_setenv(channel, varname, value) \ + libssh2_channel_setenv_ex((channel), (varname), \ + (unsigned int)strlen(varname), (value), \ + (unsigned int)strlen(value)) + +LIBSSH2_API int libssh2_channel_request_auth_agent(LIBSSH2_CHANNEL *channel); + +LIBSSH2_API int libssh2_channel_request_pty_ex(LIBSSH2_CHANNEL *channel, + const char *term, + unsigned int term_len, + const char *modes, + unsigned int modes_len, + int width, int height, + int width_px, int height_px); +#define libssh2_channel_request_pty(channel, term) \ + libssh2_channel_request_pty_ex((channel), (term), \ + (unsigned int)strlen(term), \ + NULL, 0, \ + LIBSSH2_TERM_WIDTH, \ + LIBSSH2_TERM_HEIGHT, \ + LIBSSH2_TERM_WIDTH_PX, \ + LIBSSH2_TERM_HEIGHT_PX) + +LIBSSH2_API int libssh2_channel_request_pty_size_ex(LIBSSH2_CHANNEL *channel, + int width, int height, + int width_px, + int height_px); +#define libssh2_channel_request_pty_size(channel, width, height) \ + libssh2_channel_request_pty_size_ex((channel), (width), (height), 0, 0) + +LIBSSH2_API int libssh2_channel_x11_req_ex(LIBSSH2_CHANNEL *channel, + int single_connection, + const char *auth_proto, + const char *auth_cookie, + int screen_number); +#define libssh2_channel_x11_req(channel, screen_number) \ + libssh2_channel_x11_req_ex((channel), 0, NULL, NULL, (screen_number)) + +LIBSSH2_API int libssh2_channel_signal_ex(LIBSSH2_CHANNEL *channel, + const char *signame, + size_t signame_len); +#define libssh2_channel_signal(channel, signame) \ + libssh2_channel_signal_ex((channel), signame, strlen(signame)) + +LIBSSH2_API int libssh2_channel_process_startup(LIBSSH2_CHANNEL *channel, + const char *request, + unsigned int request_len, + const char *message, + unsigned int message_len); +#define libssh2_channel_shell(channel) \ + libssh2_channel_process_startup((channel), "shell", sizeof("shell") - 1, \ + NULL, 0) +#define libssh2_channel_exec(channel, command) \ + libssh2_channel_process_startup((channel), "exec", sizeof("exec") - 1, \ + (command), (unsigned int)strlen(command)) +#define libssh2_channel_subsystem(channel, subsystem) \ + libssh2_channel_process_startup((channel), "subsystem", \ + sizeof("subsystem") - 1, (subsystem), \ + (unsigned int)strlen(subsystem)) + +LIBSSH2_API ssize_t libssh2_channel_read_ex(LIBSSH2_CHANNEL *channel, + int stream_id, char *buf, + size_t buflen); +#define libssh2_channel_read(channel, buf, buflen) \ + libssh2_channel_read_ex((channel), 0, \ + (buf), (buflen)) +#define libssh2_channel_read_stderr(channel, buf, buflen) \ + libssh2_channel_read_ex((channel), SSH_EXTENDED_DATA_STDERR, \ + (buf), (buflen)) + +LIBSSH2_API int libssh2_poll_channel_read(LIBSSH2_CHANNEL *channel, + int extended); + +LIBSSH2_API unsigned long +libssh2_channel_window_read_ex(LIBSSH2_CHANNEL *channel, + unsigned long *read_avail, + unsigned long *window_size_initial); +#define libssh2_channel_window_read(channel) \ + libssh2_channel_window_read_ex((channel), NULL, NULL) + +#ifndef LIBSSH2_NO_DEPRECATED +LIBSSH2_DEPRECATED(1.1.0, "Use libssh2_channel_receive_window_adjust2()") +LIBSSH2_API unsigned long +libssh2_channel_receive_window_adjust(LIBSSH2_CHANNEL *channel, + unsigned long adjustment, + unsigned char force); +#endif +LIBSSH2_API int +libssh2_channel_receive_window_adjust2(LIBSSH2_CHANNEL *channel, + unsigned long adjustment, + unsigned char force, + unsigned int *storewindow); + +LIBSSH2_API ssize_t libssh2_channel_write_ex(LIBSSH2_CHANNEL *channel, + int stream_id, const char *buf, + size_t buflen); + +#define libssh2_channel_write(channel, buf, buflen) \ + libssh2_channel_write_ex((channel), 0, \ + (buf), (buflen)) +#define libssh2_channel_write_stderr(channel, buf, buflen) \ + libssh2_channel_write_ex((channel), SSH_EXTENDED_DATA_STDERR, \ + (buf), (buflen)) + +LIBSSH2_API unsigned long +libssh2_channel_window_write_ex(LIBSSH2_CHANNEL *channel, + unsigned long *window_size_initial); +#define libssh2_channel_window_write(channel) \ + libssh2_channel_window_write_ex((channel), NULL) + +LIBSSH2_API void libssh2_session_set_blocking(LIBSSH2_SESSION* session, + int blocking); +LIBSSH2_API int libssh2_session_get_blocking(LIBSSH2_SESSION* session); + +LIBSSH2_API void libssh2_channel_set_blocking(LIBSSH2_CHANNEL *channel, + int blocking); + +LIBSSH2_API void libssh2_session_set_timeout(LIBSSH2_SESSION* session, + long timeout); +LIBSSH2_API long libssh2_session_get_timeout(LIBSSH2_SESSION* session); + +LIBSSH2_API void libssh2_session_set_read_timeout(LIBSSH2_SESSION* session, + long timeout); +LIBSSH2_API long libssh2_session_get_read_timeout(LIBSSH2_SESSION* session); + +#ifndef LIBSSH2_NO_DEPRECATED +LIBSSH2_DEPRECATED(1.1.0, "libssh2_channel_handle_extended_data2()") +LIBSSH2_API void libssh2_channel_handle_extended_data(LIBSSH2_CHANNEL *channel, + int ignore_mode); +#endif +LIBSSH2_API int libssh2_channel_handle_extended_data2(LIBSSH2_CHANNEL *channel, + int ignore_mode); + +#ifndef LIBSSH2_NO_DEPRECATED +/* libssh2_channel_ignore_extended_data() is defined below for BC with version + * 0.1 + * + * Future uses should use libssh2_channel_handle_extended_data() directly if + * LIBSSH2_CHANNEL_EXTENDED_DATA_MERGE is passed, extended data will be read + * (FIFO) from the standard data channel + */ +/* DEPRECATED since 0.3.0. Use libssh2_channel_handle_extended_data2(). */ +#define libssh2_channel_ignore_extended_data(channel, ignore) \ + libssh2_channel_handle_extended_data((channel), (ignore) ? \ + LIBSSH2_CHANNEL_EXTENDED_DATA_IGNORE : \ + LIBSSH2_CHANNEL_EXTENDED_DATA_NORMAL) +#endif + +#define LIBSSH2_CHANNEL_FLUSH_EXTENDED_DATA -1 +#define LIBSSH2_CHANNEL_FLUSH_ALL -2 +LIBSSH2_API int libssh2_channel_flush_ex(LIBSSH2_CHANNEL *channel, + int streamid); +#define libssh2_channel_flush(channel) libssh2_channel_flush_ex((channel), 0) +#define libssh2_channel_flush_stderr(channel) \ + libssh2_channel_flush_ex((channel), SSH_EXTENDED_DATA_STDERR) + +LIBSSH2_API int libssh2_channel_get_exit_status(LIBSSH2_CHANNEL* channel); +LIBSSH2_API int libssh2_channel_get_exit_signal(LIBSSH2_CHANNEL* channel, + char **exitsignal, + size_t *exitsignal_len, + char **errmsg, + size_t *errmsg_len, + char **langtag, + size_t *langtag_len); +LIBSSH2_API int libssh2_channel_send_eof(LIBSSH2_CHANNEL *channel); +LIBSSH2_API int libssh2_channel_eof(LIBSSH2_CHANNEL *channel); +LIBSSH2_API int libssh2_channel_wait_eof(LIBSSH2_CHANNEL *channel); +LIBSSH2_API int libssh2_channel_close(LIBSSH2_CHANNEL *channel); +LIBSSH2_API int libssh2_channel_wait_closed(LIBSSH2_CHANNEL *channel); +LIBSSH2_API int libssh2_channel_free(LIBSSH2_CHANNEL *channel); + +#ifndef LIBSSH2_NO_DEPRECATED +LIBSSH2_DEPRECATED(1.7.0, "Use libssh2_scp_recv2()") +LIBSSH2_API LIBSSH2_CHANNEL *libssh2_scp_recv(LIBSSH2_SESSION *session, + const char *path, + struct stat *sb); +#endif +/* Use libssh2_scp_recv2() for large (> 2GB) file support on windows */ +LIBSSH2_API LIBSSH2_CHANNEL *libssh2_scp_recv2(LIBSSH2_SESSION *session, + const char *path, + libssh2_struct_stat *sb); +LIBSSH2_API LIBSSH2_CHANNEL *libssh2_scp_send_ex(LIBSSH2_SESSION *session, + const char *path, int mode, + size_t size, long mtime, + long atime); +LIBSSH2_API LIBSSH2_CHANNEL * +libssh2_scp_send64(LIBSSH2_SESSION *session, const char *path, int mode, + libssh2_int64_t size, time_t mtime, time_t atime); + +#define libssh2_scp_send(session, path, mode, size) \ + libssh2_scp_send_ex((session), (path), (mode), (size), 0, 0) + +/* DEPRECATED */ +LIBSSH2_API int libssh2_base64_decode(LIBSSH2_SESSION *session, char **dest, + unsigned int *dest_len, + const char *src, unsigned int src_len); + +LIBSSH2_API +const char *libssh2_version(int req_version_num); + +typedef enum { + libssh2_no_crypto = 0, + libssh2_openssl, + libssh2_gcrypt, + libssh2_mbedtls, + libssh2_wincng, + libssh2_os400qc3 +} libssh2_crypto_engine_t; + +LIBSSH2_API +libssh2_crypto_engine_t libssh2_crypto_engine(void); + +#define HAVE_LIBSSH2_KNOWNHOST_API 0x010101 /* since 1.1.1 */ +#define HAVE_LIBSSH2_VERSION_API 0x010100 /* libssh2_version since 1.1 */ +#define HAVE_LIBSSH2_CRYPTOENGINE_API 0x011100 /* libssh2_crypto_engine + since 1.11 */ + +struct libssh2_knownhost { + unsigned int magic; /* magic stored by the library */ + void *node; /* handle to the internal representation of this host */ + char *name; /* this is NULL if no plain text host name exists */ + char *key; /* key in base64/printable format */ + int typemask; +}; + +/* + * libssh2_knownhost_init() + * + * Init a collection of known hosts. Returns the pointer to a collection. + * + */ +LIBSSH2_API LIBSSH2_KNOWNHOSTS * +libssh2_knownhost_init(LIBSSH2_SESSION *session); + +/* + * libssh2_knownhost_add() + * + * Add a host and its associated key to the collection of known hosts. + * + * The 'type' argument specifies on what format the given host and keys are: + * + * plain - ascii "hostname.domain.tld" + * sha1 - SHA1( ) base64-encoded! + * custom - another hash + * + * If 'sha1' is selected as type, the salt must be provided to the salt + * argument. This too base64 encoded. + * + * The SHA-1 hash is what OpenSSH can be told to use in known_hosts files. If + * a custom type is used, salt is ignored and you must provide the host + * pre-hashed when checking for it in the libssh2_knownhost_check() function. + * + * The keylen parameter may be omitted (zero) if the key is provided as a + * NULL-terminated base64-encoded string. + */ + +/* host format (2 bits) */ +#define LIBSSH2_KNOWNHOST_TYPE_MASK 0xffff +#define LIBSSH2_KNOWNHOST_TYPE_PLAIN 1 +#define LIBSSH2_KNOWNHOST_TYPE_SHA1 2 /* always base64 encoded */ +#define LIBSSH2_KNOWNHOST_TYPE_CUSTOM 3 + +/* key format (2 bits) */ +#define LIBSSH2_KNOWNHOST_KEYENC_MASK (3<<16) +#define LIBSSH2_KNOWNHOST_KEYENC_RAW (1<<16) +#define LIBSSH2_KNOWNHOST_KEYENC_BASE64 (2<<16) + +/* type of key (4 bits) */ +#define LIBSSH2_KNOWNHOST_KEY_MASK (15<<18) +#define LIBSSH2_KNOWNHOST_KEY_SHIFT 18 +#define LIBSSH2_KNOWNHOST_KEY_RSA1 (1<<18) +#define LIBSSH2_KNOWNHOST_KEY_SSHRSA (2<<18) +#define LIBSSH2_KNOWNHOST_KEY_SSHDSS (3<<18) /* deprecated */ +#define LIBSSH2_KNOWNHOST_KEY_ECDSA_256 (4<<18) +#define LIBSSH2_KNOWNHOST_KEY_ECDSA_384 (5<<18) +#define LIBSSH2_KNOWNHOST_KEY_ECDSA_521 (6<<18) +#define LIBSSH2_KNOWNHOST_KEY_ED25519 (7<<18) +#define LIBSSH2_KNOWNHOST_KEY_UNKNOWN (15<<18) + +LIBSSH2_API int +libssh2_knownhost_add(LIBSSH2_KNOWNHOSTS *hosts, + const char *host, + const char *salt, + const char *key, size_t keylen, int typemask, + struct libssh2_knownhost **store); + +/* + * libssh2_knownhost_addc() + * + * Add a host and its associated key to the collection of known hosts. + * + * Takes a comment argument that may be NULL. A NULL comment indicates + * there is no comment and the entry will end directly after the key + * when written out to a file. An empty string "" comment will indicate an + * empty comment which will cause a single space to be written after the key. + * + * The 'type' argument specifies on what format the given host and keys are: + * + * plain - ascii "hostname.domain.tld" + * sha1 - SHA1( ) base64-encoded! + * custom - another hash + * + * If 'sha1' is selected as type, the salt must be provided to the salt + * argument. This too base64 encoded. + * + * The SHA-1 hash is what OpenSSH can be told to use in known_hosts files. + * If a custom type is used, salt is ignored and you must provide the host + * pre-hashed when checking for it in the libssh2_knownhost_check() function. + * + * The keylen parameter may be omitted (zero) if the key is provided as a + * NULL-terminated base64-encoded string. + */ + +LIBSSH2_API int +libssh2_knownhost_addc(LIBSSH2_KNOWNHOSTS *hosts, + const char *host, + const char *salt, + const char *key, size_t keylen, + const char *comment, size_t commentlen, int typemask, + struct libssh2_knownhost **store); + +/* + * libssh2_knownhost_check() + * + * Check a host and its associated key against the collection of known hosts. + * + * The type is the type/format of the given host name. + * + * plain - ascii "hostname.domain.tld" + * custom - prehashed base64 encoded. Note that this cannot use any salts. + * + * + * 'knownhost' may be set to NULL if you don't care about that info. + * + * Returns: + * + * LIBSSH2_KNOWNHOST_CHECK_* values, see below + * + */ + +#define LIBSSH2_KNOWNHOST_CHECK_MATCH 0 +#define LIBSSH2_KNOWNHOST_CHECK_MISMATCH 1 +#define LIBSSH2_KNOWNHOST_CHECK_NOTFOUND 2 +#define LIBSSH2_KNOWNHOST_CHECK_FAILURE 3 + +LIBSSH2_API int +libssh2_knownhost_check(LIBSSH2_KNOWNHOSTS *hosts, + const char *host, const char *key, size_t keylen, + int typemask, + struct libssh2_knownhost **knownhost); + +/* this function is identital to the above one, but also takes a port + argument that allows libssh2 to do a better check */ +LIBSSH2_API int +libssh2_knownhost_checkp(LIBSSH2_KNOWNHOSTS *hosts, + const char *host, int port, + const char *key, size_t keylen, + int typemask, + struct libssh2_knownhost **knownhost); + +/* + * libssh2_knownhost_del() + * + * Remove a host from the collection of known hosts. The 'entry' struct is + * retrieved by a call to libssh2_knownhost_check(). + * + */ +LIBSSH2_API int +libssh2_knownhost_del(LIBSSH2_KNOWNHOSTS *hosts, + struct libssh2_knownhost *entry); + +/* + * libssh2_knownhost_free() + * + * Free an entire collection of known hosts. + * + */ +LIBSSH2_API void +libssh2_knownhost_free(LIBSSH2_KNOWNHOSTS *hosts); + +/* + * libssh2_knownhost_readline() + * + * Pass in a line of a file of 'type'. It makes libssh2 read this line. + * + * LIBSSH2_KNOWNHOST_FILE_OPENSSH is the only supported type. + * + */ +LIBSSH2_API int +libssh2_knownhost_readline(LIBSSH2_KNOWNHOSTS *hosts, + const char *line, size_t len, int type); + +/* + * libssh2_knownhost_readfile() + * + * Add hosts+key pairs from a given file. + * + * Returns a negative value for error or number of successfully added hosts. + * + * This implementation currently only knows one 'type' (openssh), all others + * are reserved for future use. + */ + +#define LIBSSH2_KNOWNHOST_FILE_OPENSSH 1 + +LIBSSH2_API int +libssh2_knownhost_readfile(LIBSSH2_KNOWNHOSTS *hosts, + const char *filename, int type); + +/* + * libssh2_knownhost_writeline() + * + * Ask libssh2 to convert a known host to an output line for storage. + * + * Note that this function returns LIBSSH2_ERROR_BUFFER_TOO_SMALL if the given + * output buffer is too small to hold the desired output. + * + * This implementation currently only knows one 'type' (openssh), all others + * are reserved for future use. + * + */ +LIBSSH2_API int +libssh2_knownhost_writeline(LIBSSH2_KNOWNHOSTS *hosts, + struct libssh2_knownhost *known, + char *buffer, size_t buflen, + size_t *outlen, /* the amount of written data */ + int type); + +/* + * libssh2_knownhost_writefile() + * + * Write hosts+key pairs to a given file. + * + * This implementation currently only knows one 'type' (openssh), all others + * are reserved for future use. + */ + +LIBSSH2_API int +libssh2_knownhost_writefile(LIBSSH2_KNOWNHOSTS *hosts, + const char *filename, int type); + +/* + * libssh2_knownhost_get() + * + * Traverse the internal list of known hosts. Pass NULL to 'prev' to get + * the first one. Or pass a pointer to the previously returned one to get the + * next. + * + * Returns: + * 0 if a fine host was stored in 'store' + * 1 if end of hosts + * [negative] on errors + */ +LIBSSH2_API int +libssh2_knownhost_get(LIBSSH2_KNOWNHOSTS *hosts, + struct libssh2_knownhost **store, + struct libssh2_knownhost *prev); + +#define HAVE_LIBSSH2_AGENT_API 0x010202 /* since 1.2.2 */ + +struct libssh2_agent_publickey { + unsigned int magic; /* magic stored by the library */ + void *node; /* handle to the internal representation of key */ + unsigned char *blob; /* public key blob */ + size_t blob_len; /* length of the public key blob */ + char *comment; /* comment in printable format */ +}; + +/* + * libssh2_agent_init() + * + * Init an ssh-agent handle. Returns the pointer to the handle. + * + */ +LIBSSH2_API LIBSSH2_AGENT * +libssh2_agent_init(LIBSSH2_SESSION *session); + +/* + * libssh2_agent_connect() + * + * Connect to an ssh-agent. + * + * Returns 0 if succeeded, or a negative value for error. + */ +LIBSSH2_API int +libssh2_agent_connect(LIBSSH2_AGENT *agent); + +/* + * libssh2_agent_list_identities() + * + * Request an ssh-agent to list identities. + * + * Returns 0 if succeeded, or a negative value for error. + */ +LIBSSH2_API int +libssh2_agent_list_identities(LIBSSH2_AGENT *agent); + +/* + * libssh2_agent_get_identity() + * + * Traverse the internal list of public keys. Pass NULL to 'prev' to get + * the first one. Or pass a pointer to the previously returned one to get the + * next. + * + * Returns: + * 0 if a fine public key was stored in 'store' + * 1 if end of public keys + * [negative] on errors + */ +LIBSSH2_API int +libssh2_agent_get_identity(LIBSSH2_AGENT *agent, + struct libssh2_agent_publickey **store, + struct libssh2_agent_publickey *prev); + +/* + * libssh2_agent_userauth() + * + * Do publickey user authentication with the help of ssh-agent. + * + * Returns 0 if succeeded, or a negative value for error. + */ +LIBSSH2_API int +libssh2_agent_userauth(LIBSSH2_AGENT *agent, + const char *username, + struct libssh2_agent_publickey *identity); + +/* + * libssh2_agent_sign() + * + * Sign a payload using a system-installed ssh-agent. + * + * Returns 0 if succeeded, or a negative value for error. + */ +LIBSSH2_API int +libssh2_agent_sign(LIBSSH2_AGENT *agent, + struct libssh2_agent_publickey *identity, + unsigned char **sig, + size_t *s_len, + const unsigned char *data, + size_t d_len, + const char *method, + unsigned int method_len); + +/* + * libssh2_agent_disconnect() + * + * Close a connection to an ssh-agent. + * + * Returns 0 if succeeded, or a negative value for error. + */ +LIBSSH2_API int +libssh2_agent_disconnect(LIBSSH2_AGENT *agent); + +/* + * libssh2_agent_free() + * + * Free an ssh-agent handle. This function also frees the internal + * collection of public keys. + */ +LIBSSH2_API void +libssh2_agent_free(LIBSSH2_AGENT *agent); + +/* + * libssh2_agent_set_identity_path() + * + * Allows a custom agent identity socket path beyond SSH_AUTH_SOCK env + * + */ +LIBSSH2_API void +libssh2_agent_set_identity_path(LIBSSH2_AGENT *agent, + const char *path); + +/* + * libssh2_agent_get_identity_path() + * + * Returns the custom agent identity socket path if set + * + */ +LIBSSH2_API const char * +libssh2_agent_get_identity_path(LIBSSH2_AGENT *agent); + +/* + * libssh2_keepalive_config() + * + * Set how often keepalive messages should be sent. WANT_REPLY + * indicates whether the keepalive messages should request a response + * from the server. INTERVAL is number of seconds that can pass + * without any I/O, use 0 (the default) to disable keepalives. To + * avoid some busy-loop corner-cases, if you specify an interval of 1 + * it will be treated as 2. + * + * Note that non-blocking applications are responsible for sending the + * keepalive messages using libssh2_keepalive_send(). + */ +LIBSSH2_API void libssh2_keepalive_config(LIBSSH2_SESSION *session, + int want_reply, + unsigned int interval); + +/* + * libssh2_keepalive_send() + * + * Send a keepalive message if needed. SECONDS_TO_NEXT indicates how + * many seconds you can sleep after this call before you need to call + * it again. Returns 0 on success, or LIBSSH2_ERROR_SOCKET_SEND on + * I/O errors. + */ +LIBSSH2_API int libssh2_keepalive_send(LIBSSH2_SESSION *session, + int *seconds_to_next); + +/* NOTE NOTE NOTE + libssh2_trace() has no function in builds that aren't built with debug + enabled + */ +LIBSSH2_API int libssh2_trace(LIBSSH2_SESSION *session, int bitmask); +#define LIBSSH2_TRACE_TRANS (1<<1) +#define LIBSSH2_TRACE_KEX (1<<2) +#define LIBSSH2_TRACE_AUTH (1<<3) +#define LIBSSH2_TRACE_CONN (1<<4) +#define LIBSSH2_TRACE_SCP (1<<5) +#define LIBSSH2_TRACE_SFTP (1<<6) +#define LIBSSH2_TRACE_ERROR (1<<7) +#define LIBSSH2_TRACE_PUBLICKEY (1<<8) +#define LIBSSH2_TRACE_SOCKET (1<<9) + +typedef void (*libssh2_trace_handler_func)(LIBSSH2_SESSION*, + void *, + const char *, + size_t); +LIBSSH2_API int libssh2_trace_sethandler(LIBSSH2_SESSION *session, + void *context, + libssh2_trace_handler_func callback); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* !RC_INVOKED */ + +#endif /* LIBSSH2_H */ diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/include/libssh2_publickey.h b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/include/libssh2_publickey.h new file mode 100644 index 0000000000000000000000000000000000000000..566acd6533e28a0d257b28fab5069695e1f34bd4 --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/include/libssh2_publickey.h @@ -0,0 +1,128 @@ +/* Copyright (C) Sara Golemon + * All rights reserved. + * + * Redistribution and use in source and binary forms, + * with or without modification, are permitted provided + * that the following conditions are met: + * + * Redistributions of source code must retain the above + * copyright notice, this list of conditions and the + * following disclaimer. + * + * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * Neither the name of the copyright holder nor the names + * of any other contributors may be used to endorse or + * promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND + * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, + * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE + * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + */ + +/* Note: This include file is only needed for using the + * publickey SUBSYSTEM which is not the same as publickey + * authentication. For authentication you only need libssh2.h + * + * For more information on the publickey subsystem, + * refer to IETF draft: secsh-publickey + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef LIBSSH2_PUBLICKEY_H +#define LIBSSH2_PUBLICKEY_H 1 + +#include "libssh2.h" + +typedef struct _LIBSSH2_PUBLICKEY LIBSSH2_PUBLICKEY; + +typedef struct _libssh2_publickey_attribute { + const char *name; + unsigned long name_len; + const char *value; + unsigned long value_len; + char mandatory; +} libssh2_publickey_attribute; + +typedef struct _libssh2_publickey_list { + unsigned char *packet; /* For freeing */ + + const unsigned char *name; + unsigned long name_len; + const unsigned char *blob; + unsigned long blob_len; + unsigned long num_attrs; + libssh2_publickey_attribute *attrs; /* free me */ +} libssh2_publickey_list; + +/* Generally use the first macro here, but if both name and value are string + literals, you can use _fast() to take advantage of preprocessing */ +#define libssh2_publickey_attribute(name, value, mandatory) \ + { (name), strlen(name), (value), strlen(value), (mandatory) }, +#define libssh2_publickey_attribute_fast(name, value, mandatory) \ + { (name), sizeof(name) - 1, (value), sizeof(value) - 1, (mandatory) }, + +#ifdef __cplusplus +extern "C" { +#endif + +/* Publickey Subsystem */ +LIBSSH2_API LIBSSH2_PUBLICKEY * +libssh2_publickey_init(LIBSSH2_SESSION *session); + +LIBSSH2_API int +libssh2_publickey_add_ex(LIBSSH2_PUBLICKEY *pkey, + const unsigned char *name, + unsigned long name_len, + const unsigned char *blob, + unsigned long blob_len, char overwrite, + unsigned long num_attrs, + const libssh2_publickey_attribute attrs[]); +#define libssh2_publickey_add(pkey, name, blob, blob_len, overwrite, \ + num_attrs, attrs) \ + libssh2_publickey_add_ex((pkey), \ + (name), strlen(name), \ + (blob), (blob_len), \ + (overwrite), (num_attrs), (attrs)) + +LIBSSH2_API int libssh2_publickey_remove_ex(LIBSSH2_PUBLICKEY *pkey, + const unsigned char *name, + unsigned long name_len, + const unsigned char *blob, + unsigned long blob_len); +#define libssh2_publickey_remove(pkey, name, blob, blob_len) \ + libssh2_publickey_remove_ex((pkey), \ + (name), strlen(name), \ + (blob), (blob_len)) + +LIBSSH2_API int +libssh2_publickey_list_fetch(LIBSSH2_PUBLICKEY *pkey, + unsigned long *num_keys, + libssh2_publickey_list **pkey_list); +LIBSSH2_API void +libssh2_publickey_list_free(LIBSSH2_PUBLICKEY *pkey, + libssh2_publickey_list *pkey_list); + +LIBSSH2_API int libssh2_publickey_shutdown(LIBSSH2_PUBLICKEY *pkey); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* LIBSSH2_PUBLICKEY_H */ diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/include/libssh2_sftp.h b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/include/libssh2_sftp.h new file mode 100644 index 0000000000000000000000000000000000000000..ab7b0af4deb51441b30858550b79d2029db54c76 --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/include/libssh2_sftp.h @@ -0,0 +1,382 @@ +/* Copyright (C) Sara Golemon + * All rights reserved. + * + * Redistribution and use in source and binary forms, + * with or without modification, are permitted provided + * that the following conditions are met: + * + * Redistributions of source code must retain the above + * copyright notice, this list of conditions and the + * following disclaimer. + * + * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * Neither the name of the copyright holder nor the names + * of any other contributors may be used to endorse or + * promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND + * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, + * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE + * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef LIBSSH2_SFTP_H +#define LIBSSH2_SFTP_H 1 + +#include "libssh2.h" + +#ifndef _WIN32 +#include +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +/* Note: Version 6 was documented at the time of writing + * However it was marked as "DO NOT IMPLEMENT" due to pending changes + * + * Let's start with Version 3 (The version found in OpenSSH) and go from there + */ +#define LIBSSH2_SFTP_VERSION 3 + +typedef struct _LIBSSH2_SFTP LIBSSH2_SFTP; +typedef struct _LIBSSH2_SFTP_HANDLE LIBSSH2_SFTP_HANDLE; +typedef struct _LIBSSH2_SFTP_ATTRIBUTES LIBSSH2_SFTP_ATTRIBUTES; +typedef struct _LIBSSH2_SFTP_STATVFS LIBSSH2_SFTP_STATVFS; + +/* Flags for open_ex() */ +#define LIBSSH2_SFTP_OPENFILE 0 +#define LIBSSH2_SFTP_OPENDIR 1 + +/* Flags for rename_ex() */ +#define LIBSSH2_SFTP_RENAME_OVERWRITE 0x00000001 +#define LIBSSH2_SFTP_RENAME_ATOMIC 0x00000002 +#define LIBSSH2_SFTP_RENAME_NATIVE 0x00000004 + +/* Flags for stat_ex() */ +#define LIBSSH2_SFTP_STAT 0 +#define LIBSSH2_SFTP_LSTAT 1 +#define LIBSSH2_SFTP_SETSTAT 2 + +/* Flags for symlink_ex() */ +#define LIBSSH2_SFTP_SYMLINK 0 +#define LIBSSH2_SFTP_READLINK 1 +#define LIBSSH2_SFTP_REALPATH 2 + +/* Flags for sftp_mkdir() */ +#define LIBSSH2_SFTP_DEFAULT_MODE -1 + +/* SFTP attribute flag bits */ +#define LIBSSH2_SFTP_ATTR_SIZE 0x00000001 +#define LIBSSH2_SFTP_ATTR_UIDGID 0x00000002 +#define LIBSSH2_SFTP_ATTR_PERMISSIONS 0x00000004 +#define LIBSSH2_SFTP_ATTR_ACMODTIME 0x00000008 +#define LIBSSH2_SFTP_ATTR_EXTENDED 0x80000000 + +/* SFTP statvfs flag bits */ +#define LIBSSH2_SFTP_ST_RDONLY 0x00000001 +#define LIBSSH2_SFTP_ST_NOSUID 0x00000002 + +struct _LIBSSH2_SFTP_ATTRIBUTES { + /* If flags & ATTR_* bit is set, then the value in this struct will be + * meaningful Otherwise it should be ignored + */ + unsigned long flags; + + libssh2_uint64_t filesize; + unsigned long uid, gid; + unsigned long permissions; + unsigned long atime, mtime; +}; + +struct _LIBSSH2_SFTP_STATVFS { + libssh2_uint64_t f_bsize; /* file system block size */ + libssh2_uint64_t f_frsize; /* fragment size */ + libssh2_uint64_t f_blocks; /* size of fs in f_frsize units */ + libssh2_uint64_t f_bfree; /* # free blocks */ + libssh2_uint64_t f_bavail; /* # free blocks for non-root */ + libssh2_uint64_t f_files; /* # inodes */ + libssh2_uint64_t f_ffree; /* # free inodes */ + libssh2_uint64_t f_favail; /* # free inodes for non-root */ + libssh2_uint64_t f_fsid; /* file system ID */ + libssh2_uint64_t f_flag; /* mount flags */ + libssh2_uint64_t f_namemax; /* maximum filename length */ +}; + +/* SFTP filetypes */ +#define LIBSSH2_SFTP_TYPE_REGULAR 1 +#define LIBSSH2_SFTP_TYPE_DIRECTORY 2 +#define LIBSSH2_SFTP_TYPE_SYMLINK 3 +#define LIBSSH2_SFTP_TYPE_SPECIAL 4 +#define LIBSSH2_SFTP_TYPE_UNKNOWN 5 +#define LIBSSH2_SFTP_TYPE_SOCKET 6 +#define LIBSSH2_SFTP_TYPE_CHAR_DEVICE 7 +#define LIBSSH2_SFTP_TYPE_BLOCK_DEVICE 8 +#define LIBSSH2_SFTP_TYPE_FIFO 9 + +/* + * Reproduce the POSIX file modes here for systems that are not POSIX + * compliant. + * + * These is used in "permissions" of "struct _LIBSSH2_SFTP_ATTRIBUTES" + */ +/* File type */ +#define LIBSSH2_SFTP_S_IFMT 0170000 /* type of file mask */ +#define LIBSSH2_SFTP_S_IFIFO 0010000 /* named pipe (fifo) */ +#define LIBSSH2_SFTP_S_IFCHR 0020000 /* character special */ +#define LIBSSH2_SFTP_S_IFDIR 0040000 /* directory */ +#define LIBSSH2_SFTP_S_IFBLK 0060000 /* block special */ +#define LIBSSH2_SFTP_S_IFREG 0100000 /* regular */ +#define LIBSSH2_SFTP_S_IFLNK 0120000 /* symbolic link */ +#define LIBSSH2_SFTP_S_IFSOCK 0140000 /* socket */ + +/* File mode */ +/* Read, write, execute/search by owner */ +#define LIBSSH2_SFTP_S_IRWXU 0000700 /* RWX mask for owner */ +#define LIBSSH2_SFTP_S_IRUSR 0000400 /* R for owner */ +#define LIBSSH2_SFTP_S_IWUSR 0000200 /* W for owner */ +#define LIBSSH2_SFTP_S_IXUSR 0000100 /* X for owner */ +/* Read, write, execute/search by group */ +#define LIBSSH2_SFTP_S_IRWXG 0000070 /* RWX mask for group */ +#define LIBSSH2_SFTP_S_IRGRP 0000040 /* R for group */ +#define LIBSSH2_SFTP_S_IWGRP 0000020 /* W for group */ +#define LIBSSH2_SFTP_S_IXGRP 0000010 /* X for group */ +/* Read, write, execute/search by others */ +#define LIBSSH2_SFTP_S_IRWXO 0000007 /* RWX mask for other */ +#define LIBSSH2_SFTP_S_IROTH 0000004 /* R for other */ +#define LIBSSH2_SFTP_S_IWOTH 0000002 /* W for other */ +#define LIBSSH2_SFTP_S_IXOTH 0000001 /* X for other */ + +/* macros to check for specific file types, added in 1.2.5 */ +#define LIBSSH2_SFTP_S_ISLNK(m) \ + (((m) & LIBSSH2_SFTP_S_IFMT) == LIBSSH2_SFTP_S_IFLNK) +#define LIBSSH2_SFTP_S_ISREG(m) \ + (((m) & LIBSSH2_SFTP_S_IFMT) == LIBSSH2_SFTP_S_IFREG) +#define LIBSSH2_SFTP_S_ISDIR(m) \ + (((m) & LIBSSH2_SFTP_S_IFMT) == LIBSSH2_SFTP_S_IFDIR) +#define LIBSSH2_SFTP_S_ISCHR(m) \ + (((m) & LIBSSH2_SFTP_S_IFMT) == LIBSSH2_SFTP_S_IFCHR) +#define LIBSSH2_SFTP_S_ISBLK(m) \ + (((m) & LIBSSH2_SFTP_S_IFMT) == LIBSSH2_SFTP_S_IFBLK) +#define LIBSSH2_SFTP_S_ISFIFO(m) \ + (((m) & LIBSSH2_SFTP_S_IFMT) == LIBSSH2_SFTP_S_IFIFO) +#define LIBSSH2_SFTP_S_ISSOCK(m) \ + (((m) & LIBSSH2_SFTP_S_IFMT) == LIBSSH2_SFTP_S_IFSOCK) + +/* SFTP File Transfer Flags -- (e.g. flags parameter to sftp_open()) + * Danger will robinson... APPEND doesn't have any effect on OpenSSH servers */ +#define LIBSSH2_FXF_READ 0x00000001 +#define LIBSSH2_FXF_WRITE 0x00000002 +#define LIBSSH2_FXF_APPEND 0x00000004 +#define LIBSSH2_FXF_CREAT 0x00000008 +#define LIBSSH2_FXF_TRUNC 0x00000010 +#define LIBSSH2_FXF_EXCL 0x00000020 + +/* SFTP Status Codes (returned by libssh2_sftp_last_error() ) */ +#define LIBSSH2_FX_OK 0UL +#define LIBSSH2_FX_EOF 1UL +#define LIBSSH2_FX_NO_SUCH_FILE 2UL +#define LIBSSH2_FX_PERMISSION_DENIED 3UL +#define LIBSSH2_FX_FAILURE 4UL +#define LIBSSH2_FX_BAD_MESSAGE 5UL +#define LIBSSH2_FX_NO_CONNECTION 6UL +#define LIBSSH2_FX_CONNECTION_LOST 7UL +#define LIBSSH2_FX_OP_UNSUPPORTED 8UL +#define LIBSSH2_FX_INVALID_HANDLE 9UL +#define LIBSSH2_FX_NO_SUCH_PATH 10UL +#define LIBSSH2_FX_FILE_ALREADY_EXISTS 11UL +#define LIBSSH2_FX_WRITE_PROTECT 12UL +#define LIBSSH2_FX_NO_MEDIA 13UL +#define LIBSSH2_FX_NO_SPACE_ON_FILESYSTEM 14UL +#define LIBSSH2_FX_QUOTA_EXCEEDED 15UL +#define LIBSSH2_FX_UNKNOWN_PRINCIPLE 16UL /* Initial mis-spelling */ +#define LIBSSH2_FX_UNKNOWN_PRINCIPAL 16UL +#define LIBSSH2_FX_LOCK_CONFlICT 17UL /* Initial mis-spelling */ +#define LIBSSH2_FX_LOCK_CONFLICT 17UL +#define LIBSSH2_FX_DIR_NOT_EMPTY 18UL +#define LIBSSH2_FX_NOT_A_DIRECTORY 19UL +#define LIBSSH2_FX_INVALID_FILENAME 20UL +#define LIBSSH2_FX_LINK_LOOP 21UL + +/* Returned by any function that would block during a read/write operation */ +#define LIBSSH2SFTP_EAGAIN LIBSSH2_ERROR_EAGAIN + +/* SFTP API */ +LIBSSH2_API LIBSSH2_SFTP *libssh2_sftp_init(LIBSSH2_SESSION *session); +LIBSSH2_API int libssh2_sftp_shutdown(LIBSSH2_SFTP *sftp); +LIBSSH2_API unsigned long libssh2_sftp_last_error(LIBSSH2_SFTP *sftp); +LIBSSH2_API LIBSSH2_CHANNEL *libssh2_sftp_get_channel(LIBSSH2_SFTP *sftp); + +/* File / Directory Ops */ +LIBSSH2_API LIBSSH2_SFTP_HANDLE * +libssh2_sftp_open_ex(LIBSSH2_SFTP *sftp, + const char *filename, + unsigned int filename_len, + unsigned long flags, + long mode, int open_type); +#define libssh2_sftp_open(sftp, filename, flags, mode) \ + libssh2_sftp_open_ex((sftp), \ + (filename), (unsigned int)strlen(filename), \ + (flags), (mode), LIBSSH2_SFTP_OPENFILE) +#define libssh2_sftp_opendir(sftp, path) \ + libssh2_sftp_open_ex((sftp), \ + (path), (unsigned int)strlen(path), \ + 0, 0, LIBSSH2_SFTP_OPENDIR) +LIBSSH2_API LIBSSH2_SFTP_HANDLE * +libssh2_sftp_open_ex_r(LIBSSH2_SFTP *sftp, + const char *filename, + size_t filename_len, + unsigned long flags, + long mode, int open_type, + LIBSSH2_SFTP_ATTRIBUTES *attrs); +#define libssh2_sftp_open_r(sftp, filename, flags, mode, attrs) \ + libssh2_sftp_open_ex_r((sftp), (filename), strlen(filename), \ + (flags), (mode), LIBSSH2_SFTP_OPENFILE, \ + (attrs)) + +LIBSSH2_API ssize_t libssh2_sftp_read(LIBSSH2_SFTP_HANDLE *handle, + char *buffer, size_t buffer_maxlen); + +LIBSSH2_API int libssh2_sftp_readdir_ex(LIBSSH2_SFTP_HANDLE *handle, \ + char *buffer, size_t buffer_maxlen, + char *longentry, + size_t longentry_maxlen, + LIBSSH2_SFTP_ATTRIBUTES *attrs); +#define libssh2_sftp_readdir(handle, buffer, buffer_maxlen, attrs) \ + libssh2_sftp_readdir_ex((handle), (buffer), (buffer_maxlen), NULL, 0, \ + (attrs)) + +LIBSSH2_API ssize_t libssh2_sftp_write(LIBSSH2_SFTP_HANDLE *handle, + const char *buffer, size_t count); +LIBSSH2_API int libssh2_sftp_fsync(LIBSSH2_SFTP_HANDLE *handle); + +LIBSSH2_API int libssh2_sftp_close_handle(LIBSSH2_SFTP_HANDLE *handle); +#define libssh2_sftp_close(handle) libssh2_sftp_close_handle(handle) +#define libssh2_sftp_closedir(handle) libssh2_sftp_close_handle(handle) + +LIBSSH2_API void libssh2_sftp_seek(LIBSSH2_SFTP_HANDLE *handle, size_t offset); +LIBSSH2_API void libssh2_sftp_seek64(LIBSSH2_SFTP_HANDLE *handle, + libssh2_uint64_t offset); +#define libssh2_sftp_rewind(handle) libssh2_sftp_seek64((handle), 0) + +LIBSSH2_API size_t libssh2_sftp_tell(LIBSSH2_SFTP_HANDLE *handle); +LIBSSH2_API libssh2_uint64_t libssh2_sftp_tell64(LIBSSH2_SFTP_HANDLE *handle); + +LIBSSH2_API int libssh2_sftp_fstat_ex(LIBSSH2_SFTP_HANDLE *handle, + LIBSSH2_SFTP_ATTRIBUTES *attrs, + int setstat); +#define libssh2_sftp_fstat(handle, attrs) \ + libssh2_sftp_fstat_ex((handle), (attrs), 0) +#define libssh2_sftp_fsetstat(handle, attrs) \ + libssh2_sftp_fstat_ex((handle), (attrs), 1) + +/* Miscellaneous Ops */ +LIBSSH2_API int libssh2_sftp_rename_ex(LIBSSH2_SFTP *sftp, + const char *source_filename, + unsigned int srouce_filename_len, + const char *dest_filename, + unsigned int dest_filename_len, + long flags); +#define libssh2_sftp_rename(sftp, sourcefile, destfile) \ + libssh2_sftp_rename_ex((sftp), \ + (sourcefile), (unsigned int)strlen(sourcefile), \ + (destfile), (unsigned int)strlen(destfile), \ + LIBSSH2_SFTP_RENAME_OVERWRITE | \ + LIBSSH2_SFTP_RENAME_ATOMIC | \ + LIBSSH2_SFTP_RENAME_NATIVE) + +LIBSSH2_API int libssh2_sftp_posix_rename_ex(LIBSSH2_SFTP *sftp, + const char *source_filename, + size_t srouce_filename_len, + const char *dest_filename, + size_t dest_filename_len); +#define libssh2_sftp_posix_rename(sftp, sourcefile, destfile) \ + libssh2_sftp_posix_rename_ex((sftp), (sourcefile), strlen(sourcefile), \ + (destfile), strlen(destfile)) + +LIBSSH2_API int libssh2_sftp_unlink_ex(LIBSSH2_SFTP *sftp, + const char *filename, + unsigned int filename_len); +#define libssh2_sftp_unlink(sftp, filename) \ + libssh2_sftp_unlink_ex((sftp), (filename), (unsigned int)strlen(filename)) + +LIBSSH2_API int libssh2_sftp_fstatvfs(LIBSSH2_SFTP_HANDLE *handle, + LIBSSH2_SFTP_STATVFS *st); + +LIBSSH2_API int libssh2_sftp_statvfs(LIBSSH2_SFTP *sftp, + const char *path, + size_t path_len, + LIBSSH2_SFTP_STATVFS *st); + +LIBSSH2_API int libssh2_sftp_mkdir_ex(LIBSSH2_SFTP *sftp, + const char *path, + unsigned int path_len, long mode); +#define libssh2_sftp_mkdir(sftp, path, mode) \ + libssh2_sftp_mkdir_ex((sftp), (path), (unsigned int)strlen(path), (mode)) + +LIBSSH2_API int libssh2_sftp_rmdir_ex(LIBSSH2_SFTP *sftp, + const char *path, + unsigned int path_len); +#define libssh2_sftp_rmdir(sftp, path) \ + libssh2_sftp_rmdir_ex((sftp), (path), (unsigned int)strlen(path)) + +LIBSSH2_API int libssh2_sftp_stat_ex(LIBSSH2_SFTP *sftp, + const char *path, + unsigned int path_len, + int stat_type, + LIBSSH2_SFTP_ATTRIBUTES *attrs); +#define libssh2_sftp_stat(sftp, path, attrs) \ + libssh2_sftp_stat_ex((sftp), (path), (unsigned int)strlen(path), \ + LIBSSH2_SFTP_STAT, (attrs)) +#define libssh2_sftp_lstat(sftp, path, attrs) \ + libssh2_sftp_stat_ex((sftp), (path), (unsigned int)strlen(path), \ + LIBSSH2_SFTP_LSTAT, (attrs)) +#define libssh2_sftp_setstat(sftp, path, attrs) \ + libssh2_sftp_stat_ex((sftp), (path), (unsigned int)strlen(path), \ + LIBSSH2_SFTP_SETSTAT, (attrs)) + +LIBSSH2_API int libssh2_sftp_symlink_ex(LIBSSH2_SFTP *sftp, + const char *path, + unsigned int path_len, + char *target, + unsigned int target_len, + int link_type); +#define libssh2_sftp_symlink(sftp, orig, linkpath) \ + libssh2_sftp_symlink_ex((sftp), \ + (orig), (unsigned int)strlen(orig), \ + (linkpath), (unsigned int)strlen(linkpath), \ + LIBSSH2_SFTP_SYMLINK) +#define libssh2_sftp_readlink(sftp, path, target, maxlen) \ + libssh2_sftp_symlink_ex((sftp), \ + (path), (unsigned int)strlen(path), \ + (target), (maxlen), \ + LIBSSH2_SFTP_READLINK) +#define libssh2_sftp_realpath(sftp, path, target, maxlen) \ + libssh2_sftp_symlink_ex((sftp), \ + (path), (unsigned int)strlen(path), \ + (target), (maxlen), \ + LIBSSH2_SFTP_REALPATH) + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* LIBSSH2_SFTP_H */ diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/info/about.json b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/info/about.json new file mode 100644 index 0000000000000000000000000000000000000000..585fa473121fc878ef7c1af9416ff35dce74095e --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/info/about.json @@ -0,0 +1,131 @@ +{ + "channels": [ + "https://repo.anaconda.com/pkgs/main" + ], + "conda_build_version": "24.1.2", + "conda_version": "24.1.2", + "description": "libssh2 is a library implementing the SSH2 protocol, available under the revised BSD license.\n", + "dev_url": "https://github.com/libssh2/libssh2", + "doc_url": "https://www.libssh2.org/docs.html", + "env_vars": { + "CIO_TEST": "" + }, + "extra": { + "copy_test_source_files": true, + "final": true, + "flow_run_id": "4b0cea38-9e15-42af-bd4a-1ec053c9b0d5", + "recipe-maintainers": [ + "shadowwalkersb" + ], + "remote_url": "git@github.com:AnacondaRecipes/libssh2-feedstock.git", + "sha": "ccf17c18a57eafac668302e8b68bd89ce4526611" + }, + "home": "https://www.libssh2.org/", + "identifiers": [], + "keywords": [], + "license": "BSD-3-Clause", + "license_family": "BSD", + "license_file": "COPYING", + "root_pkgs": [ + "_libgcc_mutex 0.1 main", + "_openmp_mutex 5.1 1_gnu", + "archspec 0.2.1 pyhd3eb1b0_0", + "boltons 23.0.0 py39h06a4308_0", + "brotli-python 1.0.9 py39h6a678d5_7", + "bzip2 1.0.8 h7b6447c_0", + "c-ares 1.19.1 h5eee18b_0", + "charset-normalizer 2.0.4 pyhd3eb1b0_0", + "conda-content-trust 0.2.0 py39h06a4308_0", + "conda-package-handling 2.2.0 py39h06a4308_0", + "conda-package-streaming 0.9.0 py39h06a4308_0", + "fmt 9.1.0 hdb19cb5_0", + "icu 73.1 h6a678d5_0", + "idna 3.4 py39h06a4308_0", + "jsonpatch 1.32 pyhd3eb1b0_0", + "jsonpointer 2.1 pyhd3eb1b0_0", + "krb5 1.20.1 h143b758_1", + "ld_impl_linux-64 2.38 h1181459_1", + "libarchive 3.6.2 h6ac8c49_2", + "libev 4.33 h7f8727e_1", + "libffi 3.4.4 h6a678d5_0", + "libgcc-ng 11.2.0 h1234567_1", + "libgomp 11.2.0 h1234567_1", + "libnghttp2 1.57.0 h2d74bed_0", + "libsolv 0.7.24 he621ea3_0", + "libssh2 1.10.0 hdbd6064_2", + "libstdcxx-ng 11.2.0 h1234567_1", + "libxml2 2.10.4 hf1b16e4_1", + "lz4-c 1.9.4 h6a678d5_0", + "ncurses 6.4 h6a678d5_0", + "packaging 23.1 py39h06a4308_0", + "pcre2 10.42 hebb0a14_0", + "pluggy 1.0.0 py39h06a4308_1", + "pybind11-abi 4 hd3eb1b0_1", + "pycosat 0.6.6 py39h5eee18b_0", + "pycparser 2.21 pyhd3eb1b0_0", + "pysocks 1.7.1 py39h06a4308_0", + "python 3.9.18 h955ad1f_0", + "readline 8.2 h5eee18b_0", + "reproc 14.2.4 h295c915_1", + "reproc-cpp 14.2.4 h295c915_1", + "ruamel.yaml 0.17.21 py39h5eee18b_0", + "ruamel.yaml.clib 0.2.6 py39h5eee18b_1", + "sqlite 3.41.2 h5eee18b_0", + "tk 8.6.12 h1ccaba5_0", + "tqdm 4.65.0 py39hb070fc8_0", + "wheel 0.41.2 py39h06a4308_0", + "yaml-cpp 0.8.0 h6a678d5_0", + "zlib 1.2.13 h5eee18b_0", + "zstandard 0.19.0 py39h5eee18b_0", + "zstd 1.5.5 hc292b87_0", + "attrs 23.1.0 py39h06a4308_0", + "beautifulsoup4 4.12.2 py39h06a4308_0", + "ca-certificates 2023.12.12 h06a4308_0", + "certifi 2024.2.2 py39h06a4308_0", + "cffi 1.16.0 py39h5eee18b_0", + "chardet 4.0.0 py39h06a4308_1003", + "click 8.1.7 py39h06a4308_0", + "conda 24.1.2 py39h06a4308_0", + "conda-build 24.1.2 py39h06a4308_0", + "conda-index 0.4.0 pyhd3eb1b0_0", + "conda-libmamba-solver 24.1.0 pyhd3eb1b0_0", + "cryptography 42.0.2 py39hdda0065_0", + "distro 1.8.0 py39h06a4308_0", + "filelock 3.13.1 py39h06a4308_0", + "jinja2 3.1.3 py39h06a4308_0", + "jsonschema 4.19.2 py39h06a4308_0", + "jsonschema-specifications 2023.7.1 py39h06a4308_0", + "libcurl 8.5.0 h251f7ec_0", + "libedit 3.1.20230828 h5eee18b_0", + "liblief 0.12.3 h6a678d5_0", + "libmamba 1.5.6 haf1ee3a_0", + "libmambapy 1.5.6 py39h2dafd23_0", + "markupsafe 2.1.3 py39h5eee18b_0", + "menuinst 2.0.2 py39h06a4308_0", + "more-itertools 10.1.0 py39h06a4308_0", + "openssl 3.0.13 h7f8727e_0", + "patch 2.7.6 h7b6447c_1001", + "patchelf 0.17.2 h6a678d5_0", + "pip 23.3.1 py39h06a4308_0", + "pkginfo 1.9.6 py39h06a4308_0", + "platformdirs 3.10.0 py39h06a4308_0", + "psutil 5.9.0 py39h5eee18b_0", + "py-lief 0.12.3 py39h6a678d5_0", + "pyopenssl 24.0.0 py39h06a4308_0", + "python-libarchive-c 2.9 pyhd3eb1b0_1", + "pytz 2023.3.post1 py39h06a4308_0", + "pyyaml 6.0.1 py39h5eee18b_0", + "referencing 0.30.2 py39h06a4308_0", + "requests 2.31.0 py39h06a4308_1", + "rpds-py 0.10.6 py39hb02cf49_0", + "setuptools 68.2.2 py39h06a4308_0", + "soupsieve 2.5 py39h06a4308_0", + "tomli 2.0.1 py39h06a4308_0", + "tzdata 2023d h04d1e81_0", + "urllib3 2.1.0 py39h06a4308_1", + "xz 5.4.5 h5eee18b_0", + "yaml 0.2.5 h7b6447c_0" + ], + "summary": "the SSH library", + "tags": [] +} \ No newline at end of file diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/info/files b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/info/files new file mode 100644 index 0000000000000000000000000000000000000000..265b3cc28617e4cfd073eb49b07eb9c7f9408cbd --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/info/files @@ -0,0 +1,207 @@ +include/libssh2.h +include/libssh2_publickey.h +include/libssh2_sftp.h +lib/cmake/libssh2/FindLibgcrypt.cmake +lib/cmake/libssh2/FindMbedTLS.cmake +lib/cmake/libssh2/FindWolfSSL.cmake +lib/cmake/libssh2/libssh2-config-version.cmake +lib/cmake/libssh2/libssh2-config.cmake +lib/cmake/libssh2/libssh2-targets-noconfig.cmake +lib/cmake/libssh2/libssh2-targets.cmake +lib/libssh2.so +lib/libssh2.so.1 +lib/libssh2.so.1.0.1 +lib/pkgconfig/libssh2.pc +share/doc/libssh2/AUTHORS +share/doc/libssh2/BINDINGS.md +share/doc/libssh2/COPYING +share/doc/libssh2/HACKING.md +share/doc/libssh2/NEWS +share/doc/libssh2/README +share/doc/libssh2/RELEASE-NOTES +share/man/man3/libssh2_agent_connect.3 +share/man/man3/libssh2_agent_disconnect.3 +share/man/man3/libssh2_agent_free.3 +share/man/man3/libssh2_agent_get_identity.3 +share/man/man3/libssh2_agent_get_identity_path.3 +share/man/man3/libssh2_agent_init.3 +share/man/man3/libssh2_agent_list_identities.3 +share/man/man3/libssh2_agent_set_identity_path.3 +share/man/man3/libssh2_agent_sign.3 +share/man/man3/libssh2_agent_userauth.3 +share/man/man3/libssh2_banner_set.3 +share/man/man3/libssh2_base64_decode.3 +share/man/man3/libssh2_channel_close.3 +share/man/man3/libssh2_channel_direct_streamlocal_ex.3 +share/man/man3/libssh2_channel_direct_tcpip.3 +share/man/man3/libssh2_channel_direct_tcpip_ex.3 +share/man/man3/libssh2_channel_eof.3 +share/man/man3/libssh2_channel_exec.3 +share/man/man3/libssh2_channel_flush.3 +share/man/man3/libssh2_channel_flush_ex.3 +share/man/man3/libssh2_channel_flush_stderr.3 +share/man/man3/libssh2_channel_forward_accept.3 +share/man/man3/libssh2_channel_forward_cancel.3 +share/man/man3/libssh2_channel_forward_listen.3 +share/man/man3/libssh2_channel_forward_listen_ex.3 +share/man/man3/libssh2_channel_free.3 +share/man/man3/libssh2_channel_get_exit_signal.3 +share/man/man3/libssh2_channel_get_exit_status.3 +share/man/man3/libssh2_channel_handle_extended_data.3 +share/man/man3/libssh2_channel_handle_extended_data2.3 +share/man/man3/libssh2_channel_ignore_extended_data.3 +share/man/man3/libssh2_channel_open_ex.3 +share/man/man3/libssh2_channel_open_session.3 +share/man/man3/libssh2_channel_process_startup.3 +share/man/man3/libssh2_channel_read.3 +share/man/man3/libssh2_channel_read_ex.3 +share/man/man3/libssh2_channel_read_stderr.3 +share/man/man3/libssh2_channel_receive_window_adjust.3 +share/man/man3/libssh2_channel_receive_window_adjust2.3 +share/man/man3/libssh2_channel_request_auth_agent.3 +share/man/man3/libssh2_channel_request_pty.3 +share/man/man3/libssh2_channel_request_pty_ex.3 +share/man/man3/libssh2_channel_request_pty_size.3 +share/man/man3/libssh2_channel_request_pty_size_ex.3 +share/man/man3/libssh2_channel_send_eof.3 +share/man/man3/libssh2_channel_set_blocking.3 +share/man/man3/libssh2_channel_setenv.3 +share/man/man3/libssh2_channel_setenv_ex.3 +share/man/man3/libssh2_channel_shell.3 +share/man/man3/libssh2_channel_signal_ex.3 +share/man/man3/libssh2_channel_subsystem.3 +share/man/man3/libssh2_channel_wait_closed.3 +share/man/man3/libssh2_channel_wait_eof.3 +share/man/man3/libssh2_channel_window_read.3 +share/man/man3/libssh2_channel_window_read_ex.3 +share/man/man3/libssh2_channel_window_write.3 +share/man/man3/libssh2_channel_window_write_ex.3 +share/man/man3/libssh2_channel_write.3 +share/man/man3/libssh2_channel_write_ex.3 +share/man/man3/libssh2_channel_write_stderr.3 +share/man/man3/libssh2_channel_x11_req.3 +share/man/man3/libssh2_channel_x11_req_ex.3 +share/man/man3/libssh2_crypto_engine.3 +share/man/man3/libssh2_exit.3 +share/man/man3/libssh2_free.3 +share/man/man3/libssh2_hostkey_hash.3 +share/man/man3/libssh2_init.3 +share/man/man3/libssh2_keepalive_config.3 +share/man/man3/libssh2_keepalive_send.3 +share/man/man3/libssh2_knownhost_add.3 +share/man/man3/libssh2_knownhost_addc.3 +share/man/man3/libssh2_knownhost_check.3 +share/man/man3/libssh2_knownhost_checkp.3 +share/man/man3/libssh2_knownhost_del.3 +share/man/man3/libssh2_knownhost_free.3 +share/man/man3/libssh2_knownhost_get.3 +share/man/man3/libssh2_knownhost_init.3 +share/man/man3/libssh2_knownhost_readfile.3 +share/man/man3/libssh2_knownhost_readline.3 +share/man/man3/libssh2_knownhost_writefile.3 +share/man/man3/libssh2_knownhost_writeline.3 +share/man/man3/libssh2_poll.3 +share/man/man3/libssh2_poll_channel_read.3 +share/man/man3/libssh2_publickey_add.3 +share/man/man3/libssh2_publickey_add_ex.3 +share/man/man3/libssh2_publickey_init.3 +share/man/man3/libssh2_publickey_list_fetch.3 +share/man/man3/libssh2_publickey_list_free.3 +share/man/man3/libssh2_publickey_remove.3 +share/man/man3/libssh2_publickey_remove_ex.3 +share/man/man3/libssh2_publickey_shutdown.3 +share/man/man3/libssh2_scp_recv.3 +share/man/man3/libssh2_scp_recv2.3 +share/man/man3/libssh2_scp_send.3 +share/man/man3/libssh2_scp_send64.3 +share/man/man3/libssh2_scp_send_ex.3 +share/man/man3/libssh2_session_abstract.3 +share/man/man3/libssh2_session_banner_get.3 +share/man/man3/libssh2_session_banner_set.3 +share/man/man3/libssh2_session_block_directions.3 +share/man/man3/libssh2_session_callback_set.3 +share/man/man3/libssh2_session_callback_set2.3 +share/man/man3/libssh2_session_disconnect.3 +share/man/man3/libssh2_session_disconnect_ex.3 +share/man/man3/libssh2_session_flag.3 +share/man/man3/libssh2_session_free.3 +share/man/man3/libssh2_session_get_blocking.3 +share/man/man3/libssh2_session_get_read_timeout.3 +share/man/man3/libssh2_session_get_timeout.3 +share/man/man3/libssh2_session_handshake.3 +share/man/man3/libssh2_session_hostkey.3 +share/man/man3/libssh2_session_init.3 +share/man/man3/libssh2_session_init_ex.3 +share/man/man3/libssh2_session_last_errno.3 +share/man/man3/libssh2_session_last_error.3 +share/man/man3/libssh2_session_method_pref.3 +share/man/man3/libssh2_session_methods.3 +share/man/man3/libssh2_session_set_blocking.3 +share/man/man3/libssh2_session_set_last_error.3 +share/man/man3/libssh2_session_set_read_timeout.3 +share/man/man3/libssh2_session_set_timeout.3 +share/man/man3/libssh2_session_startup.3 +share/man/man3/libssh2_session_supported_algs.3 +share/man/man3/libssh2_sftp_close.3 +share/man/man3/libssh2_sftp_close_handle.3 +share/man/man3/libssh2_sftp_closedir.3 +share/man/man3/libssh2_sftp_fsetstat.3 +share/man/man3/libssh2_sftp_fstat.3 +share/man/man3/libssh2_sftp_fstat_ex.3 +share/man/man3/libssh2_sftp_fstatvfs.3 +share/man/man3/libssh2_sftp_fsync.3 +share/man/man3/libssh2_sftp_get_channel.3 +share/man/man3/libssh2_sftp_init.3 +share/man/man3/libssh2_sftp_last_error.3 +share/man/man3/libssh2_sftp_lstat.3 +share/man/man3/libssh2_sftp_mkdir.3 +share/man/man3/libssh2_sftp_mkdir_ex.3 +share/man/man3/libssh2_sftp_open.3 +share/man/man3/libssh2_sftp_open_ex.3 +share/man/man3/libssh2_sftp_open_ex_r.3 +share/man/man3/libssh2_sftp_open_r.3 +share/man/man3/libssh2_sftp_opendir.3 +share/man/man3/libssh2_sftp_posix_rename.3 +share/man/man3/libssh2_sftp_posix_rename_ex.3 +share/man/man3/libssh2_sftp_read.3 +share/man/man3/libssh2_sftp_readdir.3 +share/man/man3/libssh2_sftp_readdir_ex.3 +share/man/man3/libssh2_sftp_readlink.3 +share/man/man3/libssh2_sftp_realpath.3 +share/man/man3/libssh2_sftp_rename.3 +share/man/man3/libssh2_sftp_rename_ex.3 +share/man/man3/libssh2_sftp_rewind.3 +share/man/man3/libssh2_sftp_rmdir.3 +share/man/man3/libssh2_sftp_rmdir_ex.3 +share/man/man3/libssh2_sftp_seek.3 +share/man/man3/libssh2_sftp_seek64.3 +share/man/man3/libssh2_sftp_setstat.3 +share/man/man3/libssh2_sftp_shutdown.3 +share/man/man3/libssh2_sftp_stat.3 +share/man/man3/libssh2_sftp_stat_ex.3 +share/man/man3/libssh2_sftp_statvfs.3 +share/man/man3/libssh2_sftp_symlink.3 +share/man/man3/libssh2_sftp_symlink_ex.3 +share/man/man3/libssh2_sftp_tell.3 +share/man/man3/libssh2_sftp_tell64.3 +share/man/man3/libssh2_sftp_unlink.3 +share/man/man3/libssh2_sftp_unlink_ex.3 +share/man/man3/libssh2_sftp_write.3 +share/man/man3/libssh2_sign_sk.3 +share/man/man3/libssh2_trace.3 +share/man/man3/libssh2_trace_sethandler.3 +share/man/man3/libssh2_userauth_authenticated.3 +share/man/man3/libssh2_userauth_banner.3 +share/man/man3/libssh2_userauth_hostbased_fromfile.3 +share/man/man3/libssh2_userauth_hostbased_fromfile_ex.3 +share/man/man3/libssh2_userauth_keyboard_interactive.3 +share/man/man3/libssh2_userauth_keyboard_interactive_ex.3 +share/man/man3/libssh2_userauth_list.3 +share/man/man3/libssh2_userauth_password.3 +share/man/man3/libssh2_userauth_password_ex.3 +share/man/man3/libssh2_userauth_publickey.3 +share/man/man3/libssh2_userauth_publickey_fromfile.3 +share/man/man3/libssh2_userauth_publickey_fromfile_ex.3 +share/man/man3/libssh2_userauth_publickey_frommemory.3 +share/man/man3/libssh2_userauth_publickey_sk.3 +share/man/man3/libssh2_version.3 diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/info/git b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/info/git new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/info/has_prefix b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/info/has_prefix new file mode 100644 index 0000000000000000000000000000000000000000..a3a8297415e455ea81354d4042f6e880af37a976 --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/info/has_prefix @@ -0,0 +1 @@ +/croot/libssh2_1732891098804/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold text lib/pkgconfig/libssh2.pc diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/info/hash_input.json b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/info/hash_input.json new file mode 100644 index 0000000000000000000000000000000000000000..af93a0161e6768cc294f7f147c10f4e499fcf0e9 --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/info/hash_input.json @@ -0,0 +1,8 @@ +{ + "channel_targets": "defaults", + "zlib": "1.2", + "c_compiler_version": "11.2.0", + "c_compiler": "gcc", + "openssl": "3.0", + "target_platform": "linux-64" +} \ No newline at end of file diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/info/index.json b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/info/index.json new file mode 100644 index 0000000000000000000000000000000000000000..2e87d258fc4bed70c894ad3794549ff8f95ecc78 --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/info/index.json @@ -0,0 +1,17 @@ +{ + "arch": "x86_64", + "build": "h251f7ec_0", + "build_number": 0, + "depends": [ + "libgcc-ng >=11.2.0", + "openssl >=3.0.15,<4.0a0", + "zlib >=1.2.13,<1.3.0a0" + ], + "license": "BSD-3-Clause", + "license_family": "BSD", + "name": "libssh2", + "platform": "linux", + "subdir": "linux-64", + "timestamp": 1732891131339, + "version": "1.11.1" +} \ No newline at end of file diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/info/licenses/COPYING b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/info/licenses/COPYING new file mode 100644 index 0000000000000000000000000000000000000000..6eb51468404b21423ff3d842adfab0cd475de13d --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/info/licenses/COPYING @@ -0,0 +1,43 @@ +/* Copyright (C) 2004-2007 Sara Golemon + * Copyright (C) 2005,2006 Mikhail Gusarov + * Copyright (C) 2006-2007 The Written Word, Inc. + * Copyright (C) 2007 Eli Fant + * Copyright (C) 2009-2023 Daniel Stenberg + * Copyright (C) 2008, 2009 Simon Josefsson + * Copyright (C) 2000 Markus Friedl + * Copyright (C) 2015 Microsoft Corp. + * All rights reserved. + * + * Redistribution and use in source and binary forms, + * with or without modification, are permitted provided + * that the following conditions are met: + * + * Redistributions of source code must retain the above + * copyright notice, this list of conditions and the + * following disclaimer. + * + * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * Neither the name of the copyright holder nor the names + * of any other contributors may be used to endorse or + * promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND + * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, + * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE + * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + */ diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/info/paths.json b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/info/paths.json new file mode 100644 index 0000000000000000000000000000000000000000..e1cc19e04086cd5f521a1f6a9483b1b2650cad47 --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/info/paths.json @@ -0,0 +1,1249 @@ +{ + "paths": [ + { + "_path": "include/libssh2.h", + "path_type": "hardlink", + "sha256": "86cc9fcfd0daa10ba25442e5ecea23db618027362bc85fdc591ec7f5d9d39a91", + "size_in_bytes": 60665 + }, + { + "_path": "include/libssh2_publickey.h", + "path_type": "hardlink", + "sha256": "f1cd086f3950e65635827ee3332c1c6ca62887c0f84369ec58e31974debb36e9", + "size_in_bytes": 4942 + }, + { + "_path": "include/libssh2_sftp.h", + "path_type": "hardlink", + "sha256": "b5d864f19af69521278ed953b20b76a32cfdc08014da81d38f59964e7e2e2575", + "size_in_bytes": 17369 + }, + { + "_path": "lib/cmake/libssh2/FindLibgcrypt.cmake", + "path_type": "hardlink", + "sha256": "a4641a39678e9aeebeee6fa05541511c6f97abfc14be8b79790c09f8cff3bdec", + "size_in_bytes": 2088 + }, + { + "_path": "lib/cmake/libssh2/FindMbedTLS.cmake", + "path_type": "hardlink", + "sha256": "09ea2a361669f33f1e430a84f30cfdb7c0729bba1265d86967592cc1e17c775c", + "size_in_bytes": 2400 + }, + { + "_path": "lib/cmake/libssh2/FindWolfSSL.cmake", + "path_type": "hardlink", + "sha256": "6bbf71ce848edbdc5c6f95144994d1cb3ca041f06e18f485e2e391876ff0d022", + "size_in_bytes": 2029 + }, + { + "_path": "lib/cmake/libssh2/libssh2-config-version.cmake", + "path_type": "hardlink", + "sha256": "6bb00f14fe78109fa5658af18840ca56218beeb444ad8835ca44bc6504c9f4a4", + "size_in_bytes": 2881 + }, + { + "_path": "lib/cmake/libssh2/libssh2-config.cmake", + "path_type": "hardlink", + "sha256": "ade41cd19daf6952cf76d90cbb685ff68d434fd47ea083dfe2b3e66caff045db", + "size_in_bytes": 830 + }, + { + "_path": "lib/cmake/libssh2/libssh2-targets-noconfig.cmake", + "path_type": "hardlink", + "sha256": "e2df2354bce3ee7ce69e6c6f10f8bb50afc8c397e7beecf2562318dd3de41c11", + "size_in_bytes": 857 + }, + { + "_path": "lib/cmake/libssh2/libssh2-targets.cmake", + "path_type": "hardlink", + "sha256": "de733bd4140632d25e49ffc5cbdba01b86f25d9978c42634460b935fb6e7730c", + "size_in_bytes": 3936 + }, + { + "_path": "lib/libssh2.so", + "path_type": "softlink", + "sha256": "40d7337e163108c07a261ca5fd825513063c9c3e7b5c748207892c981be6e32c", + "size_in_bytes": 331760 + }, + { + "_path": "lib/libssh2.so.1", + "path_type": "softlink", + "sha256": "40d7337e163108c07a261ca5fd825513063c9c3e7b5c748207892c981be6e32c", + "size_in_bytes": 331760 + }, + { + "_path": "lib/libssh2.so.1.0.1", + "path_type": "hardlink", + "sha256": "40d7337e163108c07a261ca5fd825513063c9c3e7b5c748207892c981be6e32c", + "size_in_bytes": 331760 + }, + { + "_path": "lib/pkgconfig/libssh2.pc", + "file_mode": "text", + "path_type": "hardlink", + "prefix_placeholder": "/croot/libssh2_1732891098804/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold", + "sha256": "7599f3f5f4d469e8493513823568d030d7ab7b061fd7e3d2bc5c94966f518836", + "size_in_bytes": 851 + }, + { + "_path": "share/doc/libssh2/AUTHORS", + "path_type": "hardlink", + "sha256": "e161024bacda626cc77bc905db2fcfb0870e83f53b98f9b8b736f22cb48ab862", + "size_in_bytes": 1219 + }, + { + "_path": "share/doc/libssh2/BINDINGS.md", + "path_type": "hardlink", + "sha256": "6f5d5dfe5bb5959b3af90df4cd22bcfeec353245c2903a40461305d5739b86f3", + "size_in_bytes": 847 + }, + { + "_path": "share/doc/libssh2/COPYING", + "path_type": "hardlink", + "sha256": "f7f9633cf9ff2f1333f3d7ce46973a8716a4d2a2815ad56f30d437d5fea7bafe", + "size_in_bytes": 1959 + }, + { + "_path": "share/doc/libssh2/HACKING.md", + "path_type": "hardlink", + "sha256": "cda7b055bd392dc9f3456185496803851c0df5fa910a65c2e7811b29c3dbc361", + "size_in_bytes": 267 + }, + { + "_path": "share/doc/libssh2/NEWS", + "path_type": "hardlink", + "sha256": "334d5208024793131fb980a2c0bff33d3cbd3b3a9bf46b24f81df4751a3e00c6", + "size_in_bytes": 345188 + }, + { + "_path": "share/doc/libssh2/README", + "path_type": "hardlink", + "sha256": "1fc0694bbd85f7411852c56d5d922da629f55d61a9129dbe0e71c8eb5d1d619d", + "size_in_bytes": 465 + }, + { + "_path": "share/doc/libssh2/RELEASE-NOTES", + "path_type": "hardlink", + "sha256": "a7cf482e7dbaa852e8ff8b961f3b9a56b02b0592800718c78886fc9bd65aebd8", + "size_in_bytes": 21060 + }, + { + "_path": "share/man/man3/libssh2_agent_connect.3", + "path_type": "hardlink", + "sha256": "93827b7162acf620ad800e371056ab4cb17454adcc92e8cd191e6ecaca6e2ec2", + "size_in_bytes": 620 + }, + { + "_path": "share/man/man3/libssh2_agent_disconnect.3", + "path_type": "hardlink", + "sha256": "7028321d0bb037abc36039420505876a2ce32b81aea12e1cbcb89ed5ab4d747e", + "size_in_bytes": 533 + }, + { + "_path": "share/man/man3/libssh2_agent_free.3", + "path_type": "hardlink", + "sha256": "241b81cd1418d72201e43780851046d34ec578e3fe1bd9a0667513fd0f3e7de5", + "size_in_bytes": 514 + }, + { + "_path": "share/man/man3/libssh2_agent_get_identity.3", + "path_type": "hardlink", + "sha256": "b97ca25673cabcd45769ab2ff18dd70f2f8226c354c27c8b94136400102768d4", + "size_in_bytes": 1215 + }, + { + "_path": "share/man/man3/libssh2_agent_get_identity_path.3", + "path_type": "hardlink", + "sha256": "f8b8e3cbe18dd8345550e3709e29b4e573df04c0af360451394ba8f0146aad70", + "size_in_bytes": 613 + }, + { + "_path": "share/man/man3/libssh2_agent_init.3", + "path_type": "hardlink", + "sha256": "e8cf378d2303b292b73fbfe26d174531f6eb34331c12f5e366cfeb0a506cd7a5", + "size_in_bytes": 902 + }, + { + "_path": "share/man/man3/libssh2_agent_list_identities.3", + "path_type": "hardlink", + "sha256": "79ff942a7adc94c4c86647d2436c116286baf9008d314e1abdaecec1186a9330", + "size_in_bytes": 714 + }, + { + "_path": "share/man/man3/libssh2_agent_set_identity_path.3", + "path_type": "hardlink", + "sha256": "e241293b8c89244089a824905822c20b1ea89ad8cd237a786941df8ec7a01a95", + "size_in_bytes": 599 + }, + { + "_path": "share/man/man3/libssh2_agent_sign.3", + "path_type": "hardlink", + "sha256": "3f4e2813629fb4aa9a3603abd160dd0854116148feaf992a65b3fbb93ffd6d78", + "size_in_bytes": 1855 + }, + { + "_path": "share/man/man3/libssh2_agent_userauth.3", + "path_type": "hardlink", + "sha256": "6783589ea41ff4a361b1472621cdbe2c8868ac8cefb2163d2f93af9615a099a8", + "size_in_bytes": 955 + }, + { + "_path": "share/man/man3/libssh2_banner_set.3", + "path_type": "hardlink", + "sha256": "c6c3f293a3dd2b398b44e7c2416476a57d026be5bae4f9bf8893cdc2a76fd255", + "size_in_bytes": 1221 + }, + { + "_path": "share/man/man3/libssh2_base64_decode.3", + "path_type": "hardlink", + "sha256": "c80f58e6bdec085c9b8e3cd28d9c99d3e904b5f11df0d33c11a3a51937c15a22", + "size_in_bytes": 1062 + }, + { + "_path": "share/man/man3/libssh2_channel_close.3", + "path_type": "hardlink", + "sha256": "45b59eaed23c9562deb277b17af369b846b975b855a19e86528ba968bd954392", + "size_in_bytes": 1105 + }, + { + "_path": "share/man/man3/libssh2_channel_direct_streamlocal_ex.3", + "path_type": "hardlink", + "sha256": "de469186cbc24ce959dde046cc7cf6d4cc1b3f3d7f76301a03b0ba88c51de524", + "size_in_bytes": 1324 + }, + { + "_path": "share/man/man3/libssh2_channel_direct_tcpip.3", + "path_type": "hardlink", + "sha256": "cad3486819b2ffbd7af4d6f3fc887e66fdb53604124e1835802e050fe75e861e", + "size_in_bytes": 782 + }, + { + "_path": "share/man/man3/libssh2_channel_direct_tcpip_ex.3", + "path_type": "hardlink", + "sha256": "b08869117adea9a2cfc5a3afaa3d1bbf674791e9405e43b703b94fcbfe8fcdcb", + "size_in_bytes": 1465 + }, + { + "_path": "share/man/man3/libssh2_channel_eof.3", + "path_type": "hardlink", + "sha256": "9131535247fa0077e678281bb567325f528d719ab621631bfc0c097b878ce8d5", + "size_in_bytes": 609 + }, + { + "_path": "share/man/man3/libssh2_channel_exec.3", + "path_type": "hardlink", + "sha256": "6ff96d543eb614ab2d32e4cf5cc344a08daf0a3c540b92c3edd78e6c3fb21c8f", + "size_in_bytes": 708 + }, + { + "_path": "share/man/man3/libssh2_channel_flush.3", + "path_type": "hardlink", + "sha256": "3ebec0573f4fc88eb8e31b470c8de6fb2a3e846312f49ae0397c2065dea2b595", + "size_in_bytes": 655 + }, + { + "_path": "share/man/man3/libssh2_channel_flush_ex.3", + "path_type": "hardlink", + "sha256": "0c8804c128f2429e64ab5879277750ea232f66af846e9b10df76570a37ccd327", + "size_in_bytes": 1147 + }, + { + "_path": "share/man/man3/libssh2_channel_flush_stderr.3", + "path_type": "hardlink", + "sha256": "ef92cda4fbf06ddf6cc0e053dad1b2dbaf7ec2d2ef13123365098aa28e736763", + "size_in_bytes": 676 + }, + { + "_path": "share/man/man3/libssh2_channel_forward_accept.3", + "path_type": "hardlink", + "sha256": "cf9bf54321891b7cbab4c661e7f6499f5abdcf1b8e8a0c53d913edf4775568cf", + "size_in_bytes": 839 + }, + { + "_path": "share/man/man3/libssh2_channel_forward_cancel.3", + "path_type": "hardlink", + "sha256": "f5569b644400cd29afc4d5937e9adc515b607fb33c50e981afc15196ac7836db", + "size_in_bytes": 983 + }, + { + "_path": "share/man/man3/libssh2_channel_forward_listen.3", + "path_type": "hardlink", + "sha256": "3ea7b9b6b10dfbda16e92f922b186c89157f8cbdecfc49b1ed8da5dd2a3aca07", + "size_in_bytes": 737 + }, + { + "_path": "share/man/man3/libssh2_channel_forward_listen_ex.3", + "path_type": "hardlink", + "sha256": "522d2ae9c54c670ac7055ff4a5c10c1d6fe4bdeb2c838d8535e92fd32c0e3961", + "size_in_bytes": 1950 + }, + { + "_path": "share/man/man3/libssh2_channel_free.3", + "path_type": "hardlink", + "sha256": "39cef9c879895b449f67efd2e92a2aa8f35b0930bc3ee1bc64253bf8716ddd81", + "size_in_bytes": 884 + }, + { + "_path": "share/man/man3/libssh2_channel_get_exit_signal.3", + "path_type": "hardlink", + "sha256": "524b77c54892022e6211cac5cc2a7df844a8416fa11b65d2b9dcfdf72b4310cc", + "size_in_bytes": 1657 + }, + { + "_path": "share/man/man3/libssh2_channel_get_exit_status.3", + "path_type": "hardlink", + "sha256": "a7cd643bef8d656bf17a02132201fd150bc9e45830f7a455211e004d28c7d992", + "size_in_bytes": 744 + }, + { + "_path": "share/man/man3/libssh2_channel_handle_extended_data.3", + "path_type": "hardlink", + "sha256": "c251b94d551613f04fe0699c96d44a93c5147101aaeb864380ac3adff9e00d19", + "size_in_bytes": 1377 + }, + { + "_path": "share/man/man3/libssh2_channel_handle_extended_data2.3", + "path_type": "hardlink", + "sha256": "bf629df753b284399874b0623e0f1877e9c3e4c6bfa6309ea17d72d02ab4d482", + "size_in_bytes": 1326 + }, + { + "_path": "share/man/man3/libssh2_channel_ignore_extended_data.3", + "path_type": "hardlink", + "sha256": "8b19e077449a9fddf72868b65c5b3a27ec1a9735fe10f2a20132004366c234c4", + "size_in_bytes": 933 + }, + { + "_path": "share/man/man3/libssh2_channel_open_ex.3", + "path_type": "hardlink", + "sha256": "9fdb17360f2ef469ce9a578b5467985161e935ef4e995874390520a1122d130f", + "size_in_bytes": 2056 + }, + { + "_path": "share/man/man3/libssh2_channel_open_session.3", + "path_type": "hardlink", + "sha256": "b3b5b64d5714cc0703e2ca808843193395b0eae7ec191f4b72d966d9c7ca83ca", + "size_in_bytes": 685 + }, + { + "_path": "share/man/man3/libssh2_channel_process_startup.3", + "path_type": "hardlink", + "sha256": "95a310714f0e202f875bc97b4bdbbb6216aa89765e6a27c79ac2b2ae5eb267ab", + "size_in_bytes": 1483 + }, + { + "_path": "share/man/man3/libssh2_channel_read.3", + "path_type": "hardlink", + "sha256": "b52bc537e8bec5566aa706f01292914fa790c37e045636ab283ffc2feb899c48", + "size_in_bytes": 698 + }, + { + "_path": "share/man/man3/libssh2_channel_read_ex.3", + "path_type": "hardlink", + "sha256": "700615851d254e330390d42ebc97ab29f1c3c8903db743680667cca36df785f5", + "size_in_bytes": 1793 + }, + { + "_path": "share/man/man3/libssh2_channel_read_stderr.3", + "path_type": "hardlink", + "sha256": "fce9ea31abd23989c2063ad3b694dd2d54b211f61daaa82ca2e0e5664e3cce5d", + "size_in_bytes": 726 + }, + { + "_path": "share/man/man3/libssh2_channel_receive_window_adjust.3", + "path_type": "hardlink", + "sha256": "4fc34c2faf70f591b30d96588608d519ad667c45e854f20d7a24bcc6f1b2957f", + "size_in_bytes": 1407 + }, + { + "_path": "share/man/man3/libssh2_channel_receive_window_adjust2.3", + "path_type": "hardlink", + "sha256": "f1dfc59194c428bf1948f2c126fb9ad15ded5a5f896e4ac239cd7273d6b7d0f2", + "size_in_bytes": 1206 + }, + { + "_path": "share/man/man3/libssh2_channel_request_auth_agent.3", + "path_type": "hardlink", + "sha256": "3062be3a71e1c21267201908b0395470dccf304576bc5fde44fc938de99b370f", + "size_in_bytes": 966 + }, + { + "_path": "share/man/man3/libssh2_channel_request_pty.3", + "path_type": "hardlink", + "sha256": "fd3c13f1ab9cffa56087d252e3017caa4809e0ac6d8e01dd7269e4393bc2f8e3", + "size_in_bytes": 721 + }, + { + "_path": "share/man/man3/libssh2_channel_request_pty_ex.3", + "path_type": "hardlink", + "sha256": "bcaf00ddd6f5929e2131cb78562e141ea93dd4bf69695a3c3730ddce4c90e2b1", + "size_in_bytes": 1776 + }, + { + "_path": "share/man/man3/libssh2_channel_request_pty_size.3", + "path_type": "hardlink", + "sha256": "dd9b7e546fd19286d3bf54c32e2a7bed51daf22fd9b379ddecced0107ed8cb40", + "size_in_bytes": 799 + }, + { + "_path": "share/man/man3/libssh2_channel_request_pty_size_ex.3", + "path_type": "hardlink", + "sha256": "5340603fdaa4e9a865a6f48820a257f32893c2343469489f67fd11a01dd19e78", + "size_in_bytes": 307 + }, + { + "_path": "share/man/man3/libssh2_channel_send_eof.3", + "path_type": "hardlink", + "sha256": "2083e91a3dc0d52a3054ca772a1a0e62152eacac4bb10d116e3b310ff0a9ef27", + "size_in_bytes": 850 + }, + { + "_path": "share/man/man3/libssh2_channel_set_blocking.3", + "path_type": "hardlink", + "sha256": "3a9a03ec5619963174cd14dd6a6601a5a5644a0d217e4980a5543a04e697b58b", + "size_in_bytes": 821 + }, + { + "_path": "share/man/man3/libssh2_channel_setenv.3", + "path_type": "hardlink", + "sha256": "0af379f819b71ab4e6b92831579ba3e79626acb844e4c04a64e29e2c76da2959", + "size_in_bytes": 726 + }, + { + "_path": "share/man/man3/libssh2_channel_setenv_ex.3", + "path_type": "hardlink", + "sha256": "78c6e4d474b844e69618a2c3933dc636a5249006f3325cfd7d696f3cc423d962", + "size_in_bytes": 1578 + }, + { + "_path": "share/man/man3/libssh2_channel_shell.3", + "path_type": "hardlink", + "sha256": "97c2bea5f05e2effd3e55b7bad3c063100e9cc43c801c2288682c56ada7e96b6", + "size_in_bytes": 690 + }, + { + "_path": "share/man/man3/libssh2_channel_signal_ex.3", + "path_type": "hardlink", + "sha256": "96c69093e70e4f605cb80142729f17ce6a5569adf877e86de6d5871cff5a4126", + "size_in_bytes": 1153 + }, + { + "_path": "share/man/man3/libssh2_channel_subsystem.3", + "path_type": "hardlink", + "sha256": "9cca5a0d01f6edd429fbe05c9fd9680f61317440136c538428e6d7f7f3f921ea", + "size_in_bytes": 725 + }, + { + "_path": "share/man/man3/libssh2_channel_wait_closed.3", + "path_type": "hardlink", + "sha256": "43439c25c43c80f041b194f30167b7db9b13d43709d8be880f9c7afc917ad6ac", + "size_in_bytes": 856 + }, + { + "_path": "share/man/man3/libssh2_channel_wait_eof.3", + "path_type": "hardlink", + "sha256": "e37d262ac8d104cd138c4b44ee04bc68a95ef4a483b96e22c7f41d89a6374409", + "size_in_bytes": 687 + }, + { + "_path": "share/man/man3/libssh2_channel_window_read.3", + "path_type": "hardlink", + "sha256": "be884015a9faef4f26628fb1e2ec2730675e8d25f0e925d992a84bc017b2f3ca", + "size_in_bytes": 713 + }, + { + "_path": "share/man/man3/libssh2_channel_window_read_ex.3", + "path_type": "hardlink", + "sha256": "865415960ee08b0c8e9e1c2ffa29e7c4a39df87e8eac888e10c09c971555f96a", + "size_in_bytes": 1069 + }, + { + "_path": "share/man/man3/libssh2_channel_window_write.3", + "path_type": "hardlink", + "sha256": "8c51bee7d07b75cb07c22335aa925368b4c9a2f35b1f66e4d1ca9372a7a99608", + "size_in_bytes": 721 + }, + { + "_path": "share/man/man3/libssh2_channel_window_write_ex.3", + "path_type": "hardlink", + "sha256": "dafddb8638409f4adec136c82bd9647fe00d5e7094f028ed75471a59a6cfff31", + "size_in_bytes": 912 + }, + { + "_path": "share/man/man3/libssh2_channel_write.3", + "path_type": "hardlink", + "sha256": "29ce3458a50de3e5b73e57acaefc7f0e902f685db942c6e4726e9752951cb16e", + "size_in_bytes": 707 + }, + { + "_path": "share/man/man3/libssh2_channel_write_ex.3", + "path_type": "hardlink", + "sha256": "97e64829d9bd098fb1ac6ed3f1d12ed63c1d93fc910505b45ce9f186f8205cdf", + "size_in_bytes": 2132 + }, + { + "_path": "share/man/man3/libssh2_channel_write_stderr.3", + "path_type": "hardlink", + "sha256": "6dcb91efa84c3dbe59fb7ed06a2cf433f713a99f8e45f9e8d21fbc5818199048", + "size_in_bytes": 735 + }, + { + "_path": "share/man/man3/libssh2_channel_x11_req.3", + "path_type": "hardlink", + "sha256": "2667bda07c882236c6ec4eae4709c71b959e71cd0fb93fa50ff7bcecda9910a5", + "size_in_bytes": 690 + }, + { + "_path": "share/man/man3/libssh2_channel_x11_req_ex.3", + "path_type": "hardlink", + "sha256": "9a02fa5e8a38713fa583cc9fa5cf91d5546f90448eff67a30cf365e946d589e1", + "size_in_bytes": 1663 + }, + { + "_path": "share/man/man3/libssh2_crypto_engine.3", + "path_type": "hardlink", + "sha256": "8db24bb99f7bce69a94f8c85ce76e64ad1cd174ae44793e286b3043043f86931", + "size_in_bytes": 432 + }, + { + "_path": "share/man/man3/libssh2_exit.3", + "path_type": "hardlink", + "sha256": "b931d250f2c41ad4a2894fed09b339b052e65a20e56a6310d80a105719b17a8d", + "size_in_bytes": 431 + }, + { + "_path": "share/man/man3/libssh2_free.3", + "path_type": "hardlink", + "sha256": "aa87afcc3571e9b6121220c68937bf168d52f944b999106b1fd11fdd4fbb17b5", + "size_in_bytes": 706 + }, + { + "_path": "share/man/man3/libssh2_hostkey_hash.3", + "path_type": "hardlink", + "sha256": "2c56b05777ad6387814c3a4177ad1e945610cf9bd084b7314ad7ff65302830cd", + "size_in_bytes": 1086 + }, + { + "_path": "share/man/man3/libssh2_init.3", + "path_type": "hardlink", + "sha256": "c8cc5bbdf16c243e7a02fe044c18f788df1319f8e7d43e8014e2d63d9c8e7a6a", + "size_in_bytes": 672 + }, + { + "_path": "share/man/man3/libssh2_keepalive_config.3", + "path_type": "hardlink", + "sha256": "5c5513a4a288a8cb95b38b9c62a18895c0550ec67ec1e84adda4b10a6a1bf6d4", + "size_in_bytes": 1025 + }, + { + "_path": "share/man/man3/libssh2_keepalive_send.3", + "path_type": "hardlink", + "sha256": "9f07814934ad8f9cddc443e9cebeed4e4d75121133a252b0ededa79a030a6afb", + "size_in_bytes": 701 + }, + { + "_path": "share/man/man3/libssh2_knownhost_add.3", + "path_type": "hardlink", + "sha256": "e898eab196bfddf086761b4bcd142fb017bf9cb8fb3b6034481b4d1ae92a7cf8", + "size_in_bytes": 2525 + }, + { + "_path": "share/man/man3/libssh2_knownhost_addc.3", + "path_type": "hardlink", + "sha256": "b9bcaa30e01f10368e63b9ff7f19330693dcfbaab261279b1791a2789c39cb43", + "size_in_bytes": 2694 + }, + { + "_path": "share/man/man3/libssh2_knownhost_check.3", + "path_type": "hardlink", + "sha256": "c431ac72025bab6b6ae3cd6c4fb28677e9d9c33cad09852adae300a896901007", + "size_in_bytes": 2220 + }, + { + "_path": "share/man/man3/libssh2_knownhost_checkp.3", + "path_type": "hardlink", + "sha256": "2dea57c285e9a9a5841be67fa0ab2da7f66cf942bb9541d32c5f402c3a2fd3aa", + "size_in_bytes": 2487 + }, + { + "_path": "share/man/man3/libssh2_knownhost_del.3", + "path_type": "hardlink", + "sha256": "fde5313aa61c12e4aaf3552f22a9268a1d19dbaab88a71caf1e0c9487dd8dd61", + "size_in_bytes": 848 + }, + { + "_path": "share/man/man3/libssh2_knownhost_free.3", + "path_type": "hardlink", + "sha256": "3d3caf0b0da87bad1df2fe4d20a2a984be292ec4d6de6aa2dd1f7b45eba77432", + "size_in_bytes": 519 + }, + { + "_path": "share/man/man3/libssh2_knownhost_get.3", + "path_type": "hardlink", + "sha256": "50564dc7885ec5df4b7cee2e74b5ddaf155dd2e70b32ffd16cd5316539449f29", + "size_in_bytes": 1160 + }, + { + "_path": "share/man/man3/libssh2_knownhost_init.3", + "path_type": "hardlink", + "sha256": "7dbdb1018502111d9bfd0d4560067a2ec36fd98a3f66c474d613db40d750d442", + "size_in_bytes": 874 + }, + { + "_path": "share/man/man3/libssh2_knownhost_readfile.3", + "path_type": "hardlink", + "sha256": "cf9c4812973f5de4e67fad368d77c98b6e048baf48773cb698f392bbb881a716", + "size_in_bytes": 1005 + }, + { + "_path": "share/man/man3/libssh2_knownhost_readline.3", + "path_type": "hardlink", + "sha256": "2da45696dbc997372e5b77899d46a3c39c4072b6a989f41b1bcad6af43918b47", + "size_in_bytes": 998 + }, + { + "_path": "share/man/man3/libssh2_knownhost_writefile.3", + "path_type": "hardlink", + "sha256": "1524691730cfe60d088ba458307220446c4d802cab6ccc92a46b452e6d16aeca", + "size_in_bytes": 895 + }, + { + "_path": "share/man/man3/libssh2_knownhost_writeline.3", + "path_type": "hardlink", + "sha256": "6d3dddd11fc676ebe402c49495f6032918b29ca2d62591e703c056a2fd500e30", + "size_in_bytes": 1650 + }, + { + "_path": "share/man/man3/libssh2_poll.3", + "path_type": "hardlink", + "sha256": "5160ef5ebac05380d91772bd689b33847d4aa6d0b746ff987c1110ea0af62304", + "size_in_bytes": 1069 + }, + { + "_path": "share/man/man3/libssh2_poll_channel_read.3", + "path_type": "hardlink", + "sha256": "2097a4ea857e90f877ccd9ea35aeb29aee4fa8e7963a96d5a95e38020c308280", + "size_in_bytes": 754 + }, + { + "_path": "share/man/man3/libssh2_publickey_add.3", + "path_type": "hardlink", + "sha256": "212ba84ec3cd37e4b5ff3c7d19782aab169432a2cab7874afdcea2f0cb5cf100", + "size_in_bytes": 904 + }, + { + "_path": "share/man/man3/libssh2_publickey_add_ex.3", + "path_type": "hardlink", + "sha256": "7234d3f36a4bd6d1a27418eab82ade7b0b6a69be805cee0752a5f41c360b339c", + "size_in_bytes": 867 + }, + { + "_path": "share/man/man3/libssh2_publickey_init.3", + "path_type": "hardlink", + "sha256": "299dfff668d2a62a9215973547283bbcbf1b2448512fa526290359fcb3f326ba", + "size_in_bytes": 321 + }, + { + "_path": "share/man/man3/libssh2_publickey_list_fetch.3", + "path_type": "hardlink", + "sha256": "cbe5bb557f335a10ff9ea672728c63f4abce53fff14cabe87c3c2f5ee3047750", + "size_in_bytes": 333 + }, + { + "_path": "share/man/man3/libssh2_publickey_list_free.3", + "path_type": "hardlink", + "sha256": "f7d0dc0d31fd988870c9e864c309002bb3b0b3218ffb0422fccf23c325ee4564", + "size_in_bytes": 331 + }, + { + "_path": "share/man/man3/libssh2_publickey_remove.3", + "path_type": "hardlink", + "sha256": "3f2fda646a360833b2625429d7d3fba7a6d8ad79f398fb721db354e531c01c1c", + "size_in_bytes": 830 + }, + { + "_path": "share/man/man3/libssh2_publickey_remove_ex.3", + "path_type": "hardlink", + "sha256": "dd9ac968662346fc162815f2f537b689e2050eea3a7529208ec636675a947a3d", + "size_in_bytes": 346 + }, + { + "_path": "share/man/man3/libssh2_publickey_shutdown.3", + "path_type": "hardlink", + "sha256": "5194f43e8e6c6c01cb5a351cc941b38aed1d6e2cb251eee5d25b775c2a29ce7e", + "size_in_bytes": 334 + }, + { + "_path": "share/man/man3/libssh2_scp_recv.3", + "path_type": "hardlink", + "sha256": "370b13f05104f981b5efdabfa0e8d431767d9a8d06845f5ef36b3eadfc44906f", + "size_in_bytes": 1126 + }, + { + "_path": "share/man/man3/libssh2_scp_recv2.3", + "path_type": "hardlink", + "sha256": "3156aa814da8eb0e0f6fa22c01a206e9a077812eeed5ec76e2cfbefe0ae1b1c2", + "size_in_bytes": 1033 + }, + { + "_path": "share/man/man3/libssh2_scp_send.3", + "path_type": "hardlink", + "sha256": "c5beb0633903ecbd93edecc515b610ae737d9fbf4da11caad90b2e2726c265e1", + "size_in_bytes": 687 + }, + { + "_path": "share/man/man3/libssh2_scp_send64.3", + "path_type": "hardlink", + "sha256": "da4bc3e826a1a038d5b291af53596d644b7ef65bd16c1731fe9bcc5ecc518e50", + "size_in_bytes": 1627 + }, + { + "_path": "share/man/man3/libssh2_scp_send_ex.3", + "path_type": "hardlink", + "sha256": "b4cb7b4f00d1b7ada3865a23cd7064f17c6119683829896b501d7a4ddafbb36b", + "size_in_bytes": 1601 + }, + { + "_path": "share/man/man3/libssh2_session_abstract.3", + "path_type": "hardlink", + "sha256": "5d5233b403c34aa09f8cc65f811962ec59f4e7c08a6536258795c6887994f1df", + "size_in_bytes": 832 + }, + { + "_path": "share/man/man3/libssh2_session_banner_get.3", + "path_type": "hardlink", + "sha256": "4b79daf9b7fbf5aa17244ea299174ad0866f713086943af468fba3d7e08ea771", + "size_in_bytes": 897 + }, + { + "_path": "share/man/man3/libssh2_session_banner_set.3", + "path_type": "hardlink", + "sha256": "fd93549e5eff89d85f5730e7453a62e454e86d14c70af7f0acb368e9fffb3311", + "size_in_bytes": 1252 + }, + { + "_path": "share/man/man3/libssh2_session_block_directions.3", + "path_type": "hardlink", + "sha256": "f91f9140e2410276dcdaac2aed1e0188cbba8b9bfcc1776fc38cccd22d938300", + "size_in_bytes": 1281 + }, + { + "_path": "share/man/man3/libssh2_session_callback_set.3", + "path_type": "hardlink", + "sha256": "c3bc97d958cfd74b89165773db7ae40890627244dc25ccad123182b04ce3fcfe", + "size_in_bytes": 1005 + }, + { + "_path": "share/man/man3/libssh2_session_callback_set2.3", + "path_type": "hardlink", + "sha256": "dc6d9afea574a0ae1f4a723d8d5cf20b9d363ac6a9ad32dcacce7c8d6d92cb2f", + "size_in_bytes": 5167 + }, + { + "_path": "share/man/man3/libssh2_session_disconnect.3", + "path_type": "hardlink", + "sha256": "cb8aa74719f83be841d766ef7c4437e37d405beed26d39685ed8a1392b634c6e", + "size_in_bytes": 720 + }, + { + "_path": "share/man/man3/libssh2_session_disconnect_ex.3", + "path_type": "hardlink", + "sha256": "637f34bf4c9a0d078a5becf2544b541fc6ceddec8acc61b61f9359d7da699231", + "size_in_bytes": 1493 + }, + { + "_path": "share/man/man3/libssh2_session_flag.3", + "path_type": "hardlink", + "sha256": "74dc8b50e12ca91fcf44b891783c540907a99f293c236f392f80fa7bc4c0f92f", + "size_in_bytes": 1024 + }, + { + "_path": "share/man/man3/libssh2_session_free.3", + "path_type": "hardlink", + "sha256": "8777fc5b7b86992585184fe3ee5615dd28afd596753aca62c5aff964e627e0f5", + "size_in_bytes": 766 + }, + { + "_path": "share/man/man3/libssh2_session_get_blocking.3", + "path_type": "hardlink", + "sha256": "4255ecd0ca8f643932178ef3b48a6d33118e8a9eff0af3480fd3577d3eb94042", + "size_in_bytes": 578 + }, + { + "_path": "share/man/man3/libssh2_session_get_read_timeout.3", + "path_type": "hardlink", + "sha256": "77acd1cc9eaf0735d964f4e5cf05965e7d036a437aae0d1e255dc325ddc81b5d", + "size_in_bytes": 738 + }, + { + "_path": "share/man/man3/libssh2_session_get_timeout.3", + "path_type": "hardlink", + "sha256": "323b635352abe27e70e88b596151b280a5659b72e9c41c8e6f24984923768258", + "size_in_bytes": 744 + }, + { + "_path": "share/man/man3/libssh2_session_handshake.3", + "path_type": "hardlink", + "sha256": "add4bebbb400a8cef8e71e08a1f2eb87b69218ccc893783f546f0afb56e85143", + "size_in_bytes": 1405 + }, + { + "_path": "share/man/man3/libssh2_session_hostkey.3", + "path_type": "hardlink", + "sha256": "5074d9024f23b2d7f1f2c6d99d1a8c5ebd37f765ca5f5fd41ec6f1642b7864c9", + "size_in_bytes": 802 + }, + { + "_path": "share/man/man3/libssh2_session_init.3", + "path_type": "hardlink", + "sha256": "bdc2dd76cbad53c198905343ef6336270ed8a79a6dee7abc226cd7803a5201cd", + "size_in_bytes": 641 + }, + { + "_path": "share/man/man3/libssh2_session_init_ex.3", + "path_type": "hardlink", + "sha256": "bfae417a7d7592787c473ad1262037951399cc35a05b0f8c1dded4ecd7738c3b", + "size_in_bytes": 1914 + }, + { + "_path": "share/man/man3/libssh2_session_last_errno.3", + "path_type": "hardlink", + "sha256": "f6cfe1343ae78277bb50faa9d934e946497b361940bf549454947f4eb5519405", + "size_in_bytes": 652 + }, + { + "_path": "share/man/man3/libssh2_session_last_error.3", + "path_type": "hardlink", + "sha256": "3e4997a53e16bc8033076fd23320fddd0f4da5ae3e985dc84b812ccf80fc13d4", + "size_in_bytes": 1209 + }, + { + "_path": "share/man/man3/libssh2_session_method_pref.3", + "path_type": "hardlink", + "sha256": "42a8339eda08ad1c32835daeb91d1474bbc5351728bc2a87efc6447e9a338a31", + "size_in_bytes": 1530 + }, + { + "_path": "share/man/man3/libssh2_session_methods.3", + "path_type": "hardlink", + "sha256": "0928a7f07f2aee734bba1d965af2986bdeafeebe83a611d53e11756b4820589e", + "size_in_bytes": 1120 + }, + { + "_path": "share/man/man3/libssh2_session_set_blocking.3", + "path_type": "hardlink", + "sha256": "f4784231a26bfcf6e60c73b691ae2a8af2d59275aa5449e1feb484597ed1d26b", + "size_in_bytes": 1157 + }, + { + "_path": "share/man/man3/libssh2_session_set_last_error.3", + "path_type": "hardlink", + "sha256": "f6705fe44254f554648806eda9c8597cc6bbfa4a60065b1afc63fe0fd020b238", + "size_in_bytes": 1109 + }, + { + "_path": "share/man/man3/libssh2_session_set_read_timeout.3", + "path_type": "hardlink", + "sha256": "ebff1cbf648090f9924eaf43b6996c4afe2ad84607d09a756e60e6fec3589ebb", + "size_in_bytes": 759 + }, + { + "_path": "share/man/man3/libssh2_session_set_timeout.3", + "path_type": "hardlink", + "sha256": "17d1bdbc6d8991708d7daf8b057e568fd514058b005ee1ba7f1e0ebf1699f3b4", + "size_in_bytes": 750 + }, + { + "_path": "share/man/man3/libssh2_session_startup.3", + "path_type": "hardlink", + "sha256": "426b4349acc1243528d8239d8d48c6de45d9be4a068a7837528f1dd7ff215ec3", + "size_in_bytes": 1478 + }, + { + "_path": "share/man/man3/libssh2_session_supported_algs.3", + "path_type": "hardlink", + "sha256": "661400b9ca027be9e227499b56fa79731a4f9d3fdc87a8b6edd42e8af028c07c", + "size_in_bytes": 2818 + }, + { + "_path": "share/man/man3/libssh2_sftp_close.3", + "path_type": "hardlink", + "sha256": "30aefd27e163afa34bdbd2633b618d6ade18d29aa95998700c7c65032d08f777", + "size_in_bytes": 680 + }, + { + "_path": "share/man/man3/libssh2_sftp_close_handle.3", + "path_type": "hardlink", + "sha256": "e6a199552547975799b04a8801f413717ae68bd24cf0034fd0e92d6e55f6df02", + "size_in_bytes": 1486 + }, + { + "_path": "share/man/man3/libssh2_sftp_closedir.3", + "path_type": "hardlink", + "sha256": "57f072d8173d88278887203b1adb2f05f5c75a5abb33acb906bd7444385a4d8e", + "size_in_bytes": 688 + }, + { + "_path": "share/man/man3/libssh2_sftp_fsetstat.3", + "path_type": "hardlink", + "sha256": "7dd3fc191da3e7eed4cdf5f988d8a5236253551c7b926d5654b8f1edea8cff1c", + "size_in_bytes": 723 + }, + { + "_path": "share/man/man3/libssh2_sftp_fstat.3", + "path_type": "hardlink", + "sha256": "fbb4b3f44da6190ba908d5fa707e15de9a5e1fb64cc33ed64b6bf92caa4fba95", + "size_in_bytes": 711 + }, + { + "_path": "share/man/man3/libssh2_sftp_fstat_ex.3", + "path_type": "hardlink", + "sha256": "9af9a671cee0e1ffc02d62e98cde6a08ea460b75439ce9a12c36a812febe00c8", + "size_in_bytes": 3653 + }, + { + "_path": "share/man/man3/libssh2_sftp_fstatvfs.3", + "path_type": "hardlink", + "sha256": "19d6350659e80542d169bc4aacde4280a212f06fe5cc3be747e02669c6f6ecc3", + "size_in_bytes": 134 + }, + { + "_path": "share/man/man3/libssh2_sftp_fsync.3", + "path_type": "hardlink", + "sha256": "f82380b11e162cbf944761439be62605d1b35462ee37d13a3fdea0d3598dc3df", + "size_in_bytes": 1414 + }, + { + "_path": "share/man/man3/libssh2_sftp_get_channel.3", + "path_type": "hardlink", + "sha256": "991acd8157f64be22e795eb8451c1d7e0557599362d07cd47b8845426b8a2ac4", + "size_in_bytes": 649 + }, + { + "_path": "share/man/man3/libssh2_sftp_init.3", + "path_type": "hardlink", + "sha256": "a4b9dbee2b1bca53149b9df9da4acace640a2efffefcabed34aa7b6afbb217f4", + "size_in_bytes": 1454 + }, + { + "_path": "share/man/man3/libssh2_sftp_last_error.3", + "path_type": "hardlink", + "sha256": "cc531f8c4e631ee87c0c6919bc23aa9b798b2fde5319f9f6336f0aefe28d800a", + "size_in_bytes": 851 + }, + { + "_path": "share/man/man3/libssh2_sftp_lstat.3", + "path_type": "hardlink", + "sha256": "5bd4a798b13fe424f40a63c1a7b92e20c2b7cad4b39ac552ca1e729bca44e48a", + "size_in_bytes": 715 + }, + { + "_path": "share/man/man3/libssh2_sftp_mkdir.3", + "path_type": "hardlink", + "sha256": "3b13853d28b91b3526fd2788bc41bf869774042a7421775b4f8d5de2da773932", + "size_in_bytes": 699 + }, + { + "_path": "share/man/man3/libssh2_sftp_mkdir_ex.3", + "path_type": "hardlink", + "sha256": "12db10abe8a010a23c158baec03eb873ef27b18de0a5b725c6e2c1a492f58fc0", + "size_in_bytes": 1555 + }, + { + "_path": "share/man/man3/libssh2_sftp_open.3", + "path_type": "hardlink", + "sha256": "4d3c35cc6eeb58cf7c1b943e1a8bbac7cfd3e705f6b6f2bc2cbd2c5472d36e86", + "size_in_bytes": 751 + }, + { + "_path": "share/man/man3/libssh2_sftp_open_ex.3", + "path_type": "hardlink", + "sha256": "0ffb026f78bd57ba71ef10e51644c0f49f9fa3271eb5be100c979abb43379b7a", + "size_in_bytes": 2508 + }, + { + "_path": "share/man/man3/libssh2_sftp_open_ex_r.3", + "path_type": "hardlink", + "sha256": "642b805e54883c8aa90674e616aeff9e9f0fe255baeb4a71268432df8b6342b9", + "size_in_bytes": 2742 + }, + { + "_path": "share/man/man3/libssh2_sftp_open_r.3", + "path_type": "hardlink", + "sha256": "d58ebd2914c12f005e7e884860edb9d564609464a62ef7981f68bb20ce0de25b", + "size_in_bytes": 824 + }, + { + "_path": "share/man/man3/libssh2_sftp_opendir.3", + "path_type": "hardlink", + "sha256": "86c3cb7f8bd19010588fb928095e81ab9b736ba6f6f562eb2d010e7d334fef9c", + "size_in_bytes": 688 + }, + { + "_path": "share/man/man3/libssh2_sftp_posix_rename.3", + "path_type": "hardlink", + "sha256": "af5d09b04b92169edf9f973834632844859fb4c491608e172d5163ceb0431991", + "size_in_bytes": 816 + }, + { + "_path": "share/man/man3/libssh2_sftp_posix_rename_ex.3", + "path_type": "hardlink", + "sha256": "e76dc9650db7bdde52eb59a8a52c01e6fb0356ccc3af6e43d6da8f2b0e3a074f", + "size_in_bytes": 2141 + }, + { + "_path": "share/man/man3/libssh2_sftp_read.3", + "path_type": "hardlink", + "sha256": "25fd0d134f1874927a88308a046e556a9b5dadf792ab247cdd9cfb4220f81e5b", + "size_in_bytes": 1610 + }, + { + "_path": "share/man/man3/libssh2_sftp_readdir.3", + "path_type": "hardlink", + "sha256": "f53f2850afbe38cf7ccbdca8ad6c2fbad82dca58567c466ce1ae42b42ad231da", + "size_in_bytes": 786 + }, + { + "_path": "share/man/man3/libssh2_sftp_readdir_ex.3", + "path_type": "hardlink", + "sha256": "cef4a5038188aedb0dd7d73e89c80d9615a37501c2914ddabc4b2349832c56df", + "size_in_bytes": 2781 + }, + { + "_path": "share/man/man3/libssh2_sftp_readlink.3", + "path_type": "hardlink", + "sha256": "ac85251703acaae076551d72f8b75e239136c30915adefda15dd218e5095113a", + "size_in_bytes": 841 + }, + { + "_path": "share/man/man3/libssh2_sftp_realpath.3", + "path_type": "hardlink", + "sha256": "991cfa58e620bd327c3453e137632d73b83808226efde411285b593153fe560b", + "size_in_bytes": 841 + }, + { + "_path": "share/man/man3/libssh2_sftp_rename.3", + "path_type": "hardlink", + "sha256": "79b3266bfd7c9e511509a1f57738c271af636ffdd5ac1b2e6bfabc06a217d215", + "size_in_bytes": 762 + }, + { + "_path": "share/man/man3/libssh2_sftp_rename_ex.3", + "path_type": "hardlink", + "sha256": "6b7f1d47835534b202abf17163cd5af9148e246b11853f3a2a82ee5d4cf7aea2", + "size_in_bytes": 2273 + }, + { + "_path": "share/man/man3/libssh2_sftp_rewind.3", + "path_type": "hardlink", + "sha256": "5dc88e0e443e013f8dc93135cb2c054ea3a386afd9945dce005a9c4dc15a594e", + "size_in_bytes": 653 + }, + { + "_path": "share/man/man3/libssh2_sftp_rmdir.3", + "path_type": "hardlink", + "sha256": "b044b93bea87d7f0a1a9bdb417c1b9d51b71af6cc2605fd7e453803937c17807", + "size_in_bytes": 699 + }, + { + "_path": "share/man/man3/libssh2_sftp_rmdir_ex.3", + "path_type": "hardlink", + "sha256": "347ab2145dc11f5bc2c0606bdffde4d48190a80dfad1ed83e7cc7afa61ad7a86", + "size_in_bytes": 1291 + }, + { + "_path": "share/man/man3/libssh2_sftp_seek.3", + "path_type": "hardlink", + "sha256": "9cf9e18d5223fe74089de905b5bd5f85c6af8404d2f036d0e8c26e5eb6fb2227", + "size_in_bytes": 1027 + }, + { + "_path": "share/man/man3/libssh2_sftp_seek64.3", + "path_type": "hardlink", + "sha256": "b2213bd874a4f7dae7d1adc5b6e009fbd855beb0629ba389484ea1e6c24b0e22", + "size_in_bytes": 1136 + }, + { + "_path": "share/man/man3/libssh2_sftp_setstat.3", + "path_type": "hardlink", + "sha256": "68ed4b14c9c7e1469110a697269f5425e486865bb345aedba5193d0350550b95", + "size_in_bytes": 722 + }, + { + "_path": "share/man/man3/libssh2_sftp_shutdown.3", + "path_type": "hardlink", + "sha256": "db9269bef0cf8083e498126bbb589ef7ab1735daa6c3533f6d71237901955ca3", + "size_in_bytes": 764 + }, + { + "_path": "share/man/man3/libssh2_sftp_stat.3", + "path_type": "hardlink", + "sha256": "c58253aa8d0130d9828b66c0fc048d0b17cd323f88945343e7a2d468629b9704", + "size_in_bytes": 716 + }, + { + "_path": "share/man/man3/libssh2_sftp_stat_ex.3", + "path_type": "hardlink", + "sha256": "a75b72b3a630be833ffe0ee520c90de3daf5a0549483e3c67107e6ac13dfbbb0", + "size_in_bytes": 2417 + }, + { + "_path": "share/man/man3/libssh2_sftp_statvfs.3", + "path_type": "hardlink", + "sha256": "49bc4561fdfd1a7a967f5361821cc9271d23a422c781f3cfe547bc9e69dd0638", + "size_in_bytes": 2813 + }, + { + "_path": "share/man/man3/libssh2_sftp_symlink.3", + "path_type": "hardlink", + "sha256": "166a69b8888e716d35f58585b8e5d7c38b25f375f2a6133fa46a7338f24e7d01", + "size_in_bytes": 810 + }, + { + "_path": "share/man/man3/libssh2_sftp_symlink_ex.3", + "path_type": "hardlink", + "sha256": "99688bb027725a7616cfd3864401bfb571dbd6b4c4e64475dce8c6846a21e9d1", + "size_in_bytes": 2895 + }, + { + "_path": "share/man/man3/libssh2_sftp_tell.3", + "path_type": "hardlink", + "sha256": "997093bf15033ba12e0d492e5168b5abc7714c61ad16adb5dd13814824188f46", + "size_in_bytes": 755 + }, + { + "_path": "share/man/man3/libssh2_sftp_tell64.3", + "path_type": "hardlink", + "sha256": "a9528d4cfb07191c6e964f7451bd5ea24a1cd21306aaba89a77cbad1cc585fa7", + "size_in_bytes": 721 + }, + { + "_path": "share/man/man3/libssh2_sftp_unlink.3", + "path_type": "hardlink", + "sha256": "47fb4511fc65ae3accd55630db74a47c1343d024e0c79400081eaa97efdee28e", + "size_in_bytes": 681 + }, + { + "_path": "share/man/man3/libssh2_sftp_unlink_ex.3", + "path_type": "hardlink", + "sha256": "44b089c206b2a40c8571244ef6d50b15a840b9e0cb8d96854d839fe3a00c69cc", + "size_in_bytes": 1342 + }, + { + "_path": "share/man/man3/libssh2_sftp_write.3", + "path_type": "hardlink", + "sha256": "e2e53bb3099c438ba12757e0fb2c9b363a7eb579f456f695c5b7b03367ae7a2a", + "size_in_bytes": 3080 + }, + { + "_path": "share/man/man3/libssh2_sign_sk.3", + "path_type": "hardlink", + "sha256": "5743fdcbb209cc0e5082e366764229661a4b268f93da05774099475fc1ea54e4", + "size_in_bytes": 3171 + }, + { + "_path": "share/man/man3/libssh2_trace.3", + "path_type": "hardlink", + "sha256": "95432f298aab883ad52984527059619814d4f6ed2b51ea68242b2f7d85eadb0e", + "size_in_bytes": 1123 + }, + { + "_path": "share/man/man3/libssh2_trace_sethandler.3", + "path_type": "hardlink", + "sha256": "1cbc4fb7d2dafb33dd83f43665b041ea567b69ab7bd0840586fbc467dbdf044a", + "size_in_bytes": 1406 + }, + { + "_path": "share/man/man3/libssh2_userauth_authenticated.3", + "path_type": "hardlink", + "sha256": "36f943511f320e72ae3e58c8d4c1c34de8d40052a38e360bc892661a696b6f25", + "size_in_bytes": 631 + }, + { + "_path": "share/man/man3/libssh2_userauth_banner.3", + "path_type": "hardlink", + "sha256": "ce53486fa574dc8963823fe45fc6bcd1b0784bfa60eb4c5b4e27294a28a6fc53", + "size_in_bytes": 1198 + }, + { + "_path": "share/man/man3/libssh2_userauth_hostbased_fromfile.3", + "path_type": "hardlink", + "sha256": "a8bc73ec12de2eb9fbdda4a4650d9ec0930973ce344319c4211300e46e48e1ae", + "size_in_bytes": 1062 + }, + { + "_path": "share/man/man3/libssh2_userauth_hostbased_fromfile_ex.3", + "path_type": "hardlink", + "sha256": "99d9d87ccb9bcd513ce12927066b3bb1ccef1468a51819fa1e0d9f325a492ed4", + "size_in_bytes": 318 + }, + { + "_path": "share/man/man3/libssh2_userauth_keyboard_interactive.3", + "path_type": "hardlink", + "sha256": "286256d30eabaddbfea956c71560f693ffdcaf30595cbaeb3cf002c068e3f270", + "size_in_bytes": 921 + }, + { + "_path": "share/man/man3/libssh2_userauth_keyboard_interactive_ex.3", + "path_type": "hardlink", + "sha256": "6f5f59facf7221417ab19d55c3188ef13ab41691799b88a9a680ae13c8e05fc7", + "size_in_bytes": 2444 + }, + { + "_path": "share/man/man3/libssh2_userauth_list.3", + "path_type": "hardlink", + "sha256": "d261efe75b56449123f45929ea41d60da39c3c375dcee87d7238eda9a70dc442", + "size_in_bytes": 1727 + }, + { + "_path": "share/man/man3/libssh2_userauth_password.3", + "path_type": "hardlink", + "sha256": "1f3955b0503ffa39f6cff55a1ddd2283c6b0b183ecd2da2089815f9edd7f9c91", + "size_in_bytes": 783 + }, + { + "_path": "share/man/man3/libssh2_userauth_password_ex.3", + "path_type": "hardlink", + "sha256": "e90b6ad0c2a4bc406e748319849cf147ba3b326fc77eb331fcab6d8e252862e1", + "size_in_bytes": 2325 + }, + { + "_path": "share/man/man3/libssh2_userauth_publickey.3", + "path_type": "hardlink", + "sha256": "f690a31d61110b656610f257fe0609b5b6e59529c247b7fa866f31a07c4a8a45", + "size_in_bytes": 1007 + }, + { + "_path": "share/man/man3/libssh2_userauth_publickey_fromfile.3", + "path_type": "hardlink", + "sha256": "3e2f767ff85f3e69baab1d6a26f38cb6b9e614f9d3c9ea9ea4b281774e0da1d7", + "size_in_bytes": 1004 + }, + { + "_path": "share/man/man3/libssh2_userauth_publickey_fromfile_ex.3", + "path_type": "hardlink", + "sha256": "ec140c49395f21372077ea929740c72259d9ec40c15042fa13d90657489a0516", + "size_in_bytes": 2203 + }, + { + "_path": "share/man/man3/libssh2_userauth_publickey_frommemory.3", + "path_type": "hardlink", + "sha256": "68c340ccf9a45c38d90fb9099e15d474b3b1df22fcba995f0713c3974586edd5", + "size_in_bytes": 2412 + }, + { + "_path": "share/man/man3/libssh2_userauth_publickey_sk.3", + "path_type": "hardlink", + "sha256": "3172feca0991e9ea79fdc9dc98f894f53c73bba2347bf3ea9650ad26ec32ce43", + "size_in_bytes": 5459 + }, + { + "_path": "share/man/man3/libssh2_version.3", + "path_type": "hardlink", + "sha256": "b345a7bb83082bfb168a8372a8a5e05a7dc50a31a1f765b95fb0d35ca7a0f49f", + "size_in_bytes": 1334 + } + ], + "paths_version": 1 +} \ No newline at end of file diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/info/recipe/bld.bat b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/info/recipe/bld.bat new file mode 100644 index 0000000000000000000000000000000000000000..ffd705e4b87743aac49c6b304f7801581df19119 --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/info/recipe/bld.bat @@ -0,0 +1,30 @@ +set PATH=%PREFIX%\cmake-bin\bin;%PATH% + +set CFLAGS= +set CXXFLAGS= + +mkdir build +pushd build + cmake .. -GNinja ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DBUILD_SHARED_LIBS=ON ^ + -DBUILD_STATIC_LIBS=OFF ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_PREFIX_PATH=%LIBRARY_PREFIX% ^ + -DENABLE_ZLIB_COMPRESSION=ON ^ + -DCRYPTO_BACKEND=OpenSSL ^ + -DBUILD_EXAMPLES=OFF ^ + -DBUILD_TESTING=ON ^ + -DRUN_DOCKER_TESTS=OFF ^ + -DRUN_SSHD_TESTS=OFF ^ + %CMAKE_ARGS% + + ninja -j%CPU_COUNT% + IF %ERRORLEVEL% NEQ 0 exit 1 + REM Skip Docker and SSHD tests (see above) because they involve external dependencies + ctest --output-on-failure + IF %ERRORLEVEL% NEQ 0 exit 1 + ninja install + IF %ERRORLEVEL% NEQ 0 exit 1 +popd diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/info/recipe/build.sh b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/info/recipe/build.sh new file mode 100644 index 0000000000000000000000000000000000000000..95a01a72ebbaf973b724e90d8853c360b5cb6b10 --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/info/recipe/build.sh @@ -0,0 +1,36 @@ +#!/bin/bash + +if [[ $target_platform =~ linux.* ]]; then + export LDFLAGS="$LDFLAGS -Wl,-rpath-link,$PREFIX/lib" +fi + +# linux-aarch64 activations fails to set `ar` tool. This can be +# removed when ctng-compiler-activation is corrected. +if [[ "${target_platform}" == linux-aarch64 ]]; then + if [[ -n "$AR" ]]; then + CMAKE_ARGS="${CMAKE_ARGS} -DCMAKE_AR=${AR}" + fi +fi + +mkdir build-shared +pushd build-shared || exit + cmake -GNinja \ + ${CMAKE_ARGS} \ + -DCMAKE_INSTALL_PREFIX=${PREFIX} \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_STATIC_LIBS=OFF \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCRYPTO_BACKEND=OpenSSL \ + -DENABLE_ZLIB_COMPRESSION=ON \ + -DBUILD_EXAMPLES=OFF \ + -DBUILD_TESTING=ON \ + -DRUN_DOCKER_TESTS=OFF \ + -DRUN_SSHD_TESTS=OFF \ + .. + + ninja -j${CPU_COUNT} + # Skip Docker and SSHD tests (see above) because they involve external dependencies + ctest --output-on-failure + ninja install + # ctest fails on the docker image 'sh: docker: command not found' +popd || exit diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/info/recipe/conda_build_config.yaml b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/info/recipe/conda_build_config.yaml new file mode 100644 index 0000000000000000000000000000000000000000..d162c1281ef667f772fb4a4e093ab506511fafca --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/info/recipe/conda_build_config.yaml @@ -0,0 +1,107 @@ +VERBOSE_AT: V=1 +VERBOSE_CM: VERBOSE=1 +blas_impl: openblas +boost: '1.82' +boost_cpp: '1.82' +bzip2: '1.0' +c_compiler: gcc +c_compiler_version: 11.2.0 +cairo: '1.16' +cgo_compiler: go-cgo +cgo_compiler_version: '1.21' +channel_targets: defaults +clang_variant: clang +cpu_optimization_target: nocona +cran_mirror: https://mran.microsoft.com/snapshot/2018-01-01 +cuda_compiler: cuda-nvcc +cuda_compiler_version: '12.4' +cxx_compiler: gxx +cxx_compiler_version: 11.2.0 +cyrus_sasl: 2.1.28 +dbus: '1' +expat: '2' +extend_keys: +- pin_run_as_build +- extend_keys +- ignore_build_only_deps +- ignore_version +fontconfig: '2.14' +fortran_compiler: gfortran +fortran_compiler_version: 11.2.0 +freetype: '2.10' +g2clib: '1.6' +geos: 3.8.0 +giflib: '5' +glib: '2' +gmp: '6.2' +gnu: 2.12.2 +go_compiler: go-nocgo +go_compiler_version: '1.21' +gst_plugins_base: '1.14' +gstreamer: '1.14' +harfbuzz: 4.3.0 +hdf4: '4.2' +hdf5: 1.12.1 +hdfeos2: '2.20' +hdfeos5: '5.1' +icu: '73' +ignore_build_only_deps: +- python +- numpy +jpeg: '9' +libabseil: '20240116.2' +libcurl: 8.1.1 +libdap4: '3.19' +libffi: '3.4' +libgd: 2.3.3 +libgdal: 3.6.2 +libgrpc: 1.62.2 +libgsasl: '1.10' +libkml: '1.3' +libnetcdf: '4.8' +libpng: '1.6' +libprotobuf: 4.25.3 +libtiff: 4.5.0 +libwebp: 1.3.2 +libxml2: '2.13' +libxslt: '1.1' +llvm_variant: llvm +lua: '5' +lzo: '2' +mkl: 2023.* +mpfr: '4' +numpy: '1.26' +openblas: 0.3.21 +openjpeg: '2.3' +openssl: '3.0' +perl: '5.34' +pin_run_as_build: + python: + max_pin: x.x + min_pin: x.x + r-base: + max_pin: x.x + min_pin: x.x + libboost: + max_pin: x.x.x +pixman: '0.40' +proj: 9.3.1 +proj4: 5.2.0 +python: '3.12' +python_impl: cpython +python_implementation: cpython +r_base: '3.5' +r_implementation: mro-base +r_version: 3.5.0 +readline: '8.1' +rust_compiler: rust +rust_compiler_version: 1.82.0 +sqlite: '3' +target_platform: linux-64 +tk: '8.6' +xz: '5' +zip_keys: +- - python + - numpy +zlib: '1.2' +zstd: 1.5.2 diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/info/recipe/meta.yaml b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/info/recipe/meta.yaml new file mode 100644 index 0000000000000000000000000000000000000000..6bada299be1156f2f9969d1206295fbc4254c2fe --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/info/recipe/meta.yaml @@ -0,0 +1,73 @@ +# This file created by conda-build 24.1.2 +# meta.yaml template originally from: +# /feedstock/recipe, last modified Fri Nov 29 14:38:06 2024 +# ------------------------------------------------ + +package: + name: libssh2 + version: 1.11.1 +source: + sha256: d9ec76cbe34db98eec3539fe2c899d26b0c837cb3eb466a56b0f109cabf658f7 + url: https://www.libssh2.org/download/libssh2-1.11.1.tar.gz +build: + number: '0' + run_exports: + - libssh2 >=1.11.1,<2.0a0 + string: h251f7ec_0 +requirements: + build: + - _libgcc_mutex 0.1 main + - _openmp_mutex 5.1 1_gnu + - _sysroot_linux-64_curr_repodata_hack 3 haa98f57_10 + - binutils_impl_linux-64 2.40 h5293946_0 + - binutils_linux-64 2.40.0 hc2dff05_1 + - cmake-no-system 3.25.3 h6a678d5_0 + - gcc_impl_linux-64 11.2.0 h1234567_1 + - gcc_linux-64 11.2.0 h5c386dc_1 + - kernel-headers_linux-64 3.10.0 h57e8cba_10 + - ld_impl_linux-64 2.40 h12ee557_0 + - libgcc-devel_linux-64 11.2.0 h1234567_1 + - libgcc-ng 11.2.0 h1234567_1 + - libgomp 11.2.0 h1234567_1 + - libstdcxx-ng 11.2.0 h1234567_1 + - ninja-base 1.12.1 hdb19cb5_0 + - sysroot_linux-64 2.17 h57e8cba_10 + host: + - _libgcc_mutex 0.1 main + - _openmp_mutex 5.1 1_gnu + - ca-certificates 2024.11.26 h06a4308_0 + - libgcc-ng 11.2.0 h1234567_1 + - libgomp 11.2.0 h1234567_1 + - openssl 3.0.15 h5eee18b_0 + - zlib 1.2.13 h5eee18b_1 + run: + - libgcc-ng >=11.2.0 + - openssl >=3.0.15,<4.0a0 + - zlib >=1.2.13,<1.3.0a0 +test: + commands: + - test -f $PREFIX/include/libssh2.h + - test -f $PREFIX/include/libssh2_publickey.h + - test -f $PREFIX/include/libssh2_sftp.h + - test -f $PREFIX/lib/libssh2${SHLIB_EXT} + - test -f $PREFIX/lib/pkgconfig/libssh2.pc +about: + description: 'libssh2 is a library implementing the SSH2 protocol, available under + the revised BSD license. + + ' + dev_url: https://github.com/libssh2/libssh2 + doc_url: https://www.libssh2.org/docs.html + home: https://www.libssh2.org/ + license: BSD-3-Clause + license_family: BSD + license_file: COPYING + summary: the SSH library +extra: + copy_test_source_files: true + final: true + flow_run_id: 4b0cea38-9e15-42af-bd4a-1ec053c9b0d5 + recipe-maintainers: + - shadowwalkersb + remote_url: git@github.com:AnacondaRecipes/libssh2-feedstock.git + sha: ccf17c18a57eafac668302e8b68bd89ce4526611 diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/info/recipe/meta.yaml.template b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/info/recipe/meta.yaml.template new file mode 100644 index 0000000000000000000000000000000000000000..8d5ac725c38370081791944aadc12fbe8f164eb1 --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/info/recipe/meta.yaml.template @@ -0,0 +1,61 @@ +{% set name = "libssh2" %} +{% set version = "1.11.1" %} + +package: + name: {{ name }} + version: {{ version }} + +source: + url: https://www.libssh2.org/download/{{ name }}-{{ version }}.tar.gz + sha256: d9ec76cbe34db98eec3539fe2c899d26b0c837cb3eb466a56b0f109cabf658f7 + +build: + number: 0 + run_exports: + - {{ pin_subpackage('libssh2') }} + +requirements: + build: + - {{ compiler('c') }} + # This breaks a dependency cycle: + # curl->libssh2->cmake->curl + - cmake-no-system + - ninja-base + host: + - openssl {{ openssl }} + - zlib {{ zlib }} + run: + # exact pin handled through openssl and zlib run_exports + - openssl + - zlib + +test: + commands: + - test -f $PREFIX/include/libssh2.h # [not win] + - test -f $PREFIX/include/libssh2_publickey.h # [not win] + - test -f $PREFIX/include/libssh2_sftp.h # [not win] + + - test -f $PREFIX/lib/libssh2${SHLIB_EXT} # [not win] + - test -f $PREFIX/lib/pkgconfig/libssh2.pc # [not win] + + - if not exist %LIBRARY_INC%\\libssh2.h exit 1 # [win] + - if not exist %LIBRARY_INC%\\libssh2_publickey.h exit 1 # [win] + - if not exist %LIBRARY_INC%\\libssh2_sftp.h exit 1 # [win] + - if not exist %LIBRARY_LIB%\\libssh2.lib exit 1 # [win] + - if not exist %LIBRARY_LIB%\\pkgconfig\\libssh2.pc exit 1 # [win] + - if not exist %LIBRARY_BIN%\\libssh2.dll exit 1 # [win] + +about: + home: https://www.libssh2.org/ + license: BSD-3-Clause + license_family: BSD + license_file: COPYING + summary: 'the SSH library' + description: | + libssh2 is a library implementing the SSH2 protocol, available under the revised BSD license. + doc_url: https://www.libssh2.org/docs.html + dev_url: https://github.com/libssh2/libssh2 + +extra: + recipe-maintainers: + - shadowwalkersb diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/info/repodata_record.json b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/info/repodata_record.json new file mode 100644 index 0000000000000000000000000000000000000000..097c0e646ad24819b57d80be0a867d49ac18331e --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/info/repodata_record.json @@ -0,0 +1,24 @@ +{ + "arch": "x86_64", + "build": "h251f7ec_0", + "build_number": 0, + "channel": "https://repo.anaconda.com/pkgs/main/linux-64/", + "constrains": [], + "depends": [ + "libgcc-ng >=11.2.0", + "openssl >=3.0.15,<4.0a0", + "zlib >=1.2.13,<2.0.0a0" + ], + "fn": "libssh2-1.11.1-h251f7ec_0.conda", + "license": "BSD-3-Clause", + "license_family": "BSD", + "md5": "dd68c24355431c0543339dda1404129d", + "name": "libssh2", + "platform": "linux", + "sha256": "57da13c06557d7d6f21a0ac6d1e83a3e990d2217adcc4dc395009eb56ed040a2", + "size": 315187, + "subdir": "linux-64", + "timestamp": 1732891131000, + "url": "https://repo.anaconda.com/pkgs/main/linux-64/libssh2-1.11.1-h251f7ec_0.conda", + "version": "1.11.1" +} \ No newline at end of file diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/info/run_exports.json b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/info/run_exports.json new file mode 100644 index 0000000000000000000000000000000000000000..2af9ae8511dd2740c2b095b9488b54933863799c --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/info/run_exports.json @@ -0,0 +1 @@ +{"weak": ["libssh2 >=1.11.1,<2.0a0"]} \ No newline at end of file diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/info/test/run_test.sh b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/info/test/run_test.sh new file mode 100644 index 0000000000000000000000000000000000000000..8b01f732af80bd01962cfb5a1b1c2780fe1c87ef --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/info/test/run_test.sh @@ -0,0 +1,12 @@ + + +set -ex + + + +test -f $PREFIX/include/libssh2.h +test -f $PREFIX/include/libssh2_publickey.h +test -f $PREFIX/include/libssh2_sftp.h +test -f $PREFIX/lib/libssh2${SHLIB_EXT} +test -f $PREFIX/lib/pkgconfig/libssh2.pc +exit 0 diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/lib/cmake/libssh2/FindLibgcrypt.cmake b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/lib/cmake/libssh2/FindLibgcrypt.cmake new file mode 100644 index 0000000000000000000000000000000000000000..4582ce9b21dd987a3dc7aa39d0a40d9715173fb8 --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/lib/cmake/libssh2/FindLibgcrypt.cmake @@ -0,0 +1,59 @@ +# Copyright (C) The libssh2 project and its contributors. +# SPDX-License-Identifier: BSD-3-Clause +# +########################################################################### +# Find the libgcrypt library +# +# Input variables: +# +# LIBGCRYPT_INCLUDE_DIR The libgcrypt include directory +# LIBGCRYPT_LIBRARY Path to libgcrypt library +# +# Result variables: +# +# LIBGCRYPT_FOUND System has libgcrypt +# LIBGCRYPT_INCLUDE_DIRS The libgcrypt include directories +# LIBGCRYPT_LIBRARIES The libgcrypt library names +# LIBGCRYPT_LIBRARY_DIRS The libgcrypt library directories +# LIBGCRYPT_CFLAGS Required compiler flags +# LIBGCRYPT_VERSION Version of libgcrypt + +if((UNIX OR VCPKG_TOOLCHAIN OR (MINGW AND NOT CMAKE_CROSSCOMPILING)) AND + NOT DEFINED LIBGCRYPT_INCLUDE_DIR AND + NOT DEFINED LIBGCRYPT_LIBRARY) + find_package(PkgConfig QUIET) + pkg_check_modules(LIBGCRYPT "libgcrypt") +endif() + +if(LIBGCRYPT_FOUND) + string(REPLACE ";" " " LIBGCRYPT_CFLAGS "${LIBGCRYPT_CFLAGS}") + message(STATUS "Found Libgcrypt (via pkg-config): ${LIBGCRYPT_INCLUDE_DIRS} (found version \"${LIBGCRYPT_VERSION}\")") +else() + find_path(LIBGCRYPT_INCLUDE_DIR NAMES "gcrypt.h") + find_library(LIBGCRYPT_LIBRARY NAMES "gcrypt" "libgcrypt") + + if(LIBGCRYPT_INCLUDE_DIR AND EXISTS "${LIBGCRYPT_INCLUDE_DIR}/gcrypt.h") + set(_version_regex "#[\t ]*define[\t ]+GCRYPT_VERSION[\t ]+\"([^\"]*)\"") + file(STRINGS "${LIBGCRYPT_INCLUDE_DIR}/gcrypt.h" _version_str REGEX "${_version_regex}") + string(REGEX REPLACE "${_version_regex}" "\\1" _version_str "${_version_str}") + set(LIBGCRYPT_VERSION "${_version_str}") + unset(_version_regex) + unset(_version_str) + endif() + + include(FindPackageHandleStandardArgs) + find_package_handle_standard_args(Libgcrypt + REQUIRED_VARS + LIBGCRYPT_INCLUDE_DIR + LIBGCRYPT_LIBRARY + VERSION_VAR + LIBGCRYPT_VERSION + ) + + if(LIBGCRYPT_FOUND) + set(LIBGCRYPT_INCLUDE_DIRS ${LIBGCRYPT_INCLUDE_DIR}) + set(LIBGCRYPT_LIBRARIES ${LIBGCRYPT_LIBRARY}) + endif() + + mark_as_advanced(LIBGCRYPT_INCLUDE_DIR LIBGCRYPT_LIBRARY) +endif() diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/lib/cmake/libssh2/FindMbedTLS.cmake b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/lib/cmake/libssh2/FindMbedTLS.cmake new file mode 100644 index 0000000000000000000000000000000000000000..26bc565576ffd58352a5b0d7b1631d3e6d868633 --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/lib/cmake/libssh2/FindMbedTLS.cmake @@ -0,0 +1,69 @@ +# Copyright (C) The libssh2 project and its contributors. +# SPDX-License-Identifier: BSD-3-Clause +# +########################################################################### +# Find the mbedtls library +# +# Input variables: +# +# MBEDTLS_INCLUDE_DIR The mbedtls include directory +# MBEDCRYPTO_LIBRARY Path to mbedcrypto library +# +# Result variables: +# +# MBEDTLS_FOUND System has mbedtls +# MBEDTLS_INCLUDE_DIRS The mbedtls include directories +# MBEDTLS_LIBRARIES The mbedtls library names +# MBEDTLS_LIBRARY_DIRS The mbedtls library directories +# MBEDTLS_CFLAGS Required compiler flags +# MBEDTLS_VERSION Version of mbedtls + +if((UNIX OR VCPKG_TOOLCHAIN OR (MINGW AND NOT CMAKE_CROSSCOMPILING)) AND + NOT DEFINED MBEDTLS_INCLUDE_DIR AND + NOT DEFINED MBEDCRYPTO_LIBRARY) + find_package(PkgConfig QUIET) + pkg_check_modules(MBEDTLS "mbedcrypto") +endif() + +if(MBEDTLS_FOUND) + string(REPLACE ";" " " MBEDTLS_CFLAGS "${MBEDTLS_CFLAGS}") + message(STATUS "Found MbedTLS (via pkg-config): ${MBEDTLS_INCLUDE_DIRS} (found version \"${MBEDTLS_VERSION}\")") +else() + find_path(MBEDTLS_INCLUDE_DIR NAMES "mbedtls/version.h") + find_library(MBEDCRYPTO_LIBRARY NAMES "mbedcrypto" "libmbedcrypto") + + if(MBEDTLS_INCLUDE_DIR) + if(EXISTS "${MBEDTLS_INCLUDE_DIR}/mbedtls/build_info.h") # 3.x + set(_version_header "${MBEDTLS_INCLUDE_DIR}/mbedtls/build_info.h") + elseif(EXISTS "${MBEDTLS_INCLUDE_DIR}/mbedtls/version.h") # 2.x + set(_version_header "${MBEDTLS_INCLUDE_DIR}/mbedtls/version.h") + else() + unset(_version_header) + endif() + if(_version_header) + set(_version_regex "#[\t ]*define[\t ]+MBEDTLS_VERSION_STRING[\t ]+\"([0-9.]+)\"") + file(STRINGS "${_version_header}" _version_str REGEX "${_version_regex}") + string(REGEX REPLACE "${_version_regex}" "\\1" _version_str "${_version_str}") + set(MBEDTLS_VERSION "${_version_str}") + unset(_version_regex) + unset(_version_str) + unset(_version_header) + endif() + endif() + + include(FindPackageHandleStandardArgs) + find_package_handle_standard_args(MbedTLS + REQUIRED_VARS + MBEDTLS_INCLUDE_DIR + MBEDCRYPTO_LIBRARY + VERSION_VAR + MBEDTLS_VERSION + ) + + if(MBEDTLS_FOUND) + set(MBEDTLS_INCLUDE_DIRS ${MBEDTLS_INCLUDE_DIR}) + set(MBEDTLS_LIBRARIES ${MBEDCRYPTO_LIBRARY}) + endif() + + mark_as_advanced(MBEDTLS_INCLUDE_DIR MBEDCRYPTO_LIBRARY) +endif() diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/lib/cmake/libssh2/FindWolfSSL.cmake b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/lib/cmake/libssh2/FindWolfSSL.cmake new file mode 100644 index 0000000000000000000000000000000000000000..f66a59dfe60d8eaf8a321b36ba60ffee7d96ad8b --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/lib/cmake/libssh2/FindWolfSSL.cmake @@ -0,0 +1,59 @@ +# Copyright (C) The libssh2 project and its contributors. +# SPDX-License-Identifier: BSD-3-Clause +# +########################################################################### +# Find the wolfssl library +# +# Input variables: +# +# WOLFSSL_INCLUDE_DIR The wolfssl include directory +# WOLFSSL_LIBRARY Path to wolfssl library +# +# Result variables: +# +# WOLFSSL_FOUND System has wolfssl +# WOLFSSL_INCLUDE_DIRS The wolfssl include directories +# WOLFSSL_LIBRARIES The wolfssl library names +# WOLFSSL_LIBRARY_DIRS The wolfssl library directories +# WOLFSSL_CFLAGS Required compiler flags +# WOLFSSL_VERSION Version of wolfssl + +if((UNIX OR VCPKG_TOOLCHAIN OR (MINGW AND NOT CMAKE_CROSSCOMPILING)) AND + NOT DEFINED WOLFSSL_INCLUDE_DIR AND + NOT DEFINED WOLFSSL_LIBRARY) + find_package(PkgConfig QUIET) + pkg_check_modules(WOLFSSL "wolfssl") +endif() + +if(WOLFSSL_FOUND) + string(REPLACE ";" " " WOLFSSL_CFLAGS "${WOLFSSL_CFLAGS}") + message(STATUS "Found WolfSSL (via pkg-config): ${WOLFSSL_INCLUDE_DIRS} (found version \"${WOLFSSL_VERSION}\")") +else() + find_path(WOLFSSL_INCLUDE_DIR NAMES "wolfssl/options.h") + find_library(WOLFSSL_LIBRARY NAMES "wolfssl") + + if(WOLFSSL_INCLUDE_DIR AND EXISTS "${WOLFSSL_INCLUDE_DIR}/wolfssl/version.h") + set(_version_regex "#[\t ]*define[\t ]+LIBWOLFSSL_VERSION_STRING[\t ]+\"([^\"]*)\"") + file(STRINGS "${WOLFSSL_INCLUDE_DIR}/wolfssl/version.h" _version_str REGEX "${_version_regex}") + string(REGEX REPLACE "${_version_regex}" "\\1" _version_str "${_version_str}") + set(WOLFSSL_VERSION "${_version_str}") + unset(_version_regex) + unset(_version_str) + endif() + + include(FindPackageHandleStandardArgs) + find_package_handle_standard_args(WolfSSL + REQUIRED_VARS + WOLFSSL_INCLUDE_DIR + WOLFSSL_LIBRARY + VERSION_VAR + WOLFSSL_VERSION + ) + + if(WOLFSSL_FOUND) + set(WOLFSSL_INCLUDE_DIRS ${WOLFSSL_INCLUDE_DIR}) + set(WOLFSSL_LIBRARIES ${WOLFSSL_LIBRARY}) + endif() + + mark_as_advanced(WOLFSSL_INCLUDE_DIR WOLFSSL_LIBRARY) +endif() diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/lib/cmake/libssh2/libssh2-config-version.cmake b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/lib/cmake/libssh2/libssh2-config-version.cmake new file mode 100644 index 0000000000000000000000000000000000000000..fbdab0cc82240325fac55f9bdca0d9b0270023a8 --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/lib/cmake/libssh2/libssh2-config-version.cmake @@ -0,0 +1,70 @@ +# This is a basic version file for the Config-mode of find_package(). +# It is used by write_basic_package_version_file() as input file for configure_file() +# to create a version-file which can be installed along a config.cmake file. +# +# The created file sets PACKAGE_VERSION_EXACT if the current version string and +# the requested version string are exactly the same and it sets +# PACKAGE_VERSION_COMPATIBLE if the current version is >= requested version, +# but only if the requested major version is the same as the current one. +# The variable CVF_VERSION must be set before calling configure_file(). + + +set(PACKAGE_VERSION "1.11.1") + +if(PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION) + set(PACKAGE_VERSION_COMPATIBLE FALSE) +else() + + if("1.11.1" MATCHES "^([0-9]+)\\.") + set(CVF_VERSION_MAJOR "${CMAKE_MATCH_1}") + if(NOT CVF_VERSION_MAJOR VERSION_EQUAL 0) + string(REGEX REPLACE "^0+" "" CVF_VERSION_MAJOR "${CVF_VERSION_MAJOR}") + endif() + else() + set(CVF_VERSION_MAJOR "1.11.1") + endif() + + if(PACKAGE_FIND_VERSION_RANGE) + # both endpoints of the range must have the expected major version + math (EXPR CVF_VERSION_MAJOR_NEXT "${CVF_VERSION_MAJOR} + 1") + if (NOT PACKAGE_FIND_VERSION_MIN_MAJOR STREQUAL CVF_VERSION_MAJOR + OR ((PACKAGE_FIND_VERSION_RANGE_MAX STREQUAL "INCLUDE" AND NOT PACKAGE_FIND_VERSION_MAX_MAJOR STREQUAL CVF_VERSION_MAJOR) + OR (PACKAGE_FIND_VERSION_RANGE_MAX STREQUAL "EXCLUDE" AND NOT PACKAGE_FIND_VERSION_MAX VERSION_LESS_EQUAL CVF_VERSION_MAJOR_NEXT))) + set(PACKAGE_VERSION_COMPATIBLE FALSE) + elseif(PACKAGE_FIND_VERSION_MIN_MAJOR STREQUAL CVF_VERSION_MAJOR + AND ((PACKAGE_FIND_VERSION_RANGE_MAX STREQUAL "INCLUDE" AND PACKAGE_VERSION VERSION_LESS_EQUAL PACKAGE_FIND_VERSION_MAX) + OR (PACKAGE_FIND_VERSION_RANGE_MAX STREQUAL "EXCLUDE" AND PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION_MAX))) + set(PACKAGE_VERSION_COMPATIBLE TRUE) + else() + set(PACKAGE_VERSION_COMPATIBLE FALSE) + endif() + else() + if(PACKAGE_FIND_VERSION_MAJOR STREQUAL CVF_VERSION_MAJOR) + set(PACKAGE_VERSION_COMPATIBLE TRUE) + else() + set(PACKAGE_VERSION_COMPATIBLE FALSE) + endif() + + if(PACKAGE_FIND_VERSION STREQUAL PACKAGE_VERSION) + set(PACKAGE_VERSION_EXACT TRUE) + endif() + endif() +endif() + + +# if the installed project requested no architecture check, don't perform the check +if("FALSE") + return() +endif() + +# if the installed or the using project don't have CMAKE_SIZEOF_VOID_P set, ignore it: +if("${CMAKE_SIZEOF_VOID_P}" STREQUAL "" OR "8" STREQUAL "") + return() +endif() + +# check that the installed version has the same 32/64bit-ness as the one which is currently searching: +if(NOT CMAKE_SIZEOF_VOID_P STREQUAL "8") + math(EXPR installedBits "8 * 8") + set(PACKAGE_VERSION "${PACKAGE_VERSION} (${installedBits}bit)") + set(PACKAGE_VERSION_UNSUITABLE TRUE) +endif() diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/lib/cmake/libssh2/libssh2-config.cmake b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/lib/cmake/libssh2/libssh2-config.cmake new file mode 100644 index 0000000000000000000000000000000000000000..ccc72ec4fb451329bdb7a5121e8fad15109d48f3 --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/lib/cmake/libssh2/libssh2-config.cmake @@ -0,0 +1,31 @@ +# Copyright (C) The libssh2 project and its contributors. +# SPDX-License-Identifier: BSD-3-Clause + +include(CMakeFindDependencyMacro) +list(PREPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}) + +if("OpenSSL" STREQUAL "OpenSSL") + find_dependency(OpenSSL) +elseif("OpenSSL" STREQUAL "wolfSSL") + find_dependency(WolfSSL) +elseif("OpenSSL" STREQUAL "Libgcrypt") + find_dependency(Libgcrypt) +elseif("OpenSSL" STREQUAL "mbedTLS") + find_dependency(MbedTLS) +endif() + +if(TRUE) + find_dependency(ZLIB) +endif() + +include("${CMAKE_CURRENT_LIST_DIR}/libssh2-targets.cmake") + +# Alias for either shared or static library +if(NOT TARGET libssh2::libssh2) + add_library(libssh2::libssh2 ALIAS libssh2::libssh2_shared) +endif() + +# Compatibility alias +if(NOT TARGET Libssh2::libssh2) + add_library(Libssh2::libssh2 ALIAS libssh2::libssh2_shared) +endif() diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/lib/cmake/libssh2/libssh2-targets-noconfig.cmake b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/lib/cmake/libssh2/libssh2-targets-noconfig.cmake new file mode 100644 index 0000000000000000000000000000000000000000..6f84ae433944a21f6463eabf682afb5ebd929971 --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/lib/cmake/libssh2/libssh2-targets-noconfig.cmake @@ -0,0 +1,19 @@ +#---------------------------------------------------------------- +# Generated CMake target import file. +#---------------------------------------------------------------- + +# Commands may need to know the format version. +set(CMAKE_IMPORT_FILE_VERSION 1) + +# Import target "libssh2::libssh2_shared" for configuration "" +set_property(TARGET libssh2::libssh2_shared APPEND PROPERTY IMPORTED_CONFIGURATIONS NOCONFIG) +set_target_properties(libssh2::libssh2_shared PROPERTIES + IMPORTED_LOCATION_NOCONFIG "${_IMPORT_PREFIX}/lib/libssh2.so.1.0.1" + IMPORTED_SONAME_NOCONFIG "libssh2.so.1" + ) + +list(APPEND _cmake_import_check_targets libssh2::libssh2_shared ) +list(APPEND _cmake_import_check_files_for_libssh2::libssh2_shared "${_IMPORT_PREFIX}/lib/libssh2.so.1.0.1" ) + +# Commands beyond this point should not need to know the version. +set(CMAKE_IMPORT_FILE_VERSION) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/lib/cmake/libssh2/libssh2-targets.cmake b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/lib/cmake/libssh2/libssh2-targets.cmake new file mode 100644 index 0000000000000000000000000000000000000000..a30310991c79847d2d03812c166f8b797ef4c42d --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/lib/cmake/libssh2/libssh2-targets.cmake @@ -0,0 +1,102 @@ +# Generated by CMake + +if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" LESS 2.8) + message(FATAL_ERROR "CMake >= 2.8.0 required") +endif() +if(CMAKE_VERSION VERSION_LESS "2.8.3") + message(FATAL_ERROR "CMake >= 2.8.3 required") +endif() +cmake_policy(PUSH) +cmake_policy(VERSION 2.8.3...3.23) +#---------------------------------------------------------------- +# Generated CMake target import file. +#---------------------------------------------------------------- + +# Commands may need to know the format version. +set(CMAKE_IMPORT_FILE_VERSION 1) + +# Protect against multiple inclusion, which would fail when already imported targets are added once more. +set(_cmake_targets_defined "") +set(_cmake_targets_not_defined "") +set(_cmake_expected_targets "") +foreach(_cmake_expected_target IN ITEMS libssh2::libssh2_shared) + list(APPEND _cmake_expected_targets "${_cmake_expected_target}") + if(TARGET "${_cmake_expected_target}") + list(APPEND _cmake_targets_defined "${_cmake_expected_target}") + else() + list(APPEND _cmake_targets_not_defined "${_cmake_expected_target}") + endif() +endforeach() +unset(_cmake_expected_target) +if(_cmake_targets_defined STREQUAL _cmake_expected_targets) + unset(_cmake_targets_defined) + unset(_cmake_targets_not_defined) + unset(_cmake_expected_targets) + unset(CMAKE_IMPORT_FILE_VERSION) + cmake_policy(POP) + return() +endif() +if(NOT _cmake_targets_defined STREQUAL "") + string(REPLACE ";" ", " _cmake_targets_defined_text "${_cmake_targets_defined}") + string(REPLACE ";" ", " _cmake_targets_not_defined_text "${_cmake_targets_not_defined}") + message(FATAL_ERROR "Some (but not all) targets in this export set were already defined.\nTargets Defined: ${_cmake_targets_defined_text}\nTargets not yet defined: ${_cmake_targets_not_defined_text}\n") +endif() +unset(_cmake_targets_defined) +unset(_cmake_targets_not_defined) +unset(_cmake_expected_targets) + + +# Compute the installation prefix relative to this file. +get_filename_component(_IMPORT_PREFIX "${CMAKE_CURRENT_LIST_FILE}" PATH) +get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) +get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) +get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) +if(_IMPORT_PREFIX STREQUAL "/") + set(_IMPORT_PREFIX "") +endif() + +# Create imported target libssh2::libssh2_shared +add_library(libssh2::libssh2_shared SHARED IMPORTED) + +set_target_properties(libssh2::libssh2_shared PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include" +) + +# Load information for each installed configuration. +file(GLOB _cmake_config_files "${CMAKE_CURRENT_LIST_DIR}/libssh2-targets-*.cmake") +foreach(_cmake_config_file IN LISTS _cmake_config_files) + include("${_cmake_config_file}") +endforeach() +unset(_cmake_config_file) +unset(_cmake_config_files) + +# Cleanup temporary variables. +set(_IMPORT_PREFIX) + +# Loop over all imported files and verify that they actually exist +foreach(_cmake_target IN LISTS _cmake_import_check_targets) + foreach(_cmake_file IN LISTS "_cmake_import_check_files_for_${_cmake_target}") + if(NOT EXISTS "${_cmake_file}") + message(FATAL_ERROR "The imported target \"${_cmake_target}\" references the file + \"${_cmake_file}\" +but this file does not exist. Possible reasons include: +* The file was deleted, renamed, or moved to another location. +* An install or uninstall procedure did not complete successfully. +* The installation package was faulty and contained + \"${CMAKE_CURRENT_LIST_FILE}\" +but not all the files it references. +") + endif() + endforeach() + unset(_cmake_file) + unset("_cmake_import_check_files_for_${_cmake_target}") +endforeach() +unset(_cmake_target) +unset(_cmake_import_check_targets) + +# This file does not depend on other imported targets which have +# been exported from the same project but in a separate export set. + +# Commands beyond this point should not need to know the version. +set(CMAKE_IMPORT_FILE_VERSION) +cmake_policy(POP) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/lib/pkgconfig/libssh2.pc b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/lib/pkgconfig/libssh2.pc new file mode 100644 index 0000000000000000000000000000000000000000..2af8d3a37b209d4f3d8f448df800fd2d15eea3c4 --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/lib/pkgconfig/libssh2.pc @@ -0,0 +1,21 @@ +########################################################################### +# libssh2 installation details +# +# Copyright (C) The libssh2 project and its contributors. +# SPDX-License-Identifier: BSD-3-Clause +########################################################################### + +prefix=/croot/libssh2_1732891098804/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: libssh2 +URL: https://libssh2.org/ +Description: Library for SSH-based communication +Version: 1.11.1 +Requires: +Requires.private: libcrypto,zlib +Libs: -L${libdir} -lssh2 +Libs.private: -lcrypto -lz +Cflags: -I${includedir} diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/doc/libssh2/AUTHORS b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/doc/libssh2/AUTHORS new file mode 100644 index 0000000000000000000000000000000000000000..e94299fcf6beffb15f222d659f49f585f24e8816 --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/doc/libssh2/AUTHORS @@ -0,0 +1,80 @@ + libssh2 is the result of many friendly people. This list is an attempt to + mention all contributors. If we have missed anyone, tell us! + + This list of names is a-z sorted. + +Adam Gobiowski +Alexander Holyapin +Alexander Lamaison +Alfred Gebert +Ben Kibbey +Bjorn Stenborg +Carlo Bramini +Cristian Rodríguez +Daiki Ueno +Dan Casey +Dan Fandrich +Daniel Stenberg +Dave Hayden +Dave McCaldon +David J Sullivan +David Robins +Dmitry Smirnov +Douglas Masterson +Edink Kadribasic +Erik Brossler +Francois Dupoux +Gellule Xg +Grubsky Grigory +Guenter Knauf +Heiner Steven +Henrik Nordstrom +James Housleys +Jasmeet Bagga +Jean-Louis Charton +Jernej Kovacic +Joey Degges +John Little +Jose Baars +Jussi Mononen +Kamil Dudka +Lars Nordin +Mark McPherson +Mark Smith +Markus Moeller +Matt Lilley +Matthew Booth +Maxime Larocque +Mike Protts +Mikhail Gusarov +Neil Gierman +Olivier Hervieu +Paul Howarth +Paul Querna +Paul Veldkamp +Peter Krempa +Peter O'Gorman +Peter Stuge +Pierre Joye +Rafael Kitover +Romain Bondue +Sara Golemon +Satish Mittal +Sean Peterson +Selcuk Gueney +Simon Hart +Simon Josefsson +Sofian Brabez +Steven Ayre +Steven Dake +Steven Van Ingelgem +TJ Saunders +Tommy Lindgren +Tor Arntsen +Viktor Szakats +Vincent Jaulin +Vincent Torri +Vlad Grachov +Wez Furlong +Yang Tse +Zl Liu diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/doc/libssh2/BINDINGS.md b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/doc/libssh2/BINDINGS.md new file mode 100644 index 0000000000000000000000000000000000000000..63ad1b0d34fca1d2fc35f9e1a5bcfc8d8cdcc90b --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/doc/libssh2/BINDINGS.md @@ -0,0 +1,25 @@ +libssh2 bindings +================ + +Creative people have written bindings or interfaces for various environments +and programming languages. Using one of these bindings allows you to take +advantage of libssh2 directly from within your favourite language. + +The bindings listed below are not part of the libssh2 distribution archives, +but must be downloaded and installed separately. + + + +[Cocoa/Objective-C](https://github.com/karelia/libssh2_sftp-Cocoa-wrapper) + +[Haskell FFI bindings](https://hackage.haskell.org/package/libssh2) + +[Perl Net::SSH2](https://metacpan.org/pod/Net::SSH2) + +[PHP ssh2](https://pecl.php.net/package/ssh2) + +[Python pylibssh2](https://pypi.python.org/pypi/pylibssh2) + +[Python-ctypes PySsh2](https://github.com/gellule/PySsh2) + +[Ruby libssh2-ruby](https://github.com/mitchellh/libssh2-ruby) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/doc/libssh2/COPYING b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/doc/libssh2/COPYING new file mode 100644 index 0000000000000000000000000000000000000000..6eb51468404b21423ff3d842adfab0cd475de13d --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/doc/libssh2/COPYING @@ -0,0 +1,43 @@ +/* Copyright (C) 2004-2007 Sara Golemon + * Copyright (C) 2005,2006 Mikhail Gusarov + * Copyright (C) 2006-2007 The Written Word, Inc. + * Copyright (C) 2007 Eli Fant + * Copyright (C) 2009-2023 Daniel Stenberg + * Copyright (C) 2008, 2009 Simon Josefsson + * Copyright (C) 2000 Markus Friedl + * Copyright (C) 2015 Microsoft Corp. + * All rights reserved. + * + * Redistribution and use in source and binary forms, + * with or without modification, are permitted provided + * that the following conditions are met: + * + * Redistributions of source code must retain the above + * copyright notice, this list of conditions and the + * following disclaimer. + * + * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * Neither the name of the copyright holder nor the names + * of any other contributors may be used to endorse or + * promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND + * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, + * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE + * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + */ diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/doc/libssh2/HACKING.md b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/doc/libssh2/HACKING.md new file mode 100644 index 0000000000000000000000000000000000000000..11ddbd305dd7626ab6cab27bbea7f7149978fef9 --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/doc/libssh2/HACKING.md @@ -0,0 +1,14 @@ +# libssh2 source code style guide + +- 4 level indent +- spaces-only (no tabs) +- open braces on the if/for line: + + ``` + if (banana) { + go_nuts(); + } + ``` + +- keep source lines shorter than 80 columns +- See `libssh2-style.el` for how to achieve this within Emacs diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/doc/libssh2/NEWS b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/doc/libssh2/NEWS new file mode 100644 index 0000000000000000000000000000000000000000..b3bd14cbab9a36062a11c6ac52c0e83ef95ac47d --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/doc/libssh2/NEWS @@ -0,0 +1,10896 @@ + Changelog for the libssh2 project. Generated with git2news.pl + +Daniel Stenberg (16 Oct 2024) +- RELEASE-NOTES: 1.11.1 + +Viktor Szakats (8 Oct 2024) +- RELEASE-NOTES: sync [ci skip] + +- [Anders Borum brought this change] + + session: support server banners up to 8192 bytes (was: 256) + + If server had banner exceeding 256 bytes there wasn't enough room in + `_LIBSSH2_SESSION.banner_TxRx_banner`. Only the first 256 bytes would be + read making the first packet read fail but also dooming key exchange as + `session->remote.banner` didn't include everything. + + This change bumps the banner buffer to 8KB to match OpenSSH. + + Fixes #1442 + Closes #1443 + +- RELEASE-NOTES: sync [ci skip] + +- cmake: sync and improve Find modules, add `pkg-config` native detection + + - sync code between Find modules. + - wolfssl: replace `pkg-config` hints with native detection. + - libgcrypt, mbedtls: add `pkg-config`-based native detection. + - libgcrypt: add version detection. + - limit `pkg-config` use for `UNIX`, vcpkg, and non-cross MinGW builds, + and builds with no manual customization via `*_INCLUDE_DIR` or + `*_LIBRARY`. + - replace and sync Find module header comments. + - ci: delete manual mbedTLS config that's now redundant. + + Based on similar work done in curl. + + Second attempt at #1420 + Closes #1445 + +- cmake: initialize `LIBSSH2_LIBDIRS` [ci skip] + + Follow-up to c87f12963037b22e6b60411c9c2d6513c06e2f03 #1466 + +- ci/appveyor: fix and bump OpenSSL 3 path, add path check + + Follow-up to b5e68bdc37c6afa0dc777794dda8307167919d04 #1461 + Closes #1468 + +- cmake: link to OpenSSL::Crypto, not OpenSSL::SSL + + Follow-up to 82b09f9b3aae97f641fbcc2d746d2a6383abe857 #1322 + Follow-up to c84745e34e53f863ffba997ceeee7d43d1c63a4b #1128 + Cherry-picked from #1445 + Closes #1467 + +- cmake: generate `LIBSSH2_PC_LIBS_PRIVATE` dynamically + + Generate `LIBSSH2_PC_LIBS_PRIVATE` from `LIBSSH2_LIBS`. + + Also add extra libdirs (`-L`) to `Libs` and `Libs.private`. + + Logic copied from curl. + + Closes #1466 + +- cmake: initialize `LIBSSH2_PC_REQUIRES_PRIVATE` [ci skip] + + Follow-up to 0fce9dcc2909ffff5f4a1a1bc3d359fc7f409299 #1464 + +- cmake: add comment about `ibssh2.pc.in` variables [ci skip] + +- cmake: support absolute `CMAKE_INSTALL_INCLUDEDIR`/`CMAKE_INSTALL_LIBDIR` + + in `libssh2.pc`. + + Also use `${exec_prefix}` (instead of `${prefix}`) as a base for `libdir`. + + Closes #1465 + +- cmake: rename two variables and initialize them + + - `LIBRARIES` -> `LIBSSH2_LIBS` + - `SOCKET_LIBRARIES` -> `LIBSSH2_LIBS_SOCKET` + + Also initialize them before use. + + Cherry-picked from #1445 + Closes #1464 + +- ci/appveyor: reduce test runs (workaround for infrastructure permafails) + + Jobs consistently fail to connect to the test server (run in GHA) since + 2024-Aug-29: + https://ci.appveyor.com/project/libssh2org/libssh2/builds/50498393 + + There was an earlier phase of failures one month before that, that got + fixed by increasing the wait for the server in + bf3af90b3f1bb14cf452df7a8eb55cc9088f3e7f. + + Thus, skip running tests in AppVeyor CI jobs, except: After some + experiments, it seems that running tests with the last OpenSSL job and + the last WinCrypt job _work_, which still leaves some coverage. + It remains to be seen how stable this is. + + This is meant as a temporary fix till there is a solution to make all + jobs run tests reliable like up until a few months ago. + + Closes #1461 + +- [Patrick Monnerat brought this change] + + os400: drop vsprintf() use + + Follow-up to discussion in #1457 + + Plus e-mail address update. + + Closes #1462 + +- RELEASE-NOTES: sync [ci skip] + +Daniel Stenberg (30 Sep 2024) +- openssl: free allocated resources when using openssl3 + + Reproduces consistently with curl test case 638 + + Closes #1459 + +Viktor Szakats (28 Sep 2024) +- checksrc: update, check all sources, fix fallouts + + update from curl: + https://github.com/curl/curl/blob/cff75acfeca65738da8297aee0b30427b004b240/scripts/checksrc.pl + + Closes #1457 + +- cmake: prefer `find_dependency()` in `libssh2-config.cmake` + + CMake manual suggest using `find_dependency()` (over `find_package()`) + in `config.cmake` scripts. + + Ref: https://cmake.org/cmake/help/latest/module/CMakeFindDependencyMacro.html + + Closes #1460 + +- ci: use Ninja with cmake + + Closes #1458 + +GitHub (27 Sep 2024) +- [dksslq brought this change] + + Fix memory leaks in _libssh2_ecdsa_curve_name_with_octal_new and _libssh2_ecdsa_verify (#1449) + + Better error handling in`_libssh2_ecdsa_curve_name_with_octal_new` and `_libssh2_ecdsa_verify` to prevent leaks. + + Credit: dksslq + +- [rolag brought this change] + + Fix unstable connections over nonblocking sockets (#1454) + + The `send_existing()` function allows partially sent packets to be sent + fully before any further packets are sent. Originally this returned + `LIBSSH2_ERROR_BAD_USE` when a different caller or thread tried to send + an existing packet created by a different caller or thread causing the + connection to disconnect. Commit 33dddd2f8ac3bc81 removed the return + allowing any caller to continue sending another caller's packet. This + caused connection instability as discussed in #1397 and confused the + client and server causing occasional duplicate packets to be sent and + giving the error `rcvd too much data` as discussed in #1431. We return + `LIBSSH2_ERROR_EAGAIN` instead to allow existing callers to finish + sending their own packets. + + Fixes #1397 + Fixes #1431 + Related #720 + + Credit: klux21, rolag + +- [Will Cosgrove brought this change] + + Prevent possible double free of hostkey (#1452) + + NULL server hostkey based on fuzzer failure case. + +Viktor Szakats (7 Sep 2024) +- cmake: tidy up syntax, minor improvements + + - make internal variables underscore-lowercase. + - unfold lines. + - fold lines setting header directories. + - fix indent. + - drop interim variable `EXAMPLES`. + - initialize some variables before populating them. + - clear a variable after use. + - add `libssh2_dumpvars()` function for debugging. + - allow to override default `CMAKE_UNITY_BUILD_BATCH_SIZE`. + - bump up default `CMAKE_UNITY_BUILD_BATCH_SIZE` to 0 (was 32). + - tidy up option descriptions. + + Closes #1446 + +- cmake: rename mbedTLS and wolfSSL Find modules + + To match the curl ones. + + Cherry-picked from #1445 + +- RELEASE-NOTES: sync [ci skip] + +- cmake: fixup version detection in mbedTLS find module + + - avoid warning with 2.x versions about missing header file while + extracting the version number. + + - clear temp variables. + + Closes #1444 + +- buildconf: drop + + Use `autoreconf -fi` instead. + + Follow-up to fc5d77881eb6bb179f831e626d15f4f29179aad5 + Closes #1441 + +- [Michael Buckley brought this change] + + Implement chacha20-poly1305@openssh.com + + Probably the biggest and potentially most controversial change we have + to upstream. + + Because earlier versions of OpenSSL implemented the algorithm before + standardization, using an older version of OpenSSL can cause problems + connecting to OpenSSH servers. Because of this, we use the public domain + reference implementation instead of the crypto backends, just like + OpenSSH does. + + We've been holding this one for a few years. We were about to upstream + it around the same time as aes128gcm landed upstream, and the two + changes were completely incompatible. Honestly, it took me weeks to + reconcile these two implementations, and it could be much better. + + Our original implementation changed every crypt method to decrypt the + entire message at once. the AESGCM implementation instead went with this + firstlast design, where a firstlast paramater indicates whether this is + the first or last call to the crypt method for each message. That added + a lot of bookkeeping overhead, and wasn't compatible with the chacha + public domain implementation. + + As far as I could tell, OpenSSH uses the technique of decrypting the + entire message in one go, and doesn't have anything like firstlast. + However, I could not get out aes128gcm implementation to work that way, + nor could I get the chacha implementation to work with firstlast, so I + split it down the middle and let each implementation work differently. + It's kind of a mess, and probably should be cleaned up, but I don't have + the time to spend on it anymore, and it's probably better to have + everything upstream. + + Fixes #584 + Closes #1426 + +- tidy-up: do/while formatting + + Also fix an indentation and delete empty lines. + + Closes #1440 + +- wolfssl: drop header path hack + + The wolfSSL OpenSSL headers reside in `wolfssl/openssl/*.h`. + + Before this patch the wolfSSL OpenSSL compatibilty header includes were + shared with the native OpenSSL codepath, and used `openssl/*h`. For + wolfSSL builds this required a hack to append the + `/wolfssl` directory to the header search path, to find + the headers. + + This patch changes the source to use the correct header references, + allowing to drop the header path hack. + + Also fix to use the correct variable to set up the header path in CMake: + `WOLFSSL_INCLUDE_DIRS` (was: `WOLFSSL_INCLUDE_DIR`, without the `S`) + + Closes #1439 + +- cmake: mbedTLS detection tidy-ups + + - set and use `MBEDTLS_INCLUDE_DIRS`. + - stop marking `MBEDTLS_LIBRARIES` as advanced. + + Closes #1438 + +- cmake: add quotes, delete ending dirseps + + Follow-up to 3fa5282d6284efba62dc591697e6a687152bdcb1 #1166 + Closes #1437 + +- CI/appveyor: increase wait for SSH server on GHA [ci skip] + + Blind attempt to make AppVeyor CI tests work again. + +- disable DSA by default + + Also: + - add `LIBSSH2_DSA_ENABLE` to enable it explicitly. + - test the above option in CI. + - say 'deprecated' in docs and public header. + - disable DSA in the CI server config. + (OpenSSH 9.8 no longer builds with it by default) + https://www.openssh.com/txt/release-9.8 + Patch-by: Jose Quaresma + - disable more DSA code when not enabled. + + Fixes #1433 + Closes #1435 + +GitHub (30 Jul 2024) +- [Viktor Szakats brought this change] + + tidy-up: link updates (#1434) + +Marc Hoersken (27 Jul 2024) +- ci/GHA: revert concurrency and improve permissions + + Statuses are per AppVeyor event and commit, not pull-request. + Also align permissions approach with curl, least priviledge. + + Partially reverts b08cfbc99fa4df3459db4e1ccf4263fd260e9b15. + +GitHub (23 Jul 2024) +- [Will Cosgrove brought this change] + + Always init mbedtls_pk_context (#1430) + + In the failure case, mbedtls_pk_context could be free'd without first being initialized. + +- [Viktor Szakats brought this change] + + mbedtls: tidy-up (#1429) + +- [Will Cosgrove brought this change] + + Correctly initialize values (#1428) + + Fix regression with commit from #1421 + +Viktor Szakats (14 Jul 2024) +- RELEASE-NOTES: sync [ci skip] + +- [Seo Suchan brought this change] + + mbedtls: expose `mbedtls_pk_load_file()` for our use + + While it's moved to pk_internal, it won't removed in mbedTLS 3.6 LTS + so it's safe to redeclare it on our side to find it. + + This is implementing emergency fix suggested from + https://github.com/libssh2/libssh2/commit/2e4c5ec4627b3ecf4b6da16f365c011dec9a31b4#commitcomment-141379351 + + Follow-up to e973493f992313b3be73f51d3f7ca6d52e288558 #1393 + Follow-up to 2e4c5ec4627b3ecf4b6da16f365c011dec9a31b4 #1349 + Closes #1421 + +GitHub (13 Jul 2024) +- [Viktor Szakats brought this change] + + ci/GHA: simplify mbedTLS build hack for autotools (#1425) + + Follow-up to e973493f992313b3be73f51d3f7ca6d52e288558 #1393 + +- [Michael Buckley brought this change] + + Always check for null pointers before calling _libssh2_bn_set_word (#1423) + +- [Viktor Szakats brought this change] + + ci/GHA: FreeBSD 14.1, actions bump (#1424) + +- [Michael Buckley brought this change] + + Increase SFTP_HANDLE_MAXLEN back to 4092 (#1422) + + Match OpenSSH for compatibility. + +Viktor Szakats (10 Jul 2024) +- ci/GHA: tidy up casing [ci skip] + +- REUSE: fix typo in comment + +- REUSE: shorten and improve + + Follow-up to 70b8bf314cf4566a7529c5d6eae63097a926abb0 #1419 + +- REUSE: upgrade to `REUSE.toml` + + Closes #1419 + +- build: stop detecting `sys/param.h` header + + This header is no longer used. + + Follow-up to 12427f4fb8e789adcee4a6e30974932883915e88 #1415 + Closes #1418 + +- [Nicolas Mora brought this change] + + tests: avoid using `MAXPATHLEN`, for portability + + `MAXPATHLEN` is not present in some systems, e.g. GNU Hurd. + + Co-authored-by: Viktor Szakats + Ref: 54bef4c5dad868a9d45fdbfca9729b191c0abab5 #198 + Fixes #1414 + Closes #1415 + +- cmake: sync formatting in `cmake/Find*` modules + +- [Michael Buckley brought this change] + + sftp: implement posix-rename@openssh.com + + Add a new function `libssh2_sftp_posix_rename_ex()` and + `libssh2_sftp_posix_rename()`, which implement + the posix-rename@openssh.com extension. + + If the server does not support this extension, the function returns + `LIBSSH2_FX_OP_UNSUPPORTED` and it's up to the user to recover, possibly + by calling `libssh2_sftp_rename()`. + + Co-authored-by: Viktor Szakats (bump to size_t) + Closes #1386 + +- src: use `UINT32_MAX` + + Needs to be defined for platforms missing it, e.g. VS2008. + + Closes #1413 + +GitHub (25 Jun 2024) +- [Michael Buckley brought this change] + + Fix a memory leak in key exchange. (#1412) + + Original fix submitted as a patch by Trzik. + + Co-authored-by: Michael Buckley + +Viktor Szakats (25 Jun 2024) +- RELEASE-NOTES: sync [ci skip] + +- wolfssl: fix `EVP_Cipher()` use with v5.6.0 and older + + Add workaround for the wolfSSL `EVP_Cipher(*p, NULL, NULL, 0)` bug to + make libssh2 work with wolfSSL v5.6.0 and older. + + wolfSSL fixed this issue in v5.7.0: + https://github.com/wolfSSL/wolfssl/pull/7143 + https://github.com/wolfSSL/wolfssl/commit/b0de0a1c95119786cf5651dd76dd7d7bdfac5a04 + + Without our local workaround: + + - v5.3.0 and older fail most tests: + Ref: https://github.com/libssh2/libssh2/actions/runs/9646827522/job/26604211476#step:17:1263 + + - v5.4.0, v5.5.x, v5.6.0 fail these: + ``` + 29 - test_read-aes128-cbc (Failed) + 30 - test_read-aes128-ctr (Failed) + 32 - test_read-aes192-cbc (Failed) + 33 - test_read-aes192-ctr (Failed) + 34 - test_read-aes256-cbc (Failed) + 35 - test_read-aes256-ctr (Failed) + ``` + Ref: https://github.com/libssh2/libssh2/actions/runs/9646827522/job/26604233819#step:17:978 + + Oddly enough the workaround breaks OpenSSL tests, so only enable it for + the affected wolfSSL versions. + + Also add new build-from-source wolfSSL CI job to test the new codepath. + + wolfSSL has a build bug where `wolfssl/options.h` and + `wolfssl/version.h` are not copied to the `install` destination with + autotools. With CMake it has a different bug where `wolfcrypt/sp_int.h` + is not copied (with v5.4.0). And another with CMake where `FIPS_mode()` + remains missing (with v5.6.0 and earlier.) + + Therefore use CMake with v5.5.4 and a workaround for `FIPS_mode()`. + Another option is autotools with v5.4.0 and a workaround for `install`, + but CMake builds quicker. + + Regression-from 3c953c05d67eb1ebcfd3316f279f12c4b1d600b4 #797 + Fixes #1020 + Fixes #1299 + Assisted-by: Michael Buckley via #1394 + Closes #1394 (another attempt to fix the mentioned wolfSSL bug) + Closes #1407 + +- wolfssl: bump version in upstream issue comment [ci skip] + +- wolfssl: require v5.4.0 for AES-GCM + + Earlier versions crash while running tests. + + This patch is part of a series of fixes to make wolfSSL AES-GCM support + work together with libssh2. + + Possibly related is this wolfSSL bugfix patch, released in v5.4.0: + https://github.com/wolfSSL/wolfssl/pull/5205 + https://github.com/wolfSSL/wolfssl/commit/fb3c611275dfe454c331baa0818445a0406c208a + "Fix another AES-GCM EVP control command issue" + + Ref: #1020 + Ref: #1299 + Cherry-picked from #1407 + Closes #1411 + +- tests: fix excluding AES-GCM tests + + Replace hard-coded crypto backends and rely on `LIBSSH2_GCM` macro + to decide whether to run AES-GCM tests. + + Without this, build attempted to run AES-GCM tests (and failed) + for crypto backends that have conditional support for this feature, e.g. + wolfSSL without the necessary features built-in + (as in before Homewbrew wolfssl 5.7.0_1, or OpenSSL v1.1.0 and older). + + This patch is part of a series of fixes to make wolfSSL AES-GCM support + work together with libssh2. + + Cherry-picked from #1407 + Closes #1410 + +- ci/GHA: fix wolfSSL-from-source AES-GCM tests + + Turns out these tests: + ``` + 31 - test_read-aes128-gcm@openssh.com (Failed) + 36 - test_read-aes256-gcm@openssh.com (Failed) + ``` + were failing because AES-GCM wasn't enabled in libssh2. This in turn + happened because the `WOLFSSL_AESGCM_STREAM` macro wasn't enabled while + building wolfSSL. Which happened because this macro isn't enabled by + any CMake-level wolfSSL option. Passing it as `CPPFLAGS` fixes it. + + This allows enabling tests with wolfSSL 5.7.0. + + Follow-up to d4cea53f53c78febad14b4caa600e25d1aaf92fd #1408 + Closes #1409 + +- ci/GHA: add Linux job with latest wolfSSL built from source + + After this patch it's possible to run tests with wolfSSL 5.7.0. + + wolfSSL 5.7.0 fixes this bug that affects open issues #1020 and #1299: + https://github.com/wolfSSL/wolfssl/pull/7143 + + `-DWOLFSSL_OPENSSLALL=ON` is necessary for `wolfSSL_FIPS_mode()` + + Closes #1408 + +- ci/GHA: tidy up build-from-source steps [ci skip] + + - make curl downloads less verbose. + + - fix cmake warning: + ``` + CMake Warning: + No source or binary directory provided. Both will be assumed to be the + same as the current working directory, but note that this warning will + become a fatal error in future CMake releases. + ``` + Ref: https://github.com/libssh2/libssh2/actions/runs/9509866494/job/26213472410#step:5:32 + +- [Adam brought this change] + + src: fix type warning in `libssh2_sftp_unlink` macro + + The `libssh2_sftp_unlink` macro was implicitly casting the `size_t` + returned by `strlen` to the `unsigned int` type expected by + `libssh2_sftp_unlink_ex`. + + This fix adds an explicit cast to match similar macro definitions in + the same file (e.g. `libssh2_sftp_rename`, `libssh2_sftp_mkdir`). + + Closes #1406 + +- libssh2.pc: reference mbedcrypto pkgconfig + + mbedtls 3.6.0 got pkgconfig support: + https://github.com/Mbed-TLS/mbedtls/commit/a4d17b34f354557838e05d2cb47200e8dcaaf59b + + Reference it from `libssh2.pc`. + + Closes #1405 + +- tidy-up: typo in comment [ci skip] + +- RELEASE-NOTES: sync [ci skip] + + Also bump planned deprecation dates. + +- ci/GHA: show configure logs on failure and other tidy-ups + + - dump cmake error log on configure failure. (for cmake 3.26 and newer) + - dump `config.log` on autotools configure failure. + - convert specs filename to Windows format before passing to CMake. + - add missing quotes. + + Closes #1403 + +- ci/GHA: bump parallel jobs to nproc+1 + + Ref: https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners#standard-github-hosted-runners-for-public-repositories + + Closes #1402 + +- ci/GHA: show test logs on failure + + Closes #1401 + +- ci/GHA: fix `Dockerfile` failing after Ubuntu package update + + Likely due an upstream Ubuntu package update (requiring an apt-get + install call beforehand), tests run via autotools started failing with + no change in the libssh2 repo: + ``` + FAIL: test_aa_warmup + ==================== + + Error running command 'docker build --quiet -t libssh2/openssh_server %s' (exit 256): Dockerfile:10 + -------------------- + 8 | && apt-get clean \ + 9 | && rm -rf /var/lib/apt/lists/* + 10 | >>> RUN mkdir /var/run/sshd + 11 | + 12 | # Chmodding because, when building on Windows, files are copied in with + -------------------- + ERROR: failed to solve: process "/bin/sh -c mkdir /var/run/sshd" did not complete successfully: exit code: 1 + + Failed to build docker image + Cannot stop session - none started + Cannot stop container - none started + Command: docker build --quiet -t libssh2/openssh_server ../../tests/openssh_server + FAIL test_aa_warmup (exit status: 1) + ``` + Ref: https://github.com/libssh2/libssh2/actions/runs/9322194756/job/25662748095#step:11:390 + + Fix it by skipping `mkdir` if `/var/run/sshd` already exists. + + (Why cmake-based jobs aren't affected, I don't know.) + + Ref: https://github.com/libssh2/libssh2/commit/50143d5867d35df76a6cf589ca8a13b22105aa64#commitcomment-142560875 + Closes #1400 + +- ci/GHA: use ubuntu-latest with OmniOS job + + It's the same as ubuntu-22.04. + + Also update OmniOS package search link. + +- ci: disable dependency tracking in autotools builds + + For better build performance. Dependency tracking causes a build + overhead while compiling to help a subsequent build, but in CI there is + never one and the extra work is discarded. + + Closes #1396 + +- mbedtls: fail to compile with v3.6.0 outside CI + + A compile-time failure is preferred over an unexpected one at + runtime. + + The problem is silenced with a macro in CI and this macro will have + to be added to more platforms when mbedTLS v3.6.0 reaches them. + + Follow-up to 2e4c5ec4627b3ecf4b6da16f365c011dec9a31b4 #1349 + Closes #1393 + +- tests: drop default cygpath option `-u` + +- tidy-up: fix typo found by codespell + + Ref: https://github.com/libssh2/libssh2/actions/runs/9224795055/job/25380857082?pr=1393#step:4:5 + +- ci/GHA: shell syntax tidy-up + + Closes #1390 + +- RELEASE-NOTES: sync [ci skip] + +- ci/GHA: bump NetBSD/OpenBSD, add NetBSD arm64 job + + OpenBSD arm64 jobs were very slow, so skipped that. + + Closes #1388 + +- autotools: fix to update `LDFLAGS` for each detected dependency + + autotools lib detection routine failed to extend LDFLAGS for each + detection. This could cause successful detection of a dependency, but + later failing to use it. This did not cause an issue as long as all + dependencies lived under the same prefix, but started breaking on macOS + ARM + Homebrew where this was no longer true for mbedTLS and zlib in + particular. + + Follow-up to 844115393bffb4e92c6569204cbe4cd8e553480d #1381 + Follow-up to ae2770de25949bc7c74e60b4cc6a011bbe1d3d7c #1377 + Closes #1384 + +GitHub (8 May 2024) +- [Michael Buckley brought this change] + + OpenSSL 3: Fix calculating DSA public key (#1380) + +Viktor Szakats (8 May 2024) +- ci/GHA: tidy-up wolfSSL autotools config on macOS + + Closes #1383 + +- ci/GHA: shorter mbedTLS autotools workaround + + Follow-up to 844115393bffb4e92c6569204cbe4cd8e553480d #1381 + Closes #1382 + +GitHub (8 May 2024) +- [Michael Buckley brought this change] + + ci: fix mbedtls runners on macOS (#1381) + + Sets LDFLAGS while configuring the autoconf mbedTLS build for macOS. + +Viktor Szakats (29 Apr 2024) +- RELEASE-NOTES: sync [ci skip] + +- [binary1248 brought this change] + + wincng: fix `DH_GEX_MAXGROUP` set higher than supported + + In 1c3a03ebc3166cf69735111aba2b8cee57cdba51 #493, + `LIBSSH2_DH_GEX_MAXGROUP` was introduced to specify + crypto-backend-specific modulus sizes. Unfortunately, the max size for + the wincng DH modulus was defined to 8192, probably because this is the + value most other backends support. + + According to Microsoft documentation [1], `BCryptGenerateKeyPair` + currently only supports up to 4096-bit keys when the selected algorithm + is `BCRYPT_DH_ALGORITHM`. Requesting larger keys when calling + `BCryptGenerateKeyPair` in `_libssh2_dh_key_pair` always results in + `STATUS_INVALID_PARAMETER` being returned and ultimately key exchange + failing. + + When attempting to connect to any server that offers 8192 bit DH, this + causes key exchange to always fail when using the wincng backend. + Reducing `LIBSSH2_DH_GEX_MAXGROUP` to 4096 fixes the issue. + + [1] https://learn.microsoft.com/en-us/windows/win32/api/bcrypt/nf-bcrypt-bcryptgeneratekeypair + + Closes #1372 + +- build: silence warnings inside `FD_SET()`/`FD_ISSET()` macros + + Use an ugly workaround to silence `-Wsign-conversion` warnings triggered + by the internals of `FD_SET()`/`FD_ISSET()` macros. They've been showing + up in OmniOS CI builds when compiling `example` programs. They also have + been seen with older Cygwin and other envs and configurations. + + Also scope two related variables in examples. + + E.g.: + ``` + ../../example/direct_tcpip.c:251:9: warning: conversion to 'long unsigned int' from 'libssh2_socket_t' {aka 'int'} may change the sign of the result [-Wsign-conversion] + 251 | FD_SET(forwardsock, &fds); + | ^~~~~~ + ../../example/direct_tcpip.c:251:9: warning: conversion to 'long unsigned int' from 'libssh2_socket_t' {aka 'int'} may change the sign of the result [-Wsign-conversion] + ../../example/direct_tcpip.c:251:9: warning: conversion to 'long unsigned int' from 'long int' may change the sign of the result [-Wsign-conversion] + ../../example/direct_tcpip.c:251:9: warning: conversion to 'long int' from 'long unsigned int' may change the sign of the result [-Wsign-conversion] + ../../example/direct_tcpip.c:259:18: warning: conversion to 'long unsigned int' from 'libssh2_socket_t' {aka 'int'} may change the sign of the result [-Wsign-conversion] + 259 | if(rc && FD_ISSET(forwardsock, &fds)) { + | ^~~~~~~~ + ../../example/direct_tcpip.c:259:18: warning: conversion to 'long unsigned int' from 'libssh2_socket_t' {aka 'int'} may change the sign of the result [-Wsign-conversion] + ../../example/direct_tcpip.c:259:18: warning: conversion to 'long unsigned int' from 'long int' may change the sign of the result [-Wsign-conversion] + ``` + Ref: https://github.com/libssh2/libssh2/actions/runs/8854199687/job/24316762831#step:3:2020 + + Closes #1379 + +- autotools: use `AM_CFLAGS` + + Use `AM_CFLAGS` to pass custom, per-target C flags. This replaces using + `CFLAGS` which triggered this warning when running `autoreconf -fi`: + ``` + tests/Makefile.am:8: warning: 'CFLAGS' is a user variable, you should not override it; + tests/Makefile.am:8: use 'AM_CFLAGS' instead + ``` + (Only for `tests`, even though `example` and `src` also used this + method. The warning is also missing from curl, that also uses + `CFLAGS`.) + + Follow-up to 3ec53f3ea26f61cbf2e0fbbeccb852fca7f9b156 #1286 + Closes #1378 + +GitHub (25 Apr 2024) +- [Viktor Szakats brought this change] + + ci/GHA: fix gcrypt with autotools/macOS/Homebrew/ARM64 (#1377) + + mbedtls configure fails to detect anything due to this: + ``` + configure:23101: gcc -o conftest -g -O2 -I/opt/homebrew/include conftest.c -lmbedcrypto -lz >&5 + ld: library 'mbedcrypto' not found + clang: error: linker command failed with exit code 1 (use -v to see invocation) + ``` + +Viktor Szakats (25 Apr 2024) +- autotools: delete bogus square bracket from help text [ci skip] + + Follow-up to 3f98bfb0900b5e68445a339cfebc60b307a24650 #1368 + +GitHub (25 Apr 2024) +- [Viktor Szakats brought this change] + + ci/GHA: fix verbose option for autotools jobs (#1376) + + Also enable verbose for macOS `make` step. + +- [Viktor Szakats brought this change] + + ci/GHA: dump `config.log` on failure for macOS autotools jobs (#1375) + +- [Viktor Szakats brought this change] + + ci/GHA: fix `autoreconf` failure on macOS/Homebrew (#1374) + + By manually installing `libtool`. + + ``` + autoreconf -fi + shell: /bin/bash -e {0} + configure.ac:75: error: possibly undefined macro: AC_LIBTOOL_WIN32_DLL + If this token and others are legitimate, please use m4_pattern_allow. + See the Autoconf documentation. + configure.ac:76: error: possibly undefined macro: AC_PROG_LIBTOOL + autoreconf: error: /opt/homebrew/Cellar/autoconf/2.72/bin/autoconf failed with exit status: 1 + ``` + Ref: https://github.com/libssh2/libssh2/actions/runs/8833608758/job/24253334557#step:4:1 + +- [Viktor Szakats brought this change] + + ci/GHA: fixup Homebrew location (for ARM runners) (#1373) + + GHA macOS runners became ARM64 machines. Make the Homebrew prefix + dynamic to adapt to these installations. + +Viktor Szakats (14 Apr 2024) +- RELEASE-NOTES: sync [ci skip] + +- [Patrick Monnerat brought this change] + + os400: Add two recent files to the distribution + + Closes #1364 + +- wincng: add to ci/GHA, add `./configure` option `--enable-ecdsa-wincng` + + - add `./configure` option `--enable-ecdsa-wincng` + + - add WinCNG autotools jobs to GHA. + + - enable WinCNG ECDSA in some GHA jobs (both CMake and autotools). + + Follow-up to 3e72343737e5b17ac98236c03d5591d429b119ae #1315 + Closes #1368 + +GitHub (14 Apr 2024) +- [Johannes Passing brought this change] + + wincng: add ECDSA support for host and user authentication (#1315) + + The WinCNG backend currently only supports DSA and RSA. This PR + adds ECDSA support for host and user authentication. + + * Disable WinCNG ECDSA support by default to maintain backward + compatibility for projects that target versions below Windows 10. + + * Add cmake option `ENABLE_ECDSA_WINCNG` to guard ECDSA support. + + * Update AppVeyor job matrix to only enable ECDSA on Server 2016+ + +Viktor Szakats (14 Apr 2024) +- ci: enable Unity mode for most CMake builds + + Ref: 7129ea9ca8cca86dac80a6bac2d63937987efe9d #1034 + Closes #1367 + +- os400: fix shellcheck warnings in scripts (fixups) + + - Build scripts must be executed by the os/400 shell (sh), not bash which + is a PASE program: The `-ot` non-POSIX test extension works in os/400 as + well. Ref: https://github.com/libssh2/libssh2/pull/1364#issue-2241646754 + + - Drop/fixup mods trying to make some syntax highlighters happier. + + Follow-up to c6625707b94d9093f38f1a0a4d89c11b64f12ba8 #1358 + Assisted-by: Patrick Monnerat + Closes #1364 + Closes #1366 + +- cmake: style tidy-up (more) + + Follow-up to 3fa5282d6284efba62dc591697e6a687152bdcb1 #1166 + Closes #1365 + +- RELEASE-NOTES: sync [ci skip] + +- os400: fix shellcheck warnings in scripts + + - use `$()` instead of backticks, and re-arrange double-quotes inside. + - add missing `|| exit 1` to `cd` calls. (could be dropped by using `set -eu`.) + - add `-n` to a few `if`s. + - shorten redirections by using `{} >` (as shellcheck recommended). + - silence warnings where variables were detected as unused (SC2034). + - a couple misc updates to silence warnings. + - switch to bash shebang for `-ot` feature. + - split two lines to unbreak syntax highlighting in my editor. (`$(expr \`, `$(dirname \`) + + Also enable CI checks for OS/400 shell scripts. + + Ref: d88b9bcdafe9d19aad2fb120d0a0acb3edab64f7 + Closes #1358 + +- RELEASE-NOTES: sync [ci skip] + +- ci: add shellcheck job and script + + Add FIXME for OS/400 scripts. + + Cherry-picked from #1358 + +- tests: fix shellcheck issues in `test_sshd.test` + + Cherry-picked from #1358 + +- RELEASE-NOTES: sync [ci skip] + +GitHub (9 Apr 2024) +- [Viktor Szakats brought this change] + + ci/appveyor: re-enable OpenSSL 3, also bump to 3.2.1 (#1363) + + Ref: 104744f4a523de574ce3767c50948d9b8385be4c #1348 + +Viktor Szakats (9 Apr 2024) +- ci: use a better test timestamp [ci skip] + + Mar 27 2024 08:00:00 GMT+0000 + + Follow-up to 2d765e454d98b794a5e5bbc497b1fcba4a9b8c4b #1360 + +GitHub (9 Apr 2024) +- [Viktor Szakats brought this change] + + ci: verify build and install from tarball (#1362) + + Install verification based on: + https://github.com/curl/curl/blob/28c5ddf13ac311d10bc4e8f9fc4ce0858a19b888/scripts/installcheck.sh + +Viktor Szakats (9 Apr 2024) +- tidy-up: dir names, command-line [ci skip] + + Follow-up to 2d765e454d98b794a5e5bbc497b1fcba4a9b8c4b #1360 + +- cmake: tidy up function name casing in `CopyRuntimeDependencies.cmake` + + Use lowercase to match callers. + +GitHub (9 Apr 2024) +- [Viktor Szakats brought this change] + + ci: add reproducibility test for `maketgz` (#1360) + +Viktor Szakats (9 Apr 2024) +- maketgz: add reproducible dir entries to tarballs + + In the initial implementation of reproducible tarballs, they were + missing directory entries, while .zip archives had them. It meant + that on extracting the tarball, on-disk directory entries got the + current timestamp. + + This patch fixes this by including directory entries in the tarball, + with reproducible timestamps. It also moves sorting inside tar, + to ensure reproducible directory entry timestamps on extract + (without the need of `--delay-directory-restore` option, when + extracting with GNU tar. BSD tar got that right by default.) + + GNU tar 1.28 (2014-07-28) introduced `--sort=`. + + Follow-up to d52fe1b4358fab891037d86b5c73c098079567db #1357 + Closes #1359 + +- ci/GHA: improve version number in `maketgz` test + + Follow-up to cba7f97506c1b8e5ff131bbbc57b5796ac634c56 #1353 + +GitHub (8 Apr 2024) +- [Michael Buckley brought this change] + + src: check the return value from `_libssh2_bn_*()` functions (#1354) + + Found by oss-fuzz. In `diffie_hellman_sha_algo()`, we were calling + `_libssh2_bn_from_bin()` with data recieved by the server without + checking whether that data was zero-length or ridiculously long. + In the OpenSSL backend, this would cause `_libssh2_bn_from_bin()` + to fail an allocation, which would eventually lead to a NULL + dereference when the bignum was used. + + Add the same check for `_libssh2_bn_set_word()` and + `_libssh2_bn_to_bin()`. + +Viktor Szakats (8 Apr 2024) +- maketgz: reproducible tarballs/zip, display tarball hashes + + - support `SOURCE_DATE_EPOCH` for reproducibility. + - make tarballs reproducible. + - make file timestamps in tarball/zip reproducible. + - make directory timestamps in zip reproducible. + - make timestamps of tarballs/zip reproducible. + - make file order in tarball/zip reproducible. + - use POSIX ustar tarball format to avoid supply chain vulnerability: https://seclists.org/oss-sec/2021/q4/0 + - make uid/gid in tarball reproducible. + - omit owner user/group names from tarball for reproducibility and privacy. + - omit current timestamp from .gz header for reproducibility. + - display SHA-256 hashes of produced tarballs/zip. (Requires `sha256sum`) + - re-sync formatting with curl's `maketgz`. + + Closes #1357 + +- maketgz: `set -eu`, reproducibility, improve zip, add CI test + + - set bash `-eu`. + - fix bash `-eu` issues. + - apply `TZ=UTC` and `LC_ALL=C` for reproducibility. + - sort `.zip` entries for reproducibility. + - zip with `--no-extra` for reproducibliity. + - use maximum zip compression. + - add the gpg sign command-line. Copied from curl. + - add CI test for `maketgz`. + + Closes #1353 + +- RELEASE-NOTES: sync and cleanups [ci skip] + +GitHub (3 Apr 2024) +- [Tejaswikandula brought this change] + + Support RSA SHA2 cert-based authentication (rsa-sha2-512_cert and rsa-sha2-256_cert) (#1314) + + Replicating OpenSSH's behavior to handle RSA certificate authentication + differently based on the remote server version. + + 1. For OpenSSH versions >= 7.8, ascertain server's support for RSA Cert + types by checking if the certificate's signature type is present in + the `server-sig-algs`. + + 2. For OpenSSH versions < 7.8, Set the "SSH_BUG_SIGTYPE" flag when the + RSA key in question is a certificate to ignore `server-sig-algs` and + only offer ssh-rsa signature algorithm for RSA certs. + + This arises from the fact that OpenSSH versions up to 7.7 accept + RSA-SHA2 keys but not RSA-SHA2 certificate types. Although OpenSSH <=7.7 + includes RSA-SHA2 keys in the `server-sig-algs`, versions <=7.7 do not + actually support RSA certs. Therefore, server sending RSA-SHA2 keys in + `server-sig-algs` should not be interpreted as indicating support for + RSA-SHA2 certs. So, `server-sig-algs` are ignored when the RSA key in + question is a cert, and the remote server version is 7.7 or below. + + Relevant sections of the OpenSSH source code: + + + + + Assisted-by: Will Cosgrove + Reviewed-by: Viktor Szakats + +Viktor Szakats (3 Apr 2024) +- RELEASE-NOTES: sync [ci skip] + + Also fix to include 3-digit issue/PR references. + +- mbedtls: add workaround + FIXME to build with 3.6.0 + + This is just a stub to make `_libssh2_mbedtls_ecdsa_new_private` + compile. + + mbedtls 3.6.0 silently deleted its public API `mbedtls_pk_load_file`, + which this function relies on. + + Closes #1349 + +GitHub (3 Apr 2024) +- [Viktor Szakats brought this change] + + ci/appveyor: OpenSSL 3 no longer found by CMake, revert to 1.1.1 (#1348) + + Ref: https://github.com/appveyor/build-images/commit/702e8cdca01f28f6a40687783f493c786cebbe2c + Ref: https://github.com/appveyor/build-images/pull/149 + +Viktor Szakats (3 Apr 2024) +- docs: improve `libssh2_userauth_publickey_from*` manpages + + Reported-by: Lyndon Brown + Assisted-by: Ryan Kelley + Fixes #652 + Closes #1308 + Closes #xxxx + +- RELEASE-NOTES: sync [ci skip] + +GitHub (2 Apr 2024) +- [Viktor Szakats brought this change] + + test debian:testing-slim post xz backdoor removal (#1346) + + The unexplained CI fallouts are gone with the latest debian:testing (20240330). + + Ref #1328 #1329 #1338. + Closes #1346 + +Viktor Szakats (30 Mar 2024) +- ci: use Linux runner for BSDs, add arm64 FreeBSD 14 job + + - bump cross-platform-actions to 0.23.0. + Ref: https://github.com/cross-platform-actions/action/releases/tag/v0.23.0 + + - switch to Linux runners (from macOS) for cross-platform-actions. + It's significantly faster. + + - switch back FreeBSD 14 job to cross-platform-actions. + Also switch back to default shell. + + - add FreeBSD 14 arm64 job. + + Closes #1343 + +- ci: use single quotes in yaml [ci skip] + +- ci: tidy-up job order [ci skip] + +- build: drop `-Wformat-nonliteral` warning suppressions + + Also markup a vararg function as such. + + In functions marked up as vararg functions, there is no need to suppress + `-Wformat-nonliteral` warnings. It's done automatically by the compiler. + + Closes #1342 + +- ci: delete flaky FreeBSD 13.2 job + + Keep FreeBSD 14. + +- RELEASE-NOTES: sync [ci skip] + +- example: restore `sys/time.h` for AIX + + In AIX, `time.h` header file doesn't have definitions like + `fd_set`, `struct timeval`, which are found in `sys/time.h`. + + Add `sys/time.h` to files affected when available. + + Regression from e53aae0e16dbf53ddd1a4fcfc50e365a15fcb8b9 #1001. + + Reported-by: shubhamhii on GitHub + Assisted-by: shubhamhii on GitHub + Fixes #1334 + Fixes #1335 + Closes #1340 + +- userauth: avoid oob with huge interactive kbd response + + - If the length of a response is `UINT_MAX - 3` or larger, an unsigned + integer overflow occurs on 64-bit systems. Avoid such truncation to + always allocate enough memory to avoid subsequent out of boundary + writes. + + Patch-by: Tobias Stoeckmann + + - also add FIXME to bump up length field to `size_t` (ABI break) + + Closes #1337 + +GitHub (28 Mar 2024) +- [Josef Cejka brought this change] + + transport: check ETM on remote end when receiving (#1332) + + We should check if encrypt-then-MAC feature is enabled in remote end's + configuration. + + Fixes #1331 + +- [Josef Cejka brought this change] + + kex: always add extension indicators to kex_algorithms (#1327) + + KEX pseudo-methods "ext-info-c" and "kex-strict-c-v00@openssh.com" + are in default kex method list but they were lost after configuring + custom kex method list in libssh2_session_method_pref(). + + Fixes #1326 + +- [Jiwoo Park brought this change] + + cmake: use the imported target of FindOpenSSL module (#1322) + + * Use the imported target of FindOpenSSL module + * Build libssh2 before test runner + * Use find_package() in the CMake config file + * Use find_dependency() rather than find_package() + * Install CMake module files and use them in the config file + * Use elseif() to choose the crypto backend + +- [Andrei Augustin brought this change] + + docs: update INSTALL_AUTOTOOLS (#1316) + + corrected --with-libmbedtls-prefix to current option --with-libmbedcrypto-prefix + +Viktor Szakats (28 Mar 2024) +- ci: don't parallelize `distcheck` job + + A while ago the `distcheck` CI job became flaky. This continued after + switching to Debian stable (from testing). Try stabilzing it by running + it single-threaded. + + Closes #1339 + +- Dockerfile: switch to Debian stable (from testing) + + This fixes flakiness experienced recently with two OpenSSL jobs and one + libgcrypt job, and/or intermittently causing all Docker-based tests to + fail. + + Reported-by: András Fekete + Fixes #1328 + Fixes #1329 + Closes #1338 + +GitHub (22 Feb 2024) +- [Michael Buckley brought this change] + + Supply empty hash functions for mac_method_hmac_aesgcm to avoid a crash when e.g. setting LIBSSH2_METHOD_CRYPT_CS (#1321) + +- [Michael Buckley brought this change] + + gen_publickey_from_dsa: Initialize BIGNUMs to NULL for OpenSSL 3 (#1320) + +Viktor Szakats (23 Jan 2024) +- RELEASE-NOTES: add algo deprecation notices [ci skip] + + Closes #1307 + +- RELEASE-NOTES: sync [ci skip] + +GitHub (22 Jan 2024) +- [Juliusz Sosinowicz brought this change] + + wolfssl: enable debug logging in wolfSSL when compiled in (#1310) + + Co-authored-by: Viktor Szakats + +- [monnerat brought this change] + + os400: maintain up to date (#1309) + + - Handle MD5 conditionals in os400qc3. + - Check for errors in os400qc3 pbkdf1. + - Implement an optional build options override file. + - Sync ILE/RPG copy files with current C header files. + - Allow a null session within a string conversion cache. + - Add an ILE/RPG example. + - Adjust outdated copyrights in changed files. + +Viktor Szakats (18 Jan 2024) +- RELEASE-NOTES: sync + +- src: check hash update/final success + + Also: + - delete unused internal macro `libssh2_md5()` where defined. + - prefix `libssh2_os400qc3_hash*()` function names with underscore. + These are public/visible, but internal. + - add FIXMEs to OS/400 code to verify update/final calls; some OS API, + some internal. + + Ref: https://github.com/libssh2/libssh2/pull/1301#discussion_r1446861650 + Reviewed-by: Michael Buckley + Reviewed-by: Patrick Monnerat + Closes #1303 + +- RELEASE-NOTES: sync [ci skip] + +GitHub (18 Jan 2024) +- [Ryan Kelley brought this change] + + openssl: fix cppcheck found NULL dereferences (#1304) + + * Fix NULL dereference in gen_publickey_from_rsa_evp and + gen_publickey_from_dsa_evp. + * Add checks for en_publickey_from_ec_evp and en_publickey_from_ed_evp + +Viktor Szakats (12 Jan 2024) +- openssl: delete internal `read_openssh_private_key_from_memory()` + + It was wrapping another internal function with no added logic. + + Closes #1306 + +- openssl: formatting/whitespace + + Also use `NULL` instead of `0` for pointers. + + Closes #1305 + +- HACKING-CRYPTO: more fixups [ci skip] + + Follow-up to f64885b6ab9bbdae2da9ebd70f4dd5cea56e838a #1297 + +- HACKING-CRYPTO: fixups [ci skip] + + Follow-up to f64885b6ab9bbdae2da9ebd70f4dd5cea56e838a #1297 + +- RELEASE-NOTES: sync [ci skip] + +- src: check hash init success + + Before this patch, SHA2 and SHA1 init function results were cast to + `void`. This patch makes sure to verify these values. + + Also: + - exclude an `assert(0)` from release builds in `_libssh2_sha_algo_ctx_init()`. + (return error instead) + - fix indentation / whitespace + + Reviewed-by: Michael Buckley + Closes #1301 + +- mac: handle low-level errors + + - update low-level hmac functions from macros to functions. + - libgcrypt: propagate low-level hmac errors. + - libgcrypt: add error checks for hmac calls. + - os400qc3: add error checks, propagate them. + Assisted-by: Patrick Monnerat + - mbedtls: fix propagating low-level hmac errors. + - wincng: fix propagating low-level hmac errors. + - mac: verify success of low-level hmac functions. + - knownhost: verify success of low-level hmac functions. + - transport: verify success of MAC hash call. + - minor type cleanup in wincng. + - delete unused ripemd wrapper in wincng. + - delete unused SHA384 wrapper in mbedtls. + + Reported-by: Paul Howarth + Reviewed-by: Michael Buckley + Closes #1297 + +GitHub (8 Jan 2024) +- [Michael Buckley brought this change] + + Fix an out-of-bounds read in _libssh2_kex_agree_instr when searching for a KEX not in the server list (#1302) + +Viktor Szakats (21 Dec 2023) +- RELEASE-NOTES: sync [ci skip] + +- ci/appveyor: re-enable parallel mode + + The comment cited earlier is no longer true with recent CMake versions. + This options does actually enable parallel builds with MSVC since CMake + v3.26.0: https://gitlab.kitware.com/cmake/cmake/-/issues/20564 + + The effect isn't much for libssh2, because it spends most time in tests, + but let's enable it anyway for efficiency. + + Ref: 0d08974633cfc02641e6593db8d569ddb3644255 #884 + Ref: 7a039d9a7a2945c10b4622f38eeed21ba6b4ec55 #867 + + Closes #1294 + +- ci/gha: review/fixup auto-cancel settings + + - use the group expression from `reuse.yml` (via curl). + - add auto-cancel for `ci` and `cifuzz`. + - add auto-cancel to `appveyor_docker`. I'm just guessing here. + The hope is that it fixes AppVeyor CI runs when re-pushing a PR. + This frequently caused the freshly pushed session to fail waiting for + a connection. + - sync group expression in `appveyor_status` with `reuse`. + + Closes #1292 + +- RELEASE-NOTES: fix casing in GitHub names [ci skip] + +- RELEASE-NOTES: synced [ci skip] + + Closes #1279 + +- [Michael Buckley brought this change] + + src: add 'strict KEX' to fix CVE-2023-48795 "Terrapin Attack" + + Refs: + https://terrapin-attack.com/ + https://seclists.org/oss-sec/2023/q4/292 + https://osv.dev/list?ecosystem=&q=CVE-2023-48795 + https://github.com/advisories/GHSA-45x7-px36-x8w8 + https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2023-48795 + + Fixes #1290 + Closes #1291 + +- session: add `libssh2_session_callback_set2()` + + Add new `libssh2_session_callback_set2()` API that deprecates + `libssh2_session_callback_set()`. + + The new implementation offers the same functionality, but accepts and + returns a generic function pointer (of type `libssh2_cb_generic *`), as + opposed to the old function that used data pointers (`void *`). The new + solution thus avoids data to function (and vice versa) pointer + conversions, which has undefined behaviour in standard C. + + About the name: It seems the `*2` suffix was used in the past for + replacement functions for deprecated ones. Let's stick with that. + `*_ex` was preferred for new functions that extend existing ones with + new features. + + Closes #1285 + +- build: enable `-pedantic-errors` + + According to the manual, this isn't the same as `-Werror -pedantic`. + Enable it together with `-Werror`. + + https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-pedantic-errors-1 + + This option results in autotools feature detection going into crazies. + To avoid this, we add it to `CFLAGS` late. Idea copied from curl. + + This option has an effect only with gcc 5.0 and newer as of this commit. + Let's enable it for clang and older versions too for simplicity. Ref: + https://github.com/curl/curl/commit/d5c0351055d5709da8f3e16c91348092fdb481aa + https://github.com/curl/curl/pull/2747 + + Closes #1286 + +- build: add mingw-w64 support to `LIBSSH2_PRINTF()` attribute + + And fix the warning it detected. + + Closes #1287 + +- libssh2.h: add deprecated function warnings + + With deprecated-at versions and suggested replacement function. + + It's possible to silence them by defining `LIBSSH2_DISABLE_DEPRECATION`. + + Also add depcreated-at versions to documentation, and unify wording. + + Ref: https://github.com/libssh2/libssh2/pull/1260#issuecomment-1837017987 + Closes #1289 + +- ci/spellcheck: delete redundant option [ci skip] + + `--check-hidden` not necessary when passing filenames explicitly. + + Follow-up to a79218d3a058a333bb9de14079548a3511679a04 + +- tidy-up: add empty line for clarity [ci skip] + +- build: FIXME `-Wsign-conversion` to be errors [ci skip] + +- src: disable `-Wsign-conversion` warnings, add option to re-enable + + To avoid the log noise till we fix those ~360 compiler warnings. + + Also add macro `LIBSSH2_WARN_SIGN_CONVERSION` to re-enable them. + + Follow-up to afa6b865604019ab27ec033294edfe3ded9ae0c0 #1257 + + Closes #1284 + +- cmake: fix indentation [ci skip] + +- example, tests: call `WSACleanup()` for each `WSAStartup()` + + On Windows. + + Closes #1283 + +- RELEASE-NOTES: update credits [ci skip] + + Ref: https://github.com/libssh2/libssh2/pull/1241#issuecomment-1830118584 + +- RELEASE-NOTES: avoid splitting names, fix typo, refine order [ci skip] + +- RELEASE-NOTES: synced [ci skip] + +- add portable `LIBSSH2_SOCKET_CLOSE()` macro + + Add `LIBSSH2_SOCKET_CLOSE()` to the public `libssh2.h` header, for user + code. It translates to `closesocket()` on Windows and `close()` on other + platforms. + + Use it in example code. + + It makes them more readable by reducing the number of `_WIN32` guards. + + Closes #1278 + +- ci: add FreeBSD 14 job, fix issues + + - install bash to fix error when running tests: + ``` + ERROR: test_sshd.test - missing test plan + ERROR: test_sshd.test - exited with status 127 (command not found?) + ===================================== + [...] + # TOTAL: 4 + # PASS: 2 + # SKIP: 0 + # XFAIL: 0 + # FAIL: 0 + # XPASS: 0 + # ERROR: 2 + [...] + env: bash: No such file or directory + ``` + Ref: https://github.com/libssh2/libssh2/actions/runs/7133852508/job/19427420687#step:3:3998 + + - fix sshd issue when running tests: + ``` + # sshd log: + # Server listening on :: port 4711. + # Server listening on 0.0.0.0 port 4711. + # Authentication refused: bad ownership or modes for file /home/runner/work/libssh2/libssh2/tests/key_rsa.pub + # Authentication refused: bad ownership or modes for file /home/runner/work/libssh2/libssh2/tests/openssh_server/authorized_keys + ``` + Ref: https://github.com/libssh2/libssh2/actions/runs/7134629175/job/19429828342#step:3:4059 + + Cherry-picked from #1277 + Closes #1277 + +- ci: add OmniOS job, fix issues + + - use GNU Make, to avoid errors: + ``` + make: Fatal error in reader: Makefile, line 983: Badly formed macro assignment + ``` + Ref: https://github.com/libssh2/libssh2/actions/runs/7134629175/job/19429838379#step:3:1956 + + Caused by `?=` in `Makefile.am`. Fix it just in case. + + ``` + make: Fatal error in reader: Makefile, line 438: Unexpected end of line seen + ``` + Ref: https://github.com/libssh2/libssh2/actions/runs/7135524843/job/19432451767#step:3:1966 + + It's around line 43 in `Makefile.am`, reason undiscovered. + + - fix error: + ``` + ../../src/hostkey.c:1227:44: error: pointer targets in passing argument 5 of '_libssh2_ed25519_sign' differ in signedness [-Werror=pointer-sign] + 1227 | datavec[0].iov_base, datavec[0].iov_len); + | ~~~~~~~~~~^~~~~~~~~ + | | + | caddr_t {aka char *} + ``` + Ref: https://github.com/libssh2/libssh2/actions/runs/7135102832/job/19431233967#step:3:2225 + + https://docs.oracle.com/cd/E36784_01/html/E36887/iovec-9s.html + + - FIXME: new `-Wsign-conversion` warnings appeared in examples: + ``` + ../../example/direct_tcpip.c:251:9: warning: conversion to 'long unsigned int' from 'libssh2_socket_t' {aka 'int'} may change the sign of the result [-Wsign-conversion] + 251 | FD_SET(forwardsock, &fds); + | ^~~~~~ + ../../example/direct_tcpip.c:251:9: warning: conversion to 'long unsigned int' from 'libssh2_socket_t' {aka 'int'} may change the sign of the result [-Wsign-conversion] + ../../example/direct_tcpip.c:251:9: warning: conversion to 'long unsigned int' from 'long int' may change the sign of the result [-Wsign-conversion] + ../../example/direct_tcpip.c:251:9: warning: conversion to 'long int' from 'long unsigned int' may change the sign of the result [-Wsign-conversion] + ../../example/direct_tcpip.c:259:18: warning: conversion to 'long unsigned int' from 'libssh2_socket_t' {aka 'int'} may change the sign of the result [-Wsign-conversion] + 259 | if(rc && FD_ISSET(forwardsock, &fds)) { + | ^~~~~~~~ + ../../example/direct_tcpip.c:259:18: warning: conversion to 'long unsigned int' from 'libssh2_socket_t' {aka 'int'} may change the sign of the result [-Wsign-conversion] + ../../example/direct_tcpip.c:259:18: warning: conversion to 'long unsigned int' from 'long int' may change the sign of the result [-Wsign-conversion] + [...] + ``` + Ref: https://github.com/libssh2/libssh2/actions/runs/7136086865/job/19433997429#step:3:3450 + + Cherry-picked from #1277 + +- example: use `libssh2_socket_t` in X11 example + + Cherry-picked from #1277 + +- [Aaron Stone brought this change] + + Handle EINTR from send/recv/poll/select to try again as the error is not fatal + + Integration-patches-by: Viktor Szakats + Fixes #955 + Closes #1058 + +- appveyor: delete UWP job broken since Visual Studio upgrade + + Few days ago UWP job started permafailing. + + fail: https://ci.appveyor.com/project/libssh2org/libssh2/builds/48678129/job/yb8n2pox8mfjwv6m + good: https://ci.appveyor.com/project/libssh2org/libssh2/builds/48673013 + + Other projects also affected: + https://ci.appveyor.com/project/c-ares/c-ares/builds/48687390/job/l0fo4b0sijvqkw9r + + No related local update. Same CMake version. Same CI image. + + This seems to be the culprit, which could mean that this update broke + CMake detection, needs a different CMake configuration on our end, or + that this MSVC update pulled support for UWP apps: + + fail: -- The C compiler identification is MSVC 19.38.33130.0 (~ Visual Studio 2022 v17.8) + good: -- The C compiler identification is MSVC 19.37.32825.0 (~ Visual Studio 2022 v17.7) + + If this is v17.8, release notes don't readily suggest a feature removal: + https://learn.microsoft.com/en-us/visualstudio/releases/2022/release-notes-v17.8 + + So it might just be UWP accidentally broken in this release. + + Closes #1275 + +- checksrc: sync with curl + + Closes #1272 + +- autotools: delete `--disable-tests` option, fix CI tests + + Originally added to improve build performance by skipping building + tests. But, there seems to be no point in this, because autotools + doesn't build tests by default, unless explicitly invoking + `make check`. + + Delete this option from Cygwin and FreeBSD CI tests, where it caused + `make check` to do nothing. Tests are built now, and runtime tests are + too, where supported. + + Also disable Docker-based tests for these, and add a missing `make -j3` + for FreeBSD. + + Reverts 7483edfada1f7e17cf8f9ac1c87ffa3d814c987e #715 + + Closes #1271 + +GitHub (6 Dec 2023) +- [ren mingshuai brought this change] + + build: add `LIBSSH2_NO_DEPRECATED` option (#1266) + + The following APIs have been deprecated for over 10 years and + use `LIBSSH2_NO_DEPRECATED` to mark them as deprecated: + + libssh2_session_startup() + libssh2_banner_set() + libssh2_channel_receive_window_adjust() + libssh2_channel_handle_extended_data() + libssh2_scp_recv() + + Add these options to disable them: + - autotools: `--disable-deprecated` + - cmake: `-DLIBSSH2_NO_DEPRECATED=ON` + - `CPPFLAGS`: `-DLIBSSH2_NO_DEPRECATED` + + Fixes #1259 + Replaces #1260 + Co-authored-by: Viktor Szakats + Closes #1267 + +Viktor Szakats (5 Dec 2023) +- autotools: show the default for `hidden-symbols` option + + Closes #1269 + +- tidy-up: bump casts from int to long for large C99 types in printfs + + Cast large integer types to avoid dealing with printf masks for + `size_t` and other C99 types. Some of existing code used `int` + for this, bump them to `long`. + + Ref: afa6b865604019ab27ec033294edfe3ded9ae0c0 #1257 + + Closes #1264 + +- build: enable missing OpenSSF-recommended warnings, with fixes + + Ref: + https://best.openssf.org/Compiler-Hardening-Guides/Compiler-Options-Hardening-Guide-for-C-and-C++.html + (2023-11-29) + + Enable new warnings: + + - replace `-Wno-sign-conversion` with `-Wsign-conversion`. + + Fix them in example, tests and wincng. There remain about 360 of these + warnings in `src`. Add a TODO item for those and disable `-Werror` for + this particular warning. + + - enable `-Wformat=2` for clang (in both cmake and autotools). + + - enable `__attribute__((format))` for `_libssh2_debug()`, + `_libssh2_snprintf()` and in tests for `run_command()`. + + `LIBSSH2_PRINTF()` copied from `CURL_TEMP_PRINTF()` in curl. + + - enable `-Wimplicit-fallthrough`. + + - enable `-Wtrampolines`. + + Fix them: + + - src: replace obsolete fall-through-comments with + `__attribute__((fallthrough))`. + + - wincng: fix `-Wsign-conversion` warnings. + + - tests: fix `-Wsign-conversion` warnings. + + - example: fix `-Wsign-conversion` warnings. + + - src: fix `-Wformat` issues in trace calls. + + Also, where necessary fix `int` and `unsigned char` casts to + `unsigned int` and adjust printf format strings. These were not + causing compiler warnings. + + Cast large types to `long` to avoid dealing with printf masks for + `size_t` and other C99 types. Existing code often used `int` for this. + I'll update them to `long` in an upcoming commit. + + - tests: fix `-Wformat` warning. + + - silence `-Wformat-nonliteral` warnings. + + - mbedtls: silence `-Wsign-conversion`/`-Warith-conversion` + in external header. + + Closes #1257 + +- packet: whitespace fix + + Tested via #1257 + +- tidy-up: unsigned -> unsigned int + + In the `interval` argument of public `libssh2_keepalive_config()`. + + Tested via #1257 + +- tests: sync port number type with the rest of codebase + + Tested via #1257 + +- autotools: enable `-Wunused-macros` with gcc + + It works with gcc without the libtool warnings seen with clang + on Windows in 96682bd5e14c20828e18bf10ed5b4b5c7543924a #1227. + + Sync usage of of this macro with CMake and + autotools + clang + non-Windows. Making it enabled everywhere except + autotools + clang + Windows due to the libtool stub issue. + + Follow-up to 7ecc309cd10454c54814b478c4f85d0041da6721 #1224 + + Closes #1262 + +- TODO: disable or drop weak algos [ci skip] + + Closes #1261 + +- example, tests: fix/silence `-Wformat-truncation=2` gcc warnings + + Then sync this warning option with curl. + + Seems like a false positive and/or couldn't figure how to fix it, so silence: + ``` + example/ssh2.c:227:38: error: '%s' directive output may be truncated writing likely 1 or more bytes into a region of size 0 [-Werror=format-truncation=] + 227 | snprintf(fn1, fn1sz, "%s/%s", h, pubkey); + | ^~ + example/ssh2.c:227:34: note: assuming directive output of 1 byte + 227 | snprintf(fn1, fn1sz, "%s/%s", h, pubkey); + | ^~~~~~~ + example/ssh2.c:227:13: note: 'snprintf' output 3 or more bytes (assuming 4) into a destination of size 2 + 227 | snprintf(fn1, fn1sz, "%s/%s", h, pubkey); + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + example/ssh2.c:228:38: error: '%s' directive output may be truncated writing likely 1 or more bytes into a region of size 0 [-Werror=format-truncation=] + 228 | snprintf(fn2, fn2sz, "%s/%s", h, privkey); + | ^~ + example/ssh2.c:228:34: note: assuming directive output of 1 byte + 228 | snprintf(fn2, fn2sz, "%s/%s", h, privkey); + | ^~~~~~~ + example/ssh2.c:228:13: note: 'snprintf' output 3 or more bytes (assuming 4) into a destination of size 2 + 228 | snprintf(fn2, fn2sz, "%s/%s", h, privkey); + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ``` + Ref: https://github.com/libssh2/libssh2/actions/runs/7055480458/job/19205970397#step:10:98 + + Fix: + ``` + tests/openssh_fixture.c:116:38: error: ' 2>&1' directive output may be truncated writing 5 bytes into a region of size between 1 and 1024 [-Werror=format-truncation=] + tests/openssh_fixture.c:116:11: note: 'snprintf' output between 6 and 1029 bytes into a destination of size 1024 + ``` + Ref: https://github.com/libssh2/libssh2/actions/runs/7055480458/job/19205969221#step:10:51 + + Tested via #1257 + +- example: fix indentation follow-up + + Fix long line and fix more indentations. + + Follow-up to 9e896e1b80911a53d6aabb322e034e6ca51b6898 + +- example: fix indentation + + Tested via #1257 + +- autotools: fix missed `-pedantic` and `-Wall` options for gcc + + Follow-up to 5996fefe2bad80cfba85b2569ce6ab6ef575142c #1223 + + Tested via #1257 + +- ci: show compiler in cross/cygwin job names + + Tested via #1257 + +- mbedtls: further improve disabling `-Wredundant-decls` + + Move warning option suppression to `src/mbedtls.h` to surround the actual + external header #includes that need it. + + Follow-up to ecec68a2c13a9c63fe8c2dc457ae785a513e157c #1226 + Follow-up to 7ecc309cd10454c54814b478c4f85d0041da6721 #1224 + + Tested via #1257 + +GitHub (1 Dec 2023) +- [ren mingshuai brought this change] + + example: replace remaining libssh2_scp_recv with libssh2_scp_recv2 in output messages (#1258) + + libssh2_scp_recv is deprecated and has been replaced by libssh2_scp_recv2 + in prior commit. + + Follow-up to 6c84a426beb494980579e5c1d244ea54d3fc1a3f + +Viktor Szakats (27 Nov 2023) +- openssl: use OpenSSL 3 HMAC API, add `no-deprecated` CI job + + - use OpenSSL 3 API when available for HMAC. + This fixes building with OpenSSL 3 `no-deprecated` builds. + + - ensure we support pure OpenSSL 3 API by adding a CI job using + OpenSSL 3 custom-built with `no-deprecated`. + + Follow-up to b0ab005fe79260e6e9fe08f8d73b58dd4856943d #1207 + + Fixes #1235 + Closes #1243 + +- ci: restore lost comment for FreeBSD [ci skip] + + Follow-up to eee4e8055ab375c9f9061d4feb39086737f41a9c + +- ci: add OpenBSD (v7.4) job + fix build error in example + + - Use CMake, LibreSSL and clang from the base install. + + - This uncovered a build error in `example/subsystem_netconf.c`, caused + by using the `%n` printf mask. This is a security risk and some + systems (notably OpenBSD) disable this feature. + + Fix it by applying this patch from OpenBSD ports (from 2021-09-11): + https://cvsweb.openbsd.org/ports/security/libssh2/patches/patch-example_subsystem_netconf_c?rev=1.1&content-type=text/x-cvsweb-markup + https://github.com/openbsd/ports/commit/2c5b2f3e94381914a3e8ade960ce8c997ca9d6d7 + "The old code is also broken, as it passes a pointer to a variable + of a different size (on LP64). There is no check for truncation, + but buf[] is 1MB in size." + Patch-by: naddy + + ``` + /home/runner/work/libssh2/libssh2/example/subsystem_netconf.c:252:17: error: '%n' format specifier support is deactivated and will call abort(3) [-Werror] + "]]>]]>\n%n", (int *)&len); + ~^ + /home/runner/work/libssh2/libssh2/example/subsystem_netconf.c:270:17: error: '%n' format specifier support is deactivated and will call abort(3) [-Werror] + "]]>]]>\n%n", (int *)&len); + ~^ + 2 errors generated. + ``` + Ref: https://github.com/libssh2/libssh2/actions/runs/6991449778/job/19022024280#step:3:420 + + Also made tests with arm64, but it takes consistently almost 14m to + finish the job, vs. 2-3m for the native amd64: + https://github.com/libssh2/libssh2/actions/runs/6991648984/job/19022440525 + https://github.com/libssh2/libssh2/actions/runs/6991551220/job/19022233651 + + Cherry-picked from #1250 + Closes #1250 + +- ci: add NetBSD (v9.3) job + + Use CMake, OpenSSL (v1.1) and clang from the base install. + + Cherry-picked from #1250 + +- ci: update and speed up FreeBSD job + + - switch to an alternate GitHub action. This one seems (more) actively + maintained, and runs faster: + https://github.com/cross-platform-actions/action + + - use clang instead of gcc. clang is already present in the base + install, saving install time and bandwidth. + + - stop installing `openssl-quictls` and use the OpenSSL (v1.1) from + the base system. + (I'm suspecting that quictls before this patch wasn't detected by + the build.) + https://wiki.freebsd.org/OpenSSL + + Cherry-picked from #1250 + +- stop using leading underscores in macro names + + Underscored macros are reserved for the compiler / standard lib / etc. + Stop using them in user code. + + We used them as header guards in `src` and in `__FILESIZE` in `example`. + + Closes #1248 + +- ci: use absolute path in `CMAKE_INSTALL_PREFIX` + + To make the installed locations unambiguous in the build logs. + + Closes #1247 + +- openssl: make a function static, add `#ifdef` comments + + Follow-up to 03092292597ac601c3f9f0c267ecb145dda75e4e #248 + where the function was added. + + Also add comments to make `#ifdef` branches easier to follow in + `openssl.h`. + + Closes #1246 + +- ci: boost mbedTLS build speed + + Build times down to 4 seconds (from 18-20). + + Closes #1245 + +- openssl: fix DSA code to use OpenSSL 3 API + + - fix missing `DSA` type when building for OpenSSL 3 `no-deprecated`. + - fix fallouts after fixing the above by switching away from `DSA` + with OpenSSL 3. + + Follow-up to b0ab005fe79260e6e9fe08f8d73b58dd4856943d #1207 + + Closes #1244 + +- openssl: formatting (delete empty lines) [ci skip] + +- tests: fall back to `$LOGNAME` for username + + If the `$USER` variable is empty, fall back to using `$LOGNAME` to + retrieve the logged-in username. + + In POSIX, `$LOGNAME` is a mandatory variable, while `$USER` isn't, and + on some systems it may not be set. Without this value, tests were unable + to provide the correct username when logging into the SSH server running + under the active user's session. + + Reported-by: Nicolas Mora + Suggested-by: Nicolas Mora + Ref: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1056348 + Fixes #1240 + Closes #1241 + +- libssh2.h: use `_WIN32` for Windows detection instead of rolling our own + + Sync up `libssh2.h` Windows detection with the libssh2 source code. + + `libssh2.h` was using `WIN32` and `LIBSSH2_WIN32` for Windows detection, + next to the official `_WIN32`. After this patch it only uses `_WIN32` + for this. Also, make it stop defining `LIBSSH2_WIN32`. + + There is a slight chance these break compatibility with Windows + compilers that fail to define `_WIN32`. I'm not aware of any obsolete + or modern compiler affected, but in case there is one, one possible + solution is to define this macro manually. + + Closes #1238 + +- openssl: fix `EC_KEY` reference with OpenSSL 3 `no-deprecated` build + + Fixes: + ``` + src/openssl.c:650:5: error: use of undeclared identifier 'EC_KEY' + EC_KEY *ec_key = EC_KEY_new_by_curve_name(curve); + ^ + src/openssl.c:650:13: error: use of undeclared identifier 'ec_key' + EC_KEY *ec_key = EC_KEY_new_by_curve_name(curve); + ^ + src/openssl.c:650:22: error: implicit declaration of function 'EC_KEY_new_by_curve_name' is invalid in C99 [-Werror,-Wimplicit-function-declaration] + EC_KEY *ec_key = EC_KEY_new_by_curve_name(curve); + ^ + src/openssl.c:650:22: note: did you mean 'EC_GROUP_new_by_curve_name'? + ./quictls/_a64-mac-sys/usr/include/openssl/ec.h:483:11: note: 'EC_GROUP_new_by_curve_name' declared here + EC_GROUP *EC_GROUP_new_by_curve_name(int nid); + ^ + In file included from ./_a64-mac-sys-bld/src/CMakeFiles/libssh2_static.dir/Unity/unity_0_c.c:19: + In file included from src/crypto.c:10: + src/openssl.c:652:8: error: use of undeclared identifier 'ec_key' + if(ec_key) { + ^ + ``` + Ref: https://github.com/curl/curl-for-win/actions/runs/6950001225/job/18909297867#step:3:4341 + + Follow-up to b0ab005fe79260e6e9fe08f8d73b58dd4856943d #1207 + + Bug #1235 + Closes #1236 + +- openssl: formatting + + Sync up these lines with the other two similar occurrences in the code. + + Cherry-picked from #1236 + +GitHub (21 Nov 2023) +- [Michael Buckley brought this change] + + openssl: use non-deprecated APIs with OpenSSL 3.x (#1207) + + Assisted-by: Viktor Szakats + +Viktor Szakats (21 Nov 2023) +- ci: add BoringSSL job (cmake, gcc, amd64) + + Closes #1233 + +- autotools: fix dotless gcc and Apple clang version detections + + - fix parsing dotless (major-only) gcc versions. + Follow-up to 00a3b88c51cdb407fbbb347a2e38c5c7d89875ad #1187 + + - sync gcc detection variable names with curl. + + - fix Apple clang version detection for releases between + 'Apple LLVM version 7.3.0' and 'Apple LLVM version 10.0.1' where the + version was under-detected as 3.7 llvm/clang equivalent. + + - fix Apple clang version detection for 'Apple clang version 11.0.0' + and newer where the Apple clang version was detected, instead of its + llvm/clang equivalent. + + - revert to show `clang` instead of `Apple clang`, because we follow it + with an llvm/clang version number. (Apple-ness still visible in raw + version.) + + Used this collection for Apple clang / llvm/clang translation and test + inputs: https://gist.github.com/yamaya/2924292 + + Closes #1232 + +- acinclude.m4: revert accidental edit [ci skip] + + Follow-up to 8c320a93a48775b74f40415e46f84bf68b4d5ae8 + +- autotools: show more clang/gcc version details + + Also: + - show if we detected Apple clang. + - delete duplicate version detection for clang. + + Closes #1230 + +- acinclude.m4: re-sync with curl [ci skip] + +- autotools: avoid warnings in libtool stub code + + Seen on Windows with clang64, in libtool-generated stub code for + examples and tests. + + The error didn't break the CI job for some reason. + + msys2 (autotools, clang64, clang-x86_64: + ``` + [...] + 2023-11-17T20:14:17.8639574Z ./.libs/lt-test_read.c:91:10: error: macro is not used [-Werror,-Wunused-macros] + [...] + 2023-11-17T20:14:39.8729255Z ./.libs/lt-sftp_write_nonblock.c:91:10: error: macro is not used [-Werror,-Wunused-macros] + [...] + ``` + Ref: https://github.com/libssh2/libssh2/actions/runs/6908585056/job/18798193405?pr=1226#step:8:474 + + Follow-up to 7ecc309cd10454c54814b478c4f85d0041da6721 #1224 + + Closes #1227 + +- mbedtls: improve disabling `-Wredundant-decls` + + Disable these warnings specifically for the mbedTLS public headers + and leave it on for the the rest of the code. This also fixes this + issue for autotools. Previous solution was globally disabling this + warning for the whole code when using mbedTLS and only with CMake. + + Follow-up to 7ecc309cd10454c54814b478c4f85d0041da6721 #1224 + + Closes #1226 + +- cmake: rename picky warnings script + + To match the camel-case style used in other CMake scripts and also + to match the name used in curl. + + Closes #1225 + +- build: enable more compiler warnings and fix them + + Enable more picky compiler warnings. I've found these options in the + nghttp3 project when implementing the CMake quick picky warning + functionality for it. + + Fix issues found along the way: + + - wincng, mbedtls: delete duplicate function declarations. + Most of this was due to re-#defining crypto functions to + crypto-backend specific implementations These redefines also remapped + the declarations in `crypto.h`, making the backend-specific + declarations duplicates. + This patch deletes the backend-specific declarations. + + - wincng mapped two crypto functions to the same local function. + Also causing double declarations. + Fix this by adding two disctinct wrappers and moving + the common function to a static one. + + - delete unreachable `break;` statements. + + - kex: disable macros when unused. + + - agent: disable unused constants. + + - mbedtls: disable double declaration warnings because public mbedTLS + headers trigger it. (with function `psa_set_key_domain_parameters`) + + - crypto.h: formatting. + + Ref: https://github.com/ngtcp2/nghttp3/blob/a70edb08e954d690e8fb2c1df999b5a056f8bf9f/cmake/PickyWarningsC.cmake + + Closes #1224 + +- autotools: sync warning enabler code with curl + + Tiny changes and minor updates to bring this code closer + to curl's `m4/curl-compilers.m4`. + + Closes #1223 + +- acinclude.m4: fix indentation [ci skip] + + Also match indentation of curl's `m4/curl-compilers.m4` for + easier syncing. + +- autotool: rename variable + + `WARN` -> `tmp_CFLAGS` + + To match curl and make syncing this code easier. + + Ref: https://github.com/curl/curl/blob/d1820768cce0e797d1f072343868ce1902170e93/m4/curl-compilers.m4#L479 + + Closes #1222 + +- autotools: picky warning options tidy-up + + - sync clang warning version limits with CMake. + - make `WARN=` vs. `CURL_ADD_COMPILER_WARNINGS()` consistent with curl + and between clang and gcc (`WARN=` is for `no-` options in general). + + Closes #1221 + +- build: picky warning updates + + - cmake, autotools: sync picky gcc warnings with curl. + - cmake, autotools: add `-Wold-style-definition` for clang too. + - cmake, autotools: add comment for `-Wformat-truncation=1`. + - cmake: more precise version info for old clang options. + + Closes #1219 + +- ci: fixup FreeBSD version, bump mbedtls + + We haven't been using the FreeBSD version. Also it turns out, + the single version supported is 13.2 at the moment: + https://github.com/vmactions/freebsd-vm/tree/main/conf + + Stop trying to set the version and instead rely on the action + providing the latest supported one automatically. + + Follow-up to a7d2a573be26238cc2b55e5ff6649bbe620cb8d9 + + Also: + - add more details to the FreeBSD job description. + - bump mbedtls version while here. + + Closes #1217 + +- cmake: fix multiple include of libssh2 package + + Also extend our integration test double inclusion. It will still not + catch this case, because that requires + `cmake_minimum_required(VERSION 3.18)` or higher. + + Fixes: + ``` + CMake Error at .../lib/cmake/libssh2/libssh2-config.cmake:8 (add_library): + add_library cannot create ALIAS target "libssh2::libssh2" because another + target with the same name already exists. + Call Stack (most recent call first): + CMakeLists.txt:24 (find_package) + + CMake Error at .../lib/cmake/libssh2/libssh2-config.cmake:13 (add_library): + add_library cannot create ALIAS target "Libssh2::libssh2" because another + target with the same name already exists. + Call Stack (most recent call first): + CMakeLists.txt:24 (find_package) + ``` + + Test to reproduce: + ```cmake + cmake_minimum_required(VERSION 3.18) # must be 3.18 or higher + + project(test) + + find_package(libssh2 CONFIG) + find_package(libssh2 CONFIG) # fails + + add_executable(test main.c) + target_link_libraries(test libssh2::libssh2) + ``` + + Ref: https://cmake.org/cmake/help/latest/release/3.18.html#other-changes + Ref: https://cmake.org/cmake/help/v3.18/policy/CMP0107.html + + Assisted-by: Kai Pastor + Assisted-by: Harry Mallon + Ref: https://github.com/curl/curl/pull/11913 + + Closes #1216 + +- ci: add FreeBSD 13.2 job + + It runs over Linux via qemu. First two runs were (very) slow, then it + became (much) more performant at just 2x slower than a native Linux + build. Then got slow again, then fast again. Still seems acceptable + for the value this adds. + + The build uses autotools and quictls. + + Successful builds: + 1. https://github.com/libssh2/libssh2/actions/runs/6802676786/job/18496286419 (13m59s, -j3) + 2. https://github.com/libssh2/libssh2/actions/runs/6802976375/job/18497243225 (11m5s, -j2) + 3. https://github.com/libssh2/libssh2/actions/runs/6803142201/job/18497785049 (3m6s, -j1) + 4. https://github.com/libssh2/libssh2/actions/runs/6803194839/job/18497962766 (3m10s, -j2) + 5. https://github.com/libssh2/libssh2/actions/runs/6803267201/job/18498208501 (3m13s) + 6. https://github.com/libssh2/libssh2/actions/runs/6803510333/job/18498993698 (15m25s) + 7. https://github.com/libssh2/libssh2/actions/runs/6813602863/job/18528571057 (3m13s) + + Similar solution exists for Solaris (over macOS via VirtualBox), but it + hangs forever at `Waiting for text: solaris console login`: + https://github.com/libssh2/libssh2/actions/runs/6802388128/job/18495391869#step:4:185 + + Idea taken from LibreSSL. + + FIXME: Unrelated, the `distcheck` job became flaky in recent days: + https://github.com/libssh2/libssh2/actions/runs/6802976375/job/18497256437#step:10:536 + ``` + FAIL: test_auth_pubkey_ok_rsa_aes256gcm + ``` + https://github.com/libssh2/libssh2/actions/runs/6813602863/job/18528588933#step:10:533 + ``` + FAIL: test_read + ``` + + Closes #1215 + +- reuse: fix duplicate copyright warning + + ``` + PendingDeprecationWarning: + Copyright and licensing information for 'tests/openssh_server/Dockerfile' + has been found in both 'tests/openssh_server/Dockerfile' and in the DEP5 + file located at '.reuse/dep5'. The information for these two sources has + been aggregated. In the future this behaviour will change, and you will + need to explicitly enable aggregation. [...] + ``` + Ref: https://github.com/libssh2/libssh2/actions/runs/6789274955/job/18456085964#step:4:4 + +- Makefile.mk: delete Windows-focused raw GNU Make build + + We recommend using CMake instead. Especially in unity mode, it's faster + and probably more familiar for most. It's also easily portable. + + (`Makefile.mk` was also portable, but in practice only usable for + Windows. Other platforms required a manual config header.) + + Also: + - migrate `LIBSSH2_NO_*` option CI tests to CMake. + - make MSYS2 CMake builds verbose to show compilation options. + + Closes #1204 + +- tidy-up: around `stdint.h` + + - os400: delete unused `HAVE_STDINT_H`. + + - fuzz: delete redundant `stdint.h` use. + `inttypes.h` is already included via `testinput.h`. + + - docs/TODO: adjust type in planned function. + + Closes #1212 + +- cmake: show crypto backend in feature summary + + This was visible as an enabled package before this patch, but it missed + to show WinCNG. + + Closes #1211 + +- man: fix double spaces and dash escaping + + - `- ` -> `- ` + - `. ` -> `. ` + - `\- ` -> `- ` + - `-1` -> `\-1` + - fold long lines along the way + + This makes the minus sign come out as a Unicode minus sign + (0x2212), and title separator dashes as Unicode hyphen (0x2010), + with `groff -Tutf8` v1.23.0. + + Ref: https://lwn.net/Articles/947941/ + + Closes #1210 + +- src: fix gcc 13 `-Wconversion` warning on Darwin + + ``` + src/session.c: In function 'libssh2_poll': + src/session.c:1776:22: warning: conversion from 'long int' to '__darwin_suseconds_t' {aka 'int'} may change value [-Wconversion] + 1776 | tv.tv_usec = (timeout_remaining % 1000) * 1000; + | ^ + ``` + Ref: https://github.com/curl/curl-for-win/actions/runs/6711735060/job/18239768548#step:3:4368 + + Follow-up to 08354e0abbe86d4cc5088d210d53531be6d8981a + + Closes #1209 + +- openssl: silence `-Wunused-value` warnings + + Seen with gcc 12. + + Manual: https://www.openssl.org/docs/man3.1/man3/BIO_reset.html + + ``` + ./quictls/linux-a64-musl/usr/include/openssl/bio.h:555:34: warning: value computed is not used [-Wunused-value] + 555 | # define BIO_reset(b) (int)BIO_ctrl(b,BIO_CTRL_RESET,0,NULL) + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ./libssh2/src/openssl.c:3518:5: note: in expansion of macro 'BIO_reset' + ./libssh2/src/openssl.c:3884:5: note: in expansion of macro 'BIO_reset' + ./libssh2/src/openssl.c:3995:5: note: in expansion of macro 'BIO_reset' + ``` + Ref: https://github.com/curl/curl-for-win/actions/runs/6696392318/job/18194032712#step:3:5060 + + Closes #1205 + +- Makefile.am: fix `cp` to preserve attributes and timestamp + +- cmake: simplify showing CMake version + + Move it to `CMakeLists.txt`. Drop `cmake --version` commands. + + Credit to the `zlib-ng` project for the idea: + https://github.com/zlib-ng/zlib-ng/blob/61e181c8ae93dbf56040336179c9954078bd1399/CMakeLists.txt#L7 + + Closes #1203 + +- ci: mbedtls 3.5.0 + + v3.5.0 needs extra compiler option for i386 to avoid: + ``` + #error "Must use `-mpclmul -msse2 -maes` for MBEDTLS_AESNI_C" + ``` + + Closes #1202 + +- tests: show cmake version used in integration tests + + Closes #1201 + +- readme.vms: fix typo [ci skip] + + Detected by codespell 2.2.6 + +- appveyor: YAML/PowerShell formatting, shorten variable name + + - use single-quotes in yaml and PowerShell. + + - shorten a variable name. + + - use indentation 2 for scripts. + + - use C else-style in PowerShell. + + Closes #1200 + +- ci: update actions, use shallow clones with appveyor + + - update GitHub Actions to their latest versions. + + - use shallow git clones in AppVeyor CI to save data over the wire. + + Closes #1199 + +- appveyor: move to pure PowerShell + + - replace batch commands with PowerShell. + + - merge separate command entries into single PowerShell blocks. + + Closes #1197 + +- windows: use built-in `_WIN32` macro to detect Windows + + Instead of `WIN32`. + + The compiler defines `_WIN32`. Windows SDK headers or build env defines + `WIN32`, or we have to take care of it. The agreement seems to be that + `_WIN32` is the preferred practice here. + + Minor downside is that CMake uses `WIN32` and we also adopted it in + `Makefile.mk`. + + In public libssh2 headers we stick with accepting either `_WIN32` or + `WIN32` and define our own namespaced `LIBSSH2_WIN32` based on them. + + grepping for `WIN32` remains useful to detect Windows-specific code. + + Closes #1195 + +- cmake: cleanup mbedTLS version detection more + + - lowercase, underscored local variables. + - fix `find_library()` to use the multiple names passed. + - rely more on `find_package_handle_standard_args()`. + Logic based on our `Findwolfssl.cmake`. + - delete ignored/unused `MBEDTLS_LIBRARY_DIR`. + - revert CI configuration to use `MBEDCRTYPO_LIBRARY`. + - clarify inputs/outputs in comment header. + - use variable for regex. + - formatting. + + Follow-up to 41594675072c578294674230d4cf5f47fa828778 #1192 + + Closes #1196 + +- cmake: delete duplicate `include()` + +- cmake: improve/fix mbedTLS detection + + - libssh2 needs the crypto lib only, stop dealing with the rest. + + - simplify logic. + + - drop hard-wired toolchain specific options that broke with e.g. MSVC. + + Reported by: AR Visions + Fixes #1191 + + - add mbedTLS version detection for recent releases. + + - merge custom detection results display into a single line. + + - shorten mbedTLS configuration in macOS CI job. + + Used the curl mbedTLS detection logic for ideas: + https://github.com/curl/curl/blob/a8c773845f4fdbfb09b08a6ec4b656c812568995/CMake/FindMbedTLS.cmake + + Closes #1192 + +GitHub (24 Sep 2023) +- [concussious brought this change] + + libssh2_session_get_blocking.3: Add description (#1185) + +Viktor Szakats (21 Sep 2023) +- autotools: fix selecting wincng in cross-builds (and more) + + - Fix explicitly selecting WinCNG in autotools cross-builds by moving + `windows.h` header check before the WinCNG availability check. + Follow-up to d43b8d9b0b9cd62668459fe5d582ed83aabf77e7 + + Reported-by: Jack L + Fixes #1186 + + - Add Linux -> mingw-w64 cross-builds for autotools and CMake. This + doesn't detect #1186, because that happened when explicitly specifying + WinCNG via `--with-crypto=wincng`, but not when falling back to WinCNG + by default. + + - autotools: fix to strip suffix from gcc version + + Before this patch we expected `n.n` `-dumpversion` output, but Ubuntu + may return `n-win32` (also with `-dumpfullversion`). Causing these + errors and failing to enable picky warnings: + ``` + ../configure: line 23845: test: : integer expression expected + ``` + Ref: https://github.com/libssh2/libssh2/actions/runs/6263453828/job/17007893718#step:5:143 + + Fix that by stripping any dash-suffix. + + gcc version detection is still half broken because we translate '10' + to '10.10' because `cut -d. -f2` returns the first word if the + delimiter missing. + + More possible `-dumpversion` output: `10-posix`, `10-win32`, + `9.3-posix`, `9.3-win32`, `6`, `9.3.0`, `11`, `11.2`, `11.2.0` + Ref: https://github.com/mamedev/mame/pull/9767 + + Closes #1187 + +GitHub (28 Aug 2023) +- [Michael Buckley brought this change] + + Properly bounds check packet_authagent_open() (#1179) + + * Properly bounds check packet_authagent_open + * packet.c: use strlen instead of sizeof for strings + * Make LIBSSH_CHANNEL's channel_type_len a size_t + * packet_authagent_open: use size_t for offset + + Credit: + Michael Buckley, signed off by Will Cosgrove + +Viktor Szakats (28 Aug 2023) +- os400qc3: move FIXME comment [ci skip] + + Follow-up to eb9f9de2c19ec67d12a444cce34bdd059fd26ddc + +- md5: allow disabling old-style encrypted private keys at build-time + + Before this patch, this happened at runtime when using an old (pre-3.0), + FIPS-enabled OpenSSL backend. + + This patch makes it possible to disable this via the build-time option + `LIBSSH2_NO_MD5_PEM`. + + Also: + - make sure to exclude all MD5 internal APIs when both the above and + `LIBSSH2_NO_MD5` are enabled. + - fix tests to support build with`LIBSSH2_NO_MD5`, `LIBSSH2_NO_MD5_PEM` + and `LIBSSH2_NO_3DES`. + - add FIXME to apply this change to `os400qc3.*`. + + Old-style encrypted private keys require MD5 and they look like this: + ``` + -----BEGIN RSA PRIVATE KEY----- + Proc-Type: 4,ENCRYPTED + DEK-Info: AES-128-CBC, + + + -----END RSA PRIVATE KEY----- + ``` + + E.g.: `tests/key_rsa_encrypted` + + Ref: https://github.com/libssh2/www/issues/20 + Closes #1181 + +- cmake: tidy-up `foreach()` syntax + + Use `IN LISTS` and `IN ITEMS`. This appears to be the preferred way + within CMake's own source code and possibly improves readability. + + Fixup a side-effect of `IN LISTS`, where it retains empty values at + the end of the list, as opposed to the syntax used before, which + dropped it. In our case this happened with lines read from a text + file via `file(READ)`. + + https://cmake.org/cmake/help/v3.7/command/foreach.html + + Closes #1180 + +- ci: replace `mv` + `chmod` with `install` in `Dockerfile` + + Cherry-picked from #1175 + Closes #1175 + +- ci: set file mode early in `appveyor_docker.yml` + + Also: + - replace tab with spaces in generated config file + - formatting + + Cherry-picked from #1175 + +- ci: add spellcheck (codespell) + + Also rename a variable in `src/os400qc3.c` to avoid a false positive. + + Cherry-picked from #1175 + +- cmake: also test for `libssh2_VERSION` + + Cherry-picked from #1175 + +- cmake: show cmake versions in ci + + Cherry-picked from #1175 + +- tests: formatting and tidy-ups + + - Dockerfile: use standard sep with `sed` + - Dockerfile: use single quotes in shell command + - appveyor.yml: use long-form option with `choco` + - tests/cmake: add language to test project + - reuse.yml: fix indentation + ``` + $ yamllint reuse.yml + reuse.yml + [...] + 11:5 error wrong indentation: expected 6 but found 4 (indentation) + 15:5 error wrong indentation: expected 6 but found 4 (indentation) + [...] + 27:5 error wrong indentation: expected 6 but found 4 (indentation) + ``` + + Cherry-picked from #1175 + +- openssl.c: whitespace fixes + + Cherry-picked from #1175 + +- checksrc: fix spelling in comment [ci skip] + +- cmake: quote more strings + + Follow-up to 3fa5282d6284efba62dc591697e6a687152bdcb1 + + Closes #1173 + +- drop `www.` from `www.libssh2.org` + + is now a 301 permanent redirect to + . + + Update all references to point directly to the new destination. + + Ref: https://github.com/libssh2/www/commit/ccf4a7de7f702a8ee17e2c697bcbef47fcf485ed + + Closes #1172 + +- cmake: add `ExternalProject` integration test + + - via `ExternalProject_Add()`: + https://cmake.org/cmake/help/latest/module/ExternalProject.html + (as documented in `docs/INSTALL_CMAKE.md`) + + - also make `FetchContent` fetch from local repo instead of live master. + + Closes #1171 + +- cmake: add integration tests + + Add a small project to test dependent/downstream CMake build using + libssh2. Also added to the GHA CI, and you can also run it locally with + `tests/cmake/test.sh`. + + Test three methods of integrating libssh2 into a project: + - via `find_package()`: + https://cmake.org/cmake/help/latest/command/find_package.html + - via `add_subdirectory()`: + https://cmake.org/cmake/help/latest/command/add_subdirectory.html + - via `FetchContent`: + https://cmake.org/cmake/help/latest/module/FetchContent.html + + Closes #1170 + +- cmake: (re-)add aliases for `add_subdirectory()` builds + + Add internal libssh2 library aliases to make these available for + downstream/dependent projects building libssh2 via `add_subdirectory()`: + + - `libssh2:libssh2_static` + - `libssh2:libssh2_shared` + - `libssh2:libssh2` (shared, or static when not building shared) + - `libssh2` (shared, or static when not building shared) + + Of these, `libssh2` was present in v1.10.0 and earlier releases, but + missing from v1.11.0. + + Closes #1169 + +- cmake: delete empty line [ci skip] + + Follow-up to 3fa5282d6284efba62dc591697e6a687152bdcb1 + +- cmake: reflect minimum version in docs [ci skip] + + Follow-up to 9cd18f4578baa41dfca197f60557063cad12cd59 + +- cmake: style tidy up + + - quote text literals to improve readability. + (exceptions: `FILES` items, `add_subdirectory` names, `find_package` + names, literal target names, version numbers, 0/1, built-in CMake + values and CMake keywords, list items in `cmake/max_warnings.cmake`) + - quote standalone variables that could break syntax on empty values. + - replace `libssh2_SOURCE_DIR` with `PROJECT_SOURCE_DIR`. + - add missing mode to `message()` call. + - `TRUE`/`FALSE` → `ON`/`OFF`. + - add missing default value `OFF` to `option()` for clarity. + - unfold some lines. + - `INSTALL_CMAKE.md` fixes and updates. Show defaults. + + Closes #1166 + +- wincng: prefer `ULONG`/`DWORD` over `unsigned long` + + To match with the types used by the `Crypt*()` (uses `DWORD`) and + `BCrypt*()` (uses `ULONG`) Windows APIs. + + This patch doesn't change data width or signedness. + + Closes #1165 + +- wincng: tidy-ups + + - make `_libssh2_wincng_key_sha_verify` static. + + - prefer `unsigned long` over `size_t` in two static functions. + + - prefer `ULONG` over `DWORD` to match `BCryptImportKeyPair()` + and `BCryptGenerateKeyPair()`. + + - add a newline. + + Closes #1164 + +- ci: add MSYS builds (autotools and cmake) + + Use existing MSYS2 section and extend it with builds for the MSYS + environment with both autotools and cmake. + + MSYS builds resemble Cygwin ones: The env is Unixy, where Windows + headers are all available but we don't use them. + + Also: + + - extend existing autotools logic for Cygwin to skip detecting + `windows.h` for MSYS targets too. + + - require `windows.h` for the WinCNG backend in autotools. Before this + patch, autotools allowed selecting WinCNG on the Cygwin and MSYS + platforms, but the builds then fell apart due to the resulting mixed + Unixy + Windowsy environment. The general expectation for Cygwin/MSYS + builds is not to use the Windows API directly in them. + + - stop manually selecting the `MSYS Makefiles` CMake generator for + MSYS2-based GHA CI builds. mingw-w64 builds work fine without it, but + it broke MSYS build which use `Unix Makefiles`. Deleting this setting + fixes all build flavours. + + Closes #1162 + +- ci: cygwin job tidy-ups + + `CMAKE_C_COMPILER=gcc` not necessary, delete it. + + Follow-up to f1e96e733fefb495bc31b07f5c2a5845ff877c9c + + Cherry-picked from #1163 + Closes #1163 + +- ci: add Cygwin builds (autotools and cmake) + + To avoid builds picking up non-Cygwin components coming by default with + the CI machine, I used the solution recommended by Cygwin [1] and set + `PATH` manually. To avoid repeating this for each step, I merged steps + into a single one. Let us know if there is a more elegant way. + + Cygwin's Github Action uses cleartext HTTP. We upgrade this to HTTPS. + + autotools build seemed to take slightly longer than other jobs. To save + turnaround time I disabled building tests. + + Cygwin package search: https://cygwin.com/cgi-bin2/package-grep.cgi + + [1] https://github.com/cygwin/cygwin-install-action/tree/v4#path + + Closes #1161 + +- cmake: add `LIB_NAME` variable + + It holds the name `libssh2`. Mainly to document its uses, and also + syncing up with the same variable in libcurl. + + Closes #1159 + +- cmake: add one missed `PROJECT_NAME` variable + + Follow-up to 72fd25958a7dc6f8e68f2b2d5d72839a2da98f9c + + Closes #1158 + +- cmake: tidy-up concatenation in `CMAKE_MODULE_PATH` + + Former solution was appending an empty element to the array if + `CMAKE_MODULE_PATH` was originally empty. The new syntax doesn't have + this side-effect. + + There is no known issue caused by this. Fixing it for good measure. + + Closes #1157 + +- ci: add mingw-w64 UWP build + + Add a CI test for Windows UWP builds using mingw-w64. Before this patch + we had UWP builds tested with MSVC only. + + Alike existing UWP jobs, it's not possible to run the binaries due to + the missing UWP runtime DLL: + https://github.com/libssh2/libssh2/actions/runs/5821297010/job/15783475118#step:11:42 + + We could install `winstorecompat-git` in the setup-msys2 step, but opted + to do it manually to avoid the overhead for every matrix job. + + All this would work smoother with llvm-mingw, which features an UWP + toolchain prefix and provides all necessary implibs by default. + + This also hit a CMake bug (with v3.26.4), where CMake gets confused and + sets up `windres.exe` to use the MSVC rc.exe-style command-line: + https://github.com/libssh2/libssh2/actions/runs/5819232677/job/15777236773#step:9:126 + + Notice that MS "sunset" UWP in 2021: + https://github.com/microsoft/WindowsAppSDK/discussions/1615 + + If this particular CI job turns out to be not worth the maintenance + burden or CPU time, or too much of a hack, feel free to delete it. + + Ref: https://github.com/libssh2/libssh2/pull/1147#issuecomment-1670850890 + Closes #1155 + +- cmake: replace `libssh2` literals with `PROJECT_NAME` variable + + Where applicable. + + This also makes it more obvious which `libssh2` uses were referring + to the project itself. + + Closes #1152 + +- cmake: fix `STREQUAL` check in error branch + + This caused a CMake error instead of our custom error when manually + selecting the `WinCNG` crypto-backend for a non-Windows target. + + Also cleanup `STREQUAL` checks to use variable name without `${}` on + the left side and quoted string literals on the right. + + Closes #1151 + +- misc: flatten `_libssh2_explicit_zero` if tree + + Closes #1149 + +- src: drop a redundant `#include` + + We include `misc.h` via `libssh2_priv.h` already. + + Closes #1153 + +- openssl: use automatic initialization with LibreSSL 2.7.0+ + + Stop calling `OpenSSL_add_all_*()` for LibreSSL 2.7.0 and later. + + LibreSSL 2.7.0 (2018-03-21) introduced automatic initialization and + deprecated these functions. Stop calling these functions manually for + LibreSSL version that no longer need them. + + Ref: https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/libressl-2.7.0-relnotes.txt + Ref: https://github.com/libressl/openbsd/commit/46f29f11977800547519ee65e2d1850f2483720b + Ref: https://github.com/libssh2/libssh2/issues/302 + + Also stop calling `ENGINE_*()` functions when initialization is + automatic with LibreSSL 2.7.0+ and OpenSSL 1.1.0+. Engines are also + initializated automatically with these. + + Closes #1146 + +- gha: restore curly braces in `if` + + Without curly braces it was less obvious which string is a GHA expression. + + Also fix an `if` expression that always missed its curly braces. + + Reverts cab3db588769d6deed97ba89ca9221fd7503405e + + Closes #1145 + +- ci: bump mbedtls + +- [renmingshuai brought this change] + + Add a new structure to separate memory read and file read. + We use different APIs when we read one private key from memory, + so it is improper to store the private key information in the + structure that stores the private key file information. + + Fixes https://github.com/libssh2/libssh2/issues/773 + Reported-by: mike-jumper + +- tests: replace FIXME with comments + + `key_dsa_wrong` is the same kind of (valid) key as `key_dsa`, both with + an empty passphrase. Named "wrong" because it's intentionally not added + to our `openssh_server/authorized_keys` file. + +- tidy-up: delete duplicate word from comment + +- cmake: cache more config values on Windows + + Set two cases of non-detection to save the time dynamically detecting + these on each build init. Affects old MSVC versions. + + Before: + https://ci.appveyor.com/project/libssh2org/libssh2/builds/47668870/job/i17e0e9yx8rgpv4i + + After: + https://ci.appveyor.com/project/libssh2org/libssh2/builds/47674950/job/ysa1jq0pxtyhui3f + + Closes #1142 + +- revert: build: respect autotools `DLL_EXPORT` in `libssh2.h` + + Revert fb1195cf88268a11e2709b9912ab9dca8c23739c #917 + + On a second look this change did not improve anything with autotools + builds. autotools seems to handle the dll export matter without it. + + This patch also broke (e.g.) curl-for-win autotools builds, where the + curl build defines `DLL_EXPORT` while building libcurl DLL. `libssh2.h` + picks it up, resulting in unresolved symbols while trying to link a + static libssh2 on Windows. The best fix seems to be to revert this, + instead of adding extra tweaks to dependents. + + Fixes: + https://ci.appveyor.com/project/curlorg/curl-for-win/builds/47667412#L11035 + ``` + ld.lld-15: error: undefined symbol: __declspec(dllimport) libssh2_session_block_directions + >>> referenced by vssh/.libs/libcurl_la-libssh2.o:(ssh_do) + >>> referenced by vssh/.libs/libcurl_la-libssh2.o:(ssh_connect) + >>> referenced by vssh/.libs/libcurl_la-libssh2.o:(ssh_multi_statemach) + >>> referenced 8 more times + + ld.lld-15: error: undefined symbol: __declspec(dllimport) libssh2_session_init_ex + >>> referenced by vssh/.libs/libcurl_la-libssh2.o:(ssh_connect) + + ld.lld-15: error: undefined symbol: __declspec(dllimport) libssh2_session_set_read_timeout + [...] + ``` + + Closes #1141 + +- gha: simplify `if` strings + + Closes #1140 + +- test_read: make it run without Docker + + Apply an existing fix to `test_read`, so that it falls back to use + the current username instead of the hardcoded `libssh2` when run + outside Docker. + + This allows to run algo tests with this command: + ```shell + cd tests + ./test_sshd.test ./test_read_algos.test + ``` + + Closes #1139 + +- cmake: streamline invocation + + Stop specifiying the current directory. + Simplify build instructions. + + Closes #1138 + +- NMakefile: delete + + This make file was for long time unmaintained (last updated in 2014). + Despite best efforts to keep it working in the recent round of major + overhauls, it appears to be broken now. There is also no way to test it + without an actual MSVC env and it's also missing from our CI. Based on + our Issue tracker, it's also not widely used. + + Since its addition in 2005, libssh2 got support for CMake in 2014. + CMake should be able to generate NMake makefiles with the option + `-G "NMake Makefiles"`. (I haven't tested this.) + + Ref: https://github.com/libssh2/libssh2/discussions/1129 + Closes #1134 + +- tests: add aes256-gcm encrypted key test + + Follow-up to #1133 + + Also update `tests/gen_keys.sh` to set `aes256-ctr` encryption method + for `key_ed25519_encrypted' explicitly. + + Closes #1135 + +GitHub (26 Jul 2023) +- [Jakob Egger brought this change] + + Fix private keys encrypted with aes-gcm methods (#1133) + + libssh2 1.11.0 fails to decrypt private keys encrypted with + aes128-gcm@openssh.com and aes256-gcm@openssh.com ciphers. + + To reproduce the issue, you can create a test key with a command like + the following: + + ```bash + ssh-keygen -Z aes256-gcm@openssh.com -f id_aes256-gcm + ``` + + If you attempt to use this key for authentication, libssh2 returns the + not-so-helpful error message "Wrong passphrase or invalid/unrecognized + private key file format". + + The problem is that OpenSSH encrypts keys differently than packets. It + does not include the length as AAD, and the 16 byte authentication tag + is appended after the encrypted key. The length of the authentication + tag is not included in the encrypted key length. + + I have not found any documentation for this behaviour -- I discovered it + by looking at the OpenSSH source. See the `private2_decrypt` function in + . + + This patch fixes the code for reading OpenSSH private keys encrypted + with AES-GCM methods. + +Viktor Szakats (26 Jul 2023) +- ci: add missing timeout to 'autotools distcheck' step + +- cmake: merge `set_target_properties()` calls + + Also rename variable `LIBSSH2_VERSION` to `LIBSSH2_LIBVERSION` in + context of lib versioning to avoid collision with another use. + + Closes #1132 + +- cmake: formatting [ci skip] + +- cmake: (re-)add zlib to `Libs.private` in `libssh2.pc` + + We mistakently added transitive zlib to `Requires.private` before, then + removed it. This patch re-adds zlib, but this time to `Libs.private`, + which is listing raw libs and should include transitive libs as well. + + Also add zlib when used as a direct dependency when zlib compression + support is enabled. + + Follow-up to ef538069a661a43134fe7b848b1fe66b2b43bdac + + Closes #1131 + +- cmake: formatting [ci skip] + +- cmake: use `wolfssl/options.h` for detection, like autotools + + Closes #1130 + +- build: stop requiring libssl from openssl + + libssh2 does not use or need the TLS/SSL library of OpenSSL. + It only needs libcrypto. + + Closes #1128 + +- cmake: add openssl libs to `Libs.private` in `libssh2.pc` + + Also to sync up with autotools-generated `libssh2.pc`, that + already added them. + + Closes #1127 + +- Makefile.mk: stop linking unused mbedtls libs + + Stop linking libmbedtls and libmbedx509 (similarly to autotools). + Only libmbedcrypto is necessary for libssh2. + +- cmake: bump minimum CMake version to v3.7.0 + + Fixes the warning below, which appeared in CMake v3.27.0: + ``` + CMake Deprecation Warning at CMakeLists.txt:39 (cmake_minimum_required): + Compatibility with CMake < 3.5 will be removed from a future version of + CMake. + + Update the VERSION argument value or use a ... suffix to tell + CMake that the project does not need compatibility with older versions. + ``` + + Bump straight up to v3.7.0 to sync up with the curl project: + https://github.com/curl/curl/blob/2900c29218d2d24ab519853589da84caa850e8c7/CMakeLists.txt#L64 + + CMake release dates: + v3.7.0 2016-11-11 + v3.5.0 2016-03-08 + v3.1.0 2014-12-17 + + Closes #1126 + +- build: tidy-up `libssh2.pc.in` variable names + + - prefix with `LIBSSH2_PC_` + + - match with the names of `pkg-config` values. + + - use the same names in autotools and CMake scripts. + + - use `LIBSSH2_VERSION` for the version number in autotools scripts, + to match the name used in CMake. + + Closes #1125 + +- libssh2.pc: re-add & extend support for static-only libssh2 builds + + Adapted for libssh2 from the curl commit message by James Le Cuirot: + + "A project built entirely statically will call `pkg-config` with + `--static`, which utilises the `Libs.private:` field. Conversely it will + not use `--static` when not being built entirely statically, even if + there is only a static build of libssh2 available. This will most + likely cause the build to fail due to underlinking unless we merge the + `Libs:` fields. + + Consider that this is what the Meson build system does when it generates + `pkg-config` files." + + This patch extends the above to `Requires:`, to mirror `Libs:` with + `pkg-config` package names. + + Follow-up to 1209c16d93cba3c5e0f68c12fa4a5049f49c00d8 #1114 + + Ref: https://github.com/libssh2/libssh2/pull/1114#issuecomment-1634334809 + Ref: https://github.com/curl/curl/commit/98e5904165859679cd78825bcccb52306ee3bb66 + Ref: https://github.com/curl/curl/pull/5373 + Closes #1119 + +GitHub (14 Jul 2023) +- [Nursan Valeyev brought this change] + + cmake: CMAKE_SOURCE_DIR -> PROJECT_SOURCE_DIR (#1121) + + Fixes compiling as dependency with FetchContent + + Co-authored-by: Viktor Szakats + +Viktor Szakats (14 Jul 2023) +- autotools: use comma separator in `Requires.private` of `libssh2.pc` + + In `Requires*:`, the documented name separator is comma. We already used + it in the CMake-generated `libssh2.pc`. Adjust the autotools-generated + one to use it too, instead of spaces. + + Ref: https://linux.die.net/man/1/pkg-config + Ref: https://gitlab.freedesktop.org/pkg-config/pkg-config/-/blob/d97db4fae4c1cd099b506970b285dc2afd818ea2/pkg-config.1 + + Closes #1124 + +- build: add/fix `Requires.private` packages in `libssh2.pc` + + - autotools was using `libwolfssl`. CMake left it empty. wolfSSL + provides `wolfssl.pc`. This patch sets `Requires.private: wolfssl` + with both build tools. + + - add `libgcrypt` to `Requires.private` with both autotools and CMake. + Ref: + https://github.com/gpg/libgcrypt/blob/e76e88eef7811ada4c6e1d57520ba8c439139782/src/libgcrypt.pc.in + Present since 2005-04-22: + https://github.com/gpg/libgcrypt/commit/32bf3f13e8b45497322177645bebf0b5d0c9cb8e + Released in v1.3.0 2007-05-04: + https://github.com/gpg/libgcrypt/releases/tag/libgcrypt-1.3.0 + + - also stop adding transitive `zlib` deps to `Requires.private`. + The referenced crypto package is adding it as nedded. + This makes deduplication of the list redundant, so stop doing it. + Follow-up to 2fc367900701e6149efc42bd674c4b69127756dd + + (`libssh2.pc` not tested as a project dependency.) + + Closes #1123 + +- cmake: tidy-ups + + - dedupe `Requires.private` in `libssh2.pc`. + `zlib` could appear on the list twice: + ``` + Requires.private: libssl,libcrypto,zlib,zlib + ``` + According to CMake docs `list(REMOVE_DUPLICATES ...)`, is supported by + our minimum required CMake version (and by earlier ones even): + https://cmake.org/cmake/help/v3.1/command/list.html#remove-duplicates + + - move `cmake_minimum_required()` to the top. + + - move `set(CMAKE_MODULE_PATH)` to the top. + + - delete duplicate `set(CMAKE_MODULE_PATH)`. + + - replace `CMAKE_CURRENT_SOURCE_DIR` with `PROJECT_SOURCE_DIR` in root + `CMakeLists.txt` for robustness. + + - replace `gcovr` option with long-form for readability/consistency. + + - rename `GCOV_OPTIONS` to `GCOV_CFLAGS`. These are C options we enable + when using gcov, not gcov tooling options. + + Closes #1122 + +- openssl: add missing check for `LIBRESSL_VERSION_NUMBER` before use + + Fixes: + ``` + openssl.h:101:5: warning: "LIBRESSL_VERSION_NUMBER" is not defined [-Wundef] + LIBRESSL_VERSION_NUMBER >= 0x3050000fL + ^ + ``` + + Ref: https://github.com/libssh2/libssh2/issues/1115#issuecomment-1631845640 + Closes #1117 + +- [Harmen Stoppels brought this change] + + Don't put `@LIBS@` in pc file + +- misc: delete redundant NULL check and assignment + + Follow-up to 724effcb47ebb713d3ef1776684b8f6407b4b6a5 #1109 + + Ref: https://github.com/libssh2/libssh2/pull/1109#discussion_r1246613274 + Closes #1111 + +- [renmingshuai brought this change] + + We should check whether *key_method is a NULL pointer instead of key_method + + Signed-off-by: renmingshuai + +GitHub (30 Jun 2023) +- [ren mingshuai brought this change] + + Add NULL pointer check for outlen before use (#1109) + + Before assigning a value to the outlen, we need to check whether it is NULL. + + Credit: Ren Mingshuai + +Viktor Szakats (25 Jun 2023) +- cmake: re-add `Libssh2:libssh2` for compatibiliy + lowercase namespace + + - add `libssh2:libssh2` target that selects the shared lib if built, + otherwise the static one. + + - re-add `Libssh2:libssh2` target for compatibility with v1.10.0 and + earlier. This is an alias for `libssh2:libssh2`. + + - keep `libssh2:libssh2_shared` and `libssh2_libssh2_static` targets. + + - allow using `find_package(libssh2)` in dependents as an alternative + to `find_package(Libssh2)`. + + Co-authored-by: Radek Brich + Suggested-by: Haowei Hsu + + Fixes #1103 + Fixes #731 + Closes #1104 + +- example: fix regression in `ssh2_exec.c` + + Regression from b13936bd6a89993cd3bf4a18317ca5bd84bb08d7 #861 #846. + Update a variable name missed above. + + Reported-by: PewPewPew + Fixes #1105 + Closes #1106 + +- docs: replace SHA1 with SHA256 in CMake example + +- checksrc: modernise perl file open + + Use regular variables and separate file open modes from filenames. + + Suggested by perlcritic + + Copied from https://github.com/curl/curl/commit/7f669aa0f1d40ef5d64543981f22bdc5af1272f5 + Copied from https://github.com/curl/trurl/commit/f2784a9240f47ee28a845 + +- reuse: comply with 3.1 spec and 2.0.0 checker + + The checker tool was upgraded upstream to 2.0.0 and the REUSE + Specification to version 3.1 (from 3.0), causing these new errors: + ``` + reuse.project - WARNING - Copyright and licensing information for 'docs/INSTALL_AUTOTOOLS' have been found in 'docs/INSTALL_AUTOTOOLS' and the DEP5 file located at '.reuse/dep5'. The information in the DEP5 file has been overridden. Please ensure that this is correct. + reuse.project - WARNING - Copyright and licensing information for 'tests/openssh_server/Dockerfile' have been found in 'tests/openssh_server/Dockerfile' and the DEP5 file located at '.reuse/dep5'. The information in the DEP5 file has been overridden. Please ensure that this is correct. + + The following files have no licensing information: + * docs/INSTALL_AUTOTOOLS + * tests/openssh_server/Dockerfile + ``` + Via: https://github.com/libssh2/libssh2/actions/runs/5333572682/jobs/9664211341?pr=1098#step:4:4 + + Ref: https://github.com/fsfe/reuse-tool/releases/tag/v2.0.0 + Ref: https://git.fsfe.org/reuse/docs/src/branch/stable/CHANGELOG.md#3-1-2023-06-21 + + Original discovery: https://github.com/libssh2/libssh2/pull/1098#issuecomment-1600719575 + + Fixes #1101 + Closes #1102 + +- tests: trap signals in scripts + + Closes #1098 + +- test_sshd.test: fixup to distcheck failure + + Fixes: + ``` + ERROR: test_sshd.test - missing test plan + ERROR: test_sshd.test - exited with status 1 + ``` + Ref: https://github.com/libssh2/libssh2/actions/runs/5322354271/jobs/9638694218#step:10:532 + + Caused by trying to create the log file in a read-only directory. + + Follow-up to 299c2040625830d06ad757d687807a166b57d6de + Closes #1099 + +GitHub (21 Jun 2023) +- [Viktor Szakats brought this change] + + test_sshd.test: show sshd and test connect logs on harness failure (#1097) + +- [Joel Depooter brought this change] + + Fix incorrect byte offset in debug message (#1096) + + Fixes debug log message + + Credit: + Joel Depooter + +Viktor Szakats (16 Jun 2023) +- tidy-up: delete whitespace at EOL [ci skip] + +- mbedtls: include `version.h` for `MBEDTLS_VERSION_NUMBER` + + Older (2021 or earlier?) mbedTLS releases require this. + + Reported-by: rahmanih on Github + Fixes #1094 + Closes #1095 + +- hostkey: do not advertise ssh-rsa when SHA1 is disabled + + Before this patch OpenSSL, mbedTLS, WinCNG and OS/400 advertised both + SHA2 and SHA1 host key algos, even when SHA1 was not supported by the + crypto backend or when forcefully disabled via `LIBSSH2_NO_RSA_SHA1`. + + Reported-by: João M. S. Silva + Fixes #1092 + Closes #1093 + +- openssl.h: whitespace tidy-up [ci skip] + +GitHub (14 Jun 2023) +- [Dan Fandrich brought this change] + + test_sshd.test: set a safe PID directory (#1089) + + The compiled in default to sshd can be a non-writable location since it + expects to be run as root. + +Viktor Szakats (13 Jun 2023) +- mingw: fix printf mask for 64-bit integers + + Before 02f2700a61157ce5a264319bdb80754c92a40a24 #846 #876, we used + `%I64d'. That patch changed this to `%lld`. This patch uses `PRId64` + (defined in `inttypes.h`). + + Fixes #1090 + Closes #1091 + +- test_sshd.test: minor cleanups + +Daniel Stenberg (7 Jun 2023) +- provide SPDX identifiers + + - All files have prominent copyright and SPDX identifier + - If not embedded in the file, in the .reuse/dep5 file + - All used licenses are in LICENSES/ (not shipped in tarballs) + - A new REUSE CI job verify that all files are OK + + Assisted-by: Viktor Szakats + + Closes #1084 + +Viktor Szakats (6 Jun 2023) +- src: improve MSVC C4701 warning fix + + Simplify the code to avoid this warning. This might also help avoiding + it with other compilers (e.g. gcc?). + + Improves 02f2700a61157ce5a264319bdb80754c92a40a24 #876 + Might fix #1083 + Closes #1086 + +Daniel Stenberg (5 Jun 2023) +- configure.ac: remove AB_INIT + + Not used. Remove m4/autobuild.m4 as well + +Viktor Szakats (4 Jun 2023) +- copyright: remove years from copyright headers + + Also: + - uppercase `(C)`. + - add missing 'All rights reserved.' lines. + - drop duplicate 'Author' lines. + - add copyright headers where missing. + - enable copyright header check in checksrc. + + Reasons for deleting years (copied as-is from curl): + - they are mostly pointless in all major jurisdictions + - many big corporations and projects already don't use them + - saves us from pointless churn + - git keeps history for us + - the year range is kept in COPYING + + Closes #1082 + +- tests: cast to avoid `-Wchar-subscripts` with Cygwin + + ``` + In file included from $HOME/src/cygwin/libssh2/libssh2-1.11.0-1.x86_64/src/libssh2-1.11.0/tests/openssh_fixture.c:57: + $HOME/src/cygwin/libssh2/libssh2-1.11.0-1.x86_64/src/libssh2-1.11.0/tests/openssh_fixture.c: In function 'run_command_varg': + $HOME/src/cygwin/libssh2/libssh2-1.11.0-1.x86_64/src/libssh2-1.11.0/tests/openssh_fixture.c:136:37: warning: array subscript has type 'char' [-Wchar-subscripts] + 136 | while(end > 0 && isspace(buf[end - 1])) { + | ~~~^~~~~~~~~ + ``` + Ref: https://github.com/libssh2/libssh2/files/11644340/cygwin-x86_64-libssh2-1.11.0-1-check.log + + Reported-by: Brian Inglis + Fixes #1080 + Closes #1081 + +- tidy-up: avoid exclamations, prefer single quotes, in outputs + + Closes #1079 + +- autotools: improve libz position + + We repositioned crypto libs in 4f0f4bff5a92dce6a6cd7a5600a8ee5660402c3f + via #941 and subsequently in d4f58f03438e326b8696edd31acadd6f3e028763 + from d93ccf4901ef26443707d341553994715414e207 via #1013. + + This patch moves libz accordingly, to unbreak certain build scenarios. + + Reported-by: Kenneth Davidson + Regression from 4f0f4bff5a92dce6a6cd7a5600a8ee5660402c3f #941 + Fixes #1075 + Closes #1077 + +- src: bump `hash_len` to `size_t` in `LIBSSH2_HOSTKEY_METHOD` + + Follow-up to 7b8e02257f01a6dac5f65305b18bb74a157fb5c4 + Closes #1076 + +- ci: add non-static autotools i386 build, ignore GHA updates on AppVeyor + + Add a non-static autotools build to GitHub Actions. Make this build + target i386 and libgcrypt, to test a new build combination if we are at + it. + + Also: + - GHA: add necessary generic bits for i386 autotools builds. + - AppVeyor CI: teach it to ignore commits updating our GHA config. + + Follow-up to 572c57c9d8d4e89cfce19dde40125d55481256d1 #1072 + Closes #1074 + +GitHub (31 May 2023) +- [Xi Ruoyao brought this change] + + autotools: skip tests requiring static lib if `--disable-static` (#1072) + + Co-authored-by: Viktor Szakats + Regression from 83853f8aea0e2f739cacd491632eb7fd3d03ad2d #663 + Fixes #1056 + +Viktor Szakats (31 May 2023) +- ci: prefer `=` operator in shell snippets + + Closes #1073 + +- src: bump DSA and ECDSA sign `hash_len` to `size_t` + + Closes #1055 + +- scp: fix missing cast for targets without large file support + + E.g. on 32-bit Linux. Issue revealed after adding i386 Linux CI build + in abdf40c741c575f94bdea1c67a9d1182ff813ccb #1057. + + ``` + /home/runner/work/libssh2/libssh2/src/scp.c: In function 'scp_recv': + /home/runner/work/libssh2/libssh2/src/scp.c:765:23: error: conversion from 'libssh2_int64_t' {aka 'long long int'} to '__off_t' {aka 'long int'} may change value [-Werror=conversion] + 765 | sb->st_size = session->scpRecv_size; + | ^~~~~~~ + ``` + Ref: https://github.com/libssh2/libssh2/actions/runs/5126803482/jobs/9221746299?pr=1054#step:12:51 + + Regression from 5db836b2a829c6fff1e8c7acaa4b21b246ae1757 #1002 + Closes #1060 + +- mbedtls.h: formatting [ci skip] + + For consistency with `mbedtls.c`. + + Follow-up to 1153ebdeba563ac657b525edd6bf6da68b1fe5e2 + +- libssh2.h: bump to 1.11.1_DEV [ci skip] + +- mbedtls: use more `size_t` to sync up with `crypto.h` + + Ref: 5a96f494ee0b00282afb2db2e091246fc5e1774a #846 #879 + + Fixes #1053 + Closes #1054 + +- ci: drop redundant/unused vars, sync var names + + Closes #1059 + +- ci: add i386 Linux build (with mbedTLS) + + Also: + - reorder Linux build matrix to make build tool more visible. + - hide apt-get progress bar. + - prepare package install step for i386 builds. + + Detects bug #1053 + Closes #1057 + +- checksrc: switch to dot file + + Closes #1052 + +Version 1.11.0 (30 May 2023) + +Daniel Stenberg (30 May 2023) +- libssh2.h: bump to 1.11.0 for release + +GitHub (30 May 2023) +- [Will Cosgrove brought this change] + + Libssh2 1.11 release notes, copyright (#1048) + + * Libssh2 1.11 release notes, copyright + +Viktor Szakats (29 May 2023) +- add copyright/credits + + Closes #1050 + +- ci: add LIBSSH2_NO_AES_CBC to GNU Make build + + Closes #1049 + +- ci: add wolfSSL Linux builds + + Exclude wolfSSL builds from tests. All fail: + + ``` + 2/43 Test #2: test_aa_warmup ............................***Failed 5.59 sec + libssh2_session_handshake failed (-44): Unable to ask for ssh-userauth service + ``` + Ref: https://github.com/libssh2/libssh2/actions/runs/5085775952/jobs/9139583212#step:12:942 (with logging) + Ref: https://github.com/libssh2/libssh2/actions/runs/5085586301/jobs/9139192562#step:12:225 + + wolfSSL version: + ``` + Get:1 http://azure.archive.ubuntu.com/ubuntu jammy/universe amd64 libwolfssl32 amd64 5.2.0-2 [818 kB] + Get:2 http://azure.archive.ubuntu.com/ubuntu jammy/universe amd64 libwolfssl-dev amd64 5.2.0-2 [1194 kB] + ``` + + Cherry-picked from #1046 + Closes #1046 + +- ci: mbedTLS build config tidy-up + + Cherry-picked from #1046 + +- wolfssl: fix detection of AES-GCM feature + + Follow-up to df513c0128e1a811ad863d153892618e728845f0 + + Ref: https://github.com/libssh2/libssh2/issues/1020#issuecomment-1562069241 + Closes #1045 + +- build: fix 'unused' compiler warnings with all `NO` options set + + - add `LIBSSH2_NO_ED25519` build-time option to force-disable ED25519 + support. Useful to replicate crypto-backend builds without ED25519, + such as wolfSSL. + + - openssl: fix unused variable and function warnings with all supported + `LIBSSH2_NO_*` options enabled. + + - mbedtls: fix misplaced `#endif` leaving out the required internal + public function `libssh2_supported_key_sign_algorithms()`. + + - mbedtls: add missing prototype for two internal public functions. + + - delete a redundant block. + + All `NO` options: + ```shell + CPPFLAGS=' + -DLIBSSH2_NO_MD5 -DLIBSSH2_NO_HMAC_RIPEMD -DLIBSSH2_NO_DSA + -DLIBSSH2_NO_RSA -DLIBSSH2_NO_RSA_SHA1 + -DLIBSSH2_NO_ECDSA -DLIBSSH2_NO_ED25519 -DLIBSSH2_NO_AES_CTR + -DLIBSSH2_NO_BLOWFISH -DLIBSSH2_NO_RC4 -DLIBSSH2_NO_CAST + -DLIBSSH2_NO_3DES' + ``` + + Closes #1044 + +- cmake: avoid `list(PREPEND)` for compatibility + + `list(PREPEND)` requires CMake v3.15, our minimum is v3.1. `APPEND` + should work fine for headers anyway. + + Also fix a wrongly placed comment. + + Ref: https://cmake.org/cmake/help/latest/command/list.html#prepend + + Regression from 1e3319a167d2f32d295603167486e9e88af9bb4e + + Closes #1043 + +- checksrc: verify label indent, fix fallouts + + Also update two labels to match the rest of the source. + + checksrc update credit: Emanuele Torre @emanuele6 + + Ref: https://github.com/curl/curl/pull/11134 + + Closes #1042 + +- tidy-up: minor nits + +- ci: drop default shared/static configuration options + + Both autotools and cmake build both shared and static lib by default. + + Ref: 896154bc17f000c0a1bb89b74bc879692ac0d47c + + Delete configuration enabling these explicitly in CI jobs. + + Cherry-picked from #1036 + Closes #1036 + +- cmake: enable shared libssh2 library by default + + This brings default behaviour in sync with autotools, which builds both + lib flavours by default. + + (Notice that on Windows, autotools includes the Windows Resource in the + static library, when building both at the same time. CMake doesn't have + this issue.) + + Enabling both lib flavours has a side-effect when using non-MinGW + toolchains (e.g. MSVC): to resolve the filename conflict between import + and static libraries, we add a suffix to the static lib, naming it + `libssh2_static.lib`. This can break dependent builds relying on + `libssh2.lib` for linking the static libssh2. + + Workarounds: + + - disable either shared or static libssh2 via + `-DBUILD_STATIC_LIBS=OFF` or + `-DBUILD_SHARED_LIBS=OFF`. This results in a libssh2 library (either + static or shared) without a prefix: `libssh2.lib`. + + - set a custom static library suffix via: + `-DSTATIC_LIB_SUFFIX=_my_static`. Resulting in + `libssh2_my_static.lib`, and import library + `libssh2.lib`. + + - set a custom import library suffix via: + `-DIMPORT_LIB_SUFFIX=_my_implib`. Resulting in + `libssh2_my_implib.lib` import library, and static library + `libssh2.lib`. + + - customize the default static/import library suffix (incl. extension) + via + `-DCMAKE_STATIC_LIBRARY_SUFFIX=_my_static_suffix.lib` or + `-DCMAKE_IMPORT_LIBRARY_SUFFIX=_my_import_suffix.lib`. + + Cherry-picked from #1036 + +- cmake: tweak static/import lib name collision avoidance logic + + The collision issue affects (typically) MSVC, when building both shared + and static libssh2 in one go. + + Ref: https://stackoverflow.com/questions/2140129/what-is-proper-naming-convention-for-msvc-dlls-static-libraries-and-import-libr + + Initially we handled this by appending the `_imp` suffix to the import + library filename. This is how curl tackles this, but on a second look, + this solution seem to be accidental and has no widespread use. + + It seems more widely accepted to use the '_static' suffix for the static + library. This patch implements this. + + (MinGW, Cygwin and unixy platforms are not affected by this issue.) + + Follow-up to 4e2580628dd1f8dc51ac65ac747ebcf0e93fa3d1 + + Cherry-picked from #1036 + +- cmake: add `IMPORT_LIB_SUFFIX` (like `STATIC_LIB_SUFFIX`) + + Allow resolving the import/static library name collision also by setting + a custom _import_ library name suffix. + + Follow-up to 4e2580628dd1f8dc51ac65ac747ebcf0e93fa3d1 + + Cherry-picked from #1036 + +- ci: do not disable shared lib with msys2/autotools in GHA + + Cherry-picked from #1036 + +- Makefile.mk: fix `DYN=1 test` by skipping tests needing static lib + + `DYN=1` means to build examples/tests against the shared libssh2. + + Before this patch this was broken for building tests. This patch skips + building tests that require the static libssh2 library, so the build now + succeeds. + + Also move the list of tests that require static lib from + `CMakeLists.txt` to `Makefile.inc`, so that we can reuse it in + `Makefile.mk`. + + Couldn't find a way to also reuse it in `Makefile.am`. Move the + `Makefile.am` specific definitions close to the shared list, to make it + easier to keep them synced. + + Cherry-picked from #1036 + +- ci: make one of the AppVeyor CMake jobs shared-only + + This build combination did not have a CI test before. + + Cherry-picked from #1036 + +- cmake: allow tests with `BUILD_STATIC_LIBS=OFF` + + Before this patch, the CMake build did not allow to disable static + libssh2 library while also building tests. + + This patch removes this constraint, and makes this combination possible. + In this case the 3 (at the moment) tests that require a static libssh2 + library, are skipped from the build and test runs. + + Cherry-picked from #1036 + +- build: fix to set `-DLIBSSH2DEBUG` for tests + + Required for tests using libssh2 internals. These are the ones + requiring the libssh2 _static_ lib. + + Before this patch, `src` and `tests` declared the `session` structure + differently, due to extra struct members added with the `LIBSSH2DEBUG` + macro set. But, the macro was only set for `src` when using CMake. At + runtime this caused struct members to be at different offsets between + lib and test code, resulting in the test failures below. + + Due to another bug in the affected test, these failures did not reflect + in the exit code, which always returned success, so this went unnoticed + for a good while. Fixed in: 84d31d0ca7b647ad4c2aa92bf8f4a94b233f5d3b + + ``` + Start 5: test_auth_keyboard_info_request + [...] + 5: Test case 1 passed + 5: Test case 2 passed + 5: Test case 3: expected return code to be 0 got -1 + 5: Test case 4: expected last error code to be "-6" got "-38" + 5: Test case 5: expected last error code to be "-6" got "-38" + 5: Test case 6: expected last error code to be "-6" got "-38" + 5: Test case 7: expected last error message to be "Unable to decode keyboard-interactive number of keyboard prompts" got "userauth keyboard data buffer too small to get l + 5: Test case 8: expected last error code to be "-41" got "-38" + 5: Test case 9: expected return code to be 0 got -1 + 5: Test case 10: expected return code to be 0 got -1 + 5: Test case 11: expected last error code to be "-6" got "-38" + 5: Test case 12: expected last error message to be "Unable to decode user auth keyboard prompt echo" got "userauth keyboard data buffer too small to get length" + 5: Test case 13: expected return code to be 0 got -1 + 5: Test case 14: expected return code to be 0 got -1 + 5: Test case 15: expected last error code to be "-6" got "-38" + 5: Test case 16: expected last error code to be "-6" got "-38" + 5: Test case 17: expected last error code to be "-6" got "-38" + 5: Test case 18: expected last error code to be "-6" got "-38" + ``` + Ref: https://ci.appveyor.com/project/libssh2org/libssh2/builds/46925869/job/i9uasceu3coss0i2#L440 + Ref: https://ci.appveyor.com/project/libssh2org/libssh2/builds/46983040/job/c3vag25c26a77lyr#L485 + + Cherry-picked from #1037 + Closes #1037 + +- test_auth_keyboard_info_request: fix to return failure + + Before this patch, this test returned success even when one of its tests + failed. Fix it by returning 1 in case any of the tests fails. + + This issue masked a CMake build bug with logging enabled. Subject to an + upcoming patch. + + Cherry-picked from #1037 + +- test_auth_keyboard_info_request: fix indentation + + Cherry-picked from #1037 + +- tidy-up: move comment off from copyright header + + Cherry-picked from #1037 + +- ci: enable shared libs in msys2/macOS cmake builds + + Shared libs improve example/tests build times. For "unity" + builds the overhead of building shared lib is negligible, so + this even reduced the overall build-time. + + Follow-up to 3d64a3f5100f7f4cf52202396eb4f1c3f3567771 + Follow-up to d93ccf4901ef26443707d341553994715414e207 + + Tests: + https://github.com/libssh2/libssh2/actions/runs/4906586658: unity builds enabled + https://github.com/libssh2/libssh2/actions/runs/4906925743: unity builds enabled + parallel msys2 builds + https://github.com/libssh2/libssh2/actions/runs/4906777629: unity + shared lib (this commit) + https://github.com/libssh2/libssh2/actions/runs/4906927190: unity + shared lib (this commit) + parallel msys2 builds + + Consider making shared libs enabled by default also in CMake, to sync it with autotools? + + Closes #1035 + +- ci: add missed --parallel 3 from msys2 cmake builds + + Follow-up to 3d64a3f5100f7f4cf52202396eb4f1c3f3567771 + +- cmake: add and test "unity" builds + + "Unity" (aka "jumbo", aka "amalgamation" builds concatenate source files + before compiling. It has these benefits for example: faster builds, + improved code optimization, cleaner code. Let's support and test this. + + - enable unity builds for some existing CI builds to test this build + scenario. + - tune `UNITY_BUILD_BATCH_SIZE` size. + - disable unity build for example and test programs (they use one source + each already). + + You can enable it by passing `-DCMAKE_UNITY_BUILD=ON` to cmake. + Supported by CMake 3.16 and newer. + + Ref: https://cmake.org/cmake/help/latest/prop_tgt/UNITY_BUILD.html + + Closes #1034 + +- tests: simplify passing `srcdir` to tests + + Before this patch libssh2 used a variety of solutions to pass the source + directory to tests: `FIXTURE_WORKDIR` build-time macro (cmake), + `FIXTURE_WORKDIR` envvar (unused), setting `srcdir` manually + (autotools), setting current directory (cmake), and also `builddir` + envvar (autotools) for passing current working dir to `mansyntax.sh`. + + This patch reduces this to using existing `srcdir` with autotools and + setting it ourselves in CMake. This was mostly enabled by this recent + patch: 4c9ed51f962f542b98789b15bedaaa427f4029a2 + + Details: + + - cmake: replace baked-in `FIXTURE_WORKDIR` macro with env. + + Added in 54bef4c5dad868a9d45fdbfca9729b191c0abab5 #198 (2018-03-21) + + - rename `FIXTURE_WORKDIR` to `srcdir`, to match autotools. + + - cmake: add missing `srcdir` for algo and sshd tests. + + - session_fixture: stop `chdir()`-ing, rely on prefixing with `srcdir`. + + Changing current directory should be unnecessary after + 4c9ed51f962f542b98789b15bedaaa427f4029a2 #801 (2023-02-24), + that prefixes referenced input filenames with the `srcdir` envvar. + + The `srcdir` envvar was already exported by autotools, and now we're + also setting it from CMake. + + - cmake: stop setting `WORKING_DIRECTORY`, rely on `srcdir` env. + + `WORKING_DIRECTORY` is no longer necessary, after passing `srcdir` to + all tests, so they can find our source tree and keys/etc in it + regardless of the current directory. + + Also this past commit hints that `WORKING_DIRECTORY` wasn't always + working for this purpose as expected: + "tests: Xcode doesn't obey CMake's test working directory" + Ref: https://github.com/libssh2/libssh2/pull/198/commits/10a5cbf945abcc60153ee3d59284d09fc64ea152 + + - autotools: delete explicit `srcdir` for test env. + + Added in 13f8addd1bc17e6c55d52491cc6304319ac38c6d (2015-07-02) + + automake documents `srcdir` as exported to the test environment: + https://github.com/autotools-mirror/automake/blob/c04c4e8856e3c933239959ce18e16599fcc04a8b/doc/automake.texi#L9302-L9304 + https://www.gnu.org/software/automake/manual/html_node/Scripts_002dbased-Testsuites.html + It's mentioned in the docs back in 1997 and got a regression test in + 2012. We can safely assume it to be available without setting it + ourselves. + + - autotools: delete explicit `builddir`. + + Added in 13f8addd1bc17e6c55d52491cc6304319ac38c6d (2015-07-02) + + It seems this wasn't necessary to make the above fix work, and + `mansyntax.sh` is able to figure out the build workdir by reading + `$PWD`. Our out-of-tree and `make distcheck` CI builds also work + without it. + + Let us know if there is a scenario we're missing and needs this. + + Closes #1032 + +- src: fix `libssh2_store_*()` for >u32 inputs + + `_libssh2_store_str()` and `_libssh2_store_bignum2_bytes()` accept + inputs of `size_t` max, store the size as 32-bit unsigned integer, then + store the complete input buffer. + + With inputs larger than `UINT_MAX` this means the stored size is smaller + than the data that follows it. + + This patch truncates the stored data to the stored size, and now returns + a boolean with false if the stored length differs from the requested + one. Also add `assert()`s for this condition. + + This is still not a correct fix, as we now dump consistent, but still + truncated data which is not what the caller wants. In future steps we'll + need to update all callers that might pass large data to this function + to check the return value and handle an error, or make sure to not call + this function with more than UINT_MAX bytes of data. + + Ref: c3bcdd88a44c4636818407aeb894fabc90bb0ecd (2010-04-17) + Ref: ed439a29bb0b4d1c3f681f87ccfcd3e5a66c3ba0 (2022-09-29) + + Closes #1025 + +- cmake: limit WinCNG to Windows + + After deleting the `bcrypt.h` check, no check remained. Restore + a `WIN32` check here to ensure WinCNG is not enabled outside Windows. + + Follow-up to 1289033598546ee5089ff0fc4369d24e1e2be81f + + Tested-in #1032 + +- cmake: move `CMAKE_VS_GLOBALS` setting to CI configs + + To not force this setting for local builds where they might serve + a good purpose. + + It makes our CI runs slightly faster and we don't need to track + file changes in unattended, single, CI runs. + + Cherry-picked from #1031 + +- cmake: prefill for faster config phase on Windows + + Prefill known detection results on Windows with MinGW and MSVC, to + avoid spending time on detecting these on every cmake configuration + run. + + With MinGW + clang and MSVC, this elminates all detections. + With MinGW + gcc, it reduces them to 3. + + Cherry-picked from #1031 + +- libssh2_setup.h: set `HAVE_INTTYPES_H` for MSVC + + To sync up the hand-crafted config with actual detection results + by CMake and autotools. Sources compiled fine without it anyway. + + Cherry-picked from #1031 + +- cmake: re-add `select()` detection (regression) + + `select()` detection suffered two regressions: First I accidentally + deleted it for non-Windows [1]. Then the Windows-specific setting got + missed from the generated `libssh2_config.h` after a rearrangement in + `CMakeLists.txt` files. + + [1] 31fb8860dbaae3e0b7d38f2a647ee527b4b2a95f (2023-03-07) + [2] 803f19f004eb6a5b525c48fff6f46a493d25775c (2023-04-18) + + This patch restores detection. For Windows, enable it unconditionally, + not only for speed reasons, but because detection needs `ws2_32`, and + even that is broken on the x86 platform. According to the original + `cmake/SocketLibraries.cmake`, caused by a calling convention mismatch. + FWIW autotools detects it correctly. + + Cherry-picked from #1031 + +- ci: merge make job into msys2 section, enable zlib + openssl + + Follow up to dd625766271a0ba13f5ac661bdc2fa40bbfa580a + + Cherry-picked from #1030 + +- ci: add missing timeouts for autotools tests + + Cherry-picked from #1030 + +- ci: add mingw-w64 clang and gcc CMake jobs + + Cherry-picked from #1030 + +- cmake: assume `bcrypt.h` with WinCNG + + autotools already didn't check for `bcrypt.h`, and such check is only + required for old/legacy mingw without obsolete/incomplete Windows + headers. + + curl deprecated old-mingw support just recently and will delete support + in September 2023. + + This patch saves some complexity and detection time by dropping this + check for CMake. Meaning that mingw-w64 is now required to compile + libssh2 when using the WinCNG backend for 32-bit builds. Other backends + and CPU platforms are not affected. + + Ref: https://github.com/curl/curl/commit/e4d5685cb5d6eb07e1b43156fd7e3ba3563afba5 + + Closes #1026 + +- cmake: do not check for `poll()` on Windows + + While it seems to exist on mingw in theory, it's not detected as of this + writing. It also has issues, and not ready for production use: + https://stackoverflow.com/questions/1671827/poll-c-function-on-windows + + On MSVC it's even less supported. + + Skip checking this to save CMake detection time. + + Closes #1027 + +- agent_win: make a struct static and other build improvements + + Also: + - merge back `agent.h` into `agent.c` where it was earlier. + Ref: c998f79384116e9f6633cb69c2731c60d3a442bb + - introduce `HAVE_WIN32_AGENT` internal macro. + - fix two guards to exclude more code unused in UWP builds. + + Follow-up to 1c1317cb768688eee0e5496c72683190aaf63b29 + + Closes #1028 + +- tidy-up: formatting nits + + Whitespace and redundant parenthesis in `return`s. + + Closes #1029 + +GitHub (3 May 2023) +- [Nick Woodruff brought this change] + + sftp: parse attribute extensions, if present, to avoid stream parsing errors (#1019) + + Prevents directory listing errors when attribute extensions are present + by advancing stream parsing past extensions. + +Viktor Szakats (3 May 2023) +- tests: merge `sshd_fixture.sh` into `test_sshd.test` + + Merge the loop executing multiple tests and the script that actually + launches the tests into a single script. This same script is now called + from both autotools and CMake. autotools loads the list of tests from + `Makefile.inc`, CMake passes it via the command-line. It's also possible + to call the script manually with a custom list of tests or individual + ones. + + With this setup we're now launching a single sshd session for all tests, + instead of launching and killing it for each test. This did not improve + reliability of these test on CI machines, and it's easy to go back to + the previous behaviour if necessary. + + Also: + + - allow passing custom sshd options via `SSHD_FLAGS`. + + - add `SSHD_TESTS_LIMIT_TO` to limit the number of tests to its value. + E.g. `SSHD_TESTS_LIMIT_TO=1` executes the first test only. Meant for + debugging. + + - use `ssh` to test the connection (if available) instead of fixed + amount of wait. Made to also work on Windows. + + - set `PermitRootLogin yes` in `sshd`, to allow running tests as root. + + - show `sshd` path and version. + + Cherry-picked from #1017 (the last one) + Closes #1024 + +- ci: make sure to run tests after all builds in GHA + + Whenever possible. Due to flakiness/hangs/timeouts, keep sshd + tests disabled on Windows and macOS. + + Also keep Docker tests disabled on these platforms, they do not work: + + GHA Windows: + ``` + no matching manifest for windows/amd64 in the manifest list entries + ``` + + GHA macOS: + ``` + sh: docker: command not found + ``` + + It's not possible to run UWP and ARM64 binaries: + UWP: + ``` + Test #2: test_simple ......................Exit code 0xc0000135 + ``` + Needs but doesn't find: `VCRUNTIME140_APP.dll`. + + ARM64 + ``` + D:/a/libssh2/libssh2/bld/tests/Release/test_ssh2.exe: cannot execute binary file: Exec format error + ``` + + Cherry-picked from #1017 + +- tests: disable sshd tests on Windows via new options + + Instead of using hacks inside the build systems. + + `SSHD` variable added to GitHub Actions is not currently used. + Added there to make it easy to experiment with these tests and + the path is non-trivial to discover. Using the Windows built-in + sshd server is another option (haven't discovered its path yet). + + Cherry-picked from #1017 + +- tests: add cmake/autotools options to disable running tests + + autotools: + - `--disable-docker-tests` + - `--disable-sshd-tests` + + cmake: + - `RUN_DOCKER_TESTS` + - `RUN_SSHD_TESTS` + + Update automake and ci to use this new flag and delete former logic + of relying on Windows detection and `HOST_WINDOWS`. Also fix honoring + this when running `test_read_algos.test`. + + This allows to disable these individually and on per-CI/local-job basis. + To run as much tests as the env allows. + + Cherry-picked from #1017 + +- ci: add `make distcheck` job + + Cherry-picked from #1017 + +- ci: switch to out-of-tree autotools builds + + Cherry-picked from #1017 + +- ci: restore parallel builds with cmake + + Also add missing -j3 for macOS builds. + + Partial revert of 0d08974633cfc02641e6593db8d569ddb3644255 + + Cherry-picked from #1017 + +- ci: sync names, steps, syntax, build dirname between jobs + + Also: + + - delete an unused 64-bit option for Linux (all jobs are 64-bit). + + - fix to not install libgcrypt and openssl when doing mbedTLS builds. + + [ Empty lines after multiline run commands are solely to unbreak + my editor's syntax highlighting. They can be deleted in the future ] + + Cherry-picked from #1017 + +- ci: add `Makefile.mk` test, with `LIBSSH2_NO_*` options + + Cherry-picked from #1017 + +- Makefile.mk: use Makefile.inc from example and tests + + Instead of assembling the list using `$(wildcard ...)`. + + Also split off a `tests/Makefile.inc` from `tests/Makefile.am`. With its + simpler syntax, this also allows to delete some complexity from the + CMake loader. + + Cherry-picked from #1017 + +- example, tests: fix ssh2 to correctly return failure + + Before this patch ssh2 and test_ssh2 returned success even if the session + failed at `libssh2_session_handshake()` or after. + + This patch depends on cda41f7cb87c3af5258ba48ccef19d3efdbd3d3b, that fixed + running test_ssh2 on Windows via sshd_fixture. + + Cherry-picked from #1017 + +- tests: set -e -u in shell scripts + + Cherry-picked from #1017 + +- cmake: use shared libs again in example and tests + + Re-sync with autotools and v1.10.0 behavior. + + This improves build times. It also allows to stop building our special + shared test target to test shared builds. + + Follow-up to 4e2580628dd1f8dc51ac65ac747ebcf0e93fa3d1 + + Cherry-picked from #1017 + Closes #1022 + +- tests: retry KEX failures when using the WinCNG backend + + Twice. This tests are flaky and we haven't figured out why. In the + meantime use this workaround to test and log these issues, but also + ensure that CI run aren't flagged red because of it. + + Also: + - kex: add debug message when hostkey `sig_verify` fails, + to help tracking WinCNG KEX failures. + - test_ssh2: also add retry logic. + I'm not quite sure this is correct. Please let me know. + - session_fixture: bump up `src_path` slots to fit retries and show + message when hitting the limit. + - session_fixture: clear `kbd_password` static variable after use. + - session_fixture: close and deinit socket after use. + - session_fixture: deinit libssh2 after use. + + Ref: #804 #846 #979 #1012 #1015 + + Cherry-picked from #1017 + Closes #1023 + +- example, test_ssh2: shutdown socket before close + + Syncing them with `tests/session_fixture.c`. + + Cherry-picked from #1017 + +- ci.yml: fix indentation [ci skip] + + Cherry-picked from #1017 + +- Makefile.mk: make tests depend on runner lib + + Cherry-picked from #1017 + +- build: compile agent_win.c via agent.c + + Silences these warnings on non-Windows: + ``` + ranlib: file: libssh2.a(agent_win.c.o) has no symbols + ``` + + Cherry-picked from #1017 + +- cmake: delete obsolete comment + + Follow-up to 80175921638fa0a345237d23206a2ad1644cdd9b + + Cherry-picked from #1017 + +- checksrc.sh: fix it to run from any current directory + + Also silence a shellcheck warning. + + Cherry-picked from #1017 + +- ISSUE_TEMPLATE: ask for crypto backend version + + Also fix casing in backend names. + + Cherry-picked from #1017 + +- tests: fix newlines in test keys for sshd on Windows + + Make sure these files get LF newlines on checkout. Before this patch + a checked out libssh2 Git repository may have used CRLF newlines in text + files, include test keys. Private keys with CRLF newlines could confuse + sshd on Windows: + + ``` + # sshd version: 'OpenSSH_9.2, OpenSSL 1.1.1t 7 Feb 2023' + Unable to load host key "/d/a/libssh2/libssh2/tests/openssh_server/ssh_host_ed25519_key": invalid format + Unable to load host key: /d/a/libssh2/libssh2/tests/openssh_server/ssh_host_ed25519_key + ``` + Ref: https://github.com/libssh2/libssh2/actions/runs/4846188677/jobs/8635575847#step:6:39 + + Cherry-picked from #1017 + +- cmake: move option descriptions next to definition + + Cherry-picked from #1017 + +- checksrc: sync with curl + + There were no new issues detected. + + Cherry-picked from #1017 + +- openssl: enable AES-GCM with wolfSSL + + Follow-up to 3c953c05d67eb1ebcfd3316f279f12c4b1d600b4 #797 + + There is pending issue with wolfSSL, where encryption/decryption is not + working (both with and without this patch). Ref: #1020 + + Cherry-picked from #1017 + +- appveyor: add a UWP OpenSSL 3 build + + Cherry-picked from #1017 + +- appveyor: skip `before_test` when not doing tests + + Also merge `before_test` section into `test_script`. + + Cherry-picked from #1017 + +- docs: delete two stray characters + + Cherry-picked from #1017 + +- tidy-up: avoid expression 'of course' + + Cherry-picked from #1017 + +- tidy-up: avoid word 'just' + + Cherry-picked from #1017 + +- tidy-up: avoid word 'simply' + + Cherry-picked from #1017 + +- tests: teach to use the `USERNAME` envvar on Windows + + Necessary to pick the correct local username when run on Windows. + + Cherry-picked from #1017 + +- test_ssh2: support `FIXTURE_TRACE_ALL*` envvars + + Cherry-picked from #1017 + +- tidy-up: add missing newline to error msg, formatting + + Also: + - fix indent + - lowercase variables names + - fix formatting in `src/global.c` + + Cherry-picked from #1017 + +- appveyor: wait more for SSH connection from GHA + + Cherry-picked from #1017 + +- ci: restrict permissions in GitHub Actions + + Cherry-picked from #1017 + +- build: fix autoreconf warnings + + - update `AC_HELP_STRING' to 'AS_HELP_STRING`: + ``` + configure.ac:[...]: warning: The macro `AC_HELP_STRING' is obsolete. + ``` + "AC_HELP_STRING is deprecated in 2.70+ and I believe AS_HELP_STRING works + already since 2.59 so bump the minimum required version to that." + + Ref: https://github.com/curl/curl/commit/a59f04611629f0db9ad8e768b9def73b9b4d9423 + + - simplify to avoid: + ``` + src/Makefile.inc:48: warning: variable 'EXTRA_DIST_SOURCES' is defined but no program or + src/Makefile.inc:48: library has 'DIST' as canonical name (possible typo) + ``` + Regression from 2c18b6fc8df060c770fa7e5da704c32cf40a5757 + + - `AC_TRY_LINK`/`AC_TRY_COMPILE`: + ``` + configure.ac:335: warning: The macro `AC_TRY_COMPILE' is obsolete. + configure.ac:335: warning: The macro `AC_TRY_LINK' is obsolete. + ``` + + - `libtool`-related ones: + ``` + configure.ac:70: warning: The macro `AC_LIBTOOL_WIN32_DLL' is obsolete. + configure.ac:70: warning: AC_LIBTOOL_WIN32_DLL: Remove this warning and the call to _LT_SET_OPTION when you + configure.ac:70: put the 'win32-dll' option into LT_INIT's first parameter. + configure.ac:71: warning: The macro `AC_PROG_LIBTOOL' is obsolete. + ``` + Using code copied from curl: + https://github.com/curl/curl/blob/9ce7eee07042605045dcfd02a6f5b38ad5c8a05d/m4/xc-lt-iface.m4#L157-L163 + + - delete commented and obsolete `AC_HEADER_STDC`. + + - formatting. + + Most cherry-picked from `autoupdate` updates. + + Cherry-picked from #1017 + Closes #1021 + +- docker-bridge.ps1: use native newlines + + Also add a shebang and exec flag to ease testing/handling on *nix. + PowerShell accepts both LF and CRLF. + + Cherry-picked from #1017 + +GitHub (1 May 2023) +- [Zenju brought this change] + + sftp: remove packet limit for directory reading (#791) + + Currently libssh2 cannot read huge directory listings when the package + size of `LIBSSH2_SFTP_PACKET_MAXLEN` (256KB) is hit. For example AWS + always sends a single package with all files of a directory, no matter + how big it is: https://freefilesync.org/forum/viewtopic.php?t=10020 + Package size is probably around 7MB in this case! + + `LIBSSH2_SFTP_PACKET_MAXLEN` is a good idea in general, but there + doesn't seem to be a one size fits all. While almost all(?) SFTP + responses come in very small packages, I believe the `SSH_FXP_READDIR` + request should be exempted. + + The proposed patch, enhances the package size reading to include parsing + the full SFTP packet header. And in case a package is of type + `SSH_FXP_NAME` and matches an expected `readdir_request_id`, it does not + fail if `LIBSSH2_SFTP_PACKET_MAXLEN` is hit. The chances of accidentally + hiding data-corruption are pretty non-existent, because both SFTP + `request_id` and packet type must match. No change in behavior + otherwise. + + Best, Zenju + + Previous discussion: #268 #269 + + With the above changes, the `LIBSSH2_SFTP_PACKET_MAXLEN` value could + (and should?) probably be set back to a small number again. + + Integration-patches-by: Viktor Szakats + +Viktor Szakats (28 Apr 2023) +- checksrc: update and apply fixes + + Update to latest revision and fix new issues detected. + + Closes #1014 + +- ci: add macOS CI jobs + fix issues revealed + + Add macOS CI jobs, both cmake and autotools for all supported crypto + backends (except BoringSSL), with debug, zlib enabled. Without running + tests. It also introduces OpenSSL 1.1 into the CI with a non-MSVC + compiler. + + Credits to curl's `macos.yml`, that I used as a base. + + Fix these issues uncovered by the new tests: + + - openssl: fix warning when built with wolfSSL, or OpenSSL 1.1 and + earlier. CI missed it because apparently the only OpenSSL 1.1 test + we had used MSVC, which did not complain. + + ``` + ../src/openssl.c:3852:19: error: variable 'sslError' set but not used [-Werror,-Wunused-but-set-variable] + unsigned long sslError; + ^ + ``` + + Regression from 097c8f0dae558643d43051947a1c35b65e1c5761 + + - pem: add hack to build without MD5 crypto-backend support. + + The Homebrew wolfSSL build comes with MD5 support disabled. We can + expect this becoming the norm. FIPS also requires MD5 disabled. + + We deleted the same hack from `hostkey.c` a month ago: + ad6aae302aaec84afbfacf0c1dfdc446d46eaf21 + + A better fix would be to guard the MD5 logic with our `LIBSSH2_MD5` + macro. + + ``` + pem.c:214:32: error: use of undeclared identifier 'MD5_DIGEST_LENGTH'; did you mean 'SHA_DIGEST_LENGTH'? + unsigned char secret[2*MD5_DIGEST_LENGTH]; + ^~~~~~~~~~~~~~~~~ + SHA_DIGEST_LENGTH + ``` + + Regression from 386e012292a96fcf0dc6861588397845df0aba2c + + - `configure.ac`: add crypto libs late. + + Fix it by adding crypto libs to `LIBS` at the end of the configuration + process. + + Otherwise `configure` links crypto libs while doing feature tests, + which can cause unwanted detections. For example LibreSSL publishes + the function `explicit_bzero()`, which masks the system alternative, + e.g. `memset_s()` on macOS. Then when trying to compile libssh2, its + declaration is missing: + + ``` + bcrypt_pbkdf.c:93:5: error: implicit declaration of function 'explicit_bzero' is invalid in C99 [-Werror,-Wimplicit-function-declaration] + _libssh2_explicit_zero(ciphertext, sizeof(ciphertext)); + ^ + ../src/misc.h:50:43: note: expanded from macro '_libssh2_explicit_zero' + ^ + ``` + + Regression from 4f0f4bff5a92dce6a6cd7a5600a8ee5660402c3f + + - cmake: fix to list our own include directory before the crypto libs', + when building tests. + + Otherwise a global crypto header path, such as `/usr/local/include`, + containing an external `libssh2.h` of a different version, could cause + weird errors: + + ``` + cc -DHAVE_CONFIG_H -DLIBSSH2_LIBGCRYPT \ + -I../src -I../../src -I/usr/local/include -I[...]/libssh2/include \ + -g -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX13.1.sdk \ + -mmacosx-version-min=12.6 -MD -MT \ + tests/CMakeFiles/test_aa_warmup.dir/test_aa_warmup.c.o \ + -MF CMakeFiles/test_aa_warmup.dir/test_aa_warmup.c.o.d \ + -o CMakeFiles/test_aa_warmup.dir/test_aa_warmup.c.o -c \ + [...]/libssh2/tests/test_aa_warmup.c + ``` + + ``` + [ 62%] Building C object tests/CMakeFiles/test_aa_warmup.dir/test_aa_warmup.c.o + In file included from /Users/runner/work/libssh2/libssh2/tests/test_aa_warmup.c:4: + In file included from /Users/runner/work/libssh2/libssh2/tests/runner.h:42: + In file included from /Users/runner/work/libssh2/libssh2/tests/session_fixture.h:43: + /Users/runner/work/libssh2/libssh2/tests/../src/libssh2_priv.h:649:5: error: type name requires a specifier or qualifier + LIBSSH2_AUTHAGENT_FUNC((*authagent)); + ^ + /Users/runner/work/libssh2/libssh2/tests/../src/libssh2_priv.h:649:30: error: type specifier missing, defaults to 'int' [-Werror,-Wimplicit-int] + LIBSSH2_AUTHAGENT_FUNC((*authagent)); + ^ + /Users/runner/work/libssh2/libssh2/tests/../src/libssh2_priv.h:650:5: error: type name requires a specifier or qualifier + LIBSSH2_ADD_IDENTITIES_FUNC((*addLocalIdentities)); + ^ + /Users/runner/work/libssh2/libssh2/tests/../src/libssh2_priv.h:650:35: error: type specifier missing, defaults to 'int' [-Werror,-Wimplicit-int] + LIBSSH2_ADD_IDENTITIES_FUNC((*addLocalIdentities)); + ^ + /Users/runner/work/libssh2/libssh2/tests/../src/libssh2_priv.h:651:5: error: type name requires a specifier or qualifier + LIBSSH2_AUTHAGENT_SIGN_FUNC((*agentSignCallback)); + ^ + /Users/runner/work/libssh2/libssh2/tests/../src/libssh2_priv.h:651:35: error: type specifier missing, defaults to 'int' [-Werror,-Wimplicit-int] + LIBSSH2_AUTHAGENT_SIGN_FUNC((*agentSignCallback)); + ^ + 6 errors generated. + ``` + + - `tests/session_fixture.h`: delete duplicate `libssh2.h`, + `libssh2_priv.h` already includes it. + + Follow-up to a683133dfe96de126194f58f183131a84c7d36a2 + + CI logs with these errors: + https://github.com/libssh2/libssh2/actions/runs/4824079094 + https://github.com/libssh2/libssh2/actions/runs/4824270819 + + curl's `macos.yml`: https://github.com/curl/curl/blob/da2470de96e94e1c8d276b9ae6e4c97c2cf54239/.github/workflows/macos.yml + + Tidying-up while here: + + - tests/session_fixture.h: delete duplicate `libssh2.h`. + `libssh2_priv.h` includes it already. + + Follow-up to a683133dfe96de126194f58f183131a84c7d36a2 + + - ci.yml: yamllint warnings and formatting. + + - ci.yml: msvc section formatting and step-naming sync with macOS. + + Follow-up to f4a4c05dc3bcd62ecaa1b0cac5997faefe16c83f + + - ci.yml: enable `--enable-werror` for msys2 jobs. + + Follow-up to 71cae949d577fdd632a271da0bec89f977dc5dd2 + + - appveyor.yml: show OpenSSL versions, link to image content. + + Closes #1013 + +- ci: convert `docker-bridge.bat` to shell script + + Convert `ci/appveyor/docker-bridge.bat` to a POSIX shell script. + + Also bump the tunnel to use ed25519 (was RSA-2048). + + Closes #997 + +- kex: use distinctive error strings + + Use unique error strings to help localize errors. + + Closes #1011 + +- tidy-up: C header use + + - drop unused or duplicate C headers. + - add missing ones (that worked by chance). + (`string.h`, `stdlib.h`) + - mention the functions that need certain headers. + - move some headers from crypto header to crypto C source. + - reorder headers in some places. + - simplify the #if tree for `sys/select.h` in `libssh2_priv.h`. + - move scp-specific macros next to their header to `scp.c` + Follow-up to 5db836b2a829c6fff1e8c7acaa4b21b246ae1757 + + Closes #999 + +- tidy-up: text nits, English contractions [ci skip] + + In input/output text and docs mostly. + +- ci: add MSVC and UWP builds to GitHub Actions + + - add MSVC jobs to GitHub Actions. They are similar to the 'Build-only' + jobs we have on AppVeyor CI, though only the ARM64 Windows one is + identical. Major disadvantage is that we don't run tests here. Major + advantage is they only take a few minutes to complete, compared to + an hour on AppVeyor, so WinCNG build results now appear quicker. + + Docker tests might be possible, but my light attempts failed. + Finding ZLIB also failed, so we still miss an MSVC test with it. + + Tool versions as of now: Server 2022, VS2022, OpenSSL 1.1.1 + + - add UWP builds for both ARM64 and x64. This hasn't been CI tested + before. + + (We could probably enable UWP on AppVeyor CI as well. + I haven't tried.) + + - fix two uncovered UWP issues in tests. + + - rename internal macro `LIBSSH2_WINDOWS_APP` to `LIBSSH2_WINDOWS_UWP`. + + Follow-up to 2addafb77b662e64248d156c71c69b91ba7b926e + + - fold long lines and quote truthy values in `.github/workflows/ci.yml`. + + Closes #1010 + +- session_fixture: avoid no-op `chdir(getcwd())` + + If no `FIXTURE_WORKDIR` macro or envvar is present to set the cwd, + avoid querying the cwd and then calling chdir with the result. + + Ref: 54bef4c5dad868a9d45fdbfca9729b191c0abab5 (patch) + Ref: 10a5cbf945abcc60153ee3d59284d09fc64ea152 (individual commit) + + Closes #1009 + +- tests/sshd_fixture.sh: convert back to POSIX + + There was no strong reason to require bash. Let's use POSIX shell + like before the recent overhaul. + + Follow-up to a459a25302a31f6e2aba3c4e15b1472b83b596fc + + Closes #1008 + +GitHub (26 Apr 2023) +- [Miguel de Icaza brought this change] + + If SFTP fails to initialize, do not busy loop waiting for IO to happen (#720) + + Currently SFTP's init will busy loop waiting for the channel to close, + even if the underlying transport returns EAGAIN. While this works for + sockets, it might not work out if you have a different transport that + needs to do some additional processing on the side. + + Integration-patches-by: Viktor Szakats + +Viktor Szakats (26 Apr 2023) +- docs: simplify `.TH` header & other cleanups [ci skip] + + - simplify `.TH` headers. + - delete empty lines before sections. + - update template with an `AVAILABILITY` section. + + Left libssh2 version number in the `.TH` header for entries without an + `AVAILABILITY` section, or where there was a different version number + there. + +- tidy-up: formatting nits [ci skip] + +- vms: fix to include `sys/socket.h` + + Due to a typo in the `HAVE_*` macro, this header was never included. + + A comment suggests that `socklen_t` is not defined on VMS and defines it + manually. This symbol is usually in `sys/socket.h`, so the typo may have + been the reason for it to be missing. + + Closes #1007 + +- build: fix `make distcheck` regressions + + - add #included C files to `EXTRA_DIST`. + + Regression from 4f0f4bff5a92dce6a6cd7a5600a8ee5660402c3f + + - fix `tests/sshd_fixture.sh` to not write into the test dir, by using + a pre-assembled `TrustedUserCAKeys` file. Update `Dockerfile` too to + use this. + + Regression from a459a25302a31f6e2aba3c4e15b1472b83b596fc + + Also update `tests/sshd_fixture.sh` to use + `openssh_server/authorized_keys` like `Dockerfile` does. And a few more + cosmetic updates. + + Closes #1006 + +- libssh2_priv.h: assume `HAVE_LONGLONG` + + Unless I'm missing something, it looks like `libssh2.h` has been using + `libssh2_int64_t` unconditionally since at least 2010-04-17 when + `libssh2_scp_send64()` landed via commit + be9ee7095e2d5021985f57d88f5f889d3c2b9d8f. + + This makes it redundant to detect `HAVE_LONGLONG` to fallback to a + 32-bit `scpRecv_size` in `libssh2_priv.h`. Then deal with possible + combinations of this flag and `strtoll()` options, which was + error-prone. + + Instead, assume in `libssh2_priv.h` that we have `libssh2_int64_t`, and + use it always. + + For MSVC, this means `_MSC_VER` `1310` (from year 2003) is now + required. Based on the above, this was already so before this patch. + + If there happens to be no 64-bit `strtoll()` detected, fall back to the + 32-bit `strtol()` (this should never happen with MSVC, and probably + neither with any other reasonably modern toolchain.) + + Also make sure to set `HAVE_STRTOI64` for older, non-CMake, MSVC builds + (e.g. `Makefile.mk` or `NMakefile` ones). + + Closes #1002 + +GitHub (26 Apr 2023) +- [Miguel de Icaza brought this change] + + fix a couple of small regressions (#1004) + + - openssl: fix potentially missing `ERR_*` constants by including + `openssl/err.h`. This could happen with recent version of Xcode + or when building against OpenSSL built with the `OPENSSL_NO_ENGINE` + option. + + Regression from 097c8f0dae558643d43051947a1c35b65e1c5761 (#789) + + - channel: fix an issue that would corrupt the data stream when + attempting to initialize the agent in non-blocking mode, as it is + necessary to propagate the `EAGAIN` signal upstream when the transport + returns `EAGAIN`. + + Regression from bc4e619e76071393e466c29220fc4ef5764c2820 (#752) + + - packet: the current code does not set the state machine upon reaching + this point which means that if the code is suspended due to the + transport returning an `EAGAIN`, this will re-initialize the structure + every time. + + The issue is that this keeps assigning a new channel-id downstream, + which does not match the initial channel-id that is initially + generated, causing a lookup later to fail as there is no matching + channel. + + Regression from bc4e619e76071393e466c29220fc4ef5764c2820 (#752) + +Viktor Szakats (26 Apr 2023) +- tidy-up: `gettimeofday()` fallback and use + + Simplify the way we handle `gettimeofday()` fallback for platforms + without native support or without any support. Make it similar to + how we handle `snprintf()`. + + In case of no native `gettimeofday()` support and a non-Windows + platform, our local fallback returns zero in `tv_usec` and `tv_sec`, + ending up with a zero `timeout_remaining` in `session.c`, same as + before this patch. + + Also: + - drop unused `sys/time.h` headers. + - fix our fallback code to compile with any Windows compilers + (not just MSVC) + - delete unnecessary casts. + + Closes #1001 + +- libssh2_priv.h: fix checksrc warning [ci skip] + + Regression from 9ef75298fae0728305d9d38ba1e3c838ad0513f7 + +- libssh2_priv.h: whitespace fixes cont. [ci skip] + +- libssh2_priv.h: whitespace fixes [ci skip] + +- cmake: use portable mkdir for tests/coverage target [ci skip] + + Makes `make coverage` work without a POSIX mkdir. + + Tested locally. + + Ref: https://cmake.org/cmake/help/latest/manual/cmake.1.html#cmdoption-cmake-E-arg-make_directory + +- kex: fix overlapping memcpy() to memmove() + + Noticed this when libasan started kicking out errors when sending in + MACs preferences that were not supported yet. + + Reported-by: fourierules on github + Fixes #611 + Closes #1000 + +- test/CMakeLists.txt: reuse `Makefile.am` librunner source list + + Follow-up to a459a25302a31f6e2aba3c4e15b1472b83b596fc + + Closes #998 + +GitHub (25 Apr 2023) +- [Zenju brought this change] + + openssl: fix misleading error message if wrong passphrase (#789) + + Fixes #608 + +Viktor Szakats (25 Apr 2023) +- tidy-up: tiny nits [ci skip] + +- tests: improve running tests + + TL;DR: Sync test builds between autotools and CMake. Sync sshd + configuration between Docker and non-Docker fixtures. Bump up + sshd_config for recent OpenSSH releases. + + This also opens up the path to have non-Docker tests that use a + local sshd process. Though sshd is practically unusable on Windows + CI machines out of the box, so this will need further efforts. + + Details: + + - cmake: run sshd fixture test just like autotool did already. + + - sync tests and their order between autotools and CMake. + + It makes `test_aa_warmup` the first test with both. + + - cmake: load test lists from `Makefile.am`. + + Needed to update the loader to throw away certain lines to keep the + converted output conform CMake syntax. Using regexp might be an + alternative way of doing this, but couldn't make it work. + + - cmake: use the official way to configure test environment variables. + Switch to syntax that's extendable. + + - cmake: allow to run the same test both under Docker and sshd fixture. + + Useful for testing the sshd fixture runner, or how the same test + behaves in each fixture. + + - update test fixture to read the username from `USER` envvar instead of + using the Dockfile-specific hardwired one, when running outside Docker. + + - rework `ssh2.sh` into `sshd_fixture.sh`, to: + + - allow running any tests (not just `test_ssh2`). + - configure Docker tests for running outside Docker. + - fixup `SSHD` path when running on Windows (e.g. in AppVeyor CI). + Fixes: `sshd re-exec requires execution with an absolute path` + - allow overriding `PUBKEY` and `PRIVKEY` envvars. + - allow overriding `ssh_config` via `SSHD_FIXTURE_CONFIG`. + + - prepare support for running multiple tests via sshd_fixture. + + Add a TAP runner for autotools and extend CMake logic. The TAP runner + loads the test list from `Makefile.am`. + + Notice however that on Windows, `sshd_fixture.sh` is very flaky with + GitHub Actions. And consistently broken for subsequent tests in + AppVeyor CI: + 'libssh2_session_handshake failed (-43): Failed getting banner' + + Another way to try is a single sshd instance serving all tests. + For CMake this would probably mean using an external script. + + - ed25519 test keys were identical for auth and host. Regenerate the + auth keypair to make them distinct. + + - sync the sshd environment between Docker and sshd_fixture. + + - use common via `openssh_server/sshd_config`. + - accept same auth keys. + - offer the same host keys. + - sync TrustedUserCAKeys. + - delete now unused keypairs: `etc/host*`, `etc/user*`. + - bump up startup delay for Windows (randomly, to 5 secs, from 3). + - delete `UsePrivilegeSeparation no` to avoid deprecation warnings. + `command-line line 0: Deprecated option UsePrivilegeSeparation` + - delete `Protocol 2` to avoid deprecation warnings. + It has been the default since OpenSSH 3.0 (2001-11-06). + - delete `StrictModes no` (CI tests work without it, Docker tests + never used it). + + - bump `Dockerfile` base image to `testing-slim` (from `bullseye-slim`). + + It needed `sshd_config` updates to keep things working with + OpenSSH 9.2 (compared to bullseye's 8.4). + + - replace `ChallengeResponseAuthentication` alias with + `KbdInteractiveAuthentication`. + The former is no longer present in default `sshd_config` since + OpenSSH 8.7 (2021-08-20). This broke the `Dockerfile` script. + The new name is documented since OpenSSH 4.9 (2008-03-31) + + - add `PubkeyAcceptedKeyTypes +ssh-rsa,ssh-dss,ssh-rsa-cert-v01@openssh.com` + and `HostKeyAlgorithms +ssh-rsa`. + + Original-patch-by: Eric van Gyzen (@vangyzen on github) + Fixes #691 + + There is a new name for `PubkeyAcceptedKeyTypes`: + `PubkeyAcceptedAlgorithms`. + It requires OpenSSH 8.5 (2021-03-03) and breaks some envs so we're + not using it just yet. + + - drop `rijndael-cbc@lysator.liu.se` tests and references from config. + + This is a draft alias for `aes256-cbc`. No need to test it twice. + Also this alias is no longer recognized by OpenSSH 8.5 (2021-03-03). + + - update `mansyntax.sh` and `sshd_fixture.sh` to not rely on `srcdir`. + + Hopefully this works with out-of-tree builds. + + - fix `test_read_algos.test` to honor CRLF EOLs in their inputs + (necessary when running on Windows.) + + - fix `test_read_algos.test` to honor `EXEEXT`. Might be useful when + running tests under cross-builds? + + - `test_ssh2.c`: + + - use libssh2 API to set blocking mode. This makes it support all + platforms. + - adapt socket open timeout logic from `openssh_fixture.c`. + Sadly this did not help fix flakiness on GHA Windows. + + - tests: delete unused C headers and variable initialization. + + - delete unused test files: `sshd_fixture.sh.in`, `sshdwrap`, + `etc/sshd_config`. + + Ref: cf80f2f4b5255cc85a04ee43b27a29c678c1edb1 + + - autotools: delete stray `.c` test sources from `EXTRA_DIST` in tests. + + - `tests/.gitignore`: drop two stray tests. + + - autotools: fix passing `SSHD` containing space (Windows needs this). + + - autotools: sort `EXTRA_DIST` in tests. + + - cmake: fix to add `test_ssh2` to `TEST_TARGETS`. + + - fix `authorized_key` order in `tests/gen_keys.sh`. + + - silence shellcheck warning in `ci/checksrc.sh`. + + - set `SSHD` for autotools on GitHub Actions Windows. [skipped] + + Auto-detection doesn't work (maybe because sshd is installed via + Git for Windows and we're using MSYS2's shell.) + + It enables running sshd fixture (non-Docker) tests in these jobs. + + I did not include this in the final patch due to flakiness: + ``` + Connection to 127.0.0.1:4711 attempt #0 failed: retrying... + Connection to 127.0.0.1:4711 attempt #1 failed: retrying... + Connection to 127.0.0.1:4711 attempt #2 failed: retrying... + Failure establishing SSH session: -43 + ``` + + Can be enabled with: + `export SSHD='C:/Program Files/Git/usr/bin/sshd.exe'` + + Closes #996 + +- ci: reduce algo test runtime on AppVeyor + + Make the block count customizable in `test_read` via environment + `FIXTURE_XFER_COUNT`. + + Set the custom count lower than the default when running on AppVeyor. + + The goal is to reduce CI roundtrip times. + + Closes #995 + +GitHub (22 Apr 2023) +- [Michael Buckley brought this change] + + Agent forwarding implementation (#752) + + This PR contains a series of patches that date back many years and I + believe were discussed on the mailing list, but never merged. We have + been using these in our local copy of libssh2 without issue since 2015, + if not earlier. I believe this is the full set of changes, as we tried + to use comments to mark where our copy of libssh2 differs from the + canonical version. + + This also contains changes I made earlier this year, but which were not + discussed on the mailing list, to support certificates and FIDO2 keys + with agent forwarding. + + Note that this is not a complete implementation of agent forwarding, as + that is outside the scope of libssh2. Clients still need to provide + their own implementation that parses ssh-agent methods after calling + libssh2_channel_read() and calls the appropriate callback messages in + libssh2. See the man page changes in this PR for more details. + + Integration-patches-by: Viktor Szakats + + * prefer size_t + * prefer unsigned int over u_int in public function + * add const + * docs, indent, checksrc, debug call, compiler warning fixes + +Viktor Szakats (21 Apr 2023) +- ci: add Windows Server 2016 into the test mix + + We had Windows Server 2012 R2 (8.1) and Windows Server 2019 (10) before + this patch. After, we also have Windows Server 2016 (10). + + The WinCNG flakey tests should have a better chance when running on the + newer OS. + + This update does not change the compiler mix. + + Also change the test fixture to not use the `--quiet` option with the + `docker pull` commant. This option requires docker v19.03, and + AppVeyor's Visual Studio 2017 image doesn't support it. Log output did + not change without `--quiet`, so it seems safe to delete it. In case + we'd need it, another solution is to retry without `--quiet` if the + command fails. docker's exit status is 125 in that case. + + Ref: https://github.com/libssh2/libssh2/issues/804#issuecomment-1515232799 + Ref: https://www.appveyor.com/docs/windows-images-software/ + + Closes #994 + +- build: add autotools test_read support and more + + Keep a single list for mac and crypt algos that we use in both CMake + and autotools. Use the same test names across build tools. + + Use the TAP protocol to track individual tests run from a single shell + script. + + Also: + + - enable the rest of our tests with autotools. + + - set `make check` verbose to see errors in case they happen. + + - silence stray 'command not found' error when running `mansyntax.sh` + on Windows. + + GitHub Actions Windows docker tests disabled due to: + ``` + Command: docker build --quiet -t libssh2/openssh_server ../tests/openssh_server + Error running command 'docker build --quiet -t libssh2/openssh_server ../tests/openssh_server' (exit 1): Sending build context to Docker daemon 22.02kB + Step 1/42 : FROM debian:bullseye-slim + bullseye-slim: Pulling from library/debian + no matching manifest for windows/amd64 10.0.20348 in the manifest list entries + Failed to build docker image + ``` + + Closes #993 + +- cmake: restore a dash char in comment [ci skip] + + It's a CMake comment header convention. + +GitHub (21 Apr 2023) +- [Dan Fandrich brought this change] + + tests: add AES-GCM protocol read tests (#992) + + Closes #992 + +- [Viktor Szakats brought this change] + + support encrypt-then-mac (etm) MACs (#987) + + Support for calculating MAC (message authentication code) on encrypted + data instead of plain text data. + + This adds support for the following MACs: + - `hmac-sha1-etm@openssh.com` + - `hmac-sha2-256-etm@openssh.com` + - `hmac-sha2-512-etm@openssh.com` + + Integration-patches-by: Viktor Szakats + + * rebase on master + * fix checksec warnings + * fix compiler warning + * fix indent/whitespace/eol + * rebase/manual merge onto AES-GCM patch #797 + * more manual merge of `libssh2_transport_send()` based + on dfandrich/shellfish + + Fixes #582 + Closes #655 + Closes #987 + +Viktor Szakats (20 Apr 2023) +- docs: fix typo in argument name [ci skip] + +- [Keith Dart brought this change] + + channel: add support for "signal" message + + Can send specific signals to remote process. Allows for slightly + improved remote process management, if the server supports it. + + Integration-patches-by: Viktor Szakats + + * doc updates + * change `signame_len` to `size_t` + * variable scopes + * fix checksrc warnings + + Closes #672 + Closes #991 + +- crypto: add `LIBSSH2_NO_AES_CBC` option + + Also rename internal `LIBSSH2_AES` to `LIBSSH2_AES_CBC`. + + Follow-up to 857e431648df6edcb3e17138d877f2e65d2d769d + + Closes #990 + +- tidy-up: indentation fixes [ci skip] + +GitHub (20 Apr 2023) +- [Dan Fandrich brought this change] + + Add support for AES-GCM crypto protocols (#797) + + Add support for aes256-gcm@openssh.com and aes128-gcm@openssh.com + ciphers, which are the OpenSSH implementations of AES-GCM cryptography. + It is similar to RFC5647 but has changes to the MAC protocol + negotiation. These are implemented for recent versions of OpenSSL only. + + The ciphers work differently than most previous ones in two big areas: + the cipher includes its own integrated MAC, and the packet length field + in the SSH frame is left unencrypted. The code changes necessary are + gated by flags in the LIBSSH2_CRYPT_METHOD configuration structure. + + These differences mean that both the first and last parts of a block + require special handling during encryption. The first part is where the + packet length field is, which must be kept out of the encryption path + but in the authenticated part (as AAD). The last part is where the + Authentication Tag is found, which is calculated and appended during + encryption or removed and validated on decryption. As encryption/ + decryption is performed on each packet in a loop, one block at a time, + flags indicating when the first and last blocks are being processed are + passed down to the encryption layers. + + The strict block-by-block encryption that occurs with other protocols is + inappropriate for AES-GCM, since the packet length shifts the first + encrypted byte 4 bytes into the block. Additionally, the final part of + the block must contain the AES-GCM's Authentication Tag, so it must be + presented to the lower encryption layer whole. These requirements mean + added code to consolidate blocks as they are passed down. + + When AES-GCM is negotiated as the cipher, its built-in MAC is + automatically used as the SSH MAC so further MAC negotiation is not + necessary. The SSH negotiation is skipped when _libssh2_mac_override() + indicates that such a cipher is in use. The virtual MAC configuration + block mac_method_hmac_aesgcm is then used as the MAC placeholder. + + This work was sponsored by Anders Borum. + + Integration-patches-by: Viktor Szakats + + * fix checksrc errors + * fix openssl.c warning + * fix transport.c warnings + * switch to `LIBSSH2_MIN/MAX()` from `MIN()`/`MAX()` + * fix indent + * fix libgcrypt unused warning + * fix mbedtls unused warning + * fix wincng unused warning + * fix old openssl unused variable warnings + * delete blank lines + * updates to help merging with the ETM patch + +Viktor Szakats (20 Apr 2023) +- tidy-up: align comments [ci skip] + +- tidy-up: whitespace nits [ci skip] + +- crypto: add/fix algo guards and extend `NO` options + + Add new guard `LIBSSH2_RSA_SHA1`. Add missing guards for `LIBSSH2_RSA`, + `LIBSSH2_DSA`. + + Fix warnings when all options are disabled. + + This is still not complete and it's possible to break a build with + certain crypto backends (e.g. mbedTLS) and/or combination of options. + It's not guaranteed that all bits everywhere get disabled by these + settings. Consider this a "best effort". + + Add these new options to disable certain crypto elements: + - `LIBSSH2_NO_3DES` + - `LIBSSH2_NO_AES_CTR` + - `LIBSSH2_NO_BLOWFISH` + - `LIBSSH2_NO_CAST` + - `LIBSSH2_NO_ECDSA` + - `LIBSSH2_NO_RC4` + - `LIBSSH2_NO_RSA_SHA1` + - `LIBSSH2_NO_RSA` + + The goal is to offer a way to disable legacy/obsolete/insecure ones. + + See also: 146a25a06dd2365a4330dad34fefcdcee1a206aa `LIBSSH2_NO_HMAC_RIPEMD` + See also: 38015f4e46d8dbeea522dc7ee664522d4f47fc75 `LIBSSH2_NO_DSA` + See also: be31457f3071686b555a0f0b19e5dcf63d67fc27 `LIBSSH2_NO_MD5` + + Closes #986 + +- scp: fix typo in comments [ci skip] + + Follow-up to 0a500b3554c29451708353279eefce750f4bca6c + +- base64: do not use `snprintf()` on encoding + + This also significantly (by 7-8x in my limited tests with a short + string) speeds up this function. The impact is still minor as this + function is only used in `knownhost.c` in release builds. + + Closes #985 + +- wincng: constify data arg of `libssh2_wincng_hash()` + + Tested in #979 + +- wincng: fix unused variables with `LIBSSH2_RSA_SHA2` disabled + + Tested in #979 + +- ci: delete config elements for unused 32-bit Linux builds + + They have been disabled since d9b4222ef1c5ab9b9e499fe6234556e5cca7c4fe + + Tested in #979 + +- ci: enable FIXTURE_TRACE_ALL_CONNECT for WinCNG tests + + To hopefully help finding the WinCNG hostkey verification + intermittent failure #804. + + Tested in #979 + +- tests: add `FIXTURE_TRACE_ALL_CONNECT` option + + Works like the `FIXTURE_TRACE_ALL` envvar, but enables full trace for + the connection phase only. + + Also fix a possible NULL deref with `FIXTURE_TRACE_ALL` and a failed + `libssh2_session_init_ex()`. + + Tested in #979 + +- ci: really enable logging in AppVeyor CMake builds + + `CONFIGURATION` was never passed to the cmake command, so it had + never enabled logging when set to `Debug`. + + Also `CONFIGURATION` is ambiguous depending on the "generator" used + by CMake. In case of Visual Studio, this is a build/ctest-time + setting, not a cmake-config parameter. + + So set this permanently to `Release` and enable logging via our + dedicated CMake option `ENABLE_DEBUG_LOGGING`. + + Tested in #979 + +- HACKING-CRYPTO: fix stray whitespace + +- tidy-up: fix more nits + + - fix indentation errors. + - reformat `cmake/FindmbedTLS.cmake` + - replace a macro with a variable in `example/sftp_RW_nonblock.c`. + - delete macOS macro `_DARWIN_USE_64_BIT_INODE` from the + OS/400 config header, `os400/libssh2_config.h`. + - fix other minor nits. + + Closes #983 + +- mansyntax: make it work on macOS, check reqs locally + + - use `gman` alias if present. This makes it work when the correct `man` + command is provided via `brew` on macOS. + + - move CMake attempts to detect tools necessary to run `mansyntax.sh` + into the script itself. + + - delete CMake TODO to move more test logic into CMake. This would make + it CMake-specific and require maintaining it separately for each build + tool. Just use our external script when a POSIX shell is available. + + Closes #982 + +- cmake: dedupe setting `-DHAVE_CONFIG_H` + + Move `libssh2_config.h` generation and setting `-DHAVE_CONFIG_H` to + the root `CMakeFile.txt`. + + Also move symbol hiding setup there. It needs to be done before + generating the config file for `LIBSSH2_API` value to be set in it. + + After this change the `HIDE_SYMBOLS` setting is accepted without an + annoying CMake warning when not actually building a shared libssh2 lib. + + Closes #981 + +- build: assume non-blocking I/O on Windows + + Drop checks from Windows builds and enable it based on `WIN32`. + + This saves detection time and also makes 3rd party builds simpler. + + Also: + + - delete `HAVE_DISABLED_NONBLOCKING`, that we used in build tools to + explicitly disable an explicit `#error` in `session.c`. + + - replace existing `WSAEWOULDBLOCK` check for Windows support with + `WIN32`. Cleaner with the same result. + + Follow-up to f1e80d8d8ce9570d81836da96ba02f4d4552a7b3 + Follow-up to 5644eea2161b17f7c16e18f3a10465ebb217ca1f + + Closes #980 + +- ci: rename Logging to Debug in AppVeyor + +- switch to internal base64 decode that uses size_t + + Make the public `libssh2_base64_decode()` a wrapper for that. + Bump up length sizes in callers. + + Also fix output size calculation to first divide then multiply. + + Closes #978 + +- tests: switch to debian:bullseye-slim in Dockerfile + + 'slim' provides all we need, with less bloat. + + Tested in #976 + + Follow-up to 78cb64a85955f2cd9700c4fbad3f02d589dd7169 + +- tests: build improvements and more + + - rename tests to have more succint names and a more useful natural + order. + + - rename `simple` and `ssh2` in tests to have the `test_` prefix. + + This avoids a name collisions with `ssh2` in examples. + + - cmake: drop the `example-` prefix for generated examples. + + Bringing their names in sync with other build tools, like autotools. + + - move common auth test code into the fixture and simplify tests by + using that. + + - move feature guards from CMake to preprocessor for auth tests. + + Now it works with all build tools and it's easier to keep it in sync + with the lib itself. + + For this we need to include `libssh2_priv.h` in tests, which in turn + needs tweaking on the trick we use to suppress extra MSVS warnings + when building tests and examples. + + - move mbedTLS blocklist for crypto tests from CMake to the test + fixture. + + - add ed25519 hostkey tests to `test_hostkey` and `test_hostkey_hash`. + + - add shell script to regenerate all test keys used for our tests. + + - alpha-sort tests. + + - rename `signed_*` keys to begin with `key` like the rest of the keys + do. + + - whitespace fixes. + + Closes #969 + +- autotools: rename a variable + + To match its counterpart we use for clang and to better match + the original code in curl. + + Follow-up to ec0feae7920d695ce234a5aba13014bf29824c09 + + Closes #977 + +- ssh2.sh: revert likely wrong quoting [ci skip] + + Follow-up to 50124428509ffc2f5d08d8d3c152fa36546c9a75 + +- build: add `-Wbad-function-cast` picky warning + + Also adjust minimum gcc versions in comment. + + Closes #975 + +- tests: restore debian:bullseye in Dockerfile + + Follow-up to 78cb64a85955f2cd9700c4fbad3f02d589dd7169 + +- session: simplify preprocessor logic + + - by using #elif + - by merging two blocks + + Closes #972 + +- tests: try debian:testing for Dockerfile + + Follow-up to 78cb64a85955f2cd9700c4fbad3f02d589dd7169 + +- src: add and use `LIBSSH2_MIN/MAX` macros + + Also for #797 + + Closes #974 + +- tests: switch Dockerfile to debian:testing-slim + + From debian:bullseye + + - doesn't need manual bumps. + - is ahead of stable and should be stable enough for our purpose. + - slim is saving resources. + + Closes #971 + +- cmake: optimize non-blocking tests on WIN32/non-WIN32 + + Skip testing unixy methods on Windows and vice versa. + + I continue to assume that CMake doesn't define `WIN32` with Cygwin + (as Cygwin doesn't define `_WIN32`/`WIN32` for C), though I haven't + tested this. + + Closes #970 + +GitHub (15 Apr 2023) +- [Jörgen Sigvardsson brought this change] + + scp: option to not quote paths (#803) + + A new flag named `LIBSSH2_FLAG_QUOTE_PATHS` has been added, to make + libssh2 not quote file paths sent to the remote's scp subsystem. Some + custom ssh daemons cannot handle quoted paths, and this makes this flag + useful. + + Authored-by: Jörgen Sigvardsson + +Viktor Szakats (15 Apr 2023) +- cmake: make Windows builds initialize faster + + By skipping unixy header checks that always fail with + the MSVC toolchain or all Windows toolchains. + + Closes #968 + +- cmake: use a single build rule for all tests + + - use the complete filename of test sources in the input list. + + - build all tests with the ability to access libssh2 internals. + + This is necessary for `test_keyboard_interactive_auth_info_request` + now and might be necessary for others in the future, e.g. to avoid + the depreacted public base64 decoding API. + + - move `test_keyboard_interactive_auth_info_request` into the main + test build loop. + + - move `simple` into the main test build loop too. + + - build `ssh2` also in static mode. + + - cleanup the way we detect and enable gcov. + + - fix indentation. + + Closes #967 + +- tidy-up: more whitespace in src + + Closes #966 + +- checksrc: fix `EQUALSNULL` warnings + + `s/([a-z0-9._>*-]+) == NULL/!\1/g` + + Closes #964 + +- Makefile.am: add new OS400 header [ci skip] + + Follow-up to 6dc42e9d625deb816a051d312d09e68926959e78 + +- checksrc: fix `NOTEQUALSZERO` warnings + + Closes #963 + +- checksrc: fix `SIZEOFNOPAREN` warnings + + `s/sizeof ([a-z0-9._>*-]+)/sizeof(\1)/g` + + Closes #962 + +- crypto: add `LIBSSH2_NO_HMAC_RIPEMD` option + + See also: 38015f4e46d8dbeea522dc7ee664522d4f47fc75 + See also: be31457f3071686b555a0f0b19e5dcf63d67fc27 + + Ref: https://github.com/stribika/stribika.github.io/issues/46 + + Closes #965 + +- tidy-up: example, tests continued + + - fix skip auth if `userauthlist` is NULL. + Closes #836 (Reported-by: @sudipm-mukherjee on github) + - fix most silenced `checksrc` warnings. + - sync examples/tests code between each other. + (output messages, error handling, declaration order, comments) + - stop including unnecessary headers. + - always deinitialize in case of error. + - drop some redundant variables. + - add error handling where missing. + - show more error codes. + - switch `perror()` to `fprintf()`. + - fix some `printf()`s to be `fprintf()`. + - formatting. + + Closes #960 + +- src: fix indentation of macro definitions (follow-up) + + Follow-up to d5438f4ba9036e8028f35258dd1ab97cc2edb37c + +- src: fix indentation of macro definitions + + And some comment cleanup. + + Closes #958 + +- example/ssh2_exec: drop conditional code for deprecated API + +GitHub (13 Apr 2023) +- [monnerat brought this change] + + Make OS/400 implementation work again (#953) + + * os400: support QADRT development files in a non-standard directory + + This enables the possibility to compile libssh2 even if the ascii + runtime development files are not installed system-wide. + + * userauth_kbd_packet: fix a pointer target type mismatch. + + A temporary variable matching the parameter type is used before copying + to the real target and checking for overflow (that should not occur!). + + * os400qc3: move and fix big number procedures + + A bug added by a previous code style cleaning is fixed. + _libssh2_random() now checks and return the success status. + + * os400qc3: fix cipher definition block lengths + + They were wrongly set to the key size. + + * Diffie-Hellman min/max modulus sizes are dependent of crypto-backend + + In particular, os400qc3 limits the maximum group size to 2048-bits. + Move definitions of these parameters to crypto backend header files. + + * kex: return an error if Diffie-Hellman key pair generation fails + + * os400: add an ascii assert.h header file + + * os400qc3: implement RSA SHA2 256/512 + +Viktor Szakats (13 Apr 2023) +- sftp: add open functions with custom attribute support + + Before this patch, libssh2 sent hardcoded `LIBSSH2_SFTP_ATTRIBUTES` + struct on handle open. This can be problematic on some special OS, + where the file size should be known on new file creation. I added + two new functions to resolve this issue. + + Patch-by: @vajdaakos on github via #506 + + Changes compared to #506: + - drop attr size fixup in favour of #946. + - move `memcpy()` under the state where we need it. + - bump filename length type to `size_t`. + - fix filenames in documentation and other nits. + + Closes #506 + Closes #947 + +- build: speed up and extend picky compiler options + + Implement picky warnings with clang in autotools. Extend picky gcc + warnings, sync them between build tools and compilers and greatly + speed up detection in CMake. + + - autotools: enable clang compiler warnings with `--enable-debug`. + + - autotools: enable more gcc compiler warnings with `--enable-debug`. + + - autotools/cmake: sync compiler warning options between gcc and clang. + + - sync compiler warning options between autotools and cmake. + + - cmake: reduce option-checks to speed up the detection phase. + Bring them down to 3 (from 35). Leaving some checks to keep the + CMake logic alive and for an easy way to add new options. + + clang 3.0 (2011-11-29) and gcc 2.95 (1999-07-31) now required. + + - autotools logic copied from curl, with these differences: + + - delete `-Wimplicit-fallthrough=4` due to a false positive. + + - reduce `-Wformat-truncation=2` to `1` due to a false positive. + + - simplify MinGW detection for `-Wno-pedantic-ms-format`. + + - cmake: show enabled picky compiler options (like autotools). + + - cmake: do compile `tests/simple.c` and `tests/ssh2.c`. + + - fix new compiler warnings. + + - `tests/CMakeLists.txt`: fix indentation. + + Original source of autotools logic: + - https://github.com/curl/curl/blob/a8fbdb461cecbfe1ac6ecc5d8f6cf181e1507da8/acinclude.m4 + - https://github.com/curl/curl/blob/a8fbdb461cecbfe1ac6ecc5d8f6cf181e1507da8/m4/curl-compilers.m4 + + Notice that the autotools implementation considers Apple clang as + legacy clang 3.7. CMake detection works more accurately, at the same + time more error-prone and difficult to update due to the sparsely + documented nature of Apple clang option evolution. + + Closes #952 + +- include: delete leading underscore from macro name + + It can cause compiler warnings in 3rd-party code. + + Follow-up to 59666e03f04927e5fe3e8d8772d40729f63c570e + + Closes #957 + +- ci: use OpenSSL 3 on AppVeyor VS2022 images + + Closes #954 + +- build: be friendly with 3rd-party build tools + + After recent build changes, 3rd party build that took the list of + C source to compile them as-is, stopped working as expected, due to + `blowfish.c` and crypto-backend C sources no longer expected to compile + separately but via `bcrypt_pbkdf.c` and `crypto.c`, respectively. + + This patch ensures that compiling these files directly result in an + empty object instead of redundant code and duplicated symbols. + + Also: + - add a compile-time error if none of the supported crypto backends + are enabled. + - fix `libssh2_crypto_engine()` for wolfSSL and os400qc3. + Rearrange code to avoid a hard-to-find copy of crypto-backend + selection guards. + + Follow-up to 4f0f4bff5a92dce6a6cd7a5600a8ee5660402c3f + Follow-up to ff3c774e03585252b70a9ee0fcf254de7b14a767 + + Closes #951 + +- sftp: calculate attr size based on attr content in `sftp_open()` + + Improve robustness by replacing constant argument of `sftp_attrsize()` + in `sftp_open()` with the actual `flag` value read from the `attr` we + plan to transfer. Restores state of this before + 37624b61e3ec4aa65a608800613d00b55ced56d7. + + Prerequisite for #947, #506. + + Also improve readability a bit and link to SFTP specs. Delete comment + about version 6: The latest spec no longer features the mentioned + "DO NOT IMPLEMENT" notice. + + Closes #946 + +- man: fixups + + - add missing `.fi` tags. + - fix misplaced `.nf` tags. + - add `.nf`/`.fi` tags `SYNOPSIS` where missing. + - fix missing/wrong function name from `SH NAME`. + - fix wrong function name in `TH`. + - keep return values in a separate line. + - indent. + - fold long lines. + - deleted `libssh2_channel_direct_streamlocal()`, there is no such function. + - add missing types. + - add missing headers. + + Closes #949 + +- include: indentation fixes + +- tidy-up: misc & minor cmake MSVS fix + + - `libssh2.rc`: document language/codepage codes. + + Ref: https://learn.microsoft.com/windows/win32/intl/code-page-identifiers + + - convert to Markdown: `docs/BINDINGS`, `docs/HACKING` + + Blind update for `vms/libssh2_make_help.dcl`. Please double-check. + + - cmake: fix to recognize dash-style warning options (`-Wn`) with MSVC. + + - `NMakefile`: sync `rd` command with `Makefile.mk`. + + - delete a CVS header. + + - cmake: simplify a `LIBSSH2_HAVE_ZLIB` macro. + + - few other nits and whitespace mods. + + Closes #943 + +GitHub (10 Apr 2023) +- [Viktor Szakats brought this change] + + Support for direct-streamlocal@openssh.com UNIX socket connection (#945) + + This patch allow to use direct-streamlocal service from OpenSSH 6.7, + that allows UNIX socket connections. + + Mods: + - delete unrelated condition: + Ref: https://github.com/libssh2/libssh2/pull/216#discussion_r374748111 + - rebase on master, whitespace updates. + + Patch-by: @gjalves Gustavo Junior Alves + + Closes #216 + Closes #632 + Closes #945 + +Viktor Szakats (10 Apr 2023) +- build: support `libssh2.rc` with autotools + + Caveat: When building `--enable-static` and `--enable-shared` at the + same time, the compiled Windows resource is also included in the + static library. This appears to be an autotools limitation, with no + way to have different input lists (or different custom options) for + shared and static libraries, even though it builds them separately. + + The workaround is to build static libraries in a separate + `./configure` + `make` pass. + + Closes #944 + +- crypto: add `LIBSSH2_NO_DSA` to disable DSA support + + See also: be31457f3071686b555a0f0b19e5dcf63d67fc27 + + Closes #942 + +- build: unify source lists + + - introduce `src/crypto.c` as an umbrella source that does nothing else + than include the selected crypto backend source. Moving this job from + the built-tool to the C preprocessor. + + - this allows dropping the various techniques to pick the correct crypto + backend sources in autotools, CMake and other build method. Including + the per-backend `Makefile..inc` makefiles. + + - copy a trick from curl and instead of maintaining duplicate source + lists for CMake, convert the GNU Makefile kept for autotools + automatically. Do this in `docs`, `examples` and `src`. + + Ref: https://github.com/curl/curl/blob/dfabe8bca218d2524af052bd551aa87e13b8a10b/CMakeLists.txt#L1399-L1413 + + Also fixes missing `libssh2_setup.h` from `src/CMakeFiles.txt` after + 59666e03f04927e5fe3e8d8772d40729f63c570e. + + - move `Makefile.inc` from root to `src`. + + - reformat `src/Makefile.inc` to list each source in separate lines, + re-align the continuation character and sort the lists alphabetically. + + - update `docs/HACKING-CRYPTO` accordingly. + + - autotools: update the way we add crypto-backends to `LIBS`. + + - delete old CSV headers, indent, and merge two lines in + `docs/Makefile.am` and `src/Makefile.am`. + + - add `libssh2.pc` to `.gitignore`, while there. + + Closes #941 + +GitHub (9 Apr 2023) +- [Zenju brought this change] + + sftp: always clear protocol error (#787) + +Viktor Szakats (9 Apr 2023) +- cmake: add `HIDE_SYMBOLS` option & do symbol hiding on *nix + + - implement symbol hiding on non-Windows platforms. + + The essence of the detection logic was copied from: + https://github.com/curl/curl/blob/dfabe8bca218d2524af052bd551aa87e13b8a10b/CMake/CurlSymbolHiding.cmake + + Then simplified and shortened. This method doesn't require a recent + CMake version, nor an external, auto-generated C header. + + Move `configure_file()` after `set(LIBSSH2_API ...)`, for the config + file to pick up `LIBSSH2_API`s value. + + Closes #602 + + - add CMake option `HIDE_SYMBOLS`. + + This setting means to hide non-public functions from the libssh2 + dynamic library when set to `ON`. The default. + + When set to `OFF`, make all non-static/internal functions visible + in the dynamic library. + + This setting requires `BUILD_SHARED_LIBS=ON`. + + - honor this setting on Windows. + + By setting the `LIBSSH2_EXPORTS` manual macro again, and stop + recognizing the automatic CMake macro for this purpose: + `libssh2_shared_EXPORT`. + + Closes #939 + +- build: make `windows.h` even leaner + + Disable GDI and NLS features in `windows.h`. libssh2 doesn't use these. + + Closes #940 + +- blowfish: build improvements + + - include `blowfish.c` into `bcrypt_pbkdf.c`, instead of + compiling it as a distinct object. + + - make low-level blowfish functions static. This prevents this symbols + to pollute the public namespace of libssh2. It also allows the + compiler to inline these functions. + + - integrate `blf.h` header into `bcrypt_pbkdf.c` as well. + + - use `_DEBUG_BLOWFISH` instead of `#if 0`. + + - fix `_DEBUG_BLOWFISH` compiler warnings and other nits. + + - `#undef` `inline` before redefining it in `libssh2_priv.h`. + (copied from `blowfish.c`) + + - delete unused `inline` redefinitions from `blowfish.c`. + + - disable unused low-level blowfish functions. + + - formatting, header order. + + Closes #938 + +- libssh2.rc: fix debug flag, other cleanups + + - fix to use `LIBSSH2DEBUG` macro to set the debug flag. + (was `DEBUGBUILD`, a curl-specific macro) + + - use manifest constants instead of literals + + - change language to neutral + + Closes #937 + +- tidy-up: example, tests + + - drop unnecessary `WIN32`-specific branches. + + - add `static`. + + - sync header inclusion order. + + - sync some common code between examples/tests. + + - fix formatting/indentation. + + - fix some `checksrc` errors not caught by `checksrc`. + + Closes #936 + +- tests/mansyntax.sh: avoid `if !` for portability + + Ref: https://www.gnu.org/software/autoconf/manual/autoconf-2.69/html_node/Limitations-of-Builtins.html#Limitations-of-Builtins + + Fixes #704 + Closes #935 + +- tidy-up: indentation in guarded #includes [ci skip] + +- Makefile.mk: drop `PROOT` variable [ci skip] + +- build: hand-crafted config rework & header tidy-up + + - introduce the concept of a project level setup header + `src/libssh2_setup.h`, that is used by `src`, `example` and `tests` + alike. Move there all common platform/compiler configuration from + `src/libssh2_priv.h`, individual sources and `CMakeFiles.txt` files. + Also move there our hand-crafted (= not auto-generated by CMake or + autotools) configuration `win32/libssh2-config.h`. + + - `win32` directory is empty now, delete it. + + - `Makefile.mk`: adapt to the above. Build-directory is the target + triplet, or any custom name set via `BLD_DIR`. + + - sync header path order between build systems: + build/src -> source/src -> source/include + + - delete redundant references to `windows.h`, `winsock2.h`, + `ws2tcpip.h`. + + - delete unnecessary #includes, update order (`libssh2_setup.h` first, + `winsock2.h` first), simplify where possible. + + This makes the code warning-free without `WIN32_LEAN_AND_MEAN`. + At the same time this patch applies this macro globally, to avoid + header bloat. + + - example: add missing *nix header guards. + + - example: fix misindented `HAVE_UNISTD_H` `#ifdef`s. + + - set `WIN32` with all build-tools. + + - set `HAVE_SYS_PARAM_H` in the hand-crafted config for MinGW. + To match auto-detection. + + - move a source-specific macro to `misc.c` from `libssh2_priv.h`. + + See the PR's individual commits for step-by-step updates. + + Closes #932 + +- Makefile.mk: build tests and other improvements [ci skip] + + - use `example` target for building examples (was: `test`). + + - add support for building tests via the `test` target. + + - accept lib-only options in a new `LIBSSH2_CPPFLAGS_LIB` variable. + + Useful to pass `-DLIBSSH2_EXPORTS` for correct `dllexport` in + `libssh2.dll`. + + - fix to put dynamic library in lib directory for non-Windows builds + + - fix to not delete lib objects on `testclean` + +- test_warmup: re-implement as `test()` + + Instead of overriding `main()`. To align with the other tests. + + Overriding `main()` can cause duplicate symbols without using a lib for + the `runner` code. + + Follow-up to 40ac6b230a309d35c57aa65a8f6d7ab6654aa3d8 + + Closes #934 + +- NMakefile: drop `/DEBUG` linker option in release mode [ci skip] + +- NMakefile: simplify [ci skip] + +- Makefile.mk: merge two rules [ci skip] + +- TODO: update item about compiler warnings [ci skip] + + Follow-up to 08354e0abbe86d4cc5088d210d53531be6d8981a + Follow-up to 29347905721d2e7fbb97dabfb0071bee51db3013 + Follow-up to 5a96f494ee0b00282afb2db2e091246fc5e1774a + Follow-up to 463449fb9ee7dbe5fbe71a28494579a9a6890d6d + Follow-up to 02f2700a61157ce5a264319bdb80754c92a40a24 + +GitHub (5 Apr 2023) +- [ihsinme brought this change] + + example/x11: Add null-termination (#749) + +Viktor Szakats (5 Apr 2023) +- crypto: fix `LIBSSH2_NO_MD5` compiler warnings + + Follow-up to be31457f3071686b555a0f0b19e5dcf63d67fc27 + + Closes #933 + +- build: add new man pages + + Follow-up to c20c81ab105cdf27f5a4e2604bd13085f46e21de + +GitHub (5 Apr 2023) +- [Daniel Silverstone brought this change] + + Configurable session read timeout (#892) + + This set of changes provides a mechanism to runtime-configure the + previously #define'd timeout for reading packets from a session. The + intention here is to also extend libcurl to be able to use this + interface so that when fetching from sftp servers which are very slow + to return directory listings, connections do not time-out so much. + + * Add new field to session to hold configurable read timeout + + * Updated `_libssh2_packet_require()`, `_libssh2_packet_requirev()`, + and `sftp_packet_requirev()` to use new field in session structure + + * Updated docs for API functions to set/get read timeout field in + session structure + + * Updated `libssh2.h` to declare the get/set read timeout functions + + Co-authored-by: Jon Axtell + Credit: Daniel Silverstone + +Viktor Szakats (4 Apr 2023) +- cmake: whitespace fixes [ci skip] + +- libssh2.h: bump LIBSSH2_COPYRIGHT year [ci skip] + +- Makefile.mk: move portable GNU Make file to the root + + Move the GNU Make file formerly known as `win32/GNUmakefile` to the + root directory from `win32`. It now supports any platform with a + GCC-like toolchain, while also keeping support for win32. + + For non-Windows platforms it's necessary to provide a hand-crafted + `libssh2_config.h` header for now. + + Usage: `make -f Makefile.mk` + +- src: include `limits.h` for `*_MAX` macros + + Follow-up to 5a96f494ee0b00282afb2db2e091246fc5e1774a + + Reported-by: OldWorldOrdr on github + Fixes #928 + Closes #930 + +- build: MSVS warning suppression option tidy-up + + - in `win32/libssh2_config.h` replace `_CRT_SECURE_NO_DEPRECATE` with + `_CRT_SECURE_NO_WARNINGS`, to use the official macro for this, like + in CMake. + + Also, it's now safe to move it back under `_MSC_VER`. + + Suppressing: + + `warning C4996: 'fopen': This function or variable may be unsafe. Consider using fopen_s instead.` + `warning C4996: 'getenv': This function or variable may be unsafe. Consider using _dupenv_s instead.` + + - move `_CRT_NONSTDC_NO_DEPRECATE` to `example` and `tests`. + Not needed for `src`. + + Suppressing: + + `warning C4996: 'strdup': The POSIX name for this item is deprecated. Instead, use the ISO C and C++ conformant name: _strdup.` + `warning C4996: 'write': The POSIX name for this item is deprecated. Instead, use the ISO C and C++ conformant name: _write.` + + - move `_WINSOCK_DEPRECATED_NO_WARNINGS` from source files to + CMake files, in `example` and `tests`. Also limit this to MSVC. + + Suppressing: + + `warning C4996: 'inet_addr': Use inet_pton() or InetPton() instead` + + TODO: try fixing these instead of suppressing. + + Closes #929 + +- win32/GNUmakefile: make it movable [ci skip] + + - add `BLD_DIR` to customize the output directory (where libs, .zip, + obj subdir will go). This directory must exist. + + It remains `./win32` for Windows builds. + + - add `CONFIG_H_DIR` option to customize `libssh2_config.h` location. + + It remains `./win32` for Windows builds. + + - include `.def` in distro zip for Windows. + + - ready to move to the root directory. + +- win32/GNUmakefile: drop an unnecessary variable [ci skip] + +- windows: re-add `libssh2.rc` + + Lost while moving it from the win32 directory + + Follow-up to 194cfc0f84192809c87f846140e5bf06b7a864af + +- crypto: add `LIBSSH2_NO_MD5` to disable MD5 support + + Closes #927 + +- hostkey: fix `hash_len` field constants + + Replace incorrect `MD5_DIGEST_LENGTH` with `SHA_DIGEST_LENGTH` for these + hostkey algos: + + - `ssh-rsa` and `ssh-dss` + + Ref: 7a5ffc8cee259bbde82ab92515cd8fea2166854b (2004-12-07 Initial) + + - `ssh-rsa-cert-v01@openssh.com` + + Ref: 4b21e49d9d2db74579b18804ed1f5eeb16578b2f (2022-07-28) + Ref: #710 + + Also delete local fall-back definition of `MD5_DIGEST_LENGTH` (added + in 9af7eb48dc3854ce8ee0589f7e2beb944e064847). Macro is no longer used. + + Reported-by: Markus-Schmidt on github + Fixes #919 + Closes #926 + +- ci: add MSVS 2008/2010 build tests and fix warnings + + Also: + + - fix newly surfaced (bogus) warnings in examples with MSVS 2010: + + ``` + ..\..\example\direct_tcpip.c(262): warning C4127: conditional expression is constant + ``` + Happens for every `FD_SET()` macro reference. + + Ref: https://ci.appveyor.com/project/libssh2org/libssh2/builds/46677835/job/ni4hs97bh18c14ap + + - silence MSVS 2010 predefined Windows macro warnings: + + ``` + ..\..\src\wincng.c(867): warning C4306: 'type cast' : conversion from 'int' to 'LPCSTR' of greater size + ..\..\src\wincng.c(897): warning C4306: 'type cast' : conversion from 'int' to 'LPCSTR' of greater size + ..\..\src\wincng.c(1132): warning C4306: 'type cast' : conversion from 'int' to 'LPCSTR' of greater size + ``` + + Ref: https://ci.appveyor.com/project/libssh2org/libssh2/builds/46678071/job/08t5ktvkcgdghp7r + + Closes #925 + +- transport: rename local `RANDOM_PADDING` macro + + Rename `RANDOM_PADDING` macro used internally to enable some code. + + Committed in the initial version of `transport.c` in + 9d55db6501aa4e21f0858cf36cdc2ddc11b96e83 (2007-02-02). libssh2 code + never defined it. + + The name happens to collide with a Windows macro in `wincrypt.h`. + `transport.c` doesn't include this header, but it includes `winsock2.h`, + and it turns out it can also define this macro in some cases, e.g. + when `WIN32_LEAN_AND_MEAN` is not set. + + To be on the safe side, prefix the name with `LIBSSH2_` to avoid + enabling it by accident. + + Q: Maybe it'd be best to delete it with the guarded code? + + Reported-by: Markus-Schmidt on github + Fixes #921 + Closes #924 + +- windows: move `libssh2.rc` to the `src` directory + + Closes #918 + +- autotools: delete unused conditional `HAVE_SYS_UN_H` + + No longer necessary after moving the disabling/enabling logic from + build tool to `example/x11.c`. + + Reverts 4774d500e724bc4e548f743a0cb644ab05599474 + Follow-up to d245c66cc0029e480674394c23e8be1c9410f7ad + +- win32/GNUmakefile: update help & exit without crypto backend [ci skip] + + Follow-up to: 5bcd25c4c980e9765c00a2f20ac5348635063aad + Follow-up to: 68fd02fba002c8c6af3ba51a2780de46b47b3787 + +- build: respect autotools `DLL_EXPORT` in `libssh2.h` + + The `DLL_EXPORT` macro is automatically set by autotools when building + the libssh2 DLL. Certain toolchains might require this to correctly + export symbols, so make sure to respect it in `libssh2.h` to enable + `declspec(dllexport)`. + + With this patch we have a manual macro for that (`LIBSSH2_EXPORT`), + this autotools one, the CMake one, and `_WINDLL` (added in + c355d31ff94a1622526c4988b9d09074f7f7605d), possibly defined by Visual + Studio. + + Closes #917 + +- build: make `HAVE_LIBCRYPT32` local to `wincng.c` + + libssh2 uses `wincrypt.h` aka the `crypt32` Windows system library + for the function `CryptDecodeObjectEx()` [1]. This function has been + available for Win32 (and UWP/WinRT apps) for a long while. Even old + MinGW supports it, and also Watcom 1.9, of the rare/old compilers + I checked. + + CMake had it permanently enabled, while it also did an extra check + for the header to add the lib to the lib list. Autotools did the + detection proper. Other builds had it permanently enabled. + + It seems safe to assume this function/header/lib is available in all + environments we support. + + In this patch we simplify by deleting these detections and feature + flags from all build tools. + + Keep the feature flag internal to `wincng.h`, and for extra safety add + the new macro `LIBSSH2_WINCNG_DISABLE_WINCRYPT` do disable it via + custom `CPPFLAGS`. + + WinCNG's other requirement is `bcrypt`. That also has been universally + available for a long time. Here the only known outlier is old/legacy + MinGW, which is missing support. + + [1] https://learn.microsoft.com/en-us/windows/win32/api/wincrypt/nf-wincrypt-cryptdecodeobjectex + + Closes #916 + +- autotools: delete `src/libssh2.pc.in` reference [ci skip] + + Follow-up to 06f281921907fa077884c7020917661ca805b9d3 + +- tidy-up: null-mac/cipher documentation + + Move documentation for these deleted build-level options from + autotools/cmake docs to the source code itself. + + Follow-up to 50c9bf868e833258d23c5f55ed546d1fcd5687d0 + + Closes #915 + +- cmake: re-use existing `libssh2.pc` template + + Instead of maintaining a second copy of `libssh2.pc.in` in `src` just + for CMake, teach CMake to use the existing template in the root dir, + that we already use with autotools. + + Closes #914 + +- delete redundant `HAVE_STDLIB_H` + + libssh2 used this standard C89 header unconditionally before this patch. + + Delete the feature checks and all unnecessary header guards. + + Closes #913 + +- NMakefile: drop redundant variable and assignments [ci skip] + +- delete redundant `HAVE_WINSOCK2_H` + + `libssh2.h` required `winsock2.h` for `_WIN32` since + 81d53de4dc5ee39bd6215958c7dce3b12731195e (2011-06-04). + + Apply that to the whole codebase. This makes it unnecessary to detect + `HAVE_WINSOCK2_H` and allows to drop all its uses. + + Completes TODO from b66d7317ca6c882afbe52fe426f68c119c40d348 + + TODO: Straighten out the use a mixture of `HAVE_WINDOWS_H`, + `WIN32`, `_WIN32` to detect Windows. + +- cmake: detect WinCNG last + + This gives a chance to auto-detect mbedTLS on Windows with CMake. + +- NMakefile: rename config variables, default to WinCNG [ci skip] + + - replace `OPENSSLINC` and `OPENSSLLIB` with `OPENSSL_PATH`. + Assume `include` and `lib` subdirs for headers and libs. + + - replace `WITH_ZLIB`, `ZLIBINC` and `ZLIBLIB` with `ZLIB_PATH`. + Assume `include` and `lib` subdirs for header and lib. + + - make WinCNG the default if `WITH_OPENSSL` is not set. + +- win32/GNUmakefile: rename object dir and update .gitignore [ci skip] + + From `-{release|debug}` to `{release|debug}-`. + + Follow-up to 68fd02fba002c8c6af3ba51a2780de46b47b3787 + +- win32/GNUmakefile: add libgcrypt support [ci skip] + + In the previous commit 969487113aae856e43d3d905c3f2260246d44f9b, + the commit message should read `win32/GNUmakefile: ` instead of + `libssh2-gnumake.sh: `. Sorry for the mixup. + +- libssh2-gnumake.sh: make variable names platform-agnostic [ci skip] + + Also more consistent. Refer to DLL/SO/shared as 'dyn'. + + Also add comment on how to find customizable environment variables. + +- win32/GNUmakefile: make it support non-Windows builds [ci skip] + + With 20-ish extra lines, make this Makefile support all GCC-like + toolchains. + + The temporary directory becomes `-{release|debug}` from + the former `{release|debug}`. + + Also change the lib directory name in the `dist` package from + `win32` to `lib`, to match other packages and build tools. + +- win32/GNUmakefile: default to WinCNG [ci skip] + + Also check for wolfSSL before mbedTLS to match CMake. + +- win32/GNUmakefile: fixups to previous commit [ci skip] + + - `-lws2_32` is necessary when building examples. + + - drop a temporary variable. + + Follow-up to d245c66cc0029e480674394c23e8be1c9410f7ad + +- delete redundant `HAVE_WS2TCPIP_H` + + It was used once in `src/libssh2_priv.h`, but without any effect. + The header included `ws2tcpip.h` twice, once guarded by + `HAVE_WS2TCPIP_H` and another time by `HAVE_WINSOCK2_H`. + + Dedupe these to not use `HAVE_WS2TCPIP_H`. Then delete detection + of this feature from all build methods. + + TODO: Replace `HAVE_WINSOCK2_H` with `_WIN32`/`WIN32`. + +- win32/libssh2_config.h: set `HAVE_LONGLONG` & `HAVE_STDLIB_H` [ci skip] + + - enable `HAVE_LONGLONG` for MinGW and MSVC versions supporting it. + + Necessary for `GNUmakefile`/`NMakefile` builds to create the same + binaries as CMake/autotools ones do. + + - enable `HAVE_STDLIB_H`. It has been universally available on + Windows for a long time. + + Fixes these clang-cl warnings: + ``` + src\wincng.c(444,5) : warning: implicit declaration of function 'free' is invalid in C99 [-Wimplicit-function-declaration] + free(buf); + ^ + src\wincng.c(491,20) : warning: implicitly declaring library function 'malloc' with type 'void *(unsigned long long)' [-Wimplicit-function-declaration] + pbHashObject = malloc(dwHashObject); + ^ + src\wincng.c(491,20) : note: include the header or explicitly provide a declaration for 'malloc' + src\wincng.c(2106,14) : warning: implicitly declaring library function 'realloc' with type 'void *(void *, unsigned long long)' [-Wimplicit-function-declaration] + bignum = realloc(bn->bignum, length); + ^ + src\wincng.c(2106,14) : note: include the header or explicitly provide a declaration for 'realloc' + 3 warnings generated. + ``` + +- example: make `x11` exclusion build-tool-agnostic + + Whether to build the `x11` example or not was decided by each build + tool. CMake didn't build it even on supported platforms. GNUMakefile + used a specific blocklist for it, while autotools enabled it based on + feature-detection. + + Migrate the enabler logic to an #ifdef in source and build `x11` + unconditionally with all build tools. + + On unsupported platforms (=Windows) this program now displays a short + message stating that fact. + + Also: + + - fix `x11.c` warnings uncovered after CMake started building it. + + - use `libssh2_socket_t` type for portability in `x11.c` too. + + - use detected header guards in `x11.c`. + + - delete a duplicate reference to `-lws2_32` from `win32/GNUmakefile` + while there. + + Closes #909 + +- .gitignore updates [ci skip] + +- tidy-up: whitespace, sorting, comment and naming fixups + +- cmake: add missing man pages + +- cmake: dedupe and merge config detection + + Before this patch CMake did feature detections in three files: + `src/CMakefiles.txt`, `examples/CMakefiles.txt` and + `tests/CMakefiles.txt`. + + Merge and move them to the root `CMakefiles.txt`. + + After this patch we end up with a single `src/libssh2_config.h`. This + brings CMake in sync with autotools builds, which already worked with + a single config header. + + This also prevents mistakes where feature detection went out of sync + between `src` & `tests` (see ae90a35d15d97154ac0c8554bce99ebfb18ee825). + `tests` do compile sources from `src` directly, so these should always + be in sync. + + It also allows to better integrate hand-crafted, platform-specific + config headers into the builds, like the one currently residing in + the `win32` directory (and also in `vms` and `os400`). Subject to an + upcoming PR. + + Also fix a warning revealed after this patch made CMake correctly + enable `HAVE_GETTIMEOFDAY` for `example` programs. + + Closes #906 + +- cmake: dedupe crypto-backend detection + + Before this patch CMake did crypto-backend detection in both + `src/CMakefiles.txt` and `tests/CMakefiles.txt`. + + Merge them and move it to the root `CMakefiles.txt`. + + While here, also add zlib for OpenSSL. Necessary when using OpenSSL + builds with zlib enabled. + + Closes #905 + +- cmake: add missing #cmakedefines to src + + - `HAVE_MEMSET_S` missing since + 03092292597ac601c3f9f0c267ecb145dda75e4e (2018-08-02) + + - `HAVE_EXPLICIT_BZERO` and `HAVE_EXPLICIT_MEMSET` missing since + 00005682f7b9a1aa42be50e269056ea873637047 (2023-03-28) + +GitHub (31 Mar 2023) +- [Viktor Szakats brought this change] + + tidy-up: NMakefile (#903) + +Viktor Szakats (30 Mar 2023) +- GNUmakefile: adjust win32/.gitignore [ci skip] + +- build: delete references to deleted NMake files [ci skip] + + Follow-up to 057522bb0f15c10c33159e12899ecc60e40aa6ef + +GitHub (30 Mar 2023) +- [Viktor Szakats brought this change] + + NMakefile: merge them into a single file [ci skip] (#902) + + Also: + + - allow to override `AR` and `ARFLAGS`. + + - The extra `src` subdir in the target directory is no longer, to + simplify things. + + - gone the dynamically generated `objects.mk`. Now replaced with some + tricky logic to do that inline. + + - add necessary `LIBS` for WinCNG. (untested) + + Lightly tested via clang-cl. + +- [Viktor Szakats brought this change] + + maketgz: tidy-up [ci skip] (#901) + + - fix shellcheck warnings: + - use quotes + - use `$()` + - use `printf` (instead of calling perl). + - indent. + - copy/adapt header comment from curl to `maketgz`. + +- [Viktor Szakats brought this change] + + ci: flatten AppVeyor jobs, add debug builds (#900) + + This results in better job names (now including CPU), avoiding the + complex exception rules, and fine-tuning the order and variation of + these tests. + + Enable `LIBSSH2DEBUG` for two of the existing jobs. + +- [Viktor Szakats brought this change] + + ci: add VS2022 builds (incl. ARM64) to AppVeyor (#899) + + - add MSVS 2022 WinCNG builds for x64 and ARM64, + replacing MSVS 2013 WinCNG builds for x64 and x86. + + - add MSVS 2022 OpenSSL builds for x64. + + - fix a compiler warning uncovered by the new ARM64 build: + + ``` + tests\openssh_fixture.c(393,17): warning C4477: 'fprintf' : format string '%d' requires an argument of type 'int', but variadic argument 1 has type 'libssh2_socket_t' + tests\openssh_fixture.c(393,17): message : consider using '%lld' in the format string + tests\openssh_fixture.c(393,17): message : consider using '%Id' in the format string + tests\openssh_fixture.c(393,17): message : consider using '%I64d' in the format string + ``` + + - echo the actual CMake command-line. + + - cmake: echo the DLL filenames found by the OpenSSL DLL-finder + heuristics. + + - cmake: delete `libcrypto.dll` and `libssl.dll` names from the above + logic. + + I've added these in 19884e5055b6c65f0df93d7cc776a01c518a2f06. That + resulted in CMake picking up a rogue `libcrypto.dll` (with no + `libssl.dll` pair) from `C:\Windows\System32\` on the + `Visual Studio 2022` image, breaking tests. + + Turns out, OpenSSL v1.0.2 uses the "EAY" names, but let's not re-add + those either, because CMake mis-picks those up from + `C:/OpenSSL-Win64/bin/`, even while pointing `OPENSSL_ROOT_DIR` to a + v1.1.1 installation. + + - cmake: set `NO_DEFAULT_PATH` for OpenSSL DLL lookup to avoid picking + up all kinds of wrong DLLs. CMake considers not the first, but the + _last_ hit the valid one. This happened to be + `C:/Program Files/Meson/lib*-1_1.dll` when using the + `Visual Studio 2022` image. + + Ref: https://cmake.org/cmake/help/latest/command/find_file.html + + - cmake: leave two commented debug lines that will be useful next time + the DLL detection lookup goes wrong. + + Ref: https://cmake.org/cmake/help/latest/variable/CMAKE_FIND_DEBUG_MODE.html + + - on error, also dump `CMakeFiles/CMakeConfigureLog.yaml` if it exists + (requires CMake 3.26 and newer) + +- [Viktor Szakats brought this change] + + src: fix compiler warning on Darwin (#898) + + ``` + src/session.c:675:52: warning: implicit conversion loses integer precision: 'long' to '__darwin_suseconds_t' (aka 'int') [-Wshorten-64-to-32] + tv.tv_usec = (ms_to_next - tv.tv_sec*1000) * 1000; + ~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~ + ``` + +Viktor Szakats (29 Mar 2023) +- tidy-up: tabs to spaces in Makefile.am [ci skip] + + Follow-up to 2f16d8105c9491beb2a02b3081f4f1c2a224fa62 + +GitHub (29 Mar 2023) +- [Viktor Szakats brought this change] + + netware: delete support (#888) + + Last related commit happened 15 years ago. + NetWare had it last release in 2009. + + All links referenced from the make file are inaccessible. + +- [Viktor Szakats brought this change] + + wolfssl: add workaround for HMAC_Update() len arg difference (#897) + + It's `int` in wolfSSL. `size_t` in OpenSSL/quictls/LibreSSL/BoringSSL. + + Ref: https://github.com/wolfSSL/wolfssl/blob/ba47562d182e10e59813da012e0ab8ef20892231/wolfssl/openssl/hmac.h#L60-L61 + + /cc @wolfSSL + +- [Viktor Szakats brought this change] + + cmake: introduce variables for lib target names (#896) + + Make our CMake config more self-documenting by introducing variables + for the shared and static lib target names. Without this, it might be + non-trivial to find out which line is referring to a target name vs + libname, export name or other occurrences of `libssh2`. + + This allows to rename back the shared lib target name to the value used + before 4e2580628dd1f8dc51ac65ac747ebcf0e93fa3d1: + `libssh2_shared` -> `libssh2`, if necessary for compatibility. Notice: + before that patch, `libssh2` name referred to either the static or + shared lib, depending on build settings. + +- [Viktor Szakats brought this change] + + detect and use explicit_bzero() and explicit_memset() (#895) + + Also skip detecting these and `memset_s()` for Windows targets in CMake, + to save detection time. On Windows we always use `SecureZeroMemory()`. + +- [Viktor Szakats brought this change] + + ci: bump mbedtls (#894) + +- [Viktor Szakats brought this change] + + GNUmakefile: minor fix for DYN mode [ci skip] (#893) + + Follow-up to b8762c1003d97e109efa587bdc760ff9873949eb + +- [Viktor Szakats brought this change] + + build: delete MS Dev Studio build files (#891) + + Last updated in 2007. + + Also delete `VCPROJ` target remains (necessary files seem to have + been missing from the repo all along) for Visual Studio 2008. + +Viktor Szakats (28 Mar 2023) +- checksrc: fix reference in Makefile.am, update options [ci skip] + +GitHub (28 Mar 2023) +- [Viktor Szakats brought this change] + + build: delete native Watcom wmake support with Win32 (#889) + + CMake supports generating Watcom wmake files: + https://cmake.org/cmake/help/v3.1/generator/Watcom%20WMake.html + +- [Viktor Szakats brought this change] + + checksrc: update and fix warnings (#890) + + Update from: + https://github.com/curl/curl/blob/5fec927374e4d9553205d861f2dcb39ec78002cc/scripts/checksrc.pl + + - suppress these new checks: + + - EQUALSNULL: 320 warnings + - NOTEQUALSZERO: 142 warnings + - TYPEDEFSTRUCT: 16 warnings + + We can enabled them in the future. + + - fix all other new ones. + + - also fix whitespace in two `NMakefile` files. + +- [Viktor Szakats brought this change] + + tidy-up: fix/update URLs (#887) + +- [Viktor Szakats brought this change] + + tidy-up: fix typos (#886) + + detected by codespell 2.2.4. + +- [Viktor Szakats brought this change] + + tidy-up: replace tabs and other whitespace (#885) + + There are a few non-whitespace changes, see them here: + https://github.com/libssh2/libssh2/pull/885/files?w=1 + +- [Viktor Szakats brought this change] + + ci: drop cmake --parallel (#884) + + `--parallel 2` did not seem to make builds faster. Neither did 4 or 6. + + Delete this option from both GHA and AppVeyor jobs. + + On AppVeyor, with VS, it uses MSBuild under the hood where apparently + `--parallel` doesn't do much [1]. The suggested MSBuild-specific option + `/p:CL_MPcount=2` did not improve build times either. + + CMake spends significant time (comparable to building the project + itself) on feature detection, it'd be nice to execute those in parallel, + but I found not such CMake option. + + [1] https://discourse.cmake.org/t/parallel-does-not-really-enable-parallel-compiles-with-msbuild/964 + + Partial revert of 7a039d9a7a2945c10b4622f38eeed21ba6b4ec55 + +- [Viktor Szakats brought this change] + + rework how to enable insecure null-cipher/null-MAC (#873) + + Null-cipher and null-MAC are security footguns we want to avoid. + + Existing option names to toggle these were ambiguous and gave room for + misinterpretation. Some projects may have had these options enabled by + accident. + + This patch aims to make it more difficult to enable them, and making + sure that existing methods require an update to stay enabled. + + - delete CMake/autotools settings to enable the "none" cipher and MAC. + + - rename existing C macros that can enable them. + + To use them, pass them as custom `CPPFLAGS` to the build. + + - enable them only if `LIBSSH2DEBUG` is also enabled. + + Best would be to delete them, though they may have some use while + developing libssh2 itself, or debugging. + +- [Viktor Szakats brought this change] + + delete old gex (SSH2_MSG_KEX_DH_GEX_REQUEST_OLD) build option (#872) + + libssh2 supports an "old" style KEX message + `SSH2_MSG_KEX_DH_GEX_REQUEST_OLD`, as an off-by-default build option. + + OpenSSH deprecated/disabled this feature in v6.9 (2015-07-01): + https://www.openssh.com/releasenotes.html#6.9 + + This patch deletes this obsolete feature from libssh2, with no option + to enable it. + + Added to libssh2 in: cf8ca63ea0c9388c8ae9079961d7e6a91b72b5c8 (2004-12-31) + RFC: https://datatracker.ietf.org/doc/html/rfc4419 (2006-03) + +- [Viktor Szakats brought this change] + + src: more tolerant snprintf() local override (#881) + + `#undef snprintf` before redefining it, when `HAVE_SNPRINTF` is not + defined, even though `snprintf` is available and it should have been. + Possibly with 3rd party builds. + + Downside is that cases of missing `HAVE_SNPRINTF` are less trivially + detected at compile-time. + +- [Viktor Szakats brought this change] + + ci: fix cmake warning with AppVeyor WinCNG builds (#883) + + ``` + CMake Warning: + Manually-specified variables were not used by the project: + + OPENSSL_ROOT_DIR + ``` + + Follow-up to 0834b9bcc85b90c78afff103f909b5a909b95e45 + +- [Viktor Szakats brought this change] + + ci: cmake `ENABLE_WERROR` -> `ON` (#877) + + Consider warnings as errors for CMake jobs in CI. + +Viktor Szakats (26 Mar 2023) +- src: silence compiler warnings 4 (alignment in WinCNG) + + Silence alignment warnings in WinCNG, by reworking the code. + + Also add two unrelated casts to avoid gcc compiler warnings + in surrounding code. + + `increases required alignment from 1 to 4 [-Wcast-align]` + `increases required alignment from 1 to 8 [-Wcast-align]` + + See warning details in the PR's individual commits. + + Reviewed-by: Marc Hörsken in + Cherry-picked from #846 + Closes #880 + +- src: silence compiler warnings 3 (change types) + + Apply type changes to avoid casts and warnings. In most cases this + means changing to a larger type, usually `size_t` or `ssize_t`. + + Change signedness in a few places. + + Also introduce new variables to avoid reusing them for multiple + purposes, to avoid casts and warnings. + + - add FIXME for public `libssh2_sftp_readdir_ex()` return type. + + - fix `_libssh2_mbedtls_rsa_sha2_verify()` to verify if `sig_len` + is large enough. + + - fix `_libssh2_dh_key_pair()` in `wincng.c` to return error if + `group_order` input is negative. + + Maybe we should also reject zero? + + - bump `_libssh2_random()` size type `int` -> `size_t`. Add checks + for WinCNG and OpenSSL to return error if requested more than they + support (`ULONG_MAX`, `INT_MAX` respectively). + + - change `_libssh2_ntohu32()` return value `unsigned int` -> `uint32_t`. + + - fix `_libssh2_mbedtls_bignum_random()` to check for a negative `top` + input. + + - size down `_libssh2_wincng_key_sha_verify()` `hashlen` to match + Windows'. + + - fix `session_disconnect()` to limit length of `lang_len` + (to 256 bytes). + + - fix bad syntax in an `assert()`. + + - add a few `const` to casts. + + - `while(1)` -> `for(;;)`. + + - add casts that didn't fit into #876. + + - update `docs/HACKING-CRYPTO` with new sizes. + + May need review for OS400QC3: /cc @monnerat @jonrumsey + + See warning details in the PR's individual commits. + + Cherry-picked from #846 + Closes #879 + +- src: silence compiler warnings 2 (ZLIB interface) + + Silence warnings in the ZLIB interface by adding casts and changing + types. + + See PR for individual commits. + + Cherry-picked from #846 + Closes #878 + +- src: silence compiler warnings 1 + + Most of the changes aim to silence warnings by adding casts. + + An assortment of other issues, mainly compiler warnings, resolved: + + - unreachable code fixed by using `goto` in + `publickey_response_success()` in `publickey.c`. + + - potentially uninitialized variable in `sftp_open()`. + + - MSVS-specific bogus warnings with `nid_type` in `kex.c`. + + - check result of `kex_session_ecdh_curve_type()`. + + - add missing function declarations. + + - type changes to fit values without casts: + - `cmd_len` in `scp_recv()` and `scp_send()`: `int` -> `size_t` + - `Blowfish_expandstate()`, `Blowfish_expand0state()` loop counters: + `uint16_t` -> `int` + - `RECV_SEND_ALL()`: `int` -> `ssize_t` + - `shell_quotearg()` -> `unsigned` -> `size_t` + - `sig_len` in `_libssh2_mbedtls_rsa_sha2_sign()`: + `unsigned` -> `size_t` + - `prefs_len` in `libssh2_session_method_pref()`: `int` -> `size_t` + - `firstsec` in `_libssh2_debug_low()`: `int` -> `long` + - `method_len` in `libssh2_session_method_pref()`: `int` -> `size_t` + + - simplify `_libssh2_ntohu64()`. + + - fix `LIBSSH2_INT64_T_FORMAT` for MinGW. + + - fix gcc warning by not using a bit field for + `burn_optimistic_kexinit`. + + - fix unused variable warning in `_libssh2_cipher_crypt()` in + `libgcrypt.c`. + + - fix unused variables with `HAVE_DISABLED_NONBLOCKING`. + + - avoid const stripping with `BIO_new_mem_buf()` and OpenSSL 1.0.2 and + newer. + + - add a missing const in `wincng.h`. + + - FIXME added for public: + - `libssh2_channel_window_read_ex()` `read_avail` argument type. + - `libssh2_base64_decode()` `datalen` argument type. + + - fix possible overflow in `sftp_read()`. + + Ref: 4552c73cd58fccb1fc49cb0f25f86619133e560f + + - formatting in `wincng.h`. + + See warning details in the PR's individual commits. + + Cherry-picked from #846 + Closes #876 + +GitHub (24 Mar 2023) +- [Viktor Szakats brought this change] + + cmake: automatic exports macro tidy-up (#875) + + In a recent CMake update I left the original CMake EXPORTS macro + unchanged (`libssh2_EXPORTS`) for compatibility. + + However, that macro was also recently added [1] and not present in an + official release yet, so we might as well just use the new native one + instead (`libssh2_shared_EXPORTS`), defined by CMake automatically. + This way we don't need to define the old macro manually. + + CMake forms this macro from the lib's internal name as defined in + `add_library()` by appending `_EXPORTS`. That target name changed from + `libssh2` to `libssh2_shared` after introducing dual shared + static + builds in the recent update. + + If we're here, add a new, stable, build-tool agnostic macro with the + same effect, for non-CMake use: `LIBSSH2_EXPORTS` + + [1] 1f0fe7443a1ecddd320f2c693607b2afee9bbe2f (2021-10-26) + + Follow-up to 4e2580628dd1f8dc51ac65ac747ebcf0e93fa3d1 + +- [Viktor Szakats brought this change] + + maketgz: add .xz, .bz2, .zip source archive formats (#874) + + Copied from curl: + https://github.com/curl/curl/blob/4528690cd51e5445df74aef8f83470a602683797/maketgz#L174-L222 + + [ci skip] + +Viktor Szakats (23 Mar 2023) +- dist: delete reference to recently deleted file [ci skip] + + Follow-up to b8762c1003d97e109efa587bdc760ff9873949eb + +GitHub (23 Mar 2023) +- [Viktor Szakats brought this change] + + cmake: separate compilation passes for shared/static (#871) + + Before this patch, cmake did a single compilation pass when we enabled + both shared and static lib targets. This saves build time (esp. with + MinGW targets and cross-compiling), but has the disadvantage that static + libs built this way must have PIC enabled (offering slightly less + performance) and `dllexport` enabled also, which means that executables + linking the static libssh2 lib export its public symbols. + + To avoid these downsides, this patch separates the two passes and + creates a non-PIC, non-`dllexport` static lib, even when also building + the shared lib. + +- [Viktor Szakats brought this change] + + ci: test with OpenSSL v1.1.1 on AppVeyor (#870) + + Was: v1.0.2. + + Keep using v1.0.2 with the static-only test. To make sure we don't break + support. + +- [Viktor Szakats brought this change] + + ci: speed up static-only build tests on AppVeyor (#868) + + - limit static-only build to a single platform (x64). + + - skip running ctest for the static-only build. + + - use MSVS 2013 for static-only builds. It's faster. + + - run static-only test before WinCNG ones. Otherwise it's often skipped + due to WinCNG failures (#804). + +- [Viktor Szakats brought this change] + + cmake: fix error with static lib off and example/tests on (#869) + + Regression from 4e2580628dd1f8dc51ac65ac747ebcf0e93fa3d1 + +- [Viktor Szakats brought this change] + + ci: parallelize more (#867) + +- [Viktor Szakats brought this change] + + cmake/src: move build options before target definitions (#864) + + To allow more flexibility when defining targets. + +- [Viktor Szakats brought this change] + + ci: use static+shared builds to cut number of cmake jobs (#865) + + With CMake builds supporting static-shared libssh2 builds in a single + pass, we no longer need to run static and shared jobs separately. For + the same effect it's enough to run builds with both shared and static + builds enabled. Halving CI jobs. + + We add an extra run to test the CMake config-path without shared builds + enabled. + + This allows to add useful jobs, e.g. MSVS 2022 or ZLIB-enabled builds + for Windows, valgrind builds or other useful stuff, without stretching + CI run times further. + + Ref: #863 + +Viktor Szakats (22 Mar 2023) +- cmake: allow building static + shared libs in a single pass + + - `BUILD_SHARED_LIBS=ON` no longer disables building static lib. + + When set, we build the static lib with PIC enabled. + + For shared lib only, set `BUILD_STATIC_LIBS=OFF`. For static lib + without PIC, leave this option disabled. + + - new setting: `BUILD_STATIC_LIBS`. `ON` by default. + + Force-enabled when building examples or tests (we build those in + static mode always.) + + - fix to exclude Windows Resource from the static lib. + + - fix to not overwrite static lib with shared implib on Windows + platforms using identical suffix for them (MSVS). By using + `libssh2_imp<.ext>` implib filename. + + - add support for `STATIC_LIB_SUFFIX` setting to set an optional suffix + (e.g. `_static`) for the static lib. (experimental, not documented). + Overrides the above when set. + + - fix to set `dllexport` when building shared lib. + + - set `TrackFileAccess=false` for MSVS. + + For faster builds, shorter verbose logs. + + - tests: new test linking against shared libssh2: `test_warmup_shared` + + - tests: simplify 'runner' lib by merging 3 libs into a single one. + + - tests: drop hack from `test_keyboard_interactive_auth_info_request` + build. + + We no longer need to compile `src/misc.c` because we always link + libssh2 statically. + + - tests: limit `FIXTURE_WORKDIR=` to the `runner` target. + + TL;DR: Default behavior unchanged: static (no-PIC), no shared. + Enabling shared unchanged, but now also builds a static (PIC) + lib by default. + + Based-on: b60dca8b6450a9729670986d2899cca54ccdbb6d #547 by berney on github + Fixes: #547 + Fixes: #675 + Closes: #863 + +- include: silence warnings with casts in public `libssh2_sftp.h` + + Avoid triggering warnings in macros coming from public libssh2 headers. + + Cherry-picked from: #846 + Closes #862 + +- example, tests: address compiler warnings + + Fix or silence all C compiler warnings discovered with (or without) + `PICKY_COMPILER=ON` (in CMake). This means all warnings showing up in + CI (gcc, clang, MSVS 2013/2015), in local tests on macOS (clang 14) and + Windows cross-builds using gcc (12) and llvm/clang (14/15). + + Also fix the expression `nread -= nread` in `sftp_RW_nonblock.c`. + + Cherry-picked from: #846 + Closes #861 + +- openssl: require `EVP_aes_128_ctr()` support + + libssh2 built with OpenSSL and without its `EVP_aes_128_ctr()`, aka + `HAVE_EVP_AES_128_CTR`, option are working incorrectly. This option + wasn't always auto-detected by autotools up until recently (#811). + Non-cmake, non-autotools build methods never enabled it automatically. + + OpenSSL supports this options since at least v1.0.2, which is already + EOLed and considered obsolete. OpenSSL forks (LibreSSL, BoringSSL) + supported it all along. + + In this patch we enable this option unconditionally, now requiring + OpenSSL supporting this function, or one of its forks. + + Also modernize OpenSSL lib references to what 1.0.2 and newer versions + have been using. + + Fixes #739 + +- wincng: fix memory leak in `_libssh2_dh_secret()` + + Patch-by: iruis on github + Assisted-by: Marc Hörsken + Bug #846, commit e3487092ef9553af67633c6747cb9ab2f86465e0. + Fixes #856 + Closes #858 + +GitHub (19 Mar 2023) +- [Viktor Szakats brought this change] + + nw, os400, watcom: stop setting unused macros [ci skip] (#859) + +Viktor Szakats (19 Mar 2023) +- cmake: fix `ENABLE_WERROR=ON` breaking auto-detections + + - cmake: fix compiler warnings in `CheckNonblockingSocketSupport`. + detection functions. + + Without this, these detections fail when `ENABLE_WERROR=ON`. + + - cmake: disable ENABLE_WERROR for MSVC during symbol checks in `src`. + + CMake's built-in symbol check function `check_symbol_exists()` + generate warnings with MSVC. With warnings considered errors, these + detections fail permanently. Our workaround is to disable + warnings-as-errors while running these checks. + + ``` + CheckSymbolExists.c(8): warning C4054: 'type cast': from function pointer '__int64 (__cdecl *)(const char *,char **,int)' to data pointer 'int *' + in `return ((int*)(&strtoll))[argc];` + ``` + + Ref: https://ci.appveyor.com/project/libssh2org/libssh2/builds/46537222/job/4vg4yg333mu2lg9b + + - example: replace `strcasecmp()` with C89 `strcmp()`. + + To avoid using CMake symbol checks in `example`. + + Another option is to duplicate the `check_symbol_exists()` workaround + from `src`, but I figure it's not worth the complexity. We use + `strcasecmp()` solely to check optional command-line options for + example programs, and those are fine as lower-case. + + Without this, these detections fail when `ENABLE_WERROR=ON`. + + - also delete `__function__` detection/use in `example`. + + To avoid the complexity for the sake of using it at a single place in + of the example's error branch. Replace that use with a literal name of + the function. + + - cmake: also use `CMakePushCheckState` functions instead of manual + save/restore. + + Closes #857 + +- build: improve a test build workaround with bcrypt + + - cmake: extend workaround for linking a test with shared libssh2. + + One of the tests uses internal libssh2 functions, and with CMake it + compiles `src/misc.c` directly for this. `misc.c` references bcrypt / + blowfish code. This needs a workaround for build configs where libssh2 + doesn't export these. + + Before this patch, we enabled this workaround for MSVC. + + In the patch we extend this to all Windows. There is no CI test for + this, but gcc and llvm/clang + mingw64 builds also need it. This may + well apply to other configurations (it should, as shared libs are not + supposed to export internal functions), so also make it easy to enable + it at a single point. + + [ autotools builds force-link this one test against static libssh2. ] + + - make `misc.c` not depend on bcrypt. + + By moving out our `bcrypt_pbkdf()` wrapper into `bcrypt_pbkdf.c` + itself. + + This allows to compile `misc.c` into tests without pulling in bcrypt / + blowfish functions, and simplify the above workaround. + + Source code uses `HAVE_BCRYPT_PBKDF`, a leftover from original bcrypt + source. We never define this inside libssh2. Defining it breaks the + build, and this patch doesn't change that. + + - make `bcrypt_pbkdf()` static. + + While here, make the low-level `bcrypt_pbkdf()` function static to + avoid namespace pollution. + + Closes #855 + +GitHub (17 Mar 2023) +- [Viktor Szakats brought this change] + + ci: more timeout adjustments (#853) + + - add timeout to SSH connection wait loop in AppVeyor test prep. + (2 minutes) + + - switch to per-step timeout for GitHub CI cmake/ctest runs. + (10 minutes) + + ctest timeout (of 450 seconds) didn't seem to make any difference. + +Viktor Szakats (17 Mar 2023) +- ci: set timeout to ctest and GitHub CI jobs + + - `ctest` shows a the default timeout '10000000' (turns out to be + in seconds), cause infinite waits e.g. in case the necessary server + worker is not available. + + CMake CI tests take approx: + - GitHub / Linux : 125 seconds + - AppVeyor / Windows: 300 seconds + + New timeouts are: 450 and 900 seconds respectively. + + - set timeouts for style-check, fuzz, Linux and Windows GitHub CI + jobs to avoid hanging forever. + + Also: + + - move `choco install` to before_test to make builds start faster + in `appveyor.yml`. + + - fix some yamllint `ON`/`OFF`-confusion issue by quoting these + values in `appveyor.yml`. + + - fix indentation in `appveyor.yml`. + + - convert to GitHub workflows to LF line-ending. + + Ref: https://github.com/libssh2/libssh2/pull/655#issuecomment-1472853493 + + Closes #851 + +GitHub (17 Mar 2023) +- [Viktor Szakats brought this change] + + ci: update mbedTLS repo URL, delete Travis CI (#850) + + Last Travis CI session run on 2021-11-18. + + Ref: https://app.travis-ci.com/github/libssh2/libssh2 + Ref: https://travis-ci.org/github/libssh2/libssh2/builds + +- [Viktor Szakats brought this change] + + appveyor.yml: reorder tests to return relevant feedback earlier (#849) + + - build x64 first + + x64 is the more interesting target. Most type conversion issues are + revealed here. Also more commonly used by now. + + - test VS 2013 earlier + + - test WinCNG earlier + + - delete reference to no longer used VS 2008 + + After this patch we end up starting with all Shared builds (2015, 2013, + OpenSSL, WinCNG), then continue with Static ones. Shared/Static makes + a minor if any difference in builds/tests compared to different VS + versions of TLS backends. + + -- + + CI run times: + + Preparation + build takes: + 8 x VS2015 4.5 mins -> total: 36 + 8 x VS2013 2 mins -> total: 16 + Total: 52 mins + + with our 30 tests, it increases to: + 8 x VS2015 8-10 mins -> total: 72 + 8 x VS2013 6- 9 mins -> total: 60 + Total: 132 mins + + Without tests: https://ci.appveyor.com/project/libssh2org/libssh2/builds/46475315 + With tests: https://ci.appveyor.com/project/libssh2org/libssh2/builds/46480549 + +Dan Fandrich (14 Mar 2023) +- src: check for NULL pointer passed to _libssh2_get_string + + Callers should be protecting against this, but it's prudent to check + here anyway. + + Fixes #802 + Closes #848 + +Viktor Szakats (14 Mar 2023) +- appveyor.yml: choco install improvements [ci skip] + + - avoid outputting 4000 log lines by hiding the progress bar. + Reduces log size by 5x. + + - decrease timeout (from the default 2700 seconds). + + - omit unnecessary output. + + Tested as part of #846 + +GitHub (14 Mar 2023) +- [Jakob Egger brought this change] + + build: update instructions for autoreconf (#847) + + The "convenience script" talks about the "buildconf" file, + which is no longer recommended. + +- [Viktor Szakats brought this change] + + win32: set HAVE_STRTOLL with MSVS 2013 and newer (#845) + + As in curl: + https://github.com/curl/curl/blob/7fa6e36583b52dd8f1e639b370c9a2849be81b54/lib/config-win32.h#L221 + +- [Viktor Szakats brought this change] + + GNUmakefile: move HAVE_STRTOLL to libssh2_config.h [ci skip] (#844) + +- [Viktor Szakats brought this change] + + src: silence unused variable warnings (#843) + +Viktor Szakats (13 Mar 2023) +- GNUmakefile: add wolfSSL support + major rework + + - add wolfSSL support. + - reduce size and redundant logic. + - fix a bunch of small issues. + - rework configuration, now with: `CC`, `AR`, `RC`, `TRIPLET`, `CFLAGS`, + `CPPFLAGS`, `LDFLAGS`, `RCFLAGS`, `LIBS`, `LIBSSH2_DLL_SUFFIX`, + `LIBSSH2_LDFLAGS_LIB`, `LIBSSH2_LDFLAGS_BIN` (and more). + - merge examples build into the main Makefile. + - relative dependency paths are now the same for building libssh2 or + examples. + - drop detection for obsolete OpenSSL versions (can be configure via new + `OPENSSL_LIBS`). + - merge dev/dist distribution zip options. + - build libssh2 with `-DHAVE_STRTOLL`. + - tidy-up. + - build examples in static mode by default (use `DYN` to build them in + shared mode). + - drop forced (in non-debug mode) `-O2`. + - drop Win9x support. + - deprecate `ARCH` in favour of custom options and `TRIPLET`. + - drop Windows resources from examples for simplicity + - drop `WITH_ZLIB`. Default `ZLIB_PATH` to enable zlib support. + - drop `LIBSSH2_DLL_A_SUFFIX`, use standard value `.dll` (as in + `libssh2.dll.a`). + - always link `bcrypt` (for LibreSSL and OpenSSL) and `crypt32` + (for wolfSSL). + - unhide executed build commands. + - fix mbedTLS `lib` path + - drop specific options to force static linking. Custom options seems + a better way for this. + - based on similar work made for curl: + https://github.com/curl/curl/commit/a8861b6ccdd7ca35b6115588a578e36d765c9e38 + + Closes #842 + +GitHub (13 Mar 2023) +- [Viktor Szakats brought this change] + + wincng: fix memory leak in libssh2_dh_key_pair() (#829) + + Fixes #722 + +- [Viktor Szakats brought this change] + + src: C89-compliant _libssh2_debug() macro (#831) + + Before this patch, with debug logging disabled, libssh2 code used a + variadic macro to catch `_libssh2_debug()` calls, and convert them to + no-ops. In certain conditions, it used an empty inline function instead. + + Variadic macro is a C99 feature. It means that depending on compiler, + and build settings, it littered the build log with warnings about this. + + The new solution uses the trick of passing the variable arg list as a + single argument and pass that down to the debug function with a regular + macro. When disabled, another regular C89-compatible macro converts it + to a no-op. + + This makes inlining, C99 variadic macros and maintaining the conditions + for each unnecessary and also makes the codebase compile more + consistently, e.g. with forced C standards and/or picky warnings. + + TL;DR: It makes this feature C89-compliant. + +- [Viktor Szakats brought this change] + + openssl: fix possible compiler warning in macro condition (#839) + + Building with wolfSSL or pre-OpenSSL v1.1.1 triggered it. + + ``` + ../src/openssl.h:130:5: warning: 'LIBRESSL_VERSION_NUMBER' is not defined, evaluates to 0 [-Wundef] + LIBRESSL_VERSION_NUMBER >= 0x3070000fL + ^ + ``` + + Regression from 2e2812dde8c1fc9b48eca592823770ab2e601f7a + +- [Viktor Szakats brought this change] + + GNUmakefile: cleanups [ci skip] (#840) + + - indent + - sync `test/GNUmakefile` with main + - delete `RANLIB` + - use `else if` + - use more `?=` + - use ASCII-7 copyright symbol (in test) + +- [Viktor Szakats brought this change] + + win32: convert tabs to spaces [ci skip] (#838) + + Also strip stray newlines from `win32/rules.mk`. + +- [Viktor Szakats brought this change] + + ci: retry choco install on appveyor (#837) + + Trying to mitigate occasional intermittent failures while installing + docker. + + Ref: https://ci.appveyor.com/project/libssh2org/libssh2/builds/46460704/job/g3t7bro6ta6n3pk6#L52 + +- [Viktor Szakats brought this change] + + cmake: drop unnecessary exception for warmup build (#835) + +- [Viktor Szakats brought this change] + + cmake: reflect minimum version in docs (#834) + + Follow-up to 505ea626b6e125b7ce15caf453b522192008a884 + +- [Viktor Szakats brought this change] + + cmake: add wolfSSL support to tests (#833) + + wolfSSL supports building with zlib as a dependency, that's the reason + for the ZLIB logic in the patch. + + Also add it to `docs/INSTALL_CMAKE.md` and to the help text in + `src/CMakeLists.txt`. + + Running tests not actually tested. + + Follow-up to 9f217a17f6f3c2047c4a1668a5c037a75a02abfd + + Ref: #817 + +- [Viktor Szakats brought this change] + + tests: workaround for intermittent first test failures (#832) + + Flakiness got continously worse these last days. It didn't seem related + to recent commits. Flakiness also picked up in GitHub CI runs, something + rarely seen before. Manual restart consistently fixed them. + + The repeating pattern was the _first_ test (`test_hostkey`) failing, + with `libssh2_session_handshake failed (-13): Failed getting banner`. + Failures came after a lengthy wait, suggesting a timeout. + + I then reversed the order of the first two tests, and it turned out that + the _first_ test failed again (`test_hostkey_hash`). Also pointing to a + timeout issue. + + Then I added a dummy test to "warm up" whatever needs warming up in the + layers of CI + Docker + ssh server and their interconnects. This helped, + and GitHub CI tests run without failure right for the first time. + AppVeyor CI also improved a little. + + This patch adds a new first test called `test_warmup`, that creates a + new libssh2 session, and exits with success even if that attempt failed. + + A stop-gap solution at best, and there is no guarantee it will continue + to fix this or similar future issues, but it's also untenable to have + almost every CI run fail for intermittent reasons. + + In some [1] cases [2] it's not the first test failing intermittently. + That's a different issue, and this patch doesn't fix it. + + [1] #804 + [2] https://ci.appveyor.com/project/libssh2org/libssh2/builds/46440828/job/8rej6cq6itg7vc4w#L500 + +- [Viktor Szakats brought this change] + + cmake: detect HAVE_SNPRINTF for tests (#830) + + Turns out `test_keyboard_interactive_auth_info_request.c` requires + `src/libssh2_priv.h`, which in turn requires a correctly set + `HAVE_SNPRINTF`. + + Follow-up to 4cdf785cd313c3272d04c2ef7458a35d44533d8b. + +- [Viktor Szakats brought this change] + + cmake: unset forced CMAKE_C_STANDARD 90 (#822) + + Added in cf80f2f4b5255cc85a04ee43b27a29c678c1edb1 (on 2016-08-14), + with the title "Basic dockerised test suite". + + It's not clear why a C standard was explicitly set, but a side-effect + of this is that CMake-built binaries diverged from ones built with + autotools or GNU Make (using the same compiler and configuration). + + Another issue is that this may introduce ABI incompatibility with + binaries built with a different C standard flag, e.g. the C compiler + default or one used for other components of a final app. + + Seems unlikely, but if our tests require this option, we should set it + for the CI builds only? + +- [Viktor Szakats brought this change] + + example: silence MSVS 2013 C4127 warnings (#828) + +- [Viktor Szakats brought this change] + + cmake: reposition ws2_32 to make binutils ld work again (#827) + + This restores socket libs to their pre-regression positions. + + Without this, `ld` doesn't find `ws2_32` symbols when referenced + from TLS libs. + + Regression from 31fb8860dbaae3e0b7d38f2a647ee527b4b2a95f + +- [Viktor Szakats brought this change] + + fix compiling with LIBSSH2_NO_CLEAR_MEMORY and OpenSSL (#825) + + Regression from a0e424a51c27cc27af611ba20d134f9a9ae35273 + + Fixes #824 + +- [Viktor Szakats brought this change] + + snprintf: add missing prototype for local replacement (#820) + + Should fix these warnings with MSVS 2013 and older: + `agent.c(294): warning C4013: '_libssh2_snprintf' undefined; assuming extern returning int` + + Follow-up to 4cdf785cd313c3272d04c2ef7458a35d44533d8b. + +- [Viktor Szakats brought this change] + + build: set _FILE_OFFSET_BITS=64 for mingw-w64 (#821) + + autotools builds already did auto-detect and set this mingw-specific + macro, but CMake and GNU Make builds did not. This patch fixes that. + + Necessary for `src/scp.c`. + +- [Viktor Szakats brought this change] + + cmake: add os400qc3.c to SOURCES (#826) + + This re-syncs the list of compiled objects in cmake builds with + non-cmake builds. + + Follow-up to 16619a8eddec35bb8582d1c334db0fc13b0817c4. + +- [Viktor Szakats brought this change] + + build: silence bogus C4127 warnings with MSVS 2013 and earlier (#819) + + E.g.: + `channel.c(370): warning C4127: conditional expression is constant` + Ref: + https://ci.appveyor.com/project/libssh2org/libssh2/builds/46437333/job/5rak1vcl9hue31ei#L190 + +- [Viktor Szakats brought this change] + + cmake: use only needed socket libs when checking non-blocking sockets (#816) + + Based on patch by Christian Beier. + + Fixes #694 + Closes #712 + +- [Viktor Szakats brought this change] + + cmake: update openssl dll list (#818) + + Add OpenSSL 3 and versionless DLL names. Also modernize warning messages + and variable names. + + Do we need the OpenSSL-Windows-specific check and the related + `RUNTIME_DEPENDENCIES` feature? The list of OpenSSL DLLs was out of date + for 1.5 years without anybody noticing. Keeping it fresh is a chore and + copying around DLL dependencies rarely helps as much as expected. This + check also results in unuseful warnings in certain build scenarios, e.g. + when linking to OpenSSL statically. + +- [Viktor Szakats brought this change] + + cmake: add wolfSSL support (#817) + + Implement wolfSSL support for libssh2 when building with CMake. + + Configuration example from curl-for-win: + ``` + -DCRYPTO_BACKEND=wolfSSL + -DWOLFSSL_LIBRARY=/path-to/wolfssl/lib/libwolfssl.a + -DWOLFSSL_INCLUDE_DIR=/path-to/wolfssl/include + ``` + + Module `cmake/Findwolfssl.cmake` copied from: + https://github.com/ngtcp2/ngtcp2/blob/e4d920c4b7a350d63b6978c68b216b76faa12635/cmake/Findwolfssl.cmake + via commit: + https://github.com/ngtcp2/ngtcp2/commit/296396d3730b721ad97f9de22f525400f8524c0e + by Stefan Eissing + +- [Viktor Szakats brought this change] + + cmake: restore non-Windows socket lib detection (#815) + + I mistakenly pruned some non-Windows logic, also missing the fact that + our local `check_function_exists_may_need_library()` set the `NEED_*` + variables. Oddly, only `src` imported this function, yet also `examples` + and `tests` called it indirectly. The referenced `HAVE_SOCKET` / + `HAVE_INET_ADDR` variables might be coming from an upstream CMake + project? Leaving those there also, just in case. + + Regression from 31fb8860dbaae3e0b7d38f2a647ee527b4b2a95f + +Viktor Szakats (7 Mar 2023) +- build: more fixes and tidy-up (mostly for Windows) + + - cmake: always link `ws2_32` on Windows. Also add it to `libssh2.pc`. + + Fixes #745 + + - agent: fix gcc compiler warning: + `src/agent.c:296:35: warning: 'snprintf' output truncated before the last format character [-Wformat-truncation=]` + + - autotools: fix `EVP_aes_128_ctr` detection with binutils `ld` + + The prerequisite for a successful detection is setting + `LIBS=-lbcrypt` if the chosen openssl-compatible library requires + it, e.g. libressl, or quictls/openssl built with + `-DUSE_BCRYPTGENRANDOM`. + + With llvm `lld`, detection works out of the box. With binutils `ld`, + it does not. The reason is `ld`s world-famous pickiness with lib + order. + + To fix it, we pass all custom libs before and after the TLS libs. + This ugly hack makes `ld` happy and detection succeed. + + - agent: fix Windows-specific warning: + `src/agent.c:318:10: warning: implicit conversion loses integer precision: 'LRESULT' (aka 'long long') to 'int' [-Wshorten-64-to-32]` + + - src: fix llvm/clang compiler warning: + `src/libssh2_priv.h:987:28: warning: variadic macros are a C99 feature [-Wvariadic-macros]` + + - src: support `inline` with `__GNUC__` (llvm/clang and gcc), fixing: + ``` + src/libssh2_priv.h:990:8: warning: extension used [-Wlanguage-extension-token] + static inline void + ^ + ``` + + - blowfish: support `inline` keyword with MSVC. + + Also switch to `__inline__` (from `__inline`) for `__GNUC__`: + https://gcc.gnu.org/onlinedocs/gcc/Inline.html + https://clang.llvm.org/docs/UsersManual.html#differences-between-various-standard-modes + + - example/test: fix MSVC compiler warnings: + + - `example\direct_tcpip.c(209): warning C4244: 'function': conversion from 'unsigned int' to 'u_short', possible loss of data` + - `tests\session_fixture.c(96): warning C4013: 'getcwd' undefined; assuming extern returning int` + - `tests\session_fixture.c(100): warning C4013: 'chdir' undefined; assuming extern returning int` + + - delete unused macros: + - `HAVE_SOCKET` + - `HAVE_INET_ADDR` + - `NEED_LIB_NSL` + - `NEED_LIB_SOCKET` + - `HAVE_NTSTATUS_H` + - `HAVE_NTDEF_H` + + - build: delete stale zlib/openssl version numbers from path defaults. + + - cmake: convert tabs to spaces, add newline at EOFs. + + Closes #811 + +- cmake: make `test_read` runs cross-build-friendly + + Improve tests added in 7487dcf4b4ddae54b2a850737789b57b4251b0ae by + running `test_read` commands directly. This makes external shell/batch + files unnecessary, and is friendlier with cross-builds and when run + from non-default shells, like MSYS2. + + Also extend CRYPT/MAC test error messages with the CRYPT/MAC name. + + External runner shell scripts kept for future use. + + Closes #814 + +- src: enable clear memory on all platforms + + - convert `_libssh2_explicit_zero()` to macro. This allows inlining + where supported (e.g. `SecureZeroMemory()`). + + - replace `SecureZeroMemory()` (in `wincng.c`) and + `LIBSSH2_CLEAR_MEMORY`-guarded `memset()` (in `os400qc3.c`) with + `_libssh2_explicit_zero()` macro. + + - delete `LIBSSH2_CLEAR_MEMORY` guards, which enables secure-zeroing + universally. + + - add `LIBSSH2_NO_CLEAR_MEMORY` option to disable secure-zeroing. + + - while here, delete double/triple inclusion of `misc.h`. + `libssh2_priv.h` included it already. + + Closes #810 + +- cmake: bump minimum version to 3.1 (from 2.8.12) + + This allows to delete some fallback code. + + CMake release dates: + - 2014-12-15: 3.1 + - 2013-10-07: 2.8.12 + + Closes #813 + +- snprintf: unify fallback logic + + Before this patch, the `snprintf()` fallback logic for envs not + supporting this function (i.e. Visual Studio 2013 and older) varied + depending on build tool, and used different techniques in examples, + tests and libssh2 itself. + + This patch aims to apply a common logic to libssh2 and examples/tests. + + - libssh2: use local `snprintf()` fallback with all build tools. + + We already had a local implementation, but only with CMake. Move that + to the library as `_libssh2_snprintf()`, and map `snprintf()` to it + when `HAVE_SNPRINTF` is not set. + + Also change the length type from `int` to `size_t`, and fix + formatting. + + - set or detect `HAVE_SNPRINTF` in non-CMake builds. + + Detect in autotools. Keep existing logic in `win32/libssh2_config.h`. + Always set for OS/400, NetWare and VMS, keeping existing behaviour. + (OS/400 builds use a different local implementation) + + - examples/tests: drop the CMake-specific fallback logic and map + `snprintf()` to `_snprintf()` for old MSVC versions, like we did + before with other build tools. This is unsafe, but should be fine for + these uses. + + - `win32/libssh2_config.h`: make it easier to read. + + Closes #812 + +- cmake: build fixes with OpenSSL/LibreSSL on Windows + + - Link `bcrypt` for newer (non-fork) OpenSSL. + + - Link `bcrypt` and `ws2_32` when using (non-fork) OpenSSL or LibreSSL, + to allow `Looking for EVP_aes_128_ctr` detecting this feature. + + With the feature available, but not found by CMake, build failed with: + `openssl.c:636:21: error: incompatible integer to pointer conversion assigning to 'EVP_CIPHER *' (aka 'struct evp_cipher_st *') from 'int' [-Wint-conversion]` + + Closes #809 + +- build fixes and improvements (mostly for Windows) + + - in `hostkey.c` check the result of `libssh2_sha256_init()` and + `libssh2_sha512_init()` calls. This avoid the warning that we're + ignoring the return values. + + - fix code using `int` (or `SOCKET`) for sockets. Use libssh2's + dedicated `libssh2_socket_t` and `LIBSSH2_INVALID_SOCKET` instead. + + - fix compiler warnings due to `STATUS_*` macro redefinitions between + `ntstatus.h` / `winnt.h`. Solve it by manually defining the single + `STATUS` value we need from `ntstatus.h` and stop including the whole + header. + Fixes #733 + + - improve Windows UWP/WinRT builds by detecting it with code copied + from the curl project. Then excluding problematic libssh2 parts + according to PR by Dmitry Kostjučenko. + Fixes #734 + + - always use `SecureZeroMemory()` on Windows. + + We can tweak this if not found or not inlined by a C compiler which + we otherwise support. Same if it causes issues with UWP apps. + + Ref: https://learn.microsoft.com/en-us/previous-versions/windows/desktop/legacy/aa366877(v=vs.85) + Ref: https://learn.microsoft.com/en-us/windows-hardware/drivers/ddi/wdm/nf-wdm-rtlsecurezeromemory + + - always enable `LIBSSH2_CLEAR_MEMORY` on Windows. CMake and + curl-for-win builds already did that. Delete `SecureZeroMemory()` + detection from autotools' WinCNG backend logic, that this + setting used to depend on. + + TODO: Enable it for all platforms in a separate PR. + TODO: For clearing buffers in WinCNG, call `_libssh2_explicit_zero()`, + insead of a local function or explicit `SecureZeroMemory()`. + + - Makefile.inc: move `os400qc3.h` to `HEADERS`. This fixes + compilation on non-unixy platforms. Recent regression. + + - `libssh2.rc`: replace copyright with plain ASCII, as in curl. + + Ref: curl/curl@1ca62bb + Ref: curl/curl#7765 + Ref: curl/curl#7776 + + - CMake fixes and improvements: + + - enable warnings with llvm/clang. + - enable more comprehensive warnings with gcc and llvm/clang. + Logic copied from curl: + https://github.com/curl/curl/blob/233810bb5f6c5e7bedfc10bdd36607b958c0cfe4/CMakeLists.txt#L131-L148 + - fix `Policy CMP0080` CMake warning by deleting that reference. + - add `ENABLE_WERROR` (default: `OFF`) option. Ported from curl. + - add `PICKY_COMPILER` (default: `ON`) option, as known from curl. + + It controls both the newly added picky warnings for llvm/clang and + gcc, and also the pre-existing ones for MSVC. + + - `win32/GNUmakefile` fixes and improvements: + + - delete `_AMD64_` and add missing `-m64` for x64 builds under test. + - add support for `ARCH=custom`. + It disables hardcoded Intel 64-bit and Intel 32-bit options, + allowing ARM64 builds. + - add support for `LIBSSH2_RCFLAG_EXTRAS`. + To pass custom options to windres, e.g. in ARM64 builds. + - add support for `LIBSSH2_RC`. To override `windres`. + - delete support for Metrowerks C. Last released in 2004. + + - `win32/libssh2_config.h`: delete unnecessary socket #includes + + `src/libssh2_priv.h` includes `winsock2.h` and `ws2tcpip.h` further + down the line, triggered by `HAVE_WINSOCK2_H`. + + `mswsock.h` does not seem to be necessary anymore. + + Double-including these (before `windows.h`) caused compiler failures + when building against BoringSSL and warnings with LibreSSL. We could + work this around by passing `-DNOCRYPT`. Deleting the duplicates + fixes these issues. + + Timeline: + 2013: c910cd382dfa07fed2adaabf688af9e4a084fa1d deleted `mswsock.h` from `src/libssh2_priv.h` + 2008: 8c43bc52b1e3de2c8fc7899a80aec0e98de4e2d8 added `winsock2.h` and `ws2tcpip.h` to `src/libssh2_priv.h` + 2005: dc4bb1af967d2c53e90349f2f37324c622e714f5 added the now deleted #includes + + - delete or replace `LIBSSH2_WIN32` with `WIN32`. + + - replace hand-rolled `HAVE_WINDOWS_H` macro with `WIN32`. Also delete + its detections/definitions. + + - delete unused `LIBSSH2_DARWIN` macro. + + - delete unused `writev()` Windows implementation + + There is no reference to `writev()` since 2007-02-02, commit + 9d55db6501aa4e21f0858cf36cdc2ddc11b96e83. + + - fix a bunch of MSVC / llvm/clang / gcc compiler warnings: + + - `warning C4100: '...': unreferenced formal parameter` + - using value of undefined PP macro `LIBSSH2DEBUG` + - missing void from function definition + - `if()` block missing in non-debug builds + - unreferenced variable in non-debug builds + - `warning: must specify at least one argument for '...' parameter of variadic macro [-Wgnu-zero-variadic-macro-arguments]` + in `_libssh2_debug()` + - `warning C4295: 'ciphertext' : array is too small to include a terminating null character` + - `warning C4706: assignment within conditional expression` + - `warning C4996: 'inet_addr': Use inet_pton() or InetPton() instead or + define _WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warnings` + By suppressning it. Would be best to use inet_pton() as suggested. + On Windows this needs Vista though. + - `warning C4152: nonstandard extension, function/data pointer conversion in expression` + (silenced locally) + - `warning C4068: unknown pragma` + + Ref: https://ci.appveyor.com/project/libssh2org/libssh2/builds/46354480/job/j7d0m34qgq8rag5w + + Closes #808 + +Dan Fandrich (1 Mar 2023) +- Add tests to check individual crypt & HMAC methods + + One specific crypt or hmac method is requested to be negotiated, then + several MB of data is transferred. + +- Add test to read lots of data over a channel + + Connects to the ssh server then downloads several MB of data. This + tests the data transfer path as well as boundary cases in packet + handling as data is split into smaller SSH blocks. + +GitHub (27 Feb 2023) +- [Will Cosgrove brought this change] + + Disable deprecated warnings for OpenSSL 3 #805 (#806) + + Disable deprecated warnings (for now) when building against OpenSSL 3 for a clean build. + + Reported: + Daniel Stenberg + +Dan Fandrich (24 Feb 2023) +- Fix a couple of warnings of errors in MSVC builds + + Two warnings (in tests & examples) in particular would cause problems: + bad format causing invalid data output or a bad chdir due to out of + scope buffer use. + +- tests: Support running tests in out-of-tree builds + + Various files are found by referencing the srcdir environment variable + in that case. + + Closes #801 + +- Improve the ssh2 example program to run a command + + This performs better as an example since it shows more working code, and + in the simplest possible way. It also turns the program into an actually + useful tool out of the box, able to run an arbitrary command (with one + restriction) on a remote machine and return the response, without + needing to touch the source. + + Closes #800 + +GitHub (14 Feb 2023) +- [Will Cosgrove brought this change] + + Add NULL session check to _libssh2_error_flags() (#796) + + Don't dereference null if a null session happens to make it into _libssh2_error_flags() + +Dan Fandrich (7 Feb 2023) +- Reorder AES crypt methods so stronger ones are first + + This make it more likely that a stronger one will be negotiated rather + than a weaker variant. + +- CI: update uses: dependencies to the latest versions + + We were seeing some deprecation warning messages on some of the older + ones. + +- transport.c: Add some comments + +- Add missing files to automake makefiles & build tests + + Many files have been added to the cmake build files but not the automake + ones in recent years. Missing ones have been added so automake "make + dist" will now create a usable tar ball. + + The integration tests using Docker are now built with automake as well + (with "make check"). They are not run yet since they aren't working yet + on Linux. + +- tests: Fix gcc compile warnings + + These were mostly due to missing and non-ANSI prototypes. + +- Enable trace debugging in example/ssh2 + + This is intended to be a test program, so debugging is likely to be + useful by default. + +- Improve example/ssh2 to allow unmodified use of public key auth + + The previous hard-coded key file paths were not valid for normal users. + Make the paths relative to the user's home directory instead so they + can work out of the box. Add a banner showing what connection will be + attempted to make it easier for the user to see what is being attempted. + Enable trace debugging since this is designed as a test program. + +GitHub (13 Dec 2022) +- [Viktor Szakats brought this change] + + openssl.h: enable ed25519 for LibreSSL 3.7.0 (#778) + + This brings LibreSSL libssh2 builds on par with OpenSSL. + +Dan Fandrich (5 Dec 2022) +- configure.ac: check for sys/param.h + + This file is required by glibc for the test suite. + +GitHub (12 Nov 2022) +- [Viktor Szakats brought this change] + + tests: add option to run tests without docker (#762) + + via `export OPENSSH_NO_DOCKER=1`. + + SSH server host can be set via: + `export OPENSSH_SERVER_HOST=127.0.0.1` + + SSH server port via existing: + `export OPENSSH_SERVER_PORT=4711` + + This requires more work to be usable out of the box. The necessery sshd + config is (partly) embedded into `tests/openssh_server/Dockerfile`. + + After this patch, it is possible to run tests in envs where docker is + not installed or not available, by running a preconfigured, + non-containerized sshd. + +- [Michael Buckley brought this change] + + Skip leading \r and \n characters in banner_receive() (#769) + + Fixes #768 + + Credit: + Michael Buckley + +- [Zenju brought this change] + + Fixed error handling of _libssh2_packet_requirev callers (#767) + + Notes: + + some callers of _libssh2_packet_requirev() fail to set _libssh2_error(). + This creates the situation where e.g. libssh2_session_handshake() fails, but libssh2_session_last_error() confusingly returns LIBSSH2_ERROR_NONE. + + Credit: + Zenju + +- [Will Cosgrove brought this change] + + Revert usage of EVP_CipherUpdate #764 #739 (#765) + + Revert usage of EVP_CipherUpdate from wolfSSL PR to fix #764 #739. + +- [Will Cosgrove brought this change] + + Fix regression with rsa_sha2_verify #758 (#763) + + Fixes comparison with the result value coming from `mbedtls_rsa_pkcs1_verify`. Success is 0, not 1. + +Marc Hoersken (24 Oct 2022) +- CI: fix AppVeyor status failing for starting jobs + +Viktor Szakats (24 Oct 2022) +- delete cast5 - null-cipher mapping + +- more feature guard cleanup + +- indent + +- formatting + +- fold long lines + +- cleanup + +- temporarily silence checksrc + +- add mbedTLS 3.x support + + Make libssh2 compile cleanly with mbedTLS 3.x and later. + + This patch makes use of `MBEDTLS_PRIVATE()`, which is not the + recommended, future-proof way to access mbedTLS data structures. This + method may break with a minor upgrade, according to the authors. This + is also the method used by libcurl. + + Also: + + - Fix a potentially uninitialized variable in + `libssh2_mbedtls_rsa_sha2_sign()`. This happened in an error path, + resulting in an unnecessary mbedTLS API call, with an uninitialized + `md_type`. + + - Bump mbedTLS version used in CI tests to 3.2.1. + + Fixes #751 + +- tests: add option to enable all trace messages in fixture + + via `export FIXTURE_TRACE_ALL=1`. + +- win32/GNUmakefile: add mbedTLS support + + via `export MBEDTLS_PATH=`. + +Marc Hoersken (21 Oct 2022) +- CI: fix AppVeyor job links only working for most recent build + + Ref: https://github.com/curl/curl/pull/9768#issuecomment-1286675916 + Reported-by: Daniel Stenberg + + Follow up to #754 + +- CI: add missing permission section to AppVeyor status workflow + + Follow up to #754 + +- Remove OSSFuzz integration which was replaced with CIFuzz (#756) + + Confirmed-by: Max Dymond + +- Rename workflow file appveyor.yml to appveyor_docker.yml + +- Streamline names of CI workflow jobs + +- [Jeroen Ooms brought this change] + + Add CI for mingw-w64 via msys2 (#742) + + Credit: Jeroen Ooms + +- CI: report AppVeyor build status for each job (#754) + + Also give each job on AppVeyor CI a human-readable name. + + This aims to make job and therefore build failures more visible. + +GitHub (29 Sep 2022) +- [Michael Buckley brought this change] + + Support for sk-ecdsa-sha2-nistp256 and sk-ssh-ed25519 keys, FIDO (#698) + + Notes: + Add support for sk-ecdsa-sha2-nistp256@openssh.com and sk-ssh-ed25519@openssh.com key exchange for FIDO auth using the OpenSSL backend. Stub API for other backends. + + Credit: + Michael Buckley + +- [Y. Yang brought this change] + + Fix DLL import library name (#711) + + Notes: + Fix DLL import library name + + https://aur.archlinux.org/packages/mingw-w64-libssh2 + https://cmake.org/cmake/help/latest/prop_tgt/IMPORT_PREFIX.html + + Credit: + metab0t + Y. Yang + +- [skundu07 brought this change] + + Add RSA-SHA2 support for the WinCNG backend (#736) + + Notes: + Added code to support RSA-SHA2 for WinCNG backend. + + Credit: + skundu07 + +- [Gabriel Smith brought this change] + + sftp: Prevent files from being skipped if the output buffer is too small (#746) + + Notes: + LIBSSH2_ERROR_BUFFER_TOO_SMALL is returned if the buffer is too small + to contain a returned directory entry. On this condition we jump to the + label `end`. At this point the number of names left is decremented + despite no name being returned. + + As suggested in #714, this commit moves the error label after the + decrement of `names_left`. + + Fixes #714 + + Credit: + Co-authored-by: Gabriel Smith + +- [bgermann brought this change] + + Drop advertisement clause on Blowfish (#747) + + Originally driven by https://github.com/pyca/bcrypt/issues/169, OpenBSD + removed Niels Provos's BSD advertisement clause in version 7.1: + + https://cvsweb.openbsd.org/cgi-bin/cvsweb/src/sys/lib/libsa/blowfish.c.diff?r1=1.1&r2=1.2 + https://cvsweb.openbsd.org/cgi-bin/cvsweb/src/sys/lib/libsa/blowfish.h.diff?r1=1.1&r2=1.2 + + This enables using libssh2 in GPL software. + +- [zhaochongliu brought this change] + + Support building with gcc < version 8 + + Files: CMakeLists.txt + + Notes: don't use gcc arguments that don't exist in gcc versions lower than 8 if building with older gcc. + + Credit: + zhaochongliu + +- [Miguel de Icaza brought this change] + + Document the obscure LIBSSH2_ERROR_BAD_USE when writing to a channel (#713) + + Document the obscure LIBSSH2_ERROR_BAD_USE when writing to a channel + + Credit: + Miguel de Icaza + +- [Michael Buckley brought this change] + + Don't erroneously log SSH_MSG_REQUEST_FAILURE packets from keepalive (#727) + + Notes: + When setting a ServerAliveInterval using libssh2_keepalive_config() with want_reply set to true, some servers will reply to the keep-alive requests with a single SSH_MSG_REQUEST_FAILURE packet. This is an allowed behavior in RFC 4254, section 4. + + Credit: + Michael Buckley + +- [Ryan Kelley brought this change] + + Updating docs for libssh2_channel_flush_ex (#728) + + Notes: + In #614 it was identified the docs do not accurately show how libssh2_channel_flush_ex() return value is set. I have updated the doc's to correctly show what the function is returning. + + Credit: + Ryan Kelley + +- [Sandeep Bansal brought this change] + + Support RSA certificate authentication (#710) + + * Adding support for signed RSA keys and unit test + + Credit: + Sandeep Bansal + +Viktor Szakats (2 Jul 2022) +- configure: add --disable-tests option + +- cmake: do not add libssh2.rc to the static library + +GitHub (23 May 2022) +- [AyushiN brought this change] + + Fixed typo #697 (#701) + + Credit: + AyushiN + +- [Viktor Szakats brought this change] + + Openssl: add support for LibreSSL 3.5.x (#700) + + LibreSSL 3.5.0 made more structures opaque, so let's enable existing + support for that when building against these LibreSSL versions. + + Ref: https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/libressl-3.5.0-relnotes.txt + + Credit: + Viktor Szakats + +- [Michael Buckley brought this change] + + Ensure KEX replies don't include extra bytes (#696) + + Addresses #695 + + Credit: + Michael Buckley, reported by Harry Sintonen + +- [Zenju brought this change] + + Fix buffer overflow during SSH_MSG_USERAUTH_BANNER (#693) + + File: userauth.c + Notes: + This patch fixes application crashes due to heap corruption. Turns out the null terminator is written one byte outside of the allocated area. + Credit: + Zenju + +- [Will Cosgrove brought this change] + + Changed NULL check to avoid logic change + +- [Will Cosgrove brought this change] + + NULL check before calling session_handshake + +- [Harry Sintonen brought this change] + + Fix build since openssl 1.1.0 when ECDSA and/or RIPEMD are disabled (#666) + + File: openssl.h + + Notes: + In openssl 1.1.0 and later openssl decided to change some of the defines used to check if certain features are not compiled in the libraries. This updates the define checks. + + Credit: + Harry Sintonen + Co-authored-by: Harry Sintonen + +- [gbaraldi brought this change] + + Add RSA-SHA2 support for the mbedtls backend (#688) + + File: mbedtls.c + + Notes: + * Add sha2 support for RSA key upgrading to mbedTLS backend + + Credit: + gbaraldi + +Daniel Stenberg (21 Mar 2022) +- misc/libssh2_copy_string: avoid malloc zero bytes + + Avoids the inconsistent malloc return code for malloc(0) + + Closes #686 + +Marc Hoersken (17 Mar 2022) +- wincng: rename struct field referring to the DH private big number + + Closes #684 + +- tests/openssh_fixture.c: print command after variable expansion + +- CI: store and reuse OpenSSH Server docker image used for tests + + Supersedes #588 + Fixes #665 + Closes #685 + +GitHub (26 Feb 2022) +- [Will Cosgrove brought this change] + + Added LibreSSL to crypto backend list + +- [Will Cosgrove brought this change] + + Added crypto backend list to template + + Added OS version as well + +- [Will Cosgrove brought this change] + + Revert "Option to build both static and shared libraries (#547)" (#675) + + This reverts commit b60dca8b6450a9729670986d2899cca54ccdbb6d. + + #547 doesn't build clean anymore with the keyboard interactive changes. + +- [berney brought this change] + + Option to build both static and shared libraries (#547) + + files: cmakelists.txt + + Notes: + * Option to build both static and shared libraries when using CMake + + Credit: + berney + +- [xalopp brought this change] + + Use modern API in userauth_keyboard_interactive() (#663) + + Files: userauth_kbd_packet.c, userauth_kbd_packet.h, test_keyboard_interactive_auth_info_request.c, userauth.c + + Notes: + This refactors `SSH_MSG_USERAUTH_INFO_REQUEST` processing in `userauth_keyboard_interactive()` in order to improve robustness, correctness and readability or the code. + + * Refactor userauth_keyboard_interactive to use new api for packet parsing + * add unit test for userauth_keyboard_interactive_parse_response() + * add _libssh2_get_boolean() and _libssh2_get_byte() utility functions + + Credit: + xalopp + +- [xalopp brought this change] + + Fix formatting in manual page (#667) + + Fixed formatting of `LIBSSH2_ERROR_AUTHENTICATION_FAILED` in the errors section. + + credit: xalopp + +- [tihmstar brought this change] + + NULL terminate server_sign_algorithms string (#669) + + files: packet.c, libssh2_priv.h + + notes: + * Fix heap buffer overflow in _libssh2_key_sign_algorithm + + When allocating `session->server_sign_algorithms` which is a `char*` is is important to also allocate space for the string-terminating null byte at the end and make sure the string is actually null terminated. + + Without this fix, the `strchr()` call inside the `_libssh2_key_sign_algorithm` (line 1219) function will try to parse the string and go out of buffer on the last invocation. + + Credit: tihmstar + Co-authored-by: Will Cosgrove + +- [Will Cosgrove brought this change] + + free RSA2 related memory (#664) + + Free `server_sign_algorithms` and `sign_algo_prefs`. + +- [Will Cosgrove brought this change] + + Legacy Agent support for rsa2 key upgrading/downgrading #659 (#662) + + Files: libssh2.h, agent.c, userauth.c + + Notes: + Part 2 of the fix for #659. This adds rsa key downgrading for agents that don't support sha2 upgrading. It also adds better trace output for debugging/logging around key upgrading. + + Credit: + Will Cosgrove (signed off by Michael Buckley) + +- [Ian Hattendorf brought this change] + + Support rsa-sha2 agent flags (#661) + + File: agent.c + Notes: implements rsa-sha2 flags used to tell the agent which signing algo to use. + https://tools.ietf.org/id/draft-miller-ssh-agent-01.html#rfc.section.4.5.1 + + Credit: + Ian Hattendorf + +Daniel Stenberg (13 Jan 2022) +- [Sunil Nimmagadda brought this change] + + ssh: Add support for userauth banner. + + The new libssh2_userauth_banner API allows to get an optional + userauth banner sent with SSH_MSG_USERAUTH_BANNER packet by the + server. + + Closes #610 + +GitHub (6 Jan 2022) +- [Michael Buckley brought this change] + + Fix a memcmp errors in code that was changed from memmem to memcmp (#656) + + Notes: + Fixed supported algo prefs list check when upgrading rsa keys + + Credit: Michael Buckley + +- [Hayden Roche brought this change] + + Add support for a wolfSSL crypto backend. (#629) + + It uses wolfSSL's OpenSSL compatibility layer, so rather than introduce new + wolfssl.h/c files, the new backend just reuses openssl.h/c. Additionally, + replace EVP_Cipher() calls with EVP_CipherUpdate(), since EVP_Cipher() is not + recommended. + + Credit: Hayden Roche + +- [Bastien Durel brought this change] + + Runtime engine detection with libssh2_crypto_engine() (#643) + + File: + version.c, HACKING-CRYPTO, libssh2.h, libssh2_crypto_engine.3, makefile. + + Notes: + libssh2_crypto_engine() API to get crypto engine at runtime. + + Credit: Bastien Durel + +- [Will Cosgrove brought this change] + + RSA SHA2 256/512 key upgrade support RFC 8332 #536 (#626) + + Notes: + * Host Key RSA 256/512 support #536 + * Client side key hash upgrading for RFC 8332 + * Support for server-sig-algs, ext-info-c server messages + * Customizing preferred server-sig-algs via the preference LIBSSH2_METHOD_SIGN_ALGO + + Credit: Anders Borum, Will Cosgrove + +- [xalopp brought this change] + + fix: use userauth name length to check memory boundaries for userauth name, fixes #653 (#654) + + File: userauth.c + + Notes: + Fixes `userauth_kybd_auth_name_len` length check + + Co-authored-by: Xaver Lopenstedt + +- [Daniel Stenberg brought this change] + + agent: handle overly large comment lengths (#651) + + Reported-by: Harry Sintonen + +- [Daniel Stenberg brought this change] + + userauth: check for too large userauth_kybd_auth_name_len (#650) + + ... before using it. + + Reported-by: MarcoPoloPie + Fixes #649 + +Daniel Stenberg (17 Dec 2021) +- .github/SECURITY.md: fix the URL + +- .github/SECURITY.md: add security policy + +GitHub (30 Nov 2021) +- [Will Cosgrove brought this change] + + hostkey_method_ssh_ed25519_init() check key bounds (#645) + + * hostkey_method_ssh_ed25519_init() check key bounds + + File: hostkey.c + + Notes: + Additional key length checking before calling _libssh2_ed25519_new_public() + + Credit: + Will Cosgrove + +- [Will Cosgrove brought this change] + + Fix error message in memory_read_privatekey #636 + + file: userauth.c + note: fix error message + credit: + volund + +- [cntrump brought this change] + + Update maketgz for macOS (#543) + + File: + maketgz + + Notes: + Fix error on macOS: sed: -e: No such file or directory + + Credit: + cntrump + +- [Jun Tseng brought this change] + + CMake update minimum version to 2.8.12 (#639) + + File: + CMakeLists.txt + + Notes: + Following CMake's advice, Update the minimum required version. + + Credit: + Jun Tseng + +Daniel Stenberg (8 Nov 2021) +- [David Korczynski brought this change] + + ci: Add CIFuzz integration + + Notes: + Add CIFuzz integration to run fuzzer using the OSS-Fuzz infrastructure + at each PR. + + Signed-off-by: David Korczynski + Closes #635 + +GitHub (26 Oct 2021) +- [Uwe L. Korn brought this change] + + Use libssh2_EXPORTS as an alternative to _WINDLL (#470) + + Files: libssh2.h + + Notes: + `_WINDLL` is only defined when a Visual Studio CMake generator is used, `libssh2_EXPORTS` is used though for all CMake generator if a shared libssh2 library is being built. + + Credit: + Uwe L. Korn + +Viktor Szakats (1 Oct 2021) +- windows: fix clang and WinCNG warnings + + Fix these categories of warning: + + - in `wincng.c` disagreement in signed/unsigned char when passing around + the passphrase string: + `warning: pointer targets in passing argument [...] differ in signedness [-Wpointer-sign]` + Fixed by using `const unsigned char *` in all static functions and + applying/updating casts as necessary. + + - in each use of `libssh2_*_init()` macros where the result is not used: + `warning: value computed is not used [-Wunused-value]` + Fixed by using `(void)` casts. + + - `channel.c:1171:7: warning: 'rc' may be used uninitialized in this function [-Wmaybe-uninitialized]` + Fixed by initializing this variable with `LIBSSH2_ERROR_CHANNEL_UNKNOWN`. + While there I replaced a few 0 literals with `LIBSSH2_ERROR_NONE`. + + - in `sftp.c`, several of these two warnings: + `warning: 'data' may be used uninitialized in this function [-Wmaybe-uninitialized]` + `warning: 'data_len' may be used uninitialized in this function [-Wmaybe-uninitialized]` + Fixed by initializing these variables with NULL and 0 respectively. + + - Also removed the exec attribute from `wincng.h`. + + Notes: + - There are many pre-existing checksrc issues. + - The `sftp.c` and `channel.c` warnings may apply to other platforms as well. + + Closes #628 + +Daniel Stenberg (25 Sep 2021) +- README: use www.libssh2.org for the license link + +- libssh2.h: bump it to 1.10.1-dev + +- mailing list: moved to lists.haxx.se + +GitHub (2 Sep 2021) +- [Laurent Stacul brought this change] + + openssh_fixture.c: Fix openssh_server build not working (#616) (#620) + + File: openssh_fixture.c + + Notes: + fixes too long of output lines building docker image + + Credit: + Laurent Stacul + +- [Will Cosgrove brought this change] + + openssh_fixture.c: fix warning (#621) + + File: openssh_fixture.c + + Notes: + Fix `portable_sleep` return type warning + + Credit: + Will Cosgrove + +- [Will Cosgrove brought this change] + + Update CI to use latest Ubuntu #624 (#625) + + File: ci.yml + + Notes: + Update CI to use latest Ubuntu #624 + + Also removed 32 bit building in the matrix. + + Credit: + Will Cosgrove + +- [Will Cosgrove brought this change] + + Update .gitignore + + Add .DS_Store files for macOS + +- [Laurent Stacul brought this change] + + Makefile.am: Add missing key in case openssl > 1.1.0 (#617) + + File: Makefile.am + + Notes: fix missing test keys + + Credit: + Laurent Stacul + +Version 1.10.0 (29 Aug 2021) + +Daniel Stenberg (29 Aug 2021) +- [Will Cosgrove brought this change] + + updated docs for 1.10.0 release + +Marc Hörsken (30 May 2021) +- [Laurent Stacul brought this change] + + [tests] Try several times to connect the ssh server + + Sometimes, as the OCI container is run in detached mode, it is possible + the actual server is not ready yet to handle SSH traffic. The goal of + this PR is to try several times (max 3). The mechanism is the same as + for the connection to the docker machine. + +- [Laurent Stacul brought this change] + + Remove openssh_server container on test exit + +- [Laurent Stacul brought this change] + + Allow the tests to run inside a container + + The current tests suite starts SSH server as OCI container. This commit + add the possibility to run the tests in a container provided that: + + * the docker client is installed builder container + * the host docker daemon unix socket has been mounted in the builder + container (with, if needed, the DOCKER_HOST environment variable + accordingly set, and the permission to write on this socket) + * the builder container is run on the default bridge network, or the + host network. This PR does not handle the case where the builder + container is on another network. + +Marc Hoersken (28 May 2021) +- CI/appveyor: run SSH server for tests on GitHub Actions (#607) + + No longer rely on DigitalOcean to host the Docker container. + + Unfortunately we require a small dispatcher script that has + access to a GitHub access token with scope repo in order to + trigger the daemon workflow on GitHub Actions also for PRs. + + This script is hosted by myself for the time being until GitHub + provides a tighter scope to trigger the workflow_dispatch event. + +GitHub (26 May 2021) +- [Will Cosgrove brought this change] + + openssl.c: guards around calling FIPS_mode() #596 (#603) + + Notes: + FIPS_mode() is not implemented in LibreSSL and this API is removed in OpenSSL 3.0 and was introduced in 0.9.7. Added guards around making this call. + + Credit: + Will Cosgrove + +- [Will Cosgrove brought this change] + + configure.ac: don't undefine scoped variable (#594) + + * configure.ac: don't undefine scoped variable + + To get this script to run with Autoconf 2.71 on macOS I had to remove the undefine of the backend for loop variable. It seems scoped to the for loop and also isn't referenced later in the script so it seems OK to remove it. + + * configure.ac: remove cygwin specific CFLAGS #598 + + Notes: + Remove cygwin specific Win32 CFLAGS and treat the build like a posix build + + Credit: + Will Cosgrove, Brian Inglis + +- [Laurent Stacul brought this change] + + tests: Makefile.am: Add missing tests client keys in distribution tarball (#604) + + Notes: + Added missing test keys. + + Credit: + Laurent Stacul + +- [Laurent Stacul brought this change] + + Makefile.am: Add missing test keys in the distribution tarball (#601) + + Notes: + Fix tests missing key to build the OCI image + + Credit: + Laurent Stacul + +Daniel Stenberg (16 May 2021) +- dist: add src/agent.h + + Fixes #597 + Closes #599 + +GitHub (12 May 2021) +- [Will Cosgrove brought this change] + + packet.c: Reset read timeout after received a packet (#576) (#586) + + File: + packet.c + + Notes: + Attempt keyboard interactive login (Azure AD 2FA login) and use more than 60 seconds to complete the login, the connection fails. + + The _libssh2_packet_require function does almost the same as _libssh2_packet_requirev but this function sets state->start = 0 before returning. + + Credit: + teottin, Co-authored-by: Tor Erik Ottinsen + +- [kkoenig brought this change] + + Support ECDSA certificate authentication (#570) + + Files: hostkey.c, userauth.c, test_public_key_auth_succeeds_with_correct_ecdsa_key.c + + Notes: + Support ECDSA certificate authentication + + Add a test for: + - Existing ecdsa basic public key authentication + - ecdsa public key authentication with a signed public key + + Credit: + kkoenig + +- [Gabriel Smith brought this change] + + agent.c: Add support for Windows OpenSSH agent (#517) + + Files: agent.c, agent.h, agent_win.c + + Notes: + * agent: Add support for Windows OpenSSH agent + + The implementation was partially taken and modified from that found in + the Portable OpenSSH port to Win32 by the PowerShell team, but mostly + based on the existing Unix OpenSSH agent support. + + https://github.com/PowerShell/openssh-portable + + Regarding the partial transfer support implementation: partial transfers + are easy to deal with, but you need to track additional state when + non-blocking IO enters the picture. A tracker of how many bytes have + been transfered has been placed in the transfer context struct as that's + where it makes most sense. This tracker isn't placed behind a WIN32 + #ifdef as it will probably be useful for other agent implementations. + + * agent: win32 openssh: Disable overlapped IO + + Non-blocking IO is not currently supported by the surrounding agent + code, despite a lot of the code having everything set up to handle it. + + Credit: + Co-authored-by: Gabriel Smith + +- [Zenju brought this change] + + Fix detailed _libssh2_error being overwritten (#473) + + Files: openssl.c, pem.c, userauth.c + + Notes: + * Fix detailed _libssh2_error being overwritten by generic errors + * Unified error handling + + Credit: + Zenju + +- [Paul Capron brought this change] + + Fix _libssh2_random() silently discarding errors (#520) + + Notes: + * Make _libssh2_random return code consistent + + Previously, _libssh2_random was advertized in HACKING.CRYPTO as + returning `void` (and was implemented that way in os400qc3.c), but that + was in other crypto backends a lie; _libssh2_random is (a macro + expanding) to an int-value expression or function. + + Moreover, that returned code was: + — 0 or success, -1 on error for the MbedTLS & WinCNG crypto backends + But also: + — 1 on success, -1 or 0 on error for the OpenSSL backend! + – 1 on success, error cannot happen for libgcrypt! + + This commit makes explicit that _libssh2_random can fail (because most of + the underlying crypto functions can indeed fail!), and it makes its result + code consistent: 0 on success, -1 on error. + + This is related to issue #519 https://github.com/libssh2/libssh2/issues/519 + It fixes the first half of it. + + * Don't silent errors of _libssh2_random + + Make sure to check the returned code of _libssh2_random(), and + propagates any failure. + + A new LIBSSH_ERROR_RANDGEN constant is added to libssh2.h + None of the existing error constants seemed fit. + + This commit is related to d74285b68450c0e9ea6d5f8070450837fb1e74a7 + and to https://github.com/libssh2/libssh2/issues/519 (see the issue + for more info.) It closes #519. + + Credit: + Paul Capron + +- [Gabriel Smith brought this change] + + ci: Remove caching of docker image layers (#589) + + Notes: + continued ci reliability work. + + Credit: + Gabriel Smith + +- [Gabriel Smith brought this change] + + ci: Speed up docker builds for tests (#587) + + Notes: + The OpenSSH server docker image used for tests is pre-built to prevent + wasting time building it during a test, and unneeded rebuilds are + prevented by caching the image layers. + + Credit: + Gabriel Smith + +- [Will Cosgrove brought this change] + + userauth.c: don't error if using keys without RSA (#555) + + file: userauth.c + + notes: libssh2 now supports many other key types besides RSA, if the library is built without RSA support and a user attempts RSA auth it shouldn't be an automatic error + + credit: + Will Cosgrove + +- [Marc brought this change] + + openssl.c: Avoid OpenSSL latent error in FIPS mode (#528) + + File: + openssl.c + + Notes: + Avoid initing MD5 digest, which is not permitted in OpenSSL FIPS certified cryptography mode. + + Credit: + Marc + +- [Laurent Stacul brought this change] + + openssl.c: Fix EVP_Cipher interface change in openssl 3 #463 + + File: + openssl.c + + Notes: + Fixes building with OpenSSL 3, #463. + + The change is described there: + https://github.com/openssl/openssl/commit/f7397f0d58ce7ddf4c5366cd1846f16b341fbe43 + + Credit: + Laurent Stacul, reported by Sergei + +- [Gabriel Smith brought this change] + + openssh_fixture.c: Fix potential overwrite of buffer when reading stdout of command (#580) + + File: + openssh_fixture.c + Notes: + If reading the full output from the executed command took multiple + passes (such as when reading multiple lines) the old code would read + into the buffer starting at the some position (the start) every time. + The old code only works if fgets updated p or had an offset parameter, + both of which are not true. + + Credit: + Gabriel Smith + +- [Gabriel Smith brought this change] + + ci: explicitly state the default branch (#585) + + Notes: + It looks like the $default-branch macro only works in templates, not + workflows. This is not explicitly stated anywhere except the linked PR + comment. + + https://github.com/actions/starter-workflows/pull/590#issuecomment-672360634 + + credit: + Gabriel Smith + +- [Gabriel Smith brought this change] + + ci: Swap from Travis to Github Actions (#581) + + Files: ci files + + Notes: + Move Linux CI using Github Actions + + Credit: + Gabriel Smith, Marc Hörsken + +- [Mary brought this change] + + libssh2_priv.h: add iovec on 3ds (#575) + + file: libssh2_priv.h + note: include iovec for 3DS + credit: Mary Mstrodl + +- [Laurent Stacul brought this change] + + Tests: Fix unused variables warning (#561) + + file: test_public_key_auth_succeeds_with_correct_ed25519_key_from_mem.c + + notes: fixed unused vars + + credit: + Laurent Stacul + +- [Viktor Szakats brought this change] + + bcrypt_pbkdf.c: fix clang10 false positive warning (#563) + + File: bcrypt_pbkdf.c + + Notes: + blf_enc() takes a number of 64-bit blocks to encrypt, but using + sizeof(uint64_t) in the calculation triggers a warning with + clang 10 because the actual data type is uint32_t. Pass + BCRYPT_BLOCKS / 2 for the number of blocks like libc bcrypt(3) + does. + + Ref: https://github.com/openbsd/src/commit/04a2240bd8f465bcae6b595d912af3e2965856de + + Fixes #562 + + Credit: + Viktor Szakats + +- [Will Cosgrove brought this change] + + transport.c: release payload on error (#554) + + file: transport.c + notes: If the payload is invalid and there is an early return, we could leak the payload + credit: + Will Cosgrove + +- [Will Cosgrove brought this change] + + ssh2_client_fuzzer.cc: fixed building + + The GitHub web editor did some funky things + +- [Will Cosgrove brought this change] + + ssh_client_fuzzer.cc: set blocking mode on (#553) + + file: ssh_client_fuzzer.cc + + notes: the session needs blocking mode turned on to avoid EAGAIN being returned from libssh2_session_handshake() + + credit: + Will Cosgrove, reviewed by Michael Buckley + +- [Etienne Samson brought this change] + + Add a LINT option to CMake (#372) + + * ci: make style-checking available locally + + * cmake: add a linting target + + * tests: check test suite syntax with checksrc.pl + +- [Will Cosgrove brought this change] + + kex.c: kex_agree_instr() improve string reading (#552) + + * kex.c: kex_agree_instr() improve string reading + + file: kex.c + notes: if haystack isn't null terminated we should use memchr() not strchar(). We should also make sure we don't walk off the end of the buffer. + credit: + Will Cosgrove, reviewed by Michael Buckley + +- [Will Cosgrove brought this change] + + kex.c: use string_buf in ecdh_sha2_nistp (#551) + + * kex.c: use string_buf in ecdh_sha2_nistp + + file: kex.c + + notes: + use string_buf in ecdh_sha2_nistp() to avoid attempting to parse malformed data + +- [Will Cosgrove brought this change] + + kex.c: move EC macro outside of if check #549 (#550) + + File: kex.c + + Notes: + Moved the macro LIBSSH2_KEX_METHOD_EC_SHA_HASH_CREATE_VERIFY outside of the LIBSSH2_ECDSA since it's also now used by the ED25519 code. + + Sha 256, 384 and 512 need to be defined for all backends now even if they aren't used directly. I believe this is already the case, but just a heads up. + + Credit: + Stefan-Ghinea + +- [Tim Gates brought this change] + + kex.c: fix simple typo, niumber -> number (#545) + + File: kex.c + + Notes: + There is a small typo in src/kex.c. + + Should read `number` rather than `niumber`. + + Credit: + Tim Gates + +- [Tseng Jun brought this change] + + session.c: Correct a typo which may lead to stack overflow (#533) + + File: session.c + + Notes: + Seems the author intend to terminate banner_dup buffer, later, print it to the debug console. + + Author: + Tseng Jun + +Marc Hoersken (10 Oct 2020) +- wincng: fix random big number generation to match openssl + + The old function would set the least significant bits in + the most significant byte instead of the most significant bits. + + The old function would also zero pad too much bits in the + most significant byte. This lead to a reduction of key space + in the most significant byte according to the following listing: + - 8 bits reduced to 0 bits => eg. 2048 bits to 2040 bits DH key + - 7 bits reduced to 1 bits => eg. 2047 bits to 2041 bits DH key + - 6 bits reduced to 2 bits => eg. 2046 bits to 2042 bits DH key + - 5 bits reduced to 3 bits => eg. 2045 bits to 2043 bits DH key + + No change would occur for the case of 4 significant bits. + For 1 to 3 significant bits in the most significant byte + the DH key would actually be expanded instead of reduced: + - 3 bits expanded to 5 bits => eg. 2043 bits to 2045 bits DH key + - 2 bits expanded to 6 bits => eg. 2042 bits to 2046 bits DH key + - 1 bits expanded to 7 bits => eg. 2041 bits to 2047 bits DH key + + There is no case of 0 significant bits in the most significant byte + since this would be a case of 8 significant bits in the next byte. + + At the moment only the following case applies due to a fixed + DH key size value currently being used in libssh2: + + The DH group_order is fixed to 256 (bytes) which leads to a + 2047 bits DH key size by calculating (256 * 8) - 1. + + This means the DH keyspace was previously reduced from 2047 bits + to 2041 bits (while the top and bottom bits are always set), so the + keyspace is actually always reduced from 2045 bits to 2039 bits. + + All of this is only relevant for Windows versions supporting the + WinCNG backend (Vista or newer) before Windows 10 version 1903. + + Closes #521 + +Daniel Stenberg (28 Sep 2020) +- libssh2_session_callback_set.3: explain the recv/send callbacks + + Describe how to actually use these callbacks. + + Closes #518 + +GitHub (23 Sep 2020) +- [Will Cosgrove brought this change] + + agent.c: formatting + + Improved formatting of RECV_SEND_ALL macro. + +- [Will Cosgrove brought this change] + + CMakeLists.txt: respect install lib dir #405 (#515) + + Files: + CMakeLists.txt + + Notes: + Use CMAKE_INSTALL_LIBDIR directory + + Credit: Arfrever + +- [Will Cosgrove brought this change] + + kex.c: group16-sha512 and group18-sha512 support #457 (#468) + + Files: kex.c + + Notes: + Added key exchange group16-sha512 and group18-sha512. As a result did the following: + + Abstracted diffie_hellman_sha256() to diffie_hellman_sha_algo() which is now algorithm agnostic and takes the algorithm as a parameter since we needed sha512 support. Unfortunately it required some helper functions but they are simple. + Deleted diffie_hellman_sha1() + Deleted diffie_hellman_sha1 specific macro + Cleaned up some formatting + Defined sha384 in os400 and wincng backends + Defined LIBSSH2_DH_MAX_MODULUS_BITS to abort the connection if we receive too large of p from the server doing sha1 key exchange. + Reorder the default key exchange list to match OpenSSH and improve security + + Credit: + Will Cosgrove + +- [Igor Klevanets brought this change] + + agent.c: Recv and send all bytes via network in agent_transact_unix() (#510) + + Files: agent.c + + Notes: + Handle sending/receiving partial packet replies in agent.c API. + + Credit: Klevanets Igor + +- [Daniel Stenberg brought this change] + + Makefile.am: include all test files in the dist #379 + + File: + Makefile.am + + Notes: + No longer conditionally include OpenSSL specific test files, they aren't run if we're not building against OpenSSL 1.1.x anyway. + + Credit: + Daniel Stenberg + +- [Max Dymond brought this change] + + Add support for an OSS Fuzzer fuzzing target (#392) + + Files: + .travis.yml, configure.ac, ossfuzz + + Notes: + This adds support for an OSS-Fuzz fuzzing target in ssh2_client_fuzzer, + which is a cut down example of ssh2.c. Future enhancements can improve + coverage. + + Credit: + Max Dymond + +- [Sebastián Katzer brought this change] + + mbedtls.c: ECDSA support for mbed TLS (#385) + + Files: + mbedtls.c, mbedtls.h, .travis.yml + + Notes: + This PR adds support for ECDSA for both key exchange and host key algorithms. + + The following elliptic curves are supported: + + 256-bit curve defined by FIPS 186-4 and SEC1 + 384-bit curve defined by FIPS 186-4 and SEC1 + 521-bit curve defined by FIPS 186-4 and SEC1 + + Credit: + Sebastián Katzer + +Marc Hoersken (1 Sep 2020) +- buildconf: exec autoreconf to avoid additional process (#512) + + Also make buildconf exit with the return code of autoreconf. + + Follow up to #224 + +- scp.c: fix indentation in shell_quotearg documentation + +- wincng: make more use of new helper functions (#496) + +- wincng: make sure algorithm providers are closed once (#496) + +GitHub (10 Jul 2020) +- [David Benjamin brought this change] + + openssl.c: clean up curve25519 code (#499) + + File: openssl.c, openssl.h, crypto.h, kex.c + + Notes: + This cleans up a few things in the curve25519 implementation: + + - There is no need to create X509_PUBKEYs or PKCS8_PRIV_KEY_INFOs to + extract key material. EVP_PKEY_get_raw_private_key and + EVP_PKEY_get_raw_public_key work fine. + + - libssh2_x25519_ctx was never used (and occasionally mis-typedefed to + libssh2_ed25519_ctx). Remove it. The _libssh2_curve25519_new and + _libssh2_curve25519_gen_k interfaces use the bytes. Note, if it needs + to be added back, there is no need to roundtrip through + EVP_PKEY_new_raw_private_key. EVP_PKEY_keygen already generated an + EVP_PKEY. + + - Add some missing error checks. + + Credit: + David Benjamin + +- [Will Cosgrove brought this change] + + transport.c: socket is disconnected, return error (#500) + + File: transport.c + + Notes: + This is to fix #102, instead of continuing to attempt to read a disconnected socket, it will now error out. + + Credit: + TDi-jonesds + +- [Will Cosgrove brought this change] + + stale.yml + + Increasing stale values. + +Marc Hoersken (6 Jul 2020) +- wincng: try newer DH API first, fallback to legacy RSA API + + Avoid the use of RtlGetVersion or similar Win32 functions, + since these depend on version information from manifests. + + This commit makes the WinCNG backend first try to use the + new DH algorithm API with the raw secret derivation feature. + In case this feature is not available the WinCNG backend + will fallback to the classic approach of using RSA-encrypt + to perform the required modular exponentiation of BigNums. + + The feature availability test is done during the first handshake + and the result is stored in the crypto backends global state. + + Follow up to #397 + Closes #484 + +- wincng: fix indentation of function arguments and comments + + Follow up to #397 + +- [Wez Furlong brought this change] + + wincng: use newer DH API for Windows 8.1+ + + Since Windows 1903 the approach used to perform DH kex with the CNG + API has been failing. + + This commit switches to using the `DH` algorithm provider to perform + generation of the key pair and derivation of the shared secret. + + It uses a feature of CNG that is not yet documented. The sources of + information that I've found on this are: + + * https://stackoverflow.com/a/56378698/149111 + * https://github.com/wbenny/mini-tor/blob/5d39011e632be8e2b6b1819ee7295e8bd9b7a769/mini/crypto/cng/dh.inl#L355 + + With this change I am able to successfully connect from Windows 10 to my + ubuntu system. + + Refs: https://github.com/alexcrichton/ssh2-rs/issues/122 + Fixes: https://github.com/libssh2/libssh2/issues/388 + Closes: https://github.com/libssh2/libssh2/pull/397 + +GitHub (1 Jul 2020) +- [Zenju brought this change] + + comp.c: Fix name clash with ZLIB macro "compress" (#418) + + File: comp.c + + Notes: + * Fix name clash with ZLIB macro "compress". + + Credit: + Zenju + +- [yann-morin-1998 brought this change] + + buildsystem: drop custom buildconf script, rely on autoreconf (#224) + + Notes: + The buildconf script is currently required, because we need to copy a + header around, because it is used both from the library and the examples + sources. + + However, having a custom 'buildconf'-like script is not needed if we can + ensure that the header exists by the time it is needed. For that, we can + just append the src/ directory to the headers search path for the + examples. + + And then it means we no longer need to generate the same header twice, + so we remove the second one from configure.ac. + + Now, we can just call "autoreconf -fi" to generate the autotools files, + instead of relying on the canned sequence in "buildconf", since + autoreconf has now long known what to do at the correct moment (future + versions of autotools, automake, autopoint, autoheader etc... may + require an other ordering, or other intermediate steps, etc...). + + Eventually, get rid of buildconf now it is no longer needed. In fact, we + really keep it for legacy, but have it just call autoreconf (and print a + nice user-friendly warning). Don't include it in the release tarballs, + though. + + Update doc, gitignore, and travis-CI jobs accordingly. + + Credit: + Signed-off-by: "Yann E. MORIN" + Cc: Sam Voss + +- [Will Cosgrove brought this change] + + libssh2.h: Update Diffie Hellman group values (#493) + + File: libssh2.h + + Notes: + Update the min, preferred and max DH group values based on RFC 8270. + + Credit: + Will Cosgrove, noted from email list by Mitchell Holland + +Marc Hoersken (22 Jun 2020) +- travis: use existing Makefile target to run checksrc + +- Makefile: also run checksrc on test source files + +- tests: avoid use of deprecated function _sleep (#490) + +- tests: avoid use of banned function strncat (#489) + +- tests: satisfy checksrc regarding max line length of 79 chars + + Follow up to 2764bc8e06d51876b6796d6080c6ac51e20f3332 + +- tests: satisfy checksrc with whitespace only fixes + + checksrc.pl -i4 -m79 -ASIZEOFNOPAREN -ASNPRINTF + -ACOPYRIGHT -AFOPENMODE tests/*.[ch] + +- tests: add support for ports published via Docker for Windows + +- tests: restore retry behaviour for docker-machine ip command + +- tests: fix mix of declarations and code failing C89 compliance + +- wincng: add and improve checks in bit counting function + +- wincng: align bits to bytes calculation in all functions + +- wincng: do not disable key validation that can be enabled + + The modular exponentiation also works with key validation enabled. + +- wincng: fix return value in _libssh2_dh_secret + + Do not ignore return value of modular exponentiation. + +- appveyor: build and run tests for WinCNG crypto backend + +GitHub (1 Jun 2020) +- [suryakalpo brought this change] + + INSTALL_CMAKE.md: Update formatting (#481) + + File: INSTALL_CMAKE.md + + Notes: + Although the original text would be immediately clear to seasoned users of CMAKE and/or Unix shell, the lack of newlines may cause some confusion for newcomers. Hence, wrapping the texts in a md code-block such that the newlines appear as intended. + + credit: + suryakalpo + +Marc Hoersken (31 May 2020) +- src: add new and align include guards in header files (#480) + + Make sure all include guards exist and follow the same format. + +- wincng: fix multiple definition of `_libssh2_wincng' (#479) + + Add missing include guard and move global state + from header to source file by using extern. + +GitHub (28 May 2020) +- [Will Cosgrove brought this change] + + transport.c: moving total_num check from #476 (#478) + + file: transport.c + + notes: + moving total_num zero length check from #476 up to the prior bounds check which already includes a total_num check. Makes it slightly more readable. + + credit: + Will Cosgrove + +- [lutianxiong brought this change] + + transport.c: fix use-of-uninitialized-value (#476) + + file:transport.c + + notes: + return error if malloc(0) + + credit: + lutianxiong + +- [Dr. Koutheir Attouchi brought this change] + + libssh2_sftp.h: Changed type of LIBSSH2_FX_* constants to unsigned long, fixes #474 + + File: + libssh2_sftp.h + + Notes: + Error constants `LIBSSH2_FX_*` are only returned by `libssh2_sftp_last_error()` which returns `unsigned long`. + Therefore these constants should be defined as unsigned long literals, instead of int literals. + + Credit: + Dr. Koutheir Attouchi + +- [monnerat brought this change] + + os400qc3.c: constify libssh2_os400qc3_hash_update() data parameter. (#469) + + Files: os400qc3.c, os400qc3.h + + Notes: + Fixes building on OS400. #426 + + Credit: + Reported-by: hjindra on github, dev by Monnerat + +- [monnerat brought this change] + + HACKING.CRYPTO: keep up to date with new crypto definitions from code. (#466) + + File: HACKING.CRYPTO + + Notes: + This commit updates the HACKING.CRYPTO documentation file in an attempt to make it in sync with current code. + New documented features are: + + SHA384 + SHA512 + ECDSA + ED25519 + + Credit: + monnerat + +- [Harry Sintonen brought this change] + + kex.c: Add diffie-hellman-group14-sha256 Key Exchange Method (#464) + + File: kex.c + + Notes: Added diffie-hellman-group14-sha256 kex + + Credit: Harry Sintonen + +- [Will Cosgrove brought this change] + + os400qc3.h: define sha512 macros (#465) + + file: os400qc3.h + notes: fixes for building libssh2 1.9.x + +- [Will Cosgrove brought this change] + + os400qc3.h: define EC types to fix building #426 (#462) + + File: os400qc3.h + Notes: define missing EC types which prevents building + Credit: hjindra + +- [Brendan Shanks brought this change] + + hostkey.c: Fix 'unsigned int'/'uint32_t' mismatch (#461) + + File: hostkey.c + + Notes: + These types are the same size so most compilers are fine with it, but CodeWarrior (on classic MacOS) throws an ‘illegal implicit conversion’ error + + Credit: Brendan Shanks + +- [Thomas Klausner brought this change] + + Makefile.am: Fix unportable test(1) operator. (#459) + + file: Makefile.am + + Notes: + The POSIX comparison operator for test(1) is =; bash supports == but not even test from GNU coreutils does. + + Credit: + Thomas Klausner + +- [Tseng Jun brought this change] + + openssl.c: minor changes of coding style (#454) + + File: openssl.c + + Notes: + minor changes of coding style and align preprocessor conditional for #439 + + Credit: + Tseng Jun + +- [Hans Meier brought this change] + + openssl.c: Fix for use of uninitialized aes_ctr_cipher.key_len (#453) + + File: + Openssl.c + + Notes: + * Fix for use of uninitialized aes_ctr_cipher.key_len when using HAVE_OPAQUE_STRUCTS, regression from #439 + + Credit: + Hans Meirer, Tseng Jun + +- [Zenju brought this change] + + agent.c: Fix Unicode builds on Windows (#417) + + File: agent.c + + Notes: + Fixes unicode builds for Windows in Visual Studio 16.3.2. + + Credit: + Zenju + +- [Hans Meier brought this change] + + openssl.c: Fix use-after-free crash in openssl backend without memory leak (#439) + + Files: openssl.c + + Notes: + Fixes memory leaks and use after free AES EVP_CIPHER contexts when using OpenSSL 1.0.x. + + Credit: + Hans Meier + +- [Romain Geissler @ Amadeus brought this change] + + Session.c: Fix undefined warning when mixing with LTO-enabled libcurl. (#449) + + File: Session.c + + Notes: + With gcc 9, libssh2, libcurl and LTO enabled for all binaries I see this + warning (error with -Werror): + + vssh/libssh2.c: In function ‘ssh_statemach_act’: + /data/mwrep/rgeissler/ospack/ssh2/BUILD/libssh2-libssh2-03c7c4a/src/session.c:579:9: error: ‘seconds_to_next’ is used uninitialized in this function [-Werror=uninitialized] + 579 | int seconds_to_next; + | ^ + lto1: all warnings being treated as errors + + Gcc normally issues -Wuninitialized when it is sure there is a problem, + and -Wmaybe-uninitialized when it's not sure, but it's possible. Here + the compiler seems to have find a real case where this could happen. I + looked in your code and overall it seems you always check if the return + code is non null, not often that it's below zero. I think we should do + the same here. With this patch, gcc is fine. + + Credit: + Romain-Geissler-1A + +- [Zenju brought this change] + + transport.c: Fix crash with delayed compression (#443) + + Files: transport.c + + Notes: + Fixes crash with delayed compression option using Bitvise server. + + Contributor: + Zenju + +- [Will Cosgrove brought this change] + + Update INSTALL_MAKE path to INSTALL_MAKE.md (#446) + + Included for #429 + +- [Will Cosgrove brought this change] + + Update INSTALL_CMAKE filename to INSTALL_CMAKE.md (#445) + + Fixing for #429 + +- [Wallace Souza brought this change] + + Rename INSTALL_CMAKE to INTALL_CMAKE.md (#429) + + Adding Markdown file extension in order to Github render the instructions properly + +Will Cosgrove (17 Dec 2019) +- [Daniel Stenberg brought this change] + + include/libssh2.h: fix comment: the known host key uses 4 bits (#438) + +- [Zenju brought this change] + + ssh-ed25519: Support PKIX + calc pubkey from private (#416) + + Files: openssl.c/h + Author: Zenju + Notes: + Adds support for PKIX key reading by fixing: + + _libssh2_pub_priv_keyfile() is missing the code to extract the ed25519 public key from a given private key + + _libssh2_ed25519_new_private_frommemory is only parsing the openssh key format but does not understand PKIX (as retrieved via PEM_read_bio_PrivateKey) + +GitHub (15 Oct 2019) +- [Will Cosgrove brought this change] + + .travis.yml: Fix Chrome and 32 bit builds (#423) + + File: .travis.yml + + Notes: + * Fix Chrome installing by using Travis build in directive + * Update to use libgcrypt20-dev package to fix 32 bit builds based on comments found here: + https://launchpad.net/ubuntu/xenial/i386/libgcrypt11-dev + +- [Will Cosgrove brought this change] + + packet.c: improved parsing in packet_x11_open (#410) + + Use new API to parse data in packet_x11_open() for better bounds checking. + +Will Cosgrove (12 Sep 2019) +- [Michael Buckley brought this change] + + knownhost.c: Double the static buffer size when reading and writing known hosts (#409) + + Notes: + We had a user who was being repeatedly prompted to accept a server key repeatedly. It turns out the base64-encoded key was larger than the static buffers allocated to read and write known hosts. I doubled the size of these buffers. + + Credit: + Michael Buckley + +GitHub (4 Sep 2019) +- [Will Cosgrove brought this change] + + packet.c: improved packet parsing in packet_queue_listener (#404) + + * improved bounds checking in packet_queue_listener + + file: packet.c + + notes: + improved parsing packet in packet_queue_listener + +- [Will Cosgrove brought this change] + + packet.c: improve message parsing (#402) + + * packet.c: improve parsing of packets + + file: packet.c + + notes: + Use _libssh2_get_string API in SSH_MSG_DEBUG/SSH_MSG_DISCONNECT. Additional uint32 bounds check in SSH_MSG_GLOBAL_REQUEST. + +- [Will Cosgrove brought this change] + + misc.c: _libssh2_ntohu32 cast bit shifting (#401) + + To quite overly aggressive analyzers. + + Note, the builds pass, Travis is having some issues with Docker images. + +- [Will Cosgrove brought this change] + + kex.c: improve bounds checking in kex_agree_methods() (#399) + + file: kex.c + + notes: + use _libssh2_get_string instead of kex_string_pair which does additional checks + +Will Cosgrove (23 Aug 2019) +- [Fabrice Fontaine brought this change] + + acinclude.m4: add mbedtls to LIBS (#371) + + Notes: + This is useful for static builds so that the Libs.private field in + libssh2.pc contains correct info for the benefit of pkg-config users. + Static link with libssh2 requires this information. + + Signed-off-by: Baruch Siach + [Retrieved from: + https://git.buildroot.net/buildroot/tree/package/libssh2/0002-acinclude.m4-add-mbedtls-to-LIBS.patch] + Signed-off-by: Fabrice Fontaine + + Credit: + Fabrice Fontaine + +- [jethrogb brought this change] + + Generate debug info when building with MSVC (#178) + + files: CMakeLists.txt + + notes: Generate debug info when building with MSVC + + credit: + jethrogb + +- [Panos brought this change] + + Add agent forwarding implementation (#219) + + files: channel.c, test_agent_forward_succeeds.c, libssh2_priv.h, libssh2.h, ssh2_agent_forwarding.c + + notes: + * Adding SSH agent forwarding. + * Fix agent forwarding message, updated example. + Added integration test code and cmake target. Added example to cmake list. + + credit: + pkittenis + +GitHub (2 Aug 2019) +- [Will Cosgrove brought this change] + + Update EditorConfig + + Added max_line_length = 80 + +- [Will Cosgrove brought this change] + + global.c : fixed call to libssh2_crypto_exit #394 (#396) + + * global.c : fixed call to libssh2_crypto_exit #394 + + File: global.c + + Notes: Don't call `libssh2_crypto_exit()` until `_libssh2_initialized` count is down to zero. + + Credit: seba30 + +Will Cosgrove (30 Jul 2019) +- [hlefebvre brought this change] + + misc.c : Add an EWOULDBLOCK check for better portability (#172) + + File: misc.c + + Notes: Added support for all OS' that implement EWOULDBLOCK, not only VMS + + Credit: hlefebvre + +- [Etienne Samson brought this change] + + userauth.c: fix off by one error when loading public keys with no id (#386) + + File: userauth.c + + Credit: + Etienne Samson + + Notes: + Caught by ASAN: + + ================================================================= + ==73797==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x60700001bcf0 at pc 0x00010026198d bp 0x7ffeefbfed30 sp 0x7ffeefbfe4d8 + READ of size 69 at 0x60700001bcf0 thread T0 + 2019-07-04 08:35:30.292502+0200 atos[73890:2639175] examining /Users/USER/*/libssh2_clar [73797] + #0 0x10026198c in wrap_memchr (libclang_rt.asan_osx_dynamic.dylib:x86_64h+0x1f98c) + #1 0x1000f8e66 in file_read_publickey userauth.c:633 + #2 0x1000f2dc9 in userauth_publickey_fromfile userauth.c:1513 + #3 0x1000f2948 in libssh2_userauth_publickey_fromfile_ex userauth.c:1590 + #4 0x10000e254 in test_userauth_publickey__ed25519_auth_ok publickey.c:69 + #5 0x1000090c3 in clar_run_test clar.c:260 + #6 0x1000038f3 in clar_run_suite clar.c:343 + #7 0x100003272 in clar_test_run clar.c:522 + #8 0x10000c3cc in main runner.c:60 + #9 0x7fff5b43b3d4 in start (libdyld.dylib:x86_64+0x163d4) + + 0x60700001bcf0 is located 0 bytes to the right of 80-byte region [0x60700001bca0,0x60700001bcf0) + allocated by thread T0 here: + #0 0x10029e053 in wrap_malloc (libclang_rt.asan_osx_dynamic.dylib:x86_64h+0x5c053) + #1 0x1000b4978 in libssh2_default_alloc session.c:67 + #2 0x1000f8aba in file_read_publickey userauth.c:597 + #3 0x1000f2dc9 in userauth_publickey_fromfile userauth.c:1513 + #4 0x1000f2948 in libssh2_userauth_publickey_fromfile_ex userauth.c:1590 + #5 0x10000e254 in test_userauth_publickey__ed25519_auth_ok publickey.c:69 + #6 0x1000090c3 in clar_run_test clar.c:260 + #7 0x1000038f3 in clar_run_suite clar.c:343 + #8 0x100003272 in clar_test_run clar.c:522 + #9 0x10000c3cc in main runner.c:60 + #10 0x7fff5b43b3d4 in start (libdyld.dylib:x86_64+0x163d4) + + SUMMARY: AddressSanitizer: heap-buffer-overflow (libclang_rt.asan_osx_dynamic.dylib:x86_64h+0x1f98c) in wrap_memchr + Shadow bytes around the buggy address: + 0x1c0e00003740: fd fd fd fd fd fd fd fd fd fd fa fa fa fa fd fd + 0x1c0e00003750: fd fd fd fd fd fd fd fa fa fa fa fa 00 00 00 00 + 0x1c0e00003760: 00 00 00 00 00 00 fa fa fa fa 00 00 00 00 00 00 + 0x1c0e00003770: 00 00 00 fa fa fa fa fa fd fd fd fd fd fd fd fd + 0x1c0e00003780: fd fd fa fa fa fa fd fd fd fd fd fd fd fd fd fa + =>0x1c0e00003790: fa fa fa fa 00 00 00 00 00 00 00 00 00 00[fa]fa + 0x1c0e000037a0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa + 0x1c0e000037b0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa + 0x1c0e000037c0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa + 0x1c0e000037d0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa + 0x1c0e000037e0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa + Shadow byte legend (one shadow byte represents 8 application bytes): + Addressable: 00 + Partially addressable: 01 02 03 04 05 06 07 + Heap left redzone: fa + Freed heap region: fd + Stack left redzone: f1 + Stack mid redzone: f2 + Stack right redzone: f3 + Stack after return: f5 + Stack use after scope: f8 + Global redzone: f9 + Global init order: f6 + Poisoned by user: f7 + Container overflow: fc + Array cookie: ac + Intra object redzone: bb + ASan internal: fe + Left alloca redzone: ca + Right alloca redzone: cb + Shadow gap: cc + +- [Thilo Schulz brought this change] + + openssl.c : Fix use-after-free crash on reinitialization of openssl backend + + file : openssl.c + + notes : + libssh2's openssl backend has a use-after-free condition if HAVE_OPAQUE_STRUCTS is defined and you call libssh2_init() again after prior initialisation/deinitialisation of libssh2 + + credit : Thilo Schulz + +- [axjowa brought this change] + + openssl.h : Use of ifdef where if should be used (#389) + + File : openssl.h + + Notes : + LIBSSH2_ECDSA and LIBSSH2_ED25519 are always defined so the #ifdef + checks would never be false. + + This change makes it possible to build libssh2 against OpenSSL built + without EC support. + + Change-Id: I0a2f07c2d80178314dcb7d505d1295d19cf15afd + + Credit : axjowa + +- [Zenju brought this change] + + Agent.c : Preserve error info from agent_list_identities() (#374) + + Files : agent.c + + Notes : + Currently the error details as returned by agent_transact_pageant() are overwritten by a generic "agent list id failed" message by int agent_list_identities(LIBSSH2_AGENT* agent). + + Credit : + Zenju + +- [Who? Me?! brought this change] + + Channel.c: Make sure the error code is set in _libssh2_channel_open() (#381) + + File : Channel.c + + Notes : + if _libssh2_channel_open() fails, set the error code. + + Credit : + mark-i-m + +- [Orgad Shaneh brought this change] + + Kex.c, Remove unneeded call to strlen (#373) + + File : Kex.c + + Notes : + Removed call to strlen + + Credit : + Orgad Shaneh + +- [Pedro Monreal brought this change] + + Spelling corrections (#380) + + Files : + libssh2.h, libssh2_sftp.h, bcrypt_pbkdf.c, mbedtls.c, sftp.c, ssh2.c + + Notes : + * Fixed misspellings + + Credit : + Pedro Monreal + +- [Sebastián Katzer brought this change] + + Fix Potential typecast error for `_libssh2_ecdsa_key_get_curve_type` (#383) + + Issue : #383 + + Files : hostkey.c, crypto.h, openssl.c + + Notes : + * Fix potential typecast error for `_libssh2_ecdsa_key_get_curve_type` + * Rename _libssh2_ecdsa_key_get_curve_type to _libssh2_ecdsa_get_curve_type + + Credit : + Sebastián Katzer + +GitHub (20 Jun 2019) +- [Will Cosgrove brought this change] + + bump copyright date + +Version 1.9.0 (19 Jun 2019) + +GitHub (19 Jun 2019) +- [Will Cosgrove brought this change] + + 1.9 Formatting + +- [Will Cosgrove brought this change] + + 1.9 Release notes + +Will Cosgrove (17 May 2019) +- [Alexander Curtiss brought this change] + + libgcrypt.c : Fixed _libssh2_rsa_sha1_sign memory leak. (#370) + + File: libgcrypt.c + + Notes : Added calls to gcry_sexp_release to free memory allocated by gcry_sexp_find_token + + Credit : + Reporter : beckmi + PR by: Alexander Curtiss + +- [Orivej Desh brought this change] + + libssh2_priv.h : Fix musl build warning on sys/poll.h (#346) + + File : libssh2_priv.h + + Notes : + musl prints `redirecting incorrect #include to ` + http://git.musl-libc.org/cgit/musl/commit/include/sys/poll.h?id=54446d730cfb17c5f7bcf57f139458678f5066cc + + poll is defined by POSIX to be in poll.h: + http://pubs.opengroup.org/onlinepubs/7908799/xsh/poll.html + + Credit : Orivej Desh + +GitHub (1 May 2019) +- [Will Cosgrove brought this change] + + kex.c : additional bounds checks in diffie_hellman_sha1/256 (#361) + + Files : kex.c, misc.c, misc.h + + Notes : + Fixed possible out of bounds memory access when reading malformed data in diffie_hellman_sha1() and diffie_hellman_sha256(). + + Added _libssh2_copy_string() to misc.c to return an allocated and filled char buffer from a string_buf offset. Removed no longer needed s var in kmdhgGPshakex_state_t. + +Will Cosgrove (26 Apr 2019) +- [Tseng Jun brought this change] + + sftp.c : sftp_bin2attr() Correct attrs->gid assignment (#366) + + Regression with fix for #339 + + Credit : Tseng Jun + +- [Tseng Jun brought this change] + + kex.c : Correct type cast in curve25519_sha256() (#365) + +GitHub (24 Apr 2019) +- [Will Cosgrove brought this change] + + transport.c : scope local total_num var (#364) + + file : transport.c + notes : move local `total_num` variable inside of if block to prevent scope access issues which caused #360. + +Will Cosgrove (24 Apr 2019) +- [doublex brought this change] + + transport.c : fixes bounds check if partial packet is read + + Files : transport.c + + Issue : #360 + + Notes : + 'p->total_num' instead of local value total_num when doing bounds check. + + Credit : Doublex + +GitHub (23 Apr 2019) +- [Will Cosgrove brought this change] + + Editor config file for source files (#322) + + Simple start to an editor config file when editing source files to make sure they are configured correctly. + +- [Will Cosgrove brought this change] + + misc.c : String buffer API improvements (#332) + + Files : misc.c, hostkey.c, kex.c, misc.h, openssl.c, sftp.c + + Notes : + * updated _libssh2_get_bignum_bytes and _libssh2_get_string. Now pass in length as an argument instead of returning it to keep signedness correct. Now returns -1 for failure, 0 for success. + + _libssh2_check_length now returns 0 on success and -1 on failure to match the other string_buf functions. Added comment to _libssh2_check_length. + + Credit : Will Cosgrove + +Will Cosgrove (19 Apr 2019) +- [doublex brought this change] + + mbedtls.c : _libssh2_mbedtls_rsa_new_private_frommemory() allow private-key from memory (#359) + + File : mbedtls.c + + Notes: _libssh2_mbedtls_rsa_new_private_frommemory() fixes private-key from memory reading to by adding NULL terminator before parsing; adds passphrase support. + + Credit: doublex + +- [Ryan Kelley brought this change] + + Session.c : banner_receive() from leaking when accessing non ssh ports (#356) + + File : session.c + + Release previous banner in banner_receive() if the session is reused after a failed connection. + + Credit : Ryan Kelley + +GitHub (11 Apr 2019) +- [Will Cosgrove brought this change] + + Formatting in agent.c + + Removed whitespace. + +- [Will Cosgrove brought this change] + + Fixed formatting in agent.c + + Quiet linter around a couple if blocks and pointer. + +Will Cosgrove (11 Apr 2019) +- [Zhen-Huan HWANG brought this change] + + sftp.c : discard and reset oversized packet in sftp_packet_read() (#269) + + file : sftp.c + + notes : when sftp_packet_read() encounters an sftp packet which exceeds SFTP max packet size it now resets the reading state so it can continue reading. + + credit : Zhen-Huan HWANG + +GitHub (11 Apr 2019) +- [Will Cosgrove brought this change] + + Add agent functions libssh2_agent_get_identity_path() and libssh2_agent_set_identity_path() (#308) + + File : agent.c + + Notes : + Libssh2 uses the SSH_AUTH_SOCK env variable to read the system agent location. However, when using a custom agent path you have to set this value using setenv which is not thread-safe. The new functions allow for a way to set a custom agent socket path in a thread safe manor. + +- [Will Cosgrove brought this change] + + Simplified _libssh2_check_length (#350) + + * Simplified _libssh2_check_length + + misc.c : _libssh2_check_length() + + Removed cast and improved bounds checking and format. + + Credit : Yuriy M. Kaminskiy + +- [Will Cosgrove brought this change] + + _libssh2_check_length() : additional bounds check (#348) + + Misc.c : _libssh2_check_length() + + Ensure the requested length is less than the total length before doing the additional bounds check + +Daniel Stenberg (25 Mar 2019) +- misc: remove 'offset' from string_buf + + It isn't necessary. + + Closes #343 + +- sftp: repair mtime from e1ead35e475 + + A regression from e1ead35e4759 broke the SFTP mtime logic in + sftp_bin2attr + + Also simplified the _libssh2_get_u32/u64 functions slightly. + + Closes #342 + +- session_disconnect: don't zero state, just clear the right bit + + If we clear the entire field, the freeing of data in session_free() is + skipped. Instead just clear the bit that risk making the code get stuck + in the transport functions. + + Regression from 4d66f6762ca3fc45d9. + + Reported-by: dimmaq on github + Fixes #338 + Closes #340 + +- libssh2_sftp.h: restore broken ABI + + Commit 41fbd44 changed variable sizes/types in a public struct which + broke the ABI, which breaks applications! + + This reverts that change. + + Closes #339 + +- style: make includes and examples code style strict + + make travis and the makefile rule verify them too + + Closes #334 + +GitHub (21 Mar 2019) +- [Daniel Stenberg brought this change] + + create a github issue template + +Daniel Stenberg (21 Mar 2019) +- stale-bot: activated + + The stale bot will automatically mark stale issues (inactive for 90 + days) and if still untouched after 21 more days, close them. + + See https://probot.github.io/apps/stale/ + +- libssh2_session_supported_algs.3: fix formatting mistakes + + Reported-by: Max Horn + Fixes #57 + +- [Zenju brought this change] + + libssh2.h: Fix Error C2371 'ssize_t': redefinition + + Closes #331 + +- travis: add code style check + + Closes #324 + +- code style: unify code style + + Indent-level: 4 + Max columns: 79 + No spaces after if/for/while + Unified brace positions + Unified white spaces + +- src/checksrc.pl: code style checker + + imported as-is from curl + +Will Cosgrove (19 Mar 2019) +- Merge branch 'MichaelBuckley-michaelbuckley-security-fixes' + +- Silence unused var warnings (#329) + + Silence warnings about unused variables in this test + +- Removed unneeded > 0 check + + When checking `userauth_kybd_num_prompts > 100` we don't care if it's also above zero. + +- [Matthew D. Fuller brought this change] + + Spell OpenSS_H_ right when talking about their specific private key (#321) + + Good catch, thanks. + +GitHub (19 Mar 2019) +- [Will Cosgrove brought this change] + + Silence unused var warnings (#329) + + Silence warnings about unused variables in this test + +Michael Buckley (19 Mar 2019) +- Fix more scope and printf warning errors + +- Silence unused variable warning + +GitHub (19 Mar 2019) +- [Will Cosgrove brought this change] + + Removed unneeded > 0 check + + When checking `userauth_kybd_num_prompts > 100` we don't care if it's also above zero. + +Will Cosgrove (19 Mar 2019) +- [Matthew D. Fuller brought this change] + + Spell OpenSS_H_ right when talking about their specific private key (#321) + + Good catch, thanks. + +Michael Buckley (18 Mar 2019) +- Fix errors identified by the build process + +- Fix casting errors after merge + +GitHub (18 Mar 2019) +- [Michael Buckley brought this change] + + Merge branch 'master' into michaelbuckley-security-fixes + +Michael Buckley (18 Mar 2019) +- Move fallback SIZE_MAX and UINT_MAX to libssh2_priv.h + +- Fix type and logic issues with _libssh2_get_u64 + +Daniel Stenberg (17 Mar 2019) +- examples: fix various compiler warnings + +- lib: fix various compiler warnings + +- session: ignore pedantic warnings for funcpointer <=> void * + +- travis: add a build using configure + + Closes #320 + +- configure: provide --enable-werror + +- appveyor: remove old builds that mostly cause failures + + ... and only run on master branch. + + Closes #323 + +- cmake: add two missing man pages to get installed too + + Both libssh2_session_handshake.3 and + libssh2_userauth_publickey_frommemory.3 were installed by the configure + build already. + + Reported-by: Arfrever on github + Fixes #278 + +- include/libssh2.h: warning: "_WIN64" is not defined, evaluates to 0 + + We don't use #if for defines that might not be defined. + +- pem: //-comments are not allowed + +Will Cosgrove (14 Mar 2019) +- [Daniel Stenberg brought this change] + + userauth: fix "Function call argument is an uninitialized value" (#318) + + Detected by scan-build. + +- fixed unsigned/signed issue + +Daniel Stenberg (15 Mar 2019) +- session_disconnect: clear state + + If authentication is started but not completed before the application + gives up and instead wants to shut down the session, the '->state' field + might still be set and thus effectively dead-lock session_disconnect. + + This happens because both _libssh2_transport_send() and + _libssh2_transport_read() refuse to do anything as long as state is set + without the LIBSSH2_STATE_KEX_ACTIVE bit. + + Reported in curl bug https://github.com/curl/curl/issues/3650 + + Closes #310 + +Will Cosgrove (14 Mar 2019) +- Release notes from 1.8.1 + +Michael Buckley (14 Mar 2019) +- Use string_buf in sftp_init(). + +- Guard against out-of-bounds reads in publickey.c + +- Guard against out-of-bounds reads in session.c + +- Guard against out-of-bounds reads in userauth.c + +- Use LIBSSH2_ERROR_BUFFER_TOO_SMALL instead of LIBSSH2_ERROR_OUT_OF_BOUNDARY in sftp.c + +- Additional bounds checking in sftp.c + +- Additional length checks to prevent out-of-bounds reads and writes in _libssh2_packet_add(). https://libssh2.org/CVE-2019-3862.html + +- Add a required_size parameter to sftp_packet_require et. al. to require callers of these functions to handle packets that are too short. https://libssh2.org/CVE-2019-3860.html + +- Check the length of data passed to sftp_packet_add() to prevent out-of-bounds reads. + +- Prevent zero-byte allocation in sftp_packet_read() which could lead to an out-of-bounds read. https://libssh2.org/CVE-2019-3858.html + +- Sanitize padding_length - _libssh2_transport_read(). https://libssh2.org/CVE-2019-3861.html + + This prevents an underflow resulting in a potential out-of-bounds read if a server sends a too-large padding_length, possibly with malicious intent. + +- Defend against writing beyond the end of the payload in _libssh2_transport_read(). + +- Defend against possible integer overflows in comp_method_zlib_decomp. + +GitHub (14 Mar 2019) +- [Will Cosgrove brought this change] + + Security fixes (#315) + + * Bounds checks + + Fixes for CVEs + https://www.libssh2.org/CVE-2019-3863.html + https://www.libssh2.org/CVE-2019-3856.html + + * Packet length bounds check + + CVE + https://www.libssh2.org/CVE-2019-3855.html + + * Response length check + + CVE + https://www.libssh2.org/CVE-2019-3859.html + + * Bounds check + + CVE + https://www.libssh2.org/CVE-2019-3857.html + + * Bounds checking + + CVE + https://www.libssh2.org/CVE-2019-3859.html + + and additional data validation + + * Check bounds before reading into buffers + + * Bounds checking + + CVE + https://www.libssh2.org/CVE-2019-3859.html + + * declare SIZE_MAX and UINT_MAX if needed + +- [Will Cosgrove brought this change] + + fixed type warnings (#309) + +- [Will Cosgrove brought this change] + + Bumping version number for pending 1.8.1 release + +Will Cosgrove (4 Mar 2019) +- [Daniel Stenberg brought this change] + + _libssh2_string_buf_free: use correct free (#304) + + Use LIBSSH2_FREE() here, not free(). We allow memory function + replacements so free() is rarely the right choice... + +GitHub (26 Feb 2019) +- [Will Cosgrove brought this change] + + Fix for building against libreSSL #302 + + Changed to use the check we use elsewhere. + +- [Will Cosgrove brought this change] + + Fix for when building against LibreSSL #302 + +Will Cosgrove (25 Feb 2019) +- [gartens brought this change] + + docs: update libssh2_hostkey_hash.3 [ci skip] (#301) + +GitHub (21 Feb 2019) +- [Will Cosgrove brought this change] + + fix malloc/free mismatches #296 (#297) + +- [Will Cosgrove brought this change] + + Replaced malloc with calloc #295 + +- [Will Cosgrove brought this change] + + Abstracted OpenSSL calls out of hostkey.c (#294) + +- [Will Cosgrove brought this change] + + Fix memory dealloc impedance mis-match #292 (#293) + + When using ed25519 host keys and a custom memory allocator. + +- [Will Cosgrove brought this change] + + Added call to OpenSSL_add_all_digests() #288 + + For OpenSSL 1.0.x we need to call OpenSSL_add_all_digests(). + +Will Cosgrove (12 Feb 2019) +- [Zhen-Huan HWANG brought this change] + + SFTP: increase maximum packet size to 256K (#268) + + to match implementations like OpenSSH. + +- [Zenju brought this change] + + Fix https://github.com/libssh2/libssh2/pull/271 (#284) + +GitHub (16 Jan 2019) +- [Will Cosgrove brought this change] + + Agent NULL check in shutdown #281 + +Will Cosgrove (15 Jan 2019) +- [Adrian Moran brought this change] + + mbedtls: Fix leak of 12 bytes by each key exchange. (#280) + + Correctly free ducts by calling _libssh2_mbedtls_bignum_free() in dtor. + +- [alex-weaver brought this change] + + Fix error compiling on Win32 with STDCALL=ON (#275) + +GitHub (8 Nov 2018) +- [Will Cosgrove brought this change] + + Allow default permissions to be used in sftp_mkdir (#271) + + Added constant LIBSSH2_SFTP_DEFAULT_MODE to use the server default permissions when making a new directory + +Will Cosgrove (13 Sep 2018) +- [Giulio Benetti brought this change] + + openssl: fix dereferencing ambiguity potentially causing build failure (#267) + + When dereferencing from *aes_ctr_cipher, being a pointer itself, + ambiguity can occur; fixed possible build errors. + +Viktor Szakats (12 Sep 2018) +- win32/GNUmakefile: define HAVE_WINDOWS_H + + This macro was only used in test/example code before, now it is + also used in library code, but only defined automatically by + automake/cmake, so let's do the same for the standalone win32 + make file. + + It'd be probably better to just rely on the built-in _WIN32 macro + to detect the presence of windows.h though. It's already used + in most of libssh2 library code. There is a 3rd, similar macro + named LIBSSH2_WIN32, which might also be replaced with _WIN32. + + Ref: https://github.com/libssh2/libssh2/commit/8b870ad771cbd9cd29edbb3dbb0878e950f868ab + Closes https://github.com/libssh2/libssh2/pull/266 + +Marc Hoersken (2 Sep 2018) +- Fix conditional check for HAVE_DECL_SECUREZEROMEMORY + + "Unlike the other `AC_CHECK_*S' macros, when a symbol is not declared, + HAVE_DECL_symbol is defined to `0' instead of leaving HAVE_DECL_symbol + undeclared. When you are sure that the check was performed, + use HAVE_DECL_symbol in #if." + + Source: autoconf documentation for AC_CHECK_DECLS. + +- Fix implicit declaration of function 'SecureZeroMemory' + + Include window.h in order to use SecureZeroMemory on Windows. + +- Fix implicit declaration of function 'free' by including stdlib.h + +GitHub (27 Aug 2018) +- [Will Cosgrove brought this change] + + Use malloc abstraction function in pem parse + + Fix warning on WinCNG build. + +- [Will Cosgrove brought this change] + + Fixed possible junk memory read in sftp_stat #258 + +- [Will Cosgrove brought this change] + + removed INT64_C define (#260) + + No longer used. + +- [Will Cosgrove brought this change] + + Added conditional around engine.h include + +Will Cosgrove (6 Aug 2018) +- [Alex Crichton brought this change] + + Fix OpenSSL link error with `no-engine` support (#259) + + This commit fixes linking against an OpenSSL library that was compiled with + `no-engine` support by bypassing the initialization routines as they won't be + available anyway. + +GitHub (2 Aug 2018) +- [Will Cosgrove brought this change] + + ED25519 Key Support #39 (#248) + + OpenSSH Key and ED25519 support #39 + Added _libssh2_explicit_zero() to explicitly zero sensitive data in memory #120 + + * ED25519 Key file support - Requires OpenSSL 1.1.1 or later + * OpenSSH Key format reading support - Supports RSA/DSA/ECDSA/ED25519 types + * New string buffer reading functions - These add build-in bounds checking and convenance methods. Used for OpenSSL PEM file reading. + * Added new tests for OpenSSH formatted Keys + +- [Will Cosgrove brought this change] + + ECDSA key types are now explicit (#251) + + * ECDSA key types are now explicit + + Issue was brough up in pull request #248 diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/doc/libssh2/README b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/doc/libssh2/README new file mode 100644 index 0000000000000000000000000000000000000000..fca539dbbc94b890eb4a9a00e4713bf5e817d977 --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/doc/libssh2/README @@ -0,0 +1,19 @@ +libssh2 - SSH2 library +====================== + +libssh2 is a library implementing the SSH2 protocol, available under +the revised BSD license. + +Web site: https://libssh2.org/ + +Mailing list: https://lists.haxx.se/listinfo/libssh2-devel + +License: see COPYING + +Source code: https://github.com/libssh2/libssh2 + +Web site source code: https://github.com/libssh2/www + +Installation instructions are in: + - docs/INSTALL_CMAKE for CMake + - docs/INSTALL_AUTOTOOLS for Autotools diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/doc/libssh2/RELEASE-NOTES b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/doc/libssh2/RELEASE-NOTES new file mode 100644 index 0000000000000000000000000000000000000000..d9af1689d697ce61d1b64c52fbbb49812a3a4d45 --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/doc/libssh2/RELEASE-NOTES @@ -0,0 +1,325 @@ +libssh2 1.11.1 + +Deprecation notices: + +- Starting October 2024, the following algos go deprecated and will be + disabled in default builds (with an option to enable them): + + - DSA: `ssh-dss` hostkeys. + You can enable it now with `-DLIBSSH2_DSA_ENABLE`. + Disabled by default in OpenSSH 7.0 (2015-08-11). + Support to be removed by early 2025 from OpenSSH. + - MD5-based MACs and hashes: `hmac-md5`, `hmac-md5-96`, + `LIBSSH2_HOSTKEY_HASH_MD5` + You can disable it now with `-DLIBSSH2_NO_MD5`. + Disabled by default since OpenSSH 7.2 (2016-02-29). + - 3DES cipher: `3des-cbc` + You can disable it now with `-DLIBSSH2_NO_3DES`. + Disabled by default since OpenSSH 7.4 (2016-12-19). + - RIPEMD-160 MACs: `hmac-ripemd160`, `hmac-ripemd160@openssh.com` + You can disable it now with `-DLIBSSH2_NO_HMAC_RIPEMD`. + Removed in OpenSSH 7.6 (2017-10-03). + - Blowfish cipher: `blowfish-cbc` + You can disable it now with `-DLIBSSH2_NO_BLOWFISH`. + Removed in OpenSSH 7.6 (2017-10-03). + - RC4 ciphers: `arcfour`, `arcfour128` + You can disable it now with `-DLIBSSH2_NO_RC4`. + Removed in OpenSSH 7.6 (2017-10-03). + - CAST cipher: `cast128-cbc` + You can disable it now with `-DLIBSSH2_NO_CAST`. + Removed in OpenSSH 7.6 (2017-10-03). + +- Starting April 2025, above options will be deleted from the + libssh2 codebase. + + - Default builds will also disable support for old-style, MD5-based + encrypted private keys. + You can disable it now with `-DLIBSSH2_NO_MD5_PEM`. + +This release includes the following enhancements and bugfixes: + +- autotools: fix to update `LDFLAGS` for each detected dependency (d19b6190 #1384 #1381 #1377) +- autotools: delete `--disable-tests` option, fix CI tests (e051ae34 #1271 #715 revert: 7483edfa) +- autotools: show the default for `hidden-symbols` option (a3f5594a #1269) +- autotools: enable `-Wunused-macros` with gcc (ecdf5199 #1262 #1227 #1224) +- autotools: fix dotless gcc and Apple clang version detections (89ccc83c #1232 #1187) +- autotools: show more clang/gcc version details (fb580161 #1230) +- autotools: avoid warnings in libtool stub code (96682bd5 #1227 #1224) +- autotools: sync warning enabler code with curl (5996fefe #1223) +- autotools: rename variable (ce5f208a #1222) +- autotools: picky warning options tidy-up (cdca8cff #1221) +- autotools: fix `cp` to preserve attributes and timestamp in `Makefile.am` (f64e6318) +- autotools: fix selecting WinCNG in cross-builds (and more) (00a3b88c #1187 #1186) +- autotools: use comma separator in `Requires.private` of `libssh2.pc` (7f83de14 #1124) +- autotools: remove `AB_INIT` from `configure.ac` (f4f52ccc) +- autotools: improve libz position (c89174a7 #1077 #941 #1075 #1013 regr: 4f0f4bff) +- autotools: skip tests requiring static lib if `--disable-static` (572c57c9 #1072 #663 #1056 regr: 83853f8a) +- build: stop detecting `sys/param.h` header (2677d3b0 #1418 #1415) +- build: silence warnings inside `FD_SET()`/`FD_ISSET()` macros (323a14b2 #1379) +- build: drop `-Wformat-nonliteral` warning suppressions (c452c5cc #1342) +- build: enable `-pedantic-errors` (3ec53f3e #1286) +- build: add mingw-w64 support to `LIBSSH2_PRINTF()` attribute (f8c45794 #1287) +- build: add `LIBSSH2_NO_DEPRECATED` option (b1414503 #1267 #1266 #1260 #1259) +- build: enable missing OpenSSF-recommended warnings, with fixes (afa6b865 #1257) +- build: enable more compiler warnings and fix them (7ecc309c #1224) +- build: picky warning updates (328a96b3 #1219) +- build: revert: respect autotools `DLL_EXPORT` in `libssh2.h` (481be044 #1141 #917 revert: fb1195cf) +- build: stop requiring libssl from openssl (c84745e3 #1128) +- build: tidy-up `libssh2.pc.in` variable names (5720dd9f #1125) +- build: add/fix `Requires.private` packages in `libssh2.pc` (ef538069 #1123) +- buildconf: drop (814a850c #1441 follow: fc5d7788) +- checksrc: update, check all sources, fix fallouts (1117b677 #1457) +- checksrc: sync with curl (8cd473c9 #1272) +- checksrc: fix spelling in comment (a95d401f) +- checksrc: modernise Perl file open (3d309f9b) +- checksrc: switch to dot file (d67a91aa #1052) +- ci: use Ninja with cmake (20ad047d #1458) +- ci: disable dependency tracking in autotools builds (e44f0418 #1396) +- ci: fix mbedtls runners on macOS (84411539 #1381) +- ci: enable Unity mode for most CMake builds (1bfae57b #1367 #1034) +- ci: add shellcheck job and script (d88b9bcd) +- ci: verify build and install from tarball (a86e27e8 #1362) +- ci: add reproducibility test for `maketgz` (2d765e45 #1360) +- ci: use Linux runner for BSDs, add arm64 FreeBSD 14 job (6f86b196 #1343) +- ci: do not parallelize `distcheck` job (5e65dd87 #1339) +- ci: add FreeBSD 14 job, fix issues (46333adf #1277) +- ci: add OmniOS job, fix issues (5e0ec991) +- ci: show compiler in cross/cygwin job names (c9124088) +- ci: add OpenBSD (v7.4) job + fix build error in example (0c9a8e35 #1250) +- ci: add NetBSD (v9.3) job (65c7a7a5) +- ci: update and speed up FreeBSD job (eee4e805) +- ci: use absolute path in `CMAKE_INSTALL_PREFIX` (74948816 #1247) +- ci: boost mbedTLS build speed (236e79a1 #1245) +- ci: add BoringSSL job (cmake, gcc, amd64) (c9dd3566 #1233) +- ci: fixup FreeBSD version, bump mbedTLS (fea6664e #1217) +- ci: add FreeBSD 13.2 job (a7d2a573 #1215) +- ci: mbedTLS 3.5.0 (5e190442 #1202) +- ci: update actions, use shallow clones with appveyor (d468a33f #1199) +- ci: replace `mv` + `chmod` with `install` in `Dockerfile` (5754fed6 #1175) +- ci: set file mode early in `appveyor_docker.yml` (633db55f) +- ci: add spellcheck (codespell) (a79218d3) +- ci: add MSYS builds (autotools and cmake) (d43b8d9b #1162) +- ci: add Cygwin builds (autotools and cmake) (f1e96e73 #1161) +- ci: add mingw-w64 UWP build (1215aa5f #1155 #1147) +- ci: add missing timeout to 'autotools distcheck' step (6265ffdb) +- ci: add non-static autotools i386 build, ignore GHA updates on AppVeyor (c6e137f7 #1074 #1072) +- ci: prefer `=` operator in shell snippets (e5c03043 #1073) +- ci: drop redundant/unused vars, sync var names (ab8e95bc #1059) +- ci: add i386 Linux build (with mbedTLS) (abdf40c7 #1057 #1053) +- ci/appveyor: reduce test runs (workaround for infrastructure permafails) (b5e68bdc #1461) +- ci/appveyor: increase wait for SSH server on GHA (bf3af90b) +- ci/appveyor: bump to OpenSSL 3.2.1 (53d9c1a6 #1363 #1348) +- ci/appveyor: re-enable parallel mode (e190e5b2 #1294 #884 #867) +- ci/appveyor: delete UWP job broken since Visual Studio upgrade (d0a7f1da #1275) +- ci/appveyor: YAML/PowerShell formatting, shorten variable name (06fd721f #1200) +- ci/appveyor: move to pure PowerShell (8a081fd9 #1197) +- ci/GHA: revert concurrency and improve permissions (e4c042f6) +- ci/GHA: FreeBSD 14.1, actions bump (ae04b1b9 #1424) +- ci/GHA: fix wolfSSL-from-source AES-GCM tests (1c0b07a7 #1409 #1408) +- ci/GHA: add Linux job with latest wolfSSL built from source (d4cea53f #1408 #1299 #1020) +- ci/GHA: tidy up build-from-source steps (2c633033) +- ci/GHA: show configure logs on failure and other tidy-ups (dab48398 #1403) +- ci/GHA: bump parallel jobs to nproc+1 (6f3d3bc8 #1402) +- ci/GHA: show test logs on failure (b8ffa7a5 #1401) +- ci/GHA: fix `Dockerfile` failing after Ubuntu package update (839bb84e #1400) +- ci/GHA: use ubuntu-latest with OmniOS job (50143d58) +- ci/GHA: shell syntax tidy-up (3b23e039 #1390) +- ci/GHA: bump NetBSD/OpenBSD, add NetBSD arm64 job (e980af72 #1388) +- ci/GHA: tidy up wolfSSL autotools config on macOS (5953c1f1 #1383) +- ci/GHA: shorter mbedTLS autotools workaround (736e3d7d #1382 #1381) +- ci/GHA: fix gcrypt with autotools/macOS/Homebrew/ARM64 (ae2770de #1377) +- ci/GHA: fix verbose option for autotools jobs (499b27ae #1376) +- ci/GHA: dump `config.log` on failure for macOS autotools jobs (4fa69214 #1375) +- ci/GHA: fix `autoreconf` failure on macOS/Homebrew (0b64b30b #1374) +- ci/GHA: fixup Homebrew location (for ARM runners) (6128aee0 #1373) +- ci/GHA: review/fixup auto-cancel settings (b08cfbc9 #1292) +- ci/GHA: restore curly braces in `if` (36748270 #1145) +- ci/GHA: simplify `if` strings (cab3db58 #1140) +- cmake: sync and improve Find modules, add `pkg-config` native detection (45064137 #1445 #1420) +- cmake: generate `LIBSSH2_PC_LIBS_PRIVATE` dynamically (c87f1296 #1466) +- cmake: add comment about `ibssh2.pc.in` variables (14b1b9d0) +- cmake: support absolute `CMAKE_INSTALL_INCLUDEDIR`/`CMAKE_INSTALL_LIBDIR` (d70cee36 #1465) +- cmake: rename two variables and initialize them (0fce9dcc #1464) +- cmake: prefer `find_dependency()` in `libssh2-config.cmake` (d9c2e550 #1460) +- cmake: tidy up syntax, minor improvements (9d9ee780 #1446) +- cmake: rename mbedTLS and wolfSSL Find modules (570de0f2) +- cmake: fixup version detection in mbedTLS Find module (8e3c40b2 #1444) +- cmake: mbedTLS detection tidy-ups (6d1d13c2 #1438) +- cmake: add quotes, delete ending dirseps (2bb46d44 #1437 #1166) +- cmake: sync formatting in `cmake/Find*` modules (a0310699) +- cmake: tidy up function name casing in `CopyRuntimeDependencies.cmake` (03547cb8) +- cmake: use the imported target of FindOpenSSL module (82b09f9b #1322) +- cmake: rename picky warnings script (64d6789f #1225) +- cmake: fix multiple include of libssh2 package (932d6a32 #1216) +- cmake: show crypto backend in feature summary (20387285 #1211) +- cmake: simplify showing CMake version (fc00bdd7 #1203) +- cmake: cleanup mbedTLS version detection more (4c241d5c #1196 #1192) +- cmake: delete duplicate `include()` (30eef0a6) +- cmake: improve/fix mbedTLS detection (41594675 #1192 #1191) +- cmake: tidy-up `foreach()` syntax (4a64ca14 #1180) +- cmake: verify `libssh2_VERSION` in integration tests (a20572e9) +- cmake: show cmake versions in ci (87f5769b) +- cmake: quote more strings (e9c7d3af #1173) +- cmake: add `ExternalProject` integration test (aeaefaf6 #1171) +- cmake: add integration tests (8715c3d5 #1170) +- cmake: (re-)add aliases for `add_subdirectory()` builds (4ff64ae3 #1169) +- cmake: style tidy-up (3fa5282d #1166) +- cmake: add `LIB_NAME` variable (5453fc80 #1159) +- cmake: tidy-up concatenation in `CMAKE_MODULE_PATH` (ae7d5108 #1157) +- cmake: replace `libssh2` literals with `PROJECT_NAME` variable (72fd2595 #1152) +- cmake: fix `STREQUAL` check in error branch (42d3bf13 #1151) +- cmake: cache more config values on Windows (11a03690 #1142) +- cmake: streamline invocation (f58f77b5 #1138) +- cmake: merge `set_target_properties()` calls (a9091007 #1132) +- cmake: (re-)add zlib to `Libs.private` in `libssh2.pc` (64643018 #1131) +- cmake: use `wolfssl/options.h` for detection, like autotools (c5ec6c49 #1130) +- cmake: add openssl libs to `Libs.private` in `libssh2.pc` (5cfa59d3 #1127) +- cmake: bump minimum CMake version to v3.7.0 (9cd18f45 #1126) +- cmake: CMAKE_SOURCE_DIR -> PROJECT_SOURCE_DIR (0f396aa9 #1121) +- cmake: tidy-ups (2fc36790 #1122) +- cmake: re-add `Libssh2:libssh2` for compatibility + lowercase namespace (2da13c13 #1104 #731 #1103) +- copyright: remove years from copyright headers (187d89bb #1082) +- disable DSA by default (b7ab0faa #1435 #1433) +- docs: update `INSTALL_AUTOTOOLS` (2f0efde3 #1316) +- docs: replace SHA1 with SHA256 in CMake example (766bde9f) +- example: restore `sys/time.h` for AIX (24503cb9 #1340 #1335 #1334 #1001 regr: e53aae0e) +- example: use `libssh2_socket_t` in X11 example (3f60ccb7) +- example: replace remaining libssh2_scp_recv with libssh2_scp_recv2 in output messages (8d69e63d #1258 follow: 6c84a426) +- example: fix regression in `ssh2_exec.c` (279a2e57 #1106 #861 #846 #1105 regr: b13936bd) +- example, tests: call `WSACleanup()` for each `WSAStartup()` (94b6bad3 #1283) +- example, tests: fix/silence `-Wformat-truncation=2` gcc warnings (744e059f) +- hostkey: do not advertise ssh-rsa when SHA1 is disabled (82d1b8ff #1093 #1092) +- kex: prevent possible double free of hostkey (b3465418 #1452) +- kex: always check for null pointers before calling _libssh2_bn_set_word (9f23a3bb #1423) +- kex: fix a memory leak in key exchange (19101843 #1412 #1404) +- kex: always add extension indicators to kex_algorithms (00e2a07e #1327 #1326) +- libssh2.h: add deprecated function warnings (9839ebe5 #1289 #1260) +- libssh2.h: add portable `LIBSSH2_SOCKET_CLOSE()` macro (28dbf016 #1278) +- libssh2.h: use `_WIN32` for Windows detection instead of rolling our own (631e7734 #1238) +- libssh2.pc: reference mbedcrypto pkgconfig (c149a127 #1405) +- libssh2.pc: re-add & extend support for static-only libssh2 builds (624abe27 #1119 #1114) +- libssh2.pc: don't put `@LIBS@` in pc file (1209c16d) +- mac: add empty hash functions for `mac_method_hmac_aesgcm` to not crash when e.g. setting `LIBSSH2_METHOD_CRYPT_CS` (b2738391 #1321) +- mac: handle low-level errors (f64885b6 #1297) +- Makefile.mk: delete Windows-focused raw GNU Make build (43485579 #1204) +- maketgz: reproducible tarballs/zip, display tarball hashes (d52fe1b4 #1357 #1359) +- maketgz: `set -eu`, reproducibility, improve zip, add CI test (cba7f975 #1353) +- man: improve `libssh2_userauth_publickey_from*` manpages (581b72aa #1347 #1308 #652) +- man: fix double spaces and dash escaping (a3ffc422 #1210) +- man: add description to `libssh2_session_get_blocking.3` (67e39091 #1185) +- mbedtls: always init ECDSA mbedtls_pk_context (a50d7deb #1430) +- mbedtls: correctly initialize values (ECDSA) (1701d5c0 #1428 #1421) +- mbedtls: expose `mbedtls_pk_load_file()` for our use (1628f6ca #1421 #1393 #1349 follow: e973493f) +- mbedtls: add workaround + FIXME to build with 3.6.0 (2e4c5ec4 #1349) +- mbedtls: improve disabling `-Wredundant-decls` (ecec68a2 #1226 #1224) +- mbedtls: include `version.h` for `MBEDTLS_VERSION_NUMBER` (9d7bc253 #1095 #1094) +- mbedtls: use more `size_t` to sync up with `crypto.h` (1153ebde #1054 #879 #846 #1053) +- md5: allow disabling old-style encrypted private keys at build-time (eb9f9de2 #1181) +- mingw: fix printf mask for 64-bit integers (36c1e1d1 #1091 #876 #846 #1090) +- misc: flatten `_libssh2_explicit_zero` if tree (74e74288 #1149) +- NMakefile: delete (c515eed3 #1134 #1129) +- openssl: free allocated resources when using openssl3 (b942bad1 #1459) +- openssl: fix memory leaks in `_libssh2_ecdsa_curve_name_with_octal_new` and `_libssh2_ecdsa_verify` (8d3bc19b #1449) +- openssl: fix calculating DSA public key with OpenSSL 3 (8b3c6e9d #1380) +- openssl: initialize BIGNUMs to NULL in `gen_publickey_from_dsa` for OpenSSL 3 (f1133c75 #1320) +- openssl: fix cppcheck found NULL dereferences (f2945905 #1304) +- openssl: delete internal `read_openssh_private_key_from_memory()` (34aff5ff #1306) +- openssl: use OpenSSL 3 HMAC API, add `no-deprecated` CI job (363dcbf4 #1243 #1235 #1207) +- openssl: make a function static, add `#ifdef` comments (efee9133 #1246 #248 follow: 03092292) +- openssl: fix DSA code to use OpenSSL 3 API (82581941 #1244 #1207) +- openssl: fix `EC_KEY` reference with OpenSSL 3 `no-deprecated` build (487152f4 #1236 #1235 #1207) +- openssl: use non-deprecated APIs with OpenSSL 3.x (b0ab005f #1207) +- openssl: silence `-Wunused-value` warnings (bf285500 #1205) +- openssl: use automatic initialization with LibreSSL 2.7.0+ (d79047c9 #1146 #302) +- openssl: add missing check for `LIBRESSL_VERSION_NUMBER` before use (4a42f42e #1117 #1115) +- os400: drop vsprintf() use (40e817ff #1462 #1457) +- os400: Add two recent files to the distribution (e4c65e5b #1364) +- os400: fix shellcheck warnings in scripts (fixups) (81341e1e #1366 #1364 #1358) +- os400: fix shellcheck warnings in scripts (c6625707 #1358) +- os400: maintain up to date (8457c37a #1309) +- packet: properly bounds check packet_authagent_open() (88a960a8 #1179) +- pem: fix private keys encrypted with AES-GCM methods (e87bdefa #1133) +- reuse: upgrade to `REUSE.toml` (70b8bf31 #1419) +- reuse: fix duplicate copyright warning (b9a4ed83) +- reuse: comply with 3.1 spec and 2.0.0 checker (fe6239a1 #1102 #1101 #1098) +- reuse: provide SPDX identifiers (f6aa31f4 #1084) +- scp: fix missing cast for targets without large file support (c317e06f #1060 #1057 #1002 regr: 5db836b2) +- session: support server banners up to 8192 bytes (was: 256) (1a9e8811 #1443 #1442) +- session: add `libssh2_session_callback_set2()` (c0f69548 #1285) +- session: handle EINTR from send/recv/poll/select to try again as the error is not fatal (798ed4a7 #1058 #955) +- sftp: increase SFTP_HANDLE_MAXLEN back to 4092 (75de6a37 #1422) +- sftp: implement posix-rename@openssh.com (fb652746 #1386) +- src: implement chacha20-poly1305@openssh.com (492bc543 #1426 #584) +- src: use `UINT32_MAX` (dc206408 #1413) +- src: fix type warning in `libssh2_sftp_unlink` macro (ac2e8c73 #1406) +- src: check the return value from `_libssh2_bn_*()` functions (95c824d5 #1354) +- src: support RSA-SHA2 cert-based authentication (rsa-sha2-512_cert and rsa-sha2-256_cert) (3a6ab70d #1314) +- src: check hash update/final success (4718ede4 #1303 #1301) +- src: check hash init success (2ed9eb92 #1301) +- src: add 'strict KEX' to fix CVE-2023-48795 "Terrapin Attack" (d34d9258 #1291 #1290) +- src: disable `-Wsign-conversion` warnings, add option to re-enable (6e451669 #1284 #1257) +- src: fix gcc 13 `-Wconversion` warning on Darwin (8cca7b77 #1209 follow: 08354e0a) +- src: drop a redundant `#include` (1f0174d0 #1153) +- src: improve MSVC C4701 warning fix (8b924999 #1086 #876 #1083) +- src: bump `hash_len` to `size_t` in `LIBSSH2_HOSTKEY_METHOD` (8b917d76 #1076) +- src: bump DSA and ECDSA sign `hash_len` to `size_t` (7b8e0225 #1055) +- tests: avoid using `MAXPATHLEN`, for portability (12427f4f #1415 #198 #1414) +- tests: fix excluding AES-GCM tests (fbd9d192 #1410) +- tests: drop default cygpath option `-u` (38e50aa0) +- tests: fix shellcheck issues in `test_sshd.test` (a2ac8c55) +- tests: sync port number type with the rest of codebase (eb996af8) +- tests: fall back to `$LOGNAME` for username (5326a5ce #1241 #1240) +- tests: show cmake version used in integration tests (2cd2f40e #1201) +- tests: formatting and tidy-ups (e61987a3) +- tests: replace FIXME with comments (1a99a86a) +- tests: add aes256-gcm encrypted key test (802336cf #1135 #1133) +- tests: trap signals in scripts (b2916b28 #1098) +- tests: cast to avoid `-Wchar-subscripts` with Cygwin (43df6a46 #1081 #1080) +- test_read: make it run without Docker (57e9d18e #1139) +- test_sshd.test: show sshd and test connect logs on harness failure (299c2040 #1097) +- test_sshd.test: set a safe PID directory (e8cabdcf #1089) +- test_sshd.test: minor cleanups (d29eea1d) +- tidy-up: link updates (c905bfd2 #1434) +- tidy-up: typo in comment (792e1b6f) +- tidy-up: fix typo found by codespell (706ec36d) +- tidy-up: bump casts from int to long for large C99 types in printfs (2e5a8719 #1264 #1257) +- tidy-up: `unsigned` -> `unsigned int` (b136c379) +- tidy-up: stop using leading underscores in macro names (c6589b88 #1248) +- tidy-up: around `stdint.h` (bfa00f1b #1212) +- tidy-up: fix typo in `readme.vms` (a9a79e7a) +- tidy-up: use built-in `_WIN32` macro to detect Windows (6fbc9505 #1195) +- tidy-up: drop `www.` from `www.libssh2.org` (6e3e8839 #1172) +- tidy-up: delete duplicate word from comment (76307435) +- tidy-up: avoid exclamations, prefer single quotes, in outputs (003fb454 #1079) +- TODO: disable or drop weak algos (0b4bdc85 #1261) +- transport: fix unstable connections over non-blocking sockets (de004875 #1454 #720 #1431 #1397) +- transport: check ETM on remote end when receiving (bde10825 #1332 #1331) +- transport: fix incorrect byte offset in debug message (2388a3aa #1096) +- userauth: avoid oob with huge interactive kbd response (f3a85cad #1337) +- userauth: add a new structure to separate memory read and file read (63b4c20e #773) +- userauth: check whether `*key_method` is a NULL pointer instead of `key_method` (bec57c40) +- wincng: fix `DH_GEX_MAXGROUP` set higher than supported (48584671 #1372 #493) +- wincng: add to ci/GHA, add `./configure` option `--enable-ecdsa-wincng` (3f98bfb0 #1368 #1315) +- wincng: add ECDSA support for host and user authentication (3e723437 #1315) +- wincng: prefer `ULONG`/`DWORD` over `unsigned long` (186c1d63 #1165) +- wincng: tidy-ups (7bb669b5 #1164) +- wolfssl: drop header path hack (8ae1b2d7 #1439) +- wolfssl: fix `EVP_Cipher()` use with v5.6.0 and older (a5b0fac2 #1407 #1394 #797 #1299 #1020) +- wolfssl: bump version in upstream issue comment (5cab802c) +- wolfssl: require v5.4.0 for AES-GCM (260a721c #1411 #1299 #1020) +- wolfssl: enable debug logging in wolfSSL when compiled in (76e7a68a #1310) + +This release would not have looked like this without help, code, reports and +advice from friends like these: + + Viktor Szakats, Michael Buckley, Patrick Monnerat, Ren Mingshuai, + Will Cosgrove, Daniel Stenberg, Josef Cejka, Nicolas Mora, Ryan Kelley, + Aaron Stone, Adam, Anders Borum, András Fekete, Andrei Augustin, binary1248, + Brian Inglis, brucsc on GitHub, concussious on github, Dan Fandrich, + dksslq on github, Haowei Hsu, Harmen Stoppels, Harry Mallon, Jack L, + Jakob Egger, Jiwoo Park, João M. S. Silva, Joel Depooter, Johannes Passing, + Jose Quaresma, Juliusz Sosinowicz, Kai Pastor, Kenneth Davidson, + klux21 on github, Lyndon Brown, Marc Hoersken, mike-jumper, naddy, + Nursan Valeyev, Paul Howarth, PewPewPew, Radek Brich, rahmanih on github, + rolag on github, Seo Suchan, shubhamhii on github, Steve McIntyre, + Tejaswi Kandula, Tobias Stoeckmann, Trzik, Xi Ruoyao diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_agent_connect.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_agent_connect.3 new file mode 100644 index 0000000000000000000000000000000000000000..081ec39ef5abb96fa667a38782906c518d3c372e --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_agent_connect.3 @@ -0,0 +1,24 @@ +.\" Copyright (C) Daiki Ueno +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_agent_connect 3 "23 Dec 2009" "libssh2" "libssh2" +.SH NAME +libssh2_agent_connect - connect to an ssh-agent +.SH SYNOPSIS +.nf +#include + +int +libssh2_agent_connect(LIBSSH2_AGENT *agent); +.fi +.SH DESCRIPTION +Connect to an ssh-agent running on the system. + +Call \fBlibssh2_agent_disconnect(3)\fP to close the connection after +you are doing using it. +.SH RETURN VALUE +Returns 0 if succeeded, or a negative value for error. +.SH AVAILABILITY +Added in libssh2 1.2 +.SH SEE ALSO +.BR libssh2_agent_init(3) +.BR libssh2_agent_disconnect(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_agent_disconnect.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_agent_disconnect.3 new file mode 100644 index 0000000000000000000000000000000000000000..136a6e19de2959cd1457f13cdc5b408b1a743d5d --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_agent_disconnect.3 @@ -0,0 +1,22 @@ +.\" Copyright (C) Daiki Ueno +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_agent_disconnect 3 "23 Dec 2009" "libssh2" "libssh2" +.SH NAME +libssh2_agent_disconnect - close a connection to an ssh-agent +.SH SYNOPSIS +.nf +#include + +int +libssh2_agent_disconnect(LIBSSH2_AGENT *agent); +.fi +.SH DESCRIPTION +Close a connection to an ssh-agent. + +.SH RETURN VALUE +Returns 0 if succeeded, or a negative value for error. +.SH AVAILABILITY +Added in libssh2 1.2 +.SH SEE ALSO +.BR libssh2_agent_connect(3) +.BR libssh2_agent_free(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_agent_free.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_agent_free.3 new file mode 100644 index 0000000000000000000000000000000000000000..1011f44454788f378b6fd988f970516806c51567 --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_agent_free.3 @@ -0,0 +1,22 @@ +.\" Copyright (C) Daiki Ueno +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_agent_free 3 "28 May 2009" "libssh2" "libssh2" +.SH NAME +libssh2_agent_free - free an ssh-agent handle +.SH SYNOPSIS +.nf +#include + +void +libssh2_agent_free(LIBSSH2_AGENT *agent); +.fi +.SH DESCRIPTION +Free an ssh-agent handle. This function also frees the internal +collection of public keys. +.SH RETURN VALUE +None. +.SH AVAILABILITY +Added in libssh2 1.2 +.SH SEE ALSO +.BR libssh2_agent_init(3) +.BR libssh2_agent_disconnect(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_agent_get_identity.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_agent_get_identity.3 new file mode 100644 index 0000000000000000000000000000000000000000..2372e9c006092a620d4f9c1817f489a0f1710979 --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_agent_get_identity.3 @@ -0,0 +1,36 @@ +.\" Copyright (C) Daiki Ueno +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_agent_get_identity 3 "23 Dec 2009" "libssh2" "libssh2" +.SH NAME +libssh2_agent_get_identity - get a public key off the collection of public keys managed by ssh-agent +.SH SYNOPSIS +.nf +#include + +int +libssh2_agent_get_identity(LIBSSH2_AGENT *agent, + struct libssh2_agent_publickey **store, + struct libssh2_agent_publickey *prev); +.fi +.SH DESCRIPTION +\fIlibssh2_agent_get_identity(3)\fP allows an application to iterate +over all public keys in the collection managed by ssh-agent. + +\fIstore\fP should point to a pointer that gets filled in to point to the +public key data. + +\fIprev\fP is a pointer to a previous 'struct libssh2_agent_publickey' +as returned by a previous invoke of this function, or NULL to get the +first entry in the internal collection. +.SH RETURN VALUE +Returns 0 if everything is fine and information about a host was stored in +the \fIstore\fP struct. + +Returns 1 if it reached the end of public keys. + +Returns negative values for error +.SH AVAILABILITY +Added in libssh2 1.2 +.SH SEE ALSO +.BR libssh2_agent_list_identities(3) +.BR libssh2_agent_userauth(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_agent_get_identity_path.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_agent_get_identity_path.3 new file mode 100644 index 0000000000000000000000000000000000000000..703d04abef2cd95fb94abcff6b551e8cdd7ebb79 --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_agent_get_identity_path.3 @@ -0,0 +1,22 @@ +.\" Copyright (C) Will Cosgrove +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_agent_get_identity_path 3 "6 Mar 2019" "libssh2" "libssh2" +.SH NAME +libssh2_agent_get_identity_path - gets the custom ssh-agent socket path +.SH SYNOPSIS +.nf +#include + +const char * +libssh2_agent_get_identity_path(LIBSSH2_AGENT *agent); +.fi +.SH DESCRIPTION +Returns the custom agent identity socket path if set using libssh2_agent_set_identity_path() + +.SH RETURN VALUE +Returns the socket path on disk. +.SH AVAILABILITY +Added in libssh2 1.9 +.SH SEE ALSO +.BR libssh2_agent_init(3) +.BR libssh2_agent_set_identity_path(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_agent_init.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_agent_init.3 new file mode 100644 index 0000000000000000000000000000000000000000..c36536174ee7a57a12ce49eb1769c1208ad24881 --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_agent_init.3 @@ -0,0 +1,28 @@ +.\" Copyright (C) Daiki Ueno +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_agent_init 3 "23 Dec 2009" "libssh2" "libssh2" +.SH NAME +libssh2_agent_init - init an ssh-agent handle +.SH SYNOPSIS +.nf +#include + +LIBSSH2_AGENT * +libssh2_agent_init(LIBSSH2_SESSION *session); +.fi +.SH DESCRIPTION +Init an ssh-agent handle. Returns the handle to an internal +representation of an ssh-agent connection. After the successful +initialization, an application can call \fBlibssh2_agent_connect(3)\fP +to connect to a running ssh-agent. + +Call \fBlibssh2_agent_free(3)\fP to free the handle again after you are +doing using it. +.SH RETURN VALUE +Returns a handle pointer or NULL if something went wrong. The returned handle +is used as input to all other ssh-agent related functions libssh2 provides. +.SH AVAILABILITY +Added in libssh2 1.2 +.SH SEE ALSO +.BR libssh2_agent_connect(3) +.BR libssh2_agent_free(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_agent_list_identities.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_agent_list_identities.3 new file mode 100644 index 0000000000000000000000000000000000000000..bac2c735a0971b531cc4f0c976208a8950759c98 --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_agent_list_identities.3 @@ -0,0 +1,25 @@ +.\" Copyright (C) Daiki Ueno +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_agent_list_identities 3 "23 Dec 2009" "libssh2" "libssh2" +.SH NAME +libssh2_agent_list_identities - request an ssh-agent to list of public keys. +.SH SYNOPSIS +.nf +#include + +int +libssh2_agent_list_identities(LIBSSH2_AGENT *agent); +.fi +.SH DESCRIPTION +Request an ssh-agent to list of public keys, and stores them in the +internal collection of the handle. Call +\fIlibssh2_agent_get_identity(3)\fP to get a public key off the +collection. + +.SH RETURN VALUE +Returns 0 if succeeded, or a negative value for error. +.SH AVAILABILITY +Added in libssh2 1.2 +.SH SEE ALSO +.BR libssh2_agent_connect(3) +.BR libssh2_agent_get_identity(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_agent_set_identity_path.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_agent_set_identity_path.3 new file mode 100644 index 0000000000000000000000000000000000000000..5a1a237d9d2a3be46ac1f9027f6353b8e0bc8eb4 --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_agent_set_identity_path.3 @@ -0,0 +1,22 @@ +.\" Copyright (C) Will Cosgrove +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_agent_set_identity_path 3 "6 Mar 2019" "libssh2" "libssh2" +.SH NAME +libssh2_agent_set_identity_path - set an ssh-agent socket path on disk +.SH SYNOPSIS +.nf +#include + +void +libssh2_agent_set_identity_path(LIBSSH2_AGENT *agent, const char *path); +.fi +.SH DESCRIPTION +Allows a custom agent identity socket path instead of the default SSH_AUTH_SOCK env value + +.SH RETURN VALUE +Returns void +.SH AVAILABILITY +Added in libssh2 1.9 +.SH SEE ALSO +.BR libssh2_agent_init(3) +.BR libssh2_agent_get_identity_path(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_agent_sign.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_agent_sign.3 new file mode 100644 index 0000000000000000000000000000000000000000..c4ba95b3e4679ca225dc155e7dd2b7662cbf3d11 --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_agent_sign.3 @@ -0,0 +1,54 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_agent_sign 3 "1 Oct 2022" "libssh2" "libssh2" +.SH NAME +libssh2_agent_sign - sign data, with the help of ssh-agent +.SH SYNOPSIS +.nf +#include + +int +libssh2_agent_sign(LIBSSH2_AGENT *agent, + struct libssh2_agent_publickey *identity, + unsigned char **sig, + size_t *s_len, + const unsigned char *data, + size_t d_len, + const char *method, + unsigned int method_len); +.fi +.SH DESCRIPTION +\fIagent\fP - ssh-agent handle as returned by +.BR libssh2_agent_init(3) + +\fIidentity\fP - Public key to authenticate with, as returned by +.BR libssh2_agent_get_identity(3) + +\fIsig\fP - A pointer to a buffer in which to place the signature. The caller +is responsible for freeing the signature with LIBSSH2_FREE. + +\fIs_len\fP - A pointer to the length of the sig parameter. + +\fIdata\fP - The data to sign. + +\fId_len\fP - The length of the data parameter. + +\fImethod\fP - A buffer indicating the signing method. This should match the +string at the start of identity->blob. + +\fImethod_len\fP - The length of the method parameter. + +Sign data using an ssh-agent. This function can be used in a callback +registered with libssh2_session_callback_set2(3) using +LIBSSH2_CALLBACK_AUTHAGENT_SIGN to sign an authentication challenge from a +server. However, the client is responsible for implementing the code that calls +this callback in response to a SSH2_AGENTC_SIGN_REQUEST message. +.SH RETURN VALUE +Returns 0 if succeeded, or a negative value for error. +.SH AVAILABILITY +Added in libssh2 1.11.0 +.SH SEE ALSO +.BR libssh2_agent_init(3) +.BR libssh2_agent_get_identity(3) +.BR libssh2_agent_userauth(3) +.BR libssh2_session_callback_set2(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_agent_userauth.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_agent_userauth.3 new file mode 100644 index 0000000000000000000000000000000000000000..82a344c0dbca8637ddd001918bd863e8eac7526f --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_agent_userauth.3 @@ -0,0 +1,32 @@ +.\" Copyright (C) Daiki Ueno +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_agent_userauth 3 "23 Dec 2009" "libssh2" "libssh2" +.SH NAME +libssh2_agent_userauth - authenticate a session with a public key, with the help of ssh-agent +.SH SYNOPSIS +.nf +#include + +int +libssh2_agent_userauth(LIBSSH2_AGENT *agent, + const char *username, + struct libssh2_agent_publickey *identity); +.fi +.SH DESCRIPTION +\fIagent\fP - ssh-agent handle as returned by +.BR libssh2_agent_init(3) + +\fIusername\fP - Remote user name to authenticate as. + +\fIidentity\fP - Public key to authenticate with, as returned by +.BR libssh2_agent_get_identity(3) + +Attempt public key authentication with the help of ssh-agent. +.SH RETURN VALUE +Returns 0 if succeeded, or a negative value for error. +.SH AVAILABILITY +Added in libssh2 1.2 +.SH SEE ALSO +.BR libssh2_agent_init(3) +.BR libssh2_agent_get_identity(3) +.BR libssh2_agent_sign(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_banner_set.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_banner_set.3 new file mode 100644 index 0000000000000000000000000000000000000000..5f687e5a8074a024d0e133394f8c1eee09285b49 --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_banner_set.3 @@ -0,0 +1,36 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_banner_set 3 "1 Jun 2007" "libssh2 0.15" "libssh2" +.SH NAME +libssh2_banner_set - set the SSH protocol banner for the local client +.SH SYNOPSIS +.nf +#include + +int +libssh2_banner_set(LIBSSH2_SESSION *session, const char *banner); +.fi +.SH DESCRIPTION +This function is \fBDEPRECATED\fP in 1.4.0. Use the +\fIlibssh2_session_banner_set(3)\fP function instead! + +\fIsession\fP - Session instance as returned by +.BR libssh2_session_init_ex(3) + +\fIbanner\fP - A pointer to a user defined banner + +Set the banner that will be sent to the remote host when the SSH session is +started with +.BR libssh2_session_handshake(3) +This is optional; a banner corresponding to the protocol and libssh2 version +will be sent by default. +.SH RETURN VALUE +Return 0 on success or negative on failure. It returns +LIBSSH2_ERROR_EAGAIN when it would otherwise block. While +LIBSSH2_ERROR_EAGAIN is a negative number, it is not really a failure per se. +.SH AVAILABILITY +Marked as deprecated since 1.4.0 +.SH ERRORS +\fILIBSSH2_ERROR_ALLOC\fP - An internal memory allocation call failed. +.SH SEE ALSO +.BR libssh2_session_handshake(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_base64_decode.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_base64_decode.3 new file mode 100644 index 0000000000000000000000000000000000000000..e46db823e4f3cc736e898dce7c86898ee68e3f96 --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_base64_decode.3 @@ -0,0 +1,30 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_base64_decode 3 "23 Dec 2008" "libssh2 1.0" "libssh2" +.SH NAME +libssh2_base64_decode - decode a base64 encoded string +.SH SYNOPSIS +.nf +#include + +int +libssh2_base64_decode(LIBSSH2_SESSION *session, char **dest, + unsigned int *dest_len, const char *src, + unsigned int src_len); +.fi +.SH DESCRIPTION +This function is deemed DEPRECATED and will be removed from libssh2 in a +future version. Do not use it! + +Decode a base64 chunk and store it into a newly allocated buffer. 'dest_len' +will be set to hold the length of the returned buffer that '*dest' will point +to. + +The returned buffer is allocated by this function, but it is not clear how to +free that memory! +.SH BUGS +The memory that *dest points to is allocated by the malloc function libssh2 +uses, but there is no way for an application to free this data in a safe and +reliable way! +.SH RETURN VALUE +0 if successful, \-1 if any error occurred. diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_channel_close.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_channel_close.3 new file mode 100644 index 0000000000000000000000000000000000000000..fd9d0001b42818125119c7bd385fd899b5f6e6e4 --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_channel_close.3 @@ -0,0 +1,29 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_channel_close 3 "1 Jun 2007" "libssh2 0.15" "libssh2" +.SH NAME +libssh2_channel_close - close a channel +.SH SYNOPSIS +.nf +#include + +int +libssh2_channel_close(LIBSSH2_CHANNEL *channel); +.fi +.SH DESCRIPTION +\fIchannel\fP - active channel stream to set closed status on. + +Close an active data channel. In practice this means sending an SSH_MSG_CLOSE +packet to the remote host which serves as instruction that no further data +will be sent to it. The remote host may still send data back until it sends +its own close message in response. To wait for the remote end to close its +connection as well, follow this command with +.BR libssh2_channel_wait_closed(3) +.SH RETURN VALUE +Return 0 on success or negative on failure. It returns +LIBSSH2_ERROR_EAGAIN when it would otherwise block. While +LIBSSH2_ERROR_EAGAIN is a negative number, it is not really a failure per se. +.SH ERRORS +\fILIBSSH2_ERROR_SOCKET_SEND\fP - Unable to send data on socket. +.SH SEE ALSO +.BR libssh2_channel_open_ex(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_channel_direct_streamlocal_ex.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_channel_direct_streamlocal_ex.3 new file mode 100644 index 0000000000000000000000000000000000000000..c2c3d5caf8dd1f2e1ad55763f6ff9becf9f96a1f --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_channel_direct_streamlocal_ex.3 @@ -0,0 +1,34 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_channel_direct_streamlocal_ex 3 "10 Apr 2023" "libssh2 1.11.0" "libssh2" +.SH NAME +libssh2_channel_direct_streamlocal_ex - Tunnel a UNIX socket connection through an SSH session +.SH SYNOPSIS +.nf +#include + +LIBSSH2_CHANNEL * +libssh2_channel_direct_streamlocal_ex(LIBSSH2_SESSION *session, + const char *socket_path, + const char *shost, int sport); +.fi +.SH DESCRIPTION +\fIsession\fP - Session instance as returned by +.BR libssh2_session_init_ex(3) + +\fIsocket_path\fP - UNIX socket to connect to using the SSH host as a proxy. + +\fIshost\fP - Host to tell the SSH server the connection originated on. + +\fIsport\fP - Port to tell the SSH server the connection originated from. + +Tunnel a UNIX socket connection through the SSH transport via the remote host to +a third party. Communication from the client to the SSH server remains +encrypted, communication from the server to the 3rd party host travels +in cleartext. +.SH RETURN VALUE +Pointer to a newly allocated LIBSSH2_CHANNEL instance, or NULL on errors. +.SH ERRORS +\fILIBSSH2_ERROR_ALLOC\fP - An internal memory allocation call failed. +.SH SEE ALSO +.BR libssh2_session_init_ex(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_channel_direct_tcpip.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_channel_direct_tcpip.3 new file mode 100644 index 0000000000000000000000000000000000000000..02033fc0a8054f8b016b0f7623235b5eefa2198d --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_channel_direct_tcpip.3 @@ -0,0 +1,22 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_channel_direct_tcpip 3 "20 Feb 2010" "libssh2 1.2.4" "libssh2" +.SH NAME +libssh2_channel_direct_tcpip - convenience macro for \fIlibssh2_channel_direct_tcpip_ex(3)\fP calls +.SH SYNOPSIS +.nf +#include + +LIBSSH2_CHANNEL * +libssh2_channel_direct_tcpip(LIBSSH2_SESSION *session, + const char *host, int port); +.fi +.SH DESCRIPTION +This is a macro defined in a public libssh2 header file that is using the +underlying function \fIlibssh2_channel_direct_tcpip_ex(3)\fP. +.SH RETURN VALUE +See \fIlibssh2_channel_direct_tcpip_ex(3)\fP +.SH ERRORS +See \fIlibssh2_channel_direct_tcpip_ex(3)\fP +.SH SEE ALSO +.BR libssh2_channel_direct_tcpip_ex(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_channel_direct_tcpip_ex.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_channel_direct_tcpip_ex.3 new file mode 100644 index 0000000000000000000000000000000000000000..02e8f84b3b949dc5505bd53b59b70599e8c81ea0 --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_channel_direct_tcpip_ex.3 @@ -0,0 +1,40 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_channel_direct_tcpip_ex 3 "1 Jun 2007" "libssh2 0.15" "libssh2" +.SH NAME +libssh2_channel_direct_tcpip_ex - Tunnel a TCP connection through an SSH session +.SH SYNOPSIS +.nf +#include + +LIBSSH2_CHANNEL * +libssh2_channel_direct_tcpip_ex(LIBSSH2_SESSION *session, + const char *host, int port, + const char *shost, int sport); + +LIBSSH2_CHANNEL * +libssh2_channel_direct_tcpip(LIBSSH2_SESSION *session, + const char *host, int port); +.fi +.SH DESCRIPTION +\fIsession\fP - Session instance as returned by +.BR libssh2_session_init_ex(3) + +\fIhost\fP - Third party host to connect to using the SSH host as a proxy. + +\fIport\fP - Port on third party host to connect to. + +\fIshost\fP - Host to tell the SSH server the connection originated on. + +\fIsport\fP - Port to tell the SSH server the connection originated from. + +Tunnel a TCP/IP connection through the SSH transport via the remote host to +a third party. Communication from the client to the SSH server remains +encrypted, communication from the server to the 3rd party host travels +in cleartext. +.SH RETURN VALUE +Pointer to a newly allocated LIBSSH2_CHANNEL instance, or NULL on errors. +.SH ERRORS +\fILIBSSH2_ERROR_ALLOC\fP - An internal memory allocation call failed. +.SH SEE ALSO +.BR libssh2_session_init_ex(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_channel_eof.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_channel_eof.3 new file mode 100644 index 0000000000000000000000000000000000000000..9d9fd7458c6ae2e33f9a1955acefb3a9299de748 --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_channel_eof.3 @@ -0,0 +1,21 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_channel_eof 3 "1 Jun 2007" "libssh2 0.15" "libssh2" +.SH NAME +libssh2_channel_eof - check a channel's EOF status +.SH SYNOPSIS +.nf +#include + +int +libssh2_channel_eof(LIBSSH2_CHANNEL *channel); +.fi +.SH DESCRIPTION +\fIchannel\fP - active channel stream to set closed status on. + +Check if the remote host has sent an EOF status for the selected stream. +.SH RETURN VALUE +Returns 1 if the remote host has sent EOF, otherwise 0. Negative on +failure. +.SH SEE ALSO +.BR libssh2_channel_close(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_channel_exec.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_channel_exec.3 new file mode 100644 index 0000000000000000000000000000000000000000..08644d5e1d3cded857ccb579ff05a18b48970a91 --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_channel_exec.3 @@ -0,0 +1,21 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_channel_exec 3 "20 Feb 2010" "libssh2 1.2.4" "libssh2" +.SH NAME +libssh2_channel_exec - convenience macro for \fIlibssh2_channel_process_startup(3)\fP calls +.SH SYNOPSIS +.nf +#include + +int +libssh2_channel_exec(LIBSSH2_CHANNEL *channel, const char *command); +.fi +.SH DESCRIPTION +This is a macro defined in a public libssh2 header file that is using the +underlying function \fIlibssh2_channel_process_startup(3)\fP. +.SH RETURN VALUE +See \fIlibssh2_channel_process_startup(3)\fP +.SH ERRORS +See \fIlibssh2_channel_process_startup(3)\fP +.SH SEE ALSO +.BR libssh2_channel_process_startup(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_channel_flush.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_channel_flush.3 new file mode 100644 index 0000000000000000000000000000000000000000..79a7750bee59fa0d2215855211d38085a6e4dfc5 --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_channel_flush.3 @@ -0,0 +1,21 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_channel_flush 3 "20 Feb 2010" "libssh2 1.2.4" "libssh2" +.SH NAME +libssh2_channel_flush - convenience macro for \fIlibssh2_channel_flush_ex(3)\fP calls +.SH SYNOPSIS +.nf +#include + +int +libssh2_channel_flush(LIBSSH2_CHANNEL *channel); +.fi +.SH DESCRIPTION +This is a macro defined in a public libssh2 header file that is using the +underlying function \fIlibssh2_channel_flush_ex(3)\fP. +.SH RETURN VALUE +See \fIlibssh2_channel_flush_ex(3)\fP +.SH ERRORS +See \fIlibssh2_channel_flush_ex(3)\fP +.SH SEE ALSO +.BR libssh2_channel_flush_ex(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_channel_flush_ex.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_channel_flush_ex.3 new file mode 100644 index 0000000000000000000000000000000000000000..4a445ba46e3fa6f34adb87d704e7cd4fcd2d3d71 --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_channel_flush_ex.3 @@ -0,0 +1,34 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_channel_flush_ex 3 "1 Jun 2007" "libssh2 0.15" "libssh2" +.SH NAME +libssh2_channel_flush_ex - flush a channel +.SH SYNOPSIS +.nf +#include + +int +libssh2_channel_flush_ex(LIBSSH2_CHANNEL *channel, int streamid); + +int +libssh2_channel_flush(LIBSSH2_CHANNEL *channel); + +int +libssh2_channel_flush_stderr(LIBSSH2_CHANNEL *channel); +.fi +.SH DESCRIPTION +\fIchannel\fP - Active channel stream to flush. + +\fIstreamid\fP - Specific substream number to flush. Groups of substreams may +be flushed by passing on of the following Constants. +.br +\fBLIBSSH2_CHANNEL_FLUSH_EXTENDED_DATA\fP: Flush all extended data substreams +.br +\fBLIBSSH2_CHANNEL_FLUSH_ALL\fP: Flush all substreams + +Flush the read buffer for a given channel instance. Individual substreams may +be flushed by number or using one of the provided macros. +.SH RETURN VALUE +Return the number of bytes flushed or negative on failure. +It returns LIBSSH2_ERROR_EAGAIN when it would otherwise block. While +LIBSSH2_ERROR_EAGAIN is a negative number, it is not really a failure per se. diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_channel_flush_stderr.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_channel_flush_stderr.3 new file mode 100644 index 0000000000000000000000000000000000000000..6cd8ade6d28c3d1ccc8aa3c31ed2e0a90a92ce70 --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_channel_flush_stderr.3 @@ -0,0 +1,21 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_channel_flush_stderr 3 "20 Feb 2010" "libssh2 1.2.4" "libssh2" +.SH NAME +libssh2_channel_flush_stderr - convenience macro for \fIlibssh2_channel_flush_ex(3)\fP calls +.SH SYNOPSIS +.nf +#include + +int +libssh2_channel_flush_stderr(LIBSSH2_CHANNEL *channel); +.fi +.SH DESCRIPTION +This is a macro defined in a public libssh2 header file that is using the +underlying function \fIlibssh2_channel_flush_ex(3)\fP. +.SH RETURN VALUE +See \fIlibssh2_channel_flush_ex(3)\fP +.SH ERRORS +See \fIlibssh2_channel_flush_ex(3)\fP +.SH SEE ALSO +.BR libssh2_channel_flush_ex(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_channel_forward_accept.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_channel_forward_accept.3 new file mode 100644 index 0000000000000000000000000000000000000000..e6e57e21a29c2e928e51ccf936bf3a2c2ee1da8c --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_channel_forward_accept.3 @@ -0,0 +1,23 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_channel_forward_accept 3 "1 Jun 2007" "libssh2 0.15" "libssh2" +.SH NAME +libssh2_channel_forward_accept - accept a queued connection +.SH SYNOPSIS +.nf +#include + +LIBSSH2_CHANNEL * +libssh2_channel_forward_accept(LIBSSH2_LISTENER *listener); +.fi +.SH DESCRIPTION +\fIlistener\fP is a forwarding listener instance as returned by +\fBlibssh2_channel_forward_listen_ex(3)\fP. +.SH RETURN VALUE +A newly allocated channel instance or NULL on failure. +.SH ERRORS +When this function returns NULL use \fIlibssh2_session_last_errno(3)\fP to +extract the error code. If that code is \fILIBSSH2_ERROR_EAGAIN\fP, the +session is set to do non-blocking I/O but the call would block. +.SH SEE ALSO +.BR libssh2_channel_forward_listen_ex(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_channel_forward_cancel.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_channel_forward_cancel.3 new file mode 100644 index 0000000000000000000000000000000000000000..0e11f518ccf07ed263f1819e2a2de7d9d3c31e16 --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_channel_forward_cancel.3 @@ -0,0 +1,28 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_channel_forward_cancel 3 "1 Jun 2007" "libssh2 0.15" "libssh2" +.SH NAME +libssh2_channel_forward_cancel - cancel a forwarded TCP port +.SH SYNOPSIS +.nf +#include + +int +libssh2_channel_forward_cancel(LIBSSH2_LISTENER *listener); +.fi +.SH DESCRIPTION +\fIlistener\fP - Forwarding listener instance as returned by +.BR libssh2_channel_forward_listen_ex(3) + +Instruct the remote host to stop listening for new connections on a previously +requested host/port. +.SH RETURN VALUE +Return 0 on success or negative on failure. It returns +LIBSSH2_ERROR_EAGAIN when it would otherwise block. While +LIBSSH2_ERROR_EAGAIN is a negative number, it is not really a failure per se. +.SH ERRORS +\fILIBSSH2_ERROR_ALLOC\fP - An internal memory allocation call failed. + +\fILIBSSH2_ERROR_SOCKET_SEND\fP - Unable to send data on socket. +.SH SEE ALSO +.BR libssh2_channel_forward_listen_ex(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_channel_forward_listen.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_channel_forward_listen.3 new file mode 100644 index 0000000000000000000000000000000000000000..ab1739cfade157acfc6766089ba20aaf17f14c94 --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_channel_forward_listen.3 @@ -0,0 +1,21 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_channel_forward_listen 3 "20 Feb 2010" "libssh2 1.2.4" "libssh2" +.SH NAME +libssh2_channel_forward_listen - convenience macro for \fIlibssh2_channel_forward_listen_ex(3)\fP calls +.SH SYNOPSIS +.nf +#include + +int +libssh2_channel_forward_listen(LIBSSH2_SESSION *session, int port); +.fi +.SH DESCRIPTION +This is a macro defined in a public libssh2 header file that is using the +underlying function \fIlibssh2_channel_forward_listen_ex(3)\fP. +.SH RETURN VALUE +See \fIlibssh2_channel_forward_listen_ex(3)\fP +.SH ERRORS +See \fIlibssh2_channel_forward_listen_ex(3)\fP +.SH SEE ALSO +.BR libssh2_channel_forward_listen_ex(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_channel_forward_listen_ex.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_channel_forward_listen_ex.3 new file mode 100644 index 0000000000000000000000000000000000000000..c33115e67f8b24ebdf74b0cc7623f9afd4a84371 --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_channel_forward_listen_ex.3 @@ -0,0 +1,51 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_channel_forward_listen_ex 3 "1 Jun 2007" "libssh2 0.15" "libssh2" +.SH NAME +libssh2_channel_forward_listen_ex - listen to inbound connections +.SH SYNOPSIS +.nf +#include + +LIBSSH2_LISTENER * +libssh2_channel_forward_listen_ex(LIBSSH2_SESSION *session, + char *host, int port, + int *bound_port, int queue_maxsize); + +LIBSSH2_LISTENER * +libssh2_channel_forward_listen(LIBSSH2_SESSION *session, int port); +.fi +.SH DESCRIPTION +Instruct the remote SSH server to begin listening for inbound TCP/IP +connections. New connections will be queued by the library until accepted by +\fIlibssh2_channel_forward_accept(3)\fP. + +\fIsession\fP - instance as returned by libssh2_session_init(). + +\fIhost\fP - specific address to bind to on the remote host. Binding to +0.0.0.0 (default when NULL is passed) will bind to all available addresses. + +\fIport\fP - port to bind to on the remote host. When 0 is passed, the remote +host will select the first available dynamic port. + +\fIbound_port\fP - Populated with the actual port bound on the remote +host. Useful when requesting dynamic port numbers. + +\fIqueue_maxsize\fP - Maximum number of pending connections to queue before +rejecting further attempts. + +\fIlibssh2_channel_forward_listen(3)\fP is a macro. +.SH RETURN VALUE +A newly allocated LIBSSH2_LISTENER instance or NULL on failure. +.SH ERRORS +\fILIBSSH2_ERROR_ALLOC\fP - An internal memory allocation call failed. + +\fILIBSSH2_ERROR_SOCKET_SEND\fP - Unable to send data on socket. + +\fILIBSSH2_ERROR_PROTO\fP - An invalid SSH protocol response was received on the socket. + +\fILIBSSH2_ERROR_REQUEST_DENIED\fP - The remote server refused the request. + +\fILIBSSH2_ERROR_EAGAIN\fP - Marked for non-blocking I/O but the call would block. +.SH SEE ALSO +.BR libssh2_channel_forward_accept(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_channel_free.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_channel_free.3 new file mode 100644 index 0000000000000000000000000000000000000000..66fddc0643cf7f73e145062ac694b62faeeca48f --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_channel_free.3 @@ -0,0 +1,26 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_channel_free 3 "1 Jun 2007" "libssh2 0.15" "libssh2" +.SH NAME +libssh2_channel_free - free all resources associated with a channel +.SH SYNOPSIS +.nf +#include + +int +libssh2_channel_free(LIBSSH2_CHANNEL *channel); +.fi +.SH DESCRIPTION +\fIchannel\fP - Channel stream to free. + +Release all resources associated with a channel stream. If the channel has +not yet been closed with +.BR libssh2_channel_close(3) +, it will be called automatically so that the remote end may know that it +can safely free its own resources. +.SH RETURN VALUE +Return 0 on success or negative on failure. It returns +LIBSSH2_ERROR_EAGAIN when it would otherwise block. While +LIBSSH2_ERROR_EAGAIN is a negative number, it is not really a failure per se. +.SH SEE ALSO +.BR libssh2_channel_close(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_channel_get_exit_signal.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_channel_get_exit_signal.3 new file mode 100644 index 0000000000000000000000000000000000000000..e1ce01fde459c1f4bdfe18f74b887ac44ee751e1 --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_channel_get_exit_signal.3 @@ -0,0 +1,39 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_channel_get_exit_signal 3 "4 Oct 2010" "libssh2 1.2.8" "libssh2" +.SH NAME +libssh2_channel_get_exit_signal - get the remote exit signal +.SH SYNOPSIS +.nf +#include + +int +libssh2_channel_get_exit_signal(LIBSSH2_CHANNEL *channel, + char **exitsignal, size_t *exitsignal_len, + char **errmsg, size_t *errmsg_len, + char **langtag, size_t *langtag_len); +.fi +.SH DESCRIPTION +\fIchannel\fP - Closed channel stream to retrieve exit signal from. + +\fIexitsignal\fP - If not NULL, is populated by reference with the exit signal +(without leading "SIG"). Note that the string is stored in a newly allocated +buffer. If the remote program exited cleanly, the referenced string pointer +will be set to NULL. + +\fIexitsignal_len\fP - If not NULL, is populated by reference with the length +of exitsignal. + +\fIerrmsg\fP - If not NULL, is populated by reference with the error message +(if provided by remote server, if not it will be set to NULL). Note that the +string is stored in a newly allocated buffer. + +\fIerrmsg_len\fP - If not NULL, is populated by reference with the length of errmsg. + +\fIlangtag\fP - If not NULL, is populated by reference with the language tag +(if provided by remote server, if not it will be set to NULL). Note that the +string is stored in a newly allocated buffer. + +\fIlangtag_len\fP - If not NULL, is populated by reference with the length of langtag. +.SH RETURN VALUE +Numeric error code corresponding to the the Error Code constants. diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_channel_get_exit_status.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_channel_get_exit_status.3 new file mode 100644 index 0000000000000000000000000000000000000000..7171b6574aaa6bf25b5306c85c4156515fac3f29 --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_channel_get_exit_status.3 @@ -0,0 +1,20 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_channel_get_exit_status 3 "1 Jun 2007" "libssh2 0.15" "libssh2" +.SH NAME +libssh2_channel_get_exit_status - get the remote exit code +.SH SYNOPSIS +.nf +#include + +int +libssh2_channel_get_exit_status(LIBSSH2_CHANNEL* channel) +.fi +.SH DESCRIPTION +\fIchannel\fP - Closed channel stream to retrieve exit status from. + +Returns the exit code raised by the process running on the remote host at +the other end of the named channel. Note that the exit status may not be +available if the remote end has not yet set its status to closed. +.SH RETURN VALUE +Returns 0 on failure, otherwise the \fIExit Status\fP reported by remote host diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_channel_handle_extended_data.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_channel_handle_extended_data.3 new file mode 100644 index 0000000000000000000000000000000000000000..ff4943830a0faa1b3c8fef02f5efda4433fbef84 --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_channel_handle_extended_data.3 @@ -0,0 +1,39 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_channel_handle_extended_data 3 "1 Jun 2007" "libssh2 0.15" "libssh2" +.SH NAME +libssh2_channel_handle_extended_data - set extended data handling mode +.SH SYNOPSIS +.nf +#include + +void +libssh2_channel_handle_extended_data(LIBSSH2_CHANNEL *channel, + int ignore_mode); +.fi +.SH DESCRIPTION +This function is \fBDEPRECATED\fP in 1.1.0. Use the +\fIlibssh2_channel_handle_extended_data2(3)\fP function instead! + +\fIchannel\fP - Active channel stream to change extended data handling on. + +\fIignore_mode\fP - One of the three LIBSSH2_CHANNEL_EXTENDED_DATA_* Constants. +.br +\fBLIBSSH2_CHANNEL_EXTENDED_DATA_NORMAL\fP: Queue extended data for eventual +reading +.br +\fBLIBSSH2_CHANNEL_EXTENDED_DATA_MERGE\fP: Treat extended data and ordinary +data the same. Merge all substreams such that calls to +\fIlibssh2_channel_read(3)\fP will pull from all substreams on a +first-in/first-out basis. +.br +\fBLIBSSH2_CHANNEL_EXTENDED_DATA_IGNORE\fP: Discard all extended data as it +arrives. + +Change how a channel deals with extended data packets. By default all extended +data is queued until read by \fIlibssh2_channel_read_ex(3)\fP +.SH RETURN VALUE +None. +.SH SEE ALSO +.BR libssh2_channel_handle_extended_data2(3) +.BR libssh2_channel_read_ex(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_channel_handle_extended_data2.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_channel_handle_extended_data2.3 new file mode 100644 index 0000000000000000000000000000000000000000..ac970fcb830bddfb8d9a32adb00c66c94ab57949 --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_channel_handle_extended_data2.3 @@ -0,0 +1,37 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_channel_handle_extended_data2 3 "1 Jun 2007" "libssh2 0.15" "libssh2" +.SH NAME +libssh2_channel_handle_extended_data2 - set extended data handling mode +.SH SYNOPSIS +.nf +#include + +int +libssh2_channel_handle_extended_data2(LIBSSH2_CHANNEL *channel, + int ignore_mode); +.fi +.SH DESCRIPTION +\fIchannel\fP - Active channel stream to change extended data handling on. + +\fIignore_mode\fP - One of the three LIBSSH2_CHANNEL_EXTENDED_DATA_* Constants. +.br +\fBLIBSSH2_CHANNEL_EXTENDED_DATA_NORMAL\fP: Queue extended data for eventual +reading +.br +\fBLIBSSH2_CHANNEL_EXTENDED_DATA_MERGE\fP: Treat extended data and ordinary +data the same. Merge all substreams such that calls to +.BR libssh2_channel_read(3) +will pull from all substreams on a first-in/first-out basis. +.br +\fBLIBSSH2_CHANNEL_EXTENDED_DATA_IGNORE\fP: Discard all extended data as it +arrives. + +Change how a channel deals with extended data packets. By default all +extended data is queued until read by +.BR libssh2_channel_read_ex(3) +.SH RETURN VALUE +Return 0 on success or LIBSSH2_ERROR_EAGAIN when it would otherwise block. +.SH SEE ALSO +.BR libssh2_channel_handle_extended_data(3) +.BR libssh2_channel_read_ex(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_channel_ignore_extended_data.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_channel_ignore_extended_data.3 new file mode 100644 index 0000000000000000000000000000000000000000..ff8f4900b455d8e86457ad7141654fb3ed47e8b0 --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_channel_ignore_extended_data.3 @@ -0,0 +1,25 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_channel_ignore_extended_data 3 "20 Feb 2010" "libssh2 1.2.4" "libssh2" +.SH NAME +libssh2_channel_ignore_extended_data - convenience macro for \fIlibssh2_channel_handle_extended_data(3)\fP calls +.SH SYNOPSIS +.nf +#include + +void +libssh2_channel_ignore_extended_data(LIBSSH2_CHANNEL *channel, + int ignore_mode); +.fi +.SH DESCRIPTION +This function is \fBDEPRECATED\fP in 0.3.0. Use the +\fIlibssh2_channel_handle_extended_data2(3)\fP function instead! + +This is a macro defined in a public libssh2 header file that is using the +underlying function \fIlibssh2_channel_handle_extended_data(3)\fP. +.SH RETURN VALUE +See \fIlibssh2_channel_handle_extended_data(3)\fP +.SH ERRORS +See \fIlibssh2_channel_handle_extended_data(3)\fP +.SH SEE ALSO +.BR libssh2_channel_handle_extended_data(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_channel_open_ex.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_channel_open_ex.3 new file mode 100644 index 0000000000000000000000000000000000000000..66fd802247d400beb7c22d06f79c383fb64bb2bd --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_channel_open_ex.3 @@ -0,0 +1,58 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_channel_open_ex 3 "1 Jun 2007" "libssh2 0.15" "libssh2" +.SH NAME +libssh2_channel_open_ex - establish a generic session channel +.SH SYNOPSIS +.nf +#include + +LIBSSH2_CHANNEL * +libssh2_channel_open_ex(LIBSSH2_SESSION *session, const char *channel_type, + unsigned int channel_type_len, + unsigned int window_size, + unsigned int packet_size, + const char *message, unsigned int message_len); + +LIBSSH2_CHANNEL * +libssh2_channel_open_session(session); +.fi +.SH DESCRIPTION +\fIsession\fP - Session instance as returned by +.BR libssh2_session_init_ex(3) + +\fIchannel_type\fP - Channel type to open. Typically one of session, +direct-tcpip, or tcpip-forward. The SSH2 protocol allowed for additional +types including local, custom channel types. + +\fIchannel_type_len\fP - Length of channel_type + +\fIwindow_size\fP - Maximum amount of unacknowledged data remote host is +allowed to send before receiving an SSH_MSG_CHANNEL_WINDOW_ADJUST packet. + +\fIpacket_size\fP - Maximum number of bytes remote host is allowed to send +in a single SSH_MSG_CHANNEL_DATA or SSG_MSG_CHANNEL_EXTENDED_DATA packet. + +\fImessage\fP - Additional data as required by the selected channel_type. + +\fImessage_len\fP - Length of message parameter. + +Allocate a new channel for exchanging data with the server. This method is +typically called through its macroized form: +.BR libssh2_channel_open_session(3) +or via +.BR libssh2_channel_direct_tcpip(3) +or +.BR libssh2_channel_forward_listen(3) +.SH RETURN VALUE +Pointer to a newly allocated LIBSSH2_CHANNEL instance, or NULL on errors. +.SH ERRORS +\fILIBSSH2_ERROR_ALLOC\fP - An internal memory allocation call failed. + +\fILIBSSH2_ERROR_SOCKET_SEND\fP - Unable to send data on socket. + +\fILIBSSH2_ERROR_CHANNEL_FAILURE\fP - + +\fILIBSSH2_ERROR_EAGAIN\fP - Marked for non-blocking I/O but the call would block. +.SH SEE ALSO +Add related functions diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_channel_open_session.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_channel_open_session.3 new file mode 100644 index 0000000000000000000000000000000000000000..89039ea35fdd26c2bb1a5c8b8fd323233a74a41f --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_channel_open_session.3 @@ -0,0 +1,21 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_channel_open_session 3 "20 Feb 2010" "libssh2 1.2.4" "libssh2" +.SH NAME +libssh2_channel_open_session - convenience macro for \fIlibssh2_channel_open_ex(3)\fP calls +.SH SYNOPSIS +.nf +#include + +LIBSSH2_CHANNEL * +libssh2_channel_open_session(LIBSSH2_SESSION *session); +.fi +.SH DESCRIPTION +This is a macro defined in a public libssh2 header file that is using the +underlying function \fIlibssh2_channel_open_ex(3)\fP. +.SH RETURN VALUE +See \fIlibssh2_channel_open_ex(3)\fP +.SH ERRORS +See \fIlibssh2_channel_open_ex(3)\fP +.SH SEE ALSO +.BR libssh2_channel_open_ex(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_channel_process_startup.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_channel_process_startup.3 new file mode 100644 index 0000000000000000000000000000000000000000..5f827db13ef942e6fe7fa024d27167bd17f0b0a7 --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_channel_process_startup.3 @@ -0,0 +1,42 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_channel_process_startup 3 "1 Jun 2007" "libssh2 0.15" "libssh2" +.SH NAME +libssh2_channel_process_startup - request a shell on a channel +.SH SYNOPSIS +.nf +#include + +int +libssh2_channel_process_startup(LIBSSH2_CHANNEL *channel, + const char *request, + unsigned int request_len, + const char *message, + unsigned int message_len); +.fi +.SH DESCRIPTION +\fIchannel\fP - Active session channel instance. + +\fIrequest\fP - Type of process to startup. The SSH2 protocol currently +defines shell, exec, and subsystem as standard process services. + +\fIrequest_len\fP - Length of request parameter. + +\fImessage\fP - Request specific message data to include. + +\fImessage_len\fP - Length of message parameter. + +Initiate a request on a session type channel such as returned by +.BR libssh2_channel_open_ex(3) +.SH RETURN VALUE +Return 0 on success or negative on failure. It returns +LIBSSH2_ERROR_EAGAIN when it would otherwise block. While +LIBSSH2_ERROR_EAGAIN is a negative number, it is not really a failure per se. +.SH ERRORS +\fILIBSSH2_ERROR_ALLOC\fP - An internal memory allocation call failed. + +\fILIBSSH2_ERROR_SOCKET_SEND\fP - Unable to send data on socket. + +\fILIBSSH2_ERROR_CHANNEL_REQUEST_DENIED\fP - +.SH SEE ALSO +.BR libssh2_channel_open_ex(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_channel_read.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_channel_read.3 new file mode 100644 index 0000000000000000000000000000000000000000..0644e185196bbb093afc70207975a15c6586446c --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_channel_read.3 @@ -0,0 +1,22 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_channel_read 3 "20 Feb 2010" "libssh2 1.2.4" "libssh2" +.SH NAME +libssh2_channel_read - convenience macro for \fIlibssh2_channel_read_ex(3)\fP calls +.SH SYNOPSIS +.nf +#include + +ssize_t +libssh2_channel_read(LIBSSH2_CHANNEL *channel, + char *buf, size_t buflen); +.fi +.SH DESCRIPTION +This is a macro defined in a public libssh2 header file that is using the +underlying function \fIlibssh2_channel_read_ex(3)\fP. +.SH RETURN VALUE +See \fIlibssh2_channel_read_ex(3)\fP +.SH ERRORS +See \fIlibssh2_channel_read_ex(3)\fP +.SH SEE ALSO +.BR libssh2_channel_read_ex(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_channel_read_ex.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_channel_read_ex.3 new file mode 100644 index 0000000000000000000000000000000000000000..200fe800325e69bb5b2c73b5ac80d68e7526db35 --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_channel_read_ex.3 @@ -0,0 +1,50 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_channel_read_ex 3 "1 Jun 2007" "libssh2 0.15" "libssh2" +.SH NAME +libssh2_channel_read_ex - read data from a channel stream +.SH SYNOPSIS +.nf +#include + +ssize_t +libssh2_channel_read_ex(LIBSSH2_CHANNEL *channel, int stream_id, + char *buf, size_t buflen); + +ssize_t +libssh2_channel_read(LIBSSH2_CHANNEL *channel, + char *buf, size_t buflen); + +ssize_t +libssh2_channel_read_stderr(LIBSSH2_CHANNEL *channel, + char *buf, size_t buflen); +.fi +.SH DESCRIPTION +Attempt to read data from an active channel stream. All channel streams have +one standard I/O substream (stream_id == 0), and may have up to 2^32 extended +data streams as identified by the selected \fIstream_id\fP. The SSH2 protocol +currently defines a stream ID of 1 to be the stderr substream. + +\fIchannel\fP - active channel stream to read from. + +\fIstream_id\fP - substream ID number (e.g. 0 or SSH_EXTENDED_DATA_STDERR) + +\fIbuf\fP - pointer to storage buffer to read data into + +\fIbuflen\fP - size of the buf storage + +\fIlibssh2_channel_read(3)\fP and \fIlibssh2_channel_read_stderr(3)\fP are +macros. +.SH RETURN VALUE +Actual number of bytes read or negative on failure. It returns +LIBSSH2_ERROR_EAGAIN when it would otherwise block. While +LIBSSH2_ERROR_EAGAIN is a negative number, it is not really a failure per se. + +Note that a return value of zero (0) can in fact be a legitimate value and +only signals that no payload data was read. It is not an error. +.SH ERRORS +\fILIBSSH2_ERROR_SOCKET_SEND\fP - Unable to send data on socket. + +\fILIBSSH2_ERROR_CHANNEL_CLOSED\fP - The channel has been closed. +.SH SEE ALSO +.BR libssh2_poll_channel_read(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_channel_read_stderr.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_channel_read_stderr.3 new file mode 100644 index 0000000000000000000000000000000000000000..25b5ba7240b21199f8bde8568d9722964e92d6c0 --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_channel_read_stderr.3 @@ -0,0 +1,22 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_channel_read_stderr 3 "20 Feb 2010" "libssh2 1.2.4" "libssh2" +.SH NAME +libssh2_channel_read_stderr - convenience macro for \fIlibssh2_channel_read_ex(3)\fP calls +.SH SYNOPSIS +.nf +#include + +ssize_t +libssh2_channel_read_stderr(LIBSSH2_CHANNEL *channel, + char *buf, size_t buflen); +.fi +.SH DESCRIPTION +This is a macro defined in a public libssh2 header file that is using the +underlying function \fIlibssh2_channel_read_ex(3)\fP. +.SH RETURN VALUE +See \fIlibssh2_channel_read_ex(3)\fP +.SH ERRORS +See \fIlibssh2_channel_read_ex(3)\fP +.SH SEE ALSO +.BR libssh2_channel_read_ex(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_channel_receive_window_adjust.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_channel_receive_window_adjust.3 new file mode 100644 index 0000000000000000000000000000000000000000..af0df2e2b6d5c48e5bc86882fcad6a79bf660b1a --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_channel_receive_window_adjust.3 @@ -0,0 +1,32 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_channel_receive_window_adjust 3 "15 Mar 2009" "libssh2 0.15" "libssh2" +.SH NAME +libssh2_channel_receive_window_adjust - adjust the channel window +.SH SYNOPSIS +.nf +#include + +unsigned long +libssh2_channel_receive_window_adjust(LIBSSH2_CHANNEL * channel, + unsigned long adjustment, + unsigned char force); +.fi +.SH DESCRIPTION +This function is \fBDEPRECATED\fP in 1.1.0. Use the +\fIlibssh2_channel_receive_window_adjust2(3)\fP function instead! + +Adjust the receive window for a channel by adjustment bytes. If the amount to +be adjusted is less than LIBSSH2_CHANNEL_MINADJUST and force is 0 the +adjustment amount will be queued for a later packet. +.SH RETURN VALUE +Returns the new size of the receive window (as understood by remote end). Note +that the window value sent over the wire is strictly 32bit, but this API is +made to return a 'long' which may not be 32 bit on all platforms. +.SH ERRORS +In 1.0 and earlier, this function returns LIBSSH2_ERROR_EAGAIN for +non-blocking channels where it would otherwise block. However, that is a +negative number and this function only returns an unsigned value and this then +leads to a very strange value being returned. +.SH SEE ALSO +.BR libssh2_channel_window_read_ex(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_channel_receive_window_adjust2.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_channel_receive_window_adjust2.3 new file mode 100644 index 0000000000000000000000000000000000000000..730889af1238cbea86e57e44d61e5b7763e173d4 --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_channel_receive_window_adjust2.3 @@ -0,0 +1,30 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_channel_receive_window_adjust2 3 "26 Mar 2009" "libssh2 1.1" "libssh2" +.SH NAME +libssh2_channel_receive_window_adjust2 - adjust the channel window +.SH SYNOPSIS +.nf +#include + +int +libssh2_channel_receive_window_adjust2(LIBSSH2_CHANNEL * channel, + unsigned long adjustment, + unsigned char force, + unsigned int *window); +.fi +.SH DESCRIPTION +Adjust the receive window for a channel by adjustment bytes. If the amount to +be adjusted is less than LIBSSH2_CHANNEL_MINADJUST and force is 0 the +adjustment amount will be queued for a later packet. + +This function stores the new size of the receive window (as understood by +remote end) in the variable 'window' points to. +.SH RETURN VALUE +Return 0 on success and a negative value on error. If used in non-blocking +mode it will return LIBSSH2_ERROR_EAGAIN when it would otherwise block. +.SH ERRORS +.SH AVAILABILITY +Added in libssh2 1.1 since the previous API has deficiencies. +.SH SEE ALSO +.BR libssh2_channel_window_read_ex(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_channel_request_auth_agent.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_channel_request_auth_agent.3 new file mode 100644 index 0000000000000000000000000000000000000000..8f9ab62ba4ded7fa17893c49ef349c7e9ed208fa --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_channel_request_auth_agent.3 @@ -0,0 +1,24 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_channel_request_auth_agent 3 "1 Jun 2007" "libssh2 0.15" "libssh2" +.SH NAME +libssh2_channel_request_auth_agent - request agent forwarding for a session +.SH SYNOPSIS +.nf +#include + +int +libssh2_channel_request_auth_agent(LIBSSH2_CHANNEL *channel); +.fi +.SH DESCRIPTION +Request that agent forwarding be enabled for this SSH session. This sends the +request over this specific channel, which causes the agent listener to be +started on the remote side upon success. This agent listener will then run +for the duration of the SSH session. + +\fIchannel\fP - Previously opened channel instance such as returned by +.BR libssh2_channel_open_ex(3) +.SH RETURN VALUE +Return 0 on success or negative on failure. It returns +LIBSSH2_ERROR_EAGAIN when it would otherwise block. While +LIBSSH2_ERROR_EAGAIN is a negative number, it is not really a failure per se. diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_channel_request_pty.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_channel_request_pty.3 new file mode 100644 index 0000000000000000000000000000000000000000..7a3b75eaf1043fdbdd39ad1eec8c0168bbbb2b41 --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_channel_request_pty.3 @@ -0,0 +1,21 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_channel_request_pty 3 "20 Feb 2010" "libssh2 1.2.4" "libssh2" +.SH NAME +libssh2_channel_request_pty - convenience macro for \fIlibssh2_channel_request_pty_ex(3)\fP calls +.SH SYNOPSIS +.nf +#include + +int +libssh2_channel_request_pty(LIBSSH2_SESSION *session, const char *term); +.fi +.SH DESCRIPTION +This is a macro defined in a public libssh2 header file that is using the +underlying function \fIlibssh2_channel_request_pty_ex(3)\fP. +.SH RETURN VALUE +See \fIlibssh2_channel_request_pty_ex(3)\fP +.SH ERRORS +See \fIlibssh2_channel_request_pty_ex(3)\fP +.SH SEE ALSO +.BR libssh2_channel_request_pty_ex(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_channel_request_pty_ex.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_channel_request_pty_ex.3 new file mode 100644 index 0000000000000000000000000000000000000000..30ad750ca04f31d69e1aee93d7878ad18636810d --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_channel_request_pty_ex.3 @@ -0,0 +1,54 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_channel_request_pty_ex 3 "1 Jun 2007" "libssh2 0.15" "libssh2" +.SH NAME +libssh2_channel_request_pty_ex - short function description +.SH SYNOPSIS +.nf +#include + +int +libssh2_channel_request_pty_ex(LIBSSH2_CHANNEL *channel, const char *term, + unsigned int term_len, + const char *modes, unsigned int modes_len, + int width, int height, + int width_px, int height_px); + +int +libssh2_channel_request_pty(LIBSSH2_CHANNEL *channel, const char *term); +.fi +.SH DESCRIPTION +\fIchannel\fP - Previously opened channel instance such as returned by +.BR libssh2_channel_open_ex(3) + +\fIterm\fP - Terminal emulation (e.g. vt102, ansi, etc...) + +\fIterm_len\fP - Length of term parameter + +\fImodes\fP - Terminal mode modifier values + +\fImodes_len\fP - Length of modes parameter. + +\fIwidth\fP - Width of pty in characters + +\fIheight\fP - Height of pty in characters + +\fIwidth_px\fP - Width of pty in pixels + +\fIheight_px\fP - Height of pty in pixels + +Request a PTY on an established channel. Note that this does not make sense +for all channel types and may be ignored by the server despite returning +success. +.SH RETURN VALUE +Return 0 on success or negative on failure. It returns +LIBSSH2_ERROR_EAGAIN when it would otherwise block. While +LIBSSH2_ERROR_EAGAIN is a negative number, it is not really a failure per se. +.SH ERRORS +\fILIBSSH2_ERROR_ALLOC\fP - An internal memory allocation call failed. + +\fILIBSSH2_ERROR_SOCKET_SEND\fP - Unable to send data on socket. + +\fILIBSSH2_ERROR_CHANNEL_REQUEST_DENIED\fP - +.SH SEE ALSO +.BR libssh2_channel_open_ex(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_channel_request_pty_size.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_channel_request_pty_size.3 new file mode 100644 index 0000000000000000000000000000000000000000..7de31d612427a61a44a7283b54e84bfc10651add --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_channel_request_pty_size.3 @@ -0,0 +1,22 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_channel_request_pty_size 3 "20 Feb 2010" "libssh2 1.2.4" "libssh2" +.SH NAME +libssh2_channel_request_pty_size - convenience macro for \fIlibssh2_channel_request_pty_size_ex(3)\fP calls +.SH SYNOPSIS +.nf +#include + +int +libssh2_channel_request_pty_size(LIBSSH2_CHANNEL *channel, + int width, int height); +.fi +.SH DESCRIPTION +This is a macro defined in a public libssh2 header file that is using the +underlying function \fIlibssh2_channel_request_pty_size_ex(3)\fP. +.SH RETURN VALUE +See \fIlibssh2_channel_request_pty_size_ex(3)\fP +.SH ERRORS +See \fIlibssh2_channel_request_pty_size_ex(3)\fP +.SH SEE ALSO +.BR libssh2_channel_request_pty_size_ex(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_channel_request_pty_size_ex.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_channel_request_pty_size_ex.3 new file mode 100644 index 0000000000000000000000000000000000000000..54daf4f5baf3c62d989ec62a81f98124b9d1948c --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_channel_request_pty_size_ex.3 @@ -0,0 +1,12 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_channel_request_pty_size_ex 3 "1 Jun 2007" "libssh2" "libssh2" +.SH NAME +libssh2_channel_request_pty_size_ex - TODO +.SH SYNOPSIS +.nf +.fi +.SH DESCRIPTION +.SH RETURN VALUE +.SH ERRORS +.SH SEE ALSO diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_channel_send_eof.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_channel_send_eof.3 new file mode 100644 index 0000000000000000000000000000000000000000..d4bf52e526de56da128163aa081c04e5f4257d1d --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_channel_send_eof.3 @@ -0,0 +1,24 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_channel_send_eof 3 "1 Jun 2007" "libssh2 0.15" "libssh2" +.SH NAME +libssh2_channel_send_eof - send EOF to remote server +.SH SYNOPSIS +.nf +#include + +int +libssh2_channel_send_eof(LIBSSH2_CHANNEL *channel); +.fi +.SH DESCRIPTION +Tell the remote host that no further data will be sent on the specified +channel. Processes typically interpret this as a closed stdin descriptor. +.SH RETURN VALUE +Return 0 on success or negative on failure. It returns +LIBSSH2_ERROR_EAGAIN when it would otherwise block. While +LIBSSH2_ERROR_EAGAIN is a negative number, it is not really a failure per se. +.SH ERRORS +\fILIBSSH2_ERROR_SOCKET_SEND\fP - Unable to send data on socket. +.SH SEE ALSO +.BR libssh2_channel_wait_eof(3) +.BR libssh2_channel_eof(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_channel_set_blocking.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_channel_set_blocking.3 new file mode 100644 index 0000000000000000000000000000000000000000..07a1049aefd12215ef92fc58ce1c28e3c35a5209 --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_channel_set_blocking.3 @@ -0,0 +1,27 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_channel_set_blocking 3 "1 Jun 2007" "libssh2 0.15" "libssh2" +.SH NAME +libssh2_channel_set_blocking - set or clear blocking mode on channel +.SH SYNOPSIS +.nf +#include + +void +libssh2_channel_set_blocking(LIBSSH2_CHANNEL *channel, int blocking); +.fi +.SH DESCRIPTION +\fIchannel\fP - channel stream to set or clean blocking status on. + +\fIblocking\fP - Set to a non-zero value to make the channel block, or zero to +make it non-blocking. + +Currently this is a short cut call to +.BR libssh2_session_set_blocking(3) +and therefore will affect the session and all channels. +.SH RETURN VALUE +None +.SH SEE ALSO +.BR libssh2_session_set_blocking(3) +.BR libssh2_channel_read_ex(3) +.BR libssh2_channel_write_ex(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_channel_setenv.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_channel_setenv.3 new file mode 100644 index 0000000000000000000000000000000000000000..0fa097b55c3936cf356750de0ab44e2a51706e1c --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_channel_setenv.3 @@ -0,0 +1,22 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_channel_setenv 3 "20 Feb 2010" "libssh2 1.2.4" "libssh2" +.SH NAME +libssh2_channel_setenv - convenience macro for \fIlibssh2_channel_setenv_ex(3)\fP calls +.SH SYNOPSIS +.nf +#include + +int +libssh2_channel_setenv(LIBSSH2_CHANNEL *channel, + const char *varname, const char *value); +.fi +.SH DESCRIPTION +This is a macro defined in a public libssh2 header file that is using the +underlying function \fIlibssh2_channel_setenv_ex(3)\fP. +.SH RETURN VALUE +See \fIlibssh2_channel_setenv_ex(3)\fP +.SH ERRORS +See \fIlibssh2_channel_setenv_ex(3)\fP +.SH SEE ALSO +.BR libssh2_channel_setenv_ex(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_channel_setenv_ex.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_channel_setenv_ex.3 new file mode 100644 index 0000000000000000000000000000000000000000..692d9f8ebfcad8a53ae38415f6a79bb438e3d667 --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_channel_setenv_ex.3 @@ -0,0 +1,47 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_channel_setenv_ex 3 "1 Jun 2007" "libssh2 0.15" "libssh2" +.SH NAME +libssh2_channel_setenv_ex - set an environment variable on the channel +.SH SYNOPSIS +.nf +#include + +int +libssh2_channel_setenv_ex(LIBSSH2_CHANNEL *channel, + char *varname, unsigned int varname_len, + const char *value, unsigned int value_len); + +int +libssh2_channel_setenv(LIBSSH2_CHANNEL *channel, + char *varname, const char *value); +.fi +.SH DESCRIPTION +\fIchannel\fP - Previously opened channel instance such as returned by +.BR libssh2_channel_open_ex(3) + +\fIvarname\fP - Name of environment variable to set on the remote +channel instance. + +\fIvarname_len\fP - Length of passed varname parameter. + +\fIvalue\fP - Value to set varname to. + +\fIvalue_len\fP - Length of value parameter. + +Set an environment variable in the remote channel's process space. Note that +this does not make sense for all channel types and may be ignored by the +server despite returning success. +.SH RETURN VALUE +Return 0 on success or negative on failure. It returns +LIBSSH2_ERROR_EAGAIN when it would otherwise block. While +LIBSSH2_ERROR_EAGAIN is a negative number, it is not really a failure per se. + +.SH ERRORS +\fILIBSSH2_ERROR_ALLOC\fP - An internal memory allocation call failed. + +\fILIBSSH2_ERROR_SOCKET_SEND\fP - Unable to send data on socket. + +\fILIBSSH2_ERROR_CHANNEL_REQUEST_DENIED\fP - +.SH SEE ALSO +.BR libssh2_channel_open_ex(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_channel_shell.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_channel_shell.3 new file mode 100644 index 0000000000000000000000000000000000000000..70ba6d456e18a3d431e10dcf3df84c29b8463c77 --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_channel_shell.3 @@ -0,0 +1,21 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_channel_shell 3 "20 Feb 2010" "libssh2 1.2.4" "libssh2" +.SH NAME +libssh2_channel_shell - convenience macro for \fIlibssh2_channel_process_startup(3)\fP calls +.SH SYNOPSIS +.nf +#include + +int +libssh2_channel_shell(LIBSSH2_CHANNEL *channel); +.fi +.SH DESCRIPTION +This is a macro defined in a public libssh2 header file that is using the +underlying function \fIlibssh2_channel_process_startup(3)\fP. +.SH RETURN VALUE +See \fIlibssh2_channel_process_startup(3)\fP +.SH ERRORS +See \fIlibssh2_channel_process_startup(3)\fP +.SH SEE ALSO +.BR libssh2_channel_process_startup(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_channel_signal_ex.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_channel_signal_ex.3 new file mode 100644 index 0000000000000000000000000000000000000000..aadea41bc7757bd93c7f08b5b67b4c7910c25a78 --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_channel_signal_ex.3 @@ -0,0 +1,32 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_channel_signal_ex 3 "20 Apr 2023" "libssh2 1.11.0" "libssh2" +.SH NAME +libssh2_channel_signal_ex -- Send a signal to process previously opened on channel. +.SH SYNOPSIS +.nf +#include + +int +libssh2_channel_signal_ex(LIBSSH2_CHANNEL *channel, + const char *signame, + size_t signame_len) +.fi +.SH DESCRIPTION +A signal can be delivered to the remote process/service. Some servers or +systems may not implement signals, in which case they will probably ignore this +message. + +\fIchannel\fP - Previously opened channel instance such as returned by +.BR libssh2_channel_open_ex(3) + +\fIsigname\fP - The signal name is the same as the signal name constant, without the leading "SIG". + +\fIsigname_len\fP - Length of passed signal name parameter. + +There is also a macro \fIlibssh2_channel_signal(channel, signame)\fP that supplies the strlen of the signame. +.SH RETURN VALUE +Normal channel error codes. +LIBSSH2_ERROR_EAGAIN when it would block. +.SH SEE ALSO +.BR libssh2_channel_get_exit_signal(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_channel_subsystem.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_channel_subsystem.3 new file mode 100644 index 0000000000000000000000000000000000000000..31d0b3337c33fc423cfb0b3fc9671c3b9fd1bc6a --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_channel_subsystem.3 @@ -0,0 +1,21 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_channel_subsystem 3 "20 Feb 2010" "libssh2 1.2.4" "libssh2" +.SH NAME +libssh2_channel_subsystem - convenience macro for \fIlibssh2_channel_process_startup(3)\fP calls +.SH SYNOPSIS +.nf +#include + +int +libssh2_channel_subsystem(LIBSSH2_CHANNEL *channel, const char *subsystem); +.fi +.SH DESCRIPTION +This is a macro defined in a public libssh2 header file that is using the +underlying function \fIlibssh2_channel_process_startup(3)\fP. +.SH RETURN VALUE +See \fIlibssh2_channel_process_startup(3)\fP +.SH ERRORS +See \fIlibssh2_channel_process_startup(3)\fP +.SH SEE ALSO +.BR libssh2_channel_process_startup(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_channel_wait_closed.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_channel_wait_closed.3 new file mode 100644 index 0000000000000000000000000000000000000000..7ef058cfecec1f35522a9608f45faae4946b27b5 --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_channel_wait_closed.3 @@ -0,0 +1,25 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_channel_wait_closed 3 "29 Nov 2007" "libssh2 0.19" "libssh2" +.SH NAME +libssh2_channel_wait_closed - wait for the remote to close the channel +.SH SYNOPSIS +.nf +#include + +int +libssh2_channel_wait_closed(LIBSSH2_CHANNEL *channel); +.fi +.SH DESCRIPTION +Enter a temporary blocking state until the remote host closes the named +channel. Typically sent after \fIlibssh2_channel_close(3)\fP in order to +examine the exit status. + +.SH RETURN VALUE +Return 0 on success or negative on failure. It returns LIBSSH2_ERROR_EAGAIN +when it would otherwise block. While LIBSSH2_ERROR_EAGAIN is a negative +number, it is not really a failure per se. +.SH SEE ALSO +.BR libssh2_channel_send_eof(3) +.BR libssh2_channel_eof(3) +.BR libssh2_channel_wait_eof(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_channel_wait_eof.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_channel_wait_eof.3 new file mode 100644 index 0000000000000000000000000000000000000000..dcd1f5d5b402195a4908a8a01c32590f02af4ca7 --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_channel_wait_eof.3 @@ -0,0 +1,22 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_channel_wait_eof 3 "1 Jun 2007" "libssh2 0.15" "libssh2" +.SH NAME +libssh2_channel_wait_eof - wait for the remote to reply to an EOF request +.SH SYNOPSIS +.nf +#include + +int +libssh2_channel_wait_eof(LIBSSH2_CHANNEL *channel); +.fi +.SH DESCRIPTION +Wait for the remote end to send EOF. + +.SH RETURN VALUE +Return 0 on success or negative on failure. It returns +LIBSSH2_ERROR_EAGAIN when it would otherwise block. While +LIBSSH2_ERROR_EAGAIN is a negative number, it is not really a failure per se. +.SH SEE ALSO +.BR libssh2_channel_send_eof(3) +.BR libssh2_channel_eof(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_channel_window_read.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_channel_window_read.3 new file mode 100644 index 0000000000000000000000000000000000000000..f6218cb65419649547f2b8c12bdcb89b4709efee --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_channel_window_read.3 @@ -0,0 +1,21 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_channel_window_read 3 "20 Feb 2010" "libssh2 1.2.4" "libssh2" +.SH NAME +libssh2_channel_window_read - convenience macro for \fIlibssh2_channel_window_read_ex(3)\fP calls +.SH SYNOPSIS +.nf +#include + +unsigned long +libssh2_channel_window_read(LIBSSH2_CHANNEL *channel); +.fi +.SH DESCRIPTION +This is a macro defined in a public libssh2 header file that is using the +underlying function \fIlibssh2_channel_window_read_ex(3)\fP. +.SH RETURN VALUE +See \fIlibssh2_channel_window_read_ex(3)\fP +.SH ERRORS +See \fIlibssh2_channel_window_read_ex(3)\fP +.SH SEE ALSO +.BR libssh2_channel_window_read_ex(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_channel_window_read_ex.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_channel_window_read_ex.3 new file mode 100644 index 0000000000000000000000000000000000000000..3e1eebceaac6e555ba3dcc0d0bf734f70e421aea --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_channel_window_read_ex.3 @@ -0,0 +1,27 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_channel_window_read_ex 3 "1 Jun 2007" "libssh2 0.15" "libssh2" +.SH NAME +libssh2_channel_window_read_ex - Check the status of the read window +.SH SYNOPSIS +.nf +#include + +unsigned long +libssh2_channel_window_read_ex(LIBSSH2_CHANNEL *channel, + unsigned long *read_avail, + unsigned long *window_size_initial) +.fi +.SH DESCRIPTION +Check the status of the read window. Returns the number of bytes which the +remote end may send without overflowing the window limit read_avail (if +passed) will be populated with the number of bytes actually available to be +read window_size_initial (if passed) will be populated with the +window_size_initial as defined by the channel_open request +.SH RETURN VALUE +The number of bytes which the remote end may send without overflowing the +window limit +.SH ERRORS +.SH SEE ALSO +.BR libssh2_channel_receive_window_adjust(3), +.BR libssh2_channel_window_write_ex(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_channel_window_write.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_channel_window_write.3 new file mode 100644 index 0000000000000000000000000000000000000000..aa20d02d8512268fb4ddea13ec88d252746329c8 --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_channel_window_write.3 @@ -0,0 +1,21 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_channel_window_write 3 "20 Feb 2010" "libssh2 1.2.4" "libssh2" +.SH NAME +libssh2_channel_window_write - convenience macro for \fIlibssh2_channel_window_write_ex(3)\fP calls +.SH SYNOPSIS +.nf +#include + +unsigned long +libssh2_channel_window_write(LIBSSH2_CHANNEL *channel); +.fi +.SH DESCRIPTION +This is a macro defined in a public libssh2 header file that is using the +underlying function \fIlibssh2_channel_window_write_ex(3)\fP. +.SH RETURN VALUE +See \fIlibssh2_channel_window_write_ex(3)\fP +.SH ERRORS +See \fIlibssh2_channel_window_write_ex(3)\fP +.SH SEE ALSO +.BR libssh2_channel_window_write_ex(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_channel_window_write_ex.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_channel_window_write_ex.3 new file mode 100644 index 0000000000000000000000000000000000000000..7e8ff5fea93f457e1eea118938c492b85bb1cac6 --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_channel_window_write_ex.3 @@ -0,0 +1,24 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_channel_window_write_ex 3 "1 Jun 2007" "libssh2 0.15" "libssh2" +.SH NAME +libssh2_channel_window_write_ex - Check the status of the write window +.SH SYNOPSIS +.nf +#include + +unsigned long +libssh2_channel_window_write_ex(LIBSSH2_CHANNEL *channel, + unsigned long *window_size_initial) +.fi +.SH DESCRIPTION +Check the status of the write window Returns the number of bytes which may be +safely written on the channel without blocking. 'window_size_initial' (if +passed) will be populated with the size of the initial window as defined by +the channel_open request +.SH RETURN VALUE +Number of bytes which may be safely written on the channel without blocking. +.SH ERRORS +.SH SEE ALSO +.BR libssh2_channel_window_read_ex(3), +.BR libssh2_channel_receive_window_adjust(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_channel_write.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_channel_write.3 new file mode 100644 index 0000000000000000000000000000000000000000..6ced72d929fe4ef035a61a308a23b411676e3cc6 --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_channel_write.3 @@ -0,0 +1,22 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_channel_write 3 "20 Feb 2010" "libssh2 1.2.4" "libssh2" +.SH NAME +libssh2_channel_write - convenience macro for \fIlibssh2_channel_write_ex(3)\fP +.SH SYNOPSIS +.nf +#include + +ssize_t +libssh2_channel_write(LIBSSH2_CHANNEL *channel, + const char *buf, size_t buflen); +.fi +.SH DESCRIPTION +This is a macro defined in a public libssh2 header file that is using the +underlying function \fIlibssh2_channel_write_ex(3)\fP. +.SH RETURN VALUE +See \fIlibssh2_channel_write_ex(3)\fP +.SH ERRORS +See \fIlibssh2_channel_write_ex(3)\fP +.SH SEE ALSO +.BR libssh2_channel_write_ex(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_channel_write_ex.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_channel_write_ex.3 new file mode 100644 index 0000000000000000000000000000000000000000..934a79c2b93b267726279888c3db510baf47dc6b --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_channel_write_ex.3 @@ -0,0 +1,56 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_channel_write_ex 3 "1 Jun 2007" "libssh2 0.15" "libssh2" +.SH NAME +libssh2_channel_write_ex - write data to a channel stream blocking +.SH SYNOPSIS +.nf +#include + +ssize_t +libssh2_channel_write_ex(LIBSSH2_CHANNEL *channel, + int stream_id, char *buf, + size_t buflen); +.fi +.SH DESCRIPTION +Write data to a channel stream. All channel streams have one standard I/O +substream (stream_id == 0), and may have up to 2^32 extended data streams as +identified by the selected \fIstream_id\fP. The SSH2 protocol currently +defines a stream ID of 1 to be the stderr substream. + +\fIchannel\fP - active channel stream to write to. + +\fIstream_id\fP - substream ID number (e.g. 0 or SSH_EXTENDED_DATA_STDERR) + +\fIbuf\fP - pointer to buffer to write + +\fIbuflen\fP - size of the data to write + +\fIlibssh2_channel_write(3)\fP and \fIlibssh2_channel_write_stderr(3)\fP are +convenience macros for this function. + +\fIlibssh2_channel_write_ex(3)\fP will use as much as possible of the buffer +and put it into a single SSH protocol packet. This means that to get maximum +performance when sending larger files, you should try to always pass in at +least 32K of data to this function. +.SH RETURN VALUE +Actual number of bytes written or negative on failure. +LIBSSH2_ERROR_EAGAIN when it would otherwise block. While +LIBSSH2_ERROR_EAGAIN is a negative number, it is not really a failure per se. +.SH ERRORS +\fILIBSSH2_ERROR_ALLOC\fP - An internal memory allocation call failed. + +\fILIBSSH2_ERROR_SOCKET_SEND\fP - Unable to send data on socket. + +\fILIBSSH2_ERROR_CHANNEL_CLOSED\fP - The channel has been closed. + +\fILIBSSH2_ERROR_CHANNEL_EOF_SENT\fP - The channel has been requested to be + +\fILIBSSH2_ERROR_BAD_USE\fP - This can be returned if you ignored a previous +return for LIBSSH2_ERROR_EAGAIN and rather than sending the original buffer with +the original size, you sent a new buffer with a different size. + +closed. +.SH SEE ALSO +.BR libssh2_channel_open_ex(3) +.BR libssh2_channel_read_ex(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_channel_write_stderr.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_channel_write_stderr.3 new file mode 100644 index 0000000000000000000000000000000000000000..832a5c26c50c942f834cc88387ede1eda88a9c51 --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_channel_write_stderr.3 @@ -0,0 +1,22 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_channel_write_stderr 3 "20 Feb 2010" "libssh2 1.2.4" "libssh2" +.SH NAME +libssh2_channel_write_stderr - convenience macro for \fIlibssh2_channel_write_ex(3)\fP +.SH SYNOPSIS +.nf +#include + +ssize_t +libssh2_channel_write_stderr(LIBSSH2_CHANNEL *channel, + const char *buf, size_t buflen); +.fi +.SH DESCRIPTION +This is a macro defined in a public libssh2 header file that is using the +underlying function \fIlibssh2_channel_write_ex(3)\fP. +.SH RETURN VALUE +See \fIlibssh2_channel_write_ex(3)\fP +.SH ERRORS +See \fIlibssh2_channel_write_ex(3)\fP +.SH SEE ALSO +.BR libssh2_channel_write_ex(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_channel_x11_req.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_channel_x11_req.3 new file mode 100644 index 0000000000000000000000000000000000000000..15300a22950ec4a07140fb9e91a6ac06f7a0b5f7 --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_channel_x11_req.3 @@ -0,0 +1,21 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_channel_x11_req 3 "20 Feb 2010" "libssh2 1.2.4" "libssh2" +.SH NAME +libssh2_channel_x11_req - convenience macro for \fIlibssh2_channel_x11_req_ex(3)\fP calls +.SH SYNOPSIS +.nf +#include + +int +libssh2_channel_x11_req(LIBSSH2_CHANNEL *channel, int screen_number); +.fi +.SH DESCRIPTION +This is a macro defined in a public libssh2 header file that is using the +underlying function \fIlibssh2_channel_x11_req_ex(3)\fP. +.SH RETURN VALUE +See \fIlibssh2_channel_x11_req_ex(3)\fP +.SH ERRORS +See \fIlibssh2_channel_x11_req_ex(3)\fP +.SH SEE ALSO +.BR libssh2_channel_x11_req_ex(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_channel_x11_req_ex.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_channel_x11_req_ex.3 new file mode 100644 index 0000000000000000000000000000000000000000..a87e40eeca2beebc366064d157ac1da9dac500a0 --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_channel_x11_req_ex.3 @@ -0,0 +1,47 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_channel_x11_req_ex 3 "1 Jun 2007" "libssh2 0.15" "libssh2" +.SH NAME +libssh2_channel_x11_req_ex - request an X11 forwarding channel +.SH SYNOPSIS +.nf +#include + +int +libssh2_channel_x11_req_ex(LIBSSH2_CHANNEL *channel, int single_connection, + const char *auth_proto, const char *auth_cookie, + int screen_number); + +int +libssh2_channel_x11_req(LIBSSH2_CHANNEL *channel, + int screen_number); +.fi +.SH DESCRIPTION +\fIchannel\fP - Previously opened channel instance such as returned by +.BR libssh2_channel_open_ex(3) + +\fIsingle_connection\fP - non-zero to only forward a single connection. + +\fIauth_proto\fP - X11 authentication protocol to use + +\fIauth_cookie\fP - the cookie (hexadecimal encoded). + +\fIscreen_number\fP - the XLL screen to forward + +Request an X11 forwarding on \fIchannel\fP. To use X11 forwarding, +.BR libssh2_session_callback_set2(3) +must first be called to set \fBLIBSSH2_CALLBACK_X11\fP. This callback will be +invoked when the remote host accepts the X11 forwarding. +.SH RETURN VALUE +Return 0 on success or negative on failure. It returns +LIBSSH2_ERROR_EAGAIN when it would otherwise block. While +LIBSSH2_ERROR_EAGAIN is a negative number, it is not really a failure per se. +.SH ERRORS +\fILIBSSH2_ERROR_ALLOC\fP - An internal memory allocation call failed. + +\fILIBSSH2_ERROR_SOCKET_SEND\fP - Unable to send data on socket. + +\fILIBSSH2_ERROR_CHANNEL_REQUEST_DENIED\fP - +.SH SEE ALSO +.BR libssh2_channel_open_ex(3) +.BR libssh2_session_callback_set2(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_crypto_engine.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_crypto_engine.3 new file mode 100644 index 0000000000000000000000000000000000000000..591a84acf1c4e266f9430cc892ba9d41fed3d2f3 --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_crypto_engine.3 @@ -0,0 +1,16 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_crypto_engine 3 "22 Nov 2021" "libssh2" "libssh2" +.SH NAME +libssh2_crypto_engine - retrieve used crypto engine +.SH SYNOPSIS +.nf +#include + +libssh2_crypto_engine_t +libssh2_crypto_engine(void); +.fi +.SH DESCRIPTION +Returns currently used crypto engine, as en enum value. +.SH AVAILABILITY +Added in libssh2 1.11 diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_exit.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_exit.3 new file mode 100644 index 0000000000000000000000000000000000000000..cc5f158ff3603e9b10ef303976f23d4e26f07eff --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_exit.3 @@ -0,0 +1,18 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_exit 3 "19 Mar 2010" "libssh2" "libssh2" +.SH NAME +libssh2_exit - global library deinitialization +.SH SYNOPSIS +.nf +#include + +void +libssh2_exit(void); +.fi +.SH DESCRIPTION +Exit the libssh2 functions and frees all memory used internal. +.SH AVAILABILITY +Added in libssh2 1.2.5 +.SH SEE ALSO +.BR libssh2_init(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_free.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_free.3 new file mode 100644 index 0000000000000000000000000000000000000000..3aeed4af7ee41e8bc3f8c1ae7b61fb89477b06f3 --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_free.3 @@ -0,0 +1,23 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_free 3 "13 Oct 2010" "libssh2" "libssh2" +.SH NAME +libssh2_free - deallocate libssh2 memory +.SH SYNOPSIS +.nf +#include + +void +libssh2_free(LIBSSH2_SESSION *session, void *ptr); +.fi +.SH DESCRIPTION +Deallocate memory allocated by earlier call to libssh2 functions. It +uses the memory allocation callbacks provided by the application, if any. +Otherwise, this will call free(). + +This function is mostly useful under Windows when libssh2 is linked to +one run-time library and the application to another. +.SH AVAILABILITY +Added in libssh2 1.2.8 +.SH SEE ALSO +.BR libssh2_session_init_ex(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_hostkey_hash.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_hostkey_hash.3 new file mode 100644 index 0000000000000000000000000000000000000000..a33edac0487cc93b026815015012b2b708dac8e5 --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_hostkey_hash.3 @@ -0,0 +1,29 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_hostkey_hash 3 "1 Jun 2007" "libssh2 0.15" "libssh2" +.SH NAME +libssh2_hostkey_hash - return a hash of the remote host's key +.SH SYNOPSIS +.nf +#include + +const char * +libssh2_hostkey_hash(LIBSSH2_SESSION *session, int hash_type); +.fi +.SH DESCRIPTION +\fIsession\fP - Session instance as returned by +.BR libssh2_session_init_ex(3) + +\fIhash_type\fP - One of: \fBLIBSSH2_HOSTKEY_HASH_MD5\fP, +\fBLIBSSH2_HOSTKEY_HASH_SHA1\fP or \fBLIBSSH2_HOSTKEY_HASH_SHA256\fP. + +Returns the computed digest of the remote system's hostkey. The length of +the returned string is hash_type specific (e.g. 16 bytes for MD5, +20 bytes for SHA1, 32 bytes for SHA256). +.SH RETURN VALUE +Computed hostkey hash value, or NULL if the information is not available +(either the session has not yet been started up, or the requested hash +algorithm was not available). The hash consists of raw binary bytes, not hex +digits, so it is not directly printable. +.SH SEE ALSO +.BR libssh2_session_init_ex(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_init.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_init.3 new file mode 100644 index 0000000000000000000000000000000000000000..5631d7f79a0883cb202f51fbde15eb9a4ad52b0f --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_init.3 @@ -0,0 +1,24 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_init 3 "19 Mar 2010" "libssh2" "libssh2" +.SH NAME +libssh2_init - global library initialization +.SH SYNOPSIS +.nf +#include + +#define LIBSSH2_INIT_NO_CRYPTO 0x0001 + +int +libssh2_init(int flags); +.fi +.SH DESCRIPTION +Initialize the libssh2 functions. This typically initialize the +crypto library. It uses a global state, and is not thread safe -- you +must make sure this function is not called concurrently. +.SH RETURN VALUE +Returns 0 if succeeded, or a negative value for error. +.SH AVAILABILITY +Added in libssh2 1.2.5 +.SH SEE ALSO +.BR libssh2_exit(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_keepalive_config.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_keepalive_config.3 new file mode 100644 index 0000000000000000000000000000000000000000..c78053e9bfb01a38cdabcb1518f3b4323fc8744c --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_keepalive_config.3 @@ -0,0 +1,29 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_keepalive_config 3 "12 Apr 2011" "libssh2" "libssh2" +.SH NAME +libssh2_keepalive_config - short function description +.SH SYNOPSIS +.nf +#include + +void +libssh2_keepalive_config(LIBSSH2_SESSION *session, + int want_reply, + unsigned int interval); +.fi +.SH DESCRIPTION +Set how often keepalive messages should be sent. \fBwant_reply\fP indicates +whether the keepalive messages should request a response from the server. +\fBinterval\fP is number of seconds that can pass without any I/O, use 0 (the +default) to disable keepalives. To avoid some busy-loop corner-cases, if you +specify an interval of 1 it will be treated as 2. + +Note that non-blocking applications are responsible for sending the keepalive +messages using \fBlibssh2_keepalive_send(3)\fP. +.SH RETURN VALUE +Nothing +.SH AVAILABILITY +Added in libssh2 1.2.5 +.SH SEE ALSO +.BR libssh2_keepalive_send(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_keepalive_send.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_keepalive_send.3 new file mode 100644 index 0000000000000000000000000000000000000000..b660d461479f3a5c7c6328b3d91943a3ded6c595 --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_keepalive_send.3 @@ -0,0 +1,22 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_keepalive_send 3 "13 Apr 2011" "libssh2" "libssh2" +.SH NAME +libssh2_keepalive_send - short function description +.SH SYNOPSIS +.nf +#include + +int +libssh2_keepalive_send(LIBSSH2_SESSION *session, + int *seconds_to_next); +.fi +.SH DESCRIPTION +Send a keepalive message if needed. \fBseconds_to_next\fP indicates how many +seconds you can sleep after this call before you need to call it again. +.SH RETURN VALUE +Returns 0 on success, or LIBSSH2_ERROR_SOCKET_SEND on I/O errors. +.SH AVAILABILITY +Added in libssh2 1.2.5 +.SH SEE ALSO +.BR libssh2_keepalive_config(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_knownhost_add.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_knownhost_add.3 new file mode 100644 index 0000000000000000000000000000000000000000..c881e36f67dfb930bfed945887bbf1618f92c946 --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_knownhost_add.3 @@ -0,0 +1,67 @@ +.\" Copyright (C) Daniel Stenberg +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_knownhost_add 3 "28 May 2009" "libssh2" "libssh2" +.SH NAME +libssh2_knownhost_add - add a known host +.SH SYNOPSIS +.nf +#include + +int +libssh2_knownhost_add(LIBSSH2_KNOWNHOSTS *hosts, + char *host, char *salt, + char *key, size_t keylen, + int typemask, + struct libssh2_knownhost **store); +.fi +.SH DESCRIPTION +We discourage use of this function as of libssh2 1.2.5. Instead we strongly +urge users to use \fIlibssh2_knownhost_addc(3)\fP instead, which as a more +complete API. \fIlibssh2_knownhost_add(3)\fP is subject for removal in a +future release. + +Adds a known host to the collection of known hosts identified by the 'hosts' +handle. + +\fIhost\fP is a pointer the host name in plain text or hashed. If hashed, it +must be provided base64 encoded. The host name can be the IP numerical address +of the host or the full name. + +\fIsalt\P is a pointer to the salt used for the host hashing, if the host is +provided hashed. If the host is provided in plain text, salt has no meaning. +The salt has to be provided base64 encoded with a trailing zero byte. + +\fIkey\fP is a pointer to the key for the given host. + +\fIkeylen\fP is the total size in bytes of the key pointed to by the \fIkey\fP +argument + +\fItypemask\fP is a bitmask that specifies format and info about the data +passed to this function. Specifically, it details what format the host name is, +what format the key is and what key type it is. + +The host name is given as one of the following types: +LIBSSH2_KNOWNHOST_TYPE_PLAIN, LIBSSH2_KNOWNHOST_TYPE_SHA1 or +LIBSSH2_KNOWNHOST_TYPE_CUSTOM. + +The key is encoded using one of the following encodings: +LIBSSH2_KNOWNHOST_KEYENC_RAW or LIBSSH2_KNOWNHOST_KEYENC_BASE64. + +The key is using one of these algorithms: +LIBSSH2_KNOWNHOST_KEY_RSA1, LIBSSH2_KNOWNHOST_KEY_SSHRSA or +LIBSSH2_KNOWNHOST_KEY_SSHDSS (deprecated). + +\fIstore\fP should point to a pointer that gets filled in to point to the +known host data after the addition. NULL can be passed if you do not care about +this pointer. +.SH RETURN VALUE +Returns a regular libssh2 error code, where negative values are error codes +and 0 indicates success. +.SH AVAILABILITY +Added in libssh2 1.2, deprecated since libssh2 1.2.5. Use +\fIlibssh2_knownhost_addc(3)\fP instead! +.SH SEE ALSO +.BR libssh2_knownhost_init(3) +.BR libssh2_knownhost_free(3) +.BR libssh2_knownhost_check(3) +.BR libssh2_knownhost_addc(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_knownhost_addc.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_knownhost_addc.3 new file mode 100644 index 0000000000000000000000000000000000000000..5a1b8c56058ca1203cbffd2a069216bdb6b413c8 --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_knownhost_addc.3 @@ -0,0 +1,70 @@ +.\" Copyright (C) Daniel Stenberg +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_knownhost_addc 3 "28 May 2009" "libssh2 1.2" "libssh2" +.SH NAME +libssh2_knownhost_addc - add a known host +.SH SYNOPSIS +.nf +#include + +int +libssh2_knownhost_addc(LIBSSH2_KNOWNHOSTS *hosts, + char *host, char *salt, + char *key, size_t keylen, + const char *comment, size_t commentlen, + int typemask, + struct libssh2_knownhost **store); +.fi +.SH DESCRIPTION +Adds a known host to the collection of known hosts identified by the 'hosts' +handle. + +\fIhost\fP is a pointer the host name in plain text or hashed. If hashed, it +must be provided base64 encoded. The host name can be the IP numerical address +of the host or the full name. + +If you want to add a key for a specific port number for the given host, you +must provide the host name like '[host]:port' with the actual characters '[' +and ']' enclosing the host name and a colon separating the host part from the +port number. For example: \&"[host.example.com]:222". + +\fIsalt\fP is a pointer to the salt used for the host hashing, if the host is +provided hashed. If the host is provided in plain text, salt has no meaning. +The salt has to be provided base64 encoded with a trailing zero byte. + +\fIkey\fP is a pointer to the key for the given host. + +\fIkeylen\fP is the total size in bytes of the key pointed to by the \fIkey\fP +argument + +\fIcomment\fP is a pointer to a comment for the key. + +\fIcommentlen\fP is the total size in bytes of the comment pointed to by the \fIcomment\fP argument + +\fItypemask\fP is a bitmask that specifies format and info about the data +passed to this function. Specifically, it details what format the host name is, +what format the key is and what key type it is. + +The host name is given as one of the following types: +LIBSSH2_KNOWNHOST_TYPE_PLAIN, LIBSSH2_KNOWNHOST_TYPE_SHA1 or +LIBSSH2_KNOWNHOST_TYPE_CUSTOM. + +The key is encoded using one of the following encodings: +LIBSSH2_KNOWNHOST_KEYENC_RAW or LIBSSH2_KNOWNHOST_KEYENC_BASE64. + +The key is using one of these algorithms: +LIBSSH2_KNOWNHOST_KEY_RSA1, LIBSSH2_KNOWNHOST_KEY_SSHRSA or +LIBSSH2_KNOWNHOST_KEY_SSHDSS (deprecated). + +\fIstore\fP should point to a pointer that gets filled in to point to the +known host data after the addition. NULL can be passed if you do not care about +this pointer. +.SH RETURN VALUE +Returns a regular libssh2 error code, where negative values are error codes +and 0 indicates success. +.SH AVAILABILITY +Added in libssh2 1.2.5 +.SH SEE ALSO +.BR libssh2_knownhost_init(3) +.BR libssh2_knownhost_free(3) +.BR libssh2_knownhost_check(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_knownhost_check.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_knownhost_check.3 new file mode 100644 index 0000000000000000000000000000000000000000..37d5c230868c89dd5f2a035bb1246e0024f0efb1 --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_knownhost_check.3 @@ -0,0 +1,60 @@ +.\" Copyright (C) Daniel Stenberg +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_knownhost_check 3 "28 May 2009" "libssh2" "libssh2" +.SH NAME +libssh2_knownhost_check - check a host+key against the list of known hosts +.SH SYNOPSIS +.nf +#include + +int +libssh2_knownhost_check(LIBSSH2_KNOWNHOSTS *hosts, + const char *host, + const char *key, size_t keylen, + int typemask, + struct libssh2_knownhost **knownhost); +.fi +.SH DESCRIPTION +Checks a host and its associated key against the collection of known hosts, +and returns info back about the (partially) matched entry. + +\fIhost\fP is a pointer the host name in plain text. The host name can be the +IP numerical address of the host or the full name. + +\fIkey\fP is a pointer to the key for the given host. + +\fIkeylen\fP is the total size in bytes of the key pointed to by the \fIkey\fP +argument + +\fItypemask\fP is a bitmask that specifies format and info about the data +passed to this function. Specifically, it details what format the host name is, +what format the key is and what key type it is. + +The host name is given as one of the following types: +LIBSSH2_KNOWNHOST_TYPE_PLAIN or LIBSSH2_KNOWNHOST_TYPE_CUSTOM. + +The key is encoded using one of the following encodings: +LIBSSH2_KNOWNHOST_KEYENC_RAW or LIBSSH2_KNOWNHOST_KEYENC_BASE64. + +\fIknownhost\fP if set to non-NULL, it must be a pointer to a 'struct +libssh2_knownhost' pointer that gets filled in to point to info about a known +host that matches or partially matches. +.SH RETURN VALUE +\fIlibssh2_knownhost_check(3)\fP returns info about how well the provided +host + key pair matched one of the entries in the list of known hosts. + +LIBSSH2_KNOWNHOST_CHECK_FAILURE - something prevented the check to be made + +LIBSSH2_KNOWNHOST_CHECK_NOTFOUND - no host match was found + +LIBSSH2_KNOWNHOST_CHECK_MATCH - hosts and keys match. + +LIBSSH2_KNOWNHOST_CHECK_MISMATCH - host was found, but the keys did not match! +.SH AVAILABILITY +Added in libssh2 1.2 +.SH EXAMPLE +See the ssh2_exec.c example as provided in the tarball. +.SH SEE ALSO +.BR libssh2_knownhost_init(3) +.BR libssh2_knownhost_free(3) +.BR libssh2_knownhost_add(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_knownhost_checkp.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_knownhost_checkp.3 new file mode 100644 index 0000000000000000000000000000000000000000..de60390993b8a497a046f3e57d4ae6bfc983f4c2 --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_knownhost_checkp.3 @@ -0,0 +1,65 @@ +.\" Copyright (C) Daniel Stenberg +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_knownhost_checkp 3 "1 May 2010" "libssh2" "libssh2" +.SH NAME +libssh2_knownhost_checkp - check a host+key against the list of known hosts +.SH SYNOPSIS +.nf +#include + +int +libssh2_knownhost_checkp(LIBSSH2_KNOWNHOSTS *hosts, + const char *host, int port, + const char *key, size_t keylen, + int typemask, + struct libssh2_knownhost **knownhost); +.fi +.SH DESCRIPTION +Checks a host and its associated key against the collection of known hosts, +and returns info back about the (partially) matched entry. + +\fIhost\fP is a pointer the host name in plain text. The host name can be the +IP numerical address of the host or the full name. + +\fIport\fP is the port number used by the host (or a negative number +to check the generic host). If the port number is given, libssh2 will +check the key for the specific host + port number combination in +addition to the plain host name only check. + +\fIkey\fP is a pointer to the key for the given host. + +\fIkeylen\fP is the total size in bytes of the key pointed to by the \fIkey\fP +argument + +\fItypemask\fP is a bitmask that specifies format and info about the data +passed to this function. Specifically, it details what format the host name is, +what format the key is and what key type it is. + +The host name is given as one of the following types: +LIBSSH2_KNOWNHOST_TYPE_PLAIN or LIBSSH2_KNOWNHOST_TYPE_CUSTOM. + +The key is encoded using one of the following encodings: +LIBSSH2_KNOWNHOST_KEYENC_RAW or LIBSSH2_KNOWNHOST_KEYENC_BASE64. + +\fIknownhost\fP if set to non-NULL, it must be a pointer to a 'struct +libssh2_knownhost' pointer that gets filled in to point to info about a known +host that matches or partially matches. +.SH RETURN VALUE +\fIlibssh2_knownhost_check(3)\fP returns info about how well the provided +host + key pair matched one of the entries in the list of known hosts. + +LIBSSH2_KNOWNHOST_CHECK_FAILURE - something prevented the check to be made + +LIBSSH2_KNOWNHOST_CHECK_NOTFOUND - no host match was found + +LIBSSH2_KNOWNHOST_CHECK_MATCH - hosts and keys match. + +LIBSSH2_KNOWNHOST_CHECK_MISMATCH - host was found, but the keys did not match! +.SH AVAILABILITY +Added in libssh2 1.2.6 +.SH EXAMPLE +See the ssh2_exec.c example as provided in the tarball. +.SH SEE ALSO +.BR libssh2_knownhost_init(3) +.BR libssh2_knownhost_free(3) +.BR libssh2_knownhost_add(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_knownhost_del.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_knownhost_del.3 new file mode 100644 index 0000000000000000000000000000000000000000..9efc4c67093f203e71629aaa88167a6e2359b1cb --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_knownhost_del.3 @@ -0,0 +1,28 @@ +.\" Copyright (C) Daniel Stenberg +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_knownhost_del 3 "28 May 2009" "libssh2" "libssh2" +.SH NAME +libssh2_knownhost_del - delete a known host entry +.SH SYNOPSIS +.nf +#include + +int +libssh2_knownhost_del(LIBSSH2_KNOWNHOSTS *hosts, + struct libssh2_knownhost *entry); +.fi +.SH DESCRIPTION +Delete a known host entry from the collection of known hosts. + +\fIentry\fP is a pointer to a struct that you can extract with +\fIlibssh2_knownhost_check(3)\fP or \fIlibssh2_knownhost_get(3)\fP. +.SH RETURN VALUE +Returns a regular libssh2 error code, where negative values are error codes +and 0 indicates success. +.SH AVAILABILITY +Added in libssh2 1.2 +.SH SEE ALSO +.BR libssh2_knownhost_init(3) +.BR libssh2_knownhost_free(3) +.BR libssh2_knownhost_add(3) +.BR libssh2_knownhost_check(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_knownhost_free.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_knownhost_free.3 new file mode 100644 index 0000000000000000000000000000000000000000..f9e173445d59ad1bc3ebb25d74d663298311c9a8 --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_knownhost_free.3 @@ -0,0 +1,22 @@ +.\" Copyright (C) Daniel Stenberg +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_knownhost_free 3 "28 May 2009" "libssh2" "libssh2" +.SH NAME +libssh2_knownhost_free - free a collection of known hosts +.SH SYNOPSIS +.nf +#include + +void +libssh2_knownhost_free(LIBSSH2_KNOWNHOSTS *hosts); +.fi +.SH DESCRIPTION +Free a collection of known hosts. +.SH RETURN VALUE +None. +.SH AVAILABILITY +Added in libssh2 1.2 +.SH SEE ALSO +.BR libssh2_knownhost_init(3) +.BR libssh2_knownhost_add(3) +.BR libssh2_knownhost_check(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_knownhost_get.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_knownhost_get.3 new file mode 100644 index 0000000000000000000000000000000000000000..318a7fc4547a4d04394bf3f1c03e1fb5b7ccd328 --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_knownhost_get.3 @@ -0,0 +1,37 @@ +.\" Copyright (C) Daniel Stenberg +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_knownhost_get 3 "28 May 2009" "libssh2" "libssh2" +.SH NAME +libssh2_knownhost_get - get a known host off the collection of known hosts +.SH SYNOPSIS +.nf +#include + +int +libssh2_knownhost_get(LIBSSH2_KNOWNHOSTS *hosts, + struct libssh2_knownhost **store, + struct libssh2_knownhost *prev): +.fi +.SH DESCRIPTION +\fIlibssh2_knownhost_get(3)\fP allows an application to iterate over all known +hosts in the collection. + +\fIstore\fP should point to a pointer that gets filled in to point to the +known host data. + +\fIprev\fP is a pointer to a previous 'struct libssh2_knownhost' as returned +by a previous invoke of this function, or NULL to get the first entry in the +internal collection. +.SH RETURN VALUE +Returns 0 if everything is fine and information about a host was stored in +the \fIstore\fP struct. + +Returns 1 if it reached the end of hosts. + +Returns negative values for error +.SH AVAILABILITY +Added in libssh2 1.2 +.SH SEE ALSO +.BR libssh2_knownhost_readfile(3) +.BR libssh2_knownhost_writefile(3) +.BR libssh2_knownhost_add(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_knownhost_init.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_knownhost_init.3 new file mode 100644 index 0000000000000000000000000000000000000000..95b7c62efffd42bf4195b435cc9e1a5e30b2d51f --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_knownhost_init.3 @@ -0,0 +1,27 @@ +.\" Copyright (C) Daniel Stenberg +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_knownhost_init 3 "28 May 2009" "libssh2" "libssh2" +.SH NAME +libssh2_knownhost_init - init a collection of known hosts +.SH SYNOPSIS +.nf +#include + +LIBSSH2_KNOWNHOSTS * +libssh2_knownhost_init(LIBSSH2_SESSION *session); +.fi +.SH DESCRIPTION +Init a collection of known hosts for this session. Returns the handle to an +internal representation of a known host collection. + +Call \fBlibssh2_knownhost_free(3)\fP to free the collection again after you are +doing using it. +.SH RETURN VALUE +Returns a handle pointer or NULL if something went wrong. The returned handle +is used as input to all other known host related functions libssh2 provides. +.SH AVAILABILITY +Added in libssh2 1.2 +.SH SEE ALSO +.BR libssh2_knownhost_free(3) +.BR libssh2_knownhost_add(3) +.BR libssh2_knownhost_check(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_knownhost_readfile.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_knownhost_readfile.3 new file mode 100644 index 0000000000000000000000000000000000000000..c5a46970882bdb76ee5579bde04dd5b66752f44c --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_knownhost_readfile.3 @@ -0,0 +1,31 @@ +.\" Copyright (C) Daniel Stenberg +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_knownhost_readfile 3 "28 May 2009" "libssh2" "libssh2" +.SH NAME +libssh2_knownhost_readfile - parse a file of known hosts +.SH SYNOPSIS +.nf +#include + +int +libssh2_knownhost_readfile(LIBSSH2_KNOWNHOSTS *hosts, + const char *filename, int type); +.fi +.SH DESCRIPTION +Reads a collection of known hosts from a specified file and adds them to the +collection of known hosts. + +\fIfilename\fP specifies which file to read + +\fItype\fP specifies what file type it is, and +\fILIBSSH2_KNOWNHOST_FILE_OPENSSH\fP is the only currently supported +format. This file is normally found named ~/.ssh/known_hosts +.SH RETURN VALUE +Returns a negative value, a regular libssh2 error code for errors, or a +positive number as number of parsed known hosts in the file. +.SH AVAILABILITY +Added in libssh2 1.2 +.SH SEE ALSO +.BR libssh2_knownhost_init(3) +.BR libssh2_knownhost_free(3) +.BR libssh2_knownhost_check(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_knownhost_readline.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_knownhost_readline.3 new file mode 100644 index 0000000000000000000000000000000000000000..2418494247817ce96390abb8a3c85852188694a8 --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_knownhost_readline.3 @@ -0,0 +1,32 @@ +.\" Copyright (C) Daniel Stenberg +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_knownhost_readline 3 "28 May 2009" "libssh2" "libssh2" +.SH NAME +libssh2_knownhost_readline - read a known host line +.SH SYNOPSIS +.nf +#include + +int +libssh2_knownhost_readline(LIBSSH2_KNOWNHOSTS *hosts, + const char *line, size_t len, int type): +.fi +.SH DESCRIPTION +Tell libssh2 to read a buffer as it if is a line from a known hosts file. + +\fIline\fP points to the start of the line + +\fIlen\fP is the length of the line in bytes + +\fItype\fP specifies what file type it is, and +\fILIBSSH2_KNOWNHOST_FILE_OPENSSH\fP is the only currently supported +format. This file is normally found named ~/.ssh/known_hosts +.SH RETURN VALUE +Returns a regular libssh2 error code, where negative values are error codes +and 0 indicates success. +.SH AVAILABILITY +Added in libssh2 1.2 +.SH SEE ALSO +.BR libssh2_knownhost_get(3) +.BR libssh2_knownhost_writeline(3) +.BR libssh2_knownhost_readfile(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_knownhost_writefile.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_knownhost_writefile.3 new file mode 100644 index 0000000000000000000000000000000000000000..2e2b0a2fc6ab6a68cb1b1186268ea958e5c568d8 --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_knownhost_writefile.3 @@ -0,0 +1,30 @@ +.\" Copyright (C) Daniel Stenberg +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_knownhost_writefile 3 "28 May 2009" "libssh2" "libssh2" +.SH NAME +libssh2_knownhost_writefile - write a collection of known hosts to a file +.SH SYNOPSIS +.nf +#include + +int +libssh2_knownhost_writefile(LIBSSH2_KNOWNHOSTS *hosts, + const char *filename, int type); +.fi +.SH DESCRIPTION +Writes all the known hosts to the specified file using the specified file +format. + +\fIfilename\fP specifies what filename to create + +\fItype\fP specifies what file type it is, and +\fILIBSSH2_KNOWNHOST_FILE_OPENSSH\fP is the only currently supported +format. +.SH RETURN VALUE +Returns a regular libssh2 error code, where negative values are error codes +and 0 indicates success. +.SH AVAILABILITY +Added in libssh2 1.2 +.SH SEE ALSO +.BR libssh2_knownhost_readfile(3) +.BR libssh2_knownhost_add(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_knownhost_writeline.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_knownhost_writeline.3 new file mode 100644 index 0000000000000000000000000000000000000000..03023f7246f4dbd99449f554391269f08fb6ca66 --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_knownhost_writeline.3 @@ -0,0 +1,47 @@ +.\" Copyright (C) Daniel Stenberg +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_knownhost_writeline 3 "28 May 2009" "libssh2" "libssh2" +.SH NAME +libssh2_knownhost_writeline - convert a known host to a line for storage +.SH SYNOPSIS +.nf +#include + +int +libssh2_knownhost_writeline(LIBSSH2_KNOWNHOSTS *hosts, + struct libssh2_knownhost *known, + char *buffer, size_t buflen, + size_t *outlen, + int type); +.fi +.SH DESCRIPTION +Converts a single known host to a single line of output for storage, using +the 'type' output format. + +\fIknown\fP identifies which particular known host + +\fIbuffer\fP points to an allocated buffer + +\fIbuflen\fP is the size of the \fIbuffer\fP. See RETURN VALUE about the size. + +\fIoutlen\fP must be a pointer to a size_t variable that will get the output +length of the stored data chunk. The number does not included the trailing +zero! + +\fItype\fP specifies what file type it is, and +\fILIBSSH2_KNOWNHOST_FILE_OPENSSH\fP is the only currently supported +format. +.SH RETURN VALUE +Returns a regular libssh2 error code, where negative values are error codes +and 0 indicates success. + +If the provided buffer is deemed too small to fit the data libssh2 wants to +store in it, LIBSSH2_ERROR_BUFFER_TOO_SMALL will be returned. The application +is then advised to call the function again with a larger buffer. The +\fIoutlen\fP size will then hold the requested size. +.SH AVAILABILITY +Added in libssh2 1.2 +.SH SEE ALSO +.BR libssh2_knownhost_get(3) +.BR libssh2_knownhost_readline(3) +.BR libssh2_knownhost_writefile(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_poll.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_poll.3 new file mode 100644 index 0000000000000000000000000000000000000000..7bda2f2a9575139ca242026c00e3bcf5097d1ffe --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_poll.3 @@ -0,0 +1,26 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_poll 3 "14 Dec 2006" "libssh2 0.15" "libssh2" +.SH NAME +libssh2_poll - poll for activity on a socket, channel or listener +.SH SYNOPSIS +.nf +#include + +int +libssh2_poll(LIBSSH2_POLLFD *fds, unsigned int nfds, long timeout); +.fi +.SH DESCRIPTION +This function is deprecated. Do note use. We encourage users to instead use +the \fIpoll(3)\fP or \fIselect(3)\fP functions to check for socket activity or +when specific sockets are ready to get received from or send to. + +Poll for activity on a socket, channel, listener, or any combination of these +three types. The calling semantics for this function generally match +\fIpoll(2)\fP however the structure of fds is somewhat more complex in order +to accommodate the disparate datatypes, POLLFD constants have been namespaced +to avoid platform discrepancies, and revents has additional values defined. +.SH "RETURN VALUE" +Number of fds with interesting events. +.SH SEE ALSO +.BR libssh2_poll_channel_read(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_poll_channel_read.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_poll_channel_read.3 new file mode 100644 index 0000000000000000000000000000000000000000..9878c3b1d2a8608fcc07452bb17f2bbd0d6fdc55 --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_poll_channel_read.3 @@ -0,0 +1,23 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_poll_channel_read 3 "14 Dec 2006" "libssh2 0.15" "libssh2" +.SH NAME +libssh2_poll_channel_read - check if data is available +.SH SYNOPSIS +.nf +#include + +int +libssh2_poll_channel_read(LIBSSH2_CHANNEL *channel, int extended); +.fi +.SH DESCRIPTION +This function is deprecated. Do note use. + +\fIlibssh2_poll_channel_read(3)\fP checks to see if data is available in the +\fIchannel\fP's read buffer. No attempt is made with this method to see if +packets are available to be processed. For full polling support, use +\fIlibssh2_poll(3)\fP. +.SH RETURN VALUE +Returns 1 when data is available and 0 otherwise. +.SH SEE ALSO +.BR libssh2_poll(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_publickey_add.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_publickey_add.3 new file mode 100644 index 0000000000000000000000000000000000000000..75abb1152235a134f55b79467df990047b19d713 --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_publickey_add.3 @@ -0,0 +1,25 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_publickey_add 3 "20 Feb 2010" "libssh2 1.2.4" "libssh2" +.SH NAME +libssh2_publickey_add - convenience macro for \fIlibssh2_publickey_add_ex(3)\fP calls +.SH SYNOPSIS +.nf +#include + +int +libssh2_publickey_add(LIBSSH2_PUBLICKEY *pkey, + const unsigned char *name, + const unsigned char *blob, unsigned long blob_len, + char overwrite, unsigned long num_attrs, + const libssh2_publickey_attribute attrs[]); +.fi +.SH DESCRIPTION +This is a macro defined in a public libssh2 header file that is using the +underlying function \fIlibssh2_publickey_add_ex(3)\fP. +.SH RETURN VALUE +See \fIlibssh2_publickey_add_ex(3)\fP +.SH ERRORS +See \fIlibssh2_publickey_add_ex(3)\fP +.SH SEE ALSO +.BR libssh2_publickey_add_ex(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_publickey_add_ex.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_publickey_add_ex.3 new file mode 100644 index 0000000000000000000000000000000000000000..2446915bb495f065f0c2768e2c40efed7ab6edcc --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_publickey_add_ex.3 @@ -0,0 +1,28 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_publickey_add_ex 3 "1 Jun 2007" "libssh2" "libssh2" +.SH NAME +libssh2_publickey_add_ex - Add a public key entry +.SH SYNOPSIS +.nf +#include + +int +libssh2_publickey_add_ex(LIBSSH2_PUBLICKEY *pkey, + const unsigned char *name, unsigned long name_len, + const unsigned char *blob, unsigned long blob_len, + char overwrite, unsigned long num_attrs, + const libssh2_publickey_attribute attrs[]) +.fi +.SH DESCRIPTION +TBD +.SH RETURN VALUE +Returns 0 on success, negative on failure. +.SH ERRORS +LIBSSH2_ERROR_BAD_USE +LIBSSH2_ERROR_ALLOC, +LIBSSH2_ERROR_EAGAIN +LIBSSH2_ERROR_SOCKET_SEND, +LIBSSH2_ERROR_SOCKET_TIMEOUT, +LIBSSH2_ERROR_PUBLICKEY_PROTOCOL, +.SH SEE ALSO diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_publickey_init.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_publickey_init.3 new file mode 100644 index 0000000000000000000000000000000000000000..6703ebe33c3243c6dd494dafce0b177e984998b8 --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_publickey_init.3 @@ -0,0 +1,14 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_publickey_init 3 "1 Jun 2007" "libssh2" "libssh2" +.SH NAME +libssh2_publickey_init - TODO +.SH SYNOPSIS +.nf +.fi +.SH DESCRIPTION +.SH RETURN VALUE +.SH ERRORS +.SH AVAILABILITY +Added in libssh2 ?.?.? +.SH SEE ALSO diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_publickey_list_fetch.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_publickey_list_fetch.3 new file mode 100644 index 0000000000000000000000000000000000000000..aa23b7c5a6fb4d09e6b78639ec22a4547715241c --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_publickey_list_fetch.3 @@ -0,0 +1,14 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_publickey_list_fetch 3 "1 Jun 2007" "libssh2" "libssh2" +.SH NAME +libssh2_publickey_list_fetch - TODO +.SH SYNOPSIS +.nf +.fi +.SH DESCRIPTION +.SH RETURN VALUE +.SH ERRORS +.SH AVAILABILITY +Added in libssh2 ?.?.? +.SH SEE ALSO diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_publickey_list_free.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_publickey_list_free.3 new file mode 100644 index 0000000000000000000000000000000000000000..17c15304cb72c8c91987753eba65f2ea93d276c9 --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_publickey_list_free.3 @@ -0,0 +1,14 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_publickey_list_free 3 "1 Jun 2007" "libssh2" "libssh2" +.SH NAME +libssh2_publickey_list_free - TODO +.SH SYNOPSIS +.nf +.fi +.SH DESCRIPTION +.SH RETURN VALUE +.SH ERRORS +.SH AVAILABILITY +Added in libssh2 ?.?.? +.SH SEE ALSO diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_publickey_remove.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_publickey_remove.3 new file mode 100644 index 0000000000000000000000000000000000000000..a07c9b2baa82efa79bdd05a7f3a97da59564722c --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_publickey_remove.3 @@ -0,0 +1,23 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_publickey_remove 3 "20 Feb 2010" "libssh2 1.2.4" "libssh2" +.SH NAME +libssh2_publickey_remove - convenience macro for \fIlibssh2_publickey_remove_ex(3)\fP calls +.SH SYNOPSIS +.nf +#include + +int +libssh2_publickey_remove(LIBSSH2_PUBLICKEY *pkey, + const unsigned char *name, unsigned long name_len, + const unsigned char *blob, unsigned long blob_len); +.fi +.SH DESCRIPTION +This is a macro defined in a public libssh2 header file that is using the +underlying function \fIlibssh2_publickey_remove_ex(3)\fP. +.SH RETURN VALUE +See \fIlibssh2_publickey_remove_ex(3)\fP +.SH ERRORS +See \fIlibssh2_publickey_remove_ex(3)\fP +.SH SEE ALSO +.BR libssh2_publickey_remove_ex(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_publickey_remove_ex.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_publickey_remove_ex.3 new file mode 100644 index 0000000000000000000000000000000000000000..8a2ce834b232a0f8f5da304a55dae007689f2d8a --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_publickey_remove_ex.3 @@ -0,0 +1,14 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_publickey_list_remove_ex 3 "1 Jun 2007" "libssh2 0.15" "libssh2" +.SH NAME +libssh2_publickey_list_remove_ex - TODO +.SH SYNOPSIS +.nf +.fi +.SH DESCRIPTION +.SH RETURN VALUE +.SH ERRORS +.SH AVAILABILITY +Added in libssh2 ?.?.? +.SH SEE ALSO diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_publickey_shutdown.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_publickey_shutdown.3 new file mode 100644 index 0000000000000000000000000000000000000000..6ad8019689eb1bacd5733f35d91b77893402ac56 --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_publickey_shutdown.3 @@ -0,0 +1,14 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_publickey_shutdown 3 "1 Jun 2007" "libssh2 0.15" "libssh2" +.SH NAME +libssh2_publickey_shutdown - TODO +.SH SYNOPSIS +.nf +.fi +.SH DESCRIPTION +.SH RETURN VALUE +.SH ERRORS +.SH AVAILABILITY +Added in libssh2 ?.?.? +.SH SEE ALSO diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_scp_recv.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_scp_recv.3 new file mode 100644 index 0000000000000000000000000000000000000000..93bcee86aecbc22bc5e375e750dded9d3e37cf58 --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_scp_recv.3 @@ -0,0 +1,37 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_scp_recv 3 "1 Jun 2007" "libssh2 0.15" "libssh2" +.SH NAME +libssh2_scp_recv - request a remote file via SCP +.SH SYNOPSIS +.nf +#include + +LIBSSH2_CHANNEL * +libssh2_scp_recv(LIBSSH2_SESSION *session, const char *path, struct stat *sb); +.fi +.SH DESCRIPTION +This function is \fBDEPRECATED\fP in 1.7.0. Use the +\fIlibssh2_scp_recv2(3)\fP function instead! + +\fIsession\fP - Session instance as returned by +.BR libssh2_session_init_ex(3) + +\fIpath\fP - Full path and filename of file to transfer. That is the remote +file name. + +\fIsb\fP - Populated with remote file's size, mode, mtime, and atime + +Request a file from the remote host via SCP. +.SH RETURN VALUE +Pointer to a newly allocated LIBSSH2_CHANNEL instance, or NULL on errors. +.SH ERRORS +\fILIBSSH2_ERROR_ALLOC\fP - An internal memory allocation call failed. + +\fILIBSSH2_ERROR_SCP_PROTOCOL\fP - + +\fILIBSSH2_ERROR_EAGAIN\fP - Marked for non-blocking I/O but the call would +block. +.SH SEE ALSO +.BR libssh2_session_init_ex(3) +.BR libssh2_channel_open_ex(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_scp_recv2.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_scp_recv2.3 new file mode 100644 index 0000000000000000000000000000000000000000..c3a27c2c2f72b96651691d1b85d936f3946f1f7c --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_scp_recv2.3 @@ -0,0 +1,34 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_scp_recv2 3 "29 Jun 2015" "libssh2 1.6.1" "libssh2" +.SH NAME +libssh2_scp_recv2 - request a remote file via SCP +.SH SYNOPSIS +.nf +#include + +LIBSSH2_CHANNEL * +libssh2_scp_recv2(LIBSSH2_SESSION *session, const char *path, struct_stat *sb); +.fi +.SH DESCRIPTION +\fIsession\fP - Session instance as returned by +.BR libssh2_session_init_ex(3) + +\fIpath\fP - Full path and filename of file to transfer. That is the remote +file name. + +\fIsb\fP - Populated with remote file's size, mode, mtime, and atime + +Request a file from the remote host via SCP. +.SH RETURN VALUE +Pointer to a newly allocated LIBSSH2_CHANNEL instance, or NULL on errors. +.SH ERRORS +\fILIBSSH2_ERROR_ALLOC\fP - An internal memory allocation call failed. + +\fILIBSSH2_ERROR_SCP_PROTOCOL\fP - + +\fILIBSSH2_ERROR_EAGAIN\fP - Marked for non-blocking I/O but the call would +block. +.SH SEE ALSO +.BR libssh2_session_init_ex(3) +.BR libssh2_channel_open_ex(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_scp_send.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_scp_send.3 new file mode 100644 index 0000000000000000000000000000000000000000..128a24c6a33fd2ec36d0064586c71646896fd776 --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_scp_send.3 @@ -0,0 +1,22 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_scp_send 3 "20 Feb 2010" "libssh2 1.2.4" "libssh2" +.SH NAME +libssh2_scp_send - convenience macro for \fIlibssh2_scp_send_ex(3)\fP calls +.SH SYNOPSIS +.nf +#include + +LIBSSH2_CHANNEL * +libssh2_scp_send(LIBSSH2_SESSION *session, const char *path, + int mode, size_t size); +.fi +.SH DESCRIPTION +This is a macro defined in a public libssh2 header file that is using the +underlying function \fIlibssh2_scp_send_ex(3)\fP. +.SH RETURN VALUE +See \fIlibssh2_scp_send_ex(3)\fP +.SH ERRORS +See \fIlibssh2_scp_send_ex(3)\fP +.SH SEE ALSO +.BR libssh2_scp_send_ex(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_scp_send64.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_scp_send64.3 new file mode 100644 index 0000000000000000000000000000000000000000..6561103716b369bd6d20fe6876465843d5533bb1 --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_scp_send64.3 @@ -0,0 +1,50 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_scp_send64 3 "17 Apr 2010" "libssh2 1.2.6" "libssh2" +.SH NAME +libssh2_scp_send64 - Send a file via SCP +.SH SYNOPSIS +.nf +#include + +LIBSSH2_CHANNEL * +libssh2_scp_send64(LIBSSH2_SESSION *session, const char *path, int mode, + libssh2_uint64_t size, time_t mtime, time_t atime); +.fi +.SH DESCRIPTION +\fIsession\fP - Session instance as returned by +.BR libssh2_session_init_ex(3) + +\fIpath\fP - Full path and filename of file to transfer to. That is the remote +file name. + +\fImode\fP - File access mode to create file with + +\fIsize\fP - Size of file being transmitted (Must be known ahead of +time). Note that this needs to be passed on as variable type +libssh2_uint64_t. This type is 64 bit on modern operating systems and +compilers. + +\fImtime\fP - mtime to assign to file being created + +\fIatime\fP - atime to assign to file being created (Set this and +mtime to zero to instruct remote host to use current time). + +Send a file to the remote host via SCP. +.SH RETURN VALUE +Pointer to a newly allocated LIBSSH2_CHANNEL instance, or NULL on errors. + +.SH ERRORS +\fILIBSSH2_ERROR_ALLOC\fP - An internal memory allocation call failed. + +\fILIBSSH2_ERROR_SOCKET_SEND\fP - Unable to send data on socket. + +\fILIBSSH2_ERROR_SCP_PROTOCOL\fP - + +\fILIBSSH2_ERROR_EAGAIN\fP - Marked for non-blocking I/O but the call would +block. +.SH AVAILABILITY +This function was added in libssh2 1.2.6 and is meant to replace the former +\fIlibssh2_scp_send_ex(3)\fP function. +.SH SEE ALSO +.BR libssh2_channel_open_ex(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_scp_send_ex.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_scp_send_ex.3 new file mode 100644 index 0000000000000000000000000000000000000000..cc3a723efad7ce38f65ec95d2db1756c2ccee14f --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_scp_send_ex.3 @@ -0,0 +1,51 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_scp_send_ex 3 "1 Jun 2007" "libssh2 0.15" "libssh2" +.SH NAME +libssh2_scp_send_ex - Send a file via SCP +.SH SYNOPSIS +.nf +#include + +LIBSSH2_CHANNEL * +libssh2_scp_send_ex(LIBSSH2_SESSION *session, const char *path, int mode, + size_t size, long mtime, long atime); +.fi +.SH DESCRIPTION +This function has been deemed deprecated since libssh2 1.2.6. See +\fIlibssh2_scp_send64(3)\fP. + +\fIsession\fP - Session instance as returned by +.BR libssh2_session_init_ex(3) + +\fIpath\fP - Full path and filename of file to transfer to. That is the remote +file name. + +\fImode\fP - File access mode to create file with + +\fIsize\fP - Size of file being transmitted (Must be known +ahead of time precisely) + +\fImtime\fP - mtime to assign to file being created + +\fIatime\fP - atime to assign to file being created (Set this and +mtime to zero to instruct remote host to use current time). + +Send a file to the remote host via SCP. +.SH RETURN VALUE +Pointer to a newly allocated LIBSSH2_CHANNEL instance, or NULL on errors. + +.SH ERRORS +\fILIBSSH2_ERROR_ALLOC\fP - An internal memory allocation call failed. + +\fILIBSSH2_ERROR_SOCKET_SEND\fP - Unable to send data on socket. + +\fILIBSSH2_ERROR_SCP_PROTOCOL\fP - + +\fILIBSSH2_ERROR_EAGAIN\fP - Marked for non-blocking I/O but the call would +block. +.SH AVAILABILITY +This function was marked deprecated in libssh2 1.2.6 as + \fIlibssh2_scp_send64(3)\fP has been introduced to replace this function. +.SH SEE ALSO +.BR libssh2_channel_open_ex(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_session_abstract.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_session_abstract.3 new file mode 100644 index 0000000000000000000000000000000000000000..09f0e4de8033f9541d30912f3b7e6a298b649162 --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_session_abstract.3 @@ -0,0 +1,25 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_session_abstract 3 "1 Jun 2007" "libssh2 0.15" "libssh2" +.SH NAME +libssh2_session_abstract - return a pointer to a session's abstract pointer +.SH SYNOPSIS +.nf +#include + +void ** +libssh2_session_abstract(LIBSSH2_SESSION *session); +.fi +.SH DESCRIPTION +\fIsession\fP - Session instance as returned by +.BR libssh2_session_init_ex(3) + +Return a pointer to where the abstract pointer provided to +\fBlibssh2_session_init_ex(3)\fP is stored. By providing a doubly +de-referenced pointer, the internal storage of the session instance may be +modified in place. +.SH RETURN VALUE +A pointer to session internal storage whose contents point to previously +provided abstract data. +.SH SEE ALSO +.BR libssh2_session_init_ex(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_session_banner_get.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_session_banner_get.3 new file mode 100644 index 0000000000000000000000000000000000000000..88f23995e2cb8013bc0c05e11138fe10d770e16d --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_session_banner_get.3 @@ -0,0 +1,26 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_session_banner_get 3 "9 Sep 2011" "libssh2" "libssh2" +.SH NAME +libssh2_session_banner_get - get the remote banner +.SH SYNOPSIS +.nf +#include + +const char * +libssh2_session_banner_get(oLIBSSH2_SESSION *session); +.fi +.SH DESCRIPTION +Once the session has been setup and \fIlibssh2_session_handshake(3)\fP has +completed successfully, this function can be used to get the server id from +the banner each server presents. +.SH RETURN VALUE +A pointer to a string or NULL if something failed. The data pointed to will be +allocated and associated to the session handle and will be freed by libssh2 +when \fIlibssh2_session_free(3)\fP is used. +.SH AVAILABILITY +Added in 1.4.0 +.SH SEE ALSO +.BR libssh2_session_banner_set(3), +.BR libssh2_session_handshake(3), +.BR libssh2_session_free(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_session_banner_set.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_session_banner_set.3 new file mode 100644 index 0000000000000000000000000000000000000000..037a4d6ab4812a3b6c56af9efa3ee1e90fc76843 --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_session_banner_set.3 @@ -0,0 +1,35 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_session_banner_set 3 "9 Sep 2011" "libssh2" "libssh2" +.SH NAME +libssh2_session_banner_set - set the SSH protocol banner for the local client +.SH SYNOPSIS +.nf +#include + +int +libssh2_session_banner_set(LIBSSH2_SESSION *session, const char *banner); +.fi +.SH DESCRIPTION +\fIsession\fP - Session instance as returned by +.BR libssh2_session_init_ex(3) + +\fIbanner\fP - A pointer to a zero-terminated string holding the user defined +banner + +Set the banner that will be sent to the remote host when the SSH session is +started with \fIlibssh2_session_handshake(3)\fP This is optional; a banner +corresponding to the protocol and libssh2 version will be sent by default. +.SH RETURN VALUE +Returns 0 on success or negative on failure. It returns LIBSSH2_ERROR_EAGAIN +when it would otherwise block. While LIBSSH2_ERROR_EAGAIN is a negative +number, it is not really a failure per se. +.SH ERRORS +\fILIBSSH2_ERROR_ALLOC\fP - An internal memory allocation call failed. +.SH AVAILABILITY +Added in 1.4.0. + +Before 1.4.0 this function was known as libssh2_banner_set(3) +.SH SEE ALSO +.BR libssh2_session_handshake(3), +.BR libssh2_session_banner_get(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_session_block_directions.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_session_block_directions.3 new file mode 100644 index 0000000000000000000000000000000000000000..106de22155a4a19fc5c6dbbe25b9bfd6267a01ec --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_session_block_directions.3 @@ -0,0 +1,33 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_session_block_directions 3 "1 Oct 2008" "libssh2" "libssh2" +.SH NAME +libssh2_session_block_directions - get directions to wait for +.SH SYNOPSIS +.nf +#include + +int +libssh2_session_block_directions(LIBSSH2_SESSION *session); +.fi +.SH DESCRIPTION +\fIsession\fP - Session instance as returned by \fBlibssh2_session_init_ex(3)\fP + +When any of libssh2 functions return \fBLIBSSH2_ERROR_EAGAIN\fP an application +should wait for the socket to have data available for reading or +writing. Depending on the return value of +\fIlibssh2_session_block_directions(3)\fP an application should wait for read, +write or both. +.SH RETURN VALUE +Returns the set of directions as a binary mask. Can be a combination of: + +LIBSSH2_SESSION_BLOCK_INBOUND: Inbound direction blocked. + +LIBSSH2_SESSION_BLOCK_OUTBOUND: Outbound direction blocked. + +Application should wait for data to be available for socket prior to calling a +libssh2 function again. If \fBLIBSSH2_SESSION_BLOCK_INBOUND\fP is set select +should contain the session socket in readfds set. Correspondingly in case of +\fBLIBSSH2_SESSION_BLOCK_OUTBOUND\fP writefds set should contain the socket. +.SH AVAILABILITY +Added in 1.0 diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_session_callback_set.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_session_callback_set.3 new file mode 100644 index 0000000000000000000000000000000000000000..70c94c13b4af609d518e2de807dc8d6559259290 --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_session_callback_set.3 @@ -0,0 +1,31 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_session_callback_set 3 "1 Jun 2007" "libssh2 0.15" "libssh2" +.SH NAME +libssh2_session_callback_set - set a callback function +.SH SYNOPSIS +.nf +#include + +void * +libssh2_session_callback_set(LIBSSH2_SESSION *session, + int cbtype, void *callback); +.fi +.SH DESCRIPTION +This function is \fBDEPRECATED\fP in 1.11.1. Use the +\fIlibssh2_session_callback_set2(3)\fP function instead! + +This implementation is expecting and returning a data pointer for callback +functions. + +For the details about the replacement function, see +.BR libssh2_session_callback_set2(3) +which is expecting and returning a function pointer. + +.SH RETURN VALUE +Pointer to previous callback handler. Returns NULL if no prior callback +handler was set or the callback type was unknown. +.SH SEE ALSO +.BR libssh2_session_callback_set2(3) +.BR libssh2_session_init_ex(3) +.BR libssh2_agent_sign(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_session_callback_set2.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_session_callback_set2.3 new file mode 100644 index 0000000000000000000000000000000000000000..ee55af9426ad1885c2337cab0b8de0b22baf2170 --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_session_callback_set2.3 @@ -0,0 +1,139 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_session_callback_set2 3 "13 Dec 2023" "libssh2 1.11.1" "libssh2" +.SH NAME +libssh2_session_callback_set2 - set a callback function +.SH SYNOPSIS +.nf +#include + +libssh2_cb_generic * +libssh2_session_callback_set2(LIBSSH2_SESSION *session, int cbtype, + libssh2_cb_generic *callback); +.fi +.SH DESCRIPTION +Sets a custom callback handler for a previously initialized session +object. Callbacks are triggered by the receipt of special packets at the +Transport layer. To disable a callback, set it to NULL. + +\fIsession\fP - Session instance as returned by +.BR libssh2_session_init_ex(3) + +\fIcbtype\fP - Callback type. One of the types listed in Callback Types. + +\fIcallback\fP - Pointer to custom callback function. The prototype for +this function must match the associated callback declaration macro. +.SH CALLBACK TYPES +.IP LIBSSH2_CALLBACK_IGNORE +Called when a SSH_MSG_IGNORE message is received +.IP LIBSSH2_CALLBACK_DEBUG +Called when a SSH_MSG_DEBUG message is received +.IP LIBSSH2_CALLBACK_DISCONNECT +Called when a SSH_MSG_DISCONNECT message is received +.IP LIBSSH2_CALLBACK_MACERROR +Called when a mismatched MAC has been detected in the transport layer. If the +function returns 0, the packet will be accepted nonetheless. +.IP LIBSSH2_CALLBACK_X11 +Called when an X11 connection has been accepted +.IP LIBSSH2_CALLBACK_SEND +Called when libssh2 wants to send data on the connection. Can be set to a +custom function to handle I/O your own way. + +The prototype of the callback: + +.nf +ssize_t sendcb(libssh2_socket_t sockfd, const void *buffer, + size_t length, int flags, void **abstract); +.fi + +\fBsockfd\fP is the socket to write to, \fBbuffer\fP points to the data to +send, \fBlength\fP is the size of the data, \fBflags\fP is the flags that +would have been used to a \fIsend()\fP call and \fBabstract\fP is a pointer +to the abstract pointer set in the \fIlibssh2_session_init_ex(3)\fP call. + +The callback returns the number of bytes sent, or \-1 for error. The special +return code \fB-EAGAIN\fP can be returned to signal that the send was aborted +to prevent getting blocked and it needs to be called again. +.IP LIBSSH2_CALLBACK_RECV +Called when libssh2 wants to read data from the connection. Can be set to a +custom function to handle I/O your own way. + +The prototype of the callback: + +.nf +ssize_t recvcb(libssh2_socket_t sockfd, void *buffer, + size_t length, int flags, void **abstract); +.fi + +\fBsockfd\fP is the socket to read from, \fBbuffer\fP where to store received +data into, \fBlength\fP is the size of the buffer, \fBflags\fP is the flags +that would have been used to a \fIrecv()\fP call and \fBabstract\fP is a pointer +to the abstract pointer set in the \fIlibssh2_session_init_ex(3)\fP call. + +The callback returns the number of bytes read, or \-1 for error. The special +return code \fB-EAGAIN\fP can be returned to signal that the read was aborted +to prevent getting blocked and it needs to be called again. +.IP LIBSSH2_CALLBACK_AUTHAGENT +Called during authentication process to allow the client to connect to the +ssh-agent and perform any setup, such as configuring the agent or adding keys. + +The prototype of the callback: + +.nf +void authagent(LIBSSH2_SESSION* session, LIBSSH2_CHANNEL *channel, + void **abstract); +.fi +.IP LIBSSH2_CALLBACK_AUTHAGENT_IDENTITIES +Not called by libssh2. The client is responsible for calling this method when +a SSH2_AGENTC_REQUEST_IDENTITIES message has been received. + +The prototype of the callback: + +.nf +void identities(LIBSSH2_SESSION* session, void *buffer, + const char *agent_path, + void **abstract) +.fi + +\fBbuffer\fP must be filled in by the callback. Different clients may implement +this differently. For example, one client may pass in an unsigned char ** for +this parameter, while another may pass in a pointer to a struct. + +Regardless of the type of buffer used, the client will need to send back a list +of identities in the following format. + +uint32 buffer length +uint32 number of entries +entries + +Where each entry in the entries list is of the format: + +string data +cstring comment + +\fBagent_path\fP The path to a running ssh-agent on the client machine, from +which identities can be listed. +.IP LIBSSH2_CALLBACK_AUTHAGENT_SIGN +Not called by libssh2. The client is responsible for calling this method when +a SSH2_AGENTC_SIGN_REQUEST message has been received. + +The prototype of the callback: + +.nf +void sign(LIBSSH2_SESSION* session, + unsigned char *blob, unsigned int blen, + const unsigned char *data, unsigned int dlen, + unsigned char **sig, unsigned int *sig_len, + const char *agent_path, + void **abstract); +.fi + +When interfacing with an ssh-agent installed on the client system, this method +can call libssh2_agent_sign(3) to perform signing. + +.SH RETURN VALUE +Pointer to previous callback handler. Returns NULL if no prior callback +handler was set or the callback type was unknown. +.SH SEE ALSO +.BR libssh2_session_init_ex(3) +.BR libssh2_agent_sign(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_session_disconnect.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_session_disconnect.3 new file mode 100644 index 0000000000000000000000000000000000000000..85e141998acbf01f360524364936c79ecf5d071a --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_session_disconnect.3 @@ -0,0 +1,21 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_session_disconnect 3 "20 Feb 2010" "libssh2 1.2.4" "libssh2" +.SH NAME +libssh2_session_disconnect - convenience macro for \fIlibssh2_session_disconnect_ex(3)\fP calls +.SH SYNOPSIS +.nf +#include + +int +libssh2_session_disconnect(LIBSSH2_SESSION *session, const char *description); +.fi +.SH DESCRIPTION +This is a macro defined in a public libssh2 header file that is using the +underlying function \fIlibssh2_session_disconnect_ex(3)\fP. +.SH RETURN VALUE +See \fIlibssh2_session_disconnect_ex(3)\fP +.SH ERRORS +See \fIlibssh2_session_disconnect_ex(3)\fP +.SH SEE ALSO +.BR libssh2_session_disconnect_ex(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_session_disconnect_ex.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_session_disconnect_ex.3 new file mode 100644 index 0000000000000000000000000000000000000000..b1674eb62a0ea41e6bf60b8502e9a99578191d53 --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_session_disconnect_ex.3 @@ -0,0 +1,43 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_session_disconnect_ex 3 "1 Jun 2007" "libssh2 0.15" "libssh2" +.SH NAME +libssh2_session_disconnect_ex - terminate transport layer +.SH SYNOPSIS +.nf +#include + +int +libssh2_session_disconnect_ex(LIBSSH2_SESSION *session, int reason, + const char *description, + const char *lang); + +int +libssh2_session_disconnect(LIBSSH2_SESSION *session, + const char *description); +.fi +.SH DESCRIPTION +\fIsession\fP - Session instance as returned by +.BR libssh2_session_init_ex(3) + +\fIreason\fP - One of the Disconnect Reason constants. + +\fIdescription\fP - Human readable reason for disconnection. + +\fIlang\fP - Localization string describing the language/encoding of the description provided. + +Send a disconnect message to the remote host associated with \fIsession\fP, +along with a \fIreason\fP symbol and a verbose \fIdescription\fP. + +As a convenience, the macro +.BR libssh2_session_disconnect(3) +is provided. It calls +.BR libssh2_session_disconnect_ex(3) +with \fIreason\fP set to SSH_DISCONNECT_BY_APPLICATION +and \fIlang\fP set to an empty string. +.SH RETURN VALUE +Return 0 on success or negative on failure. It returns +LIBSSH2_ERROR_EAGAIN when it would otherwise block. While +LIBSSH2_ERROR_EAGAIN is a negative number, it is not really a failure per se. +.SH SEE ALSO +.BR libssh2_session_init_ex(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_session_flag.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_session_flag.3 new file mode 100644 index 0000000000000000000000000000000000000000..b8e8fec8a5a17d3b26f6ead0f37898a9314366ee --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_session_flag.3 @@ -0,0 +1,29 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_session_flag 3 "1 Jun 2007" "libssh2 0.15" "libssh2" +.SH NAME +libssh2_session_flag - TODO +.SH SYNOPSIS +.nf +#include + +int +libssh2_session_flag(LIBSSH2_SESSION *session, int flag, int value); +.fi +.SH DESCRIPTION +Set options for the created session. \fIflag\fP is the option to set, while +\fIvalue\fP is typically set to 1 or 0 to enable or disable the option. +.SH FLAGS +.IP LIBSSH2_FLAG_SIGPIPE +If set, libssh2 will not attempt to block SIGPIPEs but will let them trigger +from the underlying socket layer. +.IP LIBSSH2_FLAG_COMPRESS +If set - before the connection negotiation is performed - libssh2 will try to +negotiate compression enabling for this connection. By default libssh2 will +not attempt to use compression. +.SH RETURN VALUE +Returns regular libssh2 error code. +.SH AVAILABILITY +This function has existed since the age of dawn. LIBSSH2_FLAG_COMPRESS was +added in version 1.2.8. +.SH SEE ALSO diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_session_free.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_session_free.3 new file mode 100644 index 0000000000000000000000000000000000000000..618653ac2cdf4d805a44c30bbefc28a922c8beab --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_session_free.3 @@ -0,0 +1,22 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_session_free 3 "1 Jun 2007" "libssh2 0.15" "libssh2" +.SH NAME +libssh2_session_free - frees resources associated with a session instance +.SH SYNOPSIS +.nf +#include + +int +libssh2_session_free(LIBSSH2_SESSION *session); +.fi +.SH DESCRIPTION +Frees all resources associated with a session instance. Typically called after +.BR libssh2_session_disconnect_ex(3) +.SH RETURN VALUE +Return 0 on success or negative on failure. It returns +LIBSSH2_ERROR_EAGAIN when it would otherwise block. While +LIBSSH2_ERROR_EAGAIN is a negative number, it is not really a failure per se. +.SH SEE ALSO +.BR libssh2_session_init_ex(3) +.BR libssh2_session_disconnect_ex(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_session_get_blocking.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_session_get_blocking.3 new file mode 100644 index 0000000000000000000000000000000000000000..2d3b793ec3881b8353e3cde492c56bfaf3a82f31 --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_session_get_blocking.3 @@ -0,0 +1,19 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_session_get_blocking 3 "1 Jun 2007" "libssh2 0.15" "libssh2" +.SH NAME +libssh2_session_get_blocking - evaluate blocking mode on session +.SH SYNOPSIS +.nf +#include + +int +libssh2_session_get_blocking(LIBSSH2_SESSION *session); +.fi +.SH DESCRIPTION +Returns 0 if the state of the session has previously be set to non-blocking +and it returns 1 if the state was set to blocking. +.SH RETURN VALUE +See description. +.SH SEE ALSO +.BR libssh2_session_set_blocking(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_session_get_read_timeout.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_session_get_read_timeout.3 new file mode 100644 index 0000000000000000000000000000000000000000..81b0cb1fcf45a2b2dbe452c784e9e7b99fe39156 --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_session_get_read_timeout.3 @@ -0,0 +1,24 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_session_get_read_timeout 3 "13 Jan 2023" "libssh2" "libssh2" +.SH NAME +libssh2_session_get_read_timeout - get the timeout for packet read functions +.SH SYNOPSIS +.nf +#include + +long +libssh2_session_get_read_timeout(LIBSSH2_SESSION *session); +.fi +.SH DESCRIPTION +Returns the \fBtimeout\fP (in seconds) for how long the ssh2 packet receive +function calls may wait until they consider the situation an error and +return LIBSSH2_ERROR_TIMEOUT. + +By default the timeout is 60 seconds. +.SH RETURN VALUE +The value of the timeout setting. +.SH AVAILABILITY +Added in 1.10.1 +.SH SEE ALSO +.BR libssh2_session_set_read_timeout(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_session_get_timeout.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_session_get_timeout.3 new file mode 100644 index 0000000000000000000000000000000000000000..4a57cedf482c77d688f19cbf1b2ca0a0e4de2c63 --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_session_get_timeout.3 @@ -0,0 +1,24 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_session_get_timeout 3 "4 May 2011" "libssh2" "libssh2" +.SH NAME +libssh2_session_get_timeout - get the timeout for blocking functions +.SH SYNOPSIS +.nf +#include + +long +libssh2_session_get_timeout(LIBSSH2_SESSION *session); +.fi +.SH DESCRIPTION +Returns the \fBtimeout\fP (in milliseconds) for how long a blocking the +libssh2 function calls may wait until they consider the situation an error and +return LIBSSH2_ERROR_TIMEOUT. + +By default libssh2 has no timeout (zero) for blocking functions. +.SH RETURN VALUE +The value of the timeout setting. +.SH AVAILABILITY +Added in 1.2.9 +.SH SEE ALSO +.BR libssh2_session_set_timeout(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_session_handshake.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_session_handshake.3 new file mode 100644 index 0000000000000000000000000000000000000000..4d5cc51172e10af13432d21b26e950d88de9151b --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_session_handshake.3 @@ -0,0 +1,44 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_session_handshake 3 "7 Oct 2010" "libssh2" "libssh2" +.SH NAME +libssh2_session_handshake - perform the SSH handshake +.SH SYNOPSIS +.nf +#include + +int +libssh2_session_handshake(LIBSSH2_SESSION *session, libssh2_socket_t socket); +.fi +.SH DESCRIPTION +\fIsession\fP - Session instance as returned by +.BR libssh2_session_init_ex(3) + +\fIsocket\fP - Connected socket descriptor. Typically a TCP connection +though the protocol allows for any reliable transport and the library will +attempt to use any berkeley socket. + +Begin transport layer protocol negotiation with the connected host. +.SH RETURN VALUE +Returns 0 on success, negative on failure. +.SH ERRORS +\fILIBSSH2_ERROR_SOCKET_NONE\fP - The socket is invalid. + +\fILIBSSH2_ERROR_BANNER_SEND\fP - Unable to send banner to remote host. + +\fILIBSSH2_ERROR_KEX_FAILURE\fP - Encryption key exchange with the remote +host failed. + +\fILIBSSH2_ERROR_SOCKET_SEND\fP - Unable to send data on socket. + +\fILIBSSH2_ERROR_SOCKET_DISCONNECT\fP - The socket was disconnected. + +\fILIBSSH2_ERROR_PROTO\fP - An invalid SSH protocol response was received on +the socket. + +\fILIBSSH2_ERROR_EAGAIN\fP - Marked for non-blocking I/O but the call would block. +.SH AVAILABILITY +Added in 1.2.8 +.SH SEE ALSO +.BR libssh2_session_free(3) +.BR libssh2_session_init_ex(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_session_hostkey.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_session_hostkey.3 new file mode 100644 index 0000000000000000000000000000000000000000..4190843d810b13e69ac0e949363b90c4cdc940b8 --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_session_hostkey.3 @@ -0,0 +1,26 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_session_hostkey 3 "1 Jun 2007" "libssh2 0.15" "libssh2" +.SH NAME +libssh2_session_hostkey - get the remote key +.SH SYNOPSIS +.nf +#include + +const char * +libssh2_session_hostkey(LIBSSH2_SESSION *session, + size_t *len, int *type); +.fi +.SH DESCRIPTION +Returns a pointer to the current host key, the value \fIlen\fP points to will +get the length of the key. + +The value \fItype\fP points to the type of hostkey which is one of: +LIBSSH2_HOSTKEY_TYPE_RSA, LIBSSH2_HOSTKEY_TYPE_DSS (deprecated), or +LIBSSH2_HOSTKEY_TYPE_UNKNOWN. + +.SH RETURN VALUE +A pointer, or NULL if something went wrong. +.SH SEE ALSO +.BR libssh2_knownhost_check(3) +.BR libssh2_knownhost_add(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_session_init.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_session_init.3 new file mode 100644 index 0000000000000000000000000000000000000000..88f1fa8cc18eaf38f846f6a717de42eeb7bd0c21 --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_session_init.3 @@ -0,0 +1,21 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_session_init 3 "20 Feb 2010" "libssh2 1.2.4" "libssh2" +.SH NAME +libssh2_session_init - convenience macro for \fIlibssh2_session_init_ex(3)\fP calls +.SH SYNOPSIS +.nf +#include + +LIBSSH2_SESSION * +libssh2_session_init(void); +.fi +.SH DESCRIPTION +This is a macro defined in a public libssh2 header file that is using the +underlying function \fIlibssh2_session_init_ex(3)\fP. +.SH RETURN VALUE +See \fIlibssh2_session_init_ex(3)\fP +.SH ERRORS +See \fIlibssh2_session_init_ex(3)\fP +.SH SEE ALSO +.BR libssh2_session_init_ex(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_session_init_ex.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_session_init_ex.3 new file mode 100644 index 0000000000000000000000000000000000000000..3a79e7864e5e6c81760cbb4d90202bf683783190 --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_session_init_ex.3 @@ -0,0 +1,48 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_session_init_ex 3 "1 Jun 2007" "libssh2 0.15" "libssh2" +.SH NAME +libssh2_session_init_ex - initializes an SSH session object +.SH SYNOPSIS +.nf +#include + +LIBSSH2_SESSION * +libssh2_session_init_ex(LIBSSH2_ALLOC_FUNC((*myalloc)), + LIBSSH2_FREE_FUNC((*myfree)), + LIBSSH2_REALLOC_FUNC((*myrealloc)), + void *abstract); + +LIBSSH2_SESSION * +libssh2_session_init(void); +.fi +.SH DESCRIPTION +\fImyalloc\fP - Custom allocator function. Refer to the section on Callbacks +for implementing an allocator callback. Pass a value of NULL to use the +default system allocator. + +\fImyfree\fP - Custom de-allocator function. Refer to the section on Callbacks +for implementing a deallocator callback. Pass a value of NULL to use the +default system deallocator. + +\fImyrealloc\fP - Custom re-allocator function. Refer to the section on +Callbacks for implementing a reallocator callback. Pass a value of NULL to +use the default system reallocator. + +\fIabstract\fP - Arbitrary pointer to application specific callback data. +This value will be passed to any callback function associated with the named +session instance. + +Initializes an SSH session object. By default system memory allocators +(malloc(), free(), realloc()) will be used for any dynamically allocated memory +blocks. Alternate memory allocation functions may be specified using the +extended version of this API call, and/or optional application specific data +may be attached to the session object. + +This method must be called first, prior to configuring session options or +starting up an SSH session with a remote server. +.SH RETURN VALUE +Pointer to a newly allocated LIBSSH2_SESSION instance, or NULL on errors. +.SH SEE ALSO +.BR libssh2_session_free(3) +.BR libssh2_session_handshake(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_session_last_errno.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_session_last_errno.3 new file mode 100644 index 0000000000000000000000000000000000000000..029f49c28a641aea47e035403dec5069c995af9c --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_session_last_errno.3 @@ -0,0 +1,22 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_session_last_errno 3 "1 Jun 2007" "libssh2 0.15" "libssh2" +.SH NAME +libssh2_session_last_errno - get the most recent error number +.SH SYNOPSIS +.nf +#include + +int +libssh2_session_last_errno(LIBSSH2_SESSION *session); +.fi +.SH DESCRIPTION +\fIsession\fP - Session instance as returned by +.BR libssh2_session_init_ex(3) + +Determine the most recent error condition. +.SH RETURN VALUE +Numeric error code corresponding to the the Error Code constants. +.SH SEE ALSO +.BR libssh2_session_last_error(3) +.BR libssh2_session_set_last_error(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_session_last_error.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_session_last_error.3 new file mode 100644 index 0000000000000000000000000000000000000000..f11d65ff9b67f7a3245cd11438bc1fc17f3e1500 --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_session_last_error.3 @@ -0,0 +1,34 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_session_last_error 3 "1 Jun 2007" "libssh2 0.15" "libssh2" +.SH NAME +libssh2_session_last_error - get the most recent error +.SH SYNOPSIS +.nf +#include + +int +libssh2_session_last_error(LIBSSH2_SESSION *session, + char **errmsg, int *errmsg_len, int want_buf); +.fi +.SH DESCRIPTION +\fIsession\fP - Session instance as returned by +.BR libssh2_session_init_ex(3) + +\fIerrmsg\fP - If not NULL, is populated by reference with the human +readable form of the most recent error message. + +\fIerrmsg_len\fP - If not NULL, is populated by reference with the length +of errmsg. (The string is NUL-terminated, so the length is only useful as +an optimization, to avoid calling strlen.) + +\fIwant_buf\fP - If set to a non-zero value, "ownership" of the errmsg +buffer will be given to the calling scope. If necessary, the errmsg buffer +will be duplicated. + +Determine the most recent error condition and its cause. +.SH RETURN VALUE +Numeric error code corresponding to the the Error Code constants. +.SH SEE ALSO +.BR libssh2_session_last_errno(3) +.BR libssh2_session_set_last_error(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_session_method_pref.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_session_method_pref.3 new file mode 100644 index 0000000000000000000000000000000000000000..310d50263872a6fdac6a83aa60178616985368c4 --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_session_method_pref.3 @@ -0,0 +1,41 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_session_method_pref 3 "1 Jun 2007" "libssh2 0.15" "libssh2" +.SH NAME +libssh2_session_method_pref - set preferred key exchange method +.SH SYNOPSIS +.nf +#include + +int +libssh2_session_method_pref(LIBSSH2_SESSION *session, + int method_type, const char *prefs); +.fi +.SH DESCRIPTION +\fIsession\fP - Session instance as returned by +.BR libssh2_session_init_ex(3) + +\fImethod_type\fP - One of the Method Type constants. + +\fIprefs\fP - Coma delimited list of preferred methods to use with +the most preferred listed first and the least preferred listed last. +If a method is listed which is not supported by libssh2 it will be +ignored and not sent to the remote host during protocol negotiation. + +Set preferred methods to be negotiated. These +preferences must be set prior to calling +.BR libssh2_session_handshake(3) +as they are used during the protocol initiation phase. +.SH RETURN VALUE +Return 0 on success or negative on failure. It returns +LIBSSH2_ERROR_EAGAIN when it would otherwise block. While +LIBSSH2_ERROR_EAGAIN is a negative number, it is not really a failure per se. +.SH ERRORS +\fILIBSSH2_ERROR_INVAL\fP - The requested method type was invalid. + +\fILIBSSH2_ERROR_ALLOC\fP - An internal memory allocation call failed. + +\fILIBSSH2_ERROR_METHOD_NOT_SUPPORTED\fP - The requested method is not supported. +.SH SEE ALSO +.BR libssh2_session_init_ex(3) +.BR libssh2_session_handshake(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_session_methods.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_session_methods.3 new file mode 100644 index 0000000000000000000000000000000000000000..5748626df3e6b20912d90e654754002d0cb699bd --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_session_methods.3 @@ -0,0 +1,31 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_session_methods 3 "8 Nov 2021" "libssh2 1.11" "libssh2" +.SH NAME +libssh2_session_methods - return the currently active algorithms +.SH SYNOPSIS +.nf +#include + +const char * +libssh2_session_methods(LIBSSH2_SESSION *session, int method_type); +.fi +.SH DESCRIPTION +\fIsession\fP - Session instance as returned by +.BR libssh2_session_init_ex(3) + +\fImethod_type\fP - one of the method type constants: LIBSSH2_METHOD_KEX, +LIBSSH2_METHOD_HOSTKEY, LIBSSH2_METHOD_CRYPT_CS, LIBSSH2_METHOD_CRYPT_SC, +LIBSSH2_METHOD_MAC_CS, LIBSSH2_METHOD_MAC_SC, LIBSSH2_METHOD_COMP_CS, +LIBSSH2_METHOD_COMP_SC, LIBSSH2_METHOD_LANG_CS, LIBSSH2_METHOD_LANG_SC, +LIBSSH2_METHOD_SIGN_ALGO. + +Returns the actual method negotiated for a particular transport parameter. +.SH RETURN VALUE +Negotiated method or NULL if the session has not yet been started. +.SH ERRORS +\fILIBSSH2_ERROR_INVAL\fP - The requested method type was invalid. + +\fILIBSSH2_ERROR_METHOD_NONE\fP - no method has been set +.SH SEE ALSO +.BR libssh2_session_init_ex(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_session_set_blocking.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_session_set_blocking.3 new file mode 100644 index 0000000000000000000000000000000000000000..db596481adebd32f8d2c215be9be2753039887d7 --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_session_set_blocking.3 @@ -0,0 +1,31 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_session_set_blocking 3 "1 Jun 2007" "libssh2 0.15" "libssh2" +.SH NAME +libssh2_session_set_blocking - set or clear blocking mode on session +.SH SYNOPSIS +.nf +#include + +void +libssh2_session_set_blocking(LIBSSH2_SESSION *session, int blocking); +.fi +.SH DESCRIPTION +\fIsession\fP - session instance as returned by +.BR libssh2_session_init_ex(3) + +\fIblocking\fP - Set to a non-zero value to make the channel block, or zero to +make it non-blocking. + +Set or clear blocking mode on the selected on the session. This will +instantly affect any channels associated with this session. If a read is +performed on a session with no data currently available, a blocking session +will wait for data to arrive and return what it receives. A non-blocking +session will return immediately with an empty buffer. If a write is performed +on a session with no room for more data, a blocking session will wait for +room. A non-blocking session will return immediately without writing +anything. +.SH RETURN VALUE +None +.SH SEE ALSO +.BR libssh2_session_init_ex(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_session_set_last_error.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_session_set_last_error.3 new file mode 100644 index 0000000000000000000000000000000000000000..7a5bdaa9675dc36f13caa1352e89ab9f0b5d382a --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_session_set_last_error.3 @@ -0,0 +1,34 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_session_set_last_error 3 "26 Oct 2015" "libssh2" "libssh2" +.SH NAME +libssh2_session_set_last_error - sets the internal error state +.SH SYNOPSIS +.nf +#include + +int +libssh2_session_set_last_error(LIBSSH2_SESSION *session, + int errcode, const char *errmsg) +.fi +.SH DESCRIPTION +\fIsession\fP - Session instance as returned by +.BR libssh2_session_init_ex(3) + +\fIerrcode\fP - One of the error codes as defined in the public +libssh2 header file. + +\fIerrmsg\fP - If not NULL, a copy of the given string is stored +inside the session object as the error message. + +This function is provided for high level language wrappers +(i.e. Python or Perl) and other libraries that may extend libssh2 with +additional features while still relying on its error reporting +mechanism. +.SH RETURN VALUE +Numeric error code corresponding to the the Error Code constants. +.SH AVAILABILITY +Added in 1.6.1 +.SH SEE ALSO +.BR libssh2_session_last_error(3) +.BR libssh2_session_last_errno(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_session_set_read_timeout.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_session_set_read_timeout.3 new file mode 100644 index 0000000000000000000000000000000000000000..487c28900bc9feeda692c515a35006630d3ea155 --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_session_set_read_timeout.3 @@ -0,0 +1,25 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_session_set_read_timeout 3 "13 Jan 2023" "libssh2" "libssh2" +.SH NAME +libssh2_session_set_read_timeout - set timeout for packet read functions +.SH SYNOPSIS +.nf +#include + +void +libssh2_session_set_read_timeout(LIBSSH2_SESSION *session, long timeout); +.fi +.SH DESCRIPTION +Set the \fBtimeout\fP in seconds for how long libssh2 packet read +function calls may wait until they consider the situation an error and return +LIBSSH2_ERROR_TIMEOUT. + +By default or if you set the timeout to zero, the timeout will be set to +60 seconds. +.SH RETURN VALUE +Nothing +.SH AVAILABILITY +Added in 1.10.1 +.SH SEE ALSO +.BR libssh2_session_get_read_timeout(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_session_set_timeout.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_session_set_timeout.3 new file mode 100644 index 0000000000000000000000000000000000000000..2732685162fb24fd9275cce639217ddbc7bbf8eb --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_session_set_timeout.3 @@ -0,0 +1,25 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_session_set_timeout 3 "4 May 2011" "libssh2" "libssh2" +.SH NAME +libssh2_session_set_timeout - set timeout for blocking functions +.SH SYNOPSIS +.nf +#include + +void +libssh2_session_set_timeout(LIBSSH2_SESSION *session, long timeout); +.fi +.SH DESCRIPTION +Set the \fBtimeout\fP in milliseconds for how long a blocking the libssh2 +function calls may wait until they consider the situation an error and return +LIBSSH2_ERROR_TIMEOUT. + +By default or if you set the timeout to zero, libssh2 has no timeout for +blocking functions. +.SH RETURN VALUE +Nothing +.SH AVAILABILITY +Added in 1.2.9 +.SH SEE ALSO +.BR libssh2_session_get_timeout(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_session_startup.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_session_startup.3 new file mode 100644 index 0000000000000000000000000000000000000000..53e95266733ed1308d323fc72888ded1c72b93df --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_session_startup.3 @@ -0,0 +1,45 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_session_startup 3 "1 Jun 2007" "libssh2 0.15" "libssh2" +.SH NAME +libssh2_session_startup - begin transport layer +.SH SYNOPSIS +.nf +#include + +int +libssh2_session_startup(LIBSSH2_SESSION *session, int socket); +.fi +.SH DESCRIPTION +Starting in libssh2 version 1.2.8 this function is considered deprecated. Use +\fIlibssh2_session_handshake(3)\fP instead. + +\fIsession\fP - Session instance as returned by +.BR libssh2_session_init_ex(3) + +\fIsocket\fP - Connected socket descriptor. Typically a TCP connection +though the protocol allows for any reliable transport and the library will +attempt to use any berkeley socket. + +Begin transport layer protocol negotiation with the connected host. +.SH RETURN VALUE +Returns 0 on success, negative on failure. +.SH ERRORS +\fILIBSSH2_ERROR_SOCKET_NONE\fP - The socket is invalid. + +\fILIBSSH2_ERROR_BANNER_SEND\fP - Unable to send banner to remote host. + +\fILIBSSH2_ERROR_KEX_FAILURE\fP - Encryption key exchange with the remote +host failed. + +\fILIBSSH2_ERROR_SOCKET_SEND\fP - Unable to send data on socket. + +\fILIBSSH2_ERROR_SOCKET_DISCONNECT\fP - The socket was disconnected. + +\fILIBSSH2_ERROR_PROTO\fP - An invalid SSH protocol response was received on +the socket. + +\fILIBSSH2_ERROR_EAGAIN\fP - Marked for non-blocking I/O but the call would block. +.SH SEE ALSO +.BR libssh2_session_free(3) +.BR libssh2_session_init_ex(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_session_supported_algs.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_session_supported_algs.3 new file mode 100644 index 0000000000000000000000000000000000000000..c17d53d50cb38acbeaeb9feef357076de3a24ea5 --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_session_supported_algs.3 @@ -0,0 +1,79 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_session_supported_algs 3 "23 Oct 2011" "libssh2" "libssh2" +.SH NAME +libssh2_session_supported_algs - get list of supported algorithms +.SH SYNOPSIS +.nf +#include + +int +libssh2_session_supported_algs(LIBSSH2_SESSION* session, + int method_type, + const char*** algs); +.fi +.SH DESCRIPTION +\fIsession\fP - An instance of initialized LIBSSH2_SESSION (the function will +use its pointer to the memory allocation function). \fImethod_type\fP - +Method type. See \fIlibssh2_session_method_pref(3)\fP. \fIalgs\fP - Address +of a pointer that will point to an array of returned algorithms + +Get a list of supported algorithms for the given \fImethod_type\fP. The +method_type parameter is equivalent to method_type in +\fIlibssh2_session_method_pref(3)\fP. If successful, the function will +allocate the appropriate amount of memory. When not needed anymore, it must be +deallocated by calling \fIlibssh2_free(3)\fP. When this function is +unsuccessful, this must not be done. + +In order to get a list of all supported compression algorithms, +libssh2_session_flag(session, LIBSSH2_FLAG_COMPRESS, 1) must be called before +calling this function, otherwise only "none" will be returned. + +If successful, the function will allocate and fill the array with supported +algorithms (the same names as defined in RFC 4253). The array is not NULL +terminated. +.SH EXAMPLE +.nf +#include "libssh2.h" + +const char **algorithms; +int rc, i; +LIBSSH2_SESSION *session; + +/* initialize session */ +session = libssh2_session_init(); +rc = libssh2_session_supported_algs(session, + LIBSSH2_METHOD_CRYPT_CS, + &algorithms); +if(rc > 0) { + /* the call succeeded, do sth. with the list of algorithms + (e.g. list them)... */ + printf("Supported symmetric algorithms:\\n"); + for(i = 0; i < rc; i++) + printf("\\t%s\\n", algorithms[i]); + + /* ... and free the allocated memory when not needed anymore */ + libssh2_free(session, algorithms); +} +else { + /* call failed, error handling */ +} +.fi +.SH RETURN VALUE +On success, a number of returned algorithms (i.e a positive number will be +returned). In case of a failure, an error code (a negative number, see below) +is returned. 0 should never be returned. +.SH ERRORS +\fILIBSSH2_ERROR_BAD_USE\fP - Invalid address of algs. + +\fILIBSSH2_ERROR_METHOD_NOT_SUPPORTED\fP - Unknown method type. + +\fILIBSSH2_ERROR_INVAL\fP - Internal error (normally should not occur). + +\fILIBSSH2_ERROR_ALLOC\fP - Allocation of memory failed. +.SH AVAILABILITY +Added in 1.4.0 +.SH SEE ALSO +.BR libssh2_session_methods(3), +.BR libssh2_session_method_pref(3) +.BR libssh2_free(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_sftp_close.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_sftp_close.3 new file mode 100644 index 0000000000000000000000000000000000000000..bf9c4c7f1c1340ee054e0dbf4e1c20605dad49f0 --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_sftp_close.3 @@ -0,0 +1,22 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_sftp_close 3 "20 Feb 2010" "libssh2 1.2.4" "libssh2" +.SH NAME +libssh2_sftp_close - convenience macro for \fIlibssh2_sftp_close_handle(3)\fP calls +.SH SYNOPSIS +.nf +#include +#include + +int +libssh2_sftp_close(LIBSSH2_SFTP_HANDLE *handle); +.fi +.SH DESCRIPTION +This is a macro defined in a public libssh2 header file that is using the +underlying function \fIlibssh2_sftp_close_handle(3)\fP. +.SH RETURN VALUE +See \fIlibssh2_sftp_close_handle(3)\fP +.SH ERRORS +See \fIlibssh2_sftp_close_handle(3)\fP +.SH SEE ALSO +.BR libssh2_sftp_close_handle(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_sftp_close_handle.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_sftp_close_handle.3 new file mode 100644 index 0000000000000000000000000000000000000000..30794d4dde6de01d758f2aa36f215dde7c21064e --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_sftp_close_handle.3 @@ -0,0 +1,43 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_sftp_close_handle 3 "1 Jun 2007" "libssh2 0.15" "libssh2" +.SH NAME +libssh2_sftp_close_handle - close filehandle +.SH SYNOPSIS +.nf +#include +#include + +int +libssh2_sftp_close_handle(LIBSSH2_SFTP_HANDLE *handle); + +int +libssh2_sftp_close(LIBSSH2_SFTP_HANDLE *handle); + +int +libssh2_sftp_closedir(LIBSSH2_SFTP_HANDLE *handle); +.fi +.SH DESCRIPTION +\fIhandle\fP - SFTP File Handle as returned by \fBlibssh2_sftp_open_ex(3)\fP +or \fBlibssh2_sftp_opendir(3)\fP (which is a macro). + +Close an active LIBSSH2_SFTP_HANDLE. Because files and directories share the +same underlying storage mechanism these methods may be used +interchangeably. \fBlibssh2_sftp_close(3)\fP and \fBlibssh2_sftp_closedir(3)\fP +are macros for \fBlibssh2_sftp_close_handle(3)\fP. +.SH RETURN VALUE +Return 0 on success or negative on failure. It returns +LIBSSH2_ERROR_EAGAIN when it would otherwise block. While +LIBSSH2_ERROR_EAGAIN is a negative number, it is not really a failure per se. +.SH ERRORS +\fILIBSSH2_ERROR_ALLOC\fP - An internal memory allocation call failed. + +\fILIBSSH2_ERROR_SOCKET_SEND\fP - Unable to send data on socket. + +\fILIBSSH2_ERROR_SOCKET_TIMEOUT\fP - + +\fILIBSSH2_ERROR_SFTP_PROTOCOL\fP - An invalid SFTP protocol response was +received on the socket, or an SFTP operation caused an errorcode to +be returned by the server. +.SH SEE ALSO +.BR libssh2_sftp_open_ex(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_sftp_closedir.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_sftp_closedir.3 new file mode 100644 index 0000000000000000000000000000000000000000..c1913d2dd6d37d5365295a7b464d0e0005db3225 --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_sftp_closedir.3 @@ -0,0 +1,22 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_sftp_closedir 3 "20 Feb 2010" "libssh2 1.2.4" "libssh2" +.SH NAME +libssh2_sftp_closedir - convenience macro for \fIlibssh2_sftp_close_handle(3)\fP calls +.SH SYNOPSIS +.nf +#include +#include + +int +libssh2_sftp_closedir(LIBSSH2_SFTP_HANDLE *handle) +.fi +.SH DESCRIPTION +This is a macro defined in a public libssh2 header file that is using the +underlying function \fIlibssh2_sftp_close_handle(3)\fP. +.SH RETURN VALUE +See \fIlibssh2_sftp_close_handle(3)\fP +.SH ERRORS +See \fIlibssh2_sftp_close_handle(3)\fP +.SH SEE ALSO +.BR libssh2_sftp_close_handle(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_sftp_fsetstat.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_sftp_fsetstat.3 new file mode 100644 index 0000000000000000000000000000000000000000..c3d8dabc9e2e12ee0952711b913e320699530a98 --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_sftp_fsetstat.3 @@ -0,0 +1,23 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_sftp_fsetstat 3 "20 Feb 2010" "libssh2 1.2.4" "libssh2" +.SH NAME +libssh2_sftp_fsetstat - convenience macro for \fIlibssh2_sftp_fstat_ex(3)\fP calls +.SH SYNOPSIS +.nf +#include +#include + +int +libssh2_sftp_fsetstat(LIBSSH2_SFTP_HANDLE *handle, + LIBSSH2_SFTP_ATTRIBUTES *attrs); +.fi +.SH DESCRIPTION +This is a macro defined in a public libssh2 header file that is using the +underlying function \fIlibssh2_sftp_fstat_ex(3)\fP. +.SH RETURN VALUE +See \fIlibssh2_sftp_fstat_ex(3)\fP +.SH ERRORS +See \fIlibssh2_sftp_fstat_ex(3)\fP +.SH SEE ALSO +.BR libssh2_sftp_fstat_ex(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_sftp_fstat.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_sftp_fstat.3 new file mode 100644 index 0000000000000000000000000000000000000000..b2dfacd9915201a878c2b9343364e8241521a631 --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_sftp_fstat.3 @@ -0,0 +1,23 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_sftp_fstat 3 "20 Feb 2010" "libssh2 1.2.4" "libssh2" +.SH NAME +libssh2_sftp_fstat - convenience macro for \fIlibssh2_sftp_fstat_ex(3)\fP calls +.SH SYNOPSIS +.nf +#include +#include + +int +libssh2_sftp_fstat(LIBSSH2_SFTP_HANDLE *handle, + LIBSSH2_SFTP_ATTRIBUTES *attrs); +.fi +.SH DESCRIPTION +This is a macro defined in a public libssh2 header file that is using the +underlying function \fIlibssh2_sftp_fstat_ex(3)\fP. +.SH RETURN VALUE +See \fIlibssh2_sftp_fstat_ex(3)\fP +.SH ERRORS +See \fIlibssh2_sftp_fstat_ex(3)\fP +.SH SEE ALSO +.BR libssh2_sftp_fstat_ex(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_sftp_fstat_ex.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_sftp_fstat_ex.3 new file mode 100644 index 0000000000000000000000000000000000000000..65051e58f21f8fccc1c68c765222d0d05692b20a --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_sftp_fstat_ex.3 @@ -0,0 +1,106 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_sftp_fstat_ex 3 "1 Jun 2007" "libssh2 0.15" "libssh2" +.SH NAME +libssh2_sftp_fstat_ex - get or set attributes on an SFTP file handle +.SH SYNOPSIS +.nf +#include +#include + +int +libssh2_sftp_fstat_ex(LIBSSH2_SFTP_HANDLE *handle, + LIBSSH2_SFTP_ATTRIBUTES *attrs, int setstat) + +#define libssh2_sftp_fstat(handle, attrs) \\ + libssh2_sftp_fstat_ex((handle), (attrs), 0) +#define libssh2_sftp_fsetstat(handle, attrs) \\ + libssh2_sftp_fstat_ex((handle), (attrs), 1) +.fi +.SH DESCRIPTION +\fIhandle\fP - SFTP File Handle as returned by +.BR libssh2_sftp_open_ex(3) + +\fIattrs\fP - Pointer to an LIBSSH2_SFTP_ATTRIBUTES structure to set file +metadata from or into depending on the value of setstat. + +\fIsetstat\fP - When non-zero, the file's metadata will be updated +with the data found in attrs according to the values of attrs->flags +and other relevant member attributes. + +Get or Set statbuf type data for a given LIBSSH2_SFTP_HANDLE instance. +.SH DATA TYPES +LIBSSH2_SFTP_ATTRIBUTES is a typedefed struct that is defined as below + +.nf +struct _LIBSSH2_SFTP_ATTRIBUTES { + + /* If flags & ATTR_* bit is set, then the value in this + * struct will be meaningful Otherwise it should be ignored + */ + unsigned long flags; + + /* size of file, in bytes */ + libssh2_uint64_t filesize; + + /* numerical representation of the user and group owner of + * the file + */ + unsigned long uid, gid; + + /* bitmask of permissions */ + unsigned long permissions; + + /* access time and modified time of file */ + unsigned long atime, mtime; +}; +.fi + +You will find a full set of defines and macros to identify flags and +permissions on the \fBlibssh2_sftp.h\fP header file, but some of the +most common ones are: + +To check for specific user permissions, the set of defines are in the +pattern LIBSSH2_SFTP_S_I where is R, W or X for +read, write and executable and is USR, GRP and OTH for user, +group and other. So, you check for a user readable file, use the bit +\fILIBSSH2_SFTP_S_IRUSR\fP while you want to see if it is executable +for other, you use \fILIBSSH2_SFTP_S_IXOTH\fP and so on. + +To check for specific file types, you would previously (before libssh2 +1.2.5) use the standard posix S_IS***() macros, but since 1.2.5 +libssh2 offers its own set of macros for this functionality: +.IP LIBSSH2_SFTP_S_ISLNK +Test for a symbolic link +.IP LIBSSH2_SFTP_S_ISREG +Test for a regular file +.IP LIBSSH2_SFTP_S_ISDIR +Test for a directory +.IP LIBSSH2_SFTP_S_ISCHR +Test for a character special file +.IP LIBSSH2_SFTP_S_ISBLK +Test for a block special file +.IP LIBSSH2_SFTP_S_ISFIFO +Test for a pipe or FIFO special file +.IP LIBSSH2_SFTP_S_ISSOCK +Test for a socket +.SH RETURN VALUE +Return 0 on success or negative on failure. It returns +LIBSSH2_ERROR_EAGAIN when it would otherwise block. While +LIBSSH2_ERROR_EAGAIN is a negative number, it is not really a failure per se. +.SH ERRORS +\fILIBSSH2_ERROR_ALLOC\fP - An internal memory allocation call failed. + +\fILIBSSH2_ERROR_SOCKET_SEND\fP - Unable to send data on socket. + +\fILIBSSH2_ERROR_SOCKET_TIMEOUT\fP - + +\fILIBSSH2_ERROR_SFTP_PROTOCOL\fP - An invalid SFTP protocol response was +received on the socket, or an SFTP operation caused an errorcode to +be returned by the server. +.SH AVAILABILITY +This function has been around since forever, but most of the +LIBSSH2_SFTP_S_* defines were introduced in libssh2 0.14 and the +LIBSSH2_SFTP_S_IS***() macros were introduced in libssh2 1.2.5. +.SH SEE ALSO +.BR libssh2_sftp_open_ex(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_sftp_fstatvfs.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_sftp_fstatvfs.3 new file mode 100644 index 0000000000000000000000000000000000000000..1546b9749145d4e7db21b32885b63d2c16793733 --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_sftp_fstatvfs.3 @@ -0,0 +1,3 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.so man3/libssh2_sftp_statvfs.3 diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_sftp_fsync.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_sftp_fsync.3 new file mode 100644 index 0000000000000000000000000000000000000000..e9cf3f3f834bb7236c1d397f43d1bb2565602cf6 --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_sftp_fsync.3 @@ -0,0 +1,39 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_sftp_fsync 3 "8 Apr 2013" "libssh2" "libssh2" +.SH NAME +libssh2_sftp_fsync - synchronize file to disk +.SH SYNOPSIS +.nf +#include +#include + +int +libssh2_sftp_fsync(LIBSSH2_SFTP_HANDLE *handle) +.fi +.SH DESCRIPTION +This function causes the remote server to synchronize the file +data and metadata to disk (like fsync(2)). + +For this to work requires fsync@openssh.com support on the server. + +\fIhandle\fP - SFTP File Handle as returned by +.BR libssh2_sftp_open_ex(3) +.SH RETURN VALUE +Returns 0 on success or negative on failure. If used in non-blocking mode, it +returns LIBSSH2_ERROR_EAGAIN when it would otherwise block. While +LIBSSH2_ERROR_EAGAIN is a negative number, it is not really a failure per se. +.SH ERRORS +\fILIBSSH2_ERROR_ALLOC\fP - An internal memory allocation call failed. + +\fILIBSSH2_ERROR_SOCKET_SEND\fP - Unable to send data on socket. + +\fILIBSSH2_ERROR_SFTP_PROTOCOL\fP - An invalid SFTP protocol response +was received on the socket, or an SFTP operation caused an errorcode +to be returned by the server. In particular, this can be returned if +the SSH server does not support the fsync operation: the SFTP subcode +\fILIBSSH2_FX_OP_UNSUPPORTED\fP will be returned in this case. +.SH AVAILABILITY +Added in libssh2 1.4.4 and OpenSSH 6.3. +.SH SEE ALSO +.BR fsync(2) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_sftp_get_channel.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_sftp_get_channel.3 new file mode 100644 index 0000000000000000000000000000000000000000..0da7cdac4c88648e6e2c60867cd70034a5bb372e --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_sftp_get_channel.3 @@ -0,0 +1,24 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_sftp_get_channel 3 "9 Sep 2011" "libssh2 1.4.0" "libssh2" +.SH NAME +libssh2_sftp_get_channel - return the channel of sftp +.SH SYNOPSIS +.nf +#include +#include + +LIBSSH2_CHANNEL * +libssh2_sftp_get_channel(LIBSSH2_SFTP *sftp); +.fi +.SH DESCRIPTION +\fIsftp\fP - SFTP instance as returned by +.BR libssh2_sftp_init(3) + +Return the channel of the given sftp handle. +.SH RETURN VALUE +The channel of the SFTP instance or NULL if something was wrong. +.SH AVAILABILITY +Added in 1.4.0 +.SH SEE ALSO +.BR libssh2_sftp_init(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_sftp_init.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_sftp_init.3 new file mode 100644 index 0000000000000000000000000000000000000000..dab613d6c1d8a1f4de66537aee7e35d73ee8de59 --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_sftp_init.3 @@ -0,0 +1,42 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_sftp_init 3 "1 Jun 2007" "libssh2 0.15" "libssh2" +.SH NAME +libssh2_sftp_init - open SFTP channel for the given SSH session. +.SH SYNOPSIS +.nf +#include +#include + +LIBSSH2_SFTP * +libssh2_sftp_init(LIBSSH2_SESSION *session); +.fi +.SH DESCRIPTION +\fIsession\fP - Session instance as returned by +.BR libssh2_session_init_ex(3) + +Open a channel and initialize the SFTP subsystem. Although the SFTP subsystem +operates over the same type of channel as those exported by the Channel API, +the protocol itself implements its own unique binary packet protocol which +must be managed with the libssh2_sftp_*() family of functions. When an SFTP +session is complete, it must be destroyed using the +.BR libssh2_sftp_shutdown(3) +function. +.SH RETURN VALUE +A pointer to the newly allocated SFTP instance or NULL on failure. +.SH ERRORS +\fILIBSSH2_ERROR_ALLOC\fP - An internal memory allocation call failed. + +\fILIBSSH2_ERROR_SOCKET_SEND\fP - Unable to send data on socket. + +\fILIBSSH2_ERROR_SOCKET_TIMEOUT\fP - + +\fILIBSSH2_ERROR_SFTP_PROTOCOL\fP - An invalid SFTP protocol response was +received on the socket, or an SFTP operation caused an errorcode to be +returned by the server. + +\fILIBSSH2_ERROR_EAGAIN\fP - Marked for non-blocking I/O but the call would +block. +.SH SEE ALSO +.BR libssh2_sftp_shutdown(3) +.BR libssh2_sftp_open_ex(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_sftp_last_error.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_sftp_last_error.3 new file mode 100644 index 0000000000000000000000000000000000000000..f5993b4d411378de1adee4f74ea0d85f67c566ef --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_sftp_last_error.3 @@ -0,0 +1,25 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_sftp_last_error 3 "1 Jun 2007" "libssh2 0.15" "libssh2" +.SH NAME +libssh2_sftp_last_error - return the last SFTP-specific error code +.SH SYNOPSIS +.nf +#include +#include + +unsigned long +libssh2_sftp_last_error(LIBSSH2_SFTP *sftp); +.fi +.SH DESCRIPTION +\fIsftp\fP - SFTP instance as returned by +.BR libssh2_sftp_init(3) + +Returns the last error code produced by the SFTP layer. Note that this only +returns a sensible error code if libssh2 returned LIBSSH2_ERROR_SFTP_PROTOCOL +in a previous call. Using \fBlibssh2_sftp_last_error(3)\fP without a +preceding SFTP protocol error, it will return an unspecified value. +.SH RETURN VALUE +Current error code state of the SFTP instance. +.SH SEE ALSO +.BR libssh2_sftp_init(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_sftp_lstat.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_sftp_lstat.3 new file mode 100644 index 0000000000000000000000000000000000000000..8165cdb887d58ce9be525eefd9bad5644cf4207e --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_sftp_lstat.3 @@ -0,0 +1,23 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_sftp_lstat 3 "20 Feb 2010" "libssh2 1.2.4" "libssh2" +.SH NAME +libssh2_sftp_lstat - convenience macro for \fIlibssh2_sftp_stat_ex(3)\fP calls +.SH SYNOPSIS +.nf +#include +#include + +int +libssh2_sftp_lstat(LIBSSH2_SFTP *sftp, const char *path, + LIBSSH2_SFTP_ATTRIBUTES *attrs); +.fi +.SH DESCRIPTION +This is a macro defined in a public libssh2 header file that is using the +underlying function \fIlibssh2_sftp_stat_ex(3)\fP. +.SH RETURN VALUE +See \fIlibssh2_sftp_stat_ex(3)\fP +.SH ERRORS +See \fIlibssh2_sftp_stat_ex(3)\fP +.SH SEE ALSO +.BR libssh2_sftp_stat_ex(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_sftp_mkdir.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_sftp_mkdir.3 new file mode 100644 index 0000000000000000000000000000000000000000..193ec09e82eac51c3d998b0ad25f25b09a3b13a3 --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_sftp_mkdir.3 @@ -0,0 +1,23 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_sftp_mkdir 3 "20 Feb 2010" "libssh2 1.2.4" "libssh2" +.SH NAME +libssh2_sftp_mkdir - convenience macro for \fIlibssh2_sftp_mkdir_ex(3)\fP calls +.SH SYNOPSIS +.nf +#include +#include + +int +libssh2_sftp_mkdir(LIBSSH2_SFTP *sftp, const char *path, + long mode); +.fi +.SH DESCRIPTION +This is a macro defined in a public libssh2 header file that is using the +underlying function \fIlibssh2_sftp_mkdir_ex(3)\fP. +.SH RETURN VALUE +See \fIlibssh2_sftp_mkdir_ex(3)\fP +.SH ERRORS +See \fIlibssh2_sftp_mkdir_ex(3)\fP +.SH SEE ALSO +.BR libssh2_sftp_mkdir_ex(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_sftp_mkdir_ex.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_sftp_mkdir_ex.3 new file mode 100644 index 0000000000000000000000000000000000000000..3e5759dc24df93f2048717d2ea25cd6be7f31f2d --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_sftp_mkdir_ex.3 @@ -0,0 +1,48 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_sftp_mkdir_ex 3 "1 Jun 2007" "libssh2 0.15" "libssh2" +.SH NAME +libssh2_sftp_mkdir_ex - create a directory on the remote file system +.SH SYNOPSIS +.nf +#include +#include + +int +libssh2_sftp_mkdir_ex(LIBSSH2_SFTP *sftp, + const char *path, unsigned int path_len, + long mode); + +int +libssh2_sftp_mkdir(LIBSSH2_SFTP *sftp, + const char *path, + long mode); +.fi +.SH DESCRIPTION +\fIsftp\fP - SFTP instance as returned by +.BR libssh2_sftp_init(3) + +\fIpath\fP - full path of the new directory to create. Note that the new +directory's parents must all exist prior to making this call. + +\fIpath_len\fP - length of the full path of the new directory to create. + +\fImode\fP - directory creation mode (e.g. 0755). + +Create a directory on the remote file system. +.SH RETURN VALUE +Return 0 on success or negative on failure. +LIBSSH2_ERROR_EAGAIN when it would otherwise block. While +LIBSSH2_ERROR_EAGAIN is a negative number, it is not really a failure per se. +.SH ERRORS +\fILIBSSH2_ERROR_ALLOC\fP - An internal memory allocation call failed. + +\fILIBSSH2_ERROR_SOCKET_SEND\fP - Unable to send data on socket. + +\fILIBSSH2_ERROR_SOCKET_TIMEOUT\fP - + +\fILIBSSH2_ERROR_SFTP_PROTOCOL\fP - An invalid SFTP protocol response was +received on the socket, or an SFTP operation caused an errorcode to be +returned by the server. +.SH SEE ALSO +.BR libssh2_sftp_open_ex(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_sftp_open.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_sftp_open.3 new file mode 100644 index 0000000000000000000000000000000000000000..7918b506bf30fac6e54d0143fa22349f668810e4 --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_sftp_open.3 @@ -0,0 +1,24 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_sftp_open 3 "20 Feb 2010" "libssh2 1.2.4" "libssh2" +.SH NAME +libssh2_sftp_open - convenience macro for \fIlibssh2_sftp_open_ex(3)\fP calls +.SH SYNOPSIS +.nf +#include +#include + +LIBSSH2_SFTP_HANDLE * +libssh2_sftp_open(LIBSSH2_SFTP *sftp, const char *filename, + unsigned long flags, + long mode); +.fi +.SH DESCRIPTION +This is a macro defined in a public libssh2 header file that is using the +underlying function \fIlibssh2_sftp_open_ex(3)\fP. +.SH RETURN VALUE +See \fIlibssh2_sftp_open_ex(3)\fP +.SH ERRORS +See \fIlibssh2_sftp_open_ex(3)\fP +.SH SEE ALSO +.BR libssh2_sftp_open_ex(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_sftp_open_ex.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_sftp_open_ex.3 new file mode 100644 index 0000000000000000000000000000000000000000..f0dced8cc2e999c9909a2f05d700dd992bef7a57 --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_sftp_open_ex.3 @@ -0,0 +1,69 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_sftp_open_ex 3 "1 Jun 2007" "libssh2 0.15" "libssh2" +.SH NAME +libssh2_sftp_open_ex - open filehandle for file on SFTP. +.SH SYNOPSIS +.nf +#include +#include + +LIBSSH2_SFTP_HANDLE * +libssh2_sftp_open_ex(LIBSSH2_SFTP *sftp, const char *filename, + unsigned int filename_len, + unsigned long flags, + long mode, + int open_type); +.fi +.SH DESCRIPTION +\fIsftp\fP - SFTP instance as returned by \fIlibssh2_sftp_init(3)\fP + +\fIfilename\fP - Remote file/directory resource to open + +\fIfilename_len\fP - Length of filename + +\fIflags\fP - Any reasonable combination of the LIBSSH2_FXF_* constants: +.RS +.IP LIBSSH2_FXF_READ +Open the file for reading. +.IP LIBSSH2_FXF_WRITE +Open the file for writing. If both this and LIBSSH2_FXF_READ are specified, +the file is opened for both reading and writing. +.IP LIBSSH2_FXF_APPEND +Force all writes to append data at the end of the file. +.IP LIBSSH2_FXF_CREAT, +If this flag is specified, then a new file will be created if one does not +already exist (if LIBSSH2_FXF_TRUNC is specified, the new file will be +truncated to zero length if it previously exists) +.IP LIBSSH2_FXF_TRUNC +Forces an existing file with the same name to be truncated to zero length when +creating a file by specifying LIBSSH2_FXF_CREAT. LIBSSH2_FXF_CREAT MUST also +be specified if this flag is used. +.IP LIBSSH2_FXF_EXCL +Causes the request to fail if the named file already exists. +LIBSSH2_FXF_CREAT MUST also be specified if this flag is used. + +.RE +\fImode\fP - POSIX file permissions to assign if the file is being newly +created. See the LIBSSH2_SFTP_S_* convenience defines in + +\fIopen_type\fP - Either of LIBSSH2_SFTP_OPENFILE (to open a file) or +LIBSSH2_SFTP_OPENDIR (to open a directory). +.SH RETURN VALUE +A pointer to the newly created LIBSSH2_SFTP_HANDLE instance or NULL on +failure. +.SH ERRORS +\fILIBSSH2_ERROR_ALLOC\fP - An internal memory allocation call failed. + +\fILIBSSH2_ERROR_SOCKET_SEND\fP - Unable to send data on socket. + +\fILIBSSH2_ERROR_SOCKET_TIMEOUT\fP - + +\fILIBSSH2_ERROR_SFTP_PROTOCOL\fP - An invalid SFTP protocol response was +received on the socket, or an SFTP operation caused an errorcode to be +returned by the server. + +\fILIBSSH2_ERROR_EAGAIN\fP - Marked for non-blocking I/O but the call would +block. +.SH SEE ALSO +.BR libssh2_sftp_close_handle(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_sftp_open_ex_r.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_sftp_open_ex_r.3 new file mode 100644 index 0000000000000000000000000000000000000000..11bb6c17e6cc10f036174b617cf0fb3f3ea883f8 --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_sftp_open_ex_r.3 @@ -0,0 +1,77 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_sftp_open_ex_r 3 "10 Apr 2023" "libssh2" "libssh2" +.SH NAME +libssh2_sftp_open_ex_r - open filehandle for file on SFTP. +.SH SYNOPSIS +.nf +#include +#include + +LIBSSH2_SFTP_HANDLE * +libssh2_sftp_open_ex_r(LIBSSH2_SFTP *sftp, const char *filename, + size_t filename_len, + unsigned long flags, + long mode, + int open_type, + LIBSSH2_SFTP_ATTRIBUTES *attrs); +.fi +.SH DESCRIPTION +\fIsftp\fP - SFTP instance as returned by \fIlibssh2_sftp_init(3)\fP + +\fIfilename\fP - Remote file/directory resource to open + +\fIfilename_len\fP - Length of filename + +\fIflags\fP - Any reasonable combination of the LIBSSH2_FXF_* constants: +.RS +.IP LIBSSH2_FXF_READ +Open the file for reading. +.IP LIBSSH2_FXF_WRITE +Open the file for writing. If both this and LIBSSH2_FXF_READ are specified, +the file is opened for both reading and writing. +.IP LIBSSH2_FXF_APPEND +Force all writes to append data at the end of the file. +.IP LIBSSH2_FXF_CREAT, +If this flag is specified, then a new file will be created if one does not +already exist (if LIBSSH2_FXF_TRUNC is specified, the new file will be +truncated to zero length if it previously exists) +.IP LIBSSH2_FXF_TRUNC +Forces an existing file with the same name to be truncated to zero length when +creating a file by specifying LIBSSH2_FXF_CREAT. LIBSSH2_FXF_CREAT MUST also +be specified if this flag is used. +.IP LIBSSH2_FXF_EXCL +Causes the request to fail if the named file already exists. +LIBSSH2_FXF_CREAT MUST also be specified if this flag is used. + +.RE +\fImode\fP - POSIX file permissions to assign if the file is being newly +created. See the LIBSSH2_SFTP_S_* convenience defines in + +\fIopen_type\fP - Either of LIBSSH2_SFTP_OPENFILE (to open a file) or +LIBSSH2_SFTP_OPENDIR (to open a directory). + +\fIattrs\fP - Pointer to LIBSSH2_SFTP_ATTRIBUTES struct. See +libssh2_sftp_fstat_ex for detailed usage. + +.SH RETURN VALUE +A pointer to the newly created LIBSSH2_SFTP_HANDLE instance or NULL on +failure. +.SH ERRORS +\fILIBSSH2_ERROR_ALLOC\fP - An internal memory allocation call failed. + +\fILIBSSH2_ERROR_SOCKET_SEND\fP - Unable to send data on socket. + +\fILIBSSH2_ERROR_SOCKET_TIMEOUT\fP - + +\fILIBSSH2_ERROR_SFTP_PROTOCOL\fP - An invalid SFTP protocol response was +received on the socket, or an SFTP operation caused an errorcode to be +returned by the server. + +\fILIBSSH2_ERROR_EAGAIN\fP - Marked for non-blocking I/O but the call would +block. +.SH AVAILABILITY +Added in libssh2 1.11.0 +.SH SEE ALSO +.BR libssh2_sftp_close_handle(3) +.BR libssh2_sftp_fstat_ex(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_sftp_open_r.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_sftp_open_r.3 new file mode 100644 index 0000000000000000000000000000000000000000..2627c9d760e1b4e8a720a66947d1a50545985efc --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_sftp_open_r.3 @@ -0,0 +1,25 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_sftp_open_r 3 "10 Apr 2023" "libssh2 1.11.0" "libssh2" +.SH NAME +libssh2_sftp_open_r - convenience macro for \fIlibssh2_sftp_open_ex_r(3)\fP calls +.SH SYNOPSIS +.nf +#include +#include + +LIBSSH2_SFTP_HANDLE * +libssh2_sftp_open_r(LIBSSH2_SFTP *sftp, const char *filename, + unsigned long flags, + long mode, + LIBSSH2_SFTP_ATTRIBUTES *attrs); +.fi +.SH DESCRIPTION +This is a macro defined in a public libssh2 header file that is using the +underlying function \fIlibssh2_sftp_open_ex_r(3)\fP. +.SH RETURN VALUE +See \fIlibssh2_sftp_open_ex_r(3)\fP +.SH ERRORS +See \fIlibssh2_sftp_open_ex_r(3)\fP +.SH SEE ALSO +.BR libssh2_sftp_open_ex_r(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_sftp_opendir.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_sftp_opendir.3 new file mode 100644 index 0000000000000000000000000000000000000000..fbba59480c548859038b4454bbff36d7a1672dfa --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_sftp_opendir.3 @@ -0,0 +1,22 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_sftp_opendir 3 "20 Feb 2010" "libssh2 1.2.4" "libssh2" +.SH NAME +libssh2_sftp_opendir - convenience macro for \fIlibssh2_sftp_open_ex(3)\fP calls +.SH SYNOPSIS +.nf +#include +#include + +LIBSSH2_SFTP_HANDLE * +libssh2_sftp_opendir(LIBSSH2_SFTP *sftp, const char *path); +.fi +.SH DESCRIPTION +This is a macro defined in a public libssh2 header file that is using the +underlying function \fIlibssh2_sftp_open_ex(3)\fP. +.SH RETURN VALUE +See \fIlibssh2_sftp_open_ex(3)\fP +.SH ERRORS +See \fIlibssh2_sftp_open_ex(3)\fP +.SH SEE ALSO +.BR libssh2_sftp_open_ex(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_sftp_posix_rename.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_sftp_posix_rename.3 new file mode 100644 index 0000000000000000000000000000000000000000..95cbd4dea58149542bfe042c9e4deaf93c531130 --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_sftp_posix_rename.3 @@ -0,0 +1,24 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_sftp_posix_rename 3 "9 May 2024" "libssh2 1.11.1" "libssh2" +.SH NAME +libssh2_sftp_rename - convenience macro for \fIlibssh2_sftp_posix_rename_ex(3)\fP calls +.SH SYNOPSIS +.nf +#include +#include + +int +libssh2_sftp_posix_rename(LIBSSH2_SFTP *sftp, + const char *source_filename, + const char *destination_filename); +.fi +.SH DESCRIPTION +This is a macro defined in a public libssh2 header file that is using the +underlying function \fIlibssh2_sftp_posix_rename_ex(3)\fP. +.SH RETURN VALUE +See \fIlibssh2_sftp_posix_rename_ex(3)\fP +.SH ERRORS +See \fIlibssh2_sftp_posix_rename_ex(3)\fP +.SH SEE ALSO +.BR libssh2_sftp_posix_rename_ex(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_sftp_posix_rename_ex.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_sftp_posix_rename_ex.3 new file mode 100644 index 0000000000000000000000000000000000000000..03b6c39f30dcff28b7c4b1602bfccfe91e9b2107 --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_sftp_posix_rename_ex.3 @@ -0,0 +1,58 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_sftp_posix_rename_ex 3 "9 May 2024" "libssh2 1.11.1" "libssh2" +.SH NAME +libssh2_sftp_posix_rename_ex - rename an SFTP file using POSIX semantics +.SH SYNOPSIS +.nf +#include +#include + +int +libssh2_sftp_posix_rename_ex(LIBSSH2_SFTP *sftp, + const char *source_filename, + size_t source_filename_len, + const char *dest_filename, + size_t dest_filename_len); +.fi +.SH DESCRIPTION +\fIsftp\fP - SFTP instance as returned by +.BR libssh2_sftp_init(3) + +\fIsourcefile\fP - Path and name of the existing filesystem entry + +\fIsourcefile_len\fP - Length of the path and name of the existing +filesystem entry + +\fIdestfile\fP - Path and name of the target filesystem entry + +\fIdestfile_len\fP - Length of the path and name of the target +filesystem entry + +This function implements the posix-rename@openssh.com extension, which is +useful when, for example, moving files across filesystems on a remote server. +SSH_FXP_RENAME does not specify a specific implementation, but many servers +will attempt to user hard links when moving files using SSH_FXP_RENAME. + +If the server does not support posix-rename@openssh.com, this function will +return LIBSSH2_FX_OP_UNSUPPORTED and you can call libssh2_sftp_rename_ex (3) as +a backup. +.SH RETURN VALUE +Return 0 on success or negative on failure. It returns +LIBSSH2_ERROR_EAGAIN when it would otherwise block. While +LIBSSH2_ERROR_EAGAIN is a negative number, it is not really a failure per se. +.SH ERRORS +\fILIBSSH2_FX_OP_UNSUPPORTED\fP - Server does not support +posix-rename@openssh.com + +\fILIBSSH2_ERROR_ALLOC\fP - An internal memory allocation call failed. + +\fILIBSSH2_ERROR_SOCKET_SEND\fP - Unable to send data on socket. + +\fILIBSSH2_ERROR_SOCKET_TIMEOUT\fP - + +\fILIBSSH2_ERROR_SFTP_PROTOCOL\fP - An invalid SFTP protocol response was +received on the socket, or an SFTP operation caused an errorcode to +be returned by the server. +.SH SEE ALSO +.BR libssh2_sftp_init(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_sftp_read.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_sftp_read.3 new file mode 100644 index 0000000000000000000000000000000000000000..86df3e2bd18b0f24122d9ac3e5493533972b1f0b --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_sftp_read.3 @@ -0,0 +1,47 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_sftp_read 3 "1 Jun 2007" "libssh2 0.15" "libssh2" +.SH NAME +libssh2_sftp_read - read data from an SFTP handle +.SH SYNOPSIS +.nf +#include +#include + +ssize_t +libssh2_sftp_read(LIBSSH2_SFTP_HANDLE *handle, + char *buffer, size_t buffer_maxlen); +.fi +.SH DESCRIPTION +\fIhandle\fP is the SFTP File Handle as returned by +.BR libssh2_sftp_open_ex(3) + +\fIbuffer\fP is a pointer to a pre-allocated buffer of at least + +\fIbuffer_maxlen\fP bytes to read data into. + +Reads a block of data from an LIBSSH2_SFTP_HANDLE. This method is modelled +after the POSIX +.BR read(2) +function and uses the same calling semantics. +.BR libssh2_sftp_read(3) +will attempt to read as much as possible however it may not fill all of buffer +if the file pointer reaches the end or if further reads would cause the socket +to block. +.SH RETURN VALUE +Number of bytes actually populated into buffer, or negative on failure. +It returns LIBSSH2_ERROR_EAGAIN when it would otherwise block. While +LIBSSH2_ERROR_EAGAIN is a negative number, it is not really a failure per se. +.SH ERRORS +\fILIBSSH2_ERROR_ALLOC\fP - An internal memory allocation call failed. + +\fILIBSSH2_ERROR_SOCKET_SEND\fP - Unable to send data on socket. + +\fILIBSSH2_ERROR_SOCKET_TIMEOUT\fP - + +\fILIBSSH2_ERROR_SFTP_PROTOCOL\fP - An invalid SFTP protocol response was +received on the socket, or an SFTP operation caused an errorcode to be +returned by the server. +.SH SEE ALSO +.BR libssh2_sftp_open_ex(3) +.BR libssh2_sftp_read(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_sftp_readdir.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_sftp_readdir.3 new file mode 100644 index 0000000000000000000000000000000000000000..9764a8b0a185a3c92d7c3f2ab72cbae3e6e3111c --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_sftp_readdir.3 @@ -0,0 +1,24 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_sftp_readdir 3 "20 Feb 2010" "libssh2 1.2.4" "libssh2" +.SH NAME +libssh2_sftp_readdir - convenience macro for \fIlibssh2_sftp_readdir_ex(3)\fP calls +.SH SYNOPSIS +.nf +#include +#include + +int +libssh2_sftp_readdir(LIBSSH2_SFTP_HANDLE *handle, + char *buffer, size_t buffer_maxlen, + LIBSSH2_SFTP_ATTRIBUTES *attrs); +.fi +.SH DESCRIPTION +This is a macro defined in a public libssh2 header file that is using the +underlying function \fIlibssh2_sftp_readdir_ex(3)\fP. +.SH RETURN VALUE +See \fIlibssh2_sftp_readdir_ex(3)\fP +.SH ERRORS +See \fIlibssh2_sftp_readdir_ex(3)\fP +.SH SEE ALSO +.BR libssh2_sftp_readdir_ex(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_sftp_readdir_ex.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_sftp_readdir_ex.3 new file mode 100644 index 0000000000000000000000000000000000000000..ef8d757657bfc4ccb0fadbf1e655faa98efeeab5 --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_sftp_readdir_ex.3 @@ -0,0 +1,68 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_sftp_readdir_ex 3 "1 Jun 2007" "libssh2 0.15" "libssh2" +.SH NAME +libssh2_sftp_readdir_ex - read directory data from an SFTP handle +.SH SYNOPSIS +.nf +#include +#include + +int +libssh2_sftp_readdir_ex(LIBSSH2_SFTP_HANDLE *handle, + char *buffer, size_t buffer_maxlen, + char *longentry, size_t longentry_maxlen, + LIBSSH2_SFTP_ATTRIBUTES *attrs); +.fi +.SH DESCRIPTION +Reads a block of data from a LIBSSH2_SFTP_HANDLE and returns file entry +information for the next entry, if any. + +\fIhandle\fP - is the SFTP File Handle as returned by +.BR libssh2_sftp_open_ex(3) + +\fIbuffer\fP - is a pointer to a pre-allocated buffer of at least +\fIbuffer_maxlen\fP bytes to read data into. + +\fIbuffer_maxlen\fP - is the length of buffer in bytes. If the length of the +filename is longer than the space provided by buffer_maxlen it will be +truncated to fit. + +\fIlongentry\fP - is a pointer to a pre-allocated buffer of at least +\fIlongentry_maxlen\fP bytes to read data into. The format of the `longname' +field is unspecified by SFTP protocol. It MUST be suitable for use in the +output of a directory listing command (in fact, the recommended operation for +a directory listing command is to display this data). + +\fIlongentry_maxlen\fP - is the length of longentry in bytes. If the length of +the full directory entry is longer than the space provided by +\fIlongentry_maxlen\fP it will be truncated to fit. + +\fIattrs\fP - is a pointer to LIBSSH2_SFTP_ATTRIBUTES storage to populate +statbuf style data into. +.SH RETURN VALUE +Number of bytes actually populated into buffer (not counting the terminating +zero), or negative on failure. It returns LIBSSH2_ERROR_EAGAIN when it would +otherwise block. While LIBSSH2_ERROR_EAGAIN is a negative number, it is not +really a failure per se. +.SH BUG +Passing in a too small buffer for 'buffer' or 'longentry' when receiving data +only results in libssh2 1.2.7 or earlier to not copy the entire data amount, +and it is not possible for the application to tell when it happens! +.SH ERRORS +\fILIBSSH2_ERROR_ALLOC\fP - An internal memory allocation call failed. + +\fILIBSSH2_ERROR_SOCKET_SEND\fP - Unable to send data on socket. + +\fILIBSSH2_ERROR_SOCKET_TIMEOUT\fP - + +\fILIBSSH2_ERROR_SFTP_PROTOCOL\fP - An invalid SFTP protocol response was +received on the socket, or an SFTP operation caused an errorcode to be +returned by the server. + +From 1.2.8, LIBSSH2_ERROR_BUFFER_TOO_SMALL is returned if any of the +given 'buffer' or 'longentry' buffers are too small to fit the requested +object name. +.SH SEE ALSO +.BR libssh2_sftp_open_ex(3), +.BR libssh2_sftp_close_handle(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_sftp_readlink.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_sftp_readlink.3 new file mode 100644 index 0000000000000000000000000000000000000000..f48da0c1f066f0483085182a1c794c6f205bc6a0 --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_sftp_readlink.3 @@ -0,0 +1,24 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_sftp_readlink 3 "20 Feb 2010" "libssh2 1.2.4" "libssh2" +.SH NAME +libssh2_sftp_readlink - convenience macro for \fIlibssh2_sftp_symlink_ex(3)\fP +.SH SYNOPSIS +.nf +#include +#include + +#define libssh2_sftp_readlink(sftp, path, target, maxlen) \\ + libssh2_sftp_symlink_ex((sftp), (path), strlen(path), \\ + (target), (maxlen), \\ + LIBSSH2_SFTP_READLINK) +.fi +.SH DESCRIPTION +This is a macro defined in a public libssh2 header file that is using the +underlying function \fIlibssh2_sftp_symlink_ex(3)\fP. +.SH RETURN VALUE +See \fIlibssh2_sftp_symlink_ex(3)\fP +.SH ERRORS +See \fIlibssh2_sftp_symlink_ex(3)\fP +.SH SEE ALSO +.BR libssh2_sftp_symlink_ex(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_sftp_realpath.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_sftp_realpath.3 new file mode 100644 index 0000000000000000000000000000000000000000..1685622ddd3c7551db1c6344ad61d1c20c1955c4 --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_sftp_realpath.3 @@ -0,0 +1,24 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_sftp_realpath 3 "20 Feb 2010" "libssh2 1.2.4" "libssh2" +.SH NAME +libssh2_sftp_realpath - convenience macro for \fIlibssh2_sftp_symlink_ex(3)\fP +.SH SYNOPSIS +.nf +#include +#include + +#define libssh2_sftp_realpath(sftp, path, target, maxlen) \\ + libssh2_sftp_symlink_ex((sftp), (path), strlen(path), \\ + (target), (maxlen), \\ + LIBSSH2_SFTP_REALPATH) +.fi +.SH DESCRIPTION +This is a macro defined in a public libssh2 header file that is using the +underlying function \fIlibssh2_sftp_symlink_ex(3)\fP. +.SH RETURN VALUE +See \fIlibssh2_sftp_symlink_ex(3)\fP +.SH ERRORS +See \fIlibssh2_sftp_symlink_ex(3)\fP +.SH SEE ALSO +.BR libssh2_sftp_symlink_ex(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_sftp_rename.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_sftp_rename.3 new file mode 100644 index 0000000000000000000000000000000000000000..7207780b1004c94fda8f8cf8a8c9c89517066034 --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_sftp_rename.3 @@ -0,0 +1,24 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_sftp_rename 3 "20 Feb 2010" "libssh2 1.2.4" "libssh2" +.SH NAME +libssh2_sftp_rename - convenience macro for \fIlibssh2_sftp_rename_ex(3)\fP calls +.SH SYNOPSIS +.nf +#include +#include + +int +libssh2_sftp_rename(LIBSSH2_SFTP *sftp, + const char *source_filename, + const char *destination_filename); +.fi +.SH DESCRIPTION +This is a macro defined in a public libssh2 header file that is using the +underlying function \fIlibssh2_sftp_rename_ex(3)\fP. +.SH RETURN VALUE +See \fIlibssh2_sftp_rename_ex(3)\fP +.SH ERRORS +See \fIlibssh2_sftp_rename_ex(3)\fP +.SH SEE ALSO +.BR libssh2_sftp_rename_ex(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_sftp_rename_ex.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_sftp_rename_ex.3 new file mode 100644 index 0000000000000000000000000000000000000000..8feb4d21235b1af046e0ab4919597db453aa31fe --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_sftp_rename_ex.3 @@ -0,0 +1,63 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_sftp_rename_ex 3 "1 Jun 2007" "libssh2 0.15" "libssh2" +.SH NAME +libssh2_sftp_rename_ex - rename an SFTP file +.SH SYNOPSIS +.nf +#include +#include + +int +libssh2_sftp_rename_ex(LIBSSH2_SFTP *sftp, + const char *source_filename, + unsigned int source_filename_len, + const char *dest_filename, + unsigned int dest_filename_len, + long flags); + +int +libssh2_sftp_rename_ex(LIBSSH2_SFTP *sftp, + const char *source_filename, + const char *dest_filename); +.fi +.SH DESCRIPTION +\fIsftp\fP - SFTP instance as returned by +.BR libssh2_sftp_init(3) + +\fIsourcefile\fP - Path and name of the existing filesystem entry + +\fIsourcefile_len\fP - Length of the path and name of the existing +filesystem entry + +\fIdestfile\fP - Path and name of the target filesystem entry + +\fIdestfile_len\fP - Length of the path and name of the target +filesystem entry + +\fIflags\fP - +Bitmask flags made up of LIBSSH2_SFTP_RENAME_* constants. + +Rename a filesystem object on the remote filesystem. The semantics of +this command typically include the ability to move a filesystem object +between folders and/or filesystem mounts. If the LIBSSH2_SFTP_RENAME_OVERWRITE +flag is not set and the destfile entry already exists, the operation +will fail. Use of the other two flags indicate a preference (but not a +requirement) for the remote end to perform an atomic rename operation +and/or using native system calls when possible. +.SH RETURN VALUE +Return 0 on success or negative on failure. It returns +LIBSSH2_ERROR_EAGAIN when it would otherwise block. While +LIBSSH2_ERROR_EAGAIN is a negative number, it is not really a failure per se. +.SH ERRORS +\fILIBSSH2_ERROR_ALLOC\fP - An internal memory allocation call failed. + +\fILIBSSH2_ERROR_SOCKET_SEND\fP - Unable to send data on socket. + +\fILIBSSH2_ERROR_SOCKET_TIMEOUT\fP - + +\fILIBSSH2_ERROR_SFTP_PROTOCOL\fP - An invalid SFTP protocol response was +received on the socket, or an SFTP operation caused an errorcode to +be returned by the server. +.SH SEE ALSO +.BR libssh2_sftp_init(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_sftp_rewind.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_sftp_rewind.3 new file mode 100644 index 0000000000000000000000000000000000000000..5e4ddde4fa6efb8ae75d8217df88149ad84aa006 --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_sftp_rewind.3 @@ -0,0 +1,22 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_sftp_rewind 3 "20 Feb 2010" "libssh2 1.2.4" "libssh2" +.SH NAME +libssh2_sftp_rewind - convenience macro for \fIlibssh2_sftp_seek64(3)\fP calls +.SH SYNOPSIS +.nf +#include +#include + +int +libssh2_sftp_rewind(LIBSSH2_SFTP_HANDLE *handle); +.fi +.SH DESCRIPTION +This is a macro defined in a public libssh2 header file that is using the +underlying function \fIlibssh2_sftp_seek64(3)\fP. +.SH RETURN VALUE +See \fIlibssh2_sftp_seek64(3)\fP +.SH ERRORS +See \fIlibssh2_sftp_seek64(3)\fP +.SH SEE ALSO +.BR libssh2_sftp_seek64(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_sftp_rmdir.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_sftp_rmdir.3 new file mode 100644 index 0000000000000000000000000000000000000000..523534ac0bb7460e532d9418b0320eaf996ab7cf --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_sftp_rmdir.3 @@ -0,0 +1,22 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_sftp_rmdir 3 "20 Feb 2010" "libssh2 1.2.4" "libssh2" +.SH NAME +libssh2_sftp_rmdir - convenience macro for \fIlibssh2_sftp_rmdir_ex(3)\fP +.SH SYNOPSIS +.nf +#include +#include + +#define libssh2_sftp_rmdir(sftp, path) \\ + libssh2_sftp_rmdir_ex((sftp), (path), strlen(path)) +.fi +.SH DESCRIPTION +This is a macro defined in a public libssh2 header file that is using the +underlying function \fIlibssh2_sftp_rmdir_ex(3)\fP. +.SH RETURN VALUE +See \fIlibssh2_sftp_rmdir_ex(3)\fP +.SH ERRORS +See \fIlibssh2_sftp_rmdir_ex(3)\fP +.SH SEE ALSO +.BR libssh2_sftp_rmdir_ex(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_sftp_rmdir_ex.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_sftp_rmdir_ex.3 new file mode 100644 index 0000000000000000000000000000000000000000..79a73bfa9db37a4eac9012cbc568ca1a03e675a8 --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_sftp_rmdir_ex.3 @@ -0,0 +1,40 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_sftp_rmdir_ex 3 "1 Jun 2007" "libssh2 0.15" "libssh2" +.SH NAME +libssh2_sftp_rmdir_ex - remove an SFTP directory +.SH SYNOPSIS +.nf +#include +#include + +int +libssh2_sftp_rmdir_ex(LIBSSH2_SFTP *sftp, const char *path, + unsigned int path_len); +.fi +.SH DESCRIPTION +Remove a directory from the remote file system. + +\fIsftp\fP - SFTP instance as returned by +.BR libssh2_sftp_init(3) + +\fIsourcefile\fP - Full path of the existing directory to remove. + +\fIsourcefile_len\fP - Length of the full path of the existing directory to +remove. +.SH RETURN VALUE +Return 0 on success or negative on failure. It returns +LIBSSH2_ERROR_EAGAIN when it would otherwise block. While +LIBSSH2_ERROR_EAGAIN is a negative number, it is not really a failure per se. +.SH ERRORS +\fILIBSSH2_ERROR_ALLOC\fP - An internal memory allocation call failed. + +\fILIBSSH2_ERROR_SOCKET_SEND\fP - Unable to send data on socket. + +\fILIBSSH2_ERROR_SOCKET_TIMEOUT\fP - + +\fILIBSSH2_ERROR_SFTP_PROTOCOL\fP - An invalid SFTP protocol response was +received on the socket, or an SFTP operation caused an errorcode to +be returned by the server. +.SH SEE ALSO +.BR libssh2_sftp_init(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_sftp_seek.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_sftp_seek.3 new file mode 100644 index 0000000000000000000000000000000000000000..87782de1121b5affd2bcb301e66b05922067c176 --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_sftp_seek.3 @@ -0,0 +1,30 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_sftp_seek 3 "22 Dec 2008" "libssh2 1.0" "libssh2" +.SH NAME +libssh2_sftp_seek - set the read/write position indicator within a file +.SH SYNOPSIS +.nf +#include +#include + +void +libssh2_sftp_seek(LIBSSH2_SFTP_HANDLE *handle, + size_t offset); +.fi +.SH DESCRIPTION +Deprecated function. Use \fIlibssh2_sftp_seek64(3)\fP instead! + +\fIhandle\fP - SFTP File Handle as returned by +.BR libssh2_sftp_open_ex(3) + +\fIoffset\fP - Number of bytes from the beginning of file to seek to. + +Move the file handle's internal pointer to an arbitrary location. +Note that libssh2 implements file pointers as a localized concept to make +file access appear more POSIX like. No packets are exchanged with the server +during a seek operation. The localized file pointer is used as a convenience +offset during read/write operations. +.SH SEE ALSO +.BR libssh2_sftp_open_ex(3), +.BR libssh2_sftp_seek64(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_sftp_seek64.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_sftp_seek64.3 new file mode 100644 index 0000000000000000000000000000000000000000..d40cc84b1cba66df04a365d9da0255910173dffe --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_sftp_seek64.3 @@ -0,0 +1,33 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_sftp_seek64 3 "22 Dec 2008" "libssh2" "libssh2" +.SH NAME +libssh2_sftp_seek64 - set the read/write position within a file +.SH SYNOPSIS +.nf +#include +#include + +void +libssh2_sftp_seek64(LIBSSH2_SFTP_HANDLE *handle, + libssh2_uint64_t offset); +.fi +.SH DESCRIPTION +\fIhandle\fP - SFTP File Handle as returned by +.BR libssh2_sftp_open_ex(3) + +\fIoffset\fP - Number of bytes from the beginning of file to seek to. + +Move the file handle's internal pointer to an arbitrary location. libssh2 +implements file pointers as a localized concept to make file access appear +more POSIX like. No packets are exchanged with the server during a seek +operation. The localized file pointer is used as a convenience offset during +read/write operations. + +You MUST NOT seek during writing or reading a file with SFTP, as the internals +use outstanding packets and changing the "file position" during transit will +results in badness. +.SH AVAILABILITY +Added in 1.0 +.SH SEE ALSO +.BR libssh2_sftp_open_ex(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_sftp_setstat.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_sftp_setstat.3 new file mode 100644 index 0000000000000000000000000000000000000000..3bd42f5f3e590f6ac69ef6c46c08a06ca4195ef3 --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_sftp_setstat.3 @@ -0,0 +1,23 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_sftp_setstat 3 "20 Feb 2010" "libssh2 1.2.4" "libssh2" +.SH NAME +libssh2_sftp_setstat - convenience macro for \fIlibssh2_sftp_stat_ex(3)\fP calls +.SH SYNOPSIS +.nf +#include +#include + +int +libssh2_sftp_setstat(LIBSSH2_SFTP *sftp, const char *path, + LIBSSH2_SFTP_ATTRIBUTES *attr); +.fi +.SH DESCRIPTION +This is a macro defined in a public libssh2 header file that is using the +underlying function \fIlibssh2_sftp_stat_ex(3)\fP. +.SH RETURN VALUE +See \fIlibssh2_sftp_stat_ex(3)\fP +.SH ERRORS +See \fIlibssh2_sftp_stat_ex(3)\fP +.SH SEE ALSO +.BR libssh2_sftp_stat_ex(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_sftp_shutdown.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_sftp_shutdown.3 new file mode 100644 index 0000000000000000000000000000000000000000..d0f097bae748f78f4f3d93de1af7da92575a12fe --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_sftp_shutdown.3 @@ -0,0 +1,25 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_sftp_shutdown 3 "1 Jun 2007" "libssh2 0.15" "libssh2" +.SH NAME +libssh2_sftp_shutdown - shut down an SFTP session +.SH SYNOPSIS +.nf +#include +#include + +int +libssh2_sftp_shutdown(LIBSSH2_SFTP *sftp); +.fi +.SH DESCRIPTION +\fIsftp\fP - SFTP instance as returned by +.BR libssh2_sftp_init(3) + +Destroys a previously initialized SFTP session and frees all resources +associated with it. +.SH RETURN VALUE +Return 0 on success or negative on failure. It returns +LIBSSH2_ERROR_EAGAIN when it would otherwise block. While +LIBSSH2_ERROR_EAGAIN is a negative number, it is not really a failure per se. +.SH SEE ALSO +.BR libssh2_sftp_init(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_sftp_stat.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_sftp_stat.3 new file mode 100644 index 0000000000000000000000000000000000000000..30e28a24db83eaefe12b89eea595943657b04c7a --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_sftp_stat.3 @@ -0,0 +1,23 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_sftp_stat 3 "20 Feb 2010" "libssh2 1.2.4" "libssh2" +.SH NAME +libssh2_sftp_stat - convenience macro for \fIlibssh2_sftp_fstat_ex(3)\fP calls +.SH SYNOPSIS +.nf +#include +#include + +int +libssh2_sftp_stat(LIBSSH2_SFTP *sftp, const char *path, + LIBSSH2_SFTP_ATTRIBUTES *attrs); +.fi +.SH DESCRIPTION +This is a macro defined in a public libssh2 header file that is using the +underlying function \fIlibssh2_sftp_fstat_ex(3)\fP. +.SH RETURN VALUE +See \fIlibssh2_sftp_fstat_ex(3)\fP +.SH ERRORS +See \fIlibssh2_sftp_fstat_ex(3)\fP +.SH SEE ALSO +.BR libssh2_sftp_fstat_ex(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_sftp_stat_ex.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_sftp_stat_ex.3 new file mode 100644 index 0000000000000000000000000000000000000000..3ba536e0b5c404a9a04c58312caf3ac404c01db2 --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_sftp_stat_ex.3 @@ -0,0 +1,78 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_sftp_stat_ex 3 "1 Jun 2007" "libssh2 0.15" "libssh2" +.SH NAME +libssh2_sftp_stat_ex - get status about an SFTP file +.SH SYNOPSIS +.nf +#include +#include + +int +libssh2_sftp_stat_ex(LIBSSH2_SFTP *sftp, const char *path, + unsigned int path_len, int stat_type, + LIBSSH2_SFTP_ATTRIBUTES *attrs); +.fi +.SH DESCRIPTION +\fIsftp\fP - SFTP instance as returned by +.BR libssh2_sftp_init(3) + +\fIpath\fP - Remote filesystem object to stat/lstat/setstat. + +\fIpath_len\fP - Length of the name of the remote filesystem object +to stat/lstat/setstat. + +\fIstat_type\fP - One of the three constants specifying the type of +stat operation to perform: + +.br +\fBLIBSSH2_SFTP_STAT\fP: performs stat(2) operation +.br +\fBLIBSSH2_SFTP_LSTAT\fP: performs lstat(2) operation +.br +\fBLIBSSH2_SFTP_SETSTAT\fP: performs operation to set stat info on file + +\fIattrs\fP - Pointer to a \fBLIBSSH2_SFTP_ATTRIBUTES\fP structure to set file +metadata from or into depending on the value of stat_type. + +Get or Set statbuf type data on a remote filesystem object. When getting +statbuf data, +.BR libssh2_sftp_stat(3) +will follow all symlinks, while +.BR libssh2_sftp_lstat(3) +will return data about the object encountered, even if that object +happens to be a symlink. + +The LIBSSH2_SFTP_ATTRIBUTES struct looks like this: + +.nf +struct LIBSSH2_SFTP_ATTRIBUTES { + /* If flags & ATTR_* bit is set, then the value in this struct will be + * meaningful Otherwise it should be ignored + */ + unsigned long flags; + + libssh2_uint64_t filesize; + unsigned long uid; + unsigned long gid; + unsigned long permissions; + unsigned long atime; + unsigned long mtime; +}; +.fi +.SH RETURN VALUE +Returns 0 on success or negative on failure. It returns LIBSSH2_ERROR_EAGAIN +when it would otherwise block. While LIBSSH2_ERROR_EAGAIN is a negative +number, it is not really a failure per se. +.SH ERRORS +\fILIBSSH2_ERROR_ALLOC\fP - An internal memory allocation call failed. + +\fILIBSSH2_ERROR_SOCKET_SEND\fP - Unable to send data on socket. + +\fILIBSSH2_ERROR_SOCKET_TIMEOUT\fP - + +\fILIBSSH2_ERROR_SFTP_PROTOCOL\fP - An invalid SFTP protocol response was +received on the socket, or an SFTP operation caused an errorcode to +be returned by the server. +.SH SEE ALSO +.BR libssh2_sftp_init(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_sftp_statvfs.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_sftp_statvfs.3 new file mode 100644 index 0000000000000000000000000000000000000000..75b23847ef6efebb994b5d198891e4b246423119 --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_sftp_statvfs.3 @@ -0,0 +1,79 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_sftp_statvfs 3 "22 May 2010" "libssh2" "libssh2" +.SH NAME +libssh2_sftp_statvfs, libssh2_sftp_fstatvfs - get file system statistics +.SH SYNOPSIS +.nf +#include +#include + +int +libssh2_sftp_statvfs(LIBSSH2_SFTP *sftp, const char *path, + size_t path_len, LIBSSH2_SFTP_STATVFS *st); + +int +libssh2_sftp_fstatvfs(LIBSSH2_SFTP_HANDLE *handle, + LIBSSH2_SFTP_STATVFS *st) +.fi +.SH DESCRIPTION +These functions provide statvfs(2)-like operations and require +statvfs@openssh.com and fstatvfs@openssh.com extension support on the server. + +\fIsftp\fP - SFTP instance as returned by +.BR libssh2_sftp_init(3) + +\fIhandle\fP - SFTP File Handle as returned by +.BR libssh2_sftp_open_ex(3) + +\fIpath\fP - full path of any file within the mounted file system. + +\fIpath_len\fP - length of the full path. + +\fIst\fP - Pointer to a LIBSSH2_SFTP_STATVFS structure to place file system +statistics into. +.SH DATA TYPES +LIBSSH2_SFTP_STATVFS is a typedefed struct that is defined as below + +.nf +struct _LIBSSH2_SFTP_STATVFS { + libssh2_uint64_t f_bsize; /* file system block size */ + libssh2_uint64_t f_frsize; /* fragment size */ + libssh2_uint64_t f_blocks; /* size of fs in f_frsize units */ + libssh2_uint64_t f_bfree; /* # free blocks */ + libssh2_uint64_t f_bavail; /* # free blocks for non-root */ + libssh2_uint64_t f_files; /* # inodes */ + libssh2_uint64_t f_ffree; /* # free inodes */ + libssh2_uint64_t f_favail; /* # free inodes for non-root */ + libssh2_uint64_t f_fsid; /* file system ID */ + libssh2_uint64_t f_flag; /* mount flags */ + libssh2_uint64_t f_namemax; /* maximum filename length */ +}; +.fi + +It is unspecified whether all members of the returned struct have meaningful +values on all file systems. + +The field \fIf_flag\fP is a bit mask. Bits are defined as follows: +.IP LIBSSH2_SFTP_ST_RDONLY +Read-only file system. +.IP LIBSSH2_SFTP_ST_NOSUID +Set-user-ID/set-group-ID bits are ignored by \fBexec\fP(3). +.SH RETURN VALUE +Returns 0 on success or negative on failure. If used in non-blocking mode, it +returns LIBSSH2_ERROR_EAGAIN when it would otherwise block. While +LIBSSH2_ERROR_EAGAIN is a negative number, it is not really a failure per se. +.SH ERRORS +\fILIBSSH2_ERROR_ALLOC\fP - An internal memory allocation call failed. + +\fILIBSSH2_ERROR_SOCKET_SEND\fP - Unable to send data on socket. + +\fILIBSSH2_ERROR_SOCKET_TIMEOUT\fP - + +\fILIBSSH2_ERROR_SFTP_PROTOCOL\fP - An invalid SFTP protocol response was +received on the socket, or an SFTP operation caused an errorcode to be returned +by the server. +.SH AVAILABILITY +Added in libssh2 1.2.6 +.SH SEE ALSO +.BR libssh2_sftp_open_ex(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_sftp_symlink.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_sftp_symlink.3 new file mode 100644 index 0000000000000000000000000000000000000000..8fb70df078d1bdcde5222993e879413f65b250ae --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_sftp_symlink.3 @@ -0,0 +1,23 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_sftp_symlink 3 "20 Feb 2010" "libssh2 1.2.4" "libssh2" +.SH NAME +libssh2_sftp_symlink - convenience macro for \fIlibssh2_sftp_symlink_ex(3)\fP +.SH SYNOPSIS +.nf +#include +#include + +#define libssh2_sftp_symlink(sftp, orig, linkpath) \\ + libssh2_sftp_symlink_ex((sftp), (orig), strlen(orig), (linkpath), \\ + strlen(linkpath), LIBSSH2_SFTP_SYMLINK) +.fi +.SH DESCRIPTION +This is a macro defined in a public libssh2 header file that is using the +underlying function \fIlibssh2_sftp_symlink_ex(3)\fP. +.SH RETURN VALUE +See \fIlibssh2_sftp_symlink_ex(3)\fP +.SH ERRORS +See \fIlibssh2_sftp_symlink_ex(3)\fP +.SH SEE ALSO +.BR libssh2_sftp_symlink_ex(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_sftp_symlink_ex.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_sftp_symlink_ex.3 new file mode 100644 index 0000000000000000000000000000000000000000..e4dad4bedb9986e7672426f17dbf101ee049864a --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_sftp_symlink_ex.3 @@ -0,0 +1,81 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_sftp_symlink_ex 3 "1 Jun 2007" "libssh2 0.15" "libssh2" +.SH NAME +libssh2_sftp_symlink_ex - read or set a symbolic link +.SH SYNOPSIS +.nf +#include +#include + +int +libssh2_sftp_symlink_ex(LIBSSH2_SFTP *sftp, const char *path, + unsigned int path_len, char *target, + unsigned int target_len, int link_type); +.fi +.SH DESCRIPTION +Create a symlink or read out symlink information from the remote side. + +\fIsftp\fP - SFTP instance as returned by +.BR libssh2_sftp_init(3) + +\fIpath\fP - Remote filesystem object to create a symlink from or resolve. + +\fIpath_len\fP - Length of the name of the remote filesystem object to +create a symlink from or resolve. + +\fItarget\fP - a pointer to a buffer. The buffer has different uses depending +what the \fIlink_type\fP argument is set to. +.br +\fBLIBSSH2_SFTP_SYMLINK\fP: Remote filesystem object to link to. +.br +\fBLIBSSH2_SFTP_READLINK\fP: Pre-allocated buffer to resolve symlink target +into. +.br +\fBLIBSSH2_SFTP_REALPATH\fP: Pre-allocated buffer to resolve realpath target +into. + +\fItarget_len\fP - Length of the name of the remote filesystem target object. + +\fIlink_type\fP - One of the three previously mentioned constants which +determines the resulting behavior of this function. + +These are convenience macros: + +.BR libssh2_sftp_symlink(3) +: Create a symbolic link between two filesystem objects. +.br +.BR libssh2_sftp_readlink(3) +: Resolve a symbolic link filesystem object to its next target. +.br +.BR libssh2_sftp_realpath(3) +: Resolve a complex, relative, or symlinked filepath to its effective target. +.SH RETURN VALUE +When using LIBSSH2_SFTP_SYMLINK, this function returns 0 on success or negative +on failure. + +When using LIBSSH2_SFTP_READLINK or LIBSSH2_SFTP_REALPATH, it returns the +number of bytes it copied to the target buffer (not including the terminating +zero) or negative on failure. + +It returns LIBSSH2_ERROR_EAGAIN when it would otherwise block. While +LIBSSH2_ERROR_EAGAIN is a negative number, it is not really a failure per se. + +From 1.2.8, LIBSSH2_ERROR_BUFFER_TOO_SMALL is returned if the given 'target' +buffer is too small to fit the requested object name. +.SH BUG +Passing in a too small buffer when receiving data only results in libssh2 +1.2.7 or earlier to not copy the entire data amount, and it is not possible +for the application to tell when it happens! +.SH ERRORS +\fILIBSSH2_ERROR_ALLOC\fP - An internal memory allocation call failed. + +\fILIBSSH2_ERROR_SOCKET_SEND\fP - Unable to send data on socket. + +\fILIBSSH2_ERROR_SOCKET_TIMEOUT\fP - + +\fILIBSSH2_ERROR_SFTP_PROTOCOL\fP - An invalid SFTP protocol response was +received on the socket, or an SFTP operation caused an errorcode to +be returned by the server. +.SH SEE ALSO +.BR libssh2_sftp_init(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_sftp_tell.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_sftp_tell.3 new file mode 100644 index 0000000000000000000000000000000000000000..88b65370de95777ac6c60fc408f36a7fb56d5bc9 --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_sftp_tell.3 @@ -0,0 +1,23 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_sftp_tell 3 "1 Jun 2007" "libssh2 0.15" "libssh2" +.SH NAME +libssh2_sftp_tell - get the current read/write position indicator for a file +.SH SYNOPSIS +.nf +#include +#include + +size_t +libssh2_sftp_tell(LIBSSH2_SFTP_HANDLE *handle); +.fi +.SH DESCRIPTION +\fIhandle\fP - SFTP File Handle as returned by \fBlibssh2_sftp_open_ex(3)\fP. + +Returns the current offset of the file handle's internal pointer. Note that +this is now deprecated. Use the newer \fBlibssh2_sftp_tell64(3)\fP instead! +.SH RETURN VALUE +Current offset from beginning of file in bytes. +.SH SEE ALSO +.BR libssh2_sftp_open_ex(3), +.BR libssh2_sftp_tell64(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_sftp_tell64.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_sftp_tell64.3 new file mode 100644 index 0000000000000000000000000000000000000000..013e7dad2880681d2fa582f9fa359fd3d867851e --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_sftp_tell64.3 @@ -0,0 +1,24 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_sftp_tell64 3 "22 Dec 2008" "libssh2 1.0" "libssh2" +.SH NAME +libssh2_sftp_tell64 - get the current read/write position indicator for a file +.SH SYNOPSIS +.nf +#include +#include + +libssh2_uint64_t +libssh2_sftp_tell64(LIBSSH2_SFTP_HANDLE *handle); +.fi +.SH DESCRIPTION +\fIhandle\fP - SFTP File Handle as returned by \fBlibssh2_sftp_open_ex(3)\fP + +Identify the current offset of the file handle's internal pointer. +.SH RETURN VALUE +Current offset from beginning of file in bytes. +.SH AVAILABILITY +Added in libssh2 1.0 +.SH SEE ALSO +.BR libssh2_sftp_open_ex(3), +.BR libssh2_sftp_tell(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_sftp_unlink.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_sftp_unlink.3 new file mode 100644 index 0000000000000000000000000000000000000000..da4874c1079de88a8ef36e2da08cfb6f2da5e8f6 --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_sftp_unlink.3 @@ -0,0 +1,22 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_sftp_unlink 3 "20 Feb 2010" "libssh2 1.2.4" "libssh2" +.SH NAME +libssh2_sftp_unlink - convenience macro for \fIlibssh2_sftp_unlink_ex(3)\fP calls +.SH SYNOPSIS +.nf +#include +#include + +int +libssh2_sftp_unlink(LIBSSH2_SFTP *sftp, const char *filename); +.fi +.SH DESCRIPTION +This is a macro defined in a public libssh2 header file that is using the +underlying function \fIlibssh2_sftp_unlink_ex(3)\fP. +.SH RETURN VALUE +See \fIlibssh2_sftp_unlink_ex(3)\fP +.SH ERRORS +See \fIlibssh2_sftp_unlink_ex(3)\fP +.SH SEE ALSO +.BR libssh2_sftp_unlink_ex(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_sftp_unlink_ex.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_sftp_unlink_ex.3 new file mode 100644 index 0000000000000000000000000000000000000000..e92df5f6a73040d6bafbeaed7da5dfe664c28a5b --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_sftp_unlink_ex.3 @@ -0,0 +1,42 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_sftp_unlink_ex 3 "1 Jun 2007" "libssh2 0.15" "libssh2" +.SH NAME +libssh2_sftp_unlink_ex - unlink an SFTP file +.SH SYNOPSIS +.nf +#include +#include + +int +libssh2_sftp_unlink_ex(LIBSSH2_SFTP *sftp, const char *filename, unsigned int filename_len); + +int +libssh2_sftp_unlink(LIBSSH2_SFTP *sftp, const char *filename); +.fi +.SH DESCRIPTION +\fIsftp\fP - SFTP instance as returned by +.BR libssh2_sftp_init(3) + +\fIfilename\fP - Path and name of the existing filesystem entry + +\fIfilename_len\fP - Length of the path and name of the existing +filesystem entry + +Unlink (delete) a file from the remote filesystem. +.SH RETURN VALUE +Return 0 on success or negative on failure. It returns +LIBSSH2_ERROR_EAGAIN when it would otherwise block. While +LIBSSH2_ERROR_EAGAIN is a negative number, it is not really a failure per se. +.SH ERRORS +\fILIBSSH2_ERROR_ALLOC\fP - An internal memory allocation call failed. + +\fILIBSSH2_ERROR_SOCKET_SEND\fP - Unable to send data on socket. + +\fILIBSSH2_ERROR_SOCKET_TIMEOUT\fP - + +\fILIBSSH2_ERROR_SFTP_PROTOCOL\fP - An invalid SFTP protocol response was +received on the socket, or an SFTP operation caused an errorcode to +be returned by the server. +.SH SEE ALSO +.BR libssh2_sftp_init(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_sftp_write.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_sftp_write.3 new file mode 100644 index 0000000000000000000000000000000000000000..818022164c0c5dfb2ead12787d54c66fa495f57c --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_sftp_write.3 @@ -0,0 +1,73 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_sftp_write 3 "1 Jun 2007" "libssh2 0.15" "libssh2" +.SH NAME +libssh2_sftp_write - write SFTP data +.SH SYNOPSIS +.nf +#include +#include + +ssize_t +libssh2_sftp_write(LIBSSH2_SFTP_HANDLE *handle, + const char *buffer, + size_t count); +.fi +.SH DESCRIPTION +\fBlibssh2_sftp_write(3)\fP writes a block of data to the SFTP server. This +method is modeled after the POSIX write() function and uses the same calling +semantics. + +\fIhandle\fP - SFTP file handle as returned by \fIlibssh2_sftp_open_ex(3)\fP. + +\fIbuffer\fP - points to the data to send off. + +\fIcount\fP - Number of bytes from 'buffer' to write. Note that it may not be +possible to write all bytes as requested. + +\fIlibssh2_sftp_handle(3)\fP will use as much as possible of the buffer and +put it into a single SFTP protocol packet. This means that to get maximum +performance when sending larger files, you should try to always pass in at +least 32K of data to this function. +.SH WRITE AHEAD +Starting in libssh2 version 1.2.8, the default behavior of libssh2 is to +create several smaller outgoing packets for all data you pass to this function +and it will return a positive number as soon as the first packet is +acknowledged from the server. + +This has the effect that sometimes more data has been sent off but is not acked +yet when this function returns, and when this function is subsequently called +again to write more data, libssh2 will immediately figure out that the data is +already received remotely. + +In most normal situation this should not cause any problems, but it should be +noted that if you have once called libssh2_sftp_write() with data and it returns +short, you MUST still assume that the rest of the data might have been cached so +you need to make sure you do not alter that data and think that the version you +have in your next function invoke will be detected or used. + +The reason for this funny behavior is that SFTP can only send 32K data in each +packet and it gets all packets acked individually. This means we cannot use a +simple serial approach if we want to reach high performance even on high +latency connections. And we want that. +.SH RETURN VALUE +Actual number of bytes written or negative on failure. + +If used in non-blocking mode, it returns LIBSSH2_ERROR_EAGAIN when it would +otherwise block. While LIBSSH2_ERROR_EAGAIN is a negative number, it is not +really a failure per se. + +If this function returns 0 (zero) it should not be considered an error, but +that there was no error but yet no payload data got sent to the other end. +.SH ERRORS +\fILIBSSH2_ERROR_ALLOC\fP - An internal memory allocation call failed. + +\fILIBSSH2_ERROR_SOCKET_SEND\fP - Unable to send data on socket. + +\fILIBSSH2_ERROR_SOCKET_TIMEOUT\fP - + +\fILIBSSH2_ERROR_SFTP_PROTOCOL\fP - An invalid SFTP protocol response was +received on the socket, or an SFTP operation caused an errorcode to +be returned by the server. +.SH SEE ALSO +.BR libssh2_sftp_open_ex(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_sign_sk.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_sign_sk.3 new file mode 100644 index 0000000000000000000000000000000000000000..57b742b1196a05e65a50873a20a6df98b6648535 --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_sign_sk.3 @@ -0,0 +1,87 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_sign_sk 3 "1 Jun 2022" "libssh2 1.10.0" "libssh2" +.SH NAME +libssh2_sign_sk - Create a signature from a FIDO2 authenticator. +.SH SYNOPSIS +.nf +#include + +int +libssh2_sign_sk(LIBSSH2_SESSION *session, + unsigned char **sig, + size_t *sig_len, + const unsigned char *data, + size_t data_len, + void **abstract); + +typedef struct _LIBSSH2_PRIVKEY_SK { + int algorithm; + uint8_t flags; + const char *application; + const unsigned char *key_handle; + size_t handle_len; + LIBSSH2_USERAUTH_SK_SIGN_FUNC((*sign_callback)); + void **orig_abstract; +} LIBSSH2_PRIVKEY_SK; +.fi +.SH DESCRIPTION +\fIsession\fP - Session instance as returned by +.BR libssh2_session_init_ex(3) + +\fIsig\fP - A pointer to a buffer in which to place the signature. The caller +is responsible for freeing the signature with LIBSSH2_FREE. + +\fIsig_len\fP - A pointer to the length of the sig parameter. + +\fIdata\fP - The data to sign. + +\fIdata_len\fP - The length of the data parameter. + +\fIabstract\fP - A pointer to a pointer to a LIBSSH2_PRIVKEY_SK. See +description below. + +Create a signature from a FIDO2 authenticator, using either the +sk-ssh-ed25519@openssh.com or sk-ecdsa-sha2-nistp256@openssh.com key +exchange algorithms. + +The abstract parameter is a pointer to a pointer due to the internal workings +of libssh2. The LIBSSH2_PRIVKEY_SK must be completely filled out, and the +caller is responsible for all memory management of its fields. + +\fIalgorithm\fP - The signing algorithm to use. Possible values are +LIBSSH2_HOSTKEY_TYPE_ED25519 and LIBSSH2_HOSTKEY_TYPE_ECDSA_256. + +\fIflags\fP - A bitmask specifying options for the authenticator. When +LIBSSH2_SK_PRESENCE_REQUIRED is set, the authenticator requires a touch. When +LIBSSH2_SK_VERIFICATION_REQUIRED is set, the authenticator requires a PIN. +Many servers and authenticators do not work properly when +LIBSSH2_SK_PRESENCE_REQUIRED is not set. + +\fIapplication\fP - A user-defined string to use as the RP name for the +authenticator. Usually "ssh:". + +\fIkey_handle\fP - The key handle to use for the authenticator's allow list. + +\fIhandle_len\fP - The length of the key_handle parameter. + +\fIabstract\fP - User-defined data. When a PIN is required, use this to pass in +the PIN, or a function pointer to retrieve the PIN. + +\fIkey_handle\fP The decoded key handle from the private key file. + +\fIhandle_len\fP The length of the key_handle parameter. + +\fIsign_callback\fP - Responsible for communicating with the hardware +authenticator to generate a signature. On success, the signature information +must be placed in the `\fIsig_info\fP sig_info parameter and the callback must +return 0. On failure, it should return a negative number. See +.BR libssh2_userauth_publickey_sk(3) + for more information. + +\fIorig_abstract\fP - User-defined data. When a PIN is required, use this to +pass in the PIN, or a function pointer to retrieve the PIN. +.SH RETURN VALUE +Return 0 on success or negative on failure. +.SH SEE ALSO +.BR libssh2_userauth_publickey_sk(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_trace.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_trace.3 new file mode 100644 index 0000000000000000000000000000000000000000..c3be38770252b6ec0b918e3e86e309c57391ca76 --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_trace.3 @@ -0,0 +1,39 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_trace 3 "26 Dec 2008" "libssh2 1.0" "libssh2" +.SH NAME +libssh2_trace - enable debug info from inside libssh2 +.SH SYNOPSIS +.nf +#include + +void +libssh2_trace(LIBSSH2_SESSION *session, int bitmask); +.fi +.SH DESCRIPTION +This is a function present in the library that can be used to get debug info +from within libssh2 when it is running. Helpful when trying to trace or debug +behaviors. Note that this function has no effect unless libssh2 was built to +support tracing! It is usually disabled in release builds. + +\fBbitmask\fP can be set to the logical OR of none, one or more of these: +.RS +.IP LIBSSH2_TRACE_SOCKET +Socket low-level debugging +.IP LIBSSH2_TRACE_TRANS +Transport layer debugging +.IP LIBSSH2_TRACE_KEX +Key exchange debugging +.IP LIBSSH2_TRACE_AUTH +Authentication debugging +.IP LIBSSH2_TRACE_CONN +Connection layer debugging +.IP LIBSSH2_TRACE_SCP +SCP debugging +.IP LIBSSH2_TRACE_SFTP +SFTP debugging +.IP LIBSSH2_TRACE_ERROR +Error debugging +.IP LIBSSH2_TRACE_PUBLICKEY +Public Key debugging +.RE diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_trace_sethandler.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_trace_sethandler.3 new file mode 100644 index 0000000000000000000000000000000000000000..453d468a0d40712a4188a3fdb257d922d1dfe757 --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_trace_sethandler.3 @@ -0,0 +1,32 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_trace_sethandler 3 "15 Jan 2010" "libssh2" "libssh2" +.SH NAME +libssh2_trace_sethandler - set a trace output handler +.SH SYNOPSIS +.nf +#include + +typedef void (*libssh2_trace_handler_func)(LIBSSH2_SESSION *session, + void *context, + const char *data, + size_t length); + +int +libssh2_trace_sethandler(LIBSSH2_SESSION *session, + void *context, + libssh2_trace_handler_func callback); +.fi +.SH DESCRIPTION +libssh2_trace_sethandler installs a trace output handler for your application. +By default, when tracing has been switched on via a call to libssh2_trace(), +all output is written to stderr. By calling this method and passing a +function pointer that matches the libssh2_trace_handler_func prototype, +libssh2 will call back as it generates trace output. This can be used to +capture the trace output and put it into a log file or diagnostic window. +This function has no effect unless libssh2 was built to support this option, +and a typical "release build" might not. + +\fBcontext\fP can be used to pass arbitrary user defined data back into the callback when invoked. +.SH AVAILABILITY +Added in libssh2 version 1.2.3 diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_userauth_authenticated.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_userauth_authenticated.3 new file mode 100644 index 0000000000000000000000000000000000000000..11568c46ad5bcff24a43a41deec0468bb4113a74 --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_userauth_authenticated.3 @@ -0,0 +1,21 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_userauth_authenticated 3 "1 Jun 2007" "libssh2 0.15" "libssh2" +.SH NAME +libssh2_userauth_authenticated - return authentication status +.SH SYNOPSIS +.nf +#include + +int +libssh2_userauth_authenticated(LIBSSH2_SESSION *session); +.fi +.SH DESCRIPTION +\fIsession\fP - Session instance as returned by +.BR libssh2_session_init_ex(3) + +Indicates whether or not the named session has been successfully authenticated. +.SH RETURN VALUE +Returns 1 if authenticated and 0 if not. +.SH SEE ALSO +.BR libssh2_session_init_ex(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_userauth_banner.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_userauth_banner.3 new file mode 100644 index 0000000000000000000000000000000000000000..1369fa5f2e8b217e618119c73bc408bf86fb3f49 --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_userauth_banner.3 @@ -0,0 +1,33 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_userauth_banner 3 "1 Jun 2021" "libssh2 1.9.0" "libssh2" +.SH NAME +libssh2_userauth_banner - get the server's userauth banner message +.SH SYNOPSIS +.nf +#include + +int +libssh2_userauth_banner(LIBSSH2_SESSION *session, char **banner); +.fi +.SH DESCRIPTION +\fIsession\fP - Session instance as returned by +.BR libssh2_session_init_ex(3) + +\fIbanner\fP - Should point to a pointer that gets filled with banner message. + +After an authentication has been attempted, such as a +\fBSSH_USERAUTH_NONE\fP request sent by +.BR libssh2_userauth_list(3) , +this function can be called to retrieve the userauth banner sent by +the server. If no such banner is sent, or if an authentication has not +yet been attempted, returns LIBSSH2_ERROR_MISSING_USERAUTH_BANNER. +.SH RETURN VALUE +On success returns 0 and an UTF-8 NUL-terminated string is stored in the +\fIbanner\fP. This string is internally managed by libssh2 and will be +deallocated upon session termination. +On failure returns +LIBSSH2_ERROR_MISSING_USERAUTH_BANNER. +.SH SEE ALSO +.BR libssh2_session_init_ex(3), +.BR libssh2_userauth_list(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_userauth_hostbased_fromfile.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_userauth_hostbased_fromfile.3 new file mode 100644 index 0000000000000000000000000000000000000000..e29880f0de114438ff67cf6c3286d17615a943cb --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_userauth_hostbased_fromfile.3 @@ -0,0 +1,26 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_userauth_hostbased_fromfile 3 "20 Feb 2010" "libssh2 1.2.4" "libssh2" +.SH NAME +libssh2_userauth_hostbased_fromfile - convenience macro for \fIlibssh2_userauth_hostbased_fromfile_ex(3)\fP calls +.SH SYNOPSIS +.nf +#include + +int +libssh2_userauth_hostbased_fromfile(LIBSSH2_SESSION *session, + const char *username, + const char *publickey, + const char *privatekey, + const char *passphrase, + const char *hostname); +.fi +.SH DESCRIPTION +This is a macro defined in a public libssh2 header file that is using the +underlying function \fIlibssh2_userauth_hostbased_fromfile_ex(3)\fP. +.SH RETURN VALUE +See \fIlibssh2_userauth_hostbased_fromfile_ex(3)\fP +.SH ERRORS +See \fIlibssh2_userauth_hostbased_fromfile_ex(3)\fP +.SH SEE ALSO +.BR libssh2_userauth_hostbased_fromfile_ex(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_userauth_hostbased_fromfile_ex.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_userauth_hostbased_fromfile_ex.3 new file mode 100644 index 0000000000000000000000000000000000000000..c37f5561995d026a800ec126f950d006c53ab05b --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_userauth_hostbased_fromfile_ex.3 @@ -0,0 +1,12 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_userauth_hostbased_fromfile_ex 3 "1 Jun 2007" "libssh2 0.15" "libssh2" +.SH NAME +libssh2_userauth_hostbased_fromfile_ex - TODO +.SH SYNOPSIS +.nf +.fi +.SH DESCRIPTION +.SH RETURN VALUE +.SH ERRORS +.SH SEE ALSO diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_userauth_keyboard_interactive.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_userauth_keyboard_interactive.3 new file mode 100644 index 0000000000000000000000000000000000000000..902cc5d24397f9eeae433846473f49bf77212c2c --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_userauth_keyboard_interactive.3 @@ -0,0 +1,23 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_userauth_keyboard_interactive 3 "20 Feb 2010" "libssh2 1.2.4" "libssh2" +.SH NAME +libssh2_userauth_keyboard_interactive - convenience macro for \fIlibssh2_userauth_keyboard_interactive_ex(3)\fP calls +.SH SYNOPSIS +.nf +#include + +int +libssh2_userauth_keyboard_interactive(LIBSSH2_SESSION* session, + const char *username, + LIBSSH2_USERAUTH_KBDINT_RESPONSE_FUNC((*response_callback))); +.fi +.SH DESCRIPTION +This is a macro defined in a public libssh2 header file that is using the +underlying function \fIlibssh2_userauth_keyboard_interactive_ex(3)\fP. +.SH RETURN VALUE +See \fIlibssh2_userauth_keyboard_interactive_ex(3)\fP +.SH ERRORS +See \fIlibssh2_userauth_keyboard_interactive_ex(3)\fP +.SH SEE ALSO +.BR libssh2_userauth_keyboard_interactive_ex(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_userauth_keyboard_interactive_ex.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_userauth_keyboard_interactive_ex.3 new file mode 100644 index 0000000000000000000000000000000000000000..91b0e72ea2e75e923685bef30d0f8a4acd45ee6f --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_userauth_keyboard_interactive_ex.3 @@ -0,0 +1,61 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_userauth_keyboard_interactive_ex 3 "8 Mar 2008" "libssh2 0.19" "libssh2" +.SH NAME +libssh2_userauth_keyboard_interactive_ex - authenticate a session using +keyboard-interactive authentication +.SH SYNOPSIS +.nf +#include + +int +libssh2_userauth_keyboard_interactive_ex(LIBSSH2_SESSION *session, + const char *username, + unsigned int username_len, + LIBSSH2_USERAUTH_KBDINT_RESPONSE_FUNC(*response_callback)); +.fi +.SH DESCRIPTION +\fIsession\fP - Session instance as returned by +\fIlibssh2_session_init_ex(3)\fP. + +\fIusername\fP - Name of user to attempt keyboard-interactive authentication +for. + +\fIusername_len\fP - Length of username parameter. + +\fIresponse_callback\fP - As authentication proceeds, the host issues several +(1 or more) challenges and requires responses. This callback will be called at +this moment. The callback is responsible to obtain responses for the +challenges, fill the provided data structure and then return +control. Responses will be sent to the host. String values will be free(3)ed +by the library. The callback prototype must match this: + +.nf +void response(const char *name, + int name_len, const char *instruction, + int instruction_len, + int num_prompts, + const LIBSSH2_USERAUTH_KBDINT_PROMPT *prompts, + LIBSSH2_USERAUTH_KBDINT_RESPONSE *responses, + void **abstract); +.fi + +Attempts keyboard-interactive (challenge/response) authentication. + +Note that many SSH servers will always issue a single "password" challenge, +requesting actual password as response, but it is not required by the +protocol, and various authentication schemes, such as smartcard authentication +may use keyboard-interactive authentication type too. +.SH RETURN VALUE +Return 0 on success or negative on failure. It returns LIBSSH2_ERROR_EAGAIN +when it would otherwise block. While LIBSSH2_ERROR_EAGAIN is a negative +number, it is not really a failure per se. +.SH ERRORS +\fILIBSSH2_ERROR_ALLOC\fP - An internal memory allocation call failed. + +\fILIBSSH2_ERROR_SOCKET_SEND\fP - Unable to send data on socket. + +\fILIBSSH2_ERROR_AUTHENTICATION_FAILED\fP - failed, invalid username/password +or public/private key. +.SH SEE ALSO +.BR libssh2_session_init_ex(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_userauth_list.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_userauth_list.3 new file mode 100644 index 0000000000000000000000000000000000000000..e4d23f8af827617c0ab4d7dbc416367c605e996f --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_userauth_list.3 @@ -0,0 +1,43 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_userauth_list 3 "1 Jun 2007" "libssh2 0.15" "libssh2" +.SH NAME +libssh2_userauth_list - list supported authentication methods +.SH SYNOPSIS +.nf +#include + +char * +libssh2_userauth_list(LIBSSH2_SESSION *session, + const char *username, + unsigned int username_len); +.fi +.SH DESCRIPTION +\fIsession\fP - Session instance as returned by +.BR libssh2_session_init_ex(3) + +\fIusername\fP - Username which will be used while authenticating. Note that +most server implementations do not permit attempting authentication with +different usernames between requests. Therefore this must be the same username +you will use on later userauth calls. + +\fIusername_len\fP - Length of username parameter. + +Send a \fBSSH_USERAUTH_NONE\fP request to the remote host. Unless the remote +host is configured to accept none as a viable authentication scheme +(unlikely), it will return \fBSSH_USERAUTH_FAILURE\fP along with a listing of +what authentication schemes it does support. In the unlikely event that none +authentication succeeds, this method with return NULL. This case may be +distinguished from a failing case by examining +\fIlibssh2_userauth_authenticated(3)\fP. +.SH RETURN VALUE +On success a comma delimited list of supported authentication schemes. This +list is internally managed by libssh2. On failure returns NULL. +.SH ERRORS +\fILIBSSH2_ERROR_ALLOC\fP - An internal memory allocation call failed. + +\fILIBSSH2_ERROR_SOCKET_SEND\fP - Unable to send data on socket. + +\fILIBSSH2_ERROR_EAGAIN\fP - Marked for non-blocking I/O but the call +.SH SEE ALSO +.BR libssh2_session_init_ex(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_userauth_password.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_userauth_password.3 new file mode 100644 index 0000000000000000000000000000000000000000..61fcdbb19b8199898365f232010d80f27c14352a --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_userauth_password.3 @@ -0,0 +1,23 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_userauth_password 3 "20 Feb 2010" "libssh2 1.2.4" "libssh2" +.SH NAME +libssh2_userauth_password - convenience macro for \fIlibssh2_userauth_password_ex(3)\fP calls +.SH SYNOPSIS +.nf +#include + +int +libssh2_userauth_password(LIBSSH2_SESSION *session, + const char *username, + const char *password); +.fi +.SH DESCRIPTION +This is a macro defined in a public libssh2 header file that is using the +underlying function \fIlibssh2_userauth_password_ex(3)\fP. +.SH RETURN VALUE +See \fIlibssh2_userauth_password_ex(3)\fP +.SH ERRORS +See \fIlibssh2_userauth_password_ex(3)\fP +.SH SEE ALSO +.BR libssh2_userauth_password_ex(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_userauth_password_ex.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_userauth_password_ex.3 new file mode 100644 index 0000000000000000000000000000000000000000..e2bd20f29ff46fd0e0e5d92b204734c60eaf5e69 --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_userauth_password_ex.3 @@ -0,0 +1,60 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_userauth_password_ex 3 "1 Jun 2007" "libssh2 0.15" "libssh2" +.SH NAME +libssh2_userauth_password_ex - authenticate a session with username and password +.SH SYNOPSIS +.nf +#include + +int +libssh2_userauth_password_ex(LIBSSH2_SESSION *session, + const char *username, + unsigned int username_len, + const char *password, + unsigned int password_len, + LIBSSH2_PASSWD_CHANGEREQ_FUNC((*passwd_change_cb))); + +#define libssh2_userauth_password(session, username, password) \\ + libssh2_userauth_password_ex((session), (username), \\ + strlen(username), \\ + (password), strlen(password), NULL) +.fi +.SH DESCRIPTION +\fIsession\fP - Session instance as returned by +.BR libssh2_session_init_ex(3) + +\fIusername\fP - Name of user to attempt plain password authentication for. + +\fIusername_len\fP - Length of username parameter. + +\fIpassword\fP - Password to use for authenticating username. + +\fIpassword_len\fP - Length of password parameter. + +\fIpasswd_change_cb\fP - If the host accepts authentication but +requests that the password be changed, this callback will be issued. +If no callback is defined, but server required password change, +authentication will fail. + +Attempt basic password authentication. Note that many SSH servers +which appear to support ordinary password authentication actually have +it disabled and use Keyboard Interactive authentication (routed via +PAM or another authentication backed) instead. +.SH RETURN VALUE +Return 0 on success or negative on failure. It returns +LIBSSH2_ERROR_EAGAIN when it would otherwise block. While +LIBSSH2_ERROR_EAGAIN is a negative number, it is not really a failure per se. +.SH ERRORS +Some of the errors this function may return include: + +\fILIBSSH2_ERROR_ALLOC\fP - An internal memory allocation call failed. + +\fILIBSSH2_ERROR_SOCKET_SEND\fP - Unable to send data on socket. + +\fILIBSSH2_ERROR_PASSWORD_EXPIRED\fP - + +\fILIBSSH2_ERROR_AUTHENTICATION_FAILED\fP - failed, invalid username/password +or public/private key. +.SH SEE ALSO +.BR libssh2_session_init_ex(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_userauth_publickey.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_userauth_publickey.3 new file mode 100644 index 0000000000000000000000000000000000000000..ea282b199e06dc155a3487a2caa76f643e2ba6b5 --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_userauth_publickey.3 @@ -0,0 +1,31 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_userauth_publickey 3 "1 Jun 2007" "libssh2 0.15" "libssh2" +.SH NAME +libssh2_userauth_publickey - authenticate using a callback function +.SH SYNOPSIS +.nf +#include + +int +libssh2_userauth_publickey(LIBSSH2_SESSION *session, + const char *user, + const unsigned char *pubkeydata, + size_t pubkeydata_len, + sign_callback, + void **abstract); +.fi +.SH DESCRIPTION +Authenticate with the \fIsign_callback\fP callback that matches the prototype +below +.SH CALLBACK +.nf +int name(LIBSSH2_SESSION *session, unsigned char **sig, size_t *sig_len, + const unsigned char *data, size_t data_len, void **abstract); +.fi + +This function gets called... +.SH RETURN VALUE +Return 0 on success or negative on failure. +.SH SEE ALSO +.BR libssh2_userauth_publickey_fromfile_ex(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_userauth_publickey_fromfile.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_userauth_publickey_fromfile.3 new file mode 100644 index 0000000000000000000000000000000000000000..7614c9e6012bc82a307311b73ee0ab4b135a4ab9 --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_userauth_publickey_fromfile.3 @@ -0,0 +1,25 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_userauth_publickey_fromfile 3 "20 Feb 2010" "libssh2 1.2.4" "libssh2" +.SH NAME +libssh2_userauth_publickey_fromfile - convenience macro for \fIlibssh2_userauth_publickey_fromfile_ex(3)\fP calls +.SH SYNOPSIS +.nf +#include + +int +libssh2_userauth_publickey_fromfile(LIBSSH2_SESSION *session, + const char *username, + const char *publickey, + const char *privatekey, + const char *passphrase); +.fi +.SH DESCRIPTION +This is a macro defined in a public libssh2 header file that is using the +underlying function \fIlibssh2_userauth_publickey_fromfile_ex(3)\fP. +.SH RETURN VALUE +See \fIlibssh2_userauth_publickey_fromfile_ex(3)\fP +.SH ERRORS +See \fIlibssh2_userauth_publickey_fromfile_ex(3)\fP +.SH SEE ALSO +.BR libssh2_userauth_publickey_fromfile_ex(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_userauth_publickey_fromfile_ex.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_userauth_publickey_fromfile_ex.3 new file mode 100644 index 0000000000000000000000000000000000000000..dcd5db369f8ab02c46fd8b19fff122bc83ecb565 --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_userauth_publickey_fromfile_ex.3 @@ -0,0 +1,57 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_userauth_publickey_fromfile_ex 3 "1 Jun 2007" "libssh2 0.15" "libssh2" +.SH NAME +libssh2_userauth_publickey_fromfile_ex - authenticate a session with a public key, read from a file +.SH SYNOPSIS +.nf +#include + +int +libssh2_userauth_publickey_fromfile_ex(LIBSSH2_SESSION *session, + const char *username, + unsigned int username_len, + const char *publickey, + const char *privatekey, + const char *passphrase); +.fi +.SH DESCRIPTION +\fIsession\fP - Session instance as returned by +\fBlibssh2_session_init_ex(3)\fP + +\fIusername\fP - Pointer to user name to authenticate as. + +\fIusername_len\fP - Length of \fIusername\fP. + +\fIpublickey\fP - Path name of the public key file. +(e.g. /etc/ssh/hostkey.pub). If libssh2 is built against OpenSSL, this option +can be set to NULL. + +\fIprivatekey\fP - Path name of the private key file. (e.g. /etc/ssh/hostkey) + +\fIpassphrase\fP - Passphrase to use when decoding \fIprivatekey\fP. + +Attempt public key authentication using either a public key file or a PEM +encoded private key file stored on disk. When providing a private key, the +public key is automatically extracted from it. When providing both, the +passed public key takes precedence. +.SH RETURN VALUE +Return 0 on success or negative on failure. It returns +LIBSSH2_ERROR_EAGAIN when it would otherwise block. While +LIBSSH2_ERROR_EAGAIN is a negative number, it is not really a failure per se. +.SH ERRORS +\fILIBSSH2_ERROR_FILE\fP - An issue opening, reading or parsing the disk file. + +\fILIBSSH2_ERROR_ALLOC\fP - An internal memory allocation call failed. + +\fILIBSSH2_ERROR_SOCKET_SEND\fP - Unable to send data on socket. + +\fILIBSSH2_ERROR_SOCKET_TIMEOUT\fP - + +\fILIBSSH2_ERROR_PUBLICKEY_UNVERIFIED\fP - The username/public key +combination was invalid. + +\fILIBSSH2_ERROR_AUTHENTICATION_FAILED\fP - Authentication using the supplied +public key was not accepted. +.SH SEE ALSO +.BR libssh2_session_init_ex(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_userauth_publickey_frommemory.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_userauth_publickey_frommemory.3 new file mode 100644 index 0000000000000000000000000000000000000000..e6ced00316f5217706ec3ac844bf0847af67ebe4 --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_userauth_publickey_frommemory.3 @@ -0,0 +1,62 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_userauth_publickey_frommemory 3 "1 Sep 2014" "libssh2" "libssh2" +.SH NAME +libssh2_userauth_publickey_frommemory - authenticate a session with a public key, read from memory +.SH SYNOPSIS +.nf +#include + +int +libssh2_userauth_publickey_frommemory(LIBSSH2_SESSION *session, + const char *username, + size_t username_len, + const char *publickeydata, + size_t publickeydata_len, + const char *privatekeydata, + size_t privatekeydata_len, + const char *passphrase); +.fi +.SH DESCRIPTION +\fIsession\fP - Session instance as returned by +.BR libssh2_session_init_ex(3) + +\fIusername\fP - Remote user name to authenticate as. + +\fIusername_len\fP - Length of username. + +\fIpublickeydata\fP - Buffer containing the contents of a public key file. + +\fIpublickeydata_len\fP - Length of public key data. + +\fIprivatekeydata\fP - Buffer containing the contents of a private key file. + +\fIprivatekeydata_len\fP - Length of private key data. + +\fIpassphrase\fP - Passphrase to use when decoding private key file. + +Attempt public key authentication using either a public key file or a PEM +encoded private key file stored in memory. When providing a private key, the +public key is automatically extracted from it. When providing both, the +passed public key takes precedence. +.SH RETURN VALUE +Return 0 on success or negative on failure. It returns +LIBSSH2_ERROR_EAGAIN when it would otherwise block. While +LIBSSH2_ERROR_EAGAIN is a negative number, it is not really a failure per se. +.SH ERRORS +\fILIBSSH2_ERROR_ALLOC\fP - An internal memory allocation call failed. + +\fILIBSSH2_ERROR_SOCKET_SEND\fP - Unable to send data on socket. + +\fILIBSSH2_ERROR_SOCKET_TIMEOUT\fP - + +\fILIBSSH2_ERROR_PUBLICKEY_UNVERIFIED\fP - The username/public key +combination was invalid. + +\fILIBSSH2_ERROR_AUTHENTICATION_FAILED\fP - Authentication using the supplied +public key was not accepted. +.SH AVAILABILITY +libssh2_userauth_publickey_frommemory was added in libssh2 1.6.0 +Supported with OpenSSL, WinCNG, mbedTLS, OS/400 crypto backends. +.SH SEE ALSO +.BR libssh2_session_init_ex(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_userauth_publickey_sk.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_userauth_publickey_sk.3 new file mode 100644 index 0000000000000000000000000000000000000000..e2eff8f274398e4de8c4c626ef5fc508e37ca6bb --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_userauth_publickey_sk.3 @@ -0,0 +1,144 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_userauth_publickey_sk 3 "1 Jun 2022" "libssh2" "libssh2" +.SH NAME +libssh2_userauth_publickey_sk - authenticate a session with a FIDO2 authenticator +.SH SYNOPSIS +.nf +#include + +int +libssh2_userauth_publickey_sk(LIBSSH2_SESSION *session, + const char *username, + size_t username_len, + const unsigned char *publickeydata, + size_t publickeydata_len, + const char *privatekeydata, + size_t privatekeydata_len, + const char *passphrase, + LIBSSH2_USERAUTH_SK_SIGN_FUNC((*sign_callback)), + void **abstract); +.fi +.SH CALLBACK +.nf +#define LIBSSH2_SK_PRESENCE_REQUIRED 0x01 +#define LIBSSH2_SK_VERIFICATION_REQUIRED 0x04 + +typedef struct _LIBSSH2_SK_SIG_INFO { + uint8_t flags; + uint32_t counter; + unsigned char *sig_r; + size_t sig_r_len; + unsigned char *sig_s; + size_t sig_s_len; +} LIBSSH2_SK_SIG_INFO; + +int name(LIBSSH2_SESSION *session, LIBSSH2_SK_SIG_INFO *sig_info, + const unsigned char *data, size_t data_len, int algorithm, + uint8_t flags, const char *application, + const unsigned char *key_handle, size_t handle_len, + void **abstract); +.fi +.SH DESCRIPTION +\fIsession\fP - Session instance as returned by +.BR libssh2_session_init_ex(3) + +\fIusername\fP - Name of user to attempt authentication for. + +\fIusername_len\fP - Length of username parameter. + +\fIpublickeydata\fP - Buffer containing the contents of a public key file. If +NULL, the public key will be extracted from the privatekeydata. When using +certificate authentication, this buffer should contain the public certificate +data. + +\fIpublickeydata_len\fP - Length of public key data. + +\fIprivatekeydata\fP - Buffer containing the contents of a private key file. + +\fIprivatekeydata_len\fP - Length of private key data. + +\fIpassphrase\fP - Passphrase to use when decoding private key file. + +\fIsign_callback\fP - Callback to communicate with FIDO2 authenticator. + +\fIabstract\fP - User-provided data to pass to callback. + +Attempt FIDO2 authentication. using either the sk-ssh-ed25519@openssh.com or +sk-ecdsa-sha2-nistp256@openssh.com key exchange algorithms. + +This function is only supported when libssh2 is backed by OpenSSL. + +.SH CALLBACK DESCRIPTION +\fIsession\fP - Session instance as returned by +.BR libssh2_session_init_ex(3) + +\fIsig_info\fP - Filled in by the callback with the signature and accompanying +information from the authenticator. + +\fIdata\fP - The data to sign. + +\fIdata_len\fP - The length of the data parameter. + +\fIalgorithm\fP - The signing algorithm to use. Possible values are +LIBSSH2_HOSTKEY_TYPE_ED25519 and LIBSSH2_HOSTKEY_TYPE_ECDSA_256. + +\fIflags\fP - A bitmask specifying options for the authenticator. When +LIBSSH2_SK_PRESENCE_REQUIRED is set, the authenticator requires a touch. When +LIBSSH2_SK_VERIFICATION_REQUIRED is set, the authenticator requires a PIN. +Many servers and authenticators do not work properly when +LIBSSH2_SK_PRESENCE_REQUIRED is not set. + +\fIapplication\fP - A user-defined string to use as the RP name for the +authenticator. Usually "ssh:". + +\fIkey_handle\fP - The key handle to use for the authenticator's allow list. + +\fIhandle_len\fP - The length of the key_handle parameter. + +\fIabstract\fP - User-defined data. When a PIN is required, use this to pass in +the PIN, or a function pointer to retrieve the PIN. + +The \fIsign_callback\fP is responsible for communicating with the hardware +authenticator to generate a signature. On success, the signature information +must be placed in the `\fIsig_info\fP sig_info parameter and the callback must +return 0. On failure, it should return a negative number. + +The fields of the LIBSSH2_SK_SIG_INFO are as follows. + +\fIflags\fP - A bitmask specifying options for the authenticator. This should +be read from the authenticator and not merely copied from the flags parameter +to the callback. + +\fIcounter\fP - A value returned from the authenticator. + +\fIsig_r\fP - For Ed25519 signatures, this contains the entire signature, as +returned directly from the authenticator. For ECDSA signatures, this contains +the r component of the signature in a big-endian binary representation. For +both algorithms, use LIBSSH2_ALLOC to allocate memory. It will be freed by the +caller. + +\fIsig_r_len\fP - The length of the sig_r parameter. + +\fIsig_s\fP - For ECDSA signatures, this contains the s component of the +signature in a big-endian binary representation. Use LIBSSH2_ALLOC to allocate +memory. It will be freed by the caller. For Ed25519 signatures, set this to +NULL. + +\fIsig_s_len\fP - The length of the sig_s parameter. +.SH RETURN VALUE +Return 0 on success or negative on failure. It returns +LIBSSH2_ERROR_EAGAIN when it would otherwise block. While +LIBSSH2_ERROR_EAGAIN is a negative number, it is not really a failure per se. +.SH ERRORS +Some of the errors this function may return include: + +\fILIBSSH2_ERROR_ALLOC\fP - An internal memory allocation call failed. + +\fILIBSSH2_ERROR_SOCKET_SEND\fP - Unable to send data on socket. + +\fILIBSSH2_ERROR_AUTHENTICATION_FAILED\fP - failed, invalid username/key. +.SH AVAILABILITY +Added in libssh2 1.10.0 +.SH SEE ALSO +.BR libssh2_session_init_ex(3) diff --git a/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_version.3 b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_version.3 new file mode 100644 index 0000000000000000000000000000000000000000..3f36d717e846c9f37a0a874798467af106d61fd3 --- /dev/null +++ b/miniconda3/pkgs/libssh2-1.11.1-h251f7ec_0/share/man/man3/libssh2_version.3 @@ -0,0 +1,42 @@ +.\" Copyright (C) The libssh2 project and its contributors. +.\" SPDX-License-Identifier: BSD-3-Clause +.TH libssh2_version 3 "23 Feb 2009" "libssh2" "libssh2" +.SH NAME +libssh2_version - return the libssh2 version number +.SH SYNOPSIS +.nf +#include + +const char * +libssh2_version(int required_version); +.fi +.SH DESCRIPTION +If \fIrequired_version\fP is lower than or equal to the version number of the +libssh2 in use, the version number of libssh2 is returned as a pointer to a +zero terminated string. + +The \fIrequired_version\fP should be the version number as constructed by the +LIBSSH2_VERSION_NUM define in the libssh2.h public header file, which is a 24 +bit number in the 0xMMmmpp format. MM for major, mm for minor and pp for patch +number. +.SH RETURN VALUE +The version number of libssh2 is returned as a pointer to a zero terminated +string or NULL if the \fIrequired_version\fP is not fulfilled. +.SH EXAMPLE +To make sure you run with the correct libssh2 version: + +.nf +if(!libssh2_version(LIBSSH2_VERSION_NUM)) { + fprintf(stderr, \&"Runtime libssh2 version too old.\&"); + exit(1); +} +.fi + +Unconditionally get the version number: + +.nf +printf(\&"libssh2 version: %s\&", libssh2_version(0)); +.fi +.SH AVAILABILITY +This function was added in libssh2 1.1, in previous versions there way no way +to extract this info in run-time. diff --git a/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/about.json b/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/about.json new file mode 100644 index 0000000000000000000000000000000000000000..249861c56985c3f29e1d895bf252e52b360fad31 --- /dev/null +++ b/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/about.json @@ -0,0 +1,164 @@ +{ + "channels": [ + "https://repo.anaconda.com/pkgs/main", + "https://repo.anaconda.com/pkgs/r", + "https://repo.anaconda.com/pkgs/r" + ], + "conda_build_version": "25.1.2", + "conda_version": "25.1.1", + "env_vars": { + "CIO_TEST": "" + }, + "extra": { + "copy_test_source_files": true, + "feedstock-name": "ctng-compilers-feedstock", + "final": true, + "parent_recipe": { + "name": "gcc_compilers", + "path": "/home/task_176276935360828/ctng-compilers-feedstock/recipe", + "version": "15.2.0" + }, + "recipe-maintainers": [ + "timsnyder", + "xhochy", + "isuruf", + "beckermr" + ] + }, + "home": "https://gcc.gnu.org/", + "identifiers": [], + "keywords": [], + "license": "GPL-3.0-only WITH GCC-exception-3.1", + "root_pkgs": [ + "_libgcc_mutex 0.1 main", + "ca-certificates 2025.9.9 h06a4308_0", + "ld_impl_linux-64 2.40 h12ee557_0", + "libstdcxx-ng 11.2.0 h1234567_1", + "nlohmann_json 3.11.2 h6a678d5_0", + "pybind11-abi 5 hd3eb1b0_0", + "tzdata 2025a h04d1e81_0", + "libgomp 11.2.0 h1234567_1", + "_openmp_mutex 5.1 1_gnu", + "libgcc-ng 11.2.0 h1234567_1", + "bzip2 1.0.8 h5eee18b_6", + "c-ares 1.19.1 h5eee18b_0", + "cpp-expected 1.1.0 hdb19cb5_0", + "expat 2.6.4 h6a678d5_0", + "fmt 9.1.0 hdb19cb5_1", + "icu 73.1 h6a678d5_0", + "libev 4.33 h7f8727e_1", + "libffi 3.4.4 h6a678d5_1", + "libuuid 1.41.5 h5eee18b_0", + "lz4-c 1.9.4 h6a678d5_1", + "ncurses 6.4 h6a678d5_0", + "liblief 0.12.3 h6a678d5_0", + "reproc 14.2.4 h6a678d5_2", + "simdjson 3.10.1 hdb19cb5_0", + "xz 5.4.6 h5eee18b_1", + "yaml-cpp 0.8.0 h6a678d5_1", + "zlib 1.2.13 h5eee18b_1", + "libedit 3.1.20230828 h5eee18b_0", + "libnghttp2 1.57.0 h2d74bed_0", + "libssh2 1.11.1 h251f7ec_0", + "libxml2 2.13.5 hfdd30dd_0", + "pcre2 10.42 hebb0a14_1", + "readline 8.2 h5eee18b_0", + "reproc-cpp 14.2.4 h6a678d5_2", + "spdlog 1.11.0 hdb19cb5_0", + "tk 8.6.14 h39e8969_0", + "zstd 1.5.6 hc292b87_0", + "krb5 1.20.1 h143b758_1", + "libarchive 3.7.7 hfab0078_0", + "libsolv 0.7.30 he621ea3_1", + "sqlite 3.45.3 h5eee18b_0", + "libcurl 8.11.1 hc9e6f67_0", + "python 3.12.9 h5148396_0", + "libmamba 2.0.5 haf1ee3a_1", + "menuinst 2.2.0 py312h06a4308_1", + "anaconda-anon-usage 0.5.0 py312hfc0e8ea_100", + "annotated-types 0.6.0 py312h06a4308_0", + "archspec 0.2.3 pyhd3eb1b0_0", + "boltons 24.1.0 py312h06a4308_0", + "brotli-python 1.0.9 py312h6a678d5_9", + "charset-normalizer 3.3.2 pyhd3eb1b0_0", + "distro 1.9.0 py312h06a4308_0", + "frozendict 2.4.2 py312h06a4308_0", + "idna 3.7 py312h06a4308_0", + "jsonpointer 2.1 pyhd3eb1b0_0", + "libmambapy 2.0.5 py312hdb19cb5_1", + "mdurl 0.1.0 py312h06a4308_0", + "packaging 24.2 py312h06a4308_0", + "platformdirs 3.10.0 py312h06a4308_0", + "pluggy 1.5.0 py312h06a4308_0", + "pycosat 0.6.6 py312h5eee18b_2", + "pycparser 2.21 pyhd3eb1b0_0", + "pygments 2.15.1 py312h06a4308_1", + "pysocks 1.7.1 py312h06a4308_0", + "ruamel.yaml.clib 0.2.8 py312h5eee18b_0", + "setuptools 75.8.0 py312h06a4308_0", + "tqdm 4.67.1 py312he106c6f_0", + "truststore 0.10.0 py312h06a4308_0", + "typing_extensions 4.12.2 py312h06a4308_0", + "wheel 0.45.1 py312h06a4308_0", + "cffi 1.17.1 py312h1fdaa30_1", + "jsonpatch 1.33 py312h06a4308_1", + "markdown-it-py 2.2.0 py312h06a4308_1", + "pip 25.0 py312h06a4308_0", + "ruamel.yaml 0.18.6 py312h5eee18b_0", + "typing-extensions 4.12.2 py312h06a4308_0", + "urllib3 2.3.0 py312h06a4308_0", + "cryptography 43.0.3 py312h7825ff9_1", + "pydantic-core 2.27.1 py312h4aa5aa6_0", + "requests 2.32.3 py312h06a4308_1", + "rich 13.9.4 py312h06a4308_0", + "zstandard 0.23.0 py312h2c38b39_1", + "conda-content-trust 0.2.0 py312h06a4308_1", + "conda-package-streaming 0.11.0 py312h06a4308_0", + "pydantic 2.10.3 py312h06a4308_0", + "conda-package-handling 2.4.0 py312h06a4308_0", + "conda 25.1.1 py312h06a4308_0", + "conda-anaconda-tos 0.1.2 py312h06a4308_0", + "conda-libmamba-solver 25.1.1 pyhd3eb1b0_0", + "libsodium 1.0.20 heac8642_0", + "openssl 3.0.18 hd6dcaed_0", + "patch 2.8 hb25bd0a_0", + "patchelf 0.17.2 h6a678d5_0", + "yaml 0.2.5 h7b6447c_0", + "argcomplete 3.6.2 py312h06a4308_0", + "attrs 24.3.0 py312h06a4308_0", + "certifi 2025.8.3 py312h06a4308_0", + "chardet 5.2.0 py312h06a4308_0", + "click 8.2.1 py312h06a4308_0", + "filelock 3.17.0 py312h06a4308_0", + "jmespath 1.0.1 py312h06a4308_0", + "markupsafe 3.0.2 py312h5eee18b_0", + "more-itertools 10.3.0 py312h06a4308_0", + "pkginfo 1.12.0 py312h06a4308_0", + "psutil 7.0.0 py312hee96239_0", + "py-lief 0.12.3 py312h6a678d5_0", + "python-libarchive-c 5.1 pyhd3eb1b0_0", + "pytz 2025.2 py312h06a4308_0", + "pyyaml 6.0.2 py312h5eee18b_0", + "rpds-py 0.22.3 py312h4aa5aa6_0", + "six 1.17.0 py312h06a4308_0", + "soupsieve 2.5 py312h06a4308_0", + "tomlkit 0.13.2 py312h06a4308_0", + "xmltodict 0.14.2 py312h06a4308_0", + "jinja2 3.1.6 py312h06a4308_0", + "python-dateutil 2.9.0post0 py312h06a4308_2", + "referencing 0.30.2 py312h06a4308_0", + "yq 3.4.3 py312h06a4308_0", + "beautifulsoup4 4.13.5 py312h06a4308_0", + "botocore 1.37.10 py312h06a4308_0", + "jsonschema-specifications 2023.7.1 py312h06a4308_0", + "pynacl 1.5.0 py312h2630517_2", + "jsonschema 4.25.0 py312h06a4308_0", + "s3transfer 0.11.2 py312h06a4308_0", + "boto3 1.37.10 py312h06a4308_0", + "conda-anaconda-telemetry 0.3.0 pyhd3eb1b0_1", + "conda-index 0.5.0 py312h06a4308_0", + "conda-build 25.1.2 py312h06a4308_0" + ], + "summary": "The GNU C++ Runtime Library", + "tags": [] +} \ No newline at end of file diff --git a/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/files b/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/files new file mode 100644 index 0000000000000000000000000000000000000000..c71bace4b73504f8c0c10a1744863fa37fa11914 --- /dev/null +++ b/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/files @@ -0,0 +1,4 @@ +lib/libstdc++.so +lib/libstdc++.so.6 +lib/libstdc++.so.6.0.34 +share/licenses/libstdc++/RUNTIME.LIBRARY.EXCEPTION diff --git a/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/git b/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/git new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/hash_input.json b/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/hash_input.json new file mode 100644 index 0000000000000000000000000000000000000000..96109d197280b46e1ce73ee78be42080f565b576 --- /dev/null +++ b/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/hash_input.json @@ -0,0 +1,9 @@ +{ + "cross_target_stdlib": "sysroot", + "cross_target_stdlib_version": "2.28", + "cross_target_platform": "linux-64", + "triplet": "x86_64-conda-linux-gnu", + "target_platform": "linux-64", + "channel_targets": "defaults", + "__glibc": "__glibc >=2.28,<3.0.a0" +} \ No newline at end of file diff --git a/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/index.json b/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/index.json new file mode 100644 index 0000000000000000000000000000000000000000..c37ff305a117ca6aae693ef80420db72dabbc93b --- /dev/null +++ b/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/index.json @@ -0,0 +1,18 @@ +{ + "arch": "x86_64", + "build": "h39759b7_7", + "build_number": 7, + "constrains": [ + "libstdcxx-ng ==15.2.0=*_7" + ], + "depends": [ + "__glibc >=2.28,<3.0.a0", + "libgcc 15.2.0 h69a1729_7" + ], + "license": "GPL-3.0-only WITH GCC-exception-3.1", + "name": "libstdcxx", + "platform": "linux", + "subdir": "linux-64", + "timestamp": 1762772586621, + "version": "15.2.0" +} \ No newline at end of file diff --git a/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/paths.json b/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/paths.json new file mode 100644 index 0000000000000000000000000000000000000000..4ab3a709eb3d0c80f87948931e0133455086490e --- /dev/null +++ b/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/paths.json @@ -0,0 +1,29 @@ +{ + "paths": [ + { + "_path": "lib/libstdc++.so", + "path_type": "softlink", + "sha256": "d3f1293e2d2161711b793ab445cfcf579e6fd45e6dd03ae2b70ddf6be2f9c3c7", + "size_in_bytes": 14196512 + }, + { + "_path": "lib/libstdc++.so.6", + "path_type": "softlink", + "sha256": "d3f1293e2d2161711b793ab445cfcf579e6fd45e6dd03ae2b70ddf6be2f9c3c7", + "size_in_bytes": 14196512 + }, + { + "_path": "lib/libstdc++.so.6.0.34", + "path_type": "hardlink", + "sha256": "d3f1293e2d2161711b793ab445cfcf579e6fd45e6dd03ae2b70ddf6be2f9c3c7", + "size_in_bytes": 14196512 + }, + { + "_path": "share/licenses/libstdc++/RUNTIME.LIBRARY.EXCEPTION", + "path_type": "hardlink", + "sha256": "9d6b43ce4d8de0c878bf16b54d8e7a10d9bd42b75178153e3af6a815bdc90f74", + "size_in_bytes": 3324 + } + ], + "paths_version": 1 +} \ No newline at end of file diff --git a/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/recipe/conda_build_config.yaml b/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/recipe/conda_build_config.yaml new file mode 100644 index 0000000000000000000000000000000000000000..6de73da57e6bc8ce414772f2c7a838d2e377b584 --- /dev/null +++ b/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/recipe/conda_build_config.yaml @@ -0,0 +1,42 @@ +binutils_version: '2.44' +c_compiler: gcc +c_stdlib: sysroot +c_stdlib_version: '2.28' +channel_sources: conda-forge/label/sysroot-with-crypt,conda-forge +channel_targets: defaults +cpu_optimization_target: nocona +cran_mirror: https://cran.r-project.org +cross_target_platform: linux-64 +cross_target_stdlib: sysroot +cross_target_stdlib_version: '2.28' +cxx_compiler: gxx +extend_keys: +- extend_keys +- ignore_version +- pin_run_as_build +- ignore_build_only_deps +fortran_compiler: gfortran +gcc_maj_ver: '15' +gcc_version: 15.2.0 +ignore_build_only_deps: +- python +- numpy +libgfortran_soname: '5' +libgomp_ver: 1.0.0 +lua: '5' +numpy: '1.26' +openmp_ver: '4.5' +perl: 5.26.2 +pin_run_as_build: + python: + max_pin: x.x + min_pin: x.x + r-base: + max_pin: x.x + min_pin: x.x +platform: linux-64 +python: '3.12' +r_base: '3.5' +target_platform: linux-64 +triplet: x86_64-conda-linux-gnu +with_conda_specs: 'true' diff --git a/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/recipe/install-libstdc++.sh b/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/recipe/install-libstdc++.sh new file mode 100644 index 0000000000000000000000000000000000000000..3d878849ae7b3d9282a04a885cd29df782b7d038 --- /dev/null +++ b/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/recipe/install-libstdc++.sh @@ -0,0 +1,29 @@ +#!/bin/bash + +source ${RECIPE_DIR}/setup_compiler.sh +set -e -x + +export CHOST="${triplet}" + +# libtool wants to use ranlib that is here, macOS install doesn't grok -t etc +# .. do we need this scoped over the whole file though? +#export PATH=${SRC_DIR}/gcc_built/bin:${SRC_DIR}/.build/${CHOST}/buildtools/bin:${SRC_DIR}/.build/tools/bin:${PATH} + +pushd ${SRC_DIR}/build + + make -C ${CHOST}/libstdc++-v3/src prefix=${PREFIX} install-toolexeclibLTLIBRARIES + make -C ${CHOST}/libstdc++-v3/po prefix=${PREFIX} install + +popd + +mkdir -p ${PREFIX}/lib +#mv ${PREFIX}/${CHOST}/lib/* ${PREFIX}/lib + +# no static libs +find ${PREFIX}/lib -name "*\.a" -exec rm -rf {} \; +# no libtool files +find ${PREFIX}/lib -name "*\.la" -exec rm -rf {} \; + +# Install Runtime Library Exception +install -Dm644 ${SRC_DIR}/COPYING.RUNTIME \ + ${PREFIX}/share/licenses/libstdc++/RUNTIME.LIBRARY.EXCEPTION diff --git a/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/recipe/meta.yaml b/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/recipe/meta.yaml new file mode 100644 index 0000000000000000000000000000000000000000..5ad50ccbfa0252098f82f51aa755b4c313005b9c --- /dev/null +++ b/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/recipe/meta.yaml @@ -0,0 +1,51 @@ +# This file created by conda-build 25.1.2 +# ------------------------------------------------ + +package: + name: libstdcxx + version: 15.2.0 +source: + - patches: + - patches/0001-allow-commands-in-main-specfile.patch + - patches/0002-patch-zoneinfo_dir_override-to-point-to-our-tzdata.patch + - patches/0003-add-ldl-to-libstdc___la_LDFLAGS.patch + - patches/0004-Hardcode-HAVE_ALIGNED_ALLOC-1-in-libstdc-v3-configur.patch + sha256: 7294d65cc1a0558cb815af0ca8c7763d86f7a31199794ede3f630c0d1b0a5723 + url: + - https://ftp.gnu.org/gnu/gcc/gcc-15.2.0/gcc-15.2.0.tar.gz + - https://mirrors.ocf.berkeley.edu/gnu/gcc/gcc-15.2.0/gcc-15.2.0.tar.gz +build: + detect_binary_files_with_prefix: false + missing_dso_whitelist: + - '*' + number: 7 + overlinking_ignore_patterns: + - lib/libstdc++.so.* + string: h39759b7_7 +requirements: + host: + - kernel-headers_linux-64 4.18.0 h528b178_0 + - libgcc 15.2.0 h69a1729_7 + - sysroot_linux-64 2.28 h528b178_0 + - tzdata 2025b h04d1e81_0 + run: + - __glibc >=2.28,<3.0.a0 + - libgcc 15.2.0 h69a1729_7 + run_constrained: + - libstdcxx-ng ==15.2.0=*_7 +test: + commands: + - test -f ${PREFIX}/lib/libstdc++.so +about: + home: https://gcc.gnu.org/ + license: GPL-3.0-only WITH GCC-exception-3.1 + summary: The GNU C++ Runtime Library +extra: + copy_test_source_files: true + feedstock-name: ctng-compilers-feedstock + final: true + recipe-maintainers: + - beckermr + - isuruf + - timsnyder + - xhochy diff --git a/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/recipe/parent/LICENSE b/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/recipe/parent/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..cba42cffc2901212c539e558950c6f6ed985d628 --- /dev/null +++ b/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/recipe/parent/LICENSE @@ -0,0 +1,13 @@ +BSD 3-clause license +Copyright (c) 2015-2019, conda-forge +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/recipe/parent/build.sh b/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/recipe/parent/build.sh new file mode 100644 index 0000000000000000000000000000000000000000..68e45267b8eceabd79595abe9d20ddbc89939d23 --- /dev/null +++ b/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/recipe/parent/build.sh @@ -0,0 +1,120 @@ +#!/bin/bash + +set -ex + +source ${RECIPE_DIR}/setup_compiler.sh + +# ensure patch is applied +grep 'conda-forge:: allow' gcc/gcc.c* + +GCC_CONFIGURE_OPTIONS=() + +if [[ "$channel_targets" == *conda-forge* ]]; then + GCC_CONFIGURE_OPTIONS+=(--with-pkgversion="conda-forge gcc ${gcc_version}-${PKG_BUILDNUM}") + GCC_CONFIGURE_OPTIONS+=(--with-bugurl="https://github.com/conda-forge/ctng-compilers-feedstock/issues/new/choose") +fi + +for tool in addr2line ar as c++filt cc c++ fc gcc g++ gfortran ld nm objcopy objdump ranlib readelf size strings strip; do + tool_upper=$(echo $tool | tr a-z-+ A-Z_X) + if [[ "$tool" == "cc" ]]; then + tool=gcc + elif [[ "$tool" == "fc" ]]; then + tool=gfortran + elif [[ "$tool" == "c++" ]]; then + tool=g++ + elif [[ "$target_platform" != "$build_platform" && "$tool" =~ ^(ar|nm|ranlib)$ ]]; then + tool="gcc-${tool}" + fi + eval "export ${tool_upper}_FOR_BUILD=\$BUILD_PREFIX/bin/\$BUILD-\$tool" + eval "export ${tool_upper}=\$BUILD_PREFIX/bin/\$HOST-\$tool" + eval "export ${tool_upper}_FOR_TARGET=\$BUILD_PREFIX/bin/\$TARGET-\$tool" +done + +if [[ "$cross_target_platform" == "win-64" ]]; then + # do not expect ${prefix}/mingw symlink - this should be superceded by + # 0005-Windows-Don-t-ignore-native-system-header-dir.patch .. but isn't! + sed -i 's#${prefix}/mingw/#${prefix}/${target}/sysroot/usr/#g' configure + if [[ "$gcc_maj_ver" == "13" || "$gcc_maj_ver" == "14" ]]; then + sed -i "s#/mingw/#/usr/#g" gcc/config/i386/mingw32.h + else + sed -i "s#/mingw/#/usr/#g" gcc/config/mingw/mingw32.h + fi +else + # prevent mingw patches from being archived in linux conda packages + rm -rf ${RECIPE_DIR}/patches/mingw +fi + +NATIVE_SYSTEM_HEADER_DIR=/usr/include +SYSROOT_DIR=${PREFIX}/${TARGET}/sysroot + +# workaround a bug in gcc build files when using external binutils +# and build != host == target +export gcc_cv_objdump=$OBJDUMP_FOR_TARGET + +ls $BUILD_PREFIX/bin/ + +./contrib/download_prerequisites + +# We want CONDA_PREFIX/usr/lib not CONDA_PREFIX/usr/lib64 and this +# is the only way. It is incompatible with multilib (obviously). +TINFO_FILES=$(find . -path "*/config/*/t-*") +for TINFO_FILE in ${TINFO_FILES}; do + echo TINFO_FILE ${TINFO_FILE} + sed -i.bak 's#^\(MULTILIB_OSDIRNAMES.*\)\(lib64\)#\1lib#g' ${TINFO_FILE} + rm -f ${TINFO_FILE}.bak + sed -i.bak 's#^\(MULTILIB_OSDIRNAMES.*\)\(libx32\)#\1lib#g' ${TINFO_FILE} + rm -f ${TINFO_FILE}.bak +done + +# workaround for https://gcc.gnu.org/bugzilla//show_bug.cgi?id=80196 +if [[ "$gcc_version" == "11."* && "$build_platform" != "$target_platform" ]]; then + sed -i.bak 's@-I$glibcxx_srcdir/libsupc++@-I$glibcxx_srcdir/libsupc++ -nostdinc++@g' libstdc++-v3/configure +fi + +mkdir -p build +cd build + +# We need to explicitly set the gxx include dir because previously +# with ct-ng, native build was not considered native because +# BUILD=HOST=x86_64-build_unknown-linux-gnu and TARGET=x86_64-conda-linux-gnu +# Depending on native or not, the include dir changes. Setting it explictly +# goes back to the original way. +# See https://github.com/gcc-mirror/gcc/blob/16e2427f50c208dfe07d07f18009969502c25dc8/gcc/configure.ac#L218 + +if [[ "$TARGET" == *linux* ]]; then + GCC_CONFIGURE_OPTIONS+=(--enable-libsanitizer) + GCC_CONFIGURE_OPTIONS+=(--enable-default-pie) + GCC_CONFIGURE_OPTIONS+=(--enable-threads=posix) +fi + +../configure \ + --prefix="$PREFIX" \ + --with-slibdir="$PREFIX/lib" \ + --libdir="$PREFIX/lib" \ + --mandir="$PREFIX/man" \ + --build=$BUILD \ + --host=$HOST \ + --target=$TARGET \ + --enable-languages=c,c++,fortran,objc,obj-c++ \ + --enable-__cxa_atexit \ + --disable-libmudflap \ + --enable-libgomp \ + --disable-libssp \ + --enable-libquadmath \ + --enable-libquadmath-support \ + --enable-lto \ + --enable-target-optspace \ + --enable-plugin \ + --enable-gold \ + --disable-nls \ + --disable-multilib \ + --enable-long-long \ + --with-sysroot=${SYSROOT_DIR} \ + --with-build-sysroot=${BUILD_PREFIX}/${TARGET}/sysroot \ + --with-native-system-header-dir=${NATIVE_SYSTEM_HEADER_DIR} \ + --with-gxx-include-dir="${PREFIX}/lib/gcc/${TARGET}/${gcc_version}/include/c++" \ + "${GCC_CONFIGURE_OPTIONS[@]}" + +# Setting the CPU_COUNT=1 lets you see which job failed! +#CPU_COUNT=1 +make -j${CPU_COUNT} diff --git a/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/recipe/parent/c11threads.c b/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/recipe/parent/c11threads.c new file mode 100644 index 0000000000000000000000000000000000000000..1d0b34c8662f7eca07c573c32eadbdf35a8427e3 --- /dev/null +++ b/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/recipe/parent/c11threads.c @@ -0,0 +1,6 @@ +#include +int main() { + mtx_t mutex; + mtx_init(&mutex, mtx_plain); +} + diff --git a/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/recipe/parent/conda_build_config.yaml b/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/recipe/parent/conda_build_config.yaml new file mode 100644 index 0000000000000000000000000000000000000000..2066b6abe52a8e832f676e8c49dd5a847678ae63 --- /dev/null +++ b/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/recipe/parent/conda_build_config.yaml @@ -0,0 +1,49 @@ +triplet: + - x86_64-conda-linux-gnu # [linux and x86_64] + - powerpc64le-conda-linux-gnu # [ppc64le] + - aarch64-conda-linux-gnu # [linux and aarch64] + - x86_64-w64-mingw32 # [win] +gcc_version: + - 15.2.0 # [not ANACONDA_ROCKET_ENABLE_GCC13 and not ANACONDA_ROCKET_ENABLE_GCC14] + - 14.3.0 # [ANACONDA_ROCKET_ENABLE_GCC14] + - 13.4.0 # [ANACONDA_ROCKET_ENABLE_GCC13] +gcc_maj_ver: + - 15 # [not ANACONDA_ROCKET_ENABLE_GCC13 and not ANACONDA_ROCKET_ENABLE_GCC14] + - 14 # [ANACONDA_ROCKET_ENABLE_GCC14] + - 13 # [ANACONDA_ROCKET_ENABLE_GCC13] +libgfortran_soname: + - 5 # [not ANACONDA_ROCKET_ENABLE_GCC13 and not ANACONDA_ROCKET_ENABLE_GCC14] + - 5 # [ANACONDA_ROCKET_ENABLE_GCC14] + - 5 # [ANACONDA_ROCKET_ENABLE_GCC13] +binutils_version: + - 2.44 +cross_target_platform: + - linux-64 # [linux and x86_64] + - linux-ppc64le # [ppc64le] + - linux-aarch64 # [linux and aarch64] + - win-64 # [win] +cross_target_stdlib_version: + - 2.28 # [linux and x86_64] + - 2.28 # [ppc64le] + - 2.28 # [linux and aarch64] + - 12 # [win] +cross_target_stdlib: + - sysroot # [linux and x86_64] + - sysroot # [ppc64le] + - sysroot # [linux and aarch64] + - m2w64-sysroot # [win] +# openmp versions +openmp_ver: + - 4.5 +libgomp_ver: + - 1.0.0 +channel_sources: + - conda-forge/label/sysroot-with-crypt,conda-forge +# we could use stdlib("m2w64_c"), but this allows uniform use in setup_compiler.sh +c_stdlib: # [win] + - m2w64-sysroot # [win] +c_stdlib_version: # [win] + - 12 # [win] +with_conda_specs: + - true + - false diff --git a/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/recipe/parent/config.old b/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/recipe/parent/config.old new file mode 100644 index 0000000000000000000000000000000000000000..90a390a60b40932a63278c29c1f013e7d5254a2d --- /dev/null +++ b/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/recipe/parent/config.old @@ -0,0 +1,530 @@ +# +# Automatically generated file; DO NOT EDIT. +# Crosstool-NG Configuration +# +CT_CONFIGURE_has_static_link=y +CT_CONFIGURE_has_xz=y +CT_CONFIGURE_has_svn=y +CT_MODULES=y + +# +# Paths and misc options +# + +# +# crosstool-NG behavior +# +CT_OBSOLETE=y +CT_EXPERIMENTAL=y +CT_ALLOW_BUILD_AS_ROOT=y +CT_ALLOW_BUILD_AS_ROOT_SURE=y +# CT_DEBUG_CT is not set + +# +# Paths +# +CT_LOCAL_TARBALLS_DIR="${HOME}/src" +CT_SAVE_TARBALLS=y +CT_WORK_DIR="${CT_TOP_DIR}/.build" +CT_PREFIX_DIR="${CT_TOP_DIR}/gcc_built" +CT_BUILD_TOP_DIR="@BUILD_TOP@" +CT_INSTALL_DIR="${CT_PREFIX_DIR}" +CT_RM_RF_PREFIX_DIR=n +CT_REMOVE_DOCS=y +CT_INSTALL_DIR_RO=n +CT_STRIP_HOST_TOOLCHAIN_EXECUTABLES=y +# CT_STRIP_TARGET_TOOLCHAIN_EXECUTABLES is not set + +# +# Downloading +# +# CT_FORBID_DOWNLOAD is not set +# CT_FORCE_DOWNLOAD is not set +CT_CONNECT_TIMEOUT=10 +# CT_ONLY_DOWNLOAD is not set +# CT_USE_MIRROR is not set + +# +# Extracting +# +# CT_FORCE_EXTRACT is not set +CT_OVERIDE_CONFIG_GUESS_SUB=y +# CT_ONLY_EXTRACT is not set +CT_PATCH_BUNDLED=y +# CT_PATCH_LOCAL is not set +# CT_PATCH_BUNDLED_LOCAL is not set +# CT_PATCH_LOCAL_BUNDLED is not set +# CT_PATCH_BUNDLED_FALLBACK_LOCAL is not set +# CT_PATCH_LOCAL_FALLBACK_BUNDLED is not set +# CT_PATCH_NONE is not set +CT_PATCH_ORDER="bundled" + +# +# Build behavior +# +CT_PARALLEL_JOBS=4 +CT_LOAD="" +CT_USE_PIPES=y +CT_EXTRA_CFLAGS_FOR_BUILD="" +CT_EXTRA_LDFLAGS_FOR_BUILD="" +CT_EXTRA_CFLAGS_FOR_HOST="" +CT_EXTRA_LDFLAGS_FOR_HOST="" +# CT_CONFIG_SHELL_SH is not set +# CT_CONFIG_SHELL_ASH is not set +CT_CONFIG_SHELL_BASH=y +# CT_CONFIG_SHELL_CUSTOM is not set +CT_CONFIG_SHELL="${bash}" + +# +# Logging +# +# CT_LOG_ERROR is not set +# CT_LOG_WARN is not set +CT_LOG_INFO=y +# CT_LOG_EXTRA is not set +# CT_LOG_ALL is not set +# CT_LOG_DEBUG is not set +CT_LOG_LEVEL_MAX="INFO" +# CT_LOG_SEE_TOOLS_WARN is not set +CT_LOG_PROGRESS_BAR=y +CT_LOG_TO_FILE=y +CT_LOG_FILE_COMPRESS=y + +# +# Target options +# +CT_ARCH="arm" +CT_ARCH_SUPPORTS_BOTH_MMU=y +CT_ARCH_SUPPORTS_BOTH_ENDIAN=y +CT_ARCH_SUPPORTS_32=y +CT_ARCH_SUPPORTS_64=y +CT_ARCH_SUPPORTS_WITH_ARCH=y +CT_ARCH_SUPPORTS_WITH_CPU=y +CT_ARCH_SUPPORTS_WITH_TUNE=y +CT_ARCH_SUPPORTS_WITH_FLOAT=y +CT_ARCH_SUPPORTS_WITH_FPU=y +CT_ARCH_SUPPORTS_SOFTFP=y +CT_ARCH_DEFAULT_HAS_MMU=y +CT_ARCH_DEFAULT_LE=y +CT_ARCH_DEFAULT_32=y +CT_ARCH_CPU="arm1136jf-s" +CT_ARCH_FPU="vfp" +# CT_ARCH_BE is not set +CT_ARCH_LE=y +CT_ARCH_32=y +# CT_ARCH_64 is not set +CT_ARCH_BITNESS=32 +# CT_ARCH_FLOAT_HW is not set +CT_ARCH_FLOAT_SW=y +CT_TARGET_CFLAGS="" +CT_TARGET_LDFLAGS="" +# CT_ARCH_alpha is not set +CT_ARCH_arm=y +# CT_ARCH_avr is not set +# CT_ARCH_m68k is not set +# CT_ARCH_microblaze is not set +# CT_ARCH_mips is not set +# CT_ARCH_nios2 is not set +# CT_ARCH_powerpc is not set +# CT_ARCH_s390 is not set +# CT_ARCH_sh is not set +# CT_ARCH_sparc is not set +# CT_ARCH_x86 is not set +# CT_ARCH_xtensa is not set +CT_ARCH_alpha_AVAILABLE=y +CT_ARCH_arm_AVAILABLE=y +CT_ARCH_avr_AVAILABLE=y +CT_ARCH_m68k_AVAILABLE=y +CT_ARCH_microblaze_AVAILABLE=y +CT_ARCH_mips_AVAILABLE=y +CT_ARCH_nios2_AVAILABLE=y +CT_ARCH_powerpc_AVAILABLE=y +CT_ARCH_s390_AVAILABLE=y +CT_ARCH_sh_AVAILABLE=y +CT_ARCH_sparc_AVAILABLE=y +CT_ARCH_x86_AVAILABLE=y +CT_ARCH_xtensa_AVAILABLE=y +CT_ARCH_SUFFIX="" + +# +# Generic target options +# +# CT_MULTILIB is not set +# CT_DISABLE_MULTILIB_LIB_OSDIRNAMES is not set +CT_ARCH_USE_MMU=y +CT_ARCH_ENDIAN="little" +CT_ARCH_32=y + +# +# Target optimisations +# +CT_ARCH_EXCLUSIVE_WITH_CPU=y +# CT_ARCH_FLOAT_AUTO is not set +# CT_ARCH_FLOAT_SOFTFP is not set +CT_ARCH_FLOAT="soft" + +# +# arm other options +# +CT_ARCH_ARM_MODE="arm" +CT_ARCH_ARM_MODE_ARM=y +# CT_ARCH_ARM_MODE_THUMB is not set +# CT_ARCH_ARM_INTERWORKING is not set +CT_ARCH_ARM_EABI_FORCE=y +CT_ARCH_ARM_EABI=y + +# +# Toolchain options +# + +# +# General toolchain options +# +CT_FORCE_SYSROOT=y +CT_USE_SYSROOT=y +CT_SYSROOT_NAME="sysroot" +CT_SYSROOT_DIR_PREFIX="" +CT_WANTS_STATIC_LINK=y +CT_STATIC_TOOLCHAIN=y +CT_TOOLCHAIN_PKGVERSION="" +CT_TOOLCHAIN_BUGURL="" + +# +# Tuple completion and aliasing +# +CT_TARGET_VENDOR="unknown" +CT_TARGET_ALIAS_SED_EXPR="" +CT_TARGET_ALIAS="" + +# +# Toolchain type +# +# CT_NATIVE is not set +CT_CROSS=y +# CT_CROSS_NATIVE is not set +# CT_CANADIAN is not set +CT_TOOLCHAIN_TYPE="cross" + +# +# Build system +# +CT_BUILD="x86_64-pc-linux-gnu" +CT_BUILD_PREFIX="" +CT_BUILD_SUFFIX="" + +# +# Misc options +# +# CT_TOOLCHAIN_ENABLE_NLS is not set + +# +# Operating System +# +CT_KERNEL_SUPPORTS_SHARED_LIBS=y +CT_KERNEL="linux" +CT_KERNEL_VERSION="3.2.43" +# CT_KERNEL_bare_metal is not set +CT_KERNEL_linux=y +CT_KERNEL_bare_metal_AVAILABLE=y +CT_KERNEL_linux_AVAILABLE=y +# CT_KERNEL_LINUX_CUSTOM is not set +# CT_KERNEL_V_4_4 is not set +# CT_KERNEL_V_4_3 is not set +# CT_KERNEL_V_4_1 is not set +# CT_KERNEL_V_3_18 is not set +# CT_KERNEL_V_3_14 is not set +# CT_KERNEL_V_3_12 is not set +# CT_KERNEL_V_3_10 is not set +# CT_KERNEL_V_3_7 is not set +# CT_KERNEL_V_3_4 is not set +# CT_KERNEL_V_3_2 is not set +CT_KERNEL_V_3_2_43=y +# CT_KERNEL_V_2_6_32 is not set +# CT_KERNEL_V_2_6_18 is not set +CT_KERNEL_windows_AVAILABLE=y + +# +# Common kernel options +# +CT_SHARED_LIBS=y + +# +# linux other options +# +# CT_KERNEL_LINUX_VERBOSITY_0 is not set +CT_KERNEL_LINUX_VERBOSITY_1=y +# CT_KERNEL_LINUX_VERBOSITY_2 is not set +CT_KERNEL_LINUX_VERBOSE_LEVEL=1 +CT_KERNEL_LINUX_INSTALL_CHECK=y + +# +# Binary utilities +# +CT_ARCH_BINFMT_ELF=y +CT_BINUTILS="binutils" +CT_BINUTILS_binutils=y + +# +# GNU binutils +# +# CT_BINUTILS_CUSTOM is not set +CT_BINUTILS_VERSION="2.27" +# CT_CC_BINUTILS_SHOW_LINARO is not set +CT_BINUTILS_V_2_27=y +# CT_BINUTILS_V_2_25_1 is not set +# CT_BINUTILS_V_2_24 is not set +# CT_BINUTILS_V_2_23_2 is not set +CT_BINUTILS_2_26_or_later=y +CT_BINUTILS_2_25_1_or_later=y +CT_BINUTILS_2_25_or_later=y +CT_BINUTILS_2_24_or_later=y +CT_BINUTILS_2_23_2_or_later=y +CT_BINUTILS_HAS_HASH_STYLE=y +CT_BINUTILS_HAS_GOLD=y +CT_BINUTILS_GOLD_SUPPORTS_ARCH=y +CT_BINUTILS_HAS_PLUGINS=y +CT_BINUTILS_HAS_PKGVERSION_BUGURL=y +CT_BINUTILS_LINKER_LD=y +CT_BINUTILS_LINKERS_LIST="ld" +CT_BINUTILS_LINKER_DEFAULT="bfd" +CT_BINUTILS_EXTRA_CONFIG_ARRAY="" +CT_BINUTILS_FOR_TARGET=y +CT_BINUTILS_FOR_TARGET_IBERTY=y +CT_BINUTILS_FOR_TARGET_BFD=y +CT_BINUTILS_PLUGINS=y + +# +# binutils other options +# + +# +# C-library +# +CT_LIBC="uClibc" +CT_LIBC_VERSION="0.9.33.2" +# CT_LIBC_glibc is not set +# CT_LIBC_musl is not set +CT_LIBC_uClibc=y +CT_LIBC_avr_libc_AVAILABLE=y +CT_LIBC_glibc_AVAILABLE=y +CT_THREADS="nptl" +CT_LIBC_mingw_AVAILABLE=y +CT_LIBC_musl_AVAILABLE=y +CT_LIBC_newlib_AVAILABLE=y +CT_LIBC_none_AVAILABLE=y +CT_LIBC_uClibc_AVAILABLE=y + +CT_LIBC_UCLIBC_CUSTOM=n +CT_LIBC_UCLIBC_NG=n +CT_LIBC_UCLIBC_NG_V_1_0_22=n +CT_LIBC_UCLIBC_NG_V_1_0_21=n +CT_LIBC_UCLIBC_NG_V_1_0_20=n +CT_LIBC_UCLIBC_V_0_9_33_2=y + +CT_LIBC_UCLIBC_PARALLEL=y +# CT_LIBC_UCLIBC_VERBOSITY_0 is not set +# CT_LIBC_UCLIBC_VERBOSITY_1 is not set +CT_LIBC_UCLIBC_VERBOSITY_2=y +CT_LIBC_UCLIBC_VERBOSITY="V=2" +CT_LIBC_UCLIBC_DEBUG_LEVEL_0=y +# CT_LIBC_UCLIBC_DEBUG_LEVEL_1 is not set +# CT_LIBC_UCLIBC_DEBUG_LEVEL_2 is not set +# CT_LIBC_UCLIBC_DEBUG_LEVEL_3 is not set +CT_LIBC_UCLIBC_DEBUG_LEVEL=0 +CT_LIBC_UCLIBC_CONFIG_FILE="" +CT_LIBC_SUPPORT_THREADS_ANY=y +CT_LIBC_SUPPORT_THREADS_NATIVE=y +CT_LIBC_SUPPORT_THREADS_LT=y +CT_LIBC_SUPPORT_THREADS_NONE=y + +# +# Common C library options +# +CT_THREADS_NATIVE=y +# CT_THREADS_LT is not set +# CT_THREADS_NONE is not set +CT_LIBC_XLDD=y + +# +# uClibc other options +# +CT_LIBC_UCLIBC_LNXTHRD="" +# CT_LIBC_UCLIBC_LOCALES is not set +CT_LIBC_UCLIBC_IPV6=y +CT_LIBC_UCLIBC_WCHAR=y +# CT_LIBC_UCLIBC_FENV is not set + +# +# C compiler +# +CT_CC="gcc" +CT_CC_CORE_PASSES_NEEDED=y +CT_CC_CORE_PASS_1_NEEDED=y +CT_CC_CORE_PASS_2_NEEDED=y +CT_CC_gcc=y +# CT_CC_GCC_CUSTOM is not set +CT_CC_GCC_VERSION="6.3.0" +# CT_CC_GCC_SHOW_LINARO is not set +CT_CC_GCC_V_6_3_0=y +# CT_CC_GCC_V_6_1_0 is not set +# CT_CC_GCC_V_5_4_0 is not set +# CT_CC_GCC_V_4_9_3 is not set +# CT_CC_GCC_V_4_8_5 is not set +CT_CC_GCC_4_8_or_later=y +CT_CC_GCC_4_9_or_later=y +CT_CC_GCC_5_or_later=y +CT_CC_GCC_6=y +CT_CC_GCC_6_or_later=y +CT_CC_GCC_HAS_GRAPHITE=y +CT_CC_GCC_USE_GRAPHITE=y +CT_CC_GCC_HAS_LTO=y +CT_CC_GCC_USE_LTO=y +CT_CC_GCC_HAS_PKGVERSION_BUGURL=y +CT_CC_GCC_HAS_BUILD_ID=y +CT_CC_GCC_HAS_LNK_HASH_STYLE=y +CT_CC_GCC_USE_GMP_MPFR=y +CT_CC_GCC_USE_MPC=y +CT_CC_GCC_HAS_LIBQUADMATH=y +CT_CC_GCC_HAS_LIBSANITIZER=y +CT_CC_LANG_FORTRAN=y +CT_CC_GCC_ENABLE_CXX_FLAGS="" +CT_CC_GCC_CORE_EXTRA_CONFIG_ARRAY="" +CT_CC_GCC_EXTRA_CONFIG_ARRAY="" +CT_CC_GCC_STATIC_LIBSTDCXX=y +# CT_CC_GCC_SYSTEM_ZLIB is not set +# This does not work but it seems currently possible +# to hack it and use the stage2 liblto.so as long as +# you manually copy it to the right place. For conda +# compiler packages, we add it to binutils, since it +# is executed by programs in that package. +# Really, needs a CT_MOSTLY_STATIC_TOOLCHAIN config +# option that uses -fPIC for all companion libs and +# builds them statically and then the exes are just +# dynamic exes that happen to link only to glibc in +# a dynamic way. +CT_CC_GCC_ENABLE_PLUGINS=n + +# +# Optimisation features +# + +# +# Settings for libraries running on target +# +CT_CC_GCC_ENABLE_TARGET_OPTSPACE=y +# CT_CC_GCC_LIBMUDFLAP is not set +# CT_CC_GCC_LIBGOMP is not set +# CT_CC_GCC_LIBSSP is not set +# CT_CC_GCC_LIBQUADMATH is not set + +# +# Misc. obscure options. +# +CT_CC_CXA_ATEXIT=y +# CT_CC_GCC_DISABLE_PCH is not set +CT_CC_GCC_SJLJ_EXCEPTIONS=m +CT_CC_GCC_LDBL_128=m +# CT_CC_GCC_BUILD_ID is not set +CT_CC_GCC_LNK_HASH_STYLE_DEFAULT=y +# CT_CC_GCC_LNK_HASH_STYLE_SYSV is not set +# CT_CC_GCC_LNK_HASH_STYLE_GNU is not set +# CT_CC_GCC_LNK_HASH_STYLE_BOTH is not set +CT_CC_GCC_LNK_HASH_STYLE="" +CT_CC_GCC_DEC_FLOAT_AUTO=y +# CT_CC_GCC_DEC_FLOAT_BID is not set +# CT_CC_GCC_DEC_FLOAT_DPD is not set +# CT_CC_GCC_DEC_FLOATS_NO is not set +CT_CC_SUPPORT_CXX=y +CT_CC_SUPPORT_FORTRAN=y +CT_CC_SUPPORT_JAVA=y +CT_CC_SUPPORT_ADA=y +CT_CC_SUPPORT_OBJC=y +CT_CC_SUPPORT_OBJCXX=y +CT_CC_SUPPORT_GOLANG=y + +# +# Additional supported languages: +# +CT_CC_LANG_CXX=y +# CT_CC_LANG_JAVA is not set +# CT_CC_LANG_ADA is not set +CT_CC_LANG_OBJC=y +CT_CC_LANG_OBJCXX=y +# CT_CC_LANG_GOLANG is not set +CT_CC_LANG_OTHERS="" + +# +# Debug facilities +# +# CT_DEBUG_dmalloc is not set +# CT_DEBUG_duma is not set +# CT_DEBUG_gdb is not set +# CT_DEBUG_ltrace is not set +# CT_DEBUG_strace is not set + +# +# Companion libraries +# +CT_COMPLIBS_NEEDED=y +CT_GMP_NEEDED=y +CT_MPFR_NEEDED=y +CT_ISL_NEEDED=y +CT_MPC_NEEDED=y +CT_COMPLIBS=y +CT_GMP=y +CT_MPFR=y +CT_ISL=y +CT_MPC=y +CT_GMP_V_6_1_2=y +# CT_GMP_V_6_0_0 is not set +# CT_GMP_V_5_1_3 is not set +# CT_GMP_V_5_1_1 is not set +# CT_GMP_V_5_0_2 is not set +# CT_GMP_V_5_0_1 is not set +# CT_GMP_V_4_3_2 is not set +# CT_GMP_V_4_3_1 is not set +# CT_GMP_V_4_3_0 is not set +CT_GMP_5_0_2_or_later=y +CT_GMP_VERSION="6.1.2" +CT_MPFR_V_3_1_5=y +# CT_MPFR_V_3_1_2 is not set +# CT_MPFR_V_3_1_0 is not set +# CT_MPFR_V_3_0_1 is not set +# CT_MPFR_V_3_0_0 is not set +# CT_MPFR_V_2_4_2 is not set +# CT_MPFR_V_2_4_1 is not set +# CT_MPFR_V_2_4_0 is not set +CT_MPFR_VERSION="3.1.5" +CT_ISL_V_0_18=y +# CT_ISL_V_0_12_2 is not set +CT_ISL_V_0_14_or_later=y +CT_ISL_V_0_12_or_later=y +CT_ISL_VERSION="0.18" +CT_MPC_V_1_0_3=y +# CT_MPC_V_1_0_2 is not set +# CT_MPC_V_1_0_1 is not set +# CT_MPC_V_1_0 is not set +# CT_MPC_V_0_9 is not set +# CT_MPC_V_0_8_2 is not set +# CT_MPC_V_0_8_1 is not set +# CT_MPC_V_0_7 is not set +CT_MPC_VERSION="1.0.3" + +# +# Companion libraries common options +# +# CT_COMPLIBS_CHECK is not set + +# +# Companion tools +# + +# +# READ HELP before you say 'Y' below !!! +# +# CT_COMP_TOOLS is not set + +# +# Test suite +# +# CT_TEST_SUITE_GCC is not set diff --git a/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/recipe/parent/get_cpu_arch.sh b/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/recipe/parent/get_cpu_arch.sh new file mode 100644 index 0000000000000000000000000000000000000000..b7ec10f51bb3d6f9d3709715366948dd28dd0a4c --- /dev/null +++ b/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/recipe/parent/get_cpu_arch.sh @@ -0,0 +1,35 @@ +get_cpu_arch() { + local CPU_ARCH + if [[ "$1" == *"-64" ]]; then + CPU_ARCH="x86_64" + elif [[ "$1" == *"-ppc64le" ]]; then + CPU_ARCH="powerpc64le" + elif [[ "$1" == *"-aarch64" ]]; then + CPU_ARCH="aarch64" + elif [[ "$1" == *"-s390x" ]]; then + CPU_ARCH="s390x" + else + echo "Unknown architecture" + exit 1 + fi + echo $CPU_ARCH +} + +get_triplet() { + if [[ "$1" == linux-* ]]; then + echo "$(get_cpu_arch $1)-conda-linux-gnu" + elif [[ "$1" == osx-64 ]]; then + echo "x86_64-apple-darwin13.4.0" + elif [[ "$1" == osx-arm64 ]]; then + echo "arm64-apple-darwin20.0.0" + elif [[ "$1" == win-64 ]]; then + echo "x86_64-w64-mingw32" + else + echo "unknown platform" + exit 1 + fi +} + +export BUILD="$(get_triplet $build_platform)" +export HOST="$(get_triplet $target_platform)" +export TARGET="$(get_triplet $cross_target_platform)" diff --git a/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/recipe/parent/hello-world.cpp b/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/recipe/parent/hello-world.cpp new file mode 100644 index 0000000000000000000000000000000000000000..abdfa651565e60579d61d05bc45afd98be1d3457 --- /dev/null +++ b/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/recipe/parent/hello-world.cpp @@ -0,0 +1,7 @@ +#include + +int main(int argc, char * argv[]) +{ + std::cout << "Hello World!\n" << std::endl; + return 0; +} diff --git a/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/recipe/parent/install-conda-specs.sh b/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/recipe/parent/install-conda-specs.sh new file mode 100644 index 0000000000000000000000000000000000000000..01a4d1c950f9d00380efc5a2df4efb96753b87d3 --- /dev/null +++ b/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/recipe/parent/install-conda-specs.sh @@ -0,0 +1,39 @@ +#!/bin/bash + +source ${RECIPE_DIR}/setup_compiler.sh + +set -ex +export CHOST="${triplet}" +specdir=$PREFIX/lib/gcc/$CHOST/${gcc_version} +if [[ "$cross_target_platform" == "$target_platform" ]]; then + install -Dm644 -T ${SRC_DIR}/build/gcc/specs $specdir/conda.specs + + # Add specs when we're not cross compiling so that the toolchain works more like a system + # toolchain (i.e. conda installed libs can be #include <>'d and linked without adding any + # cmdline args or FLAGS and likewise the assumptions we have about rpath are built in) + # + # THIS IS INTENDED as a safety net for casual users who just want the native toolchain to work. + # It is not to be relied on by conda-forge package recipes and best practice is still to set the + # appropriate FLAGS vars (either via compiler activation scripts or explicitly in the recipe) + # + # We use double quotes here because we want $PREFIX and $CHOST to be expanded at build time + # and recorded in the specs file. It will undergo a prefix replacement when our compiler + # package is installed. + sed -i -e "/\*link_command:/,+1 s+%.*+& %{\!static:-rpath ${PREFIX}/lib -rpath-link ${PREFIX}/lib} -L ${PREFIX}/lib/stubs -L ${PREFIX}/lib+" $specdir/conda.specs + if [[ "$cross_target_platform" != "win-"* ]]; then + # put -disable-new-dtags at the front of the cmdline so that user provided -enable-new-dtags (in %l) can override it + sed -i -e "/\*link_command:/,+1 s+%(linker)+& -disable-new-dtags +" $specdir/conda.specs + fi + # use -idirafter to put the conda "system" includes where /usr/local/include would typically go + # in a system-packaged non-cross compiler + sed -i -e "/\*cpp_options:/,+1 s+%.*+& -idirafter ${PREFIX}/include+" $specdir/conda.specs + # cc1_options also get used for cc1plus... at least in 11.2.0 + sed -i -e "/\*cc1_options:/,+1 s+%.*+& -idirafter ${PREFIX}/include+" $specdir/conda.specs + +else + # does it even make sense to do anything here? Could do something with %:getenv(BUILD_PREFIX /include) + # but in the case that we aren't inside conda-build, it will cause gcc to fatal + # because it won't be set. Just explicitly making this fail for now so that the meta.yaml + # is consitent with when it creates the conda-gcc-specs package + false +fi diff --git a/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/recipe/parent/install-g++.sh b/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/recipe/parent/install-g++.sh new file mode 100644 index 0000000000000000000000000000000000000000..f1cf84ba32fb914e5ef29ee9b11a6195049534f5 --- /dev/null +++ b/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/recipe/parent/install-g++.sh @@ -0,0 +1,59 @@ +#!/bin/bash + +source ${RECIPE_DIR}/setup_compiler.sh +set -e -x + +export CHOST="${triplet}" +_libdir=libexec/gcc/${CHOST}/${PKG_VERSION} + +# libtool wants to use ranlib that is here, macOS install doesn't grok -t etc +# .. do we need this scoped over the whole file though? +#export PATH=${SRC_DIR}/gcc_built/bin:${SRC_DIR}/.build/${CHOST}/buildtools/bin:${SRC_DIR}/.build/tools/bin:${PATH} + +pushd ${SRC_DIR}/build + +make -C gcc prefix=${PREFIX} c++.install-common + +# How it used to be: +# install -m755 -t ${PREFIX}/bin/ gcc/{cc1plus,lto1} +for file in cc1plus; do + if [[ -f gcc/${file}${EXEEXT} ]]; then + install -c gcc/${file}${EXEEXT} ${PREFIX}/${_libdir}/${file}${EXEEXT} + fi +done + +# Following 3 are in libstdcxx-devel +#make -C $CHOST/libstdc++-v3/src prefix=${PREFIX} install +#make -C $CHOST/libstdc++-v3/include prefix=${PREFIX} install +#make -C $CHOST/libstdc++-v3/libsupc++ prefix=${PREFIX} install +make -C $CHOST/libstdc++-v3/python prefix=${PREFIX} install + +# Probably don't want to do this for cross-compilers +# mkdir -p ${PREFIX}/share/gdb/auto-load/usr/lib/ +# cp ${SRC_DIR}/gcc_built/${CHOST}/sysroot/lib/libstdc++.so.6.*-gdb.py ${PREFIX}/share/gdb/auto-load/usr/lib/ + +make -C libcpp prefix=${PREFIX} install + +popd + +mkdir -p ${PREFIX}/lib/gcc/${CHOST}/${PKG_VERSION} + +set +x +# Strip executables, we may want to install to a different prefix +# and strip in there so that we do not change files that are not +# part of this package. +pushd ${PREFIX} + _files=$(find bin libexec -type f -not -name '*.dll') + for _file in ${_files}; do + _type="$( file "${_file}" | cut -d ' ' -f 2- )" + case "${_type}" in + *script*executable*) + ;; + *executable*) + ${BUILD_PREFIX}/bin/${CHOST}-strip --strip-all -v "${_file}" || : + ;; + esac + done +popd + +source ${RECIPE_DIR}/make_tool_links.sh diff --git a/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/recipe/parent/install-gcc.sh b/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/recipe/parent/install-gcc.sh new file mode 100644 index 0000000000000000000000000000000000000000..da5e0e54e5b5cfd10c4e0b3b0e70bf30a61baf23 --- /dev/null +++ b/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/recipe/parent/install-gcc.sh @@ -0,0 +1,262 @@ +#!/bin/bash + +source ${RECIPE_DIR}/setup_compiler.sh +set -e -x + +_libdir=libexec/gcc/${TARGET}/${PKG_VERSION} + +# libtool wants to use ranlib that is here, macOS install doesn't grok -t etc +# .. do we need this scoped over the whole file though? +#export PATH=${SRC_DIR}/gcc_built/bin:${SRC_DIR}/.build/${TARGET}/buildtools/bin:${SRC_DIR}/.build/tools/bin:${PATH} + +pushd ${SRC_DIR}/build + # We may not have built with plugin support so failure here is not fatal: + make prefix=${PREFIX} install-lto-plugin || true + + sed -i.bak 's/install-collect2: collect2 /install-collect2: collect2$(exeext) /g' gcc/Makefile + make -C gcc prefix=${PREFIX} install-driver install-cpp install-gcc-ar install-headers install-plugin install-lto-wrapper install-collect2 + # not sure if this is the same as the line above. Run both, just in case + make -C lto-plugin prefix=${PREFIX} install + install -dm755 ${PREFIX}/lib/bfd-plugins/ + + # statically linked, so this so does not exist + # ln -s $PREFIX/lib/gcc/$TARGET/liblto_plugin.so ${PREFIX}/lib/bfd-plugins/ + + make -C libcpp prefix=${PREFIX} install + + # Include languages we do not have any other place for here (and also lto1) + for file in gnat1 brig1 cc1 go1 lto1 cc1obj cc1objplus; do + if [[ -f gcc/${file}${EXEEXT} ]]; then + install -c gcc/${file}${EXEEXT} ${PREFIX}/${_libdir}/${file}${EXEEXT} + fi + done + + # https://github.com/gcc-mirror/gcc/blob/gcc-7_3_0-release/gcc/Makefile.in#L3481-L3526 + # Could have used install-common, but it also installs cxx binaries, which we + # don't want in this package. We could patch it, or use the loop below: + for file in gcov{,-tool,-dump}; do + if [[ -f gcc/${file}${EXEEXT} ]]; then + install -c gcc/${file}${EXEEXT} ${PREFIX}/bin/${TARGET}-${file}${EXEEXT} + fi + done + + make prefix=${PREFIX}/lib/gcc/${TARGET}/${gcc_version} install-libcc1 + install -d ${PREFIX}/share/gdb/auto-load/usr/lib + + make prefix=${PREFIX} install-fixincludes + make -C gcc prefix=${PREFIX} install-mkheaders + + if [[ -d ${TARGET}/libatomic ]]; then + make -C ${TARGET}/libatomic prefix=${PREFIX} install + fi + + if [[ -d ${TARGET}/libgomp ]]; then + make -C ${TARGET}/libgomp prefix=${PREFIX} install + fi + + if [[ -d ${TARGET}/libitm ]]; then + make -C ${TARGET}/libitm prefix=${PREFIX} install + fi + + if [[ -d ${TARGET}/libquadmath ]]; then + make -C ${TARGET}/libquadmath prefix=${PREFIX} install + fi + + if [[ -d ${TARGET}/libsanitizer ]]; then + make -C ${TARGET}/libsanitizer prefix=${PREFIX} install + fi + + if [[ -d ${TARGET}/libsanitizer/asan ]]; then + make -C ${TARGET}/libsanitizer/asan prefix=${PREFIX} install + fi + + if [[ -d ${TARGET}/libsanitizer/tsan ]]; then + make -C ${TARGET}/libsanitizer/tsan prefix=${PREFIX} install + fi + + make -C libiberty prefix=${PREFIX} install + # install PIC version of libiberty + if [[ "${TARGET}" != *mingw* ]]; then + install -m644 libiberty/pic/libiberty.a ${PREFIX}/lib/gcc/${TARGET}/${gcc_version} + else + install -m644 libiberty/libiberty.a ${PREFIX}/lib/gcc/${TARGET}/${gcc_version} + fi + + make -C gcc prefix=${PREFIX} install-man install-info + + make -C gcc prefix=${PREFIX} install-po + + # many packages expect this symlink + [[ -f ${PREFIX}/bin/${TARGET}-cc${EXEEXT} ]] && rm ${PREFIX}/bin/${TARGET}-cc${EXEEXT} + pushd ${PREFIX}/bin + if [[ "${HOST}" != *mingw* ]]; then + ln -s ${TARGET}-gcc${EXEEXT} ${TARGET}-cc${EXEEXT} + else + cp ${TARGET}-gcc${EXEEXT} ${TARGET}-cc${EXEEXT} + fi + popd + + # POSIX conformance launcher scripts for c89 and c99 + cat > ${PREFIX}/bin/${TARGET}-c89${EXEEXT} <<"EOF" +#!/bin/sh +fl="-std=c89" +for opt; do + case "$opt" in + -ansi|-std=c89|-std=iso9899:1990) fl="";; + -std=*) echo "`basename $0` called with non ANSI/ISO C option $opt" >&2 + exit 1;; + esac +done +exec ${TARGET}-c89${EXEEXT} $fl ${1+"$@"} +EOF + + cat > ${PREFIX}/bin/${TARGET}-c99${EXEEXT} <<"EOF" +#!/bin/sh +fl="-std=c99" +for opt; do + case "$opt" in + -std=c99|-std=iso9899:1999) fl="";; + -std=*) echo "`basename $0` called with non ISO C99 option $opt" >&2 + exit 1;; + esac +done +exec ${TARGET}-c99${EXEEXT} $fl ${1+"$@"} +EOF + + chmod 755 ${PREFIX}/bin/${TARGET}-c{8,9}9${EXEEXT} + + rm ${PREFIX}/bin/${TARGET}-gcc-${PKG_VERSION}${EXEEXT} + +popd + +# generate specfile so that we can patch loader link path +# link_libgcc should have the gcc's own libraries by default (-R) +# so that LD_LIBRARY_PATH isn't required for basic libraries. +# +# GF method here to create specs file and edit it. The other methods +# tried had no effect on the result. including: +# setting LINK_LIBGCC_SPECS on configure +# setting LINK_LIBGCC_SPECS on make +# setting LINK_LIBGCC_SPECS in gcc/Makefile +specdir=$PREFIX/lib/gcc/$TARGET/${gcc_version} +if [[ "$build_platform" == "$target_platform" ]]; then + $PREFIX/bin/${TARGET}-gcc${EXEEXT} -dumpspecs > $specdir/specs + # validate assumption that specs in build/gcc/specs are exactly the + # same as dumped specs so that I don't need to depend on gcc_impl in conda-gcc-specs subpackage + diff -s ${SRC_DIR}/build/gcc/specs $specdir/specs +elif [[ "$target_platform" == "$cross_target_platform" && ${TARGET} != *mingw* ]]; then + # For support of of native specs, we need this + # This is the only place where we need QEMU. + # Remove this elif condition for local experimentation if you + # do not have QEMU setup + $PREFIX/bin/${TARGET}-gcc -dumpspecs > $specdir/specs +else + $BUILD_PREFIX/bin/${TARGET}-gcc -dumpspecs > $specdir/specs + # validate assumption that specs in build/gcc/specs are exactly the + # same as dumped specs so that I don't need to depend on gcc_impl in conda-gcc-specs subpackage + diff -s ${SRC_DIR}/build/gcc/specs $specdir/specs +fi + +# make a copy of the specs without our additions so that people can choose not to use them +# by passing -specs=builtin.specs +cp $specdir/specs $specdir/builtin.specs + +# modify the default specs to only have %include_noerr that includes an optional conda.specs +# package installable via the conda-gcc-specs package where conda.specs (for $cross_target_platform +# == $target_platform) will add the minimal set of flags for the 'native' toolchains to be useable +# without anything additional set in the enviornment or extra cmdline args. +echo "%include_noerr " >> $specdir/specs + +# We use double quotes here because we want $PREFIX and $TARGET to be expanded at build time +# and recorded in the specs file. It will undergo a prefix replacement when our compiler +# package is installed. +sed -i -e "/\*link_command:/,+1 s+%.*+& %{!static:-rpath ${PREFIX}/lib}+" $specdir/specs + + +# Install Runtime Library Exception +install -Dm644 $SRC_DIR/COPYING.RUNTIME \ + ${PREFIX}/share/licenses/gcc/RUNTIME.LIBRARY.EXCEPTION + +set +x +# Strip executables, we may want to install to a different prefix +# and strip in there so that we do not change files that are not +# part of this package. +pushd ${PREFIX} + _files=$(find bin libexec -type f -not -name '*.dll') + for _file in ${_files}; do + _type="$( file "${_file}" | cut -d ' ' -f 2- )" + case "${_type}" in + *script*executable*) + ;; + *executable*) + ${BUILD_PREFIX}/bin/${TARGET}-strip --strip-all -v "${_file}" || : + ;; + esac + done +popd + +set -x + +#${PREFIX}/bin/${TARGET}-gcc "${RECIPE_DIR}"/c11threads.c -std=c11 + +mkdir -p ${PREFIX}/${TARGET}/lib +mkdir -p ${PREFIX}/lib/gcc/${TARGET}/${gcc_version} + +if [[ "$target_platform" == "$cross_target_platform" ]]; then + # making these this way so conda build doesn't muck with them + pushd ${PREFIX}/${TARGET}/lib + if [[ "${TARGET}" != *mingw* ]]; then + ln -sf ../../lib/libgomp.so libgomp.so + for lib in libgfortran libatomic libquadmath libitm lib{a,hwa,l,ub,t}san; do + for f in ${PREFIX}/lib/${lib}.so*; do + ln -s ../../lib/$(basename $f) ${PREFIX}/${TARGET}/lib/$(basename $f) + done + done + fi + + for f in ${PREFIX}/lib/*.spec; do + mv $f ${PREFIX}/${TARGET}/lib/$(basename $f) + done + if [[ "${TARGET}" != *mingw* ]]; then + for f in ${PREFIX}/lib/*.o; do + mv $f ${PREFIX}/${TARGET}/lib/$(basename $f) + done + fi + popd + for lib in asan atomic gomp hwasan itm lsan quadmath tsan ubsan; do + if [[ -f "${PREFIX}/lib/lib${lib}.a" ]]; then + mv ${PREFIX}/lib/lib${lib}.*a ${PREFIX}/lib/gcc/${TARGET}/${gcc_version}/ + fi + done + for lib in libasan.so libatomic.so libgomp.so libhwasan.so libitm.so liblsan.so libquadmath.so libtsan.so libubsan.so libstdc++.so libstdc++.so.6 libgcc_s.so; do + if [[ -f "${PREFIX}/lib/${lib}" ]]; then + # install a shared library here since the directory ${PREFIX}/lib/gcc/${TARGET}/${gcc_version} + # has the highest preference and we want shared libraries to have the highest preference + rm ${PREFIX}/lib/${lib} + ln -sf ${PREFIX}/lib/${lib} ${PREFIX}/lib/gcc/${TARGET}/${gcc_version}/ + fi + done +else + source ${RECIPE_DIR}/install-libgcc.sh + for lib in libcc1; do + mv ${PREFIX}/lib/${lib}.so* ${PREFIX}/${TARGET}/lib/ || true + mv ${PREFIX}/lib/${lib}.so* ${PREFIX}/${TARGET}/lib/ || true + done + rm -f ${PREFIX}/share/info/*.info + for lib in asan atomic gomp hwasan itm lsan quadmath tsan ubsan; do + if [[ -f "${PREFIX}/${TARGET}/lib/lib${lib}.a" ]]; then + mv ${PREFIX}/${TARGET}/lib/lib${lib}.*a ${PREFIX}/lib/gcc/${TARGET}/${gcc_version}/ + fi + if [[ -f "${PREFIX}/${TARGET}/lib/lib${lib}.so" ]]; then + ln -sf ${PREFIX}/${TARGET}/lib/lib${lib}.so ${PREFIX}/lib/gcc/${TARGET}/${gcc_version}/ + fi + done +fi + +if [[ -f ${PREFIX}/lib/libgomp.spec ]]; then + mv ${PREFIX}/lib/libgomp.spec ${PREFIX}/${TARGET}/lib/libgomp.spec +fi + +rm -f ${PREFIX}/share/info/dir + +source ${RECIPE_DIR}/make_tool_links.sh diff --git a/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/recipe/parent/install-gdb-pretty-printer.sh b/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/recipe/parent/install-gdb-pretty-printer.sh new file mode 100644 index 0000000000000000000000000000000000000000..c73dfd015673e079a1d2df9e656fb2e20d7bca1a --- /dev/null +++ b/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/recipe/parent/install-gdb-pretty-printer.sh @@ -0,0 +1,10 @@ +set -e -x + +# install gcc's gdbhooks ... +mkdir -p "$SP_DIR"/gcc +cp $SRC_DIR/gcc/gcc/gdbhooks.py "$SP_DIR"/gcc/. + +# install libstdc++'s pretty printer support +cp -r $SRC_DIR/gcc/libstdc++-v3/python/libstdcxx "$SP_DIR"/. + +exit 0 diff --git a/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/recipe/parent/install-gfortran.sh b/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/recipe/parent/install-gfortran.sh new file mode 100644 index 0000000000000000000000000000000000000000..46d877def15e561206381f98e1db227944f02256 --- /dev/null +++ b/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/recipe/parent/install-gfortran.sh @@ -0,0 +1,81 @@ +#!/bin/bash + +source ${RECIPE_DIR}/setup_compiler.sh +set -e -x + +export CHOST="${triplet}" +_libdir=libexec/gcc/${CHOST}/${PKG_VERSION} + +# libtool wants to use ranlib that is here, macOS install doesn't grok -t etc +# .. do we need this scoped over the whole file though? +#export PATH=${SRC_DIR}/gcc_built/bin:${SRC_DIR}/.build/${CHOST}/buildtools/bin:${SRC_DIR}/.build/tools/bin:${PATH} + +pushd ${SRC_DIR}/build + +# adapted from Arch install script from https://github.com/archlinuxarm/PKGBUILDs/blob/master/core/gcc/PKGBUILD +# We cannot make install since .la files are not relocatable so libtool deliberately prevents it: +# libtool: install: error: cannot install `libgfortran.la' to a directory not ending in ${SRC_DIR}/work/gcc_built/${CHOST}/lib/../lib +make -C ${CHOST}/libgfortran prefix=${PREFIX} all-multi libgfortran.spec ieee_arithmetic.mod ieee_exceptions.mod ieee_features.mod config.h +make -C gcc prefix=${PREFIX} fortran.install-{common,man,info} + +# How it used to be: +# install -Dm755 gcc/f951 ${PREFIX}/${_libdir}/f951 +for file in f951; do + if [[ -f gcc/${file}${EXEEXT} ]]; then + install -c gcc/${file}${EXEEXT} ${PREFIX}/${_libdir}/${file}${EXEEXT} + fi +done + +mkdir -p ${PREFIX}/${CHOST}/lib +cp ${CHOST}/libgfortran/libgfortran.spec ${PREFIX}/${CHOST}/lib + +pushd ${PREFIX}/bin + if [[ "${target_platform}" != "win-64" ]]; then + ln -sf ${CHOST}-gfortran${EXEEXT} ${CHOST}-f95${EXEEXT} + else + cp ${CHOST}-gfortran${EXEEXT} ${CHOST}-f95${EXEEXT} + fi +popd + +make install DESTDIR=$SRC_DIR/build-finclude +mkdir -p $PREFIX/lib/gcc/${CHOST}/${gcc_version}/finclude +mkdir -p $PREFIX/lib/gcc/${CHOST}/${gcc_version}/include +install -Dm644 $SRC_DIR/build-finclude/$PREFIX/lib/gcc/${CHOST}/${gcc_version}/finclude/* $PREFIX/lib/gcc/${CHOST}/${gcc_version}/finclude/ +install -Dm644 $SRC_DIR/build-finclude/$PREFIX/lib/gcc/${CHOST}/${gcc_version}/include/*.h $PREFIX/lib/gcc/${CHOST}/${gcc_version}/include/ + +# Install Runtime Library Exception +install -Dm644 $SRC_DIR/COPYING.RUNTIME \ + ${PREFIX}/share/licenses/gcc-fortran/RUNTIME.LIBRARY.EXCEPTION + +if [[ "${target_platform}" != "${cross_target_platform}" ]]; then + if [[ ${triplet} == *linux* ]]; then + cp -f --no-dereference ${SRC_DIR}/build/${CHOST}/libgfortran/.libs/libgfortran*.so* ${PREFIX}/${CHOST}/lib/ + fi +fi +cp -f --no-dereference ${SRC_DIR}/build/${CHOST}/libgfortran/.libs/libgfortran.*a ${PREFIX}/${CHOST}/lib/ + +set +x +# Strip executables, we may want to install to a different prefix +# and strip in there so that we do not change files that are not +# part of this package. +pushd ${PREFIX} + _files=$(find bin libexec -type f -not -name '*.dll') + for _file in ${_files}; do + _type="$( file "${_file}" | cut -d ' ' -f 2- )" + case "${_type}" in + *script*executable*) + ;; + *executable*) + ${BUILD_PREFIX}/bin/${CHOST}-strip --strip-all -v "${_file}" || : + ;; + esac + done +popd + +if [[ -f ${PREFIX}/lib/libgomp.spec ]]; then + mv ${PREFIX}/lib/libgomp.spec ${PREFIX}/${CHOST}/lib/libgomp.spec +fi + +rm -f ${PREFIX}/share/info/dir + +source ${RECIPE_DIR}/make_tool_links.sh diff --git a/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/recipe/parent/install-libgcc-devel.sh b/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/recipe/parent/install-libgcc-devel.sh new file mode 100644 index 0000000000000000000000000000000000000000..6ba08fc16608017c3a0545c4d8984f9aa7586a25 --- /dev/null +++ b/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/recipe/parent/install-libgcc-devel.sh @@ -0,0 +1,31 @@ +#!/bin/bash + +source ${RECIPE_DIR}/setup_compiler.sh +set -e -x + +export CHOST="${triplet}" + +# libtool wants to use ranlib that is here, macOS install doesn't grok -t etc +# .. do we need this scoped over the whole file though? +#export PATH=${SRC_DIR}/gcc_built/bin:${SRC_DIR}/.build/${CHOST}/buildtools/bin:${SRC_DIR}/.build/tools/bin:${PATH} + +pushd ${SRC_DIR}/build + +make -C ${CHOST}/libgcc prefix=${PREFIX} install + +# ${PREFIX}/lib/libgcc_s.so* goes into libgcc output, but +# avoid that the equivalents in ${PREFIX}/${CHOST}/lib end up +# in gcc_impl_{{ cross_target_platform }}, c.f. install-gcc.sh +mkdir -p ${PREFIX}/${CHOST}/lib +if [[ "${triplet}" == *linux* ]]; then + mv ${PREFIX}/lib/libgcc_s.so* ${PREFIX}/${CHOST}/lib +else + # import library, not static library + mv ${PREFIX}/lib/libgcc_s.a ${PREFIX}/${CHOST}/lib + rm ${PREFIX}/lib/libgcc_s*.dll || true +fi +# This is in gcc_impl as it is gcc specific and clang has the same header +rm -rf ${PREFIX}/lib/gcc/${CHOST}/${gcc_version}/include/unwind.h + +popd + diff --git a/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/recipe/parent/install-libgcc-no-gomp.sh b/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/recipe/parent/install-libgcc-no-gomp.sh new file mode 100644 index 0000000000000000000000000000000000000000..e792608072235cedbc2836ec05a7bc9326d53862 --- /dev/null +++ b/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/recipe/parent/install-libgcc-no-gomp.sh @@ -0,0 +1,31 @@ +#!/bin/bash + +source ${RECIPE_DIR}/setup_compiler.sh +set -e -x + +export CHOST="${triplet}" + +# we have to remove existing links/files so that the libgcc install works +rm -rf ${PREFIX}/lib/* +rm -rf ${PREFIX}/share/* +rm -f ${PREFIX}/${CHOST}/lib/libgomp* + +# now run install of libgcc +# this reinstalls the wrong symlinks for openmp +source ${RECIPE_DIR}/install-libgcc.sh + +# remove and relink things for openmp +rm -f ${PREFIX}/lib/libgomp.so +rm -f ${PREFIX}/${CHOST}/lib/libgomp.so +rm -f ${PREFIX}/lib/libgomp.so.${libgomp_ver:0:1} +rm -f ${PREFIX}/${CHOST}/lib/libgomp.so.${libgomp_ver:0:1} +rm -f ${PREFIX}/${CHOST}/lib/libgomp.so.${libgomp_ver} + +# (re)make the right links +# note that this code is remaking more links than the ones we want in this +# package but that is ok +pushd ${PREFIX}/lib + if [[ "${TARGET}" != *mingw* ]]; then + ln -s libgomp.so.${libgomp_ver} libgomp.so.${libgomp_ver:0:1} + fi +popd diff --git a/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/recipe/parent/install-libgcc.sh b/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/recipe/parent/install-libgcc.sh new file mode 100644 index 0000000000000000000000000000000000000000..34a2effaa2d99c20bf30004b03a5fed5ba1fdbdb --- /dev/null +++ b/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/recipe/parent/install-libgcc.sh @@ -0,0 +1,82 @@ +#!/bin/bash + +source ${RECIPE_DIR}/setup_compiler.sh +set -e -x + +# libtool wants to use ranlib that is here, macOS install doesn't grok -t etc +# .. do we need this scoped over the whole file though? +#export PATH=${SRC_DIR}/gcc_built/bin:${SRC_DIR}/.build/${TARGET}/buildtools/bin:${SRC_DIR}/.build/tools/bin:${PATH} + +pushd ${SRC_DIR}/build + + if [[ "${PKG_NAME}" == "libgcc" ]]; then + make -C ${TARGET}/libgcc prefix=${PREFIX} install-shared + if [[ "${TARGET}" == *mingw* ]]; then + mv $PREFIX/lib/libgcc_s*.dll $PREFIX/bin + fi + elif [[ "${PKG_NAME}" != "gcc_impl"* ]]; then + # when building a cross compiler, above make line will clobber $PREFIX/lib/libgcc_s.so.1 + # and fail after some point for some architectures. To avoid that, we copy manually + pushd ${TARGET}/libgcc + mkdir -p ${PREFIX}/lib/gcc/${TARGET}/${gcc_version} + install -c -m 644 libgcc_eh.a ${PREFIX}/lib/gcc/${TARGET}/${gcc_version}/libgcc_eh.a + chmod 644 ${PREFIX}/lib/gcc/${TARGET}/${gcc_version}/libgcc_eh.a + ${TARGET}-ranlib ${PREFIX}/lib/gcc/${TARGET}/${gcc_version}/libgcc_eh.a + + mkdir -p ${PREFIX}/${TARGET}/lib + if [[ "${triplet}" == *linux* ]]; then + install -c -m 644 ./libgcc_s.so.1 ${PREFIX}/${TARGET}/lib/libgcc_s.so.1 + cp $RECIPE_DIR/libgcc_s.so.ldscript ${PREFIX}/${TARGET}/lib/libgcc_s.so + else + # import library, not static library + install -c -m 644 ./shlib/libgcc_s.a ${PREFIX}/${TARGET}/lib/libgcc_s.a + fi + popd + fi + + # TODO :: Also do this for libgfortran (and libstdc++ too probably?) + if [[ -f ${TARGET}/libsanitizer/libtool ]]; then + sed -i.bak 's/.*cannot install.*/func_warning "Ignoring libtool error about cannot install to a directory not ending in"/' \ + ${TARGET}/libsanitizer/libtool + fi + for lib in libatomic libgomp libquadmath libitm libvtv libsanitizer/{a,hwa,l,ub,t}san; do + # TODO :: Also do this for libgfortran (and libstdc++ too probably?) + if [[ -f ${TARGET}/${lib}/libtool ]]; then + sed -i.bak 's/.*cannot install.*/func_warning "Ignoring libtool error about cannot install to a directory not ending in"/' \ + ${TARGET}/${lib}/libtool + fi + if [[ -d ${TARGET}/${lib} ]]; then + make -C ${TARGET}/${lib} prefix=${PREFIX} install-toolexeclibLTLIBRARIES + make -C ${TARGET}/${lib} prefix=${PREFIX} install-nodist_fincludeHEADERS || true + fi + done + + for lib in libgomp libquadmath; do + if [[ -d ${TARGET}/${lib} ]]; then + make -C ${TARGET}/${lib} prefix=${PREFIX} install-info + fi + done + +popd + +mkdir -p ${PREFIX}/lib + +if [[ "${PKG_NAME}" != "gcc_impl"* ]]; then + # no static libs + find ${PREFIX}/lib -name "*\.a" -exec rm -rf {} \; +fi +# no libtool files +find ${PREFIX}/lib -name "*\.la" -exec rm -rf {} \; + +if [[ "${PKG_NAME}" != gcc_impl* ]]; then + # mv ${PREFIX}/${TARGET}/lib/* ${PREFIX}/lib + # clean up empty folder + rm -rf ${PREFIX}/lib/gcc + rm -rf ${PREFIX}/lib/lib{a,hwa,l,ub,t}san.so* + + # Install Runtime Library Exception + install -Dm644 ${SRC_DIR}/COPYING.RUNTIME \ + ${PREFIX}/share/licenses/gcc-libs/RUNTIME.LIBRARY.EXCEPTION +fi + +rm -f ${PREFIX}/share/info/dir diff --git a/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/recipe/parent/install-libgfortran.sh b/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/recipe/parent/install-libgfortran.sh new file mode 100644 index 0000000000000000000000000000000000000000..031da5eca76ae9762aa193eb3310b7923fd844c6 --- /dev/null +++ b/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/recipe/parent/install-libgfortran.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +source ${RECIPE_DIR}/setup_compiler.sh +set -e -x + +rm -f ${PREFIX}/lib/libgfortran* || true + +if [[ "${TARGET}" == *mingw* ]]; then + mkdir -p ${PREFIX}/bin/ + cp ${SRC_DIR}/build/${TARGET}/libgfortran/.libs/libgfortran*.dll ${PREFIX}/bin/ +else + mkdir -p ${PREFIX}/lib + cp -f --no-dereference ${SRC_DIR}/build/${TARGET}/libgfortran/.libs/libgfortran*.so* ${PREFIX}/lib/ +fi + +# Install Runtime Library Exception +install -Dm644 $SRC_DIR/COPYING.RUNTIME \ + ${PREFIX}/share/licenses/libgfortran/RUNTIME.LIBRARY.EXCEPTION diff --git a/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/recipe/parent/install-libgomp.sh b/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/recipe/parent/install-libgomp.sh new file mode 100644 index 0000000000000000000000000000000000000000..cdd189f59dd81af7df42846c40b9300bf64dcd1e --- /dev/null +++ b/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/recipe/parent/install-libgomp.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +source ${RECIPE_DIR}/setup_compiler.sh + +cd build + +make -C ${triplet}/libgomp prefix=${PREFIX} install-toolexeclibLTLIBRARIES +rm ${PREFIX}/lib/libgomp.a ${PREFIX}/lib/libgomp.la + +if [[ "$target_platform" == "linux-"* ]]; then + rm ${PREFIX}/lib/libgomp.so.1 + rm ${PREFIX}/lib/libgomp.so + ln -sf ${PREFIX}/lib/libgomp.so.${libgomp_ver} ${PREFIX}/lib/libgomp.so +else + rm ${PREFIX}/lib/libgomp.dll.a +fi + +# Install Runtime Library Exception +install -Dm644 ${SRC_DIR}/COPYING.RUNTIME \ + ${PREFIX}/share/licenses/gcc-libs/RUNTIME.LIBRARY.EXCEPTION.gomp_copy diff --git a/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/recipe/parent/install-libsanitizer.sh b/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/recipe/parent/install-libsanitizer.sh new file mode 100644 index 0000000000000000000000000000000000000000..2ef36d3bb8c750e42929f231de9d22a6e0addd40 --- /dev/null +++ b/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/recipe/parent/install-libsanitizer.sh @@ -0,0 +1,32 @@ +#!/bin/bash + +source ${RECIPE_DIR}/setup_compiler.sh +set -e -x + +export CHOST="${triplet}" + +mkdir -p ${PREFIX}/lib + +pushd ${SRC_DIR}/build + + # TODO :: Also do this for libgfortran (and libstdc++ too probably?) + sed -i.bak 's/.*cannot install.*/func_warning "Ignoring libtool error about cannot install to a directory not ending in"/' \ + ${CHOST}/libsanitizer/libtool + for lib in libsanitizer/{a,hwa,l,ub,t}san; do + # TODO :: Also do this for libgfortran (and libstdc++ too probably?) + if [[ -f ${CHOST}/${lib}/libtool ]]; then + sed -i.bak 's/.*cannot install.*/func_warning "Ignoring libtool error about cannot install to a directory not ending in"/' \ + ${CHOST}/${lib}/libtool + fi + if [[ -d ${CHOST}/${lib} ]]; then + make -C ${CHOST}/${lib} prefix=${PREFIX} install-toolexeclibLTLIBRARIES + make -C ${CHOST}/${lib} prefix=${PREFIX} install-nodist_fincludeHEADERS || true + fi + done + +popd + +# no static libs +find ${PREFIX}/lib -name "*\.a" -exec rm -rf {} \; +# no libtool files +find ${PREFIX}/lib -name "*\.la" -exec rm -rf {} \; diff --git a/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/recipe/parent/install-libstdc++-devel.sh b/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/recipe/parent/install-libstdc++-devel.sh new file mode 100644 index 0000000000000000000000000000000000000000..63b0439991dbb35a966fa02069d04899b13420f2 --- /dev/null +++ b/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/recipe/parent/install-libstdc++-devel.sh @@ -0,0 +1,33 @@ +#!/bin/bash + +source ${RECIPE_DIR}/setup_compiler.sh +set -e -x + +export CHOST="${triplet}" + +# libtool wants to use ranlib that is here, macOS install doesn't grok -t etc +# .. do we need this scoped over the whole file though? +# export PATH=${SRC_DIR}/gcc_built/bin:${SRC_DIR}/.build/${CHOST}/buildtools/bin:${SRC_DIR}/.build/tools/bin:${PATH} + +pushd ${SRC_DIR}/build + +make -C $CHOST/libstdc++-v3/src prefix=${PREFIX} install +make -C $CHOST/libstdc++-v3/include prefix=${PREFIX} install +make -C $CHOST/libstdc++-v3/libsupc++ prefix=${PREFIX} install + +mkdir -p ${PREFIX}/lib/gcc/${CHOST}/${gcc_version} +mkdir -p ${PREFIX}/${CHOST}/lib + +if [[ "$target_platform" == "$cross_target_platform" ]]; then + mv $PREFIX/lib/lib*.a ${PREFIX}/lib/gcc/${CHOST}/${gcc_version}/ + if [[ "$target_platform" == linux-* ]]; then + mv ${PREFIX}/lib/libstdc++.so* ${PREFIX}/${CHOST}/lib + else + rm ${PREFIX}/bin/libstdc++*.dll + fi +else + mv $PREFIX/${CHOST}/lib/lib*.a ${PREFIX}/lib/gcc/${CHOST}/${gcc_version}/ +fi + +popd + diff --git a/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/recipe/parent/install-libstdc++.sh b/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/recipe/parent/install-libstdc++.sh new file mode 100644 index 0000000000000000000000000000000000000000..3d878849ae7b3d9282a04a885cd29df782b7d038 --- /dev/null +++ b/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/recipe/parent/install-libstdc++.sh @@ -0,0 +1,29 @@ +#!/bin/bash + +source ${RECIPE_DIR}/setup_compiler.sh +set -e -x + +export CHOST="${triplet}" + +# libtool wants to use ranlib that is here, macOS install doesn't grok -t etc +# .. do we need this scoped over the whole file though? +#export PATH=${SRC_DIR}/gcc_built/bin:${SRC_DIR}/.build/${CHOST}/buildtools/bin:${SRC_DIR}/.build/tools/bin:${PATH} + +pushd ${SRC_DIR}/build + + make -C ${CHOST}/libstdc++-v3/src prefix=${PREFIX} install-toolexeclibLTLIBRARIES + make -C ${CHOST}/libstdc++-v3/po prefix=${PREFIX} install + +popd + +mkdir -p ${PREFIX}/lib +#mv ${PREFIX}/${CHOST}/lib/* ${PREFIX}/lib + +# no static libs +find ${PREFIX}/lib -name "*\.a" -exec rm -rf {} \; +# no libtool files +find ${PREFIX}/lib -name "*\.la" -exec rm -rf {} \; + +# Install Runtime Library Exception +install -Dm644 ${SRC_DIR}/COPYING.RUNTIME \ + ${PREFIX}/share/licenses/libstdc++/RUNTIME.LIBRARY.EXCEPTION diff --git a/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/recipe/parent/install-openmp_impl.sh b/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/recipe/parent/install-openmp_impl.sh new file mode 100644 index 0000000000000000000000000000000000000000..c4ebad09aa18a43830fe2e9be9be97c9e965c354 --- /dev/null +++ b/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/recipe/parent/install-openmp_impl.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +source ${RECIPE_DIR}/setup_compiler.sh +set -e -x + +mkdir -p ${PREFIX}/lib + +pushd ${PREFIX}/lib/ + +if [[ "${TARGET}" != *mingw* ]]; then + ln -s libgomp.so.${libgomp_ver} libgomp.so.${libgomp_ver:0:1} +fi +popd diff --git a/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/recipe/parent/install-symlinks.sh b/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/recipe/parent/install-symlinks.sh new file mode 100644 index 0000000000000000000000000000000000000000..fd4887286b42cf9e1effd5a1931b9dc3224a3d9a --- /dev/null +++ b/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/recipe/parent/install-symlinks.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +source ${RECIPE_DIR}/setup_compiler.sh + +if [[ "$target_platform" == "win-"* ]]; then + symlink_or_copy="cp" +else + symlink_or_copy="ln -sf" +fi + +if [[ "${PKG_NAME}" == "gcc" ]]; then + for tool in cc cpp gcc gcc-ar gcc-nm gcc-ranlib gcov gcov-dump gcov-tool; do + $symlink_or_copy ${PREFIX}/bin/${triplet}-${tool}${EXEEXT} ${PREFIX}/bin/${tool}${EXEEXT} + done +elif [[ "${PKG_NAME}" == "gxx" ]]; then + $symlink_or_copy ${PREFIX}/bin/${triplet}-g++${EXEEXT} ${PREFIX}/bin/g++${EXEEXT} + $symlink_or_copy ${PREFIX}/bin/${triplet}-c++${EXEEXT} ${PREFIX}/bin/c++${EXEEXT} +elif [[ "${PKG_NAME}" == "gfortran" ]]; then + $symlink_or_copy ${PREFIX}/bin/${triplet}-gfortran${EXEEXT} ${PREFIX}/bin/gfortran${EXEEXT} +fi diff --git a/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/recipe/parent/libgcc_s.so.ldscript b/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/recipe/parent/libgcc_s.so.ldscript new file mode 100644 index 0000000000000000000000000000000000000000..c8e92242fc5b32888222e279088df08e791bd52c --- /dev/null +++ b/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/recipe/parent/libgcc_s.so.ldscript @@ -0,0 +1,4 @@ +/* GNU ld script + Use the shared library, but some functions are only in + the static library. */ +GROUP ( libgcc_s.so.1 -lgcc ) diff --git a/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/recipe/parent/make_tool_links.sh b/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/recipe/parent/make_tool_links.sh new file mode 100644 index 0000000000000000000000000000000000000000..26ad874c355cef4faa81da40d32fd985742f6262 --- /dev/null +++ b/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/recipe/parent/make_tool_links.sh @@ -0,0 +1,11 @@ +# When host=target, gcc installs un-prefixed tools together with prefixed-tools +# In the case of cpp, only un-prefixed cpp. Let's copy the un-prefixed tool +# to prefix-tool and delete the un-prefixed one to get back ct-ng behaviour +for tool in gcc g++ gfortran cpp gcc-ar gcc-nm gcc-ranlib c++; do + if [ -f ${PREFIX}/bin/${tool}${EXEEXT} ]; then + if [ ! -f ${PREFIX}/bin/${triplet}-${tool}${EXEEXT} ]; then + cp ${PREFIX}/bin/${tool}${EXEEXT} ${PREFIX}/bin/${triplet}-${tool}${EXEEXT} + fi + rm ${PREFIX}/bin/${tool}${EXEEXT} + fi +done diff --git a/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/recipe/parent/meta.yaml b/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/recipe/parent/meta.yaml new file mode 100644 index 0000000000000000000000000000000000000000..d03f46ee81c2daee15e45ed5cfec75271e09891e --- /dev/null +++ b/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/recipe/parent/meta.yaml @@ -0,0 +1,775 @@ +{% set version = gcc_version %} +{% set build_num = 7 %} + +{% if gcc_maj_ver is not defined %} +{% set gcc_maj_ver = 15 %} +{% endif %} + +# libgcc-devel is a noarch: generic package that is built for +# cross-compilers as well. Instead of skipping for cross-compilers, +# let's prioritize the native compilers package +{% if target_platform == cross_target_platform %} +{% set libgcc_devel_build_num = build_num + 100 %} +{% else %} +{% set libgcc_devel_build_num = build_num %} +{% endif %} + +{% if cross_target_platform is not defined %} +{% set cross_target_platform = "linux-64" %} +{% endif %} + +package: + name: gcc_compilers + version: {{ version }} + +source: + - url: + - https://ftp.gnu.org/gnu/gcc/gcc-{{ version }}/gcc-{{ version }}.tar.gz + - https://mirrors.ocf.berkeley.edu/gnu/gcc/gcc-{{ version }}/gcc-{{ version }}.tar.gz + sha256: 7294d65cc1a0558cb815af0ca8c7763d86f7a31199794ede3f630c0d1b0a5723 # [gcc_version == "15.2.0"] + sha256: ace8b8b0dbfe6abfc22f821cb093e195aa5498b7ccf7cd23e4424b9f14afed22 # [gcc_version == "14.3.0"] + sha256: bf0baf3e570c9c74c17c8201f0196c6924b4bd98c90e69d6b2ac0cd823f33bbc # [gcc_version == "13.4.0"] + patches: + - patches/0001-allow-commands-in-main-specfile.patch + - patches/0002-patch-zoneinfo_dir_override-to-point-to-our-tzdata.patch # [gcc_maj_ver != 13] + {% if cross_target_platform.startswith("linux-") %} + - patches/0003-add-ldl-to-libstdc___la_LDFLAGS.patch # [gcc_maj_ver != 13] + - patches/0004-Hardcode-HAVE_ALIGNED_ALLOC-1-in-libstdc-v3-configur.patch + {% else %} + # for GCC 15: https://github.com/msys2/MINGW-packages/tree/f59921184b35858d4ceb91679578de0d62475cbf/mingw-w64-gcc + # for GCC 14: https://github.com/msys2/MINGW-packages/tree/331bf945d21af562d228ed46bda21c8272d1e76e/mingw-w64-gcc + # for GCC 13: https://github.com/msys2/MINGW-packages/tree/4f1262b4e1072632eccf0958764f90d890b832ac/mingw-w64-gcc + - patches/mingw/{{ gcc_maj_ver }}/0002-Relocate-libintl.patch # [gcc_maj_ver == 13] + - patches/mingw/{{ gcc_maj_ver }}/0003-Windows-Follow-Posix-dir-exists-semantics-more-close.patch + - patches/mingw/{{ gcc_maj_ver }}/0005-Windows-Don-t-ignore-native-system-header-dir.patch + - patches/mingw/{{ gcc_maj_ver }}/0006-Windows-New-feature-to-allow-overriding.patch # [gcc_maj_ver == 13] + - patches/mingw/{{ gcc_maj_ver }}/0007-Build-EXTRA_GNATTOOLS-for-Ada.patch + - patches/mingw/{{ gcc_maj_ver }}/0008-Prettify-linking-no-undefined.patch + - patches/mingw/{{ gcc_maj_ver }}/0011-Enable-shared-gnat-implib.patch + - patches/mingw/{{ gcc_maj_ver }}/0012-Handle-spaces-in-path-for-default-manifest.patch + - patches/mingw/{{ gcc_maj_ver }}/0014-gcc-9-branch-clone_function_name_1-Retain-any-stdcall-suffix.patch + - patches/mingw/{{ gcc_maj_ver }}/0020-libgomp-Don-t-hard-code-MS-printf-attributes.patch + - patches/mingw/{{ gcc_maj_ver }}/0021-PR14940-Allow-a-PCH-to-be-mapped-to-a-different-addr.patch # [gcc_maj_ver != 15] + - patches/mingw/{{ gcc_maj_ver }}/0140-gcc-diagnostic-color.patch + - patches/mingw/{{ gcc_maj_ver }}/0200-add-m-no-align-vector-insn-option-for-i386.patch + - patches/mingw/{{ gcc_maj_ver }}/0300-override-builtin-printf-format.patch # [gcc_maj_ver == 13] + - patches/mingw/{{ gcc_maj_ver }}/2000-enable-rust.patch # [gcc_maj_ver == 13] + - patches/mingw/{{ gcc_maj_ver }}/2001-fix-building-rust-on-mingw-w64.patch + - patches/mingw/{{ gcc_maj_ver }}/2f7e7bfa3c6327793cdcdcb5c770b93cecd49bd0.patch # [gcc_maj_ver == 13] + - patches/mingw/{{ gcc_maj_ver }}/3eeb4801d6f45f6250fc77a6d3ab4e0115f8cfdd.patch # [gcc_maj_ver == 13] + - patches/mingw/{{ gcc_maj_ver }}/9002-native-tls.patch # [gcc_maj_ver == 15] + {% endif %} + +build: + number: {{ build_num }} + skip: True # [win] + skip: true # [not (linux or win) or (win and cross_target_platform != "win-64")] + detect_binary_files_with_prefix: false + ignore_run_exports_from: + - {{ cross_target_stdlib }}_{{ cross_target_platform }} + +requirements: + build: + # Build dependencies are installed in setup_compilers.sh due to + # conda-build bugs + host: + - {{ cross_target_stdlib }}_{{ cross_target_platform }} {{ cross_target_stdlib_version }} + +outputs: + - name: libgcc-devel_{{ cross_target_platform }} + script: install-libgcc-devel.sh + build: + noarch: generic + number: {{ libgcc_devel_build_num }} + detect_binary_files_with_prefix: false + missing_dso_whitelist: + - "*" + ignore_run_exports_from: + - {{ cross_target_stdlib }}_{{ cross_target_platform }} + overlinking_ignore_patterns: + - "*/lib/libgcc_s.so.*" + requirements: + build: + host: + - {{ cross_target_stdlib }}_{{ cross_target_platform }} {{ cross_target_stdlib_version }} + run: + - __unix # [unix] + - __win # [win] + test: + commands: + - test -f ${PREFIX}/lib/gcc/{{ triplet }}/{{ gcc_version }}/crtbegin.o + - test -f ${PREFIX}/lib/gcc/{{ triplet }}/{{ gcc_version }}/libgcc_eh.a + - test -f ${PREFIX}/lib/gcc/{{ triplet }}/{{ gcc_version }}/libgcc.a + {% if cross_target_platform.startswith("linux-") %} + - test -f ${PREFIX}/{{ triplet }}/lib/libgcc_s.so + {% else %} + - test -f ${PREFIX}/{{ triplet }}/lib/libgcc_s.a + {% endif %} + about: + summary: The GNU C development libraries and object files + home: https://gcc.gnu.org/ + license: GPL-3.0-only WITH GCC-exception-3.1 + + - name: libstdcxx-devel_{{ cross_target_platform }} + script: install-libstdc++-devel.sh + build: + noarch: generic + number: {{ libgcc_devel_build_num }} + detect_binary_files_with_prefix: false + missing_dso_whitelist: + - "*" + ignore_run_exports_from: + - {{ cross_target_stdlib }}_{{ cross_target_platform }} + overlinking_ignore_patterns: + - "*/lib/libstdc++.so.*" + requirements: + build: + host: + - {{ cross_target_stdlib }}_{{ cross_target_platform }} {{ cross_target_stdlib_version }} + run: + - __unix # [unix] + - __win # [win] + test: + commands: + - test -f ${PREFIX}/lib/gcc/{{ triplet }}/{{ gcc_version }}/libstdc++.a + - test -f ${PREFIX}/lib/gcc/{{ triplet }}/{{ gcc_version }}/libstdc++fs.a + - test -f ${PREFIX}/lib/gcc/{{ triplet }}/{{ gcc_version }}/libsupc++.a + - test -f ${PREFIX}/lib/gcc/{{ triplet }}/{{ gcc_version }}/include/c++/cstdio + {% if cross_target_platform.startswith("linux-") %} + - test -f ${PREFIX}/{{ triplet }}/lib/libstdc++.so + {% else %} + - test -f ${PREFIX}/lib/gcc/{{ triplet }}/{{ gcc_version }}/libstdc++.dll.a + {% endif %} + about: + summary: The GNU C++ headers and development libraries + home: https://gcc.gnu.org/ + license: GPL-3.0-only WITH GCC-exception-3.1 + + - name: gcc_impl_{{ cross_target_platform }} + script: install-gcc.sh + build: + number: {{ build_num }} + detect_binary_files_with_prefix: false + missing_dso_whitelist: + - '*' + ignore_run_exports_from: + - {{ cross_target_stdlib }}_{{ cross_target_platform }} + requirements: + build: + host: + - {{ cross_target_stdlib }}_{{ cross_target_platform }} {{ cross_target_stdlib_version }} + - {{ pin_subpackage("libgomp", exact=True) }} # [target_platform == cross_target_platform] + - {{ pin_subpackage("libstdcxx", exact=True) }} # [target_platform == cross_target_platform] + - {{ pin_subpackage("libgcc", exact=True) }} # [target_platform == cross_target_platform] + - {{ pin_subpackage("libgfortran" ~ libgfortran_soname) }} # [target_platform == cross_target_platform] + - {{ pin_subpackage("libsanitizer", exact=True) }} # [target_platform == cross_target_platform and not win] + run: + - binutils_impl_{{ cross_target_platform }} >={{ binutils_version }} + - {{ pin_subpackage("libgcc-devel_" ~ cross_target_platform, exact=True) }} + - {{ pin_subpackage("libsanitizer", exact=True) }} # [target_platform == cross_target_platform and not win] + # libstdcxx is a runtime dep of gcc because LTO requires it. + - {{ pin_subpackage("libstdcxx", max_pin=None) }} # [target_platform == cross_target_platform] + - {{ pin_subpackage("libgcc", max_pin=None) }} # [target_platform == cross_target_platform] + - {{ pin_subpackage("libgomp", max_pin=None) }} # [target_platform == cross_target_platform] + - {{ cross_target_stdlib }}_{{ cross_target_platform }} + run_exports: + # impose this requirement across the build/host boundary + strong: + - libgcc >={{ gcc_version }} + test: + requires: + - {{ cross_target_stdlib }}_{{ cross_target_platform }} {{ cross_target_stdlib_version }} + files: + - tests + commands: + - echo {{ c_stdlib }} + - echo {{ c_stdlib_version }} + - test -f ${PREFIX}/{{ triplet }}/lib/libgomp.so # [target_platform == cross_target_platform] + - test `readlink ${PREFIX}/{{ triplet }}/lib/libgomp.so` == "../../lib/libgomp.so" # [target_platform == cross_target_platform] + - test -f ${PREFIX}/bin/{{ triplet }}-gcc + - test -f ${PREFIX}/bin/{{ triplet }}-cpp + - test ! -f ${PREFIX}/bin/gcc + - test ! -f ${PREFIX}/bin/cpp + - CC=$(${PREFIX}/bin/*-gcc -dumpmachine)-gcc + - ${CC} -Wall tests/aligned_alloc.c -c -o c_aligned.o -v -Wl,-v -march=native # [target_platform == cross_target_platform and (x86_64 or s390x)] + # This test does not work well with QEMU + - ${CC} -Wall tests/aligned_alloc.c -c -o c_aligned.o -v -Wl,-v -mcpu=native # [target_platform == cross_target_platform and (not x86_64 and not s390x and not ppc64le)] + - ${CC} -Wall tests/aligned_alloc.c -c -o c_aligned.o -v -fsanitize=address # [cross_target_platform != "win-64"] + - ${CC} -Wall tests/aligned_alloc.c -c -o c_aligned.o -v # [cross_target_platform != "win-64"] + - ${CC} -Wall c_aligned.o -o c_aligned -v && ./c_aligned # [cross_target_platform == target_platform and cross_target_platform != "win-64"] + - ${CC} -Wall c_aligned.o -o c_aligned -Wl,-rpath,/foo && {{ triplet }}-readelf -d c_aligned | grep RPATH | grep "/foo:${PREFIX}/lib" # [cross_target_platform == target_platform and cross_target_platform != "win-64"] + - ${CC} -Wall tests/hello_world.c -c -o hello_world.o -v + - ${CC} -Wall hello_world.o -o hello_world -v + {% if cross_target_platform.startswith("linux-") %} + - test -f ${PREFIX}/{{ triplet }}/lib/libgcc_s.so + - test -f ${PREFIX}/{{ triplet }}/lib/libsanitizer.spec + - test -f ${PREFIX}/{{ triplet }}/lib/libasan_preinit.o + {% else %} + - test -f ${PREFIX}/{{ triplet }}/lib/libgcc_s.a + - test -f ${PREFIX}/lib/gcc/{{ triplet }}/{{ gcc_version }}/libquadmath.a + - test -f ${PREFIX}/lib/gcc/{{ triplet }}/{{ gcc_version }}/libgomp.a + {% endif %} + - test -f ${PREFIX}/{{ triplet }}/lib/libgomp.spec + about: + summary: GNU C Compiler + home: https://gcc.gnu.org/ + license: GPL-3.0-only WITH GCC-exception-3.1 + + - name: gcc + script: install-symlinks.sh + build: + skip: true # [target_platform != cross_target_platform] + track_features: # [not with_conda_specs] + - gcc_no_conda_specs # [not with_conda_specs] + requirements: + host: + - gcc_impl_{{ target_platform }} {{ gcc_version }}.* + run: + - gcc_impl_{{ target_platform }} {{ gcc_version }}.* + - conda-gcc-specs # [with_conda_specs] + test: + commands: + - ${PREFIX}/bin/gcc -v + - ${PREFIX}/bin/gcov -v + about: + summary: GNU C native compiler (symlinks) + home: https://github.com/conda-forge/ctng-compilers-feedstock + license: BSD-3-Clause + license_file: LICENSE + + - name: gcc-no-conda-specs + build: + skip: true # [with_conda_specs] + requirements: + run: + - gcc + run_constrained: + - conda-gcc-specs <0.0a0 + test: + commands: + - gcc --version + + - name: conda-gcc-specs + script: install-conda-specs.sh + build: + number: {{ build_num }} + skip: true # [cross_target_platform != target_platform] + detect_binary_files_with_prefix: false + requirements: + build: + run: + - {{ pin_subpackage("gcc_impl_" ~ cross_target_platform, max_pin='x.x.x.x') }} + test: + files: + - tests + commands: + - specdir=$PREFIX/lib/gcc/{{ triplet }}/{{ gcc_version }} + - test -f $specdir/conda.specs + - CC=$(${PREFIX}/bin/*-gcc -dumpmachine)-gcc + - echo | ${CC} -E -v -x c - |& grep '^Reading specs from' | awk '{print $NF}' | xargs readlink -e | awk -v ORS= '{print $1":"}' | grep "${specdir}/specs:${specdir}/conda.specs:" + - cp tests/libhowdy.h $PREFIX/include/ + - ${CC} -shared -fpic -o $PREFIX/lib/libhowdy.so tests/libhowdy.c + - ${CC} -o howdy-dso tests/howdy-dso.c -lhowdy + - ./howdy-dso + - grep RPATH <({{ triplet }}-readelf -d howdy-dso) + - "! grep RUNPATH <({{ triplet }}-readelf -d howdy-dso)" + - ${CC} -Wl,-enable-new-dtags -o howdy-dso-runpath tests/howdy-dso.c -lhowdy + - ./howdy-dso-runpath + - "! grep RPATH <({{ triplet }}-readelf -d howdy-dso-runpath)" + - grep RUNPATH <({{ triplet }}-readelf -d howdy-dso-runpath) + - echo | ${CC} -E -Wp,-v -x c - |& awk '/include <\.\.\.> search starts/,/^End of search/ {print}' | tail -n2 | head -n1 | grep "$PREFIX/include" + - echo | ${CC} -isystem "$PREFIX/include" -E -Wp,-v -x c - |& awk '/include <\.\.\.> search starts/, /^End of search/ {print}' | head -n2 | tail -n1 | grep "$PREFIX/include" + + about: + summary: conda-specific specfile for GNU C/C++ Compiler + description: | + When installed, this optional package provides a specfile that + directs gcc (and g++ or gfortran) to automatically: + * search for includes in $PREFIX/include + * link libraries in $PREFIX/lib + * set RPATH to $PREFIX/lib + * use RPATH instead of the newer RUNPATH + This package is intended to aid usability of the compiler + toolchain as a replacement for system-installed compilers. + It should not be used in recipes. Use the 'compiler()' + jinja function as described on + https://conda-forge.org/docs/maintainer/knowledge_base.html#dep-compilers + home: https://gcc.gnu.org/ + license: GPL-3.0-only WITH GCC-exception-3.1 + doc_url: https://gcc.gnu.org/onlinedocs/gcc/Spec-Files.html + + - name: gxx_impl_{{ cross_target_platform }} + script: install-g++.sh + build: + number: {{ build_num }} + detect_binary_files_with_prefix: false + missing_dso_whitelist: + - "*" + ignore_run_exports_from: + - {{ cross_target_stdlib }}_{{ cross_target_platform }} + requirements: + build: + host: + - {{ cross_target_stdlib }}_{{ cross_target_platform }} {{ cross_target_stdlib_version }} + # For cpp and crt{i,n}.o + - {{ pin_subpackage("gcc_impl_" ~ cross_target_platform, exact=True) }} + run: + # For cpp and crt{i,n}.o + - {{ pin_subpackage("gcc_impl_" ~ cross_target_platform, exact=True) }} + # not needed due to pinning above but marks this build as using the new sysroots + - {{ cross_target_stdlib }}_{{ cross_target_platform }} + - {{ pin_subpackage("libstdcxx-devel_" ~ cross_target_platform, exact=True) }} + # for C++20 chrono support + - tzdata + run_exports: + # impose this requirement across the build/host boundary + strong: + - libstdcxx >={{ gcc_version }} + test: + requires: + - {{ cross_target_stdlib }}_{{ cross_target_platform }} {{ cross_target_stdlib_version }} + - strace_{{ cross_target_platform }} + files: + - tests + commands: + - test -f ${PREFIX}/bin/{{ triplet }}-g++ + - CXX=$(${PREFIX}/bin/*-gcc -dumpmachine)-g++ + - ${CXX} -Wall tests/aligned_alloc.cpp -c -o cpp_aligned.o --std=c++17 # [cross_target_platform != "win-64"] + - ${CXX} -Wall cpp_aligned.o -o cpp_aligned --std=c++17 && ./cpp_aligned # [cross_target_platform == target_platform and cross_target_platform != "win-64"] + - ${CXX} -Wall tests/hello_world.cpp -c -o hello_world.o --std=c++17 + - ${CXX} -Wall hello_world.o -o hello_world --std=c++17 + + # test tzdb integration + {% if gcc_maj_ver|int >= 14 %} + - ${CXX} -isystem ${PREFIX}/include --std=c++20 -Wall tests/tzdb-override.cpp -c -o tzdb-override.o + - ${CXX} -isystem ${PREFIX}/include --std=c++20 -Wall tests/tzdb.cpp -c -o tzdb.o + {% if target_platform == cross_target_platform %} + - ${CXX} tzdb-override.o -o tzdb-override && ./tzdb-override + - ${CXX} tzdb.o -o tzdb && ./tzdb + - $PREFIX/usr/bin/strace ./tzdb 2>&1 | grep ${CONDA_PREFIX}/lib/../share/zoneinfo/tzdata.zi + # also test without any environment activation + - unset PREFIX + - unset CONDA_PREFIX + - ./tzdb + {% endif %} + {% endif %} + about: + summary: GNU C++ Compiler + home: https://gcc.gnu.org/ + license: GPL-3.0-only WITH GCC-exception-3.1 + + - name: gxx + script: install-symlinks.sh + build: + skip: true # [target_platform != cross_target_platform] + requirements: + host: + - gxx_impl_{{ target_platform }} {{ gcc_version }}.* + - gcc {{ gcc_version }}.* + run: + - gxx_impl_{{ target_platform }} {{ gcc_version }}.* + - gcc {{ gcc_version }}.* + test: + commands: + - ${PREFIX}/bin/g++ -v + - ${PREFIX}/bin/gcc -v + about: + summary: GNU C++ native compiler (symlinks) + home: https://github.com/conda-forge/ctng-compilers-feedstock + license: BSD-3-Clause + license_file: LICENSE + + - name: gfortran_impl_{{ cross_target_platform }} + script: install-gfortran.sh + build: + number: {{ build_num }} + detect_binary_files_with_prefix: false + missing_dso_whitelist: + - "*" + ignore_run_exports_from: + - {{ cross_target_stdlib }}_{{ cross_target_platform }} + requirements: + build: + host: + # For cpp and crt{i,n}.o + - {{ pin_subpackage("gcc_impl_" ~ cross_target_platform, exact=True) }} + # not needed due to pinning above but marks this build as using the new sysroots + - {{ cross_target_stdlib }}_{{ cross_target_platform }} {{ cross_target_stdlib_version }} + run: + # For cpp and crt{i,n}.o + - gcc_impl_{{ cross_target_platform }} >={{ gcc_version }} + - {{ pin_subpackage("libgfortran" ~ libgfortran_soname, max_pin=None) }} # [target_platform == cross_target_platform] + - {{ pin_subpackage("libgcc", max_pin=None) }} # [target_platform == cross_target_platform] + - {{ pin_subpackage("libstdcxx", max_pin=None) }} # [target_platform == cross_target_platform] + - {{ cross_target_stdlib }}_{{ cross_target_platform }} + run_exports: + # impose this requirement across the build/host boundary + strong: + - libgfortran{{ libgfortran_soname }} {{ gcc_version }}.* + - libgcc >={{ gcc_version }} + test: + requires: + - cmake >=3.11,<4 # [x86_64 or aarch64 or ppc64le] + - make + - {{ cross_target_stdlib }}_{{ cross_target_platform }} {{ cross_target_stdlib_version }} + commands: + {% if cross_target_platform.startswith("linux-") %} + - test -f ${PREFIX}/{{ triplet }}/lib/libgfortran.so + {% else %} + - test -f ${PREFIX}/{{ triplet }}/lib/libgfortran.dll.a + {% endif %} + - test -f ${PREFIX}/{{ triplet }}/lib/libgfortran.a + - test -f ${PREFIX}/bin/{{ triplet }}-gfortran + - find $PREFIX/lib -iname omp_lib.mod | grep '.' + - find $PREFIX/lib -iname omp_lib.h | grep '.' + - find $PREFIX/lib -iname ISO_Fortran_binding.h | grep '.' + - echo {{ gcc_maj_ver }} + - pushd tests/fortomp + - sh test_fort.sh # [target_platform == cross_target_platform and (x86_64 or aarch64 or ppc64le)] + files: + - tests/fortomp/* + about: + summary: GNU Fortran Compiler + home: https://gcc.gnu.org/ + license: GPL-3.0-only WITH GCC-exception-3.1 + + - name: gfortran + script: install-symlinks.sh + build: + skip: true # [target_platform != cross_target_platform] + requirements: + host: + - gfortran_impl_{{ target_platform }} {{ gcc_version }}.* + - gcc_impl_{{ target_platform }} {{ gcc_version }}.* + - gcc {{ gcc_version }}.* + run: + - gfortran_impl_{{ target_platform }} {{ gcc_version }}.* + - gcc_impl_{{ target_platform }} {{ gcc_version }}.* + - gcc {{ gcc_version }}.* + test: + commands: + - ${PREFIX}/bin/gfortran -v + - ${PREFIX}/bin/gcc -v + about: + summary: GNU Fortran native compiler (symlinks) + home: https://github.com/conda-forge/ctng-compilers-feedstock + license: BSD-3-Clause + license_file: LICENSE + + - name: libstdcxx + target: {{ cross_target_platform }} + script: install-libstdc++.sh + build: + number: {{ build_num }} + skip: true # [target_platform != cross_target_platform] + detect_binary_files_with_prefix: false + missing_dso_whitelist: + - "*" + overlinking_ignore_patterns: + - "lib/libstdc++.so.*" + requirements: + build: + host: + - {{ cross_target_stdlib }}_{{ cross_target_platform }} {{ cross_target_stdlib_version }} + - {{ pin_subpackage("libgcc", exact=True) }} + run: + - {{ pin_subpackage("libgcc", exact=True) }} + run_constrained: + # avoid installing incompatible version of old name for this output + - libstdcxx-ng =={{ version }}=*_{{ build_num }} + test: + commands: + - test -f ${PREFIX}/lib/libstdc++.so + about: + summary: The GNU C++ Runtime Library + home: https://gcc.gnu.org/ + license: GPL-3.0-only WITH GCC-exception-3.1 + + - name: libsanitizer + target: {{ cross_target_platform }} + script: install-libsanitizer.sh + build: + number: {{ build_num }} + skip: true # [target_platform != cross_target_platform or win] + detect_binary_files_with_prefix: false + missing_dso_whitelist: + - "*" + run_exports: + - libsanitizer {{ gcc_version }} + overlinking_ignore_patterns: + - "lib/libtsan.so.*" + - "lib/libasan.so.*" + - "lib/liblsan.so.*" + - "lib/libhwasan.so.*" + requirements: + build: + host: + - {{ cross_target_stdlib }}_{{ cross_target_platform }} {{ cross_target_stdlib_version }} + run: + - libgcc >={{ gcc_version }} + - libstdcxx >={{ gcc_version }} + test: + requires: + - {{ cross_target_stdlib }}_{{ cross_target_platform }} {{ cross_target_stdlib_version }} + - gcc_impl_{{ cross_target_platform }} + commands: + - test -f ${PREFIX}/lib/libasan.so + - test -f ${PREFIX}/lib/libhwasan.so # [x86_64 or aarch64] + - file ${PREFIX}/bin/{{ triplet }}-gcc + - echo 'void main(){}' | {{ triplet }}-gcc -fsanitize=address -Wl,--fatal-warnings -x c - + about: + summary: The GCC runtime libraries for sanitizers + home: https://gcc.gnu.org/onlinedocs/gccint/Libgcc.html + license: GPL-3.0-only WITH GCC-exception-3.1 + + - name: libgomp + target: {{ cross_target_platform }} + script: install-libgomp.sh + build: + number: {{ build_num }} + skip: true # [target_platform != cross_target_platform] + detect_binary_files_with_prefix: false + missing_dso_whitelist: + - "*" + run_exports: + strong: + - {{ pin_subpackage("_openmp_mutex", max_pin=None) }} + {% if cross_target_platform.startswith("win-") %} + - {{ pin_subpackage("libgomp", max_pin=None) }} + {% endif %} + requirements: + build: + host: + - {{ cross_target_stdlib }}_{{ cross_target_platform }} {{ cross_target_stdlib_version }} + run_constrained: + - msys2-conda-epoch <0.0a0 # [win] + test: + requires: + - {{ cross_target_stdlib }}_{{ cross_target_platform }} + commands: + - test -f ${PREFIX}/lib/libgomp.so.{{ libgomp_ver }} + - test ! -f ${PREFIX}/lib/libgomp.so.{{ libgomp_ver[0:1] }} + about: + summary: The GCC OpenMP implementation. + home: https://gcc.gnu.org/onlinedocs/gccint/Libgcc.html + license: GPL-3.0-only WITH GCC-exception-3.1 + + - name: libgcc + target: {{ cross_target_platform }} + script: install-libgcc-no-gomp.sh + build: + number: {{ build_num }} + skip: true # [target_platform != cross_target_platform] + detect_binary_files_with_prefix: false + missing_dso_whitelist: + - "*" + rpaths_patcher: patchelf + overlinking_ignore_patterns: + - "lib/libgcc_s.so.*" + requirements: + build: + host: + - {{ pin_subpackage("libgomp", exact=True) }} + - {{ pin_subpackage('_openmp_mutex', exact=True) }} + - {{ cross_target_stdlib }}_{{ cross_target_platform }} {{ cross_target_stdlib_version }} + run: + - {{ pin_subpackage("_openmp_mutex", max_pin=None) }} + run_constrained: + - {{ pin_subpackage("libgomp", exact=True) }} + - msys2-conda-epoch <0.0a0 # [win] + # avoid installing incompatible version of old name for this output + - libgcc-ng =={{ version }}=*_{{ build_num }} + test: + requires: + - {{ cross_target_stdlib }}_{{ cross_target_platform }} + commands: + - test -f ${PREFIX}/lib/libgcc_s.so + - test -f ${PREFIX}/lib/libgomp.so.{{ libgomp_ver[0:1] }} + - test `readlink ${PREFIX}/lib/libgomp.so.{{ libgomp_ver[0:1] }}` == "libgomp.so.{{ libgomp_ver }}" + about: + summary: The GCC low-level runtime library + home: https://gcc.gnu.org/onlinedocs/gccint/Libgcc.html + license: GPL-3.0-only WITH GCC-exception-3.1 + + - name: _openmp_mutex + script: install-openmp_impl.sh + version: {{ openmp_ver }} + build: + string: 3_gnu + skip: true # [target_platform != cross_target_platform] + run_exports: + strong: + - {{ pin_subpackage("_openmp_mutex", max_pin=None) }} + requirements: + build: + host: + - {{ pin_subpackage('libgomp', exact=True) }} + - {{ cross_target_stdlib }}_{{ cross_target_platform }} {{ cross_target_stdlib_version }} + run: + - libgomp >=7.5.0 + run_constrained: + # conflict with previous name + - openmp_impl <0.0a0 + - msys2-conda-epoch <0.0a0 # [win] + test: + commands: + - test -f ${PREFIX}/lib/libgomp.so.{{ libgomp_ver[0:1] }} + - test `readlink ${PREFIX}/lib/libgomp.so.{{ libgomp_ver[0:1] }}` == "libgomp.so.{{ libgomp_ver }}" + about: + summary: OpenMP Implementation Mutex + license: BSD-3-Clause + license_file: LICENSE + home: https://github.com/conda-forge/ctng-compilers-feedstock + + - name: libgfortran{{ libgfortran_soname }} + target: {{ cross_target_platform }} + script: install-libgfortran.sh + build: + number: {{ build_num }} + skip: true # [target_platform != cross_target_platform] + detect_binary_files_with_prefix: false + missing_dso_whitelist: + - "*" + overlinking_ignore_patterns: + - "lib/libgfortran.so.*" + requirements: + build: + host: + - {{ cross_target_stdlib }}_{{ cross_target_platform }} {{ cross_target_stdlib_version }} + run: + - libgcc >={{ gcc_version }} + run_constrained: + - libgfortran {{ gcc_version }} + test: + commands: + - test -f ${PREFIX}/lib/libgfortran.so + about: + summary: The GNU Fortran Runtime Library + home: https://gcc.gnu.org/ + license: GPL-3.0-only WITH GCC-exception-3.1 + + - name: libgfortran + target: {{ cross_target_platform }} + build: + skip: true # [target_platform != cross_target_platform] + number: {{ build_num }} + requirements: + run: + - {{ pin_subpackage('libgfortran' ~ libgfortran_soname, exact=True) }} + run_constrained: + # avoid installing incompatible version of old name for this output + - libgfortran-ng =={{ version }}=*_{{ build_num }} + test: + commands: + - test -f ${PREFIX}/lib/libgfortran.so + about: + summary: The GNU Fortran Runtime Library + home: https://gcc.gnu.org/ + license: GPL-3.0-only WITH GCC-exception-3.1 + + - name: gdb-pretty-printer + version: {{ gcc_version }} + script: install-gdb-pretty-printer.sh + build: + # skip until gdb 16.3 is on defaults (which is built against GCC 14.3.0) + skip: true + number: {{ build_num }} + ignore_run_exports: # [linux] + - libstdcxx # [linux] + requirements: + host: + - python + run: + - python + - gdb >= 16.3 + - libstdcxx >={{ gcc_version }} + about: + summary: GNU Compiler Collection Python Pretty Printers + home: https://gcc.gnu.org/ + license: GPL-3.0-only WITH GCC-exception-3.1 + + # compatibility outputs for previous naming of the runtime libraries + # with "-ng" suffix; for windows the suffix had never been introduced + {% if not cross_target_platform.startswith("win-") %} + - name: libgcc-ng + target: {{ cross_target_platform }} + build: + number: {{ build_num }} + skip: true # [target_platform != cross_target_platform] + run_exports: + strong: + - libgcc + requirements: + host: + - {{ pin_subpackage("libgcc", exact=True) }} + run: + - {{ pin_subpackage("libgcc", exact=True) }} + test: + commands: + - echo "empty wrapper for compatibility with previous naming" + about: + summary: The GCC low-level runtime library + home: https://gcc.gnu.org/onlinedocs/gccint/Libgcc.html + license: GPL-3.0-only WITH GCC-exception-3.1 + + - name: libstdcxx-ng + target: {{ cross_target_platform }} + script: install-libstdc++.sh + build: + number: {{ build_num }} + skip: true # [target_platform != cross_target_platform] + run_exports: + strong: + - libstdcxx + requirements: + host: + - {{ pin_subpackage("libstdcxx", exact=True) }} + run: + - {{ pin_subpackage("libstdcxx", exact=True) }} + test: + commands: + - echo "empty wrapper for compatibility with previous naming" + about: + summary: The GNU C++ Runtime Library + home: https://gcc.gnu.org/ + license: GPL-3.0-only WITH GCC-exception-3.1 + + - name: libgfortran-ng + target: {{ cross_target_platform }} + build: + number: {{ build_num }} + skip: true # [target_platform != cross_target_platform] + run_exports: + strong: + - libgfortran + requirements: + host: + - {{ pin_subpackage('libgfortran', exact=True) }} + run: + - {{ pin_subpackage('libgfortran', exact=True) }} + test: + commands: + - echo "empty wrapper for compatibility with previous naming" + about: + summary: The GNU Fortran Runtime Library + home: https://gcc.gnu.org/ + license: GPL-3.0-only WITH GCC-exception-3.1 + {% endif %} + +about: + summary: GNU Compiler Collection + home: https://gcc.gnu.org/ + license: GPL-3.0-only WITH GCC-exception-3.1 + license_file: + - COPYING + - COPYING.LIB + - COPYING3 + - COPYING3.LIB + +extra: + feedstock-name: ctng-compilers-feedstock + recipe-maintainers: + - timsnyder + - xhochy + - isuruf + - beckermr diff --git a/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/recipe/parent/patches/0001-allow-commands-in-main-specfile.patch b/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/recipe/parent/patches/0001-allow-commands-in-main-specfile.patch new file mode 100644 index 0000000000000000000000000000000000000000..0e6ea6afa6429337186944117011253d9be4e64f --- /dev/null +++ b/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/recipe/parent/patches/0001-allow-commands-in-main-specfile.patch @@ -0,0 +1,23 @@ +From 10cf9f22dcb62db55cd2e9cbc587e2ab35a88889 Mon Sep 17 00:00:00 2001 +From: Tim Snyder +Date: Tue, 29 Mar 2022 22:33:27 +0000 +Subject: [PATCH 1/4] allow % commands in main specfile + +--- + gcc/gcc.cc | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/gcc/gcc.cc b/gcc/gcc.cc +index fc9f1f545dc..28b947c7afd 100644 +--- a/gcc/gcc.cc ++++ b/gcc/gcc.cc +@@ -2392,7 +2392,8 @@ read_specs (const char *filename, bool main_p, bool user_p) + /* Is this a special command that starts with '%'? */ + /* Don't allow this for the main specs file, since it would + encourage people to overwrite it. */ +- if (*p == '%' && !main_p) ++ /* ::conda-forge:: allow use of commands in main specs */ ++ if (*p == '%') + { + p1 = p; + while (*p && *p != '\n') diff --git a/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/recipe/parent/patches/0002-patch-zoneinfo_dir_override-to-point-to-our-tzdata.patch b/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/recipe/parent/patches/0002-patch-zoneinfo_dir_override-to-point-to-our-tzdata.patch new file mode 100644 index 0000000000000000000000000000000000000000..e63a7f8389e8f3c3e60994356076261b033c5fb8 --- /dev/null +++ b/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/recipe/parent/patches/0002-patch-zoneinfo_dir_override-to-point-to-our-tzdata.patch @@ -0,0 +1,113 @@ +From 92dc5e74592f57dbc9c2b421e2e348d88d3439f6 Mon Sep 17 00:00:00 2001 +From: "H. Vetinari" +Date: Fri, 21 Jun 2024 12:41:07 +1100 +Subject: [PATCH 2/4] patch zoneinfo_dir_override to point to our tzdata + +--- + libstdc++-v3/src/c++20/tzdb.cc | 78 ++++++++++++++++++++++++++++------ + 1 file changed, 65 insertions(+), 13 deletions(-) + +diff --git a/libstdc++-v3/src/c++20/tzdb.cc b/libstdc++-v3/src/c++20/tzdb.cc +index 72f20e7f828..8d4feb99902 100644 +--- a/libstdc++-v3/src/c++20/tzdb.cc ++++ b/libstdc++-v3/src/c++20/tzdb.cc +@@ -37,8 +37,12 @@ + #include // mutex + #include // filesystem::read_symlink + +-#ifndef _AIX +-# include // getenv ++#if defined(__linux__) ++# include // dladdr ++# include // free, malloc, realpath ++# include // memcpy, strlen ++#else defined(_WIN32) ++# include + #endif + + #if defined __GTHREADS && ATOMIC_POINTER_LOCK_FREE == 2 +@@ -64,25 +68,73 @@ + + namespace __gnu_cxx + { +-#ifdef _AIX +- // Cannot override weak symbols on AIX. +- const char* (*zoneinfo_dir_override)() = nullptr; +-#else +- [[gnu::weak]] const char* zoneinfo_dir_override(); +- +-#if defined(__APPLE__) || defined(__hpux__) \ +- || (defined(__VXWORKS__) && !defined(__RTP__)) +- // Need a weak definition for Mach-O et al. + [[gnu::weak]] const char* zoneinfo_dir_override() + { ++#ifdef _GLIBCXX_SHARED ++ // get path to library we're in, to determine our location relative to $PREFIX; ++ // with help from the MIT-licensed https://github.com/gpakosz/whereami ++ void* addr = __builtin_extract_return_addr(__builtin_return_address(0)); ++ char* this_lib; ++ int i; ++ // is included through ++ static std::string tz_dir; ++ if (!tz_dir.empty()) { ++ return tz_dir.c_str(); ++ } ++#ifdef _WIN32 ++ // we're in %PREFIX%\Library\bin\libstdc++-6.dll ++# define TO_PREFIX "/../.." ++ // needs single quotes for character (not string) literal ++# define PATH_SEP '\\' ++ wchar_t buffer[MAX_PATH]; ++ HMODULE hm = NULL; ++ // non-zero return means success ++ if (GetModuleHandleEx(GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS | ++ GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT, ++ (LPCSTR) addr, &hm)) { ++ // returns length of string (not counting null byte), see ++ // https://learn.microsoft.com/en-us/windows/win32/api/libloaderapi/nf-libloaderapi-getmodulefilenamew#return-value ++ DWORD total_length = GetModuleFileNameW(hm, buffer, sizeof(buffer)); ++ if (total_length) { ++ this_lib = (char*)malloc(total_length + 1); ++ memcpy(this_lib, buffer, total_length); ++#else ++ // we're in $PREFIX/lib/libstdcxx.so ++# define TO_PREFIX "/.." ++# define PATH_SEP '/' ++ char buffer[PATH_MAX]; ++ Dl_info info; ++ ++ if (dladdr(addr, &info)) { ++ char* resolved = realpath(info.dli_fname, buffer); ++ if (resolved) { ++ int total_length = (int)strlen(resolved); ++ this_lib = (char*)malloc(total_length + 1); ++ memcpy(this_lib, resolved, total_length); ++#endif ++ ++ for (i = (int)total_length - 1; i >= 0; --i) { ++ if (this_lib[i] == PATH_SEP) { ++ // set to null byte so the string ends before the basename ++ this_lib[i] = '\0'; ++ break; ++ } ++ } ++ tz_dir = {this_lib}; ++ tz_dir += TO_PREFIX; ++ tz_dir += "/share/zoneinfo"; ++ // std::string constructor for tz_dir deep-copies ++ free(this_lib); ++ return tz_dir.c_str(); ++ } ++ } ++#endif // _GLIBCXX_SHARED + #ifdef _GLIBCXX_ZONEINFO_DIR + return _GLIBCXX_ZONEINFO_DIR; + #else + return nullptr; + #endif + } +-#endif +-#endif + } + + #if ! defined _GLIBCXX_ZONEINFO_DIR && ! defined _GLIBCXX_STATIC_TZDATA diff --git a/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/recipe/parent/patches/0003-add-ldl-to-libstdc___la_LDFLAGS.patch b/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/recipe/parent/patches/0003-add-ldl-to-libstdc___la_LDFLAGS.patch new file mode 100644 index 0000000000000000000000000000000000000000..a17bf01c996d5181529f52f35b2df040463adbe4 --- /dev/null +++ b/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/recipe/parent/patches/0003-add-ldl-to-libstdc___la_LDFLAGS.patch @@ -0,0 +1,40 @@ +From c54fd2dea14134d3e51c17ca5442e0ae2dc16462 Mon Sep 17 00:00:00 2001 +From: "H. Vetinari" +Date: Mon, 15 Jul 2024 19:16:05 +1100 +Subject: [PATCH 3/4] add `-ldl` to libstdc___la_LDFLAGS + +we want to link static-only here, to avoid having to add +`-ldl` everytime something links against libstdc++.so + +Co-Authored-By: Isuru Fernando +--- + libstdc++-v3/src/Makefile.am | 2 +- + libstdc++-v3/src/Makefile.in | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/libstdc++-v3/src/Makefile.am b/libstdc++-v3/src/Makefile.am +index 37ba1491dea..5b69f43ecd8 100644 +--- a/libstdc++-v3/src/Makefile.am ++++ b/libstdc++-v3/src/Makefile.am +@@ -161,7 +161,7 @@ libstdc___darwin_rpath += -Wl,-rpath,@loader_path + endif + + libstdc___la_LDFLAGS = \ +- -version-info $(libtool_VERSION) ${version_arg} -lm $(libstdc___darwin_rpath) ++ -version-info $(libtool_VERSION) ${version_arg} -lm -Bstatic -ldl -Bdynamic -Wl,--exclude-libs,libdl.a $(libstdc___darwin_rpath) + + libstdc___la_LINK = $(CXXLINK) $(libstdc___la_LDFLAGS) $(lt_host_flags) + +diff --git a/libstdc++-v3/src/Makefile.in b/libstdc++-v3/src/Makefile.in +index 1bdf0daa88f..ab28e14804e 100644 +--- a/libstdc++-v3/src/Makefile.in ++++ b/libstdc++-v3/src/Makefile.in +@@ -566,7 +566,7 @@ libstdc___la_DEPENDENCIES = \ + @ENABLE_DARWIN_AT_RPATH_TRUE@ -Wc,-nodefaultrpaths \ + @ENABLE_DARWIN_AT_RPATH_TRUE@ -Wl,-rpath,@loader_path + libstdc___la_LDFLAGS = \ +- -version-info $(libtool_VERSION) ${version_arg} -lm $(libstdc___darwin_rpath) ++ -version-info $(libtool_VERSION) ${version_arg} -lm -Bstatic -ldl -Bdynamic -Wl,--exclude-libs,libdl.a $(libstdc___darwin_rpath) + + libstdc___la_LINK = $(CXXLINK) $(libstdc___la_LDFLAGS) $(lt_host_flags) + @GLIBCXX_LDBL_ALT128_COMPAT_FALSE@@GLIBCXX_LDBL_COMPAT_TRUE@LTCXXCOMPILE64 = $(LTCXXCOMPILE) diff --git a/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/recipe/parent/patches/0004-Hardcode-HAVE_ALIGNED_ALLOC-1-in-libstdc-v3-configur.patch b/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/recipe/parent/patches/0004-Hardcode-HAVE_ALIGNED_ALLOC-1-in-libstdc-v3-configur.patch new file mode 100644 index 0000000000000000000000000000000000000000..07a361cd6d709849c78bba0ece60ff63d8c2295e --- /dev/null +++ b/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/recipe/parent/patches/0004-Hardcode-HAVE_ALIGNED_ALLOC-1-in-libstdc-v3-configur.patch @@ -0,0 +1,57 @@ +From 86369ec6c37896394546f3b01f9c447c4f4188ae Mon Sep 17 00:00:00 2001 +From: Nehal J Wani +Date: Tue, 12 Jun 2018 05:26:24 +0000 +Subject: [PATCH 4/4] Hardcode HAVE_ALIGNED_ALLOC=1 in libstdc++-v3/configure + +--- + libstdc++-v3/configure | 16 ++++++++++++++++ + 1 file changed, 16 insertions(+) + +diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure +index 18053ab7eae..44b6a72f775 100755 +--- a/libstdc++-v3/configure ++++ b/libstdc++-v3/configure +@@ -26405,6 +26405,11 @@ _ACEOF + fi + done + ++# The check above works only if aligned_alloc is present as a symbol in libc.so ++# Since we provide a header only implementation, override the value here ++cat >>confdefs.h <<_ACEOF ++#define `$as_echo "HAVE_aligned_alloc" | $as_tr_cpp` 1 ++_ACEOF + + # For iconv support. + +@@ -38403,6 +38408,9 @@ _ACEOF + fi + done + ++cat >>confdefs.h <<_ACEOF ++#define `$as_echo "HAVE_aligned_alloc" | $as_tr_cpp` 1 ++_ACEOF + ;; + + *-fuchsia*) +@@ -42318,6 +42326,10 @@ fi + done + + ++cat >>confdefs.h <<_ACEOF ++#define `$as_echo "HAVE_aligned_alloc" | $as_tr_cpp` 1 ++_ACEOF ++ + ;; + *-mingw32*) + +@@ -45924,6 +45936,10 @@ _ACEOF + fi + done + ++cat >>confdefs.h <<_ACEOF ++#define `$as_echo "HAVE_aligned_alloc" | $as_tr_cpp` 1 ++_ACEOF ++ + ;; + *-qnx6.1* | *-qnx6.2*) + SECTION_FLAGS='-ffunction-sections -fdata-sections' diff --git a/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/recipe/parent/setup_compiler.sh b/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/recipe/parent/setup_compiler.sh new file mode 100644 index 0000000000000000000000000000000000000000..dcdd387ae719e4341ae316205f920118cd4b1a45 --- /dev/null +++ b/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/recipe/parent/setup_compiler.sh @@ -0,0 +1,48 @@ +#!/bin/bash +if [[ ! -d $SRC_DIR/cf-compilers ]]; then + extra_pkgs=() + if [[ "$build_platform" != "$target_platform" ]]; then + # we need a compiler to target cross_target_platform. + # when build_platform == target_platform, the compiler + # just built can be used. + # when build_platform != target_platform, the compiler + # just built cannot be used, hence we need one that + # can be used. + extra_pkgs+=( + "gcc_impl_${cross_target_platform}=${gcc_version}" + "gxx_impl_${cross_target_platform}=${gcc_version}" + "gfortran_impl_${cross_target_platform}=${gcc_version}" + ) + fi + # Remove conda-forge/label/sysroot-with-crypt when GCC < 14 is dropped + conda create -p $SRC_DIR/cf-compilers --yes --quiet \ + "binutils_impl_${build_platform}" \ + "gcc_impl_${build_platform}" \ + "gxx_impl_${build_platform}" \ + "gfortran_impl_${build_platform}" \ + "binutils_impl_${target_platform}=${binutils_version}" \ + "gcc_impl_${target_platform}" \ + "gxx_impl_${target_platform}" \ + "gfortran_impl_${target_platform}" \ + "${c_stdlib}_${target_platform}=${c_stdlib_version}" \ + "binutils_impl_${cross_target_platform}=${binutils_version}" \ + "${cross_target_stdlib}_${cross_target_platform}=${cross_target_stdlib_version}" \ + make \ + ${extra_pkgs[@]} +fi + +export PATH=$SRC_DIR/cf-compilers/bin:$PATH +export BUILD_PREFIX=$SRC_DIR/cf-compilers + +if [[ "$target_platform" == "win-"* && "${PREFIX}" != *Library ]]; then + export PREFIX=${PREFIX}/Library +fi + +source $RECIPE_DIR/get_cpu_arch.sh + +if [[ "$target_platform" == "win-64" ]]; then + EXEEXT=".exe" +else + EXEEXT="" +fi +SYSROOT_DIR=${PREFIX}/${TARGET}/sysroot diff --git a/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/recipe/parent/tests/aligned_alloc.c b/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/recipe/parent/tests/aligned_alloc.c new file mode 100644 index 0000000000000000000000000000000000000000..287be94c7340a134a5d9a56ddc0f6c20acc0af74 --- /dev/null +++ b/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/recipe/parent/tests/aligned_alloc.c @@ -0,0 +1,9 @@ +#include +#include + +int main(void) +{ + int *p2 = (int*)aligned_alloc(1024, 1024*sizeof *p2); + printf("1024-byte aligned addr: %p\n", (void*)p2); + free(p2); +} diff --git a/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/recipe/parent/tests/aligned_alloc.cpp b/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/recipe/parent/tests/aligned_alloc.cpp new file mode 100644 index 0000000000000000000000000000000000000000..1379c7547ae63e12433db910d243f159657aa0b6 --- /dev/null +++ b/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/recipe/parent/tests/aligned_alloc.cpp @@ -0,0 +1,18 @@ +#include +#include +#include +//#include + +int main(void) +{ + /// int *p2 = (int*)memalign(1024, 1024 * sizeof *p2); + int *p2; + int err = posix_memalign((void**)&p2, 1024, sizeof *p2); + printf("1024-byte aligned addr: %p\n", (void*)p2); + free(p2); + p2 = (int*)std::aligned_alloc(1024, 1); + printf("1024-byte aligned addr: %p\n", (void*)p2); + std::free(p2); + p2 = (int*)aligned_alloc(1024, 1024); + printf("1024-byte aligned addr: %p\n", (void*)p2); +} diff --git a/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/recipe/parent/tests/fortomp/CMakeLists.txt b/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/recipe/parent/tests/fortomp/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..491a48b42cb3ddfef5f8541f8db848e0ba844f84 --- /dev/null +++ b/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/recipe/parent/tests/fortomp/CMakeLists.txt @@ -0,0 +1,5 @@ +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(fortomp + LANGUAGES Fortran) + +find_package(OpenMP REQUIRED) diff --git a/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/recipe/parent/tests/fortomp/test_fort.sh b/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/recipe/parent/tests/fortomp/test_fort.sh new file mode 100644 index 0000000000000000000000000000000000000000..75731b653df023e75c4d2b73b2c345a3510faad9 --- /dev/null +++ b/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/recipe/parent/tests/fortomp/test_fort.sh @@ -0,0 +1,11 @@ +GFORTRAN=$(${PREFIX}/bin/*-gcc -dumpmachine)-gfortran +FFLAGS="-fopenmp -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -pipe" + +cmake \ + -H${SRC_DIR} \ + -Bbuild \ + -DCMAKE_INSTALL_PREFIX=${PREFIX} \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_Fortran_COMPILER=${GFORTRAN} \ + -DCMAKE_Fortran_FLAGS="${FFLAGS}" \ + . diff --git a/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/recipe/parent/tests/hello_world.c b/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/recipe/parent/tests/hello_world.c new file mode 100644 index 0000000000000000000000000000000000000000..f6054fde81f8dfa4882cef918c408fa6b7255c3e --- /dev/null +++ b/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/recipe/parent/tests/hello_world.c @@ -0,0 +1,5 @@ +#include + +int main() { + printf("hello world!\n"); +} diff --git a/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/recipe/parent/tests/hello_world.cpp b/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/recipe/parent/tests/hello_world.cpp new file mode 100644 index 0000000000000000000000000000000000000000..585eea4cee5b1176fd28267f3e27dbdb344fd31f --- /dev/null +++ b/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/recipe/parent/tests/hello_world.cpp @@ -0,0 +1,6 @@ +#include + +int main(void) +{ + std::cout << "hello world!" << std::endl; +} diff --git a/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/recipe/parent/tests/howdy-dso.c b/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/recipe/parent/tests/howdy-dso.c new file mode 100644 index 0000000000000000000000000000000000000000..ea47ce0a03e061a965fc1e2cdaf310c038d4b44d --- /dev/null +++ b/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/recipe/parent/tests/howdy-dso.c @@ -0,0 +1,6 @@ +#include + +int main(void) { + howdy(); + return 0; +} diff --git a/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/recipe/parent/tests/libhowdy.c b/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/recipe/parent/tests/libhowdy.c new file mode 100644 index 0000000000000000000000000000000000000000..6cd0dc522a8e4485f8173321a3dff2b21f079415 --- /dev/null +++ b/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/recipe/parent/tests/libhowdy.c @@ -0,0 +1,5 @@ +#include + +void howdy(void) { + printf("Howdy Y'all!\n"); +} diff --git a/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/recipe/parent/tests/libhowdy.h b/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/recipe/parent/tests/libhowdy.h new file mode 100644 index 0000000000000000000000000000000000000000..6234950e5a3ce9ff0209513f328d0ecfc71bac99 --- /dev/null +++ b/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/recipe/parent/tests/libhowdy.h @@ -0,0 +1,6 @@ +#ifndef _LIBHOWDY_H +#define _LIBHOWDY_H + +extern void howdy(void); + +#endif diff --git a/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/recipe/parent/tests/tzdb-override.cpp b/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/recipe/parent/tests/tzdb-override.cpp new file mode 100644 index 0000000000000000000000000000000000000000..73284e6245e5774322d67924db2f0907e5a6d668 --- /dev/null +++ b/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/recipe/parent/tests/tzdb-override.cpp @@ -0,0 +1,29 @@ +// We are using a weak symbol in linux and windows using a patch +// while upstream only has the definition and no implementation. +// Check that overriding works. + +// adapted from upstream tests +// https://github.com/gcc-mirror/gcc/blob/releases/gcc-14.1.0/libstdc%2B%2B-v3/testsuite/std/time/tzdb/1.cc +// https://github.com/gcc-mirror/gcc/blob/releases/gcc-14.1.0/libstdc%2B%2B-v3/testsuite/std/time/tzdb/leap_seconds.cc + +#include +#include +#include + +static bool override_used = false; + +namespace __gnu_cxx +{ + const char* zoneinfo_dir_override() { + override_used = true; + return "./"; + } +} + +using namespace std::chrono; + +int main() +{ + auto &a = get_tzdb(); + return !override_used; +} diff --git a/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/recipe/parent/tests/tzdb.cpp b/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/recipe/parent/tests/tzdb.cpp new file mode 100644 index 0000000000000000000000000000000000000000..9ccf3f4d44cb32a75a7f9e0d4b8876e9d76693ca --- /dev/null +++ b/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/recipe/parent/tests/tzdb.cpp @@ -0,0 +1,95 @@ +// adapted from upstream tests +// https://github.com/gcc-mirror/gcc/blob/releases/gcc-14.1.0/libstdc%2B%2B-v3/testsuite/std/time/tzdb/1.cc +// https://github.com/gcc-mirror/gcc/blob/releases/gcc-14.1.0/libstdc%2B%2B-v3/testsuite/std/time/tzdb/leap_seconds.cc + +#include +#include +#include + +// https://github.com/gcc-mirror/gcc/blob/releases/gcc-14.1.0/libstdc%2B%2B-v3/testsuite/util/testsuite_hooks.h#L61-L70 +#define VERIFY(fn) \ + do \ + { \ + if (! (fn)) \ + { \ + __builtin_fprintf(stderr, \ + "%s:%d: %s: Assertion '%s' failed.\n", \ + __FILE__, __LINE__, __PRETTY_FUNCTION__, #fn); \ + __builtin_abort(); \ + } \ + } while (false) + + +using namespace std::chrono; + +void +test_version() +{ + const tzdb& db = get_tzdb(); + VERIFY( &db == &get_tzdb_list().front() ); + + const char* func; + try { + func = "remote_version"; + VERIFY( db.version == remote_version() ); + func = "reload_tzdb"; + const tzdb& reloaded = reload_tzdb(); + if (reloaded.version == db.version) + VERIFY( &reloaded == &db ); + } catch (const std::exception&) { + std::printf("std::chrono::%s() failed\n", func); + // on exception, we fail louder than the upstream reference test + exit(1); + } +} + +void +test_current() +{ + const tzdb& db = get_tzdb(); + const time_zone* tz = db.current_zone(); + VERIFY( tz == std::chrono::current_zone() ); +} + +void +test_locate() +{ + const tzdb& db = get_tzdb(); + const time_zone* tz = db.locate_zone("GMT"); + VERIFY( tz != nullptr ); + VERIFY( tz->name() == "Etc/GMT" ); + VERIFY( tz == std::chrono::locate_zone("GMT") ); + VERIFY( tz == db.locate_zone("Etc/GMT") ); + VERIFY( tz == db.locate_zone("Etc/GMT+0") ); + + VERIFY( db.locate_zone(db.current_zone()->name()) == db.current_zone() ); +} + +void +test_all_zones() +{ + const tzdb& db = get_tzdb(); + + for (const auto& zone : db.zones) + VERIFY( locate_zone(zone.name())->name() == zone.name() ); + + for (const auto& link : db.links) + VERIFY( locate_zone(link.name()) == locate_zone(link.target()) ); +} + +void +test_load_leapseconds() +{ + const auto& db = get_tzdb(); + + // this is correct as of tzdata 2024a + VERIFY( db.leap_seconds.size() == 27 ); +} + +int main() +{ + test_version(); + test_current(); + test_locate(); + test_load_leapseconds(); +} diff --git a/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/recipe/parent/uclibc.config b/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/recipe/parent/uclibc.config new file mode 100644 index 0000000000000000000000000000000000000000..1c51f52fd306d3a08ada254a04bb29b307ac7399 --- /dev/null +++ b/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/recipe/parent/uclibc.config @@ -0,0 +1,295 @@ +# +# Automatically generated make config: don't edit +# Version: 0.9.32-git +# Fri Jul 9 22:31:59 2010 +# +# TARGET_alpha is not set +TARGET_arm=y +# TARGET_avr32 is not set +# TARGET_bfin is not set +# TARGET_cris is not set +# TARGET_e1 is not set +# TARGET_frv is not set +# TARGET_h8300 is not set +# TARGET_hppa is not set +# TARGET_i386 is not set +# TARGET_i960 is not set +# TARGET_ia64 is not set +# TARGET_m68k is not set +# TARGET_microblaze is not set +# TARGET_mips is not set +# TARGET_nios is not set +# TARGET_nios2 is not set +# TARGET_powerpc is not set +# TARGET_sh is not set +# TARGET_sh64 is not set +# TARGET_sparc is not set +# TARGET_v850 is not set +# TARGET_vax is not set +# TARGET_x86_64 is not set +# TARGET_xtensa is not set +# TARGET_c6x is not set + +# CONFIG_GENERIC_ARM is not set +# CONFIG_ARM610 is not set +# CONFIG_ARM710 is not set +# CONFIG_ARM7TDMI is not set +# CONFIG_ARM720T is not set +# CONFIG_ARM920T is not set +# CONFIG_ARM922T is not set +# CONFIG_ARM926T is not set +# CONFIG_ARM10T is not set +CONFIG_ARM1136JF_S=y +# CONFIG_ARM1176JZ_S is not set +# CONFIG_ARM1176JZF_S is not set +# CONFIG_ARM_CORTEX_M3 is not set +# CONFIG_ARM_CORTEX_M1 is not set +# CONFIG_ARM_SA110 is not set +# CONFIG_ARM_SA1100 is not set +# CONFIG_ARM_XSCALE is not set +# CONFIG_ARM_IWMMXT is not set + +# COMPILE_IN_THUMB_MODE is not set +USE_BX=y + +TARGET_SUBARCH="" +# +# Target Architecture Features and Options +# +TARGET_ARCH="arm" +FORCE_OPTIONS_FOR_ARCH=y +# +# Using ELF file format +# +ARCH_LITTLE_ENDIAN=y +# ARCH_BIG_ENDIAN is not set +ARCH_WANTS_LITTLE_ENDIAN=y +# ARCH_WANTS_BIG_ENDIAN is not set +ARCH_HAS_MMU=y +ARCH_USE_MMU=y +UCLIBC_HAS_FLOATS=y +UCLIBC_HAS_FPU=n +DO_C99_MATH=y +# DO_XSI_MATH is not set +# UCLIBC_HAS_FENV is not set +UCLIBC_HAS_LONG_DOUBLE_MATH=y +HAVE_DOT_CONFIG=y + +# +# General Library Settings +# +# HAVE_NO_PIC is not set +DOPIC=y +# ARCH_HAS_NO_SHARED is not set +# ARCH_HAS_NO_LDSO is not set +HAVE_SHARED=y +# FORCE_SHAREABLE_TEXT_SEGMENTS is not set +LDSO_LDD_SUPPORT=y +# LDSO_CACHE_SUPPORT is not set +LDSO_PRELOAD_ENV_SUPPORT=y +# LDSO_PRELOAD_FILE_SUPPORT is not set +# LDSO_STANDALONE_SUPPORT is not set +# LDSO_PRELINK_SUPPORT is not set +# UCLIBC_STATIC_LDCONFIG is not set +LDSO_RUNPATH=y +LDSO_SEARCH_INTERP_PATH=y +LDSO_LD_LIBRARY_PATH=y +# LDSO_NO_CLEANUP is not set +UCLIBC_CTOR_DTOR=y +# LDSO_GNU_HASH_SUPPORT is not set +# HAS_NO_THREADS is not set +UCLIBC_HAS_SYSLOG=y +UCLIBC_HAS_LFS=y +# MALLOC is not set +# MALLOC_SIMPLE is not set +MALLOC_STANDARD=y +MALLOC_GLIBC_COMPAT=y +UCLIBC_DYNAMIC_ATEXIT=y +# COMPAT_ATEXIT is not set +UCLIBC_SUSV3_LEGACY=y +# UCLIBC_SUSV3_LEGACY_MACROS is not set +UCLIBC_SUSV4_LEGACY=y +# UCLIBC_STRICT_HEADERS is not set +# UCLIBC_HAS_STUBS is not set +UCLIBC_HAS_SHADOW=y +UCLIBC_HAS_PROGRAM_INVOCATION_NAME=y +UCLIBC_HAS___PROGNAME=y +UCLIBC_HAS_PTY=y +ASSUME_DEVPTS=y +UNIX98PTY_ONLY=y +UCLIBC_HAS_GETPT=y +UCLIBC_HAS_LIBUTIL=y +UCLIBC_HAS_TM_EXTENSIONS=y +UCLIBC_HAS_TZ_CACHING=y +UCLIBC_HAS_TZ_FILE=y +UCLIBC_HAS_TZ_FILE_READ_MANY=y +UCLIBC_TZ_FILE_PATH="/etc/TZ" +UCLIBC_FALLBACK_TO_ETC_LOCALTIME=y + +# +# Advanced Library Settings +# +UCLIBC_PWD_BUFFER_SIZE=256 +UCLIBC_GRP_BUFFER_SIZE=256 + +# +# Support various families of functions +# +UCLIBC_LINUX_MODULE_26=y +# UCLIBC_LINUX_MODULE_24 is not set +UCLIBC_LINUX_SPECIFIC=y +UCLIBC_HAS_GNU_ERROR=y +UCLIBC_BSD_SPECIFIC=y +UCLIBC_HAS_BSD_ERR=y +# UCLIBC_HAS_OBSOLETE_BSD_SIGNAL is not set +# UCLIBC_HAS_OBSOLETE_SYSV_SIGNAL is not set +# UCLIBC_NTP_LEGACY is not set +# UCLIBC_SV4_DEPRECATED is not set +UCLIBC_HAS_REALTIME=y +UCLIBC_HAS_ADVANCED_REALTIME=y +UCLIBC_HAS_EPOLL=y +UCLIBC_HAS_XATTR=y +UCLIBC_HAS_PROFILING=y +UCLIBC_HAS_CRYPT_IMPL=y +# UCLIBC_HAS_SHA256_CRYPT_IMPL is not set +# UCLIBC_HAS_SHA512_CRYPT_IMPL is not set +UCLIBC_HAS_CRYPT=y +UCLIBC_HAS_NETWORK_SUPPORT=y +UCLIBC_HAS_SOCKET=y +UCLIBC_HAS_IPV4=y +UCLIBC_HAS_IPV6=y +UCLIBC_HAS_RPC=n +UCLIBC_HAS_FULL_RPC=n +UCLIBC_HAS_REENTRANT_RPC=n +UCLIBC_USE_NETLINK=y +UCLIBC_SUPPORT_AI_ADDRCONFIG=y +# UCLIBC_HAS_BSD_RES_CLOSE is not set +UCLIBC_HAS_COMPAT_RES_STATE=y +# UCLIBC_HAS_EXTRA_COMPAT_RES_STATE is not set +UCLIBC_HAS_RESOLVER_SUPPORT=y +UCLIBC_HAS_LIBRESOLV_STUB=y +UCLIBC_HAS_LIBNSL_STUB=y + +# +# String and Stdio Support +# +# UCLIBC_HAS_STRING_GENERIC_OPT is not set +UCLIBC_HAS_STRING_ARCH_OPT=y +UCLIBC_HAS_CTYPE_TABLES=y +UCLIBC_HAS_CTYPE_SIGNED=y +# UCLIBC_HAS_CTYPE_UNSAFE is not set +UCLIBC_HAS_CTYPE_CHECKED=y +# UCLIBC_HAS_CTYPE_ENFORCED is not set +UCLIBC_HAS_WCHAR=y +UCLIBC_HAS_LOCALE=n +UCLIBC_HAS_HEXADECIMAL_FLOATS=y +# UCLIBC_HAS_GLIBC_DIGIT_GROUPING is not set +UCLIBC_HAS_GLIBC_CUSTOM_PRINTF=y +# USE_OLD_VFPRINTF is not set +UCLIBC_PRINTF_SCANF_POSITIONAL_ARGS=9 +UCLIBC_HAS_SCANF_GLIBC_A_FLAG=y +# UCLIBC_HAS_STDIO_BUFSIZ_NONE is not set +# UCLIBC_HAS_STDIO_BUFSIZ_256 is not set +# UCLIBC_HAS_STDIO_BUFSIZ_512 is not set +# UCLIBC_HAS_STDIO_BUFSIZ_1024 is not set +# UCLIBC_HAS_STDIO_BUFSIZ_2048 is not set +UCLIBC_HAS_STDIO_BUFSIZ_4096=y +# UCLIBC_HAS_STDIO_BUFSIZ_8192 is not set +UCLIBC_HAS_STDIO_BUILTIN_BUFFER_NONE=y +# UCLIBC_HAS_STDIO_BUILTIN_BUFFER_4 is not set +# UCLIBC_HAS_STDIO_BUILTIN_BUFFER_8 is not set +# UCLIBC_HAS_STDIO_SHUTDOWN_ON_ABORT is not set +# UCLIBC_HAS_STDIO_GETC_MACRO is not set +# UCLIBC_HAS_STDIO_PUTC_MACRO is not set +UCLIBC_HAS_STDIO_AUTO_RW_TRANSITION=y +# UCLIBC_HAS_FOPEN_LARGEFILE_MODE is not set +UCLIBC_HAS_FOPEN_EXCLUSIVE_MODE=y +# UCLIBC_HAS_FOPEN_CLOSEEXEC_MODE is not set +UCLIBC_HAS_GLIBC_CUSTOM_STREAMS=y +UCLIBC_HAS_PRINTF_M_SPEC=y +UCLIBC_HAS_ERRNO_MESSAGES=y +# UCLIBC_HAS_SYS_ERRLIST is not set +UCLIBC_HAS_SIGNUM_MESSAGES=y +# UCLIBC_HAS_SYS_SIGLIST is not set +UCLIBC_HAS_GNU_GETOPT=y +# UCLIBC_HAS_GNU_GETSUBOPT is not set + +# +# Big and Tall +# +UCLIBC_HAS_REGEX=y +# UCLIBC_HAS_REGEX_OLD is not set +UCLIBC_HAS_FNMATCH=y +# UCLIBC_HAS_FNMATCH_OLD is not set +# UCLIBC_HAS_WORDEXP is not set +UCLIBC_HAS_NFTW=y +UCLIBC_HAS_FTW=y +# UCLIBC_HAS_FTS is not set +UCLIBC_HAS_GLOB=y +UCLIBC_HAS_GNU_GLOB=y +UCLIBC_HAS_UTMPX=y + +# +# Library Installation Options +# +RUNTIME_PREFIX="/" +DEVEL_PREFIX="/usr/" +MULTILIB_DIR="lib" +HARDWIRED_ABSPATH=y + +# +# Security options +# +# UCLIBC_BUILD_PIE is not set +# UCLIBC_HAS_ARC4RANDOM is not set +# HAVE_NO_SSP is not set +UCLIBC_HAS_SSP=y +# UCLIBC_HAS_SSP_COMPAT is not set +# SSP_QUICK_CANARY is not set +PROPOLICE_BLOCK_ABRT=y +# PROPOLICE_BLOCK_SEGV is not set +# UCLIBC_BUILD_SSP is not set +UCLIBC_BUILD_RELRO=y +UCLIBC_BUILD_NOW=y +UCLIBC_BUILD_NOEXECSTACK=y + +# +# uClibc development/debugging options +# +UCLIBC_EXTRA_CFLAGS="" +# DODEBUG is not set +# DODEBUG_PT is not set +DOSTRIP=y +# DOASSERTS is not set +# SUPPORT_LD_DEBUG is not set +# SUPPORT_LD_DEBUG_EARLY is not set +# UCLIBC_MALLOC_DEBUGGING is not set +# UCLIBC_HAS_BACKTRACE is not set +WARNINGS="-Wall" +# EXTRA_WARNINGS is not set +# DOMULTI is not set +# UCLIBC_MJN3_ONLY is not set +# CONFIG_GENERIC_ARM is not set +# CONFIG_ARM610 is not set +# CONFIG_ARM710 is not set +# CONFIG_ARM7TDMI is not set +# CONFIG_ARM720T is not set +# CONFIG_ARM920T is not set +# CONFIG_ARM922T is not set +# CONFIG_ARM926T is not set +# CONFIG_ARM10T is not set +CONFIG_ARM1136JF_S=y +# CONFIG_ARM1176JZ_S is not set +# CONFIG_ARM1176JZF_S is not set +# CONFIG_ARM_SA110 is not set +# CONFIG_ARM_SA1100 is not set +# CONFIG_ARM_XSCALE is not set +# CONFIG_ARM_IWMMXT is not set +# CONFIG_ARM_OABI is not set +CONFIG_ARM_EABI=y +UCLIBC_HAS_THREADS=y +# LINUXTHREADS is not set +# LINUXTHREADS_NEW is not set +# LINUXTHREADS_OLD is not set +UCLIBC_HAS_THREADS_NATIVE=y +# PTHREADS_DEBUG_SUPPORT is not set diff --git a/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/recipe/parent/uclibc.config.minimal b/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/recipe/parent/uclibc.config.minimal new file mode 100644 index 0000000000000000000000000000000000000000..af041eabf04383938f4857a8ec85a6834b5c07b5 --- /dev/null +++ b/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/recipe/parent/uclibc.config.minimal @@ -0,0 +1,2 @@ +UCLIBC_HAS_STDIO_GETC_MACRO=n +UCLIBC_HAS_STDIO_PUTC_MACRO=n diff --git a/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/recipe/parent/yum_requirements.txt b/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/recipe/parent/yum_requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..1017f133398ac40e5408f2f480b14d422da8b632 --- /dev/null +++ b/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/recipe/parent/yum_requirements.txt @@ -0,0 +1,12 @@ +wget +m4 +help2man +patch +gcc-gfortran +gcc-c++ +rsync +sed +findutils +make +file +strace diff --git a/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/repodata_record.json b/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/repodata_record.json new file mode 100644 index 0000000000000000000000000000000000000000..7d0274021aae9c610361ba0aa30a4e1afe650782 --- /dev/null +++ b/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/repodata_record.json @@ -0,0 +1,24 @@ +{ + "arch": "x86_64", + "build": "h39759b7_7", + "build_number": 7, + "channel": "https://repo.anaconda.com/pkgs/main/linux-64/", + "constrains": [ + "libstdcxx-ng ==15.2.0 *_7" + ], + "depends": [ + "__glibc >=2.28,<3.0.a0", + "libgcc 15.2.0 h69a1729_7" + ], + "fn": "libstdcxx-15.2.0-h39759b7_7.conda", + "license": "GPL-3.0-only WITH GCC-exception-3.1", + "md5": "7dc7ec61ceea5de17f3e2c4c5f442fc6", + "name": "libstdcxx", + "platform": "linux", + "sha256": "747474162ae421d680ab3374d8b11158701206d4a9c4a8f9de557dd6fc13345a", + "size": 3903663, + "subdir": "linux-64", + "timestamp": 1762772586000, + "url": "https://repo.anaconda.com/pkgs/main/linux-64/libstdcxx-15.2.0-h39759b7_7.conda", + "version": "15.2.0" +} \ No newline at end of file diff --git a/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/test/run_test.sh b/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/test/run_test.sh new file mode 100644 index 0000000000000000000000000000000000000000..a3f16ebc41aeab3bf67c657dd56241df4255a37a --- /dev/null +++ b/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/info/test/run_test.sh @@ -0,0 +1,8 @@ + + +set -ex + + + +test -f ${PREFIX}/lib/libstdc++.so +exit 0 diff --git a/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/share/licenses/libstdc++/RUNTIME.LIBRARY.EXCEPTION b/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/share/licenses/libstdc++/RUNTIME.LIBRARY.EXCEPTION new file mode 100644 index 0000000000000000000000000000000000000000..e1b3c69c179dfaff5744ea4bf853e6b0d90c9ef9 --- /dev/null +++ b/miniconda3/pkgs/libstdcxx-15.2.0-h39759b7_7/share/licenses/libstdc++/RUNTIME.LIBRARY.EXCEPTION @@ -0,0 +1,73 @@ +GCC RUNTIME LIBRARY EXCEPTION + +Version 3.1, 31 March 2009 + +Copyright (C) 2009 Free Software Foundation, Inc. + +Everyone is permitted to copy and distribute verbatim copies of this +license document, but changing it is not allowed. + +This GCC Runtime Library Exception ("Exception") is an additional +permission under section 7 of the GNU General Public License, version +3 ("GPLv3"). It applies to a given file (the "Runtime Library") that +bears a notice placed by the copyright holder of the file stating that +the file is governed by GPLv3 along with this Exception. + +When you use GCC to compile a program, GCC may combine portions of +certain GCC header files and runtime libraries with the compiled +program. The purpose of this Exception is to allow compilation of +non-GPL (including proprietary) programs to use, in this way, the +header files and runtime libraries covered by this Exception. + +0. Definitions. + +A file is an "Independent Module" if it either requires the Runtime +Library for execution after a Compilation Process, or makes use of an +interface provided by the Runtime Library, but is not otherwise based +on the Runtime Library. + +"GCC" means a version of the GNU Compiler Collection, with or without +modifications, governed by version 3 (or a specified later version) of +the GNU General Public License (GPL) with the option of using any +subsequent versions published by the FSF. + +"GPL-compatible Software" is software whose conditions of propagation, +modification and use would permit combination with GCC in accord with +the license of GCC. + +"Target Code" refers to output from any compiler for a real or virtual +target processor architecture, in executable form or suitable for +input to an assembler, loader, linker and/or execution +phase. Notwithstanding that, Target Code does not include data in any +format that is used as a compiler intermediate representation, or used +for producing a compiler intermediate representation. + +The "Compilation Process" transforms code entirely represented in +non-intermediate languages designed for human-written code, and/or in +Java Virtual Machine byte code, into Target Code. Thus, for example, +use of source code generators and preprocessors need not be considered +part of the Compilation Process, since the Compilation Process can be +understood as starting with the output of the generators or +preprocessors. + +A Compilation Process is "Eligible" if it is done using GCC, alone or +with other GPL-compatible software, or if it is done without using any +work based on GCC. For example, using non-GPL-compatible Software to +optimize any GCC intermediate representations would not qualify as an +Eligible Compilation Process. + +1. Grant of Additional Permission. + +You have permission to propagate a work of Target Code formed by +combining the Runtime Library with Independent Modules, even if such +propagation would otherwise violate the terms of GPLv3, provided that +all Target Code was generated by Eligible Compilation Processes. You +may then convey such a combination under terms of your choice, +consistent with the licensing of the Independent Modules. + +2. No Weakening of GCC Copyleft. + +The availability of this Exception does not imply any general +presumption that third-party software is unaffected by the copyleft +requirements of the license of GCC. + diff --git a/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/about.json b/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/about.json new file mode 100644 index 0000000000000000000000000000000000000000..249861c56985c3f29e1d895bf252e52b360fad31 --- /dev/null +++ b/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/about.json @@ -0,0 +1,164 @@ +{ + "channels": [ + "https://repo.anaconda.com/pkgs/main", + "https://repo.anaconda.com/pkgs/r", + "https://repo.anaconda.com/pkgs/r" + ], + "conda_build_version": "25.1.2", + "conda_version": "25.1.1", + "env_vars": { + "CIO_TEST": "" + }, + "extra": { + "copy_test_source_files": true, + "feedstock-name": "ctng-compilers-feedstock", + "final": true, + "parent_recipe": { + "name": "gcc_compilers", + "path": "/home/task_176276935360828/ctng-compilers-feedstock/recipe", + "version": "15.2.0" + }, + "recipe-maintainers": [ + "timsnyder", + "xhochy", + "isuruf", + "beckermr" + ] + }, + "home": "https://gcc.gnu.org/", + "identifiers": [], + "keywords": [], + "license": "GPL-3.0-only WITH GCC-exception-3.1", + "root_pkgs": [ + "_libgcc_mutex 0.1 main", + "ca-certificates 2025.9.9 h06a4308_0", + "ld_impl_linux-64 2.40 h12ee557_0", + "libstdcxx-ng 11.2.0 h1234567_1", + "nlohmann_json 3.11.2 h6a678d5_0", + "pybind11-abi 5 hd3eb1b0_0", + "tzdata 2025a h04d1e81_0", + "libgomp 11.2.0 h1234567_1", + "_openmp_mutex 5.1 1_gnu", + "libgcc-ng 11.2.0 h1234567_1", + "bzip2 1.0.8 h5eee18b_6", + "c-ares 1.19.1 h5eee18b_0", + "cpp-expected 1.1.0 hdb19cb5_0", + "expat 2.6.4 h6a678d5_0", + "fmt 9.1.0 hdb19cb5_1", + "icu 73.1 h6a678d5_0", + "libev 4.33 h7f8727e_1", + "libffi 3.4.4 h6a678d5_1", + "libuuid 1.41.5 h5eee18b_0", + "lz4-c 1.9.4 h6a678d5_1", + "ncurses 6.4 h6a678d5_0", + "liblief 0.12.3 h6a678d5_0", + "reproc 14.2.4 h6a678d5_2", + "simdjson 3.10.1 hdb19cb5_0", + "xz 5.4.6 h5eee18b_1", + "yaml-cpp 0.8.0 h6a678d5_1", + "zlib 1.2.13 h5eee18b_1", + "libedit 3.1.20230828 h5eee18b_0", + "libnghttp2 1.57.0 h2d74bed_0", + "libssh2 1.11.1 h251f7ec_0", + "libxml2 2.13.5 hfdd30dd_0", + "pcre2 10.42 hebb0a14_1", + "readline 8.2 h5eee18b_0", + "reproc-cpp 14.2.4 h6a678d5_2", + "spdlog 1.11.0 hdb19cb5_0", + "tk 8.6.14 h39e8969_0", + "zstd 1.5.6 hc292b87_0", + "krb5 1.20.1 h143b758_1", + "libarchive 3.7.7 hfab0078_0", + "libsolv 0.7.30 he621ea3_1", + "sqlite 3.45.3 h5eee18b_0", + "libcurl 8.11.1 hc9e6f67_0", + "python 3.12.9 h5148396_0", + "libmamba 2.0.5 haf1ee3a_1", + "menuinst 2.2.0 py312h06a4308_1", + "anaconda-anon-usage 0.5.0 py312hfc0e8ea_100", + "annotated-types 0.6.0 py312h06a4308_0", + "archspec 0.2.3 pyhd3eb1b0_0", + "boltons 24.1.0 py312h06a4308_0", + "brotli-python 1.0.9 py312h6a678d5_9", + "charset-normalizer 3.3.2 pyhd3eb1b0_0", + "distro 1.9.0 py312h06a4308_0", + "frozendict 2.4.2 py312h06a4308_0", + "idna 3.7 py312h06a4308_0", + "jsonpointer 2.1 pyhd3eb1b0_0", + "libmambapy 2.0.5 py312hdb19cb5_1", + "mdurl 0.1.0 py312h06a4308_0", + "packaging 24.2 py312h06a4308_0", + "platformdirs 3.10.0 py312h06a4308_0", + "pluggy 1.5.0 py312h06a4308_0", + "pycosat 0.6.6 py312h5eee18b_2", + "pycparser 2.21 pyhd3eb1b0_0", + "pygments 2.15.1 py312h06a4308_1", + "pysocks 1.7.1 py312h06a4308_0", + "ruamel.yaml.clib 0.2.8 py312h5eee18b_0", + "setuptools 75.8.0 py312h06a4308_0", + "tqdm 4.67.1 py312he106c6f_0", + "truststore 0.10.0 py312h06a4308_0", + "typing_extensions 4.12.2 py312h06a4308_0", + "wheel 0.45.1 py312h06a4308_0", + "cffi 1.17.1 py312h1fdaa30_1", + "jsonpatch 1.33 py312h06a4308_1", + "markdown-it-py 2.2.0 py312h06a4308_1", + "pip 25.0 py312h06a4308_0", + "ruamel.yaml 0.18.6 py312h5eee18b_0", + "typing-extensions 4.12.2 py312h06a4308_0", + "urllib3 2.3.0 py312h06a4308_0", + "cryptography 43.0.3 py312h7825ff9_1", + "pydantic-core 2.27.1 py312h4aa5aa6_0", + "requests 2.32.3 py312h06a4308_1", + "rich 13.9.4 py312h06a4308_0", + "zstandard 0.23.0 py312h2c38b39_1", + "conda-content-trust 0.2.0 py312h06a4308_1", + "conda-package-streaming 0.11.0 py312h06a4308_0", + "pydantic 2.10.3 py312h06a4308_0", + "conda-package-handling 2.4.0 py312h06a4308_0", + "conda 25.1.1 py312h06a4308_0", + "conda-anaconda-tos 0.1.2 py312h06a4308_0", + "conda-libmamba-solver 25.1.1 pyhd3eb1b0_0", + "libsodium 1.0.20 heac8642_0", + "openssl 3.0.18 hd6dcaed_0", + "patch 2.8 hb25bd0a_0", + "patchelf 0.17.2 h6a678d5_0", + "yaml 0.2.5 h7b6447c_0", + "argcomplete 3.6.2 py312h06a4308_0", + "attrs 24.3.0 py312h06a4308_0", + "certifi 2025.8.3 py312h06a4308_0", + "chardet 5.2.0 py312h06a4308_0", + "click 8.2.1 py312h06a4308_0", + "filelock 3.17.0 py312h06a4308_0", + "jmespath 1.0.1 py312h06a4308_0", + "markupsafe 3.0.2 py312h5eee18b_0", + "more-itertools 10.3.0 py312h06a4308_0", + "pkginfo 1.12.0 py312h06a4308_0", + "psutil 7.0.0 py312hee96239_0", + "py-lief 0.12.3 py312h6a678d5_0", + "python-libarchive-c 5.1 pyhd3eb1b0_0", + "pytz 2025.2 py312h06a4308_0", + "pyyaml 6.0.2 py312h5eee18b_0", + "rpds-py 0.22.3 py312h4aa5aa6_0", + "six 1.17.0 py312h06a4308_0", + "soupsieve 2.5 py312h06a4308_0", + "tomlkit 0.13.2 py312h06a4308_0", + "xmltodict 0.14.2 py312h06a4308_0", + "jinja2 3.1.6 py312h06a4308_0", + "python-dateutil 2.9.0post0 py312h06a4308_2", + "referencing 0.30.2 py312h06a4308_0", + "yq 3.4.3 py312h06a4308_0", + "beautifulsoup4 4.13.5 py312h06a4308_0", + "botocore 1.37.10 py312h06a4308_0", + "jsonschema-specifications 2023.7.1 py312h06a4308_0", + "pynacl 1.5.0 py312h2630517_2", + "jsonschema 4.25.0 py312h06a4308_0", + "s3transfer 0.11.2 py312h06a4308_0", + "boto3 1.37.10 py312h06a4308_0", + "conda-anaconda-telemetry 0.3.0 pyhd3eb1b0_1", + "conda-index 0.5.0 py312h06a4308_0", + "conda-build 25.1.2 py312h06a4308_0" + ], + "summary": "The GNU C++ Runtime Library", + "tags": [] +} \ No newline at end of file diff --git a/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/files b/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/files new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/git b/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/git new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/hash_input.json b/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/hash_input.json new file mode 100644 index 0000000000000000000000000000000000000000..7716d611e78264f5eebdaf4fd7a8f6f51520d386 --- /dev/null +++ b/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/hash_input.json @@ -0,0 +1,6 @@ +{ + "triplet": "x86_64-conda-linux-gnu", + "cross_target_platform": "linux-64", + "target_platform": "linux-64", + "channel_targets": "defaults" +} \ No newline at end of file diff --git a/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/index.json b/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/index.json new file mode 100644 index 0000000000000000000000000000000000000000..a7a749194a1f33ec00e08a4dba58ef5044f56884 --- /dev/null +++ b/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/index.json @@ -0,0 +1,14 @@ +{ + "arch": "x86_64", + "build": "hc03a8fd_7", + "build_number": 7, + "depends": [ + "libstdcxx 15.2.0 h39759b7_7" + ], + "license": "GPL-3.0-only WITH GCC-exception-3.1", + "name": "libstdcxx-ng", + "platform": "linux", + "subdir": "linux-64", + "timestamp": 1762772606373, + "version": "15.2.0" +} \ No newline at end of file diff --git a/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/paths.json b/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/paths.json new file mode 100644 index 0000000000000000000000000000000000000000..03d81a3201aeefb71167ac453cd6d8c33bec10b9 --- /dev/null +++ b/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/paths.json @@ -0,0 +1,4 @@ +{ + "paths": [], + "paths_version": 1 +} \ No newline at end of file diff --git a/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/recipe/conda_build_config.yaml b/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/recipe/conda_build_config.yaml new file mode 100644 index 0000000000000000000000000000000000000000..6de73da57e6bc8ce414772f2c7a838d2e377b584 --- /dev/null +++ b/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/recipe/conda_build_config.yaml @@ -0,0 +1,42 @@ +binutils_version: '2.44' +c_compiler: gcc +c_stdlib: sysroot +c_stdlib_version: '2.28' +channel_sources: conda-forge/label/sysroot-with-crypt,conda-forge +channel_targets: defaults +cpu_optimization_target: nocona +cran_mirror: https://cran.r-project.org +cross_target_platform: linux-64 +cross_target_stdlib: sysroot +cross_target_stdlib_version: '2.28' +cxx_compiler: gxx +extend_keys: +- extend_keys +- ignore_version +- pin_run_as_build +- ignore_build_only_deps +fortran_compiler: gfortran +gcc_maj_ver: '15' +gcc_version: 15.2.0 +ignore_build_only_deps: +- python +- numpy +libgfortran_soname: '5' +libgomp_ver: 1.0.0 +lua: '5' +numpy: '1.26' +openmp_ver: '4.5' +perl: 5.26.2 +pin_run_as_build: + python: + max_pin: x.x + min_pin: x.x + r-base: + max_pin: x.x + min_pin: x.x +platform: linux-64 +python: '3.12' +r_base: '3.5' +target_platform: linux-64 +triplet: x86_64-conda-linux-gnu +with_conda_specs: 'true' diff --git a/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/recipe/install-libstdc++.sh b/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/recipe/install-libstdc++.sh new file mode 100644 index 0000000000000000000000000000000000000000..3d878849ae7b3d9282a04a885cd29df782b7d038 --- /dev/null +++ b/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/recipe/install-libstdc++.sh @@ -0,0 +1,29 @@ +#!/bin/bash + +source ${RECIPE_DIR}/setup_compiler.sh +set -e -x + +export CHOST="${triplet}" + +# libtool wants to use ranlib that is here, macOS install doesn't grok -t etc +# .. do we need this scoped over the whole file though? +#export PATH=${SRC_DIR}/gcc_built/bin:${SRC_DIR}/.build/${CHOST}/buildtools/bin:${SRC_DIR}/.build/tools/bin:${PATH} + +pushd ${SRC_DIR}/build + + make -C ${CHOST}/libstdc++-v3/src prefix=${PREFIX} install-toolexeclibLTLIBRARIES + make -C ${CHOST}/libstdc++-v3/po prefix=${PREFIX} install + +popd + +mkdir -p ${PREFIX}/lib +#mv ${PREFIX}/${CHOST}/lib/* ${PREFIX}/lib + +# no static libs +find ${PREFIX}/lib -name "*\.a" -exec rm -rf {} \; +# no libtool files +find ${PREFIX}/lib -name "*\.la" -exec rm -rf {} \; + +# Install Runtime Library Exception +install -Dm644 ${SRC_DIR}/COPYING.RUNTIME \ + ${PREFIX}/share/licenses/libstdc++/RUNTIME.LIBRARY.EXCEPTION diff --git a/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/recipe/meta.yaml b/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/recipe/meta.yaml new file mode 100644 index 0000000000000000000000000000000000000000..d97e17a1c91a4cbcedabadecff15c732835fdd59 --- /dev/null +++ b/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/recipe/meta.yaml @@ -0,0 +1,43 @@ +# This file created by conda-build 25.1.2 +# ------------------------------------------------ + +package: + name: libstdcxx-ng + version: 15.2.0 +source: + - patches: + - patches/0001-allow-commands-in-main-specfile.patch + - patches/0002-patch-zoneinfo_dir_override-to-point-to-our-tzdata.patch + - patches/0003-add-ldl-to-libstdc___la_LDFLAGS.patch + - patches/0004-Hardcode-HAVE_ALIGNED_ALLOC-1-in-libstdc-v3-configur.patch + sha256: 7294d65cc1a0558cb815af0ca8c7763d86f7a31199794ede3f630c0d1b0a5723 + url: + - https://ftp.gnu.org/gnu/gcc/gcc-15.2.0/gcc-15.2.0.tar.gz + - https://mirrors.ocf.berkeley.edu/gnu/gcc/gcc-15.2.0/gcc-15.2.0.tar.gz +build: + number: 7 + run_exports: + strong: + - libstdcxx + string: hc03a8fd_7 +requirements: + host: + - libstdcxx 15.2.0 h39759b7_7 + run: + - libstdcxx 15.2.0 h39759b7_7 +test: + commands: + - echo "empty wrapper for compatibility with previous naming" +about: + home: https://gcc.gnu.org/ + license: GPL-3.0-only WITH GCC-exception-3.1 + summary: The GNU C++ Runtime Library +extra: + copy_test_source_files: true + feedstock-name: ctng-compilers-feedstock + final: true + recipe-maintainers: + - beckermr + - isuruf + - timsnyder + - xhochy diff --git a/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/recipe/parent/LICENSE b/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/recipe/parent/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..cba42cffc2901212c539e558950c6f6ed985d628 --- /dev/null +++ b/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/recipe/parent/LICENSE @@ -0,0 +1,13 @@ +BSD 3-clause license +Copyright (c) 2015-2019, conda-forge +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/recipe/parent/build.sh b/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/recipe/parent/build.sh new file mode 100644 index 0000000000000000000000000000000000000000..68e45267b8eceabd79595abe9d20ddbc89939d23 --- /dev/null +++ b/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/recipe/parent/build.sh @@ -0,0 +1,120 @@ +#!/bin/bash + +set -ex + +source ${RECIPE_DIR}/setup_compiler.sh + +# ensure patch is applied +grep 'conda-forge:: allow' gcc/gcc.c* + +GCC_CONFIGURE_OPTIONS=() + +if [[ "$channel_targets" == *conda-forge* ]]; then + GCC_CONFIGURE_OPTIONS+=(--with-pkgversion="conda-forge gcc ${gcc_version}-${PKG_BUILDNUM}") + GCC_CONFIGURE_OPTIONS+=(--with-bugurl="https://github.com/conda-forge/ctng-compilers-feedstock/issues/new/choose") +fi + +for tool in addr2line ar as c++filt cc c++ fc gcc g++ gfortran ld nm objcopy objdump ranlib readelf size strings strip; do + tool_upper=$(echo $tool | tr a-z-+ A-Z_X) + if [[ "$tool" == "cc" ]]; then + tool=gcc + elif [[ "$tool" == "fc" ]]; then + tool=gfortran + elif [[ "$tool" == "c++" ]]; then + tool=g++ + elif [[ "$target_platform" != "$build_platform" && "$tool" =~ ^(ar|nm|ranlib)$ ]]; then + tool="gcc-${tool}" + fi + eval "export ${tool_upper}_FOR_BUILD=\$BUILD_PREFIX/bin/\$BUILD-\$tool" + eval "export ${tool_upper}=\$BUILD_PREFIX/bin/\$HOST-\$tool" + eval "export ${tool_upper}_FOR_TARGET=\$BUILD_PREFIX/bin/\$TARGET-\$tool" +done + +if [[ "$cross_target_platform" == "win-64" ]]; then + # do not expect ${prefix}/mingw symlink - this should be superceded by + # 0005-Windows-Don-t-ignore-native-system-header-dir.patch .. but isn't! + sed -i 's#${prefix}/mingw/#${prefix}/${target}/sysroot/usr/#g' configure + if [[ "$gcc_maj_ver" == "13" || "$gcc_maj_ver" == "14" ]]; then + sed -i "s#/mingw/#/usr/#g" gcc/config/i386/mingw32.h + else + sed -i "s#/mingw/#/usr/#g" gcc/config/mingw/mingw32.h + fi +else + # prevent mingw patches from being archived in linux conda packages + rm -rf ${RECIPE_DIR}/patches/mingw +fi + +NATIVE_SYSTEM_HEADER_DIR=/usr/include +SYSROOT_DIR=${PREFIX}/${TARGET}/sysroot + +# workaround a bug in gcc build files when using external binutils +# and build != host == target +export gcc_cv_objdump=$OBJDUMP_FOR_TARGET + +ls $BUILD_PREFIX/bin/ + +./contrib/download_prerequisites + +# We want CONDA_PREFIX/usr/lib not CONDA_PREFIX/usr/lib64 and this +# is the only way. It is incompatible with multilib (obviously). +TINFO_FILES=$(find . -path "*/config/*/t-*") +for TINFO_FILE in ${TINFO_FILES}; do + echo TINFO_FILE ${TINFO_FILE} + sed -i.bak 's#^\(MULTILIB_OSDIRNAMES.*\)\(lib64\)#\1lib#g' ${TINFO_FILE} + rm -f ${TINFO_FILE}.bak + sed -i.bak 's#^\(MULTILIB_OSDIRNAMES.*\)\(libx32\)#\1lib#g' ${TINFO_FILE} + rm -f ${TINFO_FILE}.bak +done + +# workaround for https://gcc.gnu.org/bugzilla//show_bug.cgi?id=80196 +if [[ "$gcc_version" == "11."* && "$build_platform" != "$target_platform" ]]; then + sed -i.bak 's@-I$glibcxx_srcdir/libsupc++@-I$glibcxx_srcdir/libsupc++ -nostdinc++@g' libstdc++-v3/configure +fi + +mkdir -p build +cd build + +# We need to explicitly set the gxx include dir because previously +# with ct-ng, native build was not considered native because +# BUILD=HOST=x86_64-build_unknown-linux-gnu and TARGET=x86_64-conda-linux-gnu +# Depending on native or not, the include dir changes. Setting it explictly +# goes back to the original way. +# See https://github.com/gcc-mirror/gcc/blob/16e2427f50c208dfe07d07f18009969502c25dc8/gcc/configure.ac#L218 + +if [[ "$TARGET" == *linux* ]]; then + GCC_CONFIGURE_OPTIONS+=(--enable-libsanitizer) + GCC_CONFIGURE_OPTIONS+=(--enable-default-pie) + GCC_CONFIGURE_OPTIONS+=(--enable-threads=posix) +fi + +../configure \ + --prefix="$PREFIX" \ + --with-slibdir="$PREFIX/lib" \ + --libdir="$PREFIX/lib" \ + --mandir="$PREFIX/man" \ + --build=$BUILD \ + --host=$HOST \ + --target=$TARGET \ + --enable-languages=c,c++,fortran,objc,obj-c++ \ + --enable-__cxa_atexit \ + --disable-libmudflap \ + --enable-libgomp \ + --disable-libssp \ + --enable-libquadmath \ + --enable-libquadmath-support \ + --enable-lto \ + --enable-target-optspace \ + --enable-plugin \ + --enable-gold \ + --disable-nls \ + --disable-multilib \ + --enable-long-long \ + --with-sysroot=${SYSROOT_DIR} \ + --with-build-sysroot=${BUILD_PREFIX}/${TARGET}/sysroot \ + --with-native-system-header-dir=${NATIVE_SYSTEM_HEADER_DIR} \ + --with-gxx-include-dir="${PREFIX}/lib/gcc/${TARGET}/${gcc_version}/include/c++" \ + "${GCC_CONFIGURE_OPTIONS[@]}" + +# Setting the CPU_COUNT=1 lets you see which job failed! +#CPU_COUNT=1 +make -j${CPU_COUNT} diff --git a/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/recipe/parent/c11threads.c b/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/recipe/parent/c11threads.c new file mode 100644 index 0000000000000000000000000000000000000000..1d0b34c8662f7eca07c573c32eadbdf35a8427e3 --- /dev/null +++ b/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/recipe/parent/c11threads.c @@ -0,0 +1,6 @@ +#include +int main() { + mtx_t mutex; + mtx_init(&mutex, mtx_plain); +} + diff --git a/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/recipe/parent/conda_build_config.yaml b/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/recipe/parent/conda_build_config.yaml new file mode 100644 index 0000000000000000000000000000000000000000..2066b6abe52a8e832f676e8c49dd5a847678ae63 --- /dev/null +++ b/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/recipe/parent/conda_build_config.yaml @@ -0,0 +1,49 @@ +triplet: + - x86_64-conda-linux-gnu # [linux and x86_64] + - powerpc64le-conda-linux-gnu # [ppc64le] + - aarch64-conda-linux-gnu # [linux and aarch64] + - x86_64-w64-mingw32 # [win] +gcc_version: + - 15.2.0 # [not ANACONDA_ROCKET_ENABLE_GCC13 and not ANACONDA_ROCKET_ENABLE_GCC14] + - 14.3.0 # [ANACONDA_ROCKET_ENABLE_GCC14] + - 13.4.0 # [ANACONDA_ROCKET_ENABLE_GCC13] +gcc_maj_ver: + - 15 # [not ANACONDA_ROCKET_ENABLE_GCC13 and not ANACONDA_ROCKET_ENABLE_GCC14] + - 14 # [ANACONDA_ROCKET_ENABLE_GCC14] + - 13 # [ANACONDA_ROCKET_ENABLE_GCC13] +libgfortran_soname: + - 5 # [not ANACONDA_ROCKET_ENABLE_GCC13 and not ANACONDA_ROCKET_ENABLE_GCC14] + - 5 # [ANACONDA_ROCKET_ENABLE_GCC14] + - 5 # [ANACONDA_ROCKET_ENABLE_GCC13] +binutils_version: + - 2.44 +cross_target_platform: + - linux-64 # [linux and x86_64] + - linux-ppc64le # [ppc64le] + - linux-aarch64 # [linux and aarch64] + - win-64 # [win] +cross_target_stdlib_version: + - 2.28 # [linux and x86_64] + - 2.28 # [ppc64le] + - 2.28 # [linux and aarch64] + - 12 # [win] +cross_target_stdlib: + - sysroot # [linux and x86_64] + - sysroot # [ppc64le] + - sysroot # [linux and aarch64] + - m2w64-sysroot # [win] +# openmp versions +openmp_ver: + - 4.5 +libgomp_ver: + - 1.0.0 +channel_sources: + - conda-forge/label/sysroot-with-crypt,conda-forge +# we could use stdlib("m2w64_c"), but this allows uniform use in setup_compiler.sh +c_stdlib: # [win] + - m2w64-sysroot # [win] +c_stdlib_version: # [win] + - 12 # [win] +with_conda_specs: + - true + - false diff --git a/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/recipe/parent/config.old b/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/recipe/parent/config.old new file mode 100644 index 0000000000000000000000000000000000000000..90a390a60b40932a63278c29c1f013e7d5254a2d --- /dev/null +++ b/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/recipe/parent/config.old @@ -0,0 +1,530 @@ +# +# Automatically generated file; DO NOT EDIT. +# Crosstool-NG Configuration +# +CT_CONFIGURE_has_static_link=y +CT_CONFIGURE_has_xz=y +CT_CONFIGURE_has_svn=y +CT_MODULES=y + +# +# Paths and misc options +# + +# +# crosstool-NG behavior +# +CT_OBSOLETE=y +CT_EXPERIMENTAL=y +CT_ALLOW_BUILD_AS_ROOT=y +CT_ALLOW_BUILD_AS_ROOT_SURE=y +# CT_DEBUG_CT is not set + +# +# Paths +# +CT_LOCAL_TARBALLS_DIR="${HOME}/src" +CT_SAVE_TARBALLS=y +CT_WORK_DIR="${CT_TOP_DIR}/.build" +CT_PREFIX_DIR="${CT_TOP_DIR}/gcc_built" +CT_BUILD_TOP_DIR="@BUILD_TOP@" +CT_INSTALL_DIR="${CT_PREFIX_DIR}" +CT_RM_RF_PREFIX_DIR=n +CT_REMOVE_DOCS=y +CT_INSTALL_DIR_RO=n +CT_STRIP_HOST_TOOLCHAIN_EXECUTABLES=y +# CT_STRIP_TARGET_TOOLCHAIN_EXECUTABLES is not set + +# +# Downloading +# +# CT_FORBID_DOWNLOAD is not set +# CT_FORCE_DOWNLOAD is not set +CT_CONNECT_TIMEOUT=10 +# CT_ONLY_DOWNLOAD is not set +# CT_USE_MIRROR is not set + +# +# Extracting +# +# CT_FORCE_EXTRACT is not set +CT_OVERIDE_CONFIG_GUESS_SUB=y +# CT_ONLY_EXTRACT is not set +CT_PATCH_BUNDLED=y +# CT_PATCH_LOCAL is not set +# CT_PATCH_BUNDLED_LOCAL is not set +# CT_PATCH_LOCAL_BUNDLED is not set +# CT_PATCH_BUNDLED_FALLBACK_LOCAL is not set +# CT_PATCH_LOCAL_FALLBACK_BUNDLED is not set +# CT_PATCH_NONE is not set +CT_PATCH_ORDER="bundled" + +# +# Build behavior +# +CT_PARALLEL_JOBS=4 +CT_LOAD="" +CT_USE_PIPES=y +CT_EXTRA_CFLAGS_FOR_BUILD="" +CT_EXTRA_LDFLAGS_FOR_BUILD="" +CT_EXTRA_CFLAGS_FOR_HOST="" +CT_EXTRA_LDFLAGS_FOR_HOST="" +# CT_CONFIG_SHELL_SH is not set +# CT_CONFIG_SHELL_ASH is not set +CT_CONFIG_SHELL_BASH=y +# CT_CONFIG_SHELL_CUSTOM is not set +CT_CONFIG_SHELL="${bash}" + +# +# Logging +# +# CT_LOG_ERROR is not set +# CT_LOG_WARN is not set +CT_LOG_INFO=y +# CT_LOG_EXTRA is not set +# CT_LOG_ALL is not set +# CT_LOG_DEBUG is not set +CT_LOG_LEVEL_MAX="INFO" +# CT_LOG_SEE_TOOLS_WARN is not set +CT_LOG_PROGRESS_BAR=y +CT_LOG_TO_FILE=y +CT_LOG_FILE_COMPRESS=y + +# +# Target options +# +CT_ARCH="arm" +CT_ARCH_SUPPORTS_BOTH_MMU=y +CT_ARCH_SUPPORTS_BOTH_ENDIAN=y +CT_ARCH_SUPPORTS_32=y +CT_ARCH_SUPPORTS_64=y +CT_ARCH_SUPPORTS_WITH_ARCH=y +CT_ARCH_SUPPORTS_WITH_CPU=y +CT_ARCH_SUPPORTS_WITH_TUNE=y +CT_ARCH_SUPPORTS_WITH_FLOAT=y +CT_ARCH_SUPPORTS_WITH_FPU=y +CT_ARCH_SUPPORTS_SOFTFP=y +CT_ARCH_DEFAULT_HAS_MMU=y +CT_ARCH_DEFAULT_LE=y +CT_ARCH_DEFAULT_32=y +CT_ARCH_CPU="arm1136jf-s" +CT_ARCH_FPU="vfp" +# CT_ARCH_BE is not set +CT_ARCH_LE=y +CT_ARCH_32=y +# CT_ARCH_64 is not set +CT_ARCH_BITNESS=32 +# CT_ARCH_FLOAT_HW is not set +CT_ARCH_FLOAT_SW=y +CT_TARGET_CFLAGS="" +CT_TARGET_LDFLAGS="" +# CT_ARCH_alpha is not set +CT_ARCH_arm=y +# CT_ARCH_avr is not set +# CT_ARCH_m68k is not set +# CT_ARCH_microblaze is not set +# CT_ARCH_mips is not set +# CT_ARCH_nios2 is not set +# CT_ARCH_powerpc is not set +# CT_ARCH_s390 is not set +# CT_ARCH_sh is not set +# CT_ARCH_sparc is not set +# CT_ARCH_x86 is not set +# CT_ARCH_xtensa is not set +CT_ARCH_alpha_AVAILABLE=y +CT_ARCH_arm_AVAILABLE=y +CT_ARCH_avr_AVAILABLE=y +CT_ARCH_m68k_AVAILABLE=y +CT_ARCH_microblaze_AVAILABLE=y +CT_ARCH_mips_AVAILABLE=y +CT_ARCH_nios2_AVAILABLE=y +CT_ARCH_powerpc_AVAILABLE=y +CT_ARCH_s390_AVAILABLE=y +CT_ARCH_sh_AVAILABLE=y +CT_ARCH_sparc_AVAILABLE=y +CT_ARCH_x86_AVAILABLE=y +CT_ARCH_xtensa_AVAILABLE=y +CT_ARCH_SUFFIX="" + +# +# Generic target options +# +# CT_MULTILIB is not set +# CT_DISABLE_MULTILIB_LIB_OSDIRNAMES is not set +CT_ARCH_USE_MMU=y +CT_ARCH_ENDIAN="little" +CT_ARCH_32=y + +# +# Target optimisations +# +CT_ARCH_EXCLUSIVE_WITH_CPU=y +# CT_ARCH_FLOAT_AUTO is not set +# CT_ARCH_FLOAT_SOFTFP is not set +CT_ARCH_FLOAT="soft" + +# +# arm other options +# +CT_ARCH_ARM_MODE="arm" +CT_ARCH_ARM_MODE_ARM=y +# CT_ARCH_ARM_MODE_THUMB is not set +# CT_ARCH_ARM_INTERWORKING is not set +CT_ARCH_ARM_EABI_FORCE=y +CT_ARCH_ARM_EABI=y + +# +# Toolchain options +# + +# +# General toolchain options +# +CT_FORCE_SYSROOT=y +CT_USE_SYSROOT=y +CT_SYSROOT_NAME="sysroot" +CT_SYSROOT_DIR_PREFIX="" +CT_WANTS_STATIC_LINK=y +CT_STATIC_TOOLCHAIN=y +CT_TOOLCHAIN_PKGVERSION="" +CT_TOOLCHAIN_BUGURL="" + +# +# Tuple completion and aliasing +# +CT_TARGET_VENDOR="unknown" +CT_TARGET_ALIAS_SED_EXPR="" +CT_TARGET_ALIAS="" + +# +# Toolchain type +# +# CT_NATIVE is not set +CT_CROSS=y +# CT_CROSS_NATIVE is not set +# CT_CANADIAN is not set +CT_TOOLCHAIN_TYPE="cross" + +# +# Build system +# +CT_BUILD="x86_64-pc-linux-gnu" +CT_BUILD_PREFIX="" +CT_BUILD_SUFFIX="" + +# +# Misc options +# +# CT_TOOLCHAIN_ENABLE_NLS is not set + +# +# Operating System +# +CT_KERNEL_SUPPORTS_SHARED_LIBS=y +CT_KERNEL="linux" +CT_KERNEL_VERSION="3.2.43" +# CT_KERNEL_bare_metal is not set +CT_KERNEL_linux=y +CT_KERNEL_bare_metal_AVAILABLE=y +CT_KERNEL_linux_AVAILABLE=y +# CT_KERNEL_LINUX_CUSTOM is not set +# CT_KERNEL_V_4_4 is not set +# CT_KERNEL_V_4_3 is not set +# CT_KERNEL_V_4_1 is not set +# CT_KERNEL_V_3_18 is not set +# CT_KERNEL_V_3_14 is not set +# CT_KERNEL_V_3_12 is not set +# CT_KERNEL_V_3_10 is not set +# CT_KERNEL_V_3_7 is not set +# CT_KERNEL_V_3_4 is not set +# CT_KERNEL_V_3_2 is not set +CT_KERNEL_V_3_2_43=y +# CT_KERNEL_V_2_6_32 is not set +# CT_KERNEL_V_2_6_18 is not set +CT_KERNEL_windows_AVAILABLE=y + +# +# Common kernel options +# +CT_SHARED_LIBS=y + +# +# linux other options +# +# CT_KERNEL_LINUX_VERBOSITY_0 is not set +CT_KERNEL_LINUX_VERBOSITY_1=y +# CT_KERNEL_LINUX_VERBOSITY_2 is not set +CT_KERNEL_LINUX_VERBOSE_LEVEL=1 +CT_KERNEL_LINUX_INSTALL_CHECK=y + +# +# Binary utilities +# +CT_ARCH_BINFMT_ELF=y +CT_BINUTILS="binutils" +CT_BINUTILS_binutils=y + +# +# GNU binutils +# +# CT_BINUTILS_CUSTOM is not set +CT_BINUTILS_VERSION="2.27" +# CT_CC_BINUTILS_SHOW_LINARO is not set +CT_BINUTILS_V_2_27=y +# CT_BINUTILS_V_2_25_1 is not set +# CT_BINUTILS_V_2_24 is not set +# CT_BINUTILS_V_2_23_2 is not set +CT_BINUTILS_2_26_or_later=y +CT_BINUTILS_2_25_1_or_later=y +CT_BINUTILS_2_25_or_later=y +CT_BINUTILS_2_24_or_later=y +CT_BINUTILS_2_23_2_or_later=y +CT_BINUTILS_HAS_HASH_STYLE=y +CT_BINUTILS_HAS_GOLD=y +CT_BINUTILS_GOLD_SUPPORTS_ARCH=y +CT_BINUTILS_HAS_PLUGINS=y +CT_BINUTILS_HAS_PKGVERSION_BUGURL=y +CT_BINUTILS_LINKER_LD=y +CT_BINUTILS_LINKERS_LIST="ld" +CT_BINUTILS_LINKER_DEFAULT="bfd" +CT_BINUTILS_EXTRA_CONFIG_ARRAY="" +CT_BINUTILS_FOR_TARGET=y +CT_BINUTILS_FOR_TARGET_IBERTY=y +CT_BINUTILS_FOR_TARGET_BFD=y +CT_BINUTILS_PLUGINS=y + +# +# binutils other options +# + +# +# C-library +# +CT_LIBC="uClibc" +CT_LIBC_VERSION="0.9.33.2" +# CT_LIBC_glibc is not set +# CT_LIBC_musl is not set +CT_LIBC_uClibc=y +CT_LIBC_avr_libc_AVAILABLE=y +CT_LIBC_glibc_AVAILABLE=y +CT_THREADS="nptl" +CT_LIBC_mingw_AVAILABLE=y +CT_LIBC_musl_AVAILABLE=y +CT_LIBC_newlib_AVAILABLE=y +CT_LIBC_none_AVAILABLE=y +CT_LIBC_uClibc_AVAILABLE=y + +CT_LIBC_UCLIBC_CUSTOM=n +CT_LIBC_UCLIBC_NG=n +CT_LIBC_UCLIBC_NG_V_1_0_22=n +CT_LIBC_UCLIBC_NG_V_1_0_21=n +CT_LIBC_UCLIBC_NG_V_1_0_20=n +CT_LIBC_UCLIBC_V_0_9_33_2=y + +CT_LIBC_UCLIBC_PARALLEL=y +# CT_LIBC_UCLIBC_VERBOSITY_0 is not set +# CT_LIBC_UCLIBC_VERBOSITY_1 is not set +CT_LIBC_UCLIBC_VERBOSITY_2=y +CT_LIBC_UCLIBC_VERBOSITY="V=2" +CT_LIBC_UCLIBC_DEBUG_LEVEL_0=y +# CT_LIBC_UCLIBC_DEBUG_LEVEL_1 is not set +# CT_LIBC_UCLIBC_DEBUG_LEVEL_2 is not set +# CT_LIBC_UCLIBC_DEBUG_LEVEL_3 is not set +CT_LIBC_UCLIBC_DEBUG_LEVEL=0 +CT_LIBC_UCLIBC_CONFIG_FILE="" +CT_LIBC_SUPPORT_THREADS_ANY=y +CT_LIBC_SUPPORT_THREADS_NATIVE=y +CT_LIBC_SUPPORT_THREADS_LT=y +CT_LIBC_SUPPORT_THREADS_NONE=y + +# +# Common C library options +# +CT_THREADS_NATIVE=y +# CT_THREADS_LT is not set +# CT_THREADS_NONE is not set +CT_LIBC_XLDD=y + +# +# uClibc other options +# +CT_LIBC_UCLIBC_LNXTHRD="" +# CT_LIBC_UCLIBC_LOCALES is not set +CT_LIBC_UCLIBC_IPV6=y +CT_LIBC_UCLIBC_WCHAR=y +# CT_LIBC_UCLIBC_FENV is not set + +# +# C compiler +# +CT_CC="gcc" +CT_CC_CORE_PASSES_NEEDED=y +CT_CC_CORE_PASS_1_NEEDED=y +CT_CC_CORE_PASS_2_NEEDED=y +CT_CC_gcc=y +# CT_CC_GCC_CUSTOM is not set +CT_CC_GCC_VERSION="6.3.0" +# CT_CC_GCC_SHOW_LINARO is not set +CT_CC_GCC_V_6_3_0=y +# CT_CC_GCC_V_6_1_0 is not set +# CT_CC_GCC_V_5_4_0 is not set +# CT_CC_GCC_V_4_9_3 is not set +# CT_CC_GCC_V_4_8_5 is not set +CT_CC_GCC_4_8_or_later=y +CT_CC_GCC_4_9_or_later=y +CT_CC_GCC_5_or_later=y +CT_CC_GCC_6=y +CT_CC_GCC_6_or_later=y +CT_CC_GCC_HAS_GRAPHITE=y +CT_CC_GCC_USE_GRAPHITE=y +CT_CC_GCC_HAS_LTO=y +CT_CC_GCC_USE_LTO=y +CT_CC_GCC_HAS_PKGVERSION_BUGURL=y +CT_CC_GCC_HAS_BUILD_ID=y +CT_CC_GCC_HAS_LNK_HASH_STYLE=y +CT_CC_GCC_USE_GMP_MPFR=y +CT_CC_GCC_USE_MPC=y +CT_CC_GCC_HAS_LIBQUADMATH=y +CT_CC_GCC_HAS_LIBSANITIZER=y +CT_CC_LANG_FORTRAN=y +CT_CC_GCC_ENABLE_CXX_FLAGS="" +CT_CC_GCC_CORE_EXTRA_CONFIG_ARRAY="" +CT_CC_GCC_EXTRA_CONFIG_ARRAY="" +CT_CC_GCC_STATIC_LIBSTDCXX=y +# CT_CC_GCC_SYSTEM_ZLIB is not set +# This does not work but it seems currently possible +# to hack it and use the stage2 liblto.so as long as +# you manually copy it to the right place. For conda +# compiler packages, we add it to binutils, since it +# is executed by programs in that package. +# Really, needs a CT_MOSTLY_STATIC_TOOLCHAIN config +# option that uses -fPIC for all companion libs and +# builds them statically and then the exes are just +# dynamic exes that happen to link only to glibc in +# a dynamic way. +CT_CC_GCC_ENABLE_PLUGINS=n + +# +# Optimisation features +# + +# +# Settings for libraries running on target +# +CT_CC_GCC_ENABLE_TARGET_OPTSPACE=y +# CT_CC_GCC_LIBMUDFLAP is not set +# CT_CC_GCC_LIBGOMP is not set +# CT_CC_GCC_LIBSSP is not set +# CT_CC_GCC_LIBQUADMATH is not set + +# +# Misc. obscure options. +# +CT_CC_CXA_ATEXIT=y +# CT_CC_GCC_DISABLE_PCH is not set +CT_CC_GCC_SJLJ_EXCEPTIONS=m +CT_CC_GCC_LDBL_128=m +# CT_CC_GCC_BUILD_ID is not set +CT_CC_GCC_LNK_HASH_STYLE_DEFAULT=y +# CT_CC_GCC_LNK_HASH_STYLE_SYSV is not set +# CT_CC_GCC_LNK_HASH_STYLE_GNU is not set +# CT_CC_GCC_LNK_HASH_STYLE_BOTH is not set +CT_CC_GCC_LNK_HASH_STYLE="" +CT_CC_GCC_DEC_FLOAT_AUTO=y +# CT_CC_GCC_DEC_FLOAT_BID is not set +# CT_CC_GCC_DEC_FLOAT_DPD is not set +# CT_CC_GCC_DEC_FLOATS_NO is not set +CT_CC_SUPPORT_CXX=y +CT_CC_SUPPORT_FORTRAN=y +CT_CC_SUPPORT_JAVA=y +CT_CC_SUPPORT_ADA=y +CT_CC_SUPPORT_OBJC=y +CT_CC_SUPPORT_OBJCXX=y +CT_CC_SUPPORT_GOLANG=y + +# +# Additional supported languages: +# +CT_CC_LANG_CXX=y +# CT_CC_LANG_JAVA is not set +# CT_CC_LANG_ADA is not set +CT_CC_LANG_OBJC=y +CT_CC_LANG_OBJCXX=y +# CT_CC_LANG_GOLANG is not set +CT_CC_LANG_OTHERS="" + +# +# Debug facilities +# +# CT_DEBUG_dmalloc is not set +# CT_DEBUG_duma is not set +# CT_DEBUG_gdb is not set +# CT_DEBUG_ltrace is not set +# CT_DEBUG_strace is not set + +# +# Companion libraries +# +CT_COMPLIBS_NEEDED=y +CT_GMP_NEEDED=y +CT_MPFR_NEEDED=y +CT_ISL_NEEDED=y +CT_MPC_NEEDED=y +CT_COMPLIBS=y +CT_GMP=y +CT_MPFR=y +CT_ISL=y +CT_MPC=y +CT_GMP_V_6_1_2=y +# CT_GMP_V_6_0_0 is not set +# CT_GMP_V_5_1_3 is not set +# CT_GMP_V_5_1_1 is not set +# CT_GMP_V_5_0_2 is not set +# CT_GMP_V_5_0_1 is not set +# CT_GMP_V_4_3_2 is not set +# CT_GMP_V_4_3_1 is not set +# CT_GMP_V_4_3_0 is not set +CT_GMP_5_0_2_or_later=y +CT_GMP_VERSION="6.1.2" +CT_MPFR_V_3_1_5=y +# CT_MPFR_V_3_1_2 is not set +# CT_MPFR_V_3_1_0 is not set +# CT_MPFR_V_3_0_1 is not set +# CT_MPFR_V_3_0_0 is not set +# CT_MPFR_V_2_4_2 is not set +# CT_MPFR_V_2_4_1 is not set +# CT_MPFR_V_2_4_0 is not set +CT_MPFR_VERSION="3.1.5" +CT_ISL_V_0_18=y +# CT_ISL_V_0_12_2 is not set +CT_ISL_V_0_14_or_later=y +CT_ISL_V_0_12_or_later=y +CT_ISL_VERSION="0.18" +CT_MPC_V_1_0_3=y +# CT_MPC_V_1_0_2 is not set +# CT_MPC_V_1_0_1 is not set +# CT_MPC_V_1_0 is not set +# CT_MPC_V_0_9 is not set +# CT_MPC_V_0_8_2 is not set +# CT_MPC_V_0_8_1 is not set +# CT_MPC_V_0_7 is not set +CT_MPC_VERSION="1.0.3" + +# +# Companion libraries common options +# +# CT_COMPLIBS_CHECK is not set + +# +# Companion tools +# + +# +# READ HELP before you say 'Y' below !!! +# +# CT_COMP_TOOLS is not set + +# +# Test suite +# +# CT_TEST_SUITE_GCC is not set diff --git a/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/recipe/parent/get_cpu_arch.sh b/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/recipe/parent/get_cpu_arch.sh new file mode 100644 index 0000000000000000000000000000000000000000..b7ec10f51bb3d6f9d3709715366948dd28dd0a4c --- /dev/null +++ b/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/recipe/parent/get_cpu_arch.sh @@ -0,0 +1,35 @@ +get_cpu_arch() { + local CPU_ARCH + if [[ "$1" == *"-64" ]]; then + CPU_ARCH="x86_64" + elif [[ "$1" == *"-ppc64le" ]]; then + CPU_ARCH="powerpc64le" + elif [[ "$1" == *"-aarch64" ]]; then + CPU_ARCH="aarch64" + elif [[ "$1" == *"-s390x" ]]; then + CPU_ARCH="s390x" + else + echo "Unknown architecture" + exit 1 + fi + echo $CPU_ARCH +} + +get_triplet() { + if [[ "$1" == linux-* ]]; then + echo "$(get_cpu_arch $1)-conda-linux-gnu" + elif [[ "$1" == osx-64 ]]; then + echo "x86_64-apple-darwin13.4.0" + elif [[ "$1" == osx-arm64 ]]; then + echo "arm64-apple-darwin20.0.0" + elif [[ "$1" == win-64 ]]; then + echo "x86_64-w64-mingw32" + else + echo "unknown platform" + exit 1 + fi +} + +export BUILD="$(get_triplet $build_platform)" +export HOST="$(get_triplet $target_platform)" +export TARGET="$(get_triplet $cross_target_platform)" diff --git a/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/recipe/parent/hello-world.cpp b/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/recipe/parent/hello-world.cpp new file mode 100644 index 0000000000000000000000000000000000000000..abdfa651565e60579d61d05bc45afd98be1d3457 --- /dev/null +++ b/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/recipe/parent/hello-world.cpp @@ -0,0 +1,7 @@ +#include + +int main(int argc, char * argv[]) +{ + std::cout << "Hello World!\n" << std::endl; + return 0; +} diff --git a/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/recipe/parent/install-conda-specs.sh b/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/recipe/parent/install-conda-specs.sh new file mode 100644 index 0000000000000000000000000000000000000000..01a4d1c950f9d00380efc5a2df4efb96753b87d3 --- /dev/null +++ b/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/recipe/parent/install-conda-specs.sh @@ -0,0 +1,39 @@ +#!/bin/bash + +source ${RECIPE_DIR}/setup_compiler.sh + +set -ex +export CHOST="${triplet}" +specdir=$PREFIX/lib/gcc/$CHOST/${gcc_version} +if [[ "$cross_target_platform" == "$target_platform" ]]; then + install -Dm644 -T ${SRC_DIR}/build/gcc/specs $specdir/conda.specs + + # Add specs when we're not cross compiling so that the toolchain works more like a system + # toolchain (i.e. conda installed libs can be #include <>'d and linked without adding any + # cmdline args or FLAGS and likewise the assumptions we have about rpath are built in) + # + # THIS IS INTENDED as a safety net for casual users who just want the native toolchain to work. + # It is not to be relied on by conda-forge package recipes and best practice is still to set the + # appropriate FLAGS vars (either via compiler activation scripts or explicitly in the recipe) + # + # We use double quotes here because we want $PREFIX and $CHOST to be expanded at build time + # and recorded in the specs file. It will undergo a prefix replacement when our compiler + # package is installed. + sed -i -e "/\*link_command:/,+1 s+%.*+& %{\!static:-rpath ${PREFIX}/lib -rpath-link ${PREFIX}/lib} -L ${PREFIX}/lib/stubs -L ${PREFIX}/lib+" $specdir/conda.specs + if [[ "$cross_target_platform" != "win-"* ]]; then + # put -disable-new-dtags at the front of the cmdline so that user provided -enable-new-dtags (in %l) can override it + sed -i -e "/\*link_command:/,+1 s+%(linker)+& -disable-new-dtags +" $specdir/conda.specs + fi + # use -idirafter to put the conda "system" includes where /usr/local/include would typically go + # in a system-packaged non-cross compiler + sed -i -e "/\*cpp_options:/,+1 s+%.*+& -idirafter ${PREFIX}/include+" $specdir/conda.specs + # cc1_options also get used for cc1plus... at least in 11.2.0 + sed -i -e "/\*cc1_options:/,+1 s+%.*+& -idirafter ${PREFIX}/include+" $specdir/conda.specs + +else + # does it even make sense to do anything here? Could do something with %:getenv(BUILD_PREFIX /include) + # but in the case that we aren't inside conda-build, it will cause gcc to fatal + # because it won't be set. Just explicitly making this fail for now so that the meta.yaml + # is consitent with when it creates the conda-gcc-specs package + false +fi diff --git a/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/recipe/parent/install-g++.sh b/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/recipe/parent/install-g++.sh new file mode 100644 index 0000000000000000000000000000000000000000..f1cf84ba32fb914e5ef29ee9b11a6195049534f5 --- /dev/null +++ b/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/recipe/parent/install-g++.sh @@ -0,0 +1,59 @@ +#!/bin/bash + +source ${RECIPE_DIR}/setup_compiler.sh +set -e -x + +export CHOST="${triplet}" +_libdir=libexec/gcc/${CHOST}/${PKG_VERSION} + +# libtool wants to use ranlib that is here, macOS install doesn't grok -t etc +# .. do we need this scoped over the whole file though? +#export PATH=${SRC_DIR}/gcc_built/bin:${SRC_DIR}/.build/${CHOST}/buildtools/bin:${SRC_DIR}/.build/tools/bin:${PATH} + +pushd ${SRC_DIR}/build + +make -C gcc prefix=${PREFIX} c++.install-common + +# How it used to be: +# install -m755 -t ${PREFIX}/bin/ gcc/{cc1plus,lto1} +for file in cc1plus; do + if [[ -f gcc/${file}${EXEEXT} ]]; then + install -c gcc/${file}${EXEEXT} ${PREFIX}/${_libdir}/${file}${EXEEXT} + fi +done + +# Following 3 are in libstdcxx-devel +#make -C $CHOST/libstdc++-v3/src prefix=${PREFIX} install +#make -C $CHOST/libstdc++-v3/include prefix=${PREFIX} install +#make -C $CHOST/libstdc++-v3/libsupc++ prefix=${PREFIX} install +make -C $CHOST/libstdc++-v3/python prefix=${PREFIX} install + +# Probably don't want to do this for cross-compilers +# mkdir -p ${PREFIX}/share/gdb/auto-load/usr/lib/ +# cp ${SRC_DIR}/gcc_built/${CHOST}/sysroot/lib/libstdc++.so.6.*-gdb.py ${PREFIX}/share/gdb/auto-load/usr/lib/ + +make -C libcpp prefix=${PREFIX} install + +popd + +mkdir -p ${PREFIX}/lib/gcc/${CHOST}/${PKG_VERSION} + +set +x +# Strip executables, we may want to install to a different prefix +# and strip in there so that we do not change files that are not +# part of this package. +pushd ${PREFIX} + _files=$(find bin libexec -type f -not -name '*.dll') + for _file in ${_files}; do + _type="$( file "${_file}" | cut -d ' ' -f 2- )" + case "${_type}" in + *script*executable*) + ;; + *executable*) + ${BUILD_PREFIX}/bin/${CHOST}-strip --strip-all -v "${_file}" || : + ;; + esac + done +popd + +source ${RECIPE_DIR}/make_tool_links.sh diff --git a/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/recipe/parent/install-gcc.sh b/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/recipe/parent/install-gcc.sh new file mode 100644 index 0000000000000000000000000000000000000000..da5e0e54e5b5cfd10c4e0b3b0e70bf30a61baf23 --- /dev/null +++ b/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/recipe/parent/install-gcc.sh @@ -0,0 +1,262 @@ +#!/bin/bash + +source ${RECIPE_DIR}/setup_compiler.sh +set -e -x + +_libdir=libexec/gcc/${TARGET}/${PKG_VERSION} + +# libtool wants to use ranlib that is here, macOS install doesn't grok -t etc +# .. do we need this scoped over the whole file though? +#export PATH=${SRC_DIR}/gcc_built/bin:${SRC_DIR}/.build/${TARGET}/buildtools/bin:${SRC_DIR}/.build/tools/bin:${PATH} + +pushd ${SRC_DIR}/build + # We may not have built with plugin support so failure here is not fatal: + make prefix=${PREFIX} install-lto-plugin || true + + sed -i.bak 's/install-collect2: collect2 /install-collect2: collect2$(exeext) /g' gcc/Makefile + make -C gcc prefix=${PREFIX} install-driver install-cpp install-gcc-ar install-headers install-plugin install-lto-wrapper install-collect2 + # not sure if this is the same as the line above. Run both, just in case + make -C lto-plugin prefix=${PREFIX} install + install -dm755 ${PREFIX}/lib/bfd-plugins/ + + # statically linked, so this so does not exist + # ln -s $PREFIX/lib/gcc/$TARGET/liblto_plugin.so ${PREFIX}/lib/bfd-plugins/ + + make -C libcpp prefix=${PREFIX} install + + # Include languages we do not have any other place for here (and also lto1) + for file in gnat1 brig1 cc1 go1 lto1 cc1obj cc1objplus; do + if [[ -f gcc/${file}${EXEEXT} ]]; then + install -c gcc/${file}${EXEEXT} ${PREFIX}/${_libdir}/${file}${EXEEXT} + fi + done + + # https://github.com/gcc-mirror/gcc/blob/gcc-7_3_0-release/gcc/Makefile.in#L3481-L3526 + # Could have used install-common, but it also installs cxx binaries, which we + # don't want in this package. We could patch it, or use the loop below: + for file in gcov{,-tool,-dump}; do + if [[ -f gcc/${file}${EXEEXT} ]]; then + install -c gcc/${file}${EXEEXT} ${PREFIX}/bin/${TARGET}-${file}${EXEEXT} + fi + done + + make prefix=${PREFIX}/lib/gcc/${TARGET}/${gcc_version} install-libcc1 + install -d ${PREFIX}/share/gdb/auto-load/usr/lib + + make prefix=${PREFIX} install-fixincludes + make -C gcc prefix=${PREFIX} install-mkheaders + + if [[ -d ${TARGET}/libatomic ]]; then + make -C ${TARGET}/libatomic prefix=${PREFIX} install + fi + + if [[ -d ${TARGET}/libgomp ]]; then + make -C ${TARGET}/libgomp prefix=${PREFIX} install + fi + + if [[ -d ${TARGET}/libitm ]]; then + make -C ${TARGET}/libitm prefix=${PREFIX} install + fi + + if [[ -d ${TARGET}/libquadmath ]]; then + make -C ${TARGET}/libquadmath prefix=${PREFIX} install + fi + + if [[ -d ${TARGET}/libsanitizer ]]; then + make -C ${TARGET}/libsanitizer prefix=${PREFIX} install + fi + + if [[ -d ${TARGET}/libsanitizer/asan ]]; then + make -C ${TARGET}/libsanitizer/asan prefix=${PREFIX} install + fi + + if [[ -d ${TARGET}/libsanitizer/tsan ]]; then + make -C ${TARGET}/libsanitizer/tsan prefix=${PREFIX} install + fi + + make -C libiberty prefix=${PREFIX} install + # install PIC version of libiberty + if [[ "${TARGET}" != *mingw* ]]; then + install -m644 libiberty/pic/libiberty.a ${PREFIX}/lib/gcc/${TARGET}/${gcc_version} + else + install -m644 libiberty/libiberty.a ${PREFIX}/lib/gcc/${TARGET}/${gcc_version} + fi + + make -C gcc prefix=${PREFIX} install-man install-info + + make -C gcc prefix=${PREFIX} install-po + + # many packages expect this symlink + [[ -f ${PREFIX}/bin/${TARGET}-cc${EXEEXT} ]] && rm ${PREFIX}/bin/${TARGET}-cc${EXEEXT} + pushd ${PREFIX}/bin + if [[ "${HOST}" != *mingw* ]]; then + ln -s ${TARGET}-gcc${EXEEXT} ${TARGET}-cc${EXEEXT} + else + cp ${TARGET}-gcc${EXEEXT} ${TARGET}-cc${EXEEXT} + fi + popd + + # POSIX conformance launcher scripts for c89 and c99 + cat > ${PREFIX}/bin/${TARGET}-c89${EXEEXT} <<"EOF" +#!/bin/sh +fl="-std=c89" +for opt; do + case "$opt" in + -ansi|-std=c89|-std=iso9899:1990) fl="";; + -std=*) echo "`basename $0` called with non ANSI/ISO C option $opt" >&2 + exit 1;; + esac +done +exec ${TARGET}-c89${EXEEXT} $fl ${1+"$@"} +EOF + + cat > ${PREFIX}/bin/${TARGET}-c99${EXEEXT} <<"EOF" +#!/bin/sh +fl="-std=c99" +for opt; do + case "$opt" in + -std=c99|-std=iso9899:1999) fl="";; + -std=*) echo "`basename $0` called with non ISO C99 option $opt" >&2 + exit 1;; + esac +done +exec ${TARGET}-c99${EXEEXT} $fl ${1+"$@"} +EOF + + chmod 755 ${PREFIX}/bin/${TARGET}-c{8,9}9${EXEEXT} + + rm ${PREFIX}/bin/${TARGET}-gcc-${PKG_VERSION}${EXEEXT} + +popd + +# generate specfile so that we can patch loader link path +# link_libgcc should have the gcc's own libraries by default (-R) +# so that LD_LIBRARY_PATH isn't required for basic libraries. +# +# GF method here to create specs file and edit it. The other methods +# tried had no effect on the result. including: +# setting LINK_LIBGCC_SPECS on configure +# setting LINK_LIBGCC_SPECS on make +# setting LINK_LIBGCC_SPECS in gcc/Makefile +specdir=$PREFIX/lib/gcc/$TARGET/${gcc_version} +if [[ "$build_platform" == "$target_platform" ]]; then + $PREFIX/bin/${TARGET}-gcc${EXEEXT} -dumpspecs > $specdir/specs + # validate assumption that specs in build/gcc/specs are exactly the + # same as dumped specs so that I don't need to depend on gcc_impl in conda-gcc-specs subpackage + diff -s ${SRC_DIR}/build/gcc/specs $specdir/specs +elif [[ "$target_platform" == "$cross_target_platform" && ${TARGET} != *mingw* ]]; then + # For support of of native specs, we need this + # This is the only place where we need QEMU. + # Remove this elif condition for local experimentation if you + # do not have QEMU setup + $PREFIX/bin/${TARGET}-gcc -dumpspecs > $specdir/specs +else + $BUILD_PREFIX/bin/${TARGET}-gcc -dumpspecs > $specdir/specs + # validate assumption that specs in build/gcc/specs are exactly the + # same as dumped specs so that I don't need to depend on gcc_impl in conda-gcc-specs subpackage + diff -s ${SRC_DIR}/build/gcc/specs $specdir/specs +fi + +# make a copy of the specs without our additions so that people can choose not to use them +# by passing -specs=builtin.specs +cp $specdir/specs $specdir/builtin.specs + +# modify the default specs to only have %include_noerr that includes an optional conda.specs +# package installable via the conda-gcc-specs package where conda.specs (for $cross_target_platform +# == $target_platform) will add the minimal set of flags for the 'native' toolchains to be useable +# without anything additional set in the enviornment or extra cmdline args. +echo "%include_noerr " >> $specdir/specs + +# We use double quotes here because we want $PREFIX and $TARGET to be expanded at build time +# and recorded in the specs file. It will undergo a prefix replacement when our compiler +# package is installed. +sed -i -e "/\*link_command:/,+1 s+%.*+& %{!static:-rpath ${PREFIX}/lib}+" $specdir/specs + + +# Install Runtime Library Exception +install -Dm644 $SRC_DIR/COPYING.RUNTIME \ + ${PREFIX}/share/licenses/gcc/RUNTIME.LIBRARY.EXCEPTION + +set +x +# Strip executables, we may want to install to a different prefix +# and strip in there so that we do not change files that are not +# part of this package. +pushd ${PREFIX} + _files=$(find bin libexec -type f -not -name '*.dll') + for _file in ${_files}; do + _type="$( file "${_file}" | cut -d ' ' -f 2- )" + case "${_type}" in + *script*executable*) + ;; + *executable*) + ${BUILD_PREFIX}/bin/${TARGET}-strip --strip-all -v "${_file}" || : + ;; + esac + done +popd + +set -x + +#${PREFIX}/bin/${TARGET}-gcc "${RECIPE_DIR}"/c11threads.c -std=c11 + +mkdir -p ${PREFIX}/${TARGET}/lib +mkdir -p ${PREFIX}/lib/gcc/${TARGET}/${gcc_version} + +if [[ "$target_platform" == "$cross_target_platform" ]]; then + # making these this way so conda build doesn't muck with them + pushd ${PREFIX}/${TARGET}/lib + if [[ "${TARGET}" != *mingw* ]]; then + ln -sf ../../lib/libgomp.so libgomp.so + for lib in libgfortran libatomic libquadmath libitm lib{a,hwa,l,ub,t}san; do + for f in ${PREFIX}/lib/${lib}.so*; do + ln -s ../../lib/$(basename $f) ${PREFIX}/${TARGET}/lib/$(basename $f) + done + done + fi + + for f in ${PREFIX}/lib/*.spec; do + mv $f ${PREFIX}/${TARGET}/lib/$(basename $f) + done + if [[ "${TARGET}" != *mingw* ]]; then + for f in ${PREFIX}/lib/*.o; do + mv $f ${PREFIX}/${TARGET}/lib/$(basename $f) + done + fi + popd + for lib in asan atomic gomp hwasan itm lsan quadmath tsan ubsan; do + if [[ -f "${PREFIX}/lib/lib${lib}.a" ]]; then + mv ${PREFIX}/lib/lib${lib}.*a ${PREFIX}/lib/gcc/${TARGET}/${gcc_version}/ + fi + done + for lib in libasan.so libatomic.so libgomp.so libhwasan.so libitm.so liblsan.so libquadmath.so libtsan.so libubsan.so libstdc++.so libstdc++.so.6 libgcc_s.so; do + if [[ -f "${PREFIX}/lib/${lib}" ]]; then + # install a shared library here since the directory ${PREFIX}/lib/gcc/${TARGET}/${gcc_version} + # has the highest preference and we want shared libraries to have the highest preference + rm ${PREFIX}/lib/${lib} + ln -sf ${PREFIX}/lib/${lib} ${PREFIX}/lib/gcc/${TARGET}/${gcc_version}/ + fi + done +else + source ${RECIPE_DIR}/install-libgcc.sh + for lib in libcc1; do + mv ${PREFIX}/lib/${lib}.so* ${PREFIX}/${TARGET}/lib/ || true + mv ${PREFIX}/lib/${lib}.so* ${PREFIX}/${TARGET}/lib/ || true + done + rm -f ${PREFIX}/share/info/*.info + for lib in asan atomic gomp hwasan itm lsan quadmath tsan ubsan; do + if [[ -f "${PREFIX}/${TARGET}/lib/lib${lib}.a" ]]; then + mv ${PREFIX}/${TARGET}/lib/lib${lib}.*a ${PREFIX}/lib/gcc/${TARGET}/${gcc_version}/ + fi + if [[ -f "${PREFIX}/${TARGET}/lib/lib${lib}.so" ]]; then + ln -sf ${PREFIX}/${TARGET}/lib/lib${lib}.so ${PREFIX}/lib/gcc/${TARGET}/${gcc_version}/ + fi + done +fi + +if [[ -f ${PREFIX}/lib/libgomp.spec ]]; then + mv ${PREFIX}/lib/libgomp.spec ${PREFIX}/${TARGET}/lib/libgomp.spec +fi + +rm -f ${PREFIX}/share/info/dir + +source ${RECIPE_DIR}/make_tool_links.sh diff --git a/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/recipe/parent/install-gdb-pretty-printer.sh b/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/recipe/parent/install-gdb-pretty-printer.sh new file mode 100644 index 0000000000000000000000000000000000000000..c73dfd015673e079a1d2df9e656fb2e20d7bca1a --- /dev/null +++ b/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/recipe/parent/install-gdb-pretty-printer.sh @@ -0,0 +1,10 @@ +set -e -x + +# install gcc's gdbhooks ... +mkdir -p "$SP_DIR"/gcc +cp $SRC_DIR/gcc/gcc/gdbhooks.py "$SP_DIR"/gcc/. + +# install libstdc++'s pretty printer support +cp -r $SRC_DIR/gcc/libstdc++-v3/python/libstdcxx "$SP_DIR"/. + +exit 0 diff --git a/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/recipe/parent/install-gfortran.sh b/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/recipe/parent/install-gfortran.sh new file mode 100644 index 0000000000000000000000000000000000000000..46d877def15e561206381f98e1db227944f02256 --- /dev/null +++ b/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/recipe/parent/install-gfortran.sh @@ -0,0 +1,81 @@ +#!/bin/bash + +source ${RECIPE_DIR}/setup_compiler.sh +set -e -x + +export CHOST="${triplet}" +_libdir=libexec/gcc/${CHOST}/${PKG_VERSION} + +# libtool wants to use ranlib that is here, macOS install doesn't grok -t etc +# .. do we need this scoped over the whole file though? +#export PATH=${SRC_DIR}/gcc_built/bin:${SRC_DIR}/.build/${CHOST}/buildtools/bin:${SRC_DIR}/.build/tools/bin:${PATH} + +pushd ${SRC_DIR}/build + +# adapted from Arch install script from https://github.com/archlinuxarm/PKGBUILDs/blob/master/core/gcc/PKGBUILD +# We cannot make install since .la files are not relocatable so libtool deliberately prevents it: +# libtool: install: error: cannot install `libgfortran.la' to a directory not ending in ${SRC_DIR}/work/gcc_built/${CHOST}/lib/../lib +make -C ${CHOST}/libgfortran prefix=${PREFIX} all-multi libgfortran.spec ieee_arithmetic.mod ieee_exceptions.mod ieee_features.mod config.h +make -C gcc prefix=${PREFIX} fortran.install-{common,man,info} + +# How it used to be: +# install -Dm755 gcc/f951 ${PREFIX}/${_libdir}/f951 +for file in f951; do + if [[ -f gcc/${file}${EXEEXT} ]]; then + install -c gcc/${file}${EXEEXT} ${PREFIX}/${_libdir}/${file}${EXEEXT} + fi +done + +mkdir -p ${PREFIX}/${CHOST}/lib +cp ${CHOST}/libgfortran/libgfortran.spec ${PREFIX}/${CHOST}/lib + +pushd ${PREFIX}/bin + if [[ "${target_platform}" != "win-64" ]]; then + ln -sf ${CHOST}-gfortran${EXEEXT} ${CHOST}-f95${EXEEXT} + else + cp ${CHOST}-gfortran${EXEEXT} ${CHOST}-f95${EXEEXT} + fi +popd + +make install DESTDIR=$SRC_DIR/build-finclude +mkdir -p $PREFIX/lib/gcc/${CHOST}/${gcc_version}/finclude +mkdir -p $PREFIX/lib/gcc/${CHOST}/${gcc_version}/include +install -Dm644 $SRC_DIR/build-finclude/$PREFIX/lib/gcc/${CHOST}/${gcc_version}/finclude/* $PREFIX/lib/gcc/${CHOST}/${gcc_version}/finclude/ +install -Dm644 $SRC_DIR/build-finclude/$PREFIX/lib/gcc/${CHOST}/${gcc_version}/include/*.h $PREFIX/lib/gcc/${CHOST}/${gcc_version}/include/ + +# Install Runtime Library Exception +install -Dm644 $SRC_DIR/COPYING.RUNTIME \ + ${PREFIX}/share/licenses/gcc-fortran/RUNTIME.LIBRARY.EXCEPTION + +if [[ "${target_platform}" != "${cross_target_platform}" ]]; then + if [[ ${triplet} == *linux* ]]; then + cp -f --no-dereference ${SRC_DIR}/build/${CHOST}/libgfortran/.libs/libgfortran*.so* ${PREFIX}/${CHOST}/lib/ + fi +fi +cp -f --no-dereference ${SRC_DIR}/build/${CHOST}/libgfortran/.libs/libgfortran.*a ${PREFIX}/${CHOST}/lib/ + +set +x +# Strip executables, we may want to install to a different prefix +# and strip in there so that we do not change files that are not +# part of this package. +pushd ${PREFIX} + _files=$(find bin libexec -type f -not -name '*.dll') + for _file in ${_files}; do + _type="$( file "${_file}" | cut -d ' ' -f 2- )" + case "${_type}" in + *script*executable*) + ;; + *executable*) + ${BUILD_PREFIX}/bin/${CHOST}-strip --strip-all -v "${_file}" || : + ;; + esac + done +popd + +if [[ -f ${PREFIX}/lib/libgomp.spec ]]; then + mv ${PREFIX}/lib/libgomp.spec ${PREFIX}/${CHOST}/lib/libgomp.spec +fi + +rm -f ${PREFIX}/share/info/dir + +source ${RECIPE_DIR}/make_tool_links.sh diff --git a/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/recipe/parent/install-libgcc-devel.sh b/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/recipe/parent/install-libgcc-devel.sh new file mode 100644 index 0000000000000000000000000000000000000000..6ba08fc16608017c3a0545c4d8984f9aa7586a25 --- /dev/null +++ b/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/recipe/parent/install-libgcc-devel.sh @@ -0,0 +1,31 @@ +#!/bin/bash + +source ${RECIPE_DIR}/setup_compiler.sh +set -e -x + +export CHOST="${triplet}" + +# libtool wants to use ranlib that is here, macOS install doesn't grok -t etc +# .. do we need this scoped over the whole file though? +#export PATH=${SRC_DIR}/gcc_built/bin:${SRC_DIR}/.build/${CHOST}/buildtools/bin:${SRC_DIR}/.build/tools/bin:${PATH} + +pushd ${SRC_DIR}/build + +make -C ${CHOST}/libgcc prefix=${PREFIX} install + +# ${PREFIX}/lib/libgcc_s.so* goes into libgcc output, but +# avoid that the equivalents in ${PREFIX}/${CHOST}/lib end up +# in gcc_impl_{{ cross_target_platform }}, c.f. install-gcc.sh +mkdir -p ${PREFIX}/${CHOST}/lib +if [[ "${triplet}" == *linux* ]]; then + mv ${PREFIX}/lib/libgcc_s.so* ${PREFIX}/${CHOST}/lib +else + # import library, not static library + mv ${PREFIX}/lib/libgcc_s.a ${PREFIX}/${CHOST}/lib + rm ${PREFIX}/lib/libgcc_s*.dll || true +fi +# This is in gcc_impl as it is gcc specific and clang has the same header +rm -rf ${PREFIX}/lib/gcc/${CHOST}/${gcc_version}/include/unwind.h + +popd + diff --git a/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/recipe/parent/install-libgcc-no-gomp.sh b/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/recipe/parent/install-libgcc-no-gomp.sh new file mode 100644 index 0000000000000000000000000000000000000000..e792608072235cedbc2836ec05a7bc9326d53862 --- /dev/null +++ b/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/recipe/parent/install-libgcc-no-gomp.sh @@ -0,0 +1,31 @@ +#!/bin/bash + +source ${RECIPE_DIR}/setup_compiler.sh +set -e -x + +export CHOST="${triplet}" + +# we have to remove existing links/files so that the libgcc install works +rm -rf ${PREFIX}/lib/* +rm -rf ${PREFIX}/share/* +rm -f ${PREFIX}/${CHOST}/lib/libgomp* + +# now run install of libgcc +# this reinstalls the wrong symlinks for openmp +source ${RECIPE_DIR}/install-libgcc.sh + +# remove and relink things for openmp +rm -f ${PREFIX}/lib/libgomp.so +rm -f ${PREFIX}/${CHOST}/lib/libgomp.so +rm -f ${PREFIX}/lib/libgomp.so.${libgomp_ver:0:1} +rm -f ${PREFIX}/${CHOST}/lib/libgomp.so.${libgomp_ver:0:1} +rm -f ${PREFIX}/${CHOST}/lib/libgomp.so.${libgomp_ver} + +# (re)make the right links +# note that this code is remaking more links than the ones we want in this +# package but that is ok +pushd ${PREFIX}/lib + if [[ "${TARGET}" != *mingw* ]]; then + ln -s libgomp.so.${libgomp_ver} libgomp.so.${libgomp_ver:0:1} + fi +popd diff --git a/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/recipe/parent/install-libgcc.sh b/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/recipe/parent/install-libgcc.sh new file mode 100644 index 0000000000000000000000000000000000000000..34a2effaa2d99c20bf30004b03a5fed5ba1fdbdb --- /dev/null +++ b/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/recipe/parent/install-libgcc.sh @@ -0,0 +1,82 @@ +#!/bin/bash + +source ${RECIPE_DIR}/setup_compiler.sh +set -e -x + +# libtool wants to use ranlib that is here, macOS install doesn't grok -t etc +# .. do we need this scoped over the whole file though? +#export PATH=${SRC_DIR}/gcc_built/bin:${SRC_DIR}/.build/${TARGET}/buildtools/bin:${SRC_DIR}/.build/tools/bin:${PATH} + +pushd ${SRC_DIR}/build + + if [[ "${PKG_NAME}" == "libgcc" ]]; then + make -C ${TARGET}/libgcc prefix=${PREFIX} install-shared + if [[ "${TARGET}" == *mingw* ]]; then + mv $PREFIX/lib/libgcc_s*.dll $PREFIX/bin + fi + elif [[ "${PKG_NAME}" != "gcc_impl"* ]]; then + # when building a cross compiler, above make line will clobber $PREFIX/lib/libgcc_s.so.1 + # and fail after some point for some architectures. To avoid that, we copy manually + pushd ${TARGET}/libgcc + mkdir -p ${PREFIX}/lib/gcc/${TARGET}/${gcc_version} + install -c -m 644 libgcc_eh.a ${PREFIX}/lib/gcc/${TARGET}/${gcc_version}/libgcc_eh.a + chmod 644 ${PREFIX}/lib/gcc/${TARGET}/${gcc_version}/libgcc_eh.a + ${TARGET}-ranlib ${PREFIX}/lib/gcc/${TARGET}/${gcc_version}/libgcc_eh.a + + mkdir -p ${PREFIX}/${TARGET}/lib + if [[ "${triplet}" == *linux* ]]; then + install -c -m 644 ./libgcc_s.so.1 ${PREFIX}/${TARGET}/lib/libgcc_s.so.1 + cp $RECIPE_DIR/libgcc_s.so.ldscript ${PREFIX}/${TARGET}/lib/libgcc_s.so + else + # import library, not static library + install -c -m 644 ./shlib/libgcc_s.a ${PREFIX}/${TARGET}/lib/libgcc_s.a + fi + popd + fi + + # TODO :: Also do this for libgfortran (and libstdc++ too probably?) + if [[ -f ${TARGET}/libsanitizer/libtool ]]; then + sed -i.bak 's/.*cannot install.*/func_warning "Ignoring libtool error about cannot install to a directory not ending in"/' \ + ${TARGET}/libsanitizer/libtool + fi + for lib in libatomic libgomp libquadmath libitm libvtv libsanitizer/{a,hwa,l,ub,t}san; do + # TODO :: Also do this for libgfortran (and libstdc++ too probably?) + if [[ -f ${TARGET}/${lib}/libtool ]]; then + sed -i.bak 's/.*cannot install.*/func_warning "Ignoring libtool error about cannot install to a directory not ending in"/' \ + ${TARGET}/${lib}/libtool + fi + if [[ -d ${TARGET}/${lib} ]]; then + make -C ${TARGET}/${lib} prefix=${PREFIX} install-toolexeclibLTLIBRARIES + make -C ${TARGET}/${lib} prefix=${PREFIX} install-nodist_fincludeHEADERS || true + fi + done + + for lib in libgomp libquadmath; do + if [[ -d ${TARGET}/${lib} ]]; then + make -C ${TARGET}/${lib} prefix=${PREFIX} install-info + fi + done + +popd + +mkdir -p ${PREFIX}/lib + +if [[ "${PKG_NAME}" != "gcc_impl"* ]]; then + # no static libs + find ${PREFIX}/lib -name "*\.a" -exec rm -rf {} \; +fi +# no libtool files +find ${PREFIX}/lib -name "*\.la" -exec rm -rf {} \; + +if [[ "${PKG_NAME}" != gcc_impl* ]]; then + # mv ${PREFIX}/${TARGET}/lib/* ${PREFIX}/lib + # clean up empty folder + rm -rf ${PREFIX}/lib/gcc + rm -rf ${PREFIX}/lib/lib{a,hwa,l,ub,t}san.so* + + # Install Runtime Library Exception + install -Dm644 ${SRC_DIR}/COPYING.RUNTIME \ + ${PREFIX}/share/licenses/gcc-libs/RUNTIME.LIBRARY.EXCEPTION +fi + +rm -f ${PREFIX}/share/info/dir diff --git a/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/recipe/parent/install-libgfortran.sh b/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/recipe/parent/install-libgfortran.sh new file mode 100644 index 0000000000000000000000000000000000000000..031da5eca76ae9762aa193eb3310b7923fd844c6 --- /dev/null +++ b/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/recipe/parent/install-libgfortran.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +source ${RECIPE_DIR}/setup_compiler.sh +set -e -x + +rm -f ${PREFIX}/lib/libgfortran* || true + +if [[ "${TARGET}" == *mingw* ]]; then + mkdir -p ${PREFIX}/bin/ + cp ${SRC_DIR}/build/${TARGET}/libgfortran/.libs/libgfortran*.dll ${PREFIX}/bin/ +else + mkdir -p ${PREFIX}/lib + cp -f --no-dereference ${SRC_DIR}/build/${TARGET}/libgfortran/.libs/libgfortran*.so* ${PREFIX}/lib/ +fi + +# Install Runtime Library Exception +install -Dm644 $SRC_DIR/COPYING.RUNTIME \ + ${PREFIX}/share/licenses/libgfortran/RUNTIME.LIBRARY.EXCEPTION diff --git a/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/recipe/parent/install-libgomp.sh b/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/recipe/parent/install-libgomp.sh new file mode 100644 index 0000000000000000000000000000000000000000..cdd189f59dd81af7df42846c40b9300bf64dcd1e --- /dev/null +++ b/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/recipe/parent/install-libgomp.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +source ${RECIPE_DIR}/setup_compiler.sh + +cd build + +make -C ${triplet}/libgomp prefix=${PREFIX} install-toolexeclibLTLIBRARIES +rm ${PREFIX}/lib/libgomp.a ${PREFIX}/lib/libgomp.la + +if [[ "$target_platform" == "linux-"* ]]; then + rm ${PREFIX}/lib/libgomp.so.1 + rm ${PREFIX}/lib/libgomp.so + ln -sf ${PREFIX}/lib/libgomp.so.${libgomp_ver} ${PREFIX}/lib/libgomp.so +else + rm ${PREFIX}/lib/libgomp.dll.a +fi + +# Install Runtime Library Exception +install -Dm644 ${SRC_DIR}/COPYING.RUNTIME \ + ${PREFIX}/share/licenses/gcc-libs/RUNTIME.LIBRARY.EXCEPTION.gomp_copy diff --git a/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/recipe/parent/install-libsanitizer.sh b/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/recipe/parent/install-libsanitizer.sh new file mode 100644 index 0000000000000000000000000000000000000000..2ef36d3bb8c750e42929f231de9d22a6e0addd40 --- /dev/null +++ b/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/recipe/parent/install-libsanitizer.sh @@ -0,0 +1,32 @@ +#!/bin/bash + +source ${RECIPE_DIR}/setup_compiler.sh +set -e -x + +export CHOST="${triplet}" + +mkdir -p ${PREFIX}/lib + +pushd ${SRC_DIR}/build + + # TODO :: Also do this for libgfortran (and libstdc++ too probably?) + sed -i.bak 's/.*cannot install.*/func_warning "Ignoring libtool error about cannot install to a directory not ending in"/' \ + ${CHOST}/libsanitizer/libtool + for lib in libsanitizer/{a,hwa,l,ub,t}san; do + # TODO :: Also do this for libgfortran (and libstdc++ too probably?) + if [[ -f ${CHOST}/${lib}/libtool ]]; then + sed -i.bak 's/.*cannot install.*/func_warning "Ignoring libtool error about cannot install to a directory not ending in"/' \ + ${CHOST}/${lib}/libtool + fi + if [[ -d ${CHOST}/${lib} ]]; then + make -C ${CHOST}/${lib} prefix=${PREFIX} install-toolexeclibLTLIBRARIES + make -C ${CHOST}/${lib} prefix=${PREFIX} install-nodist_fincludeHEADERS || true + fi + done + +popd + +# no static libs +find ${PREFIX}/lib -name "*\.a" -exec rm -rf {} \; +# no libtool files +find ${PREFIX}/lib -name "*\.la" -exec rm -rf {} \; diff --git a/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/recipe/parent/install-libstdc++-devel.sh b/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/recipe/parent/install-libstdc++-devel.sh new file mode 100644 index 0000000000000000000000000000000000000000..63b0439991dbb35a966fa02069d04899b13420f2 --- /dev/null +++ b/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/recipe/parent/install-libstdc++-devel.sh @@ -0,0 +1,33 @@ +#!/bin/bash + +source ${RECIPE_DIR}/setup_compiler.sh +set -e -x + +export CHOST="${triplet}" + +# libtool wants to use ranlib that is here, macOS install doesn't grok -t etc +# .. do we need this scoped over the whole file though? +# export PATH=${SRC_DIR}/gcc_built/bin:${SRC_DIR}/.build/${CHOST}/buildtools/bin:${SRC_DIR}/.build/tools/bin:${PATH} + +pushd ${SRC_DIR}/build + +make -C $CHOST/libstdc++-v3/src prefix=${PREFIX} install +make -C $CHOST/libstdc++-v3/include prefix=${PREFIX} install +make -C $CHOST/libstdc++-v3/libsupc++ prefix=${PREFIX} install + +mkdir -p ${PREFIX}/lib/gcc/${CHOST}/${gcc_version} +mkdir -p ${PREFIX}/${CHOST}/lib + +if [[ "$target_platform" == "$cross_target_platform" ]]; then + mv $PREFIX/lib/lib*.a ${PREFIX}/lib/gcc/${CHOST}/${gcc_version}/ + if [[ "$target_platform" == linux-* ]]; then + mv ${PREFIX}/lib/libstdc++.so* ${PREFIX}/${CHOST}/lib + else + rm ${PREFIX}/bin/libstdc++*.dll + fi +else + mv $PREFIX/${CHOST}/lib/lib*.a ${PREFIX}/lib/gcc/${CHOST}/${gcc_version}/ +fi + +popd + diff --git a/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/recipe/parent/install-libstdc++.sh b/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/recipe/parent/install-libstdc++.sh new file mode 100644 index 0000000000000000000000000000000000000000..3d878849ae7b3d9282a04a885cd29df782b7d038 --- /dev/null +++ b/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/recipe/parent/install-libstdc++.sh @@ -0,0 +1,29 @@ +#!/bin/bash + +source ${RECIPE_DIR}/setup_compiler.sh +set -e -x + +export CHOST="${triplet}" + +# libtool wants to use ranlib that is here, macOS install doesn't grok -t etc +# .. do we need this scoped over the whole file though? +#export PATH=${SRC_DIR}/gcc_built/bin:${SRC_DIR}/.build/${CHOST}/buildtools/bin:${SRC_DIR}/.build/tools/bin:${PATH} + +pushd ${SRC_DIR}/build + + make -C ${CHOST}/libstdc++-v3/src prefix=${PREFIX} install-toolexeclibLTLIBRARIES + make -C ${CHOST}/libstdc++-v3/po prefix=${PREFIX} install + +popd + +mkdir -p ${PREFIX}/lib +#mv ${PREFIX}/${CHOST}/lib/* ${PREFIX}/lib + +# no static libs +find ${PREFIX}/lib -name "*\.a" -exec rm -rf {} \; +# no libtool files +find ${PREFIX}/lib -name "*\.la" -exec rm -rf {} \; + +# Install Runtime Library Exception +install -Dm644 ${SRC_DIR}/COPYING.RUNTIME \ + ${PREFIX}/share/licenses/libstdc++/RUNTIME.LIBRARY.EXCEPTION diff --git a/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/recipe/parent/install-openmp_impl.sh b/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/recipe/parent/install-openmp_impl.sh new file mode 100644 index 0000000000000000000000000000000000000000..c4ebad09aa18a43830fe2e9be9be97c9e965c354 --- /dev/null +++ b/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/recipe/parent/install-openmp_impl.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +source ${RECIPE_DIR}/setup_compiler.sh +set -e -x + +mkdir -p ${PREFIX}/lib + +pushd ${PREFIX}/lib/ + +if [[ "${TARGET}" != *mingw* ]]; then + ln -s libgomp.so.${libgomp_ver} libgomp.so.${libgomp_ver:0:1} +fi +popd diff --git a/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/recipe/parent/install-symlinks.sh b/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/recipe/parent/install-symlinks.sh new file mode 100644 index 0000000000000000000000000000000000000000..fd4887286b42cf9e1effd5a1931b9dc3224a3d9a --- /dev/null +++ b/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/recipe/parent/install-symlinks.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +source ${RECIPE_DIR}/setup_compiler.sh + +if [[ "$target_platform" == "win-"* ]]; then + symlink_or_copy="cp" +else + symlink_or_copy="ln -sf" +fi + +if [[ "${PKG_NAME}" == "gcc" ]]; then + for tool in cc cpp gcc gcc-ar gcc-nm gcc-ranlib gcov gcov-dump gcov-tool; do + $symlink_or_copy ${PREFIX}/bin/${triplet}-${tool}${EXEEXT} ${PREFIX}/bin/${tool}${EXEEXT} + done +elif [[ "${PKG_NAME}" == "gxx" ]]; then + $symlink_or_copy ${PREFIX}/bin/${triplet}-g++${EXEEXT} ${PREFIX}/bin/g++${EXEEXT} + $symlink_or_copy ${PREFIX}/bin/${triplet}-c++${EXEEXT} ${PREFIX}/bin/c++${EXEEXT} +elif [[ "${PKG_NAME}" == "gfortran" ]]; then + $symlink_or_copy ${PREFIX}/bin/${triplet}-gfortran${EXEEXT} ${PREFIX}/bin/gfortran${EXEEXT} +fi diff --git a/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/recipe/parent/libgcc_s.so.ldscript b/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/recipe/parent/libgcc_s.so.ldscript new file mode 100644 index 0000000000000000000000000000000000000000..c8e92242fc5b32888222e279088df08e791bd52c --- /dev/null +++ b/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/recipe/parent/libgcc_s.so.ldscript @@ -0,0 +1,4 @@ +/* GNU ld script + Use the shared library, but some functions are only in + the static library. */ +GROUP ( libgcc_s.so.1 -lgcc ) diff --git a/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/recipe/parent/make_tool_links.sh b/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/recipe/parent/make_tool_links.sh new file mode 100644 index 0000000000000000000000000000000000000000..26ad874c355cef4faa81da40d32fd985742f6262 --- /dev/null +++ b/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/recipe/parent/make_tool_links.sh @@ -0,0 +1,11 @@ +# When host=target, gcc installs un-prefixed tools together with prefixed-tools +# In the case of cpp, only un-prefixed cpp. Let's copy the un-prefixed tool +# to prefix-tool and delete the un-prefixed one to get back ct-ng behaviour +for tool in gcc g++ gfortran cpp gcc-ar gcc-nm gcc-ranlib c++; do + if [ -f ${PREFIX}/bin/${tool}${EXEEXT} ]; then + if [ ! -f ${PREFIX}/bin/${triplet}-${tool}${EXEEXT} ]; then + cp ${PREFIX}/bin/${tool}${EXEEXT} ${PREFIX}/bin/${triplet}-${tool}${EXEEXT} + fi + rm ${PREFIX}/bin/${tool}${EXEEXT} + fi +done diff --git a/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/recipe/parent/meta.yaml b/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/recipe/parent/meta.yaml new file mode 100644 index 0000000000000000000000000000000000000000..d03f46ee81c2daee15e45ed5cfec75271e09891e --- /dev/null +++ b/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/recipe/parent/meta.yaml @@ -0,0 +1,775 @@ +{% set version = gcc_version %} +{% set build_num = 7 %} + +{% if gcc_maj_ver is not defined %} +{% set gcc_maj_ver = 15 %} +{% endif %} + +# libgcc-devel is a noarch: generic package that is built for +# cross-compilers as well. Instead of skipping for cross-compilers, +# let's prioritize the native compilers package +{% if target_platform == cross_target_platform %} +{% set libgcc_devel_build_num = build_num + 100 %} +{% else %} +{% set libgcc_devel_build_num = build_num %} +{% endif %} + +{% if cross_target_platform is not defined %} +{% set cross_target_platform = "linux-64" %} +{% endif %} + +package: + name: gcc_compilers + version: {{ version }} + +source: + - url: + - https://ftp.gnu.org/gnu/gcc/gcc-{{ version }}/gcc-{{ version }}.tar.gz + - https://mirrors.ocf.berkeley.edu/gnu/gcc/gcc-{{ version }}/gcc-{{ version }}.tar.gz + sha256: 7294d65cc1a0558cb815af0ca8c7763d86f7a31199794ede3f630c0d1b0a5723 # [gcc_version == "15.2.0"] + sha256: ace8b8b0dbfe6abfc22f821cb093e195aa5498b7ccf7cd23e4424b9f14afed22 # [gcc_version == "14.3.0"] + sha256: bf0baf3e570c9c74c17c8201f0196c6924b4bd98c90e69d6b2ac0cd823f33bbc # [gcc_version == "13.4.0"] + patches: + - patches/0001-allow-commands-in-main-specfile.patch + - patches/0002-patch-zoneinfo_dir_override-to-point-to-our-tzdata.patch # [gcc_maj_ver != 13] + {% if cross_target_platform.startswith("linux-") %} + - patches/0003-add-ldl-to-libstdc___la_LDFLAGS.patch # [gcc_maj_ver != 13] + - patches/0004-Hardcode-HAVE_ALIGNED_ALLOC-1-in-libstdc-v3-configur.patch + {% else %} + # for GCC 15: https://github.com/msys2/MINGW-packages/tree/f59921184b35858d4ceb91679578de0d62475cbf/mingw-w64-gcc + # for GCC 14: https://github.com/msys2/MINGW-packages/tree/331bf945d21af562d228ed46bda21c8272d1e76e/mingw-w64-gcc + # for GCC 13: https://github.com/msys2/MINGW-packages/tree/4f1262b4e1072632eccf0958764f90d890b832ac/mingw-w64-gcc + - patches/mingw/{{ gcc_maj_ver }}/0002-Relocate-libintl.patch # [gcc_maj_ver == 13] + - patches/mingw/{{ gcc_maj_ver }}/0003-Windows-Follow-Posix-dir-exists-semantics-more-close.patch + - patches/mingw/{{ gcc_maj_ver }}/0005-Windows-Don-t-ignore-native-system-header-dir.patch + - patches/mingw/{{ gcc_maj_ver }}/0006-Windows-New-feature-to-allow-overriding.patch # [gcc_maj_ver == 13] + - patches/mingw/{{ gcc_maj_ver }}/0007-Build-EXTRA_GNATTOOLS-for-Ada.patch + - patches/mingw/{{ gcc_maj_ver }}/0008-Prettify-linking-no-undefined.patch + - patches/mingw/{{ gcc_maj_ver }}/0011-Enable-shared-gnat-implib.patch + - patches/mingw/{{ gcc_maj_ver }}/0012-Handle-spaces-in-path-for-default-manifest.patch + - patches/mingw/{{ gcc_maj_ver }}/0014-gcc-9-branch-clone_function_name_1-Retain-any-stdcall-suffix.patch + - patches/mingw/{{ gcc_maj_ver }}/0020-libgomp-Don-t-hard-code-MS-printf-attributes.patch + - patches/mingw/{{ gcc_maj_ver }}/0021-PR14940-Allow-a-PCH-to-be-mapped-to-a-different-addr.patch # [gcc_maj_ver != 15] + - patches/mingw/{{ gcc_maj_ver }}/0140-gcc-diagnostic-color.patch + - patches/mingw/{{ gcc_maj_ver }}/0200-add-m-no-align-vector-insn-option-for-i386.patch + - patches/mingw/{{ gcc_maj_ver }}/0300-override-builtin-printf-format.patch # [gcc_maj_ver == 13] + - patches/mingw/{{ gcc_maj_ver }}/2000-enable-rust.patch # [gcc_maj_ver == 13] + - patches/mingw/{{ gcc_maj_ver }}/2001-fix-building-rust-on-mingw-w64.patch + - patches/mingw/{{ gcc_maj_ver }}/2f7e7bfa3c6327793cdcdcb5c770b93cecd49bd0.patch # [gcc_maj_ver == 13] + - patches/mingw/{{ gcc_maj_ver }}/3eeb4801d6f45f6250fc77a6d3ab4e0115f8cfdd.patch # [gcc_maj_ver == 13] + - patches/mingw/{{ gcc_maj_ver }}/9002-native-tls.patch # [gcc_maj_ver == 15] + {% endif %} + +build: + number: {{ build_num }} + skip: True # [win] + skip: true # [not (linux or win) or (win and cross_target_platform != "win-64")] + detect_binary_files_with_prefix: false + ignore_run_exports_from: + - {{ cross_target_stdlib }}_{{ cross_target_platform }} + +requirements: + build: + # Build dependencies are installed in setup_compilers.sh due to + # conda-build bugs + host: + - {{ cross_target_stdlib }}_{{ cross_target_platform }} {{ cross_target_stdlib_version }} + +outputs: + - name: libgcc-devel_{{ cross_target_platform }} + script: install-libgcc-devel.sh + build: + noarch: generic + number: {{ libgcc_devel_build_num }} + detect_binary_files_with_prefix: false + missing_dso_whitelist: + - "*" + ignore_run_exports_from: + - {{ cross_target_stdlib }}_{{ cross_target_platform }} + overlinking_ignore_patterns: + - "*/lib/libgcc_s.so.*" + requirements: + build: + host: + - {{ cross_target_stdlib }}_{{ cross_target_platform }} {{ cross_target_stdlib_version }} + run: + - __unix # [unix] + - __win # [win] + test: + commands: + - test -f ${PREFIX}/lib/gcc/{{ triplet }}/{{ gcc_version }}/crtbegin.o + - test -f ${PREFIX}/lib/gcc/{{ triplet }}/{{ gcc_version }}/libgcc_eh.a + - test -f ${PREFIX}/lib/gcc/{{ triplet }}/{{ gcc_version }}/libgcc.a + {% if cross_target_platform.startswith("linux-") %} + - test -f ${PREFIX}/{{ triplet }}/lib/libgcc_s.so + {% else %} + - test -f ${PREFIX}/{{ triplet }}/lib/libgcc_s.a + {% endif %} + about: + summary: The GNU C development libraries and object files + home: https://gcc.gnu.org/ + license: GPL-3.0-only WITH GCC-exception-3.1 + + - name: libstdcxx-devel_{{ cross_target_platform }} + script: install-libstdc++-devel.sh + build: + noarch: generic + number: {{ libgcc_devel_build_num }} + detect_binary_files_with_prefix: false + missing_dso_whitelist: + - "*" + ignore_run_exports_from: + - {{ cross_target_stdlib }}_{{ cross_target_platform }} + overlinking_ignore_patterns: + - "*/lib/libstdc++.so.*" + requirements: + build: + host: + - {{ cross_target_stdlib }}_{{ cross_target_platform }} {{ cross_target_stdlib_version }} + run: + - __unix # [unix] + - __win # [win] + test: + commands: + - test -f ${PREFIX}/lib/gcc/{{ triplet }}/{{ gcc_version }}/libstdc++.a + - test -f ${PREFIX}/lib/gcc/{{ triplet }}/{{ gcc_version }}/libstdc++fs.a + - test -f ${PREFIX}/lib/gcc/{{ triplet }}/{{ gcc_version }}/libsupc++.a + - test -f ${PREFIX}/lib/gcc/{{ triplet }}/{{ gcc_version }}/include/c++/cstdio + {% if cross_target_platform.startswith("linux-") %} + - test -f ${PREFIX}/{{ triplet }}/lib/libstdc++.so + {% else %} + - test -f ${PREFIX}/lib/gcc/{{ triplet }}/{{ gcc_version }}/libstdc++.dll.a + {% endif %} + about: + summary: The GNU C++ headers and development libraries + home: https://gcc.gnu.org/ + license: GPL-3.0-only WITH GCC-exception-3.1 + + - name: gcc_impl_{{ cross_target_platform }} + script: install-gcc.sh + build: + number: {{ build_num }} + detect_binary_files_with_prefix: false + missing_dso_whitelist: + - '*' + ignore_run_exports_from: + - {{ cross_target_stdlib }}_{{ cross_target_platform }} + requirements: + build: + host: + - {{ cross_target_stdlib }}_{{ cross_target_platform }} {{ cross_target_stdlib_version }} + - {{ pin_subpackage("libgomp", exact=True) }} # [target_platform == cross_target_platform] + - {{ pin_subpackage("libstdcxx", exact=True) }} # [target_platform == cross_target_platform] + - {{ pin_subpackage("libgcc", exact=True) }} # [target_platform == cross_target_platform] + - {{ pin_subpackage("libgfortran" ~ libgfortran_soname) }} # [target_platform == cross_target_platform] + - {{ pin_subpackage("libsanitizer", exact=True) }} # [target_platform == cross_target_platform and not win] + run: + - binutils_impl_{{ cross_target_platform }} >={{ binutils_version }} + - {{ pin_subpackage("libgcc-devel_" ~ cross_target_platform, exact=True) }} + - {{ pin_subpackage("libsanitizer", exact=True) }} # [target_platform == cross_target_platform and not win] + # libstdcxx is a runtime dep of gcc because LTO requires it. + - {{ pin_subpackage("libstdcxx", max_pin=None) }} # [target_platform == cross_target_platform] + - {{ pin_subpackage("libgcc", max_pin=None) }} # [target_platform == cross_target_platform] + - {{ pin_subpackage("libgomp", max_pin=None) }} # [target_platform == cross_target_platform] + - {{ cross_target_stdlib }}_{{ cross_target_platform }} + run_exports: + # impose this requirement across the build/host boundary + strong: + - libgcc >={{ gcc_version }} + test: + requires: + - {{ cross_target_stdlib }}_{{ cross_target_platform }} {{ cross_target_stdlib_version }} + files: + - tests + commands: + - echo {{ c_stdlib }} + - echo {{ c_stdlib_version }} + - test -f ${PREFIX}/{{ triplet }}/lib/libgomp.so # [target_platform == cross_target_platform] + - test `readlink ${PREFIX}/{{ triplet }}/lib/libgomp.so` == "../../lib/libgomp.so" # [target_platform == cross_target_platform] + - test -f ${PREFIX}/bin/{{ triplet }}-gcc + - test -f ${PREFIX}/bin/{{ triplet }}-cpp + - test ! -f ${PREFIX}/bin/gcc + - test ! -f ${PREFIX}/bin/cpp + - CC=$(${PREFIX}/bin/*-gcc -dumpmachine)-gcc + - ${CC} -Wall tests/aligned_alloc.c -c -o c_aligned.o -v -Wl,-v -march=native # [target_platform == cross_target_platform and (x86_64 or s390x)] + # This test does not work well with QEMU + - ${CC} -Wall tests/aligned_alloc.c -c -o c_aligned.o -v -Wl,-v -mcpu=native # [target_platform == cross_target_platform and (not x86_64 and not s390x and not ppc64le)] + - ${CC} -Wall tests/aligned_alloc.c -c -o c_aligned.o -v -fsanitize=address # [cross_target_platform != "win-64"] + - ${CC} -Wall tests/aligned_alloc.c -c -o c_aligned.o -v # [cross_target_platform != "win-64"] + - ${CC} -Wall c_aligned.o -o c_aligned -v && ./c_aligned # [cross_target_platform == target_platform and cross_target_platform != "win-64"] + - ${CC} -Wall c_aligned.o -o c_aligned -Wl,-rpath,/foo && {{ triplet }}-readelf -d c_aligned | grep RPATH | grep "/foo:${PREFIX}/lib" # [cross_target_platform == target_platform and cross_target_platform != "win-64"] + - ${CC} -Wall tests/hello_world.c -c -o hello_world.o -v + - ${CC} -Wall hello_world.o -o hello_world -v + {% if cross_target_platform.startswith("linux-") %} + - test -f ${PREFIX}/{{ triplet }}/lib/libgcc_s.so + - test -f ${PREFIX}/{{ triplet }}/lib/libsanitizer.spec + - test -f ${PREFIX}/{{ triplet }}/lib/libasan_preinit.o + {% else %} + - test -f ${PREFIX}/{{ triplet }}/lib/libgcc_s.a + - test -f ${PREFIX}/lib/gcc/{{ triplet }}/{{ gcc_version }}/libquadmath.a + - test -f ${PREFIX}/lib/gcc/{{ triplet }}/{{ gcc_version }}/libgomp.a + {% endif %} + - test -f ${PREFIX}/{{ triplet }}/lib/libgomp.spec + about: + summary: GNU C Compiler + home: https://gcc.gnu.org/ + license: GPL-3.0-only WITH GCC-exception-3.1 + + - name: gcc + script: install-symlinks.sh + build: + skip: true # [target_platform != cross_target_platform] + track_features: # [not with_conda_specs] + - gcc_no_conda_specs # [not with_conda_specs] + requirements: + host: + - gcc_impl_{{ target_platform }} {{ gcc_version }}.* + run: + - gcc_impl_{{ target_platform }} {{ gcc_version }}.* + - conda-gcc-specs # [with_conda_specs] + test: + commands: + - ${PREFIX}/bin/gcc -v + - ${PREFIX}/bin/gcov -v + about: + summary: GNU C native compiler (symlinks) + home: https://github.com/conda-forge/ctng-compilers-feedstock + license: BSD-3-Clause + license_file: LICENSE + + - name: gcc-no-conda-specs + build: + skip: true # [with_conda_specs] + requirements: + run: + - gcc + run_constrained: + - conda-gcc-specs <0.0a0 + test: + commands: + - gcc --version + + - name: conda-gcc-specs + script: install-conda-specs.sh + build: + number: {{ build_num }} + skip: true # [cross_target_platform != target_platform] + detect_binary_files_with_prefix: false + requirements: + build: + run: + - {{ pin_subpackage("gcc_impl_" ~ cross_target_platform, max_pin='x.x.x.x') }} + test: + files: + - tests + commands: + - specdir=$PREFIX/lib/gcc/{{ triplet }}/{{ gcc_version }} + - test -f $specdir/conda.specs + - CC=$(${PREFIX}/bin/*-gcc -dumpmachine)-gcc + - echo | ${CC} -E -v -x c - |& grep '^Reading specs from' | awk '{print $NF}' | xargs readlink -e | awk -v ORS= '{print $1":"}' | grep "${specdir}/specs:${specdir}/conda.specs:" + - cp tests/libhowdy.h $PREFIX/include/ + - ${CC} -shared -fpic -o $PREFIX/lib/libhowdy.so tests/libhowdy.c + - ${CC} -o howdy-dso tests/howdy-dso.c -lhowdy + - ./howdy-dso + - grep RPATH <({{ triplet }}-readelf -d howdy-dso) + - "! grep RUNPATH <({{ triplet }}-readelf -d howdy-dso)" + - ${CC} -Wl,-enable-new-dtags -o howdy-dso-runpath tests/howdy-dso.c -lhowdy + - ./howdy-dso-runpath + - "! grep RPATH <({{ triplet }}-readelf -d howdy-dso-runpath)" + - grep RUNPATH <({{ triplet }}-readelf -d howdy-dso-runpath) + - echo | ${CC} -E -Wp,-v -x c - |& awk '/include <\.\.\.> search starts/,/^End of search/ {print}' | tail -n2 | head -n1 | grep "$PREFIX/include" + - echo | ${CC} -isystem "$PREFIX/include" -E -Wp,-v -x c - |& awk '/include <\.\.\.> search starts/, /^End of search/ {print}' | head -n2 | tail -n1 | grep "$PREFIX/include" + + about: + summary: conda-specific specfile for GNU C/C++ Compiler + description: | + When installed, this optional package provides a specfile that + directs gcc (and g++ or gfortran) to automatically: + * search for includes in $PREFIX/include + * link libraries in $PREFIX/lib + * set RPATH to $PREFIX/lib + * use RPATH instead of the newer RUNPATH + This package is intended to aid usability of the compiler + toolchain as a replacement for system-installed compilers. + It should not be used in recipes. Use the 'compiler()' + jinja function as described on + https://conda-forge.org/docs/maintainer/knowledge_base.html#dep-compilers + home: https://gcc.gnu.org/ + license: GPL-3.0-only WITH GCC-exception-3.1 + doc_url: https://gcc.gnu.org/onlinedocs/gcc/Spec-Files.html + + - name: gxx_impl_{{ cross_target_platform }} + script: install-g++.sh + build: + number: {{ build_num }} + detect_binary_files_with_prefix: false + missing_dso_whitelist: + - "*" + ignore_run_exports_from: + - {{ cross_target_stdlib }}_{{ cross_target_platform }} + requirements: + build: + host: + - {{ cross_target_stdlib }}_{{ cross_target_platform }} {{ cross_target_stdlib_version }} + # For cpp and crt{i,n}.o + - {{ pin_subpackage("gcc_impl_" ~ cross_target_platform, exact=True) }} + run: + # For cpp and crt{i,n}.o + - {{ pin_subpackage("gcc_impl_" ~ cross_target_platform, exact=True) }} + # not needed due to pinning above but marks this build as using the new sysroots + - {{ cross_target_stdlib }}_{{ cross_target_platform }} + - {{ pin_subpackage("libstdcxx-devel_" ~ cross_target_platform, exact=True) }} + # for C++20 chrono support + - tzdata + run_exports: + # impose this requirement across the build/host boundary + strong: + - libstdcxx >={{ gcc_version }} + test: + requires: + - {{ cross_target_stdlib }}_{{ cross_target_platform }} {{ cross_target_stdlib_version }} + - strace_{{ cross_target_platform }} + files: + - tests + commands: + - test -f ${PREFIX}/bin/{{ triplet }}-g++ + - CXX=$(${PREFIX}/bin/*-gcc -dumpmachine)-g++ + - ${CXX} -Wall tests/aligned_alloc.cpp -c -o cpp_aligned.o --std=c++17 # [cross_target_platform != "win-64"] + - ${CXX} -Wall cpp_aligned.o -o cpp_aligned --std=c++17 && ./cpp_aligned # [cross_target_platform == target_platform and cross_target_platform != "win-64"] + - ${CXX} -Wall tests/hello_world.cpp -c -o hello_world.o --std=c++17 + - ${CXX} -Wall hello_world.o -o hello_world --std=c++17 + + # test tzdb integration + {% if gcc_maj_ver|int >= 14 %} + - ${CXX} -isystem ${PREFIX}/include --std=c++20 -Wall tests/tzdb-override.cpp -c -o tzdb-override.o + - ${CXX} -isystem ${PREFIX}/include --std=c++20 -Wall tests/tzdb.cpp -c -o tzdb.o + {% if target_platform == cross_target_platform %} + - ${CXX} tzdb-override.o -o tzdb-override && ./tzdb-override + - ${CXX} tzdb.o -o tzdb && ./tzdb + - $PREFIX/usr/bin/strace ./tzdb 2>&1 | grep ${CONDA_PREFIX}/lib/../share/zoneinfo/tzdata.zi + # also test without any environment activation + - unset PREFIX + - unset CONDA_PREFIX + - ./tzdb + {% endif %} + {% endif %} + about: + summary: GNU C++ Compiler + home: https://gcc.gnu.org/ + license: GPL-3.0-only WITH GCC-exception-3.1 + + - name: gxx + script: install-symlinks.sh + build: + skip: true # [target_platform != cross_target_platform] + requirements: + host: + - gxx_impl_{{ target_platform }} {{ gcc_version }}.* + - gcc {{ gcc_version }}.* + run: + - gxx_impl_{{ target_platform }} {{ gcc_version }}.* + - gcc {{ gcc_version }}.* + test: + commands: + - ${PREFIX}/bin/g++ -v + - ${PREFIX}/bin/gcc -v + about: + summary: GNU C++ native compiler (symlinks) + home: https://github.com/conda-forge/ctng-compilers-feedstock + license: BSD-3-Clause + license_file: LICENSE + + - name: gfortran_impl_{{ cross_target_platform }} + script: install-gfortran.sh + build: + number: {{ build_num }} + detect_binary_files_with_prefix: false + missing_dso_whitelist: + - "*" + ignore_run_exports_from: + - {{ cross_target_stdlib }}_{{ cross_target_platform }} + requirements: + build: + host: + # For cpp and crt{i,n}.o + - {{ pin_subpackage("gcc_impl_" ~ cross_target_platform, exact=True) }} + # not needed due to pinning above but marks this build as using the new sysroots + - {{ cross_target_stdlib }}_{{ cross_target_platform }} {{ cross_target_stdlib_version }} + run: + # For cpp and crt{i,n}.o + - gcc_impl_{{ cross_target_platform }} >={{ gcc_version }} + - {{ pin_subpackage("libgfortran" ~ libgfortran_soname, max_pin=None) }} # [target_platform == cross_target_platform] + - {{ pin_subpackage("libgcc", max_pin=None) }} # [target_platform == cross_target_platform] + - {{ pin_subpackage("libstdcxx", max_pin=None) }} # [target_platform == cross_target_platform] + - {{ cross_target_stdlib }}_{{ cross_target_platform }} + run_exports: + # impose this requirement across the build/host boundary + strong: + - libgfortran{{ libgfortran_soname }} {{ gcc_version }}.* + - libgcc >={{ gcc_version }} + test: + requires: + - cmake >=3.11,<4 # [x86_64 or aarch64 or ppc64le] + - make + - {{ cross_target_stdlib }}_{{ cross_target_platform }} {{ cross_target_stdlib_version }} + commands: + {% if cross_target_platform.startswith("linux-") %} + - test -f ${PREFIX}/{{ triplet }}/lib/libgfortran.so + {% else %} + - test -f ${PREFIX}/{{ triplet }}/lib/libgfortran.dll.a + {% endif %} + - test -f ${PREFIX}/{{ triplet }}/lib/libgfortran.a + - test -f ${PREFIX}/bin/{{ triplet }}-gfortran + - find $PREFIX/lib -iname omp_lib.mod | grep '.' + - find $PREFIX/lib -iname omp_lib.h | grep '.' + - find $PREFIX/lib -iname ISO_Fortran_binding.h | grep '.' + - echo {{ gcc_maj_ver }} + - pushd tests/fortomp + - sh test_fort.sh # [target_platform == cross_target_platform and (x86_64 or aarch64 or ppc64le)] + files: + - tests/fortomp/* + about: + summary: GNU Fortran Compiler + home: https://gcc.gnu.org/ + license: GPL-3.0-only WITH GCC-exception-3.1 + + - name: gfortran + script: install-symlinks.sh + build: + skip: true # [target_platform != cross_target_platform] + requirements: + host: + - gfortran_impl_{{ target_platform }} {{ gcc_version }}.* + - gcc_impl_{{ target_platform }} {{ gcc_version }}.* + - gcc {{ gcc_version }}.* + run: + - gfortran_impl_{{ target_platform }} {{ gcc_version }}.* + - gcc_impl_{{ target_platform }} {{ gcc_version }}.* + - gcc {{ gcc_version }}.* + test: + commands: + - ${PREFIX}/bin/gfortran -v + - ${PREFIX}/bin/gcc -v + about: + summary: GNU Fortran native compiler (symlinks) + home: https://github.com/conda-forge/ctng-compilers-feedstock + license: BSD-3-Clause + license_file: LICENSE + + - name: libstdcxx + target: {{ cross_target_platform }} + script: install-libstdc++.sh + build: + number: {{ build_num }} + skip: true # [target_platform != cross_target_platform] + detect_binary_files_with_prefix: false + missing_dso_whitelist: + - "*" + overlinking_ignore_patterns: + - "lib/libstdc++.so.*" + requirements: + build: + host: + - {{ cross_target_stdlib }}_{{ cross_target_platform }} {{ cross_target_stdlib_version }} + - {{ pin_subpackage("libgcc", exact=True) }} + run: + - {{ pin_subpackage("libgcc", exact=True) }} + run_constrained: + # avoid installing incompatible version of old name for this output + - libstdcxx-ng =={{ version }}=*_{{ build_num }} + test: + commands: + - test -f ${PREFIX}/lib/libstdc++.so + about: + summary: The GNU C++ Runtime Library + home: https://gcc.gnu.org/ + license: GPL-3.0-only WITH GCC-exception-3.1 + + - name: libsanitizer + target: {{ cross_target_platform }} + script: install-libsanitizer.sh + build: + number: {{ build_num }} + skip: true # [target_platform != cross_target_platform or win] + detect_binary_files_with_prefix: false + missing_dso_whitelist: + - "*" + run_exports: + - libsanitizer {{ gcc_version }} + overlinking_ignore_patterns: + - "lib/libtsan.so.*" + - "lib/libasan.so.*" + - "lib/liblsan.so.*" + - "lib/libhwasan.so.*" + requirements: + build: + host: + - {{ cross_target_stdlib }}_{{ cross_target_platform }} {{ cross_target_stdlib_version }} + run: + - libgcc >={{ gcc_version }} + - libstdcxx >={{ gcc_version }} + test: + requires: + - {{ cross_target_stdlib }}_{{ cross_target_platform }} {{ cross_target_stdlib_version }} + - gcc_impl_{{ cross_target_platform }} + commands: + - test -f ${PREFIX}/lib/libasan.so + - test -f ${PREFIX}/lib/libhwasan.so # [x86_64 or aarch64] + - file ${PREFIX}/bin/{{ triplet }}-gcc + - echo 'void main(){}' | {{ triplet }}-gcc -fsanitize=address -Wl,--fatal-warnings -x c - + about: + summary: The GCC runtime libraries for sanitizers + home: https://gcc.gnu.org/onlinedocs/gccint/Libgcc.html + license: GPL-3.0-only WITH GCC-exception-3.1 + + - name: libgomp + target: {{ cross_target_platform }} + script: install-libgomp.sh + build: + number: {{ build_num }} + skip: true # [target_platform != cross_target_platform] + detect_binary_files_with_prefix: false + missing_dso_whitelist: + - "*" + run_exports: + strong: + - {{ pin_subpackage("_openmp_mutex", max_pin=None) }} + {% if cross_target_platform.startswith("win-") %} + - {{ pin_subpackage("libgomp", max_pin=None) }} + {% endif %} + requirements: + build: + host: + - {{ cross_target_stdlib }}_{{ cross_target_platform }} {{ cross_target_stdlib_version }} + run_constrained: + - msys2-conda-epoch <0.0a0 # [win] + test: + requires: + - {{ cross_target_stdlib }}_{{ cross_target_platform }} + commands: + - test -f ${PREFIX}/lib/libgomp.so.{{ libgomp_ver }} + - test ! -f ${PREFIX}/lib/libgomp.so.{{ libgomp_ver[0:1] }} + about: + summary: The GCC OpenMP implementation. + home: https://gcc.gnu.org/onlinedocs/gccint/Libgcc.html + license: GPL-3.0-only WITH GCC-exception-3.1 + + - name: libgcc + target: {{ cross_target_platform }} + script: install-libgcc-no-gomp.sh + build: + number: {{ build_num }} + skip: true # [target_platform != cross_target_platform] + detect_binary_files_with_prefix: false + missing_dso_whitelist: + - "*" + rpaths_patcher: patchelf + overlinking_ignore_patterns: + - "lib/libgcc_s.so.*" + requirements: + build: + host: + - {{ pin_subpackage("libgomp", exact=True) }} + - {{ pin_subpackage('_openmp_mutex', exact=True) }} + - {{ cross_target_stdlib }}_{{ cross_target_platform }} {{ cross_target_stdlib_version }} + run: + - {{ pin_subpackage("_openmp_mutex", max_pin=None) }} + run_constrained: + - {{ pin_subpackage("libgomp", exact=True) }} + - msys2-conda-epoch <0.0a0 # [win] + # avoid installing incompatible version of old name for this output + - libgcc-ng =={{ version }}=*_{{ build_num }} + test: + requires: + - {{ cross_target_stdlib }}_{{ cross_target_platform }} + commands: + - test -f ${PREFIX}/lib/libgcc_s.so + - test -f ${PREFIX}/lib/libgomp.so.{{ libgomp_ver[0:1] }} + - test `readlink ${PREFIX}/lib/libgomp.so.{{ libgomp_ver[0:1] }}` == "libgomp.so.{{ libgomp_ver }}" + about: + summary: The GCC low-level runtime library + home: https://gcc.gnu.org/onlinedocs/gccint/Libgcc.html + license: GPL-3.0-only WITH GCC-exception-3.1 + + - name: _openmp_mutex + script: install-openmp_impl.sh + version: {{ openmp_ver }} + build: + string: 3_gnu + skip: true # [target_platform != cross_target_platform] + run_exports: + strong: + - {{ pin_subpackage("_openmp_mutex", max_pin=None) }} + requirements: + build: + host: + - {{ pin_subpackage('libgomp', exact=True) }} + - {{ cross_target_stdlib }}_{{ cross_target_platform }} {{ cross_target_stdlib_version }} + run: + - libgomp >=7.5.0 + run_constrained: + # conflict with previous name + - openmp_impl <0.0a0 + - msys2-conda-epoch <0.0a0 # [win] + test: + commands: + - test -f ${PREFIX}/lib/libgomp.so.{{ libgomp_ver[0:1] }} + - test `readlink ${PREFIX}/lib/libgomp.so.{{ libgomp_ver[0:1] }}` == "libgomp.so.{{ libgomp_ver }}" + about: + summary: OpenMP Implementation Mutex + license: BSD-3-Clause + license_file: LICENSE + home: https://github.com/conda-forge/ctng-compilers-feedstock + + - name: libgfortran{{ libgfortran_soname }} + target: {{ cross_target_platform }} + script: install-libgfortran.sh + build: + number: {{ build_num }} + skip: true # [target_platform != cross_target_platform] + detect_binary_files_with_prefix: false + missing_dso_whitelist: + - "*" + overlinking_ignore_patterns: + - "lib/libgfortran.so.*" + requirements: + build: + host: + - {{ cross_target_stdlib }}_{{ cross_target_platform }} {{ cross_target_stdlib_version }} + run: + - libgcc >={{ gcc_version }} + run_constrained: + - libgfortran {{ gcc_version }} + test: + commands: + - test -f ${PREFIX}/lib/libgfortran.so + about: + summary: The GNU Fortran Runtime Library + home: https://gcc.gnu.org/ + license: GPL-3.0-only WITH GCC-exception-3.1 + + - name: libgfortran + target: {{ cross_target_platform }} + build: + skip: true # [target_platform != cross_target_platform] + number: {{ build_num }} + requirements: + run: + - {{ pin_subpackage('libgfortran' ~ libgfortran_soname, exact=True) }} + run_constrained: + # avoid installing incompatible version of old name for this output + - libgfortran-ng =={{ version }}=*_{{ build_num }} + test: + commands: + - test -f ${PREFIX}/lib/libgfortran.so + about: + summary: The GNU Fortran Runtime Library + home: https://gcc.gnu.org/ + license: GPL-3.0-only WITH GCC-exception-3.1 + + - name: gdb-pretty-printer + version: {{ gcc_version }} + script: install-gdb-pretty-printer.sh + build: + # skip until gdb 16.3 is on defaults (which is built against GCC 14.3.0) + skip: true + number: {{ build_num }} + ignore_run_exports: # [linux] + - libstdcxx # [linux] + requirements: + host: + - python + run: + - python + - gdb >= 16.3 + - libstdcxx >={{ gcc_version }} + about: + summary: GNU Compiler Collection Python Pretty Printers + home: https://gcc.gnu.org/ + license: GPL-3.0-only WITH GCC-exception-3.1 + + # compatibility outputs for previous naming of the runtime libraries + # with "-ng" suffix; for windows the suffix had never been introduced + {% if not cross_target_platform.startswith("win-") %} + - name: libgcc-ng + target: {{ cross_target_platform }} + build: + number: {{ build_num }} + skip: true # [target_platform != cross_target_platform] + run_exports: + strong: + - libgcc + requirements: + host: + - {{ pin_subpackage("libgcc", exact=True) }} + run: + - {{ pin_subpackage("libgcc", exact=True) }} + test: + commands: + - echo "empty wrapper for compatibility with previous naming" + about: + summary: The GCC low-level runtime library + home: https://gcc.gnu.org/onlinedocs/gccint/Libgcc.html + license: GPL-3.0-only WITH GCC-exception-3.1 + + - name: libstdcxx-ng + target: {{ cross_target_platform }} + script: install-libstdc++.sh + build: + number: {{ build_num }} + skip: true # [target_platform != cross_target_platform] + run_exports: + strong: + - libstdcxx + requirements: + host: + - {{ pin_subpackage("libstdcxx", exact=True) }} + run: + - {{ pin_subpackage("libstdcxx", exact=True) }} + test: + commands: + - echo "empty wrapper for compatibility with previous naming" + about: + summary: The GNU C++ Runtime Library + home: https://gcc.gnu.org/ + license: GPL-3.0-only WITH GCC-exception-3.1 + + - name: libgfortran-ng + target: {{ cross_target_platform }} + build: + number: {{ build_num }} + skip: true # [target_platform != cross_target_platform] + run_exports: + strong: + - libgfortran + requirements: + host: + - {{ pin_subpackage('libgfortran', exact=True) }} + run: + - {{ pin_subpackage('libgfortran', exact=True) }} + test: + commands: + - echo "empty wrapper for compatibility with previous naming" + about: + summary: The GNU Fortran Runtime Library + home: https://gcc.gnu.org/ + license: GPL-3.0-only WITH GCC-exception-3.1 + {% endif %} + +about: + summary: GNU Compiler Collection + home: https://gcc.gnu.org/ + license: GPL-3.0-only WITH GCC-exception-3.1 + license_file: + - COPYING + - COPYING.LIB + - COPYING3 + - COPYING3.LIB + +extra: + feedstock-name: ctng-compilers-feedstock + recipe-maintainers: + - timsnyder + - xhochy + - isuruf + - beckermr diff --git a/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/recipe/parent/patches/0001-allow-commands-in-main-specfile.patch b/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/recipe/parent/patches/0001-allow-commands-in-main-specfile.patch new file mode 100644 index 0000000000000000000000000000000000000000..0e6ea6afa6429337186944117011253d9be4e64f --- /dev/null +++ b/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/recipe/parent/patches/0001-allow-commands-in-main-specfile.patch @@ -0,0 +1,23 @@ +From 10cf9f22dcb62db55cd2e9cbc587e2ab35a88889 Mon Sep 17 00:00:00 2001 +From: Tim Snyder +Date: Tue, 29 Mar 2022 22:33:27 +0000 +Subject: [PATCH 1/4] allow % commands in main specfile + +--- + gcc/gcc.cc | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/gcc/gcc.cc b/gcc/gcc.cc +index fc9f1f545dc..28b947c7afd 100644 +--- a/gcc/gcc.cc ++++ b/gcc/gcc.cc +@@ -2392,7 +2392,8 @@ read_specs (const char *filename, bool main_p, bool user_p) + /* Is this a special command that starts with '%'? */ + /* Don't allow this for the main specs file, since it would + encourage people to overwrite it. */ +- if (*p == '%' && !main_p) ++ /* ::conda-forge:: allow use of commands in main specs */ ++ if (*p == '%') + { + p1 = p; + while (*p && *p != '\n') diff --git a/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/recipe/parent/patches/0002-patch-zoneinfo_dir_override-to-point-to-our-tzdata.patch b/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/recipe/parent/patches/0002-patch-zoneinfo_dir_override-to-point-to-our-tzdata.patch new file mode 100644 index 0000000000000000000000000000000000000000..e63a7f8389e8f3c3e60994356076261b033c5fb8 --- /dev/null +++ b/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/recipe/parent/patches/0002-patch-zoneinfo_dir_override-to-point-to-our-tzdata.patch @@ -0,0 +1,113 @@ +From 92dc5e74592f57dbc9c2b421e2e348d88d3439f6 Mon Sep 17 00:00:00 2001 +From: "H. Vetinari" +Date: Fri, 21 Jun 2024 12:41:07 +1100 +Subject: [PATCH 2/4] patch zoneinfo_dir_override to point to our tzdata + +--- + libstdc++-v3/src/c++20/tzdb.cc | 78 ++++++++++++++++++++++++++++------ + 1 file changed, 65 insertions(+), 13 deletions(-) + +diff --git a/libstdc++-v3/src/c++20/tzdb.cc b/libstdc++-v3/src/c++20/tzdb.cc +index 72f20e7f828..8d4feb99902 100644 +--- a/libstdc++-v3/src/c++20/tzdb.cc ++++ b/libstdc++-v3/src/c++20/tzdb.cc +@@ -37,8 +37,12 @@ + #include // mutex + #include // filesystem::read_symlink + +-#ifndef _AIX +-# include // getenv ++#if defined(__linux__) ++# include // dladdr ++# include // free, malloc, realpath ++# include // memcpy, strlen ++#else defined(_WIN32) ++# include + #endif + + #if defined __GTHREADS && ATOMIC_POINTER_LOCK_FREE == 2 +@@ -64,25 +68,73 @@ + + namespace __gnu_cxx + { +-#ifdef _AIX +- // Cannot override weak symbols on AIX. +- const char* (*zoneinfo_dir_override)() = nullptr; +-#else +- [[gnu::weak]] const char* zoneinfo_dir_override(); +- +-#if defined(__APPLE__) || defined(__hpux__) \ +- || (defined(__VXWORKS__) && !defined(__RTP__)) +- // Need a weak definition for Mach-O et al. + [[gnu::weak]] const char* zoneinfo_dir_override() + { ++#ifdef _GLIBCXX_SHARED ++ // get path to library we're in, to determine our location relative to $PREFIX; ++ // with help from the MIT-licensed https://github.com/gpakosz/whereami ++ void* addr = __builtin_extract_return_addr(__builtin_return_address(0)); ++ char* this_lib; ++ int i; ++ // is included through ++ static std::string tz_dir; ++ if (!tz_dir.empty()) { ++ return tz_dir.c_str(); ++ } ++#ifdef _WIN32 ++ // we're in %PREFIX%\Library\bin\libstdc++-6.dll ++# define TO_PREFIX "/../.." ++ // needs single quotes for character (not string) literal ++# define PATH_SEP '\\' ++ wchar_t buffer[MAX_PATH]; ++ HMODULE hm = NULL; ++ // non-zero return means success ++ if (GetModuleHandleEx(GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS | ++ GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT, ++ (LPCSTR) addr, &hm)) { ++ // returns length of string (not counting null byte), see ++ // https://learn.microsoft.com/en-us/windows/win32/api/libloaderapi/nf-libloaderapi-getmodulefilenamew#return-value ++ DWORD total_length = GetModuleFileNameW(hm, buffer, sizeof(buffer)); ++ if (total_length) { ++ this_lib = (char*)malloc(total_length + 1); ++ memcpy(this_lib, buffer, total_length); ++#else ++ // we're in $PREFIX/lib/libstdcxx.so ++# define TO_PREFIX "/.." ++# define PATH_SEP '/' ++ char buffer[PATH_MAX]; ++ Dl_info info; ++ ++ if (dladdr(addr, &info)) { ++ char* resolved = realpath(info.dli_fname, buffer); ++ if (resolved) { ++ int total_length = (int)strlen(resolved); ++ this_lib = (char*)malloc(total_length + 1); ++ memcpy(this_lib, resolved, total_length); ++#endif ++ ++ for (i = (int)total_length - 1; i >= 0; --i) { ++ if (this_lib[i] == PATH_SEP) { ++ // set to null byte so the string ends before the basename ++ this_lib[i] = '\0'; ++ break; ++ } ++ } ++ tz_dir = {this_lib}; ++ tz_dir += TO_PREFIX; ++ tz_dir += "/share/zoneinfo"; ++ // std::string constructor for tz_dir deep-copies ++ free(this_lib); ++ return tz_dir.c_str(); ++ } ++ } ++#endif // _GLIBCXX_SHARED + #ifdef _GLIBCXX_ZONEINFO_DIR + return _GLIBCXX_ZONEINFO_DIR; + #else + return nullptr; + #endif + } +-#endif +-#endif + } + + #if ! defined _GLIBCXX_ZONEINFO_DIR && ! defined _GLIBCXX_STATIC_TZDATA diff --git a/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/recipe/parent/patches/0003-add-ldl-to-libstdc___la_LDFLAGS.patch b/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/recipe/parent/patches/0003-add-ldl-to-libstdc___la_LDFLAGS.patch new file mode 100644 index 0000000000000000000000000000000000000000..a17bf01c996d5181529f52f35b2df040463adbe4 --- /dev/null +++ b/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/recipe/parent/patches/0003-add-ldl-to-libstdc___la_LDFLAGS.patch @@ -0,0 +1,40 @@ +From c54fd2dea14134d3e51c17ca5442e0ae2dc16462 Mon Sep 17 00:00:00 2001 +From: "H. Vetinari" +Date: Mon, 15 Jul 2024 19:16:05 +1100 +Subject: [PATCH 3/4] add `-ldl` to libstdc___la_LDFLAGS + +we want to link static-only here, to avoid having to add +`-ldl` everytime something links against libstdc++.so + +Co-Authored-By: Isuru Fernando +--- + libstdc++-v3/src/Makefile.am | 2 +- + libstdc++-v3/src/Makefile.in | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/libstdc++-v3/src/Makefile.am b/libstdc++-v3/src/Makefile.am +index 37ba1491dea..5b69f43ecd8 100644 +--- a/libstdc++-v3/src/Makefile.am ++++ b/libstdc++-v3/src/Makefile.am +@@ -161,7 +161,7 @@ libstdc___darwin_rpath += -Wl,-rpath,@loader_path + endif + + libstdc___la_LDFLAGS = \ +- -version-info $(libtool_VERSION) ${version_arg} -lm $(libstdc___darwin_rpath) ++ -version-info $(libtool_VERSION) ${version_arg} -lm -Bstatic -ldl -Bdynamic -Wl,--exclude-libs,libdl.a $(libstdc___darwin_rpath) + + libstdc___la_LINK = $(CXXLINK) $(libstdc___la_LDFLAGS) $(lt_host_flags) + +diff --git a/libstdc++-v3/src/Makefile.in b/libstdc++-v3/src/Makefile.in +index 1bdf0daa88f..ab28e14804e 100644 +--- a/libstdc++-v3/src/Makefile.in ++++ b/libstdc++-v3/src/Makefile.in +@@ -566,7 +566,7 @@ libstdc___la_DEPENDENCIES = \ + @ENABLE_DARWIN_AT_RPATH_TRUE@ -Wc,-nodefaultrpaths \ + @ENABLE_DARWIN_AT_RPATH_TRUE@ -Wl,-rpath,@loader_path + libstdc___la_LDFLAGS = \ +- -version-info $(libtool_VERSION) ${version_arg} -lm $(libstdc___darwin_rpath) ++ -version-info $(libtool_VERSION) ${version_arg} -lm -Bstatic -ldl -Bdynamic -Wl,--exclude-libs,libdl.a $(libstdc___darwin_rpath) + + libstdc___la_LINK = $(CXXLINK) $(libstdc___la_LDFLAGS) $(lt_host_flags) + @GLIBCXX_LDBL_ALT128_COMPAT_FALSE@@GLIBCXX_LDBL_COMPAT_TRUE@LTCXXCOMPILE64 = $(LTCXXCOMPILE) diff --git a/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/recipe/parent/patches/0004-Hardcode-HAVE_ALIGNED_ALLOC-1-in-libstdc-v3-configur.patch b/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/recipe/parent/patches/0004-Hardcode-HAVE_ALIGNED_ALLOC-1-in-libstdc-v3-configur.patch new file mode 100644 index 0000000000000000000000000000000000000000..07a361cd6d709849c78bba0ece60ff63d8c2295e --- /dev/null +++ b/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/recipe/parent/patches/0004-Hardcode-HAVE_ALIGNED_ALLOC-1-in-libstdc-v3-configur.patch @@ -0,0 +1,57 @@ +From 86369ec6c37896394546f3b01f9c447c4f4188ae Mon Sep 17 00:00:00 2001 +From: Nehal J Wani +Date: Tue, 12 Jun 2018 05:26:24 +0000 +Subject: [PATCH 4/4] Hardcode HAVE_ALIGNED_ALLOC=1 in libstdc++-v3/configure + +--- + libstdc++-v3/configure | 16 ++++++++++++++++ + 1 file changed, 16 insertions(+) + +diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure +index 18053ab7eae..44b6a72f775 100755 +--- a/libstdc++-v3/configure ++++ b/libstdc++-v3/configure +@@ -26405,6 +26405,11 @@ _ACEOF + fi + done + ++# The check above works only if aligned_alloc is present as a symbol in libc.so ++# Since we provide a header only implementation, override the value here ++cat >>confdefs.h <<_ACEOF ++#define `$as_echo "HAVE_aligned_alloc" | $as_tr_cpp` 1 ++_ACEOF + + # For iconv support. + +@@ -38403,6 +38408,9 @@ _ACEOF + fi + done + ++cat >>confdefs.h <<_ACEOF ++#define `$as_echo "HAVE_aligned_alloc" | $as_tr_cpp` 1 ++_ACEOF + ;; + + *-fuchsia*) +@@ -42318,6 +42326,10 @@ fi + done + + ++cat >>confdefs.h <<_ACEOF ++#define `$as_echo "HAVE_aligned_alloc" | $as_tr_cpp` 1 ++_ACEOF ++ + ;; + *-mingw32*) + +@@ -45924,6 +45936,10 @@ _ACEOF + fi + done + ++cat >>confdefs.h <<_ACEOF ++#define `$as_echo "HAVE_aligned_alloc" | $as_tr_cpp` 1 ++_ACEOF ++ + ;; + *-qnx6.1* | *-qnx6.2*) + SECTION_FLAGS='-ffunction-sections -fdata-sections' diff --git a/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/recipe/parent/setup_compiler.sh b/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/recipe/parent/setup_compiler.sh new file mode 100644 index 0000000000000000000000000000000000000000..dcdd387ae719e4341ae316205f920118cd4b1a45 --- /dev/null +++ b/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/recipe/parent/setup_compiler.sh @@ -0,0 +1,48 @@ +#!/bin/bash +if [[ ! -d $SRC_DIR/cf-compilers ]]; then + extra_pkgs=() + if [[ "$build_platform" != "$target_platform" ]]; then + # we need a compiler to target cross_target_platform. + # when build_platform == target_platform, the compiler + # just built can be used. + # when build_platform != target_platform, the compiler + # just built cannot be used, hence we need one that + # can be used. + extra_pkgs+=( + "gcc_impl_${cross_target_platform}=${gcc_version}" + "gxx_impl_${cross_target_platform}=${gcc_version}" + "gfortran_impl_${cross_target_platform}=${gcc_version}" + ) + fi + # Remove conda-forge/label/sysroot-with-crypt when GCC < 14 is dropped + conda create -p $SRC_DIR/cf-compilers --yes --quiet \ + "binutils_impl_${build_platform}" \ + "gcc_impl_${build_platform}" \ + "gxx_impl_${build_platform}" \ + "gfortran_impl_${build_platform}" \ + "binutils_impl_${target_platform}=${binutils_version}" \ + "gcc_impl_${target_platform}" \ + "gxx_impl_${target_platform}" \ + "gfortran_impl_${target_platform}" \ + "${c_stdlib}_${target_platform}=${c_stdlib_version}" \ + "binutils_impl_${cross_target_platform}=${binutils_version}" \ + "${cross_target_stdlib}_${cross_target_platform}=${cross_target_stdlib_version}" \ + make \ + ${extra_pkgs[@]} +fi + +export PATH=$SRC_DIR/cf-compilers/bin:$PATH +export BUILD_PREFIX=$SRC_DIR/cf-compilers + +if [[ "$target_platform" == "win-"* && "${PREFIX}" != *Library ]]; then + export PREFIX=${PREFIX}/Library +fi + +source $RECIPE_DIR/get_cpu_arch.sh + +if [[ "$target_platform" == "win-64" ]]; then + EXEEXT=".exe" +else + EXEEXT="" +fi +SYSROOT_DIR=${PREFIX}/${TARGET}/sysroot diff --git a/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/recipe/parent/tests/aligned_alloc.c b/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/recipe/parent/tests/aligned_alloc.c new file mode 100644 index 0000000000000000000000000000000000000000..287be94c7340a134a5d9a56ddc0f6c20acc0af74 --- /dev/null +++ b/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/recipe/parent/tests/aligned_alloc.c @@ -0,0 +1,9 @@ +#include +#include + +int main(void) +{ + int *p2 = (int*)aligned_alloc(1024, 1024*sizeof *p2); + printf("1024-byte aligned addr: %p\n", (void*)p2); + free(p2); +} diff --git a/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/recipe/parent/tests/aligned_alloc.cpp b/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/recipe/parent/tests/aligned_alloc.cpp new file mode 100644 index 0000000000000000000000000000000000000000..1379c7547ae63e12433db910d243f159657aa0b6 --- /dev/null +++ b/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/recipe/parent/tests/aligned_alloc.cpp @@ -0,0 +1,18 @@ +#include +#include +#include +//#include + +int main(void) +{ + /// int *p2 = (int*)memalign(1024, 1024 * sizeof *p2); + int *p2; + int err = posix_memalign((void**)&p2, 1024, sizeof *p2); + printf("1024-byte aligned addr: %p\n", (void*)p2); + free(p2); + p2 = (int*)std::aligned_alloc(1024, 1); + printf("1024-byte aligned addr: %p\n", (void*)p2); + std::free(p2); + p2 = (int*)aligned_alloc(1024, 1024); + printf("1024-byte aligned addr: %p\n", (void*)p2); +} diff --git a/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/recipe/parent/tests/fortomp/CMakeLists.txt b/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/recipe/parent/tests/fortomp/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..491a48b42cb3ddfef5f8541f8db848e0ba844f84 --- /dev/null +++ b/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/recipe/parent/tests/fortomp/CMakeLists.txt @@ -0,0 +1,5 @@ +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(fortomp + LANGUAGES Fortran) + +find_package(OpenMP REQUIRED) diff --git a/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/recipe/parent/tests/fortomp/test_fort.sh b/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/recipe/parent/tests/fortomp/test_fort.sh new file mode 100644 index 0000000000000000000000000000000000000000..75731b653df023e75c4d2b73b2c345a3510faad9 --- /dev/null +++ b/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/recipe/parent/tests/fortomp/test_fort.sh @@ -0,0 +1,11 @@ +GFORTRAN=$(${PREFIX}/bin/*-gcc -dumpmachine)-gfortran +FFLAGS="-fopenmp -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -pipe" + +cmake \ + -H${SRC_DIR} \ + -Bbuild \ + -DCMAKE_INSTALL_PREFIX=${PREFIX} \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_Fortran_COMPILER=${GFORTRAN} \ + -DCMAKE_Fortran_FLAGS="${FFLAGS}" \ + . diff --git a/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/recipe/parent/tests/hello_world.c b/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/recipe/parent/tests/hello_world.c new file mode 100644 index 0000000000000000000000000000000000000000..f6054fde81f8dfa4882cef918c408fa6b7255c3e --- /dev/null +++ b/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/recipe/parent/tests/hello_world.c @@ -0,0 +1,5 @@ +#include + +int main() { + printf("hello world!\n"); +} diff --git a/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/recipe/parent/tests/hello_world.cpp b/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/recipe/parent/tests/hello_world.cpp new file mode 100644 index 0000000000000000000000000000000000000000..585eea4cee5b1176fd28267f3e27dbdb344fd31f --- /dev/null +++ b/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/recipe/parent/tests/hello_world.cpp @@ -0,0 +1,6 @@ +#include + +int main(void) +{ + std::cout << "hello world!" << std::endl; +} diff --git a/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/recipe/parent/tests/howdy-dso.c b/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/recipe/parent/tests/howdy-dso.c new file mode 100644 index 0000000000000000000000000000000000000000..ea47ce0a03e061a965fc1e2cdaf310c038d4b44d --- /dev/null +++ b/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/recipe/parent/tests/howdy-dso.c @@ -0,0 +1,6 @@ +#include + +int main(void) { + howdy(); + return 0; +} diff --git a/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/recipe/parent/tests/libhowdy.c b/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/recipe/parent/tests/libhowdy.c new file mode 100644 index 0000000000000000000000000000000000000000..6cd0dc522a8e4485f8173321a3dff2b21f079415 --- /dev/null +++ b/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/recipe/parent/tests/libhowdy.c @@ -0,0 +1,5 @@ +#include + +void howdy(void) { + printf("Howdy Y'all!\n"); +} diff --git a/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/recipe/parent/tests/libhowdy.h b/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/recipe/parent/tests/libhowdy.h new file mode 100644 index 0000000000000000000000000000000000000000..6234950e5a3ce9ff0209513f328d0ecfc71bac99 --- /dev/null +++ b/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/recipe/parent/tests/libhowdy.h @@ -0,0 +1,6 @@ +#ifndef _LIBHOWDY_H +#define _LIBHOWDY_H + +extern void howdy(void); + +#endif diff --git a/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/recipe/parent/tests/tzdb-override.cpp b/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/recipe/parent/tests/tzdb-override.cpp new file mode 100644 index 0000000000000000000000000000000000000000..73284e6245e5774322d67924db2f0907e5a6d668 --- /dev/null +++ b/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/recipe/parent/tests/tzdb-override.cpp @@ -0,0 +1,29 @@ +// We are using a weak symbol in linux and windows using a patch +// while upstream only has the definition and no implementation. +// Check that overriding works. + +// adapted from upstream tests +// https://github.com/gcc-mirror/gcc/blob/releases/gcc-14.1.0/libstdc%2B%2B-v3/testsuite/std/time/tzdb/1.cc +// https://github.com/gcc-mirror/gcc/blob/releases/gcc-14.1.0/libstdc%2B%2B-v3/testsuite/std/time/tzdb/leap_seconds.cc + +#include +#include +#include + +static bool override_used = false; + +namespace __gnu_cxx +{ + const char* zoneinfo_dir_override() { + override_used = true; + return "./"; + } +} + +using namespace std::chrono; + +int main() +{ + auto &a = get_tzdb(); + return !override_used; +} diff --git a/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/recipe/parent/tests/tzdb.cpp b/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/recipe/parent/tests/tzdb.cpp new file mode 100644 index 0000000000000000000000000000000000000000..9ccf3f4d44cb32a75a7f9e0d4b8876e9d76693ca --- /dev/null +++ b/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/recipe/parent/tests/tzdb.cpp @@ -0,0 +1,95 @@ +// adapted from upstream tests +// https://github.com/gcc-mirror/gcc/blob/releases/gcc-14.1.0/libstdc%2B%2B-v3/testsuite/std/time/tzdb/1.cc +// https://github.com/gcc-mirror/gcc/blob/releases/gcc-14.1.0/libstdc%2B%2B-v3/testsuite/std/time/tzdb/leap_seconds.cc + +#include +#include +#include + +// https://github.com/gcc-mirror/gcc/blob/releases/gcc-14.1.0/libstdc%2B%2B-v3/testsuite/util/testsuite_hooks.h#L61-L70 +#define VERIFY(fn) \ + do \ + { \ + if (! (fn)) \ + { \ + __builtin_fprintf(stderr, \ + "%s:%d: %s: Assertion '%s' failed.\n", \ + __FILE__, __LINE__, __PRETTY_FUNCTION__, #fn); \ + __builtin_abort(); \ + } \ + } while (false) + + +using namespace std::chrono; + +void +test_version() +{ + const tzdb& db = get_tzdb(); + VERIFY( &db == &get_tzdb_list().front() ); + + const char* func; + try { + func = "remote_version"; + VERIFY( db.version == remote_version() ); + func = "reload_tzdb"; + const tzdb& reloaded = reload_tzdb(); + if (reloaded.version == db.version) + VERIFY( &reloaded == &db ); + } catch (const std::exception&) { + std::printf("std::chrono::%s() failed\n", func); + // on exception, we fail louder than the upstream reference test + exit(1); + } +} + +void +test_current() +{ + const tzdb& db = get_tzdb(); + const time_zone* tz = db.current_zone(); + VERIFY( tz == std::chrono::current_zone() ); +} + +void +test_locate() +{ + const tzdb& db = get_tzdb(); + const time_zone* tz = db.locate_zone("GMT"); + VERIFY( tz != nullptr ); + VERIFY( tz->name() == "Etc/GMT" ); + VERIFY( tz == std::chrono::locate_zone("GMT") ); + VERIFY( tz == db.locate_zone("Etc/GMT") ); + VERIFY( tz == db.locate_zone("Etc/GMT+0") ); + + VERIFY( db.locate_zone(db.current_zone()->name()) == db.current_zone() ); +} + +void +test_all_zones() +{ + const tzdb& db = get_tzdb(); + + for (const auto& zone : db.zones) + VERIFY( locate_zone(zone.name())->name() == zone.name() ); + + for (const auto& link : db.links) + VERIFY( locate_zone(link.name()) == locate_zone(link.target()) ); +} + +void +test_load_leapseconds() +{ + const auto& db = get_tzdb(); + + // this is correct as of tzdata 2024a + VERIFY( db.leap_seconds.size() == 27 ); +} + +int main() +{ + test_version(); + test_current(); + test_locate(); + test_load_leapseconds(); +} diff --git a/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/recipe/parent/uclibc.config b/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/recipe/parent/uclibc.config new file mode 100644 index 0000000000000000000000000000000000000000..1c51f52fd306d3a08ada254a04bb29b307ac7399 --- /dev/null +++ b/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/recipe/parent/uclibc.config @@ -0,0 +1,295 @@ +# +# Automatically generated make config: don't edit +# Version: 0.9.32-git +# Fri Jul 9 22:31:59 2010 +# +# TARGET_alpha is not set +TARGET_arm=y +# TARGET_avr32 is not set +# TARGET_bfin is not set +# TARGET_cris is not set +# TARGET_e1 is not set +# TARGET_frv is not set +# TARGET_h8300 is not set +# TARGET_hppa is not set +# TARGET_i386 is not set +# TARGET_i960 is not set +# TARGET_ia64 is not set +# TARGET_m68k is not set +# TARGET_microblaze is not set +# TARGET_mips is not set +# TARGET_nios is not set +# TARGET_nios2 is not set +# TARGET_powerpc is not set +# TARGET_sh is not set +# TARGET_sh64 is not set +# TARGET_sparc is not set +# TARGET_v850 is not set +# TARGET_vax is not set +# TARGET_x86_64 is not set +# TARGET_xtensa is not set +# TARGET_c6x is not set + +# CONFIG_GENERIC_ARM is not set +# CONFIG_ARM610 is not set +# CONFIG_ARM710 is not set +# CONFIG_ARM7TDMI is not set +# CONFIG_ARM720T is not set +# CONFIG_ARM920T is not set +# CONFIG_ARM922T is not set +# CONFIG_ARM926T is not set +# CONFIG_ARM10T is not set +CONFIG_ARM1136JF_S=y +# CONFIG_ARM1176JZ_S is not set +# CONFIG_ARM1176JZF_S is not set +# CONFIG_ARM_CORTEX_M3 is not set +# CONFIG_ARM_CORTEX_M1 is not set +# CONFIG_ARM_SA110 is not set +# CONFIG_ARM_SA1100 is not set +# CONFIG_ARM_XSCALE is not set +# CONFIG_ARM_IWMMXT is not set + +# COMPILE_IN_THUMB_MODE is not set +USE_BX=y + +TARGET_SUBARCH="" +# +# Target Architecture Features and Options +# +TARGET_ARCH="arm" +FORCE_OPTIONS_FOR_ARCH=y +# +# Using ELF file format +# +ARCH_LITTLE_ENDIAN=y +# ARCH_BIG_ENDIAN is not set +ARCH_WANTS_LITTLE_ENDIAN=y +# ARCH_WANTS_BIG_ENDIAN is not set +ARCH_HAS_MMU=y +ARCH_USE_MMU=y +UCLIBC_HAS_FLOATS=y +UCLIBC_HAS_FPU=n +DO_C99_MATH=y +# DO_XSI_MATH is not set +# UCLIBC_HAS_FENV is not set +UCLIBC_HAS_LONG_DOUBLE_MATH=y +HAVE_DOT_CONFIG=y + +# +# General Library Settings +# +# HAVE_NO_PIC is not set +DOPIC=y +# ARCH_HAS_NO_SHARED is not set +# ARCH_HAS_NO_LDSO is not set +HAVE_SHARED=y +# FORCE_SHAREABLE_TEXT_SEGMENTS is not set +LDSO_LDD_SUPPORT=y +# LDSO_CACHE_SUPPORT is not set +LDSO_PRELOAD_ENV_SUPPORT=y +# LDSO_PRELOAD_FILE_SUPPORT is not set +# LDSO_STANDALONE_SUPPORT is not set +# LDSO_PRELINK_SUPPORT is not set +# UCLIBC_STATIC_LDCONFIG is not set +LDSO_RUNPATH=y +LDSO_SEARCH_INTERP_PATH=y +LDSO_LD_LIBRARY_PATH=y +# LDSO_NO_CLEANUP is not set +UCLIBC_CTOR_DTOR=y +# LDSO_GNU_HASH_SUPPORT is not set +# HAS_NO_THREADS is not set +UCLIBC_HAS_SYSLOG=y +UCLIBC_HAS_LFS=y +# MALLOC is not set +# MALLOC_SIMPLE is not set +MALLOC_STANDARD=y +MALLOC_GLIBC_COMPAT=y +UCLIBC_DYNAMIC_ATEXIT=y +# COMPAT_ATEXIT is not set +UCLIBC_SUSV3_LEGACY=y +# UCLIBC_SUSV3_LEGACY_MACROS is not set +UCLIBC_SUSV4_LEGACY=y +# UCLIBC_STRICT_HEADERS is not set +# UCLIBC_HAS_STUBS is not set +UCLIBC_HAS_SHADOW=y +UCLIBC_HAS_PROGRAM_INVOCATION_NAME=y +UCLIBC_HAS___PROGNAME=y +UCLIBC_HAS_PTY=y +ASSUME_DEVPTS=y +UNIX98PTY_ONLY=y +UCLIBC_HAS_GETPT=y +UCLIBC_HAS_LIBUTIL=y +UCLIBC_HAS_TM_EXTENSIONS=y +UCLIBC_HAS_TZ_CACHING=y +UCLIBC_HAS_TZ_FILE=y +UCLIBC_HAS_TZ_FILE_READ_MANY=y +UCLIBC_TZ_FILE_PATH="/etc/TZ" +UCLIBC_FALLBACK_TO_ETC_LOCALTIME=y + +# +# Advanced Library Settings +# +UCLIBC_PWD_BUFFER_SIZE=256 +UCLIBC_GRP_BUFFER_SIZE=256 + +# +# Support various families of functions +# +UCLIBC_LINUX_MODULE_26=y +# UCLIBC_LINUX_MODULE_24 is not set +UCLIBC_LINUX_SPECIFIC=y +UCLIBC_HAS_GNU_ERROR=y +UCLIBC_BSD_SPECIFIC=y +UCLIBC_HAS_BSD_ERR=y +# UCLIBC_HAS_OBSOLETE_BSD_SIGNAL is not set +# UCLIBC_HAS_OBSOLETE_SYSV_SIGNAL is not set +# UCLIBC_NTP_LEGACY is not set +# UCLIBC_SV4_DEPRECATED is not set +UCLIBC_HAS_REALTIME=y +UCLIBC_HAS_ADVANCED_REALTIME=y +UCLIBC_HAS_EPOLL=y +UCLIBC_HAS_XATTR=y +UCLIBC_HAS_PROFILING=y +UCLIBC_HAS_CRYPT_IMPL=y +# UCLIBC_HAS_SHA256_CRYPT_IMPL is not set +# UCLIBC_HAS_SHA512_CRYPT_IMPL is not set +UCLIBC_HAS_CRYPT=y +UCLIBC_HAS_NETWORK_SUPPORT=y +UCLIBC_HAS_SOCKET=y +UCLIBC_HAS_IPV4=y +UCLIBC_HAS_IPV6=y +UCLIBC_HAS_RPC=n +UCLIBC_HAS_FULL_RPC=n +UCLIBC_HAS_REENTRANT_RPC=n +UCLIBC_USE_NETLINK=y +UCLIBC_SUPPORT_AI_ADDRCONFIG=y +# UCLIBC_HAS_BSD_RES_CLOSE is not set +UCLIBC_HAS_COMPAT_RES_STATE=y +# UCLIBC_HAS_EXTRA_COMPAT_RES_STATE is not set +UCLIBC_HAS_RESOLVER_SUPPORT=y +UCLIBC_HAS_LIBRESOLV_STUB=y +UCLIBC_HAS_LIBNSL_STUB=y + +# +# String and Stdio Support +# +# UCLIBC_HAS_STRING_GENERIC_OPT is not set +UCLIBC_HAS_STRING_ARCH_OPT=y +UCLIBC_HAS_CTYPE_TABLES=y +UCLIBC_HAS_CTYPE_SIGNED=y +# UCLIBC_HAS_CTYPE_UNSAFE is not set +UCLIBC_HAS_CTYPE_CHECKED=y +# UCLIBC_HAS_CTYPE_ENFORCED is not set +UCLIBC_HAS_WCHAR=y +UCLIBC_HAS_LOCALE=n +UCLIBC_HAS_HEXADECIMAL_FLOATS=y +# UCLIBC_HAS_GLIBC_DIGIT_GROUPING is not set +UCLIBC_HAS_GLIBC_CUSTOM_PRINTF=y +# USE_OLD_VFPRINTF is not set +UCLIBC_PRINTF_SCANF_POSITIONAL_ARGS=9 +UCLIBC_HAS_SCANF_GLIBC_A_FLAG=y +# UCLIBC_HAS_STDIO_BUFSIZ_NONE is not set +# UCLIBC_HAS_STDIO_BUFSIZ_256 is not set +# UCLIBC_HAS_STDIO_BUFSIZ_512 is not set +# UCLIBC_HAS_STDIO_BUFSIZ_1024 is not set +# UCLIBC_HAS_STDIO_BUFSIZ_2048 is not set +UCLIBC_HAS_STDIO_BUFSIZ_4096=y +# UCLIBC_HAS_STDIO_BUFSIZ_8192 is not set +UCLIBC_HAS_STDIO_BUILTIN_BUFFER_NONE=y +# UCLIBC_HAS_STDIO_BUILTIN_BUFFER_4 is not set +# UCLIBC_HAS_STDIO_BUILTIN_BUFFER_8 is not set +# UCLIBC_HAS_STDIO_SHUTDOWN_ON_ABORT is not set +# UCLIBC_HAS_STDIO_GETC_MACRO is not set +# UCLIBC_HAS_STDIO_PUTC_MACRO is not set +UCLIBC_HAS_STDIO_AUTO_RW_TRANSITION=y +# UCLIBC_HAS_FOPEN_LARGEFILE_MODE is not set +UCLIBC_HAS_FOPEN_EXCLUSIVE_MODE=y +# UCLIBC_HAS_FOPEN_CLOSEEXEC_MODE is not set +UCLIBC_HAS_GLIBC_CUSTOM_STREAMS=y +UCLIBC_HAS_PRINTF_M_SPEC=y +UCLIBC_HAS_ERRNO_MESSAGES=y +# UCLIBC_HAS_SYS_ERRLIST is not set +UCLIBC_HAS_SIGNUM_MESSAGES=y +# UCLIBC_HAS_SYS_SIGLIST is not set +UCLIBC_HAS_GNU_GETOPT=y +# UCLIBC_HAS_GNU_GETSUBOPT is not set + +# +# Big and Tall +# +UCLIBC_HAS_REGEX=y +# UCLIBC_HAS_REGEX_OLD is not set +UCLIBC_HAS_FNMATCH=y +# UCLIBC_HAS_FNMATCH_OLD is not set +# UCLIBC_HAS_WORDEXP is not set +UCLIBC_HAS_NFTW=y +UCLIBC_HAS_FTW=y +# UCLIBC_HAS_FTS is not set +UCLIBC_HAS_GLOB=y +UCLIBC_HAS_GNU_GLOB=y +UCLIBC_HAS_UTMPX=y + +# +# Library Installation Options +# +RUNTIME_PREFIX="/" +DEVEL_PREFIX="/usr/" +MULTILIB_DIR="lib" +HARDWIRED_ABSPATH=y + +# +# Security options +# +# UCLIBC_BUILD_PIE is not set +# UCLIBC_HAS_ARC4RANDOM is not set +# HAVE_NO_SSP is not set +UCLIBC_HAS_SSP=y +# UCLIBC_HAS_SSP_COMPAT is not set +# SSP_QUICK_CANARY is not set +PROPOLICE_BLOCK_ABRT=y +# PROPOLICE_BLOCK_SEGV is not set +# UCLIBC_BUILD_SSP is not set +UCLIBC_BUILD_RELRO=y +UCLIBC_BUILD_NOW=y +UCLIBC_BUILD_NOEXECSTACK=y + +# +# uClibc development/debugging options +# +UCLIBC_EXTRA_CFLAGS="" +# DODEBUG is not set +# DODEBUG_PT is not set +DOSTRIP=y +# DOASSERTS is not set +# SUPPORT_LD_DEBUG is not set +# SUPPORT_LD_DEBUG_EARLY is not set +# UCLIBC_MALLOC_DEBUGGING is not set +# UCLIBC_HAS_BACKTRACE is not set +WARNINGS="-Wall" +# EXTRA_WARNINGS is not set +# DOMULTI is not set +# UCLIBC_MJN3_ONLY is not set +# CONFIG_GENERIC_ARM is not set +# CONFIG_ARM610 is not set +# CONFIG_ARM710 is not set +# CONFIG_ARM7TDMI is not set +# CONFIG_ARM720T is not set +# CONFIG_ARM920T is not set +# CONFIG_ARM922T is not set +# CONFIG_ARM926T is not set +# CONFIG_ARM10T is not set +CONFIG_ARM1136JF_S=y +# CONFIG_ARM1176JZ_S is not set +# CONFIG_ARM1176JZF_S is not set +# CONFIG_ARM_SA110 is not set +# CONFIG_ARM_SA1100 is not set +# CONFIG_ARM_XSCALE is not set +# CONFIG_ARM_IWMMXT is not set +# CONFIG_ARM_OABI is not set +CONFIG_ARM_EABI=y +UCLIBC_HAS_THREADS=y +# LINUXTHREADS is not set +# LINUXTHREADS_NEW is not set +# LINUXTHREADS_OLD is not set +UCLIBC_HAS_THREADS_NATIVE=y +# PTHREADS_DEBUG_SUPPORT is not set diff --git a/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/recipe/parent/uclibc.config.minimal b/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/recipe/parent/uclibc.config.minimal new file mode 100644 index 0000000000000000000000000000000000000000..af041eabf04383938f4857a8ec85a6834b5c07b5 --- /dev/null +++ b/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/recipe/parent/uclibc.config.minimal @@ -0,0 +1,2 @@ +UCLIBC_HAS_STDIO_GETC_MACRO=n +UCLIBC_HAS_STDIO_PUTC_MACRO=n diff --git a/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/recipe/parent/yum_requirements.txt b/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/recipe/parent/yum_requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..1017f133398ac40e5408f2f480b14d422da8b632 --- /dev/null +++ b/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/recipe/parent/yum_requirements.txt @@ -0,0 +1,12 @@ +wget +m4 +help2man +patch +gcc-gfortran +gcc-c++ +rsync +sed +findutils +make +file +strace diff --git a/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/repodata_record.json b/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/repodata_record.json new file mode 100644 index 0000000000000000000000000000000000000000..eec4b9a1478e345ac7c7fe88d4ff59cc56252ae7 --- /dev/null +++ b/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/repodata_record.json @@ -0,0 +1,21 @@ +{ + "arch": "x86_64", + "build": "hc03a8fd_7", + "build_number": 7, + "channel": "https://repo.anaconda.com/pkgs/main/linux-64/", + "constrains": [], + "depends": [ + "libstdcxx 15.2.0 h39759b7_7" + ], + "fn": "libstdcxx-ng-15.2.0-hc03a8fd_7.conda", + "license": "GPL-3.0-only WITH GCC-exception-3.1", + "md5": "cf200522c0b13d64bf81035358d05f5b", + "name": "libstdcxx-ng", + "platform": "linux", + "sha256": "7a39becf3c7dd6016d4b6d24587071cda2afefcdf2886ad16572095261c87b90", + "size": 28429, + "subdir": "linux-64", + "timestamp": 1762772606000, + "url": "https://repo.anaconda.com/pkgs/main/linux-64/libstdcxx-ng-15.2.0-hc03a8fd_7.conda", + "version": "15.2.0" +} \ No newline at end of file diff --git a/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/run_exports.json b/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/run_exports.json new file mode 100644 index 0000000000000000000000000000000000000000..1ccafaaf172291e73c8e42a559777dd95354fa4a --- /dev/null +++ b/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/run_exports.json @@ -0,0 +1 @@ +{"strong": ["libstdcxx"]} \ No newline at end of file diff --git a/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/test/run_test.sh b/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/test/run_test.sh new file mode 100644 index 0000000000000000000000000000000000000000..4dd81228618db5d3ac73ba9bf5d4874d86ae2f16 --- /dev/null +++ b/miniconda3/pkgs/libstdcxx-ng-15.2.0-hc03a8fd_7/info/test/run_test.sh @@ -0,0 +1,8 @@ + + +set -ex + + + +echo "empty wrapper for compatibility with previous naming" +exit 0 diff --git a/miniconda3/pkgs/libunistring-1.3-hb25bd0a_0/include/unicase.h b/miniconda3/pkgs/libunistring-1.3-hb25bd0a_0/include/unicase.h new file mode 100644 index 0000000000000000000000000000000000000000..1f6ca99541c5b497dd3eba6b35277ef44d09ff9f --- /dev/null +++ b/miniconda3/pkgs/libunistring-1.3-hb25bd0a_0/include/unicase.h @@ -0,0 +1,472 @@ +/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ +/* Unicode character case mappings. + Copyright (C) 2002, 2009-2024 Free Software Foundation, Inc. + + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. + + This file is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +#ifndef _UNICASE_H +#define _UNICASE_H + +#include "unitypes.h" + +/* Get bool. */ +#include + +/* Get size_t. */ +#include + +/* Get uninorm_t. */ +#include "uninorm.h" + +#if 1 +# include +#else +# define LIBUNISTRING_DLL_VARIABLE +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +/* ========================================================================= */ + +/* Character case mappings. + These mappings are locale and context independent. + WARNING! These functions are not sufficient for languages such as German. + Better use the functions below that treat an entire string at once and are + language aware. */ + +/* Return the uppercase mapping of a Unicode character. */ +extern ucs4_t + uc_toupper (ucs4_t uc) + _UC_ATTRIBUTE_CONST; + +/* Return the lowercase mapping of a Unicode character. */ +extern ucs4_t + uc_tolower (ucs4_t uc) + _UC_ATTRIBUTE_CONST; + +/* Return the titlecase mapping of a Unicode character. */ +extern ucs4_t + uc_totitle (ucs4_t uc) + _UC_ATTRIBUTE_CONST; + +/* ========================================================================= */ + +/* String case mappings. */ + +/* These functions are locale dependent. The iso639_language argument + identifies the language (e.g. "tr" for Turkish). NULL means to use + locale independent case mappings. */ + +/* Return the ISO 639 language code of the current locale. + Return "" if it is unknown, or in the "C" locale. */ +extern const char * + uc_locale_language (void) + _UC_ATTRIBUTE_PURE; + +/* Conventions: + + All functions prefixed with u8_ operate on UTF-8 encoded strings. + Their unit is an uint8_t (1 byte). + + All functions prefixed with u16_ operate on UTF-16 encoded strings. + Their unit is an uint16_t (a 2-byte word). + + All functions prefixed with u32_ operate on UCS-4 encoded strings. + Their unit is an uint32_t (a 4-byte word). + + All argument pairs (s, n) denote a Unicode string s[0..n-1] with exactly + n units. + + Functions returning a string result take a (resultbuf, lengthp) argument + pair. If resultbuf is not NULL and the result fits into *lengthp units, + it is put in resultbuf, and resultbuf is returned. Otherwise, a freshly + allocated string is returned. In both cases, *lengthp is set to the + length (number of units) of the returned string. In case of error, + NULL is returned and errno is set. */ + +/* Return the uppercase mapping of a string. + The nf argument identifies the normalization form to apply after the + case-mapping. It can also be NULL, for no normalization. */ +extern uint8_t * + u8_toupper (const uint8_t *s, size_t n, const char *iso639_language, + uninorm_t nf, + uint8_t *_UC_RESTRICT resultbuf, size_t *lengthp); +extern uint16_t * + u16_toupper (const uint16_t *s, size_t n, const char *iso639_language, + uninorm_t nf, + uint16_t *_UC_RESTRICT resultbuf, size_t *lengthp); +extern uint32_t * + u32_toupper (const uint32_t *s, size_t n, const char *iso639_language, + uninorm_t nf, + uint32_t *_UC_RESTRICT resultbuf, size_t *lengthp); + +/* Return the lowercase mapping of a string. + The nf argument identifies the normalization form to apply after the + case-mapping. It can also be NULL, for no normalization. */ +extern uint8_t * + u8_tolower (const uint8_t *s, size_t n, const char *iso639_language, + uninorm_t nf, + uint8_t *_UC_RESTRICT resultbuf, size_t *lengthp); +extern uint16_t * + u16_tolower (const uint16_t *s, size_t n, const char *iso639_language, + uninorm_t nf, + uint16_t *_UC_RESTRICT resultbuf, size_t *lengthp); +extern uint32_t * + u32_tolower (const uint32_t *s, size_t n, const char *iso639_language, + uninorm_t nf, + uint32_t *_UC_RESTRICT resultbuf, size_t *lengthp); + +/* Return the titlecase mapping of a string. + The nf argument identifies the normalization form to apply after the + case-mapping. It can also be NULL, for no normalization. */ +extern uint8_t * + u8_totitle (const uint8_t *s, size_t n, const char *iso639_language, + uninorm_t nf, + uint8_t *_UC_RESTRICT resultbuf, size_t *lengthp); +extern uint16_t * + u16_totitle (const uint16_t *s, size_t n, const char *iso639_language, + uninorm_t nf, + uint16_t *_UC_RESTRICT resultbuf, size_t *lengthp); +extern uint32_t * + u32_totitle (const uint32_t *s, size_t n, const char *iso639_language, + uninorm_t nf, + uint32_t *_UC_RESTRICT resultbuf, size_t *lengthp); + +/* The case-mapping context given by a prefix string. */ +typedef struct casing_prefix_context + { + /* These fields are private, undocumented. */ + uint32_t last_char_except_ignorable; + uint32_t last_char_normal_or_above; + } + casing_prefix_context_t; +/* The case-mapping context of the empty prefix string. */ +extern LIBUNISTRING_DLL_VARIABLE const casing_prefix_context_t unicase_empty_prefix_context; +/* Return the case-mapping context of a given prefix string. */ +extern casing_prefix_context_t + u8_casing_prefix_context (const uint8_t *s, size_t n); +extern casing_prefix_context_t + u16_casing_prefix_context (const uint16_t *s, size_t n); +extern casing_prefix_context_t + u32_casing_prefix_context (const uint32_t *s, size_t n); +/* Return the case-mapping context of the prefix concat(A, S), given the + case-mapping context of the prefix A. */ +extern casing_prefix_context_t + u8_casing_prefixes_context (const uint8_t *s, size_t n, + casing_prefix_context_t a_context); +extern casing_prefix_context_t + u16_casing_prefixes_context (const uint16_t *s, size_t n, + casing_prefix_context_t a_context); +extern casing_prefix_context_t + u32_casing_prefixes_context (const uint32_t *s, size_t n, + casing_prefix_context_t a_context); + +/* The case-mapping context given by a suffix string. */ +typedef struct casing_suffix_context + { + /* These fields are private, undocumented. */ + uint32_t first_char_except_ignorable; + uint32_t bits; + } + casing_suffix_context_t; +/* The case-mapping context of the empty suffix string. */ +extern LIBUNISTRING_DLL_VARIABLE const casing_suffix_context_t unicase_empty_suffix_context; +/* Return the case-mapping context of a given suffix string. */ +extern casing_suffix_context_t + u8_casing_suffix_context (const uint8_t *s, size_t n); +extern casing_suffix_context_t + u16_casing_suffix_context (const uint16_t *s, size_t n); +extern casing_suffix_context_t + u32_casing_suffix_context (const uint32_t *s, size_t n); +/* Return the case-mapping context of the suffix concat(S, A), given the + case-mapping context of the suffix A. */ +extern casing_suffix_context_t + u8_casing_suffixes_context (const uint8_t *s, size_t n, + casing_suffix_context_t a_context); +extern casing_suffix_context_t + u16_casing_suffixes_context (const uint16_t *s, size_t n, + casing_suffix_context_t a_context); +extern casing_suffix_context_t + u32_casing_suffixes_context (const uint32_t *s, size_t n, + casing_suffix_context_t a_context); + +/* Return the uppercase mapping of a string that is surrounded by a prefix + and a suffix. */ +extern uint8_t * + u8_ct_toupper (const uint8_t *s, size_t n, + casing_prefix_context_t prefix_context, + casing_suffix_context_t suffix_context, + const char *iso639_language, + uninorm_t nf, + uint8_t *_UC_RESTRICT resultbuf, size_t *lengthp); +extern uint16_t * + u16_ct_toupper (const uint16_t *s, size_t n, + casing_prefix_context_t prefix_context, + casing_suffix_context_t suffix_context, + const char *iso639_language, + uninorm_t nf, + uint16_t *_UC_RESTRICT resultbuf, size_t *lengthp); +extern uint32_t * + u32_ct_toupper (const uint32_t *s, size_t n, + casing_prefix_context_t prefix_context, + casing_suffix_context_t suffix_context, + const char *iso639_language, + uninorm_t nf, + uint32_t *_UC_RESTRICT resultbuf, size_t *lengthp); + +/* Return the lowercase mapping of a string that is surrounded by a prefix + and a suffix. */ +extern uint8_t * + u8_ct_tolower (const uint8_t *s, size_t n, + casing_prefix_context_t prefix_context, + casing_suffix_context_t suffix_context, + const char *iso639_language, + uninorm_t nf, + uint8_t *_UC_RESTRICT resultbuf, size_t *lengthp); +extern uint16_t * + u16_ct_tolower (const uint16_t *s, size_t n, + casing_prefix_context_t prefix_context, + casing_suffix_context_t suffix_context, + const char *iso639_language, + uninorm_t nf, + uint16_t *_UC_RESTRICT resultbuf, size_t *lengthp); +extern uint32_t * + u32_ct_tolower (const uint32_t *s, size_t n, + casing_prefix_context_t prefix_context, + casing_suffix_context_t suffix_context, + const char *iso639_language, + uninorm_t nf, + uint32_t *_UC_RESTRICT resultbuf, size_t *lengthp); + +/* Return the titlecase mapping of a string that is surrounded by a prefix + and a suffix. */ +extern uint8_t * + u8_ct_totitle (const uint8_t *s, size_t n, + casing_prefix_context_t prefix_context, + casing_suffix_context_t suffix_context, + const char *iso639_language, + uninorm_t nf, + uint8_t *_UC_RESTRICT resultbuf, size_t *lengthp); +extern uint16_t * + u16_ct_totitle (const uint16_t *s, size_t n, + casing_prefix_context_t prefix_context, + casing_suffix_context_t suffix_context, + const char *iso639_language, + uninorm_t nf, + uint16_t *_UC_RESTRICT resultbuf, size_t *lengthp); +extern uint32_t * + u32_ct_totitle (const uint32_t *s, size_t n, + casing_prefix_context_t prefix_context, + casing_suffix_context_t suffix_context, + const char *iso639_language, + uninorm_t nf, + uint32_t *_UC_RESTRICT resultbuf, size_t *lengthp); + +/* Return the case folded string. + Comparing uN_casefold (S1) and uN_casefold (S2) with uN_cmp2() is equivalent + to comparing S1 and S2 with uN_casecmp(). + The nf argument identifies the normalization form to apply after the + case-mapping. It can also be NULL, for no normalization. */ +extern uint8_t * + u8_casefold (const uint8_t *s, size_t n, const char *iso639_language, + uninorm_t nf, + uint8_t *_UC_RESTRICT resultbuf, size_t *lengthp); +extern uint16_t * + u16_casefold (const uint16_t *s, size_t n, const char *iso639_language, + uninorm_t nf, + uint16_t *_UC_RESTRICT resultbuf, size_t *lengthp); +extern uint32_t * + u32_casefold (const uint32_t *s, size_t n, const char *iso639_language, + uninorm_t nf, + uint32_t *_UC_RESTRICT resultbuf, size_t *lengthp); +/* Likewise, for a string that is surrounded by a prefix and a suffix. */ +extern uint8_t * + u8_ct_casefold (const uint8_t *s, size_t n, + casing_prefix_context_t prefix_context, + casing_suffix_context_t suffix_context, + const char *iso639_language, + uninorm_t nf, + uint8_t *_UC_RESTRICT resultbuf, size_t *lengthp); +extern uint16_t * + u16_ct_casefold (const uint16_t *s, size_t n, + casing_prefix_context_t prefix_context, + casing_suffix_context_t suffix_context, + const char *iso639_language, + uninorm_t nf, + uint16_t *_UC_RESTRICT resultbuf, size_t *lengthp); +extern uint32_t * + u32_ct_casefold (const uint32_t *s, size_t n, + casing_prefix_context_t prefix_context, + casing_suffix_context_t suffix_context, + const char *iso639_language, + uninorm_t nf, + uint32_t *_UC_RESTRICT resultbuf, size_t *lengthp); + +/* Compare S1 and S2, ignoring differences in case and normalization. + The nf argument identifies the normalization form to apply after the + case-mapping. It can also be NULL, for no normalization. + If successful, set *RESULTP to -1 if S1 < S2, 0 if S1 = S2, 1 if S1 > S2, and + return 0. Upon failure, return -1 with errno set. */ +extern int + u8_casecmp (const uint8_t *s1, size_t n1, + const uint8_t *s2, size_t n2, + const char *iso639_language, uninorm_t nf, int *resultp); +extern int + u16_casecmp (const uint16_t *s1, size_t n1, + const uint16_t *s2, size_t n2, + const char *iso639_language, uninorm_t nf, int *resultp); +extern int + u32_casecmp (const uint32_t *s1, size_t n1, + const uint32_t *s2, size_t n2, + const char *iso639_language, uninorm_t nf, int *resultp); +extern int + ulc_casecmp (const char *s1, size_t n1, + const char *s2, size_t n2, + const char *iso639_language, uninorm_t nf, int *resultp); + +/* Convert the string S of length N to a NUL-terminated byte sequence, in such + a way that comparing uN_casexfrm (S1) and uN_casexfrm (S2) with the gnulib + function memcmp2() is equivalent to comparing S1 and S2 with uN_casecoll(). + NF must be either UNINORM_NFC, UNINORM_NFKC, or NULL for no normalization. */ +extern char * + u8_casexfrm (const uint8_t *s, size_t n, const char *iso639_language, + uninorm_t nf, + char *_UC_RESTRICT resultbuf, size_t *lengthp); +extern char * + u16_casexfrm (const uint16_t *s, size_t n, const char *iso639_language, + uninorm_t nf, + char *_UC_RESTRICT resultbuf, size_t *lengthp); +extern char * + u32_casexfrm (const uint32_t *s, size_t n, const char *iso639_language, + uninorm_t nf, + char *_UC_RESTRICT resultbuf, size_t *lengthp); +extern char * + ulc_casexfrm (const char *s, size_t n, const char *iso639_language, + uninorm_t nf, + char *_UC_RESTRICT resultbuf, size_t *lengthp); + +/* Compare S1 and S2, ignoring differences in case and normalization, using the + collation rules of the current locale. + The nf argument identifies the normalization form to apply after the + case-mapping. It must be either UNINORM_NFC or UNINORM_NFKC. It can also + be NULL, for no normalization. + If successful, set *RESULTP to -1 if S1 < S2, 0 if S1 = S2, 1 if S1 > S2, and + return 0. Upon failure, return -1 with errno set. */ +extern int + u8_casecoll (const uint8_t *s1, size_t n1, + const uint8_t *s2, size_t n2, + const char *iso639_language, uninorm_t nf, int *resultp); +extern int + u16_casecoll (const uint16_t *s1, size_t n1, + const uint16_t *s2, size_t n2, + const char *iso639_language, uninorm_t nf, int *resultp); +extern int + u32_casecoll (const uint32_t *s1, size_t n1, + const uint32_t *s2, size_t n2, + const char *iso639_language, uninorm_t nf, int *resultp); +extern int + ulc_casecoll (const char *s1, size_t n1, + const char *s2, size_t n2, + const char *iso639_language, uninorm_t nf, int *resultp); + + +/* Set *RESULTP to true if mapping NFD(S) to upper case is a no-op, or to false + otherwise, and return 0. Upon failure, return -1 with errno set. */ +extern int + u8_is_uppercase (const uint8_t *s, size_t n, + const char *iso639_language, + bool *resultp); +extern int + u16_is_uppercase (const uint16_t *s, size_t n, + const char *iso639_language, + bool *resultp); +extern int + u32_is_uppercase (const uint32_t *s, size_t n, + const char *iso639_language, + bool *resultp); + +/* Set *RESULTP to true if mapping NFD(S) to lower case is a no-op, or to false + otherwise, and return 0. Upon failure, return -1 with errno set. */ +extern int + u8_is_lowercase (const uint8_t *s, size_t n, + const char *iso639_language, + bool *resultp); +extern int + u16_is_lowercase (const uint16_t *s, size_t n, + const char *iso639_language, + bool *resultp); +extern int + u32_is_lowercase (const uint32_t *s, size_t n, + const char *iso639_language, + bool *resultp); + +/* Set *RESULTP to true if mapping NFD(S) to title case is a no-op, or to false + otherwise, and return 0. Upon failure, return -1 with errno set. */ +extern int + u8_is_titlecase (const uint8_t *s, size_t n, + const char *iso639_language, + bool *resultp); +extern int + u16_is_titlecase (const uint16_t *s, size_t n, + const char *iso639_language, + bool *resultp); +extern int + u32_is_titlecase (const uint32_t *s, size_t n, + const char *iso639_language, + bool *resultp); + +/* Set *RESULTP to true if applying case folding to NFD(S) is a no-op, or to + false otherwise, and return 0. Upon failure, return -1 with errno set. */ +extern int + u8_is_casefolded (const uint8_t *s, size_t n, + const char *iso639_language, + bool *resultp); +extern int + u16_is_casefolded (const uint16_t *s, size_t n, + const char *iso639_language, + bool *resultp); +extern int + u32_is_casefolded (const uint32_t *s, size_t n, + const char *iso639_language, + bool *resultp); + +/* Set *RESULTP to true if case matters for S, that is, if mapping NFD(S) to + either upper case or lower case or title case is not a no-op. + Set *RESULTP to false if NFD(S) maps to itself under the upper case mapping, + under the lower case mapping, and under the title case mapping; in other + words, when NFD(S) consists entirely of caseless characters. + Upon failure, return -1 with errno set. */ +extern int + u8_is_cased (const uint8_t *s, size_t n, + const char *iso639_language, + bool *resultp); +extern int + u16_is_cased (const uint16_t *s, size_t n, + const char *iso639_language, + bool *resultp); +extern int + u32_is_cased (const uint32_t *s, size_t n, + const char *iso639_language, + bool *resultp); + + +/* ========================================================================= */ + +#ifdef __cplusplus +} +#endif + +#endif /* _UNICASE_H */ diff --git a/miniconda3/pkgs/libunistring-1.3-hb25bd0a_0/include/uniconv.h b/miniconda3/pkgs/libunistring-1.3-hb25bd0a_0/include/uniconv.h new file mode 100644 index 0000000000000000000000000000000000000000..c83325bfd2bed6110a251b22e99bd74f81b47c57 --- /dev/null +++ b/miniconda3/pkgs/libunistring-1.3-hb25bd0a_0/include/uniconv.h @@ -0,0 +1,170 @@ +/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ +/* Conversions between Unicode and legacy encodings. + Copyright (C) 2002, 2005, 2007, 2009-2024 Free Software Foundation, Inc. + + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. + + This file is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +#ifndef _UNICONV_H +#define _UNICONV_H + +/* Get size_t. */ +#include + +#include "unitypes.h" + +/* Get enum iconv_ilseq_handler. */ +#include + +/* Get locale_charset() declaration. */ +#include + + +#ifdef __cplusplus +extern "C" { +#endif + + +/* Converts an entire string, possibly including NUL bytes, from one encoding + to a Unicode encoding. + Converts a memory region given in encoding FROMCODE. FROMCODE is as for + iconv_open(3). + The input is in the memory region between SRC (inclusive) and SRC + SRCLEN + (exclusive). + If OFFSETS is not NULL, it should point to an array of SRCLEN integers; this + array is filled with offsets into the result, i.e. the character starting + at SRC[i] corresponds to the character starting at (*RESULTP)[OFFSETS[i]], + and other offsets are set to (size_t)(-1). + RESULTBUF and *LENGTHP should initially be a scratch buffer and its size, + or *RESULTBUF can be NULL. + May erase the contents of the memory at RESULTBUF. + If successful: The resulting Unicode string (non-NULL) is returned and its + length stored in *LENGTHP. The resulting string is RESULTBUF if no dynamic + memory allocation was necessary, or a freshly allocated memory block + otherwise. + In case of error: NULL is returned and errno is set. Particular errno + values: EINVAL, EILSEQ, ENOMEM. */ +extern uint8_t * + u8_conv_from_encoding (const char *fromcode, + enum iconv_ilseq_handler handler, + const char *src, size_t srclen, + size_t *offsets, + uint8_t *resultbuf, size_t *lengthp); +extern uint16_t * + u16_conv_from_encoding (const char *fromcode, + enum iconv_ilseq_handler handler, + const char *src, size_t srclen, + size_t *offsets, + uint16_t *resultbuf, size_t *lengthp); +extern uint32_t * + u32_conv_from_encoding (const char *fromcode, + enum iconv_ilseq_handler handler, + const char *src, size_t srclen, + size_t *offsets, + uint32_t *resultbuf, size_t *lengthp); + +/* Converts an entire Unicode string, possibly including NUL units, from a + Unicode encoding to a given encoding. + Converts a memory region to encoding TOCODE. TOCODE is as for + iconv_open(3). + The input is in the memory region between SRC (inclusive) and SRC + SRCLEN + (exclusive). + If OFFSETS is not NULL, it should point to an array of SRCLEN integers; this + array is filled with offsets into the result, i.e. the character starting + at SRC[i] corresponds to the character starting at (*RESULTP)[OFFSETS[i]], + and other offsets are set to (size_t)(-1). + RESULTBUF and *LENGTHP should initially be a scratch buffer and its size, + or RESULTBUF can be NULL. + May erase the contents of the memory at RESULTBUF. + If successful: The resulting string (non-NULL) is returned and its length + stored in *LENGTHP. The resulting string is RESULTBUF if no dynamic memory + allocation was necessary, or a freshly allocated memory block otherwise. + In case of error: NULL is returned and errno is set. Particular errno + values: EINVAL, EILSEQ, ENOMEM. */ +extern char * + u8_conv_to_encoding (const char *tocode, + enum iconv_ilseq_handler handler, + const uint8_t *src, size_t srclen, + size_t *offsets, + char *_UC_RESTRICT resultbuf, size_t *lengthp); +extern char * + u16_conv_to_encoding (const char *tocode, + enum iconv_ilseq_handler handler, + const uint16_t *src, size_t srclen, + size_t *offsets, + char *_UC_RESTRICT resultbuf, size_t *lengthp); +extern char * + u32_conv_to_encoding (const char *tocode, + enum iconv_ilseq_handler handler, + const uint32_t *src, size_t srclen, + size_t *offsets, + char *_UC_RESTRICT resultbuf, size_t *lengthp); + +/* Converts a NUL terminated string from a given encoding. + The result is malloc allocated, or NULL (with errno set) in case of error. + Particular errno values: EILSEQ, ENOMEM. */ +extern uint8_t * + u8_strconv_from_encoding (const char *string, + const char *fromcode, + enum iconv_ilseq_handler handler); +extern uint16_t * + u16_strconv_from_encoding (const char *string, + const char *fromcode, + enum iconv_ilseq_handler handler); +extern uint32_t * + u32_strconv_from_encoding (const char *string, + const char *fromcode, + enum iconv_ilseq_handler handler); + +/* Converts a NUL terminated string to a given encoding. + The result is malloc allocated, or NULL (with errno set) in case of error. + Particular errno values: EILSEQ, ENOMEM. */ +extern char * + u8_strconv_to_encoding (const uint8_t *string, + const char *tocode, + enum iconv_ilseq_handler handler); +extern char * + u16_strconv_to_encoding (const uint16_t *string, + const char *tocode, + enum iconv_ilseq_handler handler); +extern char * + u32_strconv_to_encoding (const uint32_t *string, + const char *tocode, + enum iconv_ilseq_handler handler); + +/* Converts a NUL terminated string from the locale encoding. + The result is malloc allocated, or NULL (with errno set) in case of error. + Particular errno values: ENOMEM. */ +extern uint8_t * + u8_strconv_from_locale (const char *string); +extern uint16_t * + u16_strconv_from_locale (const char *string); +extern uint32_t * + u32_strconv_from_locale (const char *string); + +/* Converts a NUL terminated string to the locale encoding. + The result is malloc allocated, or NULL (with errno set) in case of error. + Particular errno values: ENOMEM. */ +extern char * + u8_strconv_to_locale (const uint8_t *string); +extern char * + u16_strconv_to_locale (const uint16_t *string); +extern char * + u32_strconv_to_locale (const uint32_t *string); + + +#ifdef __cplusplus +} +#endif + +#endif /* _UNICONV_H */ diff --git a/miniconda3/pkgs/libunistring-1.3-hb25bd0a_0/include/unictype.h b/miniconda3/pkgs/libunistring-1.3-hb25bd0a_0/include/unictype.h new file mode 100644 index 0000000000000000000000000000000000000000..94cbcf80bc2c78e7e721e531b88277465acb8244 --- /dev/null +++ b/miniconda3/pkgs/libunistring-1.3-hb25bd0a_0/include/unictype.h @@ -0,0 +1,1147 @@ +/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ +/* Unicode character classification and properties. + Copyright (C) 2002, 2005-2024 Free Software Foundation, Inc. + + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. + + This file is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +#ifndef _UNICTYPE_H +#define _UNICTYPE_H + +#include "unitypes.h" + +/* Get bool. */ +#include + +/* Get size_t. */ +#include + +#if 1 +# include +#else +# define LIBUNISTRING_DLL_VARIABLE +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +/* ========================================================================= */ + +/* Field 1 of Unicode Character Database: Character name. + See "uniname.h". */ + +/* ========================================================================= */ + +/* Field 2 of Unicode Character Database: General category. */ + +/* Data type denoting a General category value. This is not just a bitmask, + but rather a bitmask and a pointer to the lookup table, so that programs + that use only the predefined bitmasks (i.e. don't combine bitmasks with & + and |) don't have a link-time dependency towards the big general table. */ +typedef struct +{ + uint32_t bitmask : 31; + /*bool*/ unsigned int generic : 1; + union + { + const void *table; /* when generic is 0 */ + bool (*lookup_fn) (ucs4_t uc, uint32_t bitmask); /* when generic is 1 */ + } lookup; +} +uc_general_category_t; + +/* Bits and bit masks denoting General category values. UnicodeData-3.2.0.html + says a 32-bit integer will always suffice to represent them. + These bit masks can only be used with the uc_is_general_category_withtable + function. */ +enum +{ + UC_CATEGORY_MASK_L = 0x0000001f, + UC_CATEGORY_MASK_LC = 0x00000007, + UC_CATEGORY_MASK_Lu = 0x00000001, + UC_CATEGORY_MASK_Ll = 0x00000002, + UC_CATEGORY_MASK_Lt = 0x00000004, + UC_CATEGORY_MASK_Lm = 0x00000008, + UC_CATEGORY_MASK_Lo = 0x00000010, + UC_CATEGORY_MASK_M = 0x000000e0, + UC_CATEGORY_MASK_Mn = 0x00000020, + UC_CATEGORY_MASK_Mc = 0x00000040, + UC_CATEGORY_MASK_Me = 0x00000080, + UC_CATEGORY_MASK_N = 0x00000700, + UC_CATEGORY_MASK_Nd = 0x00000100, + UC_CATEGORY_MASK_Nl = 0x00000200, + UC_CATEGORY_MASK_No = 0x00000400, + UC_CATEGORY_MASK_P = 0x0003f800, + UC_CATEGORY_MASK_Pc = 0x00000800, + UC_CATEGORY_MASK_Pd = 0x00001000, + UC_CATEGORY_MASK_Ps = 0x00002000, + UC_CATEGORY_MASK_Pe = 0x00004000, + UC_CATEGORY_MASK_Pi = 0x00008000, + UC_CATEGORY_MASK_Pf = 0x00010000, + UC_CATEGORY_MASK_Po = 0x00020000, + UC_CATEGORY_MASK_S = 0x003c0000, + UC_CATEGORY_MASK_Sm = 0x00040000, + UC_CATEGORY_MASK_Sc = 0x00080000, + UC_CATEGORY_MASK_Sk = 0x00100000, + UC_CATEGORY_MASK_So = 0x00200000, + UC_CATEGORY_MASK_Z = 0x01c00000, + UC_CATEGORY_MASK_Zs = 0x00400000, + UC_CATEGORY_MASK_Zl = 0x00800000, + UC_CATEGORY_MASK_Zp = 0x01000000, + UC_CATEGORY_MASK_C = 0x3e000000, + UC_CATEGORY_MASK_Cc = 0x02000000, + UC_CATEGORY_MASK_Cf = 0x04000000, + UC_CATEGORY_MASK_Cs = 0x08000000, + UC_CATEGORY_MASK_Co = 0x10000000, + UC_CATEGORY_MASK_Cn = 0x20000000 +}; + +/* Predefined General category values. */ +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_L; +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_LC; +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Lu; +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Ll; +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Lt; +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Lm; +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Lo; +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_M; +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Mn; +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Mc; +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Me; +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_N; +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Nd; +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Nl; +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_No; +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_P; +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Pc; +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Pd; +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Ps; +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Pe; +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Pi; +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Pf; +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Po; +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_S; +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Sm; +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Sc; +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Sk; +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_So; +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Z; +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Zs; +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Zl; +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Zp; +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_C; +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Cc; +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Cf; +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Cs; +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Co; +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Cn; +/* Non-public. */ +extern const uc_general_category_t _UC_CATEGORY_NONE; + +/* Alias names for predefined General category values. */ +#define UC_LETTER UC_CATEGORY_L +#define UC_CASED_LETTER UC_CATEGORY_LC +#define UC_UPPERCASE_LETTER UC_CATEGORY_Lu +#define UC_LOWERCASE_LETTER UC_CATEGORY_Ll +#define UC_TITLECASE_LETTER UC_CATEGORY_Lt +#define UC_MODIFIER_LETTER UC_CATEGORY_Lm +#define UC_OTHER_LETTER UC_CATEGORY_Lo +#define UC_MARK UC_CATEGORY_M +#define UC_NON_SPACING_MARK UC_CATEGORY_Mn +#define UC_COMBINING_SPACING_MARK UC_CATEGORY_Mc +#define UC_ENCLOSING_MARK UC_CATEGORY_Me +#define UC_NUMBER UC_CATEGORY_N +#define UC_DECIMAL_DIGIT_NUMBER UC_CATEGORY_Nd +#define UC_LETTER_NUMBER UC_CATEGORY_Nl +#define UC_OTHER_NUMBER UC_CATEGORY_No +#define UC_PUNCTUATION UC_CATEGORY_P +#define UC_CONNECTOR_PUNCTUATION UC_CATEGORY_Pc +#define UC_DASH_PUNCTUATION UC_CATEGORY_Pd +#define UC_OPEN_PUNCTUATION UC_CATEGORY_Ps /* a.k.a. UC_START_PUNCTUATION */ +#define UC_CLOSE_PUNCTUATION UC_CATEGORY_Pe /* a.k.a. UC_END_PUNCTUATION */ +#define UC_INITIAL_QUOTE_PUNCTUATION UC_CATEGORY_Pi +#define UC_FINAL_QUOTE_PUNCTUATION UC_CATEGORY_Pf +#define UC_OTHER_PUNCTUATION UC_CATEGORY_Po +#define UC_SYMBOL UC_CATEGORY_S +#define UC_MATH_SYMBOL UC_CATEGORY_Sm +#define UC_CURRENCY_SYMBOL UC_CATEGORY_Sc +#define UC_MODIFIER_SYMBOL UC_CATEGORY_Sk +#define UC_OTHER_SYMBOL UC_CATEGORY_So +#define UC_SEPARATOR UC_CATEGORY_Z +#define UC_SPACE_SEPARATOR UC_CATEGORY_Zs +#define UC_LINE_SEPARATOR UC_CATEGORY_Zl +#define UC_PARAGRAPH_SEPARATOR UC_CATEGORY_Zp +#define UC_OTHER UC_CATEGORY_C +#define UC_CONTROL UC_CATEGORY_Cc +#define UC_FORMAT UC_CATEGORY_Cf +#define UC_SURROGATE UC_CATEGORY_Cs /* all of them are invalid characters */ +#define UC_PRIVATE_USE UC_CATEGORY_Co +#define UC_UNASSIGNED UC_CATEGORY_Cn /* some of them are invalid characters */ + +/* Return the union of two general categories. + This corresponds to the unions of the two sets of characters. */ +extern uc_general_category_t + uc_general_category_or (uc_general_category_t category1, + uc_general_category_t category2); + +/* Return the intersection of two general categories as bit masks. + This *does*not* correspond to the intersection of the two sets of + characters. */ +extern uc_general_category_t + uc_general_category_and (uc_general_category_t category1, + uc_general_category_t category2); + +/* Return the intersection of a general category with the complement of a + second general category, as bit masks. + This *does*not* correspond to the intersection with complement, when + viewing the categories as sets of characters. */ +extern uc_general_category_t + uc_general_category_and_not (uc_general_category_t category1, + uc_general_category_t category2); + +/* Return the name of a general category. */ +extern const char * + uc_general_category_name (uc_general_category_t category) + _UC_ATTRIBUTE_PURE; + +/* Return the long name of a general category. */ +extern const char * + uc_general_category_long_name (uc_general_category_t category) + _UC_ATTRIBUTE_PURE; + +/* Return the general category given by name, e.g. "Lu", or by long name, + e.g. "Uppercase Letter". */ +extern uc_general_category_t + uc_general_category_byname (const char *category_name) + _UC_ATTRIBUTE_PURE; + +/* Return the general category of a Unicode character. */ +extern uc_general_category_t + uc_general_category (ucs4_t uc) + _UC_ATTRIBUTE_PURE; + +/* Test whether a Unicode character belongs to a given category. + The CATEGORY argument can be the combination of several predefined + general categories. */ +extern bool + uc_is_general_category (ucs4_t uc, uc_general_category_t category) + _UC_ATTRIBUTE_PURE; +/* Likewise. This function uses a big table comprising all categories. */ +extern bool + uc_is_general_category_withtable (ucs4_t uc, uint32_t bitmask) + _UC_ATTRIBUTE_CONST; + +/* ========================================================================= */ + +/* Field 3 of Unicode Character Database: Canonical combining class. */ + +/* The possible results of uc_combining_class (0..255) are described in + UCD.html. The list here is not definitive; more values can be added + in future versions. */ +enum +{ + UC_CCC_NR = 0, /* Not Reordered */ + UC_CCC_OV = 1, /* Overlay */ + UC_CCC_NK = 7, /* Nukta */ + UC_CCC_KV = 8, /* Kana Voicing */ + UC_CCC_VR = 9, /* Virama */ + UC_CCC_ATBL = 200, /* Attached Below Left */ + UC_CCC_ATB = 202, /* Attached Below */ + UC_CCC_ATA = 214, /* Attached Above */ + UC_CCC_ATAR = 216, /* Attached Above Right */ + UC_CCC_BL = 218, /* Below Left */ + UC_CCC_B = 220, /* Below */ + UC_CCC_BR = 222, /* Below Right */ + UC_CCC_L = 224, /* Left */ + UC_CCC_R = 226, /* Right */ + UC_CCC_AL = 228, /* Above Left */ + UC_CCC_A = 230, /* Above */ + UC_CCC_AR = 232, /* Above Right */ + UC_CCC_DB = 233, /* Double Below */ + UC_CCC_DA = 234, /* Double Above */ + UC_CCC_IS = 240 /* Iota Subscript */ +}; + +/* Return the canonical combining class of a Unicode character. */ +extern int + uc_combining_class (ucs4_t uc) + _UC_ATTRIBUTE_CONST; + +/* Return the name of a canonical combining class. */ +extern const char * + uc_combining_class_name (int ccc) + _UC_ATTRIBUTE_CONST; + +/* Return the long name of a canonical combining class. */ +extern const char * + uc_combining_class_long_name (int ccc) + _UC_ATTRIBUTE_CONST; + +/* Return the canonical combining class given by name, e.g. "BL", or by long + name, e.g. "Below Left". */ +extern int + uc_combining_class_byname (const char *ccc_name) + _UC_ATTRIBUTE_PURE; + +/* ========================================================================= */ + +/* Field 4 of Unicode Character Database: Bidi class. + Before Unicode 4.0, this field was called "Bidirectional category". */ + +enum +{ + UC_BIDI_L, /* Left-to-Right */ + UC_BIDI_LRE, /* Left-to-Right Embedding */ + UC_BIDI_LRO, /* Left-to-Right Override */ + UC_BIDI_R, /* Right-to-Left */ + UC_BIDI_AL, /* Right-to-Left Arabic */ + UC_BIDI_RLE, /* Right-to-Left Embedding */ + UC_BIDI_RLO, /* Right-to-Left Override */ + UC_BIDI_PDF, /* Pop Directional Format */ + UC_BIDI_EN, /* European Number */ + UC_BIDI_ES, /* European Number Separator */ + UC_BIDI_ET, /* European Number Terminator */ + UC_BIDI_AN, /* Arabic Number */ + UC_BIDI_CS, /* Common Number Separator */ + UC_BIDI_NSM, /* Non-Spacing Mark */ + UC_BIDI_BN, /* Boundary Neutral */ + UC_BIDI_B, /* Paragraph Separator */ + UC_BIDI_S, /* Segment Separator */ + UC_BIDI_WS, /* Whitespace */ + UC_BIDI_ON, /* Other Neutral */ + UC_BIDI_LRI, /* Left-to-Right Isolate */ + UC_BIDI_RLI, /* Right-to-Left Isolate */ + UC_BIDI_FSI, /* First Strong Isolate */ + UC_BIDI_PDI /* Pop Directional Isolate */ +}; + +/* Return the name of a bidi class. */ +extern const char * + uc_bidi_class_name (int bidi_class) + _UC_ATTRIBUTE_CONST; +/* Same; obsolete function name. */ +extern const char * + uc_bidi_category_name (int category) + _UC_ATTRIBUTE_CONST; + +/* Return the long name of a bidi class. */ +extern const char * + uc_bidi_class_long_name (int bidi_class) + _UC_ATTRIBUTE_CONST; + +/* Return the bidi class given by name, e.g. "LRE", or by long name, e.g. + "Left-to-Right Embedding". */ +extern int + uc_bidi_class_byname (const char *bidi_class_name) + _UC_ATTRIBUTE_PURE; +/* Same; obsolete function name. */ +extern int + uc_bidi_category_byname (const char *category_name) + _UC_ATTRIBUTE_PURE; + +/* Return the bidi class of a Unicode character. */ +extern int + uc_bidi_class (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +/* Same; obsolete function name. */ +extern int + uc_bidi_category (ucs4_t uc) + _UC_ATTRIBUTE_CONST; + +/* Test whether a Unicode character belongs to a given bidi class. */ +extern bool + uc_is_bidi_class (ucs4_t uc, int bidi_class) + _UC_ATTRIBUTE_CONST; +/* Same; obsolete function name. */ +extern bool + uc_is_bidi_category (ucs4_t uc, int category) + _UC_ATTRIBUTE_CONST; + +/* ========================================================================= */ + +/* Field 5 of Unicode Character Database: Character decomposition mapping. + See "uninorm.h". */ + +/* ========================================================================= */ + +/* Field 6 of Unicode Character Database: Decimal digit value. */ + +/* Return the decimal digit value of a Unicode character. */ +extern int + uc_decimal_value (ucs4_t uc) + _UC_ATTRIBUTE_CONST; + +/* ========================================================================= */ + +/* Field 7 of Unicode Character Database: Digit value. */ + +/* Return the digit value of a Unicode character. */ +extern int + uc_digit_value (ucs4_t uc) + _UC_ATTRIBUTE_CONST; + +/* ========================================================================= */ + +/* Field 8 of Unicode Character Database: Numeric value. */ + +/* Return the numeric value of a Unicode character. */ +typedef struct +{ + int numerator; + int denominator; +} +uc_fraction_t; +extern uc_fraction_t + uc_numeric_value (ucs4_t uc) + _UC_ATTRIBUTE_CONST; + +/* ========================================================================= */ + +/* Field 9 of Unicode Character Database: Mirrored. */ + +/* Return the mirrored character of a Unicode character UC in *PUC. */ +extern bool + uc_mirror_char (ucs4_t uc, ucs4_t *puc); + +/* ========================================================================= */ + +/* Field 10 of Unicode Character Database: Unicode 1.0 Name. + Not available in this library. */ + +/* ========================================================================= */ + +/* Field 11 of Unicode Character Database: ISO 10646 comment. + Not available in this library. */ + +/* ========================================================================= */ + +/* Field 12, 13, 14 of Unicode Character Database: Uppercase mapping, + lowercase mapping, titlecase mapping. See "unicase.h". */ + +/* ========================================================================= */ + +/* Field 2 of the file ArabicShaping.txt in the Unicode Character Database. */ + +/* Possible joining types. */ +enum +{ + UC_JOINING_TYPE_U, /* Non_Joining */ + UC_JOINING_TYPE_T, /* Transparent */ + UC_JOINING_TYPE_C, /* Join_Causing */ + UC_JOINING_TYPE_L, /* Left_Joining */ + UC_JOINING_TYPE_R, /* Right_Joining */ + UC_JOINING_TYPE_D /* Dual_Joining */ +}; + +/* Return the name of a joining type. */ +extern const char * + uc_joining_type_name (int joining_type) + _UC_ATTRIBUTE_CONST; + +/* Return the long name of a joining type. */ +extern const char * + uc_joining_type_long_name (int joining_type) + _UC_ATTRIBUTE_CONST; + +/* Return the joining type given by name, e.g. "D", or by long name, e.g. + "Dual Joining". */ +extern int + uc_joining_type_byname (const char *joining_type_name) + _UC_ATTRIBUTE_PURE; + +/* Return the joining type of a Unicode character. */ +extern int + uc_joining_type (ucs4_t uc) + _UC_ATTRIBUTE_CONST; + +/* ========================================================================= */ + +/* Field 3 of the file ArabicShaping.txt in the Unicode Character Database. */ + +/* Possible joining groups. + This enumeration may be extended in the future. */ +enum +{ + UC_JOINING_GROUP_NONE, /* No_Joining_Group */ + UC_JOINING_GROUP_AIN, /* Ain */ + UC_JOINING_GROUP_ALAPH, /* Alaph */ + UC_JOINING_GROUP_ALEF, /* Alef */ + UC_JOINING_GROUP_BEH, /* Beh */ + UC_JOINING_GROUP_BETH, /* Beth */ + UC_JOINING_GROUP_BURUSHASKI_YEH_BARREE, /* Burushaski_Yeh_Barree */ + UC_JOINING_GROUP_DAL, /* Dal */ + UC_JOINING_GROUP_DALATH_RISH, /* Dalath_Rish */ + UC_JOINING_GROUP_E, /* E */ + UC_JOINING_GROUP_FARSI_YEH, /* Farsi_Yeh */ + UC_JOINING_GROUP_FE, /* Fe */ + UC_JOINING_GROUP_FEH, /* Feh */ + UC_JOINING_GROUP_FINAL_SEMKATH, /* Final_Semkath */ + UC_JOINING_GROUP_GAF, /* Gaf */ + UC_JOINING_GROUP_GAMAL, /* Gamal */ + UC_JOINING_GROUP_HAH, /* Hah */ + UC_JOINING_GROUP_HE, /* He */ + UC_JOINING_GROUP_HEH, /* Heh */ + UC_JOINING_GROUP_HEH_GOAL, /* Heh_Goal */ + UC_JOINING_GROUP_HETH, /* Heth */ + UC_JOINING_GROUP_KAF, /* Kaf */ + UC_JOINING_GROUP_KAPH, /* Kaph */ + UC_JOINING_GROUP_KHAPH, /* Khaph */ + UC_JOINING_GROUP_KNOTTED_HEH, /* Knotted_Heh */ + UC_JOINING_GROUP_LAM, /* Lam */ + UC_JOINING_GROUP_LAMADH, /* Lamadh */ + UC_JOINING_GROUP_MEEM, /* Meem */ + UC_JOINING_GROUP_MIM, /* Mim */ + UC_JOINING_GROUP_NOON, /* Noon */ + UC_JOINING_GROUP_NUN, /* Nun */ + UC_JOINING_GROUP_NYA, /* Nya */ + UC_JOINING_GROUP_PE, /* Pe */ + UC_JOINING_GROUP_QAF, /* Qaf */ + UC_JOINING_GROUP_QAPH, /* Qaph */ + UC_JOINING_GROUP_REH, /* Reh */ + UC_JOINING_GROUP_REVERSED_PE, /* Reversed_Pe */ + UC_JOINING_GROUP_SAD, /* Sad */ + UC_JOINING_GROUP_SADHE, /* Sadhe */ + UC_JOINING_GROUP_SEEN, /* Seen */ + UC_JOINING_GROUP_SEMKATH, /* Semkath */ + UC_JOINING_GROUP_SHIN, /* Shin */ + UC_JOINING_GROUP_SWASH_KAF, /* Swash_Kaf */ + UC_JOINING_GROUP_SYRIAC_WAW, /* Syriac_Waw */ + UC_JOINING_GROUP_TAH, /* Tah */ + UC_JOINING_GROUP_TAW, /* Taw */ + UC_JOINING_GROUP_TEH_MARBUTA, /* Teh_Marbuta */ + UC_JOINING_GROUP_TEH_MARBUTA_GOAL, /* Teh_Marbuta_Goal */ + UC_JOINING_GROUP_TETH, /* Teth */ + UC_JOINING_GROUP_WAW, /* Waw */ + UC_JOINING_GROUP_YEH, /* Yeh */ + UC_JOINING_GROUP_YEH_BARREE, /* Yeh_Barree */ + UC_JOINING_GROUP_YEH_WITH_TAIL, /* Yeh_With_Tail */ + UC_JOINING_GROUP_YUDH, /* Yudh */ + UC_JOINING_GROUP_YUDH_HE, /* Yudh_He */ + UC_JOINING_GROUP_ZAIN, /* Zain */ + UC_JOINING_GROUP_ZHAIN, /* Zhain */ + UC_JOINING_GROUP_ROHINGYA_YEH, /* Rohingya_Yeh */ + UC_JOINING_GROUP_STRAIGHT_WAW, /* Straight_Waw */ + UC_JOINING_GROUP_MANICHAEAN_ALEPH, /* Manichaean_Aleph */ + UC_JOINING_GROUP_MANICHAEAN_BETH, /* Manichaean_Beth */ + UC_JOINING_GROUP_MANICHAEAN_GIMEL, /* Manichaean_Gimel */ + UC_JOINING_GROUP_MANICHAEAN_DALETH, /* Manichaean_Daleth */ + UC_JOINING_GROUP_MANICHAEAN_WAW, /* Manichaean_Waw */ + UC_JOINING_GROUP_MANICHAEAN_ZAYIN, /* Manichaean_Zayin */ + UC_JOINING_GROUP_MANICHAEAN_HETH, /* Manichaean_Heth */ + UC_JOINING_GROUP_MANICHAEAN_TETH, /* Manichaean_Teth */ + UC_JOINING_GROUP_MANICHAEAN_YODH, /* Manichaean_Yodh */ + UC_JOINING_GROUP_MANICHAEAN_KAPH, /* Manichaean_Kaph */ + UC_JOINING_GROUP_MANICHAEAN_LAMEDH, /* Manichaean_Lamedh */ + UC_JOINING_GROUP_MANICHAEAN_DHAMEDH, /* Manichaean_Dhamedh */ + UC_JOINING_GROUP_MANICHAEAN_THAMEDH, /* Manichaean_Thamedh */ + UC_JOINING_GROUP_MANICHAEAN_MEM, /* Manichaean_Mem */ + UC_JOINING_GROUP_MANICHAEAN_NUN, /* Manichaean_Nun */ + UC_JOINING_GROUP_MANICHAEAN_SAMEKH, /* Manichaean_Aleph */ + UC_JOINING_GROUP_MANICHAEAN_AYIN, /* Manichaean_Ayin */ + UC_JOINING_GROUP_MANICHAEAN_PE, /* Manichaean_Pe */ + UC_JOINING_GROUP_MANICHAEAN_SADHE, /* Manichaean_Sadhe */ + UC_JOINING_GROUP_MANICHAEAN_QOPH, /* Manichaean_Qoph */ + UC_JOINING_GROUP_MANICHAEAN_RESH, /* Manichaean_Resh */ + UC_JOINING_GROUP_MANICHAEAN_TAW, /* Manichaean_Taw */ + UC_JOINING_GROUP_MANICHAEAN_ONE, /* Manichaean_One */ + UC_JOINING_GROUP_MANICHAEAN_FIVE, /* Manichaean_Five */ + UC_JOINING_GROUP_MANICHAEAN_TEN, /* Manichaean_Ten */ + UC_JOINING_GROUP_MANICHAEAN_TWENTY, /* Manichaean_Twenty */ + UC_JOINING_GROUP_MANICHAEAN_HUNDRED, /* Manichaean_Hundred */ + UC_JOINING_GROUP_AFRICAN_FEH, /* African_Feh */ + UC_JOINING_GROUP_AFRICAN_QAF, /* African_Qaf */ + UC_JOINING_GROUP_AFRICAN_NOON, /* African_Noon */ + UC_JOINING_GROUP_MALAYALAM_NGA, /* Malayalam_Nga */ + UC_JOINING_GROUP_MALAYALAM_JA, /* Malayalam_Ja */ + UC_JOINING_GROUP_MALAYALAM_NYA, /* Malayalam_Nya */ + UC_JOINING_GROUP_MALAYALAM_TTA, /* Malayalam_Tta */ + UC_JOINING_GROUP_MALAYALAM_NNA, /* Malayalam_Nna */ + UC_JOINING_GROUP_MALAYALAM_NNNA, /* Malayalam_Nnna */ + UC_JOINING_GROUP_MALAYALAM_BHA, /* Malayalam_Bha */ + UC_JOINING_GROUP_MALAYALAM_RA, /* Malayalam_Ra */ + UC_JOINING_GROUP_MALAYALAM_LLA, /* Malayalam_Lla */ + UC_JOINING_GROUP_MALAYALAM_LLLA, /* Malayalam_Llla */ + UC_JOINING_GROUP_MALAYALAM_SSA, /* Malayalam_Ssa */ + UC_JOINING_GROUP_HANIFI_ROHINGYA_PA, /* Hanifi_Rohingya_Pa */ + UC_JOINING_GROUP_HANIFI_ROHINGYA_KINNA_YA, /* Hanifi_Rohingya_Kinna_Ya */ + UC_JOINING_GROUP_THIN_YEH, /* Thin_Yeh */ + UC_JOINING_GROUP_VERTICAL_TAIL, /* Vertical_Tail */ + UC_JOINING_GROUP_KASHMIRI_YEH /* Kashmiri_Yeh */ +}; + +/* Return the name of a joining group. */ +extern const char * + uc_joining_group_name (int joining_group) + _UC_ATTRIBUTE_CONST; + +/* Return the joining group given by name, e.g. "Teh_Marbuta". */ +extern int + uc_joining_group_byname (const char *joining_group_name) + _UC_ATTRIBUTE_PURE; + +/* Return the joining group of a Unicode character. */ +extern int + uc_joining_group (ucs4_t uc) + _UC_ATTRIBUTE_CONST; + +/* ========================================================================= */ + +/* Common API for properties. */ + +/* Data type denoting a property. This is not just a number, but rather a + pointer to the test functions, so that programs that use only few of the + properties don't have a link-time dependency towards all the tables. */ +typedef struct +{ + bool (*test_fn) (ucs4_t uc); +} +uc_property_t; + +/* Predefined properties. */ +/* General. */ +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_WHITE_SPACE; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_ALPHABETIC; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_OTHER_ALPHABETIC; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_NOT_A_CHARACTER; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_DEFAULT_IGNORABLE_CODE_POINT; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_OTHER_DEFAULT_IGNORABLE_CODE_POINT; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_DEPRECATED; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_LOGICAL_ORDER_EXCEPTION; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_VARIATION_SELECTOR; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_PRIVATE_USE; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_UNASSIGNED_CODE_VALUE; +/* Case. */ +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_UPPERCASE; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_OTHER_UPPERCASE; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_LOWERCASE; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_OTHER_LOWERCASE; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_TITLECASE; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_CASED; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_CASE_IGNORABLE; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_CHANGES_WHEN_LOWERCASED; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_CHANGES_WHEN_UPPERCASED; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_CHANGES_WHEN_TITLECASED; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_CHANGES_WHEN_CASEFOLDED; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_CHANGES_WHEN_CASEMAPPED; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_SOFT_DOTTED; +/* Identifiers. */ +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_ID_START; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_OTHER_ID_START; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_ID_CONTINUE; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_OTHER_ID_CONTINUE; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_XID_START; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_XID_CONTINUE; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_ID_COMPAT_MATH_START; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_ID_COMPAT_MATH_CONTINUE; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_PATTERN_WHITE_SPACE; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_PATTERN_SYNTAX; +/* Shaping and rendering. */ +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_JOIN_CONTROL; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_GRAPHEME_BASE; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_GRAPHEME_EXTEND; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_OTHER_GRAPHEME_EXTEND; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_GRAPHEME_LINK; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_MODIFIER_COMBINING_MARK; +/* Bidi. */ +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_BIDI_CONTROL; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_BIDI_LEFT_TO_RIGHT; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_BIDI_HEBREW_RIGHT_TO_LEFT; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_BIDI_ARABIC_RIGHT_TO_LEFT; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_BIDI_EUROPEAN_DIGIT; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_BIDI_EUR_NUM_SEPARATOR; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_BIDI_EUR_NUM_TERMINATOR; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_BIDI_ARABIC_DIGIT; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_BIDI_COMMON_SEPARATOR; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_BIDI_BLOCK_SEPARATOR; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_BIDI_SEGMENT_SEPARATOR; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_BIDI_WHITESPACE; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_BIDI_NON_SPACING_MARK; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_BIDI_BOUNDARY_NEUTRAL; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_BIDI_PDF; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_BIDI_EMBEDDING_OR_OVERRIDE; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_BIDI_OTHER_NEUTRAL; +/* Numeric. */ +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_HEX_DIGIT; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_ASCII_HEX_DIGIT; +/* CJK. */ +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_IDEOGRAPHIC; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_UNIFIED_IDEOGRAPH; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_RADICAL; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_IDS_UNARY_OPERATOR; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_IDS_BINARY_OPERATOR; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_IDS_TRINARY_OPERATOR; +/* Emoji. */ +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_EMOJI; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_EMOJI_PRESENTATION; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_EMOJI_MODIFIER; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_EMOJI_MODIFIER_BASE; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_EMOJI_COMPONENT; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_EXTENDED_PICTOGRAPHIC; +/* Misc. */ +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_ZERO_WIDTH; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_SPACE; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_NON_BREAK; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_ISO_CONTROL; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_FORMAT_CONTROL; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_PREPENDED_CONCATENATION_MARK; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_DASH; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_HYPHEN; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_PUNCTUATION; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_LINE_SEPARATOR; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_PARAGRAPH_SEPARATOR; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_QUOTATION_MARK; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_SENTENCE_TERMINAL; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_TERMINAL_PUNCTUATION; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_CURRENCY_SYMBOL; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_MATH; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_OTHER_MATH; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_PAIRED_PUNCTUATION; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_LEFT_OF_PAIR; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_COMBINING; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_COMPOSITE; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_DECIMAL_DIGIT; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_NUMERIC; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_DIACRITIC; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_EXTENDER; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_IGNORABLE_CONTROL; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_REGIONAL_INDICATOR; + +/* Return the property given by name, e.g. "White space". */ +extern uc_property_t + uc_property_byname (const char *property_name); + +/* Test whether a property is valid. */ +#define uc_property_is_valid(property) ((property).test_fn != NULL) + +/* Test whether a Unicode character has a given property. */ +extern bool + uc_is_property (ucs4_t uc, uc_property_t property); +extern bool uc_is_property_white_space (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_alphabetic (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_other_alphabetic (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_not_a_character (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_default_ignorable_code_point (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_other_default_ignorable_code_point (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_deprecated (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_logical_order_exception (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_variation_selector (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_private_use (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_unassigned_code_value (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_uppercase (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_other_uppercase (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_lowercase (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_other_lowercase (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_titlecase (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_cased (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_case_ignorable (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_changes_when_lowercased (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_changes_when_uppercased (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_changes_when_titlecased (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_changes_when_casefolded (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_changes_when_casemapped (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_soft_dotted (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_id_start (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_other_id_start (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_id_continue (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_other_id_continue (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_xid_start (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_xid_continue (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_id_compat_math_start (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_id_compat_math_continue (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_pattern_white_space (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_pattern_syntax (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_join_control (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_grapheme_base (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_grapheme_extend (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_other_grapheme_extend (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_grapheme_link (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_modifier_combining_mark (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_bidi_control (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_bidi_left_to_right (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_bidi_hebrew_right_to_left (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_bidi_arabic_right_to_left (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_bidi_european_digit (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_bidi_eur_num_separator (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_bidi_eur_num_terminator (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_bidi_arabic_digit (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_bidi_common_separator (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_bidi_block_separator (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_bidi_segment_separator (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_bidi_whitespace (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_bidi_non_spacing_mark (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_bidi_boundary_neutral (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_bidi_pdf (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_bidi_embedding_or_override (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_bidi_other_neutral (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_hex_digit (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_ascii_hex_digit (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_ideographic (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_unified_ideograph (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_radical (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_ids_unary_operator (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_ids_binary_operator (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_ids_trinary_operator (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_emoji (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_emoji_presentation (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_emoji_modifier (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_emoji_modifier_base (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_emoji_component (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_extended_pictographic (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_zero_width (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_space (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_non_break (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_iso_control (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_format_control (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_prepended_concatenation_mark (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_dash (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_hyphen (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_punctuation (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_line_separator (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_paragraph_separator (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_quotation_mark (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_sentence_terminal (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_terminal_punctuation (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_currency_symbol (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_math (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_other_math (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_paired_punctuation (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_left_of_pair (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_combining (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_composite (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_decimal_digit (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_numeric (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_diacritic (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_extender (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_ignorable_control (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_regional_indicator (ucs4_t uc) + _UC_ATTRIBUTE_CONST; + +/* ========================================================================= */ + +/* Other attributes. */ + +/* ------------------------------------------------------------------------- */ + +/* Indic_Conjunct_Break (InCB): from the file DerivedCoreProperties.txt + in the Unicode Character Database. */ + +/* Possible values of the Indic_Conjunct_Break attribute. + This enumeration may be extended in the future. */ +enum +{ + UC_INDIC_CONJUNCT_BREAK_NONE, /* None */ + UC_INDIC_CONJUNCT_BREAK_CONSONANT, /* Consonant */ + UC_INDIC_CONJUNCT_BREAK_LINKER, /* Linker */ + UC_INDIC_CONJUNCT_BREAK_EXTEND /* Extend */ +}; + +/* Return the name of an Indic_Conjunct_Break value. */ +extern const char * + uc_indic_conjunct_break_name (int indic_conjunct_break) + _UC_ATTRIBUTE_CONST; + +/* Return the Indic_Conjunct_Break value given by name, e.g. "Consonant". */ +extern int + uc_indic_conjunct_break_byname (const char *indic_conjunct_break_name) + _UC_ATTRIBUTE_PURE; + +/* Return the Indic_Conjunct_Break attribute of a Unicode character. */ +extern int + uc_indic_conjunct_break (ucs4_t uc) + _UC_ATTRIBUTE_CONST; + +/* ========================================================================= */ + +/* Subdivision of the Unicode characters into scripts. */ + +typedef struct +{ + unsigned int code : 21; + unsigned int start : 1; + unsigned int end : 1; +} +uc_interval_t; +typedef struct +{ + unsigned int nintervals; + const uc_interval_t *intervals; + const char *name; +} +uc_script_t; + +/* Return the script of a Unicode character. */ +extern const uc_script_t * + uc_script (ucs4_t uc) + _UC_ATTRIBUTE_CONST; + +/* Return the script given by name, e.g. "HAN". */ +extern const uc_script_t * + uc_script_byname (const char *script_name) + _UC_ATTRIBUTE_PURE; + +/* Test whether a Unicode character belongs to a given script. */ +extern bool + uc_is_script (ucs4_t uc, const uc_script_t *script) + _UC_ATTRIBUTE_PURE; + +/* Get the list of all scripts. */ +extern void + uc_all_scripts (const uc_script_t **scripts, size_t *count); + +/* ========================================================================= */ + +/* Subdivision of the Unicode character range into blocks. */ + +typedef struct +{ + ucs4_t start; + ucs4_t end; + const char *name; +} +uc_block_t; + +/* Return the block a character belongs to. */ +extern const uc_block_t * + uc_block (ucs4_t uc) + _UC_ATTRIBUTE_CONST; + +/* Test whether a Unicode character belongs to a given block. */ +extern bool + uc_is_block (ucs4_t uc, const uc_block_t *block) + _UC_ATTRIBUTE_PURE; + +/* Get the list of all blocks. */ +extern void + uc_all_blocks (const uc_block_t **blocks, size_t *count); + +/* ========================================================================= */ + +/* Properties taken from language standards. */ + +/* Test whether a Unicode character is considered whitespace in ISO C 99. */ +extern bool + uc_is_c_whitespace (ucs4_t uc) + _UC_ATTRIBUTE_CONST; + +/* Test whether a Unicode character is considered whitespace in Java. */ +extern bool + uc_is_java_whitespace (ucs4_t uc) + _UC_ATTRIBUTE_CONST; + +enum +{ + UC_IDENTIFIER_START, /* valid as first or subsequent character */ + UC_IDENTIFIER_VALID, /* valid as subsequent character only */ + UC_IDENTIFIER_INVALID, /* not valid */ + UC_IDENTIFIER_IGNORABLE /* ignorable (Java only) */ +}; + +/* Return the categorization of a Unicode character w.r.t. the ISO C 99 + identifier syntax. */ +extern int + uc_c_ident_category (ucs4_t uc) + _UC_ATTRIBUTE_CONST; + +/* Return the categorization of a Unicode character w.r.t. the Java + identifier syntax. */ +extern int + uc_java_ident_category (ucs4_t uc) + _UC_ATTRIBUTE_CONST; + +/* ========================================================================= */ + +/* Like ISO C and . These functions are deprecated, + because this set of functions was designed with ASCII in mind and cannot + reflect the more diverse reality of the Unicode character set. But they + can be a quick-and-dirty porting aid when migrating from wchar_t APIs + to Unicode strings. */ + +/* Test for any character for which 'uc_is_alpha' or 'uc_is_digit' is true. */ +extern bool + uc_is_alnum (ucs4_t uc) + _UC_ATTRIBUTE_CONST; + +/* Test for any character for which 'uc_is_upper' or 'uc_is_lower' is true, + or any character that is one of a locale-specific set of characters for + which none of 'uc_is_cntrl', 'uc_is_digit', 'uc_is_punct', or 'uc_is_space' + is true. */ +extern bool + uc_is_alpha (ucs4_t uc) + _UC_ATTRIBUTE_CONST; + +/* Test for any control character. */ +extern bool + uc_is_cntrl (ucs4_t uc) + _UC_ATTRIBUTE_CONST; + +/* Test for any character that corresponds to a decimal-digit character. */ +extern bool + uc_is_digit (ucs4_t uc) + _UC_ATTRIBUTE_CONST; + +/* Test for any character for which 'uc_is_print' is true and 'uc_is_space' + is false. */ +extern bool + uc_is_graph (ucs4_t uc) + _UC_ATTRIBUTE_CONST; + +/* Test for any character that corresponds to a lowercase letter or is one + of a locale-specific set of characters for which none of 'uc_is_cntrl', + 'uc_is_digit', 'uc_is_punct', or 'uc_is_space' is true. */ +extern bool + uc_is_lower (ucs4_t uc) + _UC_ATTRIBUTE_CONST; + +/* Test for any printing character. */ +extern bool + uc_is_print (ucs4_t uc) + _UC_ATTRIBUTE_CONST; + +/* Test for any printing character that is one of a locale-specific set of + characters for which neither 'uc_is_space' nor 'uc_is_alnum' is true. */ +extern bool + uc_is_punct (ucs4_t uc) + _UC_ATTRIBUTE_CONST; + +/* Test for any character that corresponds to a locale-specific set of + characters for which none of 'uc_is_alnum', 'uc_is_graph', or 'uc_is_punct' + is true. */ +extern bool + uc_is_space (ucs4_t uc) + _UC_ATTRIBUTE_CONST; + +/* Test for any character that corresponds to an uppercase letter or is one + of a locale-specific set of character for which none of 'uc_is_cntrl', + 'uc_is_digit', 'uc_is_punct', or 'uc_is_space' is true. */ +extern bool + uc_is_upper (ucs4_t uc) + _UC_ATTRIBUTE_CONST; + +/* Test for any character that corresponds to a hexadecimal-digit + character. */ +extern bool + uc_is_xdigit (ucs4_t uc) + _UC_ATTRIBUTE_CONST; + +/* GNU extension. */ +/* Test for any character that corresponds to a standard blank character or + a locale-specific set of characters for which 'uc_is_alnum' is false. */ +extern bool + uc_is_blank (ucs4_t uc) + _UC_ATTRIBUTE_CONST; + +/* ========================================================================= */ + +#ifdef __cplusplus +} +#endif + +#endif /* _UNICTYPE_H */ diff --git a/miniconda3/pkgs/libunistring-1.3-hb25bd0a_0/include/unigbrk.h b/miniconda3/pkgs/libunistring-1.3-hb25bd0a_0/include/unigbrk.h new file mode 100644 index 0000000000000000000000000000000000000000..4d0da8671e5a82a9550205d38c21937f89bda98c --- /dev/null +++ b/miniconda3/pkgs/libunistring-1.3-hb25bd0a_0/include/unigbrk.h @@ -0,0 +1,152 @@ +/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ +/* Grapheme cluster breaks in Unicode strings. + Copyright (C) 2010-2024 Free Software Foundation, Inc. + Written by Ben Pfaff , 2010. + + This file is free software. + It is dual-licensed under "the GNU LGPLv3+ or the GNU GPLv2+". + You can redistribute it and/or modify it under either + - the terms of the GNU Lesser General Public License as published + by the Free Software Foundation, either version 3, or (at your + option) any later version, or + - the terms of the GNU General Public License as published by the + Free Software Foundation; either version 2, or (at your option) + any later version, or + - the same dual license "the GNU LGPLv3+ or the GNU GPLv2+". + + This file is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License and the GNU General Public License + for more details. + + You should have received a copy of the GNU Lesser General Public + License and of the GNU General Public License along with this + program. If not, see . */ + +#ifndef _UNIGBRK_H +#define _UNIGBRK_H + +/* Get bool. */ +#include + +/* Get size_t. */ +#include + +#include "unitypes.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* ========================================================================= */ + +/* Property defined in Unicode Standard Annex #29, section "Grapheme Cluster + Boundaries" + */ + +/* Possible values of the Grapheme_Cluster_Break property. + This enumeration may be extended in the future. */ +enum +{ + GBP_OTHER = 0, + GBP_CR = 1, + GBP_LF = 2, + GBP_CONTROL = 3, + GBP_EXTEND = 4, + GBP_PREPEND = 5, + GBP_SPACINGMARK = 6, + GBP_L = 7, + GBP_V = 8, + GBP_T = 9, + GBP_LV = 10, + GBP_LVT = 11, + GBP_RI = 12, + GBP_ZWJ = 13, + GBP_EB = 14, /* obsolete */ + GBP_EM = 15, /* obsolete */ + GBP_GAZ = 16, /* obsolete */ + GBP_EBG = 17 /* obsolete */ +}; + +/* Return the Grapheme_Cluster_Break property of a Unicode character. */ +extern int + uc_graphemeclusterbreak_property (ucs4_t uc) + _UC_ATTRIBUTE_CONST; + +/* ========================================================================= */ + +/* Grapheme cluster breaks. */ + +/* Returns true if there is a grapheme cluster boundary between Unicode code + points A and B. A "grapheme cluster" is an approximation to a + user-perceived character, which sometimes corresponds to multiple code + points. For example, an English letter followed by an acute accent can be + expressed as two consecutive Unicode code points, but it is perceived by the + user as only a single character and therefore constitutes a single grapheme + cluster. + + Implements extended (not legacy) grapheme cluster rules, because UAX #29 + indicates that they are preferred. + + Note: This function does not work right with syllables in Indic scripts or + emojis, because it does not look at the characters before A and after B. + + Use A == 0 or B == 0 to indicate start of text or end of text, + respectively. */ +extern bool + uc_is_grapheme_break (ucs4_t a, ucs4_t b) + _UC_ATTRIBUTE_CONST; + +/* Returns the start of the next grapheme cluster following S, or NULL if the + end of the string has been reached. + Note: These functions do not work right with syllables in Indic scripts or + emojis, because they do not consider the characters before S. */ +extern const uint8_t * + u8_grapheme_next (const uint8_t *s, const uint8_t *end) + _UC_ATTRIBUTE_PURE; +extern const uint16_t * + u16_grapheme_next (const uint16_t *s, const uint16_t *end) + _UC_ATTRIBUTE_PURE; +extern const uint32_t * + u32_grapheme_next (const uint32_t *s, const uint32_t *end) + _UC_ATTRIBUTE_PURE; + +/* Returns the start of the previous grapheme cluster before S, or NULL if the + start of the string has been reached. + Note: These functions do not work right with syllables in Indic scripts or + emojis, because they do not consider the characters at or after S. */ +extern const uint8_t * + u8_grapheme_prev (const uint8_t *s, const uint8_t *start) + _UC_ATTRIBUTE_PURE; +extern const uint16_t * + u16_grapheme_prev (const uint16_t *s, const uint16_t *start) + _UC_ATTRIBUTE_PURE; +extern const uint32_t * + u32_grapheme_prev (const uint32_t *s, const uint32_t *start) + _UC_ATTRIBUTE_PURE; + +/* Determine the grapheme cluster boundaries in S, and store the result at + p[0..n-1]. p[i] = 1 means that a new grapheme cluster begins at s[i]. p[i] + = 0 means that s[i-1] and s[i] are part of the same grapheme cluster. p[0] + will always be 1. + */ +extern void + u8_grapheme_breaks (const uint8_t *s, size_t n, char *p); +extern void + u16_grapheme_breaks (const uint16_t *s, size_t n, char *p); +extern void + u32_grapheme_breaks (const uint32_t *s, size_t n, char *p); +extern void + ulc_grapheme_breaks (const char *s, size_t n, char *p); +extern void + uc_grapheme_breaks (const ucs4_t *s, size_t n, char *p); + +/* ========================================================================= */ + +#ifdef __cplusplus +} +#endif + + +#endif /* _UNIGBRK_H */ diff --git a/miniconda3/pkgs/libunistring-1.3-hb25bd0a_0/include/unilbrk.h b/miniconda3/pkgs/libunistring-1.3-hb25bd0a_0/include/unilbrk.h new file mode 100644 index 0000000000000000000000000000000000000000..aff64096faab0918359120e8819a55bf5edc0ee4 --- /dev/null +++ b/miniconda3/pkgs/libunistring-1.3-hb25bd0a_0/include/unilbrk.h @@ -0,0 +1,168 @@ +/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ +/* Line breaking of Unicode strings. + Copyright (C) 2001-2003, 2005-2024 Free Software Foundation, Inc. + Written by Bruno Haible , 2001. + + This file is free software. + It is dual-licensed under "the GNU LGPLv3+ or the GNU GPLv2+". + You can redistribute it and/or modify it under either + - the terms of the GNU Lesser General Public License as published + by the Free Software Foundation, either version 3, or (at your + option) any later version, or + - the terms of the GNU General Public License as published by the + Free Software Foundation; either version 2, or (at your option) + any later version, or + - the same dual license "the GNU LGPLv3+ or the GNU GPLv2+". + + This file is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License and the GNU General Public License + for more details. + + You should have received a copy of the GNU Lesser General Public + License and of the GNU General Public License along with this + program. If not, see . */ + +#ifndef _UNILBRK_H +#define _UNILBRK_H + +/* Get size_t. */ +#include + +#include "unitypes.h" + +/* Get locale_charset() declaration. */ +#include + + +#ifdef __cplusplus +extern "C" { +#endif + + +/* These functions are locale dependent. The encoding argument identifies + the encoding (e.g. "ISO-8859-2" for Polish). */ + + +/* Line breaking. */ + +enum +{ + UC_BREAK_UNDEFINED, + UC_BREAK_PROHIBITED, + UC_BREAK_POSSIBLE, + UC_BREAK_MANDATORY, + UC_BREAK_HYPHENATION, + UC_BREAK_CR_BEFORE_LF /* only used in _v2 or later */ +}; + +/* Determine the line break points in S, and store the result at p[0..n-1]. + p[i] = UC_BREAK_MANDATORY means that s[i] is a line break character. + p[i] = UC_BREAK_CR_BEFORE_LF means that s[i] and s[i+1] is the CR-LF + character sequence. (Only used in _v2 or later.) + p[i] = UC_BREAK_POSSIBLE means that a line break may be inserted between + s[i-1] and s[i]. + p[i] = UC_BREAK_HYPHENATION means that a hyphen and a line break may be + inserted between s[i-1] and s[i]. But beware of language dependent + hyphenation rules. + p[i] = UC_BREAK_PROHIBITED means that s[i-1] and s[i] must not be separated. + */ +extern void + u8_possible_linebreaks (const uint8_t *s, size_t n, + const char *encoding, char *_UC_RESTRICT p); +extern void + u8_possible_linebreaks_v2 (const uint8_t *s, size_t n, + const char *encoding, char *_UC_RESTRICT p); +#define u8_possible_linebreaks u8_possible_linebreaks_v2 + +extern void + u16_possible_linebreaks (const uint16_t *s, size_t n, + const char *encoding, char *_UC_RESTRICT p); +extern void + u16_possible_linebreaks_v2 (const uint16_t *s, size_t n, + const char *encoding, char *_UC_RESTRICT p); +#define u16_possible_linebreaks u16_possible_linebreaks_v2 + +extern void + u32_possible_linebreaks (const uint32_t *s, size_t n, + const char *encoding, char *_UC_RESTRICT p); +extern void + u32_possible_linebreaks_v2 (const uint32_t *s, size_t n, + const char *encoding, char *_UC_RESTRICT p); +#define u32_possible_linebreaks u32_possible_linebreaks_v2 + +extern void + ulc_possible_linebreaks (const char *s, size_t n, + const char *encoding, char *_UC_RESTRICT p); +extern void + ulc_possible_linebreaks_v2 (const char *s, size_t n, + const char *encoding, char *_UC_RESTRICT p); +#define ulc_possible_linebreaks ulc_possible_linebreaks_v2 + +/* Choose the best line breaks, assuming the uc_width function. + The string is s[0..n-1]. The maximum number of columns per line is given + as WIDTH. The starting column of the string is given as START_COLUMN. + If the algorithm shall keep room after the last piece, they can be given + as AT_END_COLUMNS. + o is an optional override; if o[i] != UC_BREAK_UNDEFINED, o[i] takes + precedence over p[i] as returned by the *_possible_linebreaks function. + The given ENCODING is used for disambiguating widths in uc_width. + Return the column after the end of the string, and store the result at + p[0..n-1]. + */ +extern int + u8_width_linebreaks (const uint8_t *s, size_t n, int width, + int start_column, int at_end_columns, + const char *o, const char *encoding, + char *_UC_RESTRICT p); +extern int + u8_width_linebreaks_v2 (const uint8_t *s, size_t n, int width, + int start_column, int at_end_columns, + const char *o, const char *encoding, + char *_UC_RESTRICT p); +#define u8_width_linebreaks u8_width_linebreaks_v2 + +extern int + u16_width_linebreaks (const uint16_t *s, size_t n, int width, + int start_column, int at_end_columns, + const char *o, const char *encoding, + char *_UC_RESTRICT p); +extern int + u16_width_linebreaks_v2 (const uint16_t *s, size_t n, int width, + int start_column, int at_end_columns, + const char *o, const char *encoding, + char *_UC_RESTRICT p); +#define u16_width_linebreaks u16_width_linebreaks_v2 + +extern int + u32_width_linebreaks (const uint32_t *s, size_t n, int width, + int start_column, int at_end_columns, + const char *o, const char *encoding, + char *_UC_RESTRICT p); +extern int + u32_width_linebreaks_v2 (const uint32_t *s, size_t n, int width, + int start_column, int at_end_columns, + const char *o, const char *encoding, + char *_UC_RESTRICT p); +#define u32_width_linebreaks u32_width_linebreaks_v2 + +extern int + ulc_width_linebreaks (const char *s, size_t n, int width, + int start_column, int at_end_columns, + const char *o, const char *encoding, + char *_UC_RESTRICT p); +extern int + ulc_width_linebreaks_v2 (const char *s, size_t n, int width, + int start_column, int at_end_columns, + const char *o, const char *encoding, + char *_UC_RESTRICT p); +#define ulc_width_linebreaks ulc_width_linebreaks_v2 + + +#ifdef __cplusplus +} +#endif + + +#endif /* _UNILBRK_H */ diff --git a/miniconda3/pkgs/libunistring-1.3-hb25bd0a_0/include/unimetadata.h b/miniconda3/pkgs/libunistring-1.3-hb25bd0a_0/include/unimetadata.h new file mode 100644 index 0000000000000000000000000000000000000000..d137fdf26945eb66d9d8aaba89e98d23c52a6c2b --- /dev/null +++ b/miniconda3/pkgs/libunistring-1.3-hb25bd0a_0/include/unimetadata.h @@ -0,0 +1,40 @@ +/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ +/* Meta information about GNU libunistring. + Copyright (C) 2024 Free Software Foundation, Inc. + + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. + + This file is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +#ifndef _UNIMETADATA_H +#define _UNIMETADATA_H + +#if 1 +# include +#else +# define LIBUNISTRING_DLL_VARIABLE +#endif + +#ifdef __cplusplus +extern "C" { +#endif + + +/* Supported Unicode version number: (major<<8) + minor */ +extern LIBUNISTRING_DLL_VARIABLE const int _libunistring_unicode_version; + + +#ifdef __cplusplus +} +#endif + +#endif /* _UNIMETADATA_H */ diff --git a/miniconda3/pkgs/libunistring-1.3-hb25bd0a_0/include/uniname.h b/miniconda3/pkgs/libunistring-1.3-hb25bd0a_0/include/uniname.h new file mode 100644 index 0000000000000000000000000000000000000000..0cff8f4309c3240768abbf21f739a3dcc3b7d96e --- /dev/null +++ b/miniconda3/pkgs/libunistring-1.3-hb25bd0a_0/include/uniname.h @@ -0,0 +1,55 @@ +/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ +/* Association between Unicode characters and their names. + Copyright (C) 2000-2002, 2005, 2007, 2009-2024 Free Software Foundation, + Inc. + + This file is free software. + It is dual-licensed under "the GNU LGPLv3+ or the GNU GPLv2+". + You can redistribute it and/or modify it under either + - the terms of the GNU Lesser General Public License as published + by the Free Software Foundation, either version 3, or (at your + option) any later version, or + - the terms of the GNU General Public License as published by the + Free Software Foundation; either version 2, or (at your option) + any later version, or + - the same dual license "the GNU LGPLv3+ or the GNU GPLv2+". + + This file is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License and the GNU General Public License + for more details. + + You should have received a copy of the GNU Lesser General Public + License and of the GNU General Public License along with this + program. If not, see . */ + +#ifndef _UNINAME_H +#define _UNINAME_H + +#include "unitypes.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Required size of buffer for a Unicode character name. */ +#define UNINAME_MAX 256 + +/* Looks up the name of a Unicode character, in uppercase ASCII. + Returns the filled buf, or NULL if the character does not have a name. */ +extern char * + unicode_character_name (ucs4_t uc, char *buf); + +/* Looks up the Unicode character with a given name, in upper- or lowercase + ASCII. Returns the character if found, or UNINAME_INVALID if not found. */ +extern ucs4_t + unicode_name_character (const char *name) + _UC_ATTRIBUTE_PURE; +#define UNINAME_INVALID ((ucs4_t) 0xFFFF) + +#ifdef __cplusplus +} +#endif + +#endif /* _UNINAME_H */ diff --git a/miniconda3/pkgs/libunistring-1.3-hb25bd0a_0/include/uninorm.h b/miniconda3/pkgs/libunistring-1.3-hb25bd0a_0/include/uninorm.h new file mode 100644 index 0000000000000000000000000000000000000000..a3cc4a9ce6287df6ecb8057a50d4f99f648d7f2d --- /dev/null +++ b/miniconda3/pkgs/libunistring-1.3-hb25bd0a_0/include/uninorm.h @@ -0,0 +1,259 @@ +/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ +/* Normalization forms (composition and decomposition) of Unicode strings. + Copyright (C) 2001-2002, 2009-2024 Free Software Foundation, Inc. + Written by Bruno Haible , 2009. + + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. + + This file is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +#ifndef _UNINORM_H +#define _UNINORM_H + +/* Get common macros for C. */ +#include + +/* Get size_t. */ +#include + +#include "unitypes.h" + +#if 1 +# include +#else +# define LIBUNISTRING_DLL_VARIABLE +#endif + + +#ifdef __cplusplus +extern "C" { +#endif + + +/* Conventions: + + All functions prefixed with u8_ operate on UTF-8 encoded strings. + Their unit is an uint8_t (1 byte). + + All functions prefixed with u16_ operate on UTF-16 encoded strings. + Their unit is an uint16_t (a 2-byte word). + + All functions prefixed with u32_ operate on UCS-4 encoded strings. + Their unit is an uint32_t (a 4-byte word). + + All argument pairs (s, n) denote a Unicode string s[0..n-1] with exactly + n units. + + Functions returning a string result take a (resultbuf, lengthp) argument + pair. If resultbuf is not NULL and the result fits into *lengthp units, + it is put in resultbuf, and resultbuf is returned. Otherwise, a freshly + allocated string is returned. In both cases, *lengthp is set to the + length (number of units) of the returned string. In case of error, + NULL is returned and errno is set. */ + + +enum +{ + UC_DECOMP_CANONICAL,/* Canonical decomposition. */ + UC_DECOMP_FONT, /* A font variant (e.g. a blackletter form). */ + UC_DECOMP_NOBREAK, /* A no-break version of a space or hyphen. */ + UC_DECOMP_INITIAL, /* An initial presentation form (Arabic). */ + UC_DECOMP_MEDIAL, /* A medial presentation form (Arabic). */ + UC_DECOMP_FINAL, /* A final presentation form (Arabic). */ + UC_DECOMP_ISOLATED,/* An isolated presentation form (Arabic). */ + UC_DECOMP_CIRCLE, /* An encircled form. */ + UC_DECOMP_SUPER, /* A superscript form. */ + UC_DECOMP_SUB, /* A subscript form. */ + UC_DECOMP_VERTICAL,/* A vertical layout presentation form. */ + UC_DECOMP_WIDE, /* A wide (or zenkaku) compatibility character. */ + UC_DECOMP_NARROW, /* A narrow (or hankaku) compatibility character. */ + UC_DECOMP_SMALL, /* A small variant form (CNS compatibility). */ + UC_DECOMP_SQUARE, /* A CJK squared font variant. */ + UC_DECOMP_FRACTION,/* A vulgar fraction form. */ + UC_DECOMP_COMPAT /* Otherwise unspecified compatibility character. */ +}; + +/* Maximum size of decomposition of a single Unicode character. */ +#define UC_DECOMPOSITION_MAX_LENGTH 32 + +/* Return the character decomposition mapping of a Unicode character. + DECOMPOSITION must point to an array of at least UC_DECOMPOSITION_MAX_LENGTH + ucs_t elements. + When a decomposition exists, DECOMPOSITION[0..N-1] and *DECOMP_TAG are + filled and N is returned. Otherwise -1 is returned. */ +extern int + uc_decomposition (ucs4_t uc, int *decomp_tag, ucs4_t *decomposition); + +/* Return the canonical character decomposition mapping of a Unicode character. + DECOMPOSITION must point to an array of at least UC_DECOMPOSITION_MAX_LENGTH + ucs_t elements. + When a decomposition exists, DECOMPOSITION[0..N-1] is filled and N is + returned. Otherwise -1 is returned. */ +extern int + uc_canonical_decomposition (ucs4_t uc, ucs4_t *decomposition); + + +/* Attempt to combine the Unicode characters uc1, uc2. + uc1 is known to have canonical combining class 0. + Return the combination of uc1 and uc2, if it exists. + Return 0 otherwise. + Not all decompositions can be recombined using this function. See the + Unicode file CompositionExclusions.txt for details. */ +extern ucs4_t + uc_composition (ucs4_t uc1, ucs4_t uc2) + _UC_ATTRIBUTE_CONST; + + +/* An object of type uninorm_t denotes a Unicode normalization form. */ +struct unicode_normalization_form; +typedef const struct unicode_normalization_form *uninorm_t; + +/* UNINORM_NFD: Normalization form D: canonical decomposition. */ +extern LIBUNISTRING_DLL_VARIABLE const struct unicode_normalization_form uninorm_nfd; +#define UNINORM_NFD (&uninorm_nfd) + +/* UNINORM_NFC: Normalization form C: canonical decomposition, then + canonical composition. */ +extern LIBUNISTRING_DLL_VARIABLE const struct unicode_normalization_form uninorm_nfc; +#define UNINORM_NFC (&uninorm_nfc) + +/* UNINORM_NFKD: Normalization form KD: compatibility decomposition. */ +extern LIBUNISTRING_DLL_VARIABLE const struct unicode_normalization_form uninorm_nfkd; +#define UNINORM_NFKD (&uninorm_nfkd) + +/* UNINORM_NFKC: Normalization form KC: compatibility decomposition, then + canonical composition. */ +extern LIBUNISTRING_DLL_VARIABLE const struct unicode_normalization_form uninorm_nfkc; +#define UNINORM_NFKC (&uninorm_nfkc) + +/* Test whether a normalization form does compatibility decomposition. */ +#define uninorm_is_compat_decomposing(nf) \ + ((* (const unsigned int *) (nf) >> 0) & 1) + +/* Test whether a normalization form includes canonical composition. */ +#define uninorm_is_composing(nf) \ + ((* (const unsigned int *) (nf) >> 1) & 1) + +/* Return the decomposing variant of a normalization form. + This maps NFC,NFD -> NFD and NFKC,NFKD -> NFKD. */ +extern uninorm_t + uninorm_decomposing_form (uninorm_t nf) + _UC_ATTRIBUTE_PURE; + + +/* Return the specified normalization form of a string. */ +extern uint8_t * + u8_normalize (uninorm_t nf, const uint8_t *s, size_t n, + uint8_t *_UC_RESTRICT resultbuf, size_t *lengthp); +extern uint16_t * + u16_normalize (uninorm_t nf, const uint16_t *s, size_t n, + uint16_t *_UC_RESTRICT resultbuf, size_t *lengthp); +extern uint32_t * + u32_normalize (uninorm_t nf, const uint32_t *s, size_t n, + uint32_t *_UC_RESTRICT resultbuf, size_t *lengthp); + + +/* Compare S1 and S2, ignoring differences in normalization. + NF must be either UNINORM_NFD or UNINORM_NFKD. + If successful, set *RESULTP to -1 if S1 < S2, 0 if S1 = S2, 1 if S1 > S2, and + return 0. Upon failure, return -1 with errno set. */ +extern int + u8_normcmp (const uint8_t *s1, size_t n1, const uint8_t *s2, size_t n2, + uninorm_t nf, int *resultp); +extern int + u16_normcmp (const uint16_t *s1, size_t n1, const uint16_t *s2, size_t n2, + uninorm_t nf, int *resultp); +extern int + u32_normcmp (const uint32_t *s1, size_t n1, const uint32_t *s2, size_t n2, + uninorm_t nf, int *resultp); + + +/* Converts the string S of length N to a NUL-terminated byte sequence, in such + a way that comparing uN_normxfrm (S1) and uN_normxfrm (S2) with uN_cmp2() is + equivalent to comparing S1 and S2 with uN_normcoll(). + NF must be either UNINORM_NFC or UNINORM_NFKC. */ +extern char * + u8_normxfrm (const uint8_t *s, size_t n, uninorm_t nf, + char *resultbuf, size_t *lengthp); +extern char * + u16_normxfrm (const uint16_t *s, size_t n, uninorm_t nf, + char *resultbuf, size_t *lengthp); +extern char * + u32_normxfrm (const uint32_t *s, size_t n, uninorm_t nf, + char *resultbuf, size_t *lengthp); + + +/* Compare S1 and S2, ignoring differences in normalization, using the + collation rules of the current locale. + NF must be either UNINORM_NFC or UNINORM_NFKC. + If successful, set *RESULTP to -1 if S1 < S2, 0 if S1 = S2, 1 if S1 > S2, and + return 0. Upon failure, return -1 with errno set. */ +extern int + u8_normcoll (const uint8_t *s1, size_t n1, const uint8_t *s2, size_t n2, + uninorm_t nf, int *resultp); +extern int + u16_normcoll (const uint16_t *s1, size_t n1, const uint16_t *s2, size_t n2, + uninorm_t nf, int *resultp); +extern int + u32_normcoll (const uint32_t *s1, size_t n1, const uint32_t *s2, size_t n2, + uninorm_t nf, int *resultp); + + +/* Normalization of a stream of Unicode characters. + + A "stream of Unicode characters" is essentially a function that accepts an + ucs4_t argument repeatedly, optionally combined with a function that + "flushes" the stream. */ + +/* Data type of a stream of Unicode characters that normalizes its input + according to a given normalization form and passes the normalized character + sequence to the encapsulated stream of Unicode characters. */ +struct uninorm_filter; + +/* Bring data buffered in the filter to its destination, the encapsulated + stream, then close and free the filter. + Return 0 if successful, or -1 with errno set upon failure. */ +extern int + uninorm_filter_free (struct uninorm_filter *filter); + +/* Create and return a normalization filter for Unicode characters. + The pair (stream_func, stream_data) is the encapsulated stream. + stream_func (stream_data, uc) receives the Unicode character uc + and returns 0 if successful, or -1 with errno set upon failure. + Return the new filter, or NULL with errno set upon failure. */ +extern struct uninorm_filter * + uninorm_filter_create (uninorm_t nf, + int (*stream_func) (void *stream_data, ucs4_t uc), + void *stream_data) + _GL_ATTRIBUTE_DEALLOC (uninorm_filter_free, 1); + +/* Stuff a Unicode character into a normalizing filter. + Return 0 if successful, or -1 with errno set upon failure. */ +extern int + uninorm_filter_write (struct uninorm_filter *filter, ucs4_t uc); + +/* Bring data buffered in the filter to its destination, the encapsulated + stream. + Return 0 if successful, or -1 with errno set upon failure. + Note! If after calling this function, additional characters are written + into the filter, the resulting character sequence in the encapsulated stream + will not necessarily be normalized. */ +extern int + uninorm_filter_flush (struct uninorm_filter *filter); + + +#ifdef __cplusplus +} +#endif + + +#endif /* _UNINORM_H */ diff --git a/miniconda3/pkgs/libunistring-1.3-hb25bd0a_0/include/unistdio.h b/miniconda3/pkgs/libunistring-1.3-hb25bd0a_0/include/unistdio.h new file mode 100644 index 0000000000000000000000000000000000000000..76ec43037c6fdc0754bdc554423e36f138e804b8 --- /dev/null +++ b/miniconda3/pkgs/libunistring-1.3-hb25bd0a_0/include/unistdio.h @@ -0,0 +1,265 @@ +/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ +/* Elementary Unicode string functions. + Copyright (C) 2002, 2005-2007, 2009-2024 Free Software Foundation, Inc. + + This file is free software. + It is dual-licensed under "the GNU LGPLv3+ or the GNU GPLv2+". + You can redistribute it and/or modify it under either + - the terms of the GNU Lesser General Public License as published + by the Free Software Foundation, either version 3, or (at your + option) any later version, or + - the terms of the GNU General Public License as published by the + Free Software Foundation; either version 2, or (at your option) + any later version, or + - the same dual license "the GNU LGPLv3+ or the GNU GPLv2+". + + This file is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License and the GNU General Public License + for more details. + + You should have received a copy of the GNU Lesser General Public + License and of the GNU General Public License along with this + program. If not, see . */ + +#ifndef _UNISTDIO_H +#define _UNISTDIO_H + +#include "unitypes.h" + +/* Get size_t. */ +#include + +/* Get FILE. */ +#include + +/* Get va_list. */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* These work like the printf function family. + In the format string: + The format directive 'U' takes an UTF-8 string (const uint8_t *). + The format directive 'lU' takes an UTF-16 string (const uint16_t *). + The format directive 'llU' takes an UTF-32 string (const uint32_t *). + + The prefix (ulc_, u8_, u16_, u16_) indicates the type of the resulting + string. The prefix 'ulc' stands for "locale encoded". + + An infix 'v' indicates that a va_list is passed instead of multiple + arguments. + + The functions *sprintf have a 'buf' argument that is assumed to be large + enough. (DANGEROUS! Overflowing the buffer will crash the program.) + The functions *snprintf have a 'buf' argument that is assumed to be 'size' + units large. (DANGEROUS! The resulting string might be truncated in the + middle of a multibyte character.) + The functions *asprintf have a 'resultp' argument. The result will be + freshly allocated and stored in *resultp. + The functions *asnprintf have a (resultbuf, lengthp) argument pair. If + resultbuf is not NULL and the result fits into *lengthp units, it is put + in resultbuf, and resultbuf is returned. Otherwise, a freshly allocated + string is returned. In both cases, *lengthp is set to the length (number + of units) of the returned string. In case of error, NULL is returned and + errno is set. + */ + +/* ASCII format string, result in locale dependent encoded 'char *'. */ +extern int + ulc_sprintf (char *_UC_RESTRICT buf, + const char *format, ...); +extern int + ulc_snprintf (char *_UC_RESTRICT buf, size_t size, + const char *format, ...); +extern int + ulc_asprintf (char **resultp, + const char *format, ...); +extern char * + ulc_asnprintf (char *_UC_RESTRICT resultbuf, size_t *lengthp, + const char *format, ...); +extern int + ulc_vsprintf (char *_UC_RESTRICT buf, + const char *format, va_list ap); +extern int + ulc_vsnprintf (char *_UC_RESTRICT buf, size_t size, + const char *format, va_list ap); +extern int + ulc_vasprintf (char **resultp, + const char *format, va_list ap); +extern char * + ulc_vasnprintf (char *_UC_RESTRICT resultbuf, size_t *lengthp, + const char *format, va_list ap); + +/* ASCII format string, result in UTF-8 format. */ +extern int + u8_sprintf (uint8_t *buf, + const char *format, ...); +extern int + u8_snprintf (uint8_t *buf, size_t size, + const char *format, ...); +extern int + u8_asprintf (uint8_t **resultp, + const char *format, ...); +extern uint8_t * + u8_asnprintf (uint8_t *resultbuf, size_t *lengthp, + const char *format, ...); +extern int + u8_vsprintf (uint8_t *buf, + const char *format, va_list ap); +extern int + u8_vsnprintf (uint8_t *buf, size_t size, + const char *format, va_list ap); +extern int + u8_vasprintf (uint8_t **resultp, + const char *format, va_list ap); +extern uint8_t * + u8_vasnprintf (uint8_t *resultbuf, size_t *lengthp, + const char *format, va_list ap); + +/* UTF-8 format string, result in UTF-8 format. */ +extern int + u8_u8_sprintf (uint8_t *_UC_RESTRICT buf, + const uint8_t *format, ...); +extern int + u8_u8_snprintf (uint8_t *_UC_RESTRICT buf, size_t size, + const uint8_t *format, ...); +extern int + u8_u8_asprintf (uint8_t **resultp, + const uint8_t *format, ...); +extern uint8_t * + u8_u8_asnprintf (uint8_t *_UC_RESTRICT resultbuf, size_t *lengthp, + const uint8_t *format, ...); +extern int + u8_u8_vsprintf (uint8_t *_UC_RESTRICT buf, + const uint8_t *format, va_list ap); +extern int + u8_u8_vsnprintf (uint8_t *_UC_RESTRICT buf, size_t size, + const uint8_t *format, va_list ap); +extern int + u8_u8_vasprintf (uint8_t **resultp, + const uint8_t *format, va_list ap); +extern uint8_t * + u8_u8_vasnprintf (uint8_t *_UC_RESTRICT resultbuf, size_t *lengthp, + const uint8_t *format, va_list ap); + +/* ASCII format string, result in UTF-16 format. */ +extern int + u16_sprintf (uint16_t *buf, + const char *format, ...); +extern int + u16_snprintf (uint16_t *buf, size_t size, + const char *format, ...); +extern int + u16_asprintf (uint16_t **resultp, + const char *format, ...); +extern uint16_t * + u16_asnprintf (uint16_t *resultbuf, size_t *lengthp, + const char *format, ...); +extern int + u16_vsprintf (uint16_t *buf, + const char *format, va_list ap); +extern int + u16_vsnprintf (uint16_t *buf, size_t size, + const char *format, va_list ap); +extern int + u16_vasprintf (uint16_t **resultp, + const char *format, va_list ap); +extern uint16_t * + u16_vasnprintf (uint16_t *resultbuf, size_t *lengthp, + const char *format, va_list ap); + +/* UTF-16 format string, result in UTF-16 format. */ +extern int + u16_u16_sprintf (uint16_t *_UC_RESTRICT buf, + const uint16_t *format, ...); +extern int + u16_u16_snprintf (uint16_t *_UC_RESTRICT buf, size_t size, + const uint16_t *format, ...); +extern int + u16_u16_asprintf (uint16_t **resultp, + const uint16_t *format, ...); +extern uint16_t * + u16_u16_asnprintf (uint16_t *_UC_RESTRICT resultbuf, size_t *lengthp, + const uint16_t *format, ...); +extern int + u16_u16_vsprintf (uint16_t *_UC_RESTRICT buf, + const uint16_t *format, va_list ap); +extern int + u16_u16_vsnprintf (uint16_t *_UC_RESTRICT buf, size_t size, + const uint16_t *format, va_list ap); +extern int + u16_u16_vasprintf (uint16_t **resultp, + const uint16_t *format, va_list ap); +extern uint16_t * + u16_u16_vasnprintf (uint16_t *_UC_RESTRICT resultbuf, size_t *lengthp, + const uint16_t *format, va_list ap); + +/* ASCII format string, result in UTF-32 format. */ +extern int + u32_sprintf (uint32_t *buf, + const char *format, ...); +extern int + u32_snprintf (uint32_t *buf, size_t size, + const char *format, ...); +extern int + u32_asprintf (uint32_t **resultp, + const char *format, ...); +extern uint32_t * + u32_asnprintf (uint32_t *resultbuf, size_t *lengthp, + const char *format, ...); +extern int + u32_vsprintf (uint32_t *buf, + const char *format, va_list ap); +extern int + u32_vsnprintf (uint32_t *buf, size_t size, + const char *format, va_list ap); +extern int + u32_vasprintf (uint32_t **resultp, + const char *format, va_list ap); +extern uint32_t * + u32_vasnprintf (uint32_t *resultbuf, size_t *lengthp, + const char *format, va_list ap); + +/* UTF-32 format string, result in UTF-32 format. */ +extern int + u32_u32_sprintf (uint32_t *_UC_RESTRICT buf, + const uint32_t *format, ...); +extern int + u32_u32_snprintf (uint32_t *_UC_RESTRICT buf, size_t size, + const uint32_t *format, ...); +extern int + u32_u32_asprintf (uint32_t **resultp, + const uint32_t *format, ...); +extern uint32_t * + u32_u32_asnprintf (uint32_t *_UC_RESTRICT resultbuf, size_t *lengthp, + const uint32_t *format, ...); +extern int + u32_u32_vsprintf (uint32_t *_UC_RESTRICT buf, + const uint32_t *format, va_list ap); +extern int + u32_u32_vsnprintf (uint32_t *_UC_RESTRICT buf, size_t size, + const uint32_t *format, va_list ap); +extern int + u32_u32_vasprintf (uint32_t **resultp, + const uint32_t *format, va_list ap); +extern uint32_t * + u32_u32_vasnprintf (uint32_t *_UC_RESTRICT resultbuf, size_t *lengthp, + const uint32_t *format, va_list ap); + +/* ASCII format string, output to FILE in locale dependent encoding. */ +extern int + ulc_fprintf (FILE *stream, + const char *format, ...); +extern int + ulc_vfprintf (FILE *stream, + const char *format, va_list ap); + +#ifdef __cplusplus +} +#endif + +#endif /* _UNISTDIO_H */ diff --git a/miniconda3/pkgs/libunistring-1.3-hb25bd0a_0/include/unistr.h b/miniconda3/pkgs/libunistring-1.3-hb25bd0a_0/include/unistr.h new file mode 100644 index 0000000000000000000000000000000000000000..ad31f75f2c7d234798dea9f1e68a80f10c259486 --- /dev/null +++ b/miniconda3/pkgs/libunistring-1.3-hb25bd0a_0/include/unistr.h @@ -0,0 +1,769 @@ +/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ +/* Elementary Unicode string functions. + Copyright (C) 2001-2002, 2005-2024 Free Software Foundation, Inc. + + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. + + This file is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +#ifndef _UNISTR_H +#define _UNISTR_H + +#include "unitypes.h" + +/* Get common macros for C. */ +#include + +/* Get inline if available. */ +#include + +/* Get bool. */ +#include + +/* Get size_t, ptrdiff_t. */ +#include + +/* Get free(). */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + + +/* Conventions: + + All functions prefixed with u8_ operate on UTF-8 encoded strings. + Their unit is an uint8_t (1 byte). + + All functions prefixed with u16_ operate on UTF-16 encoded strings. + Their unit is an uint16_t (a 2-byte word). + + All functions prefixed with u32_ operate on UCS-4 encoded strings. + Their unit is an uint32_t (a 4-byte word). + + All argument pairs (s, n) denote a Unicode string s[0..n-1] with exactly + n units. + + All arguments starting with "str" and the arguments of functions starting + with u8_str/u16_str/u32_str denote a NUL terminated string, i.e. a string + which terminates at the first NUL unit. This termination unit is + considered part of the string for all memory allocation purposes, but + is not considered part of the string for all other logical purposes. + + Functions returning a string result take a (resultbuf, lengthp) argument + pair. If resultbuf is not NULL and the result fits into *lengthp units, + it is put in resultbuf, and resultbuf is returned. Otherwise, a freshly + allocated string is returned. In both cases, *lengthp is set to the + length (number of units) of the returned string. In case of error, + NULL is returned and errno is set. */ + + +/* Elementary string checks. */ + +/* Check whether an UTF-8 string is well-formed. + Return NULL if valid, or a pointer to the first invalid unit otherwise. */ +extern const uint8_t * + u8_check (const uint8_t *s, size_t n) + _UC_ATTRIBUTE_PURE; + +/* Check whether an UTF-16 string is well-formed. + Return NULL if valid, or a pointer to the first invalid unit otherwise. */ +extern const uint16_t * + u16_check (const uint16_t *s, size_t n) + _UC_ATTRIBUTE_PURE; + +/* Check whether an UCS-4 string is well-formed. + Return NULL if valid, or a pointer to the first invalid unit otherwise. */ +extern const uint32_t * + u32_check (const uint32_t *s, size_t n) + _UC_ATTRIBUTE_PURE; + + +/* Elementary string conversions. */ + +/* Convert an UTF-8 string to an UTF-16 string. */ +extern uint16_t * + u8_to_u16 (const uint8_t *s, size_t n, uint16_t *resultbuf, + size_t *lengthp); + +/* Convert an UTF-8 string to an UCS-4 string. */ +extern uint32_t * + u8_to_u32 (const uint8_t *s, size_t n, uint32_t *resultbuf, + size_t *lengthp); + +/* Convert an UTF-16 string to an UTF-8 string. */ +extern uint8_t * + u16_to_u8 (const uint16_t *s, size_t n, uint8_t *resultbuf, + size_t *lengthp); + +/* Convert an UTF-16 string to an UCS-4 string. */ +extern uint32_t * + u16_to_u32 (const uint16_t *s, size_t n, uint32_t *resultbuf, + size_t *lengthp); + +/* Convert an UCS-4 string to an UTF-8 string. */ +extern uint8_t * + u32_to_u8 (const uint32_t *s, size_t n, uint8_t *resultbuf, + size_t *lengthp); + +/* Convert an UCS-4 string to an UTF-16 string. */ +extern uint16_t * + u32_to_u16 (const uint32_t *s, size_t n, uint16_t *resultbuf, + size_t *lengthp); + + +/* Elementary string functions. */ + +/* Return the length (number of units) of the first character in S, which is + no longer than N. Return 0 if it is the NUL character. Return -1 upon + failure. */ +/* Similar to mblen(), except that s must not be NULL. */ +extern int + u8_mblen (const uint8_t *s, size_t n) + _UC_ATTRIBUTE_PURE; +extern int + u16_mblen (const uint16_t *s, size_t n) + _UC_ATTRIBUTE_PURE; +extern int + u32_mblen (const uint32_t *s, size_t n) + _UC_ATTRIBUTE_PURE; + +/* Return the length (number of units) of the first character in S, putting + its 'ucs4_t' representation in *PUC. Upon failure, *PUC is set to 0xfffd, + and an appropriate number of units is returned. + The number of available units, N, must be > 0. */ +/* Similar to mbtowc(), except that puc and s must not be NULL, n must be > 0, + and the NUL character is not treated specially. */ +/* The variants with _unsafe suffix are for backward compatibility with + libunistring versions < 0.9.7. */ + +#if 1 +# if !UNISTRING_HAVE_INLINE +extern int + u8_mbtouc_unsafe (ucs4_t *puc, const uint8_t *s, size_t n); +# else +extern int + u8_mbtouc_unsafe_aux (ucs4_t *puc, const uint8_t *s, size_t n); +static inline int +u8_mbtouc_unsafe (ucs4_t *puc, const uint8_t *s, size_t n) +{ + uint8_t c = *s; + + if (c < 0x80) + { + *puc = c; + return 1; + } + else + return u8_mbtouc_unsafe_aux (puc, s, n); +} +# endif +#endif + +#if 1 +# if !UNISTRING_HAVE_INLINE +extern int + u16_mbtouc_unsafe (ucs4_t *puc, const uint16_t *s, size_t n); +# else +extern int + u16_mbtouc_unsafe_aux (ucs4_t *puc, const uint16_t *s, size_t n); +static inline int +u16_mbtouc_unsafe (ucs4_t *puc, const uint16_t *s, size_t n) +{ + uint16_t c = *s; + + if (c < 0xd800 || c >= 0xe000) + { + *puc = c; + return 1; + } + else + return u16_mbtouc_unsafe_aux (puc, s, n); +} +# endif +#endif + +#if 1 +# if !UNISTRING_HAVE_INLINE +extern int + u32_mbtouc_unsafe (ucs4_t *puc, const uint32_t *s, size_t n); +# else +static inline int +u32_mbtouc_unsafe (ucs4_t *puc, + const uint32_t *s, _GL_ATTRIBUTE_MAYBE_UNUSED size_t n) +{ + uint32_t c = *s; + + if (c < 0xd800 || (c >= 0xe000 && c < 0x110000)) + *puc = c; + else + /* invalid multibyte character */ + *puc = 0xfffd; + return 1; +} +# endif +#endif + +#if 1 +# if !UNISTRING_HAVE_INLINE +extern int + u8_mbtouc (ucs4_t *puc, const uint8_t *s, size_t n); +# else +extern int + u8_mbtouc_aux (ucs4_t *puc, const uint8_t *s, size_t n); +static inline int +u8_mbtouc (ucs4_t *puc, const uint8_t *s, size_t n) +{ + uint8_t c = *s; + + if (c < 0x80) + { + *puc = c; + return 1; + } + else + return u8_mbtouc_aux (puc, s, n); +} +# endif +#endif + +#if 1 +# if !UNISTRING_HAVE_INLINE +extern int + u16_mbtouc (ucs4_t *puc, const uint16_t *s, size_t n); +# else +extern int + u16_mbtouc_aux (ucs4_t *puc, const uint16_t *s, size_t n); +static inline int +u16_mbtouc (ucs4_t *puc, const uint16_t *s, size_t n) +{ + uint16_t c = *s; + + if (c < 0xd800 || c >= 0xe000) + { + *puc = c; + return 1; + } + else + return u16_mbtouc_aux (puc, s, n); +} +# endif +#endif + +#if 1 +# if !UNISTRING_HAVE_INLINE +extern int + u32_mbtouc (ucs4_t *puc, const uint32_t *s, size_t n); +# else +static inline int +u32_mbtouc (ucs4_t *puc, const uint32_t *s, + _GL_ATTRIBUTE_MAYBE_UNUSED size_t n) +{ + uint32_t c = *s; + + if (c < 0xd800 || (c >= 0xe000 && c < 0x110000)) + *puc = c; + else + /* invalid multibyte character */ + *puc = 0xfffd; + return 1; +} +# endif +#endif + +/* Return the length (number of units) of the first character in S, putting + its 'ucs4_t' representation in *PUC. Upon failure, *PUC is set to 0xfffd, + and -1 is returned for an invalid sequence of units, -2 is returned for an + incomplete sequence of units. + The number of available units, N, must be > 0. */ +/* Similar to u*_mbtouc(), except that the return value gives more details + about the failure, similar to mbrtowc(). */ + +#if 1 +extern int + u8_mbtoucr (ucs4_t *puc, const uint8_t *s, size_t n); +#endif + +#if 1 +extern int + u16_mbtoucr (ucs4_t *puc, const uint16_t *s, size_t n); +#endif + +#if 1 +extern int + u32_mbtoucr (ucs4_t *puc, const uint32_t *s, size_t n); +#endif + +/* Put the multibyte character represented by UC in S, returning its + length. Return -1 upon failure, -2 if the number of available units, N, + is too small. The latter case cannot occur if N >= 6/2/1, respectively. */ +/* Similar to wctomb(), except that s must not be NULL, and the argument n + must be specified. */ + +#if 1 +/* Auxiliary function, also used by u8_chr, u8_strchr, u8_strrchr. */ +extern int + u8_uctomb_aux (uint8_t *s, ucs4_t uc, ptrdiff_t n); +# if !UNISTRING_HAVE_INLINE +extern int + u8_uctomb (uint8_t *s, ucs4_t uc, ptrdiff_t n); +# else +static inline int +u8_uctomb (uint8_t *s, ucs4_t uc, ptrdiff_t n) +{ + if (uc < 0x80 && n > 0) + { + s[0] = uc; + return 1; + } + else + return u8_uctomb_aux (s, uc, n); +} +# endif +#endif + +#if 1 +/* Auxiliary function, also used by u16_chr, u16_strchr, u16_strrchr. */ +extern int + u16_uctomb_aux (uint16_t *s, ucs4_t uc, ptrdiff_t n); +# if !UNISTRING_HAVE_INLINE +extern int + u16_uctomb (uint16_t *s, ucs4_t uc, ptrdiff_t n); +# else +static inline int +u16_uctomb (uint16_t *s, ucs4_t uc, ptrdiff_t n) +{ + if (uc < 0xd800 && n > 0) + { + s[0] = uc; + return 1; + } + else + return u16_uctomb_aux (s, uc, n); +} +# endif +#endif + +#if 1 +# if !UNISTRING_HAVE_INLINE +extern int + u32_uctomb (uint32_t *s, ucs4_t uc, ptrdiff_t n); +# else +static inline int +u32_uctomb (uint32_t *s, ucs4_t uc, ptrdiff_t n) +{ + if (uc < 0xd800 || (uc >= 0xe000 && uc < 0x110000)) + { + if (n > 0) + { + *s = uc; + return 1; + } + else + return -2; + } + else + return -1; +} +# endif +#endif + +/* Copy N units from SRC to DEST. */ +/* Similar to memcpy(). */ +extern uint8_t * + u8_cpy (uint8_t *_UC_RESTRICT dest, const uint8_t *src, size_t n); +extern uint16_t * + u16_cpy (uint16_t *_UC_RESTRICT dest, const uint16_t *src, size_t n); +extern uint32_t * + u32_cpy (uint32_t *_UC_RESTRICT dest, const uint32_t *src, size_t n); + +/* Copy N units from SRC to DEST, returning pointer after last written unit. */ +/* Similar to mempcpy(). */ +extern uint8_t * + u8_pcpy (uint8_t *_UC_RESTRICT dest, const uint8_t *src, size_t n); +extern uint16_t * + u16_pcpy (uint16_t *_UC_RESTRICT dest, const uint16_t *src, size_t n); +extern uint32_t * + u32_pcpy (uint32_t *_UC_RESTRICT dest, const uint32_t *src, size_t n); + +/* Copy N units from SRC to DEST, guaranteeing correct behavior for + overlapping memory areas. */ +/* Similar to memmove(). */ +extern uint8_t * + u8_move (uint8_t *dest, const uint8_t *src, size_t n); +extern uint16_t * + u16_move (uint16_t *dest, const uint16_t *src, size_t n); +extern uint32_t * + u32_move (uint32_t *dest, const uint32_t *src, size_t n); + +/* Set the first N characters of S to UC. UC should be a character that + occupies only 1 unit. */ +/* Similar to memset(). */ +extern uint8_t * + u8_set (uint8_t *s, ucs4_t uc, size_t n); +extern uint16_t * + u16_set (uint16_t *s, ucs4_t uc, size_t n); +extern uint32_t * + u32_set (uint32_t *s, ucs4_t uc, size_t n); + +/* Compare S1 and S2, each of length N. */ +/* Similar to memcmp(). */ +extern int + u8_cmp (const uint8_t *s1, const uint8_t *s2, size_t n) + _UC_ATTRIBUTE_PURE; +extern int + u16_cmp (const uint16_t *s1, const uint16_t *s2, size_t n) + _UC_ATTRIBUTE_PURE; +extern int + u32_cmp (const uint32_t *s1, const uint32_t *s2, size_t n) + _UC_ATTRIBUTE_PURE; + +/* Compare S1 and S2. */ +/* Similar to the gnulib function memcmp2(). */ +extern int + u8_cmp2 (const uint8_t *s1, size_t n1, const uint8_t *s2, size_t n2) + _UC_ATTRIBUTE_PURE; +extern int + u16_cmp2 (const uint16_t *s1, size_t n1, const uint16_t *s2, size_t n2) + _UC_ATTRIBUTE_PURE; +extern int + u32_cmp2 (const uint32_t *s1, size_t n1, const uint32_t *s2, size_t n2) + _UC_ATTRIBUTE_PURE; + +/* Search the string at S for UC. */ +/* Similar to memchr(). */ +extern uint8_t * + u8_chr (const uint8_t *s, size_t n, ucs4_t uc) + _UC_ATTRIBUTE_PURE; +extern uint16_t * + u16_chr (const uint16_t *s, size_t n, ucs4_t uc) + _UC_ATTRIBUTE_PURE; +extern uint32_t * + u32_chr (const uint32_t *s, size_t n, ucs4_t uc) + _UC_ATTRIBUTE_PURE; + +/* Count the number of Unicode characters in the N units from S. */ +/* Similar to mbsnlen(). */ +extern size_t + u8_mbsnlen (const uint8_t *s, size_t n) + _UC_ATTRIBUTE_PURE; +extern size_t + u16_mbsnlen (const uint16_t *s, size_t n) + _UC_ATTRIBUTE_PURE; +extern size_t + u32_mbsnlen (const uint32_t *s, size_t n) + _UC_ATTRIBUTE_PURE; + +/* Elementary string functions with memory allocation. */ + +/* Make a freshly allocated copy of S, of length N. */ +extern uint8_t * + u8_cpy_alloc (const uint8_t *s, size_t n); +extern uint16_t * + u16_cpy_alloc (const uint16_t *s, size_t n); +extern uint32_t * + u32_cpy_alloc (const uint32_t *s, size_t n); + +/* Elementary string functions on NUL terminated strings. */ + +/* Return the length (number of units) of the first character in S. + Return 0 if it is the NUL character. Return -1 upon failure. */ +extern int + u8_strmblen (const uint8_t *s) + _UC_ATTRIBUTE_PURE; +extern int + u16_strmblen (const uint16_t *s) + _UC_ATTRIBUTE_PURE; +extern int + u32_strmblen (const uint32_t *s) + _UC_ATTRIBUTE_PURE; + +/* Return the length (number of units) of the first character in S, putting + its 'ucs4_t' representation in *PUC. Return 0 if it is the NUL + character. Return -1 upon failure. */ +extern int + u8_strmbtouc (ucs4_t *puc, const uint8_t *s); +extern int + u16_strmbtouc (ucs4_t *puc, const uint16_t *s); +extern int + u32_strmbtouc (ucs4_t *puc, const uint32_t *s); + +/* Forward iteration step. Advances the pointer past the next character, + or returns NULL if the end of the string has been reached. Puts the + character's 'ucs4_t' representation in *PUC. */ +extern const uint8_t * + u8_next (ucs4_t *puc, const uint8_t *s); +extern const uint16_t * + u16_next (ucs4_t *puc, const uint16_t *s); +extern const uint32_t * + u32_next (ucs4_t *puc, const uint32_t *s); + +/* Backward iteration step. Advances the pointer to point to the previous + character, or returns NULL if the beginning of the string had been reached. + Puts the character's 'ucs4_t' representation in *PUC. */ +extern const uint8_t * + u8_prev (ucs4_t *puc, const uint8_t *s, const uint8_t *start); +extern const uint16_t * + u16_prev (ucs4_t *puc, const uint16_t *s, const uint16_t *start); +extern const uint32_t * + u32_prev (ucs4_t *puc, const uint32_t *s, const uint32_t *start); + +/* Return the number of units in S. */ +/* Similar to strlen(), wcslen(). */ +extern size_t + u8_strlen (const uint8_t *s) + _UC_ATTRIBUTE_PURE; +extern size_t + u16_strlen (const uint16_t *s) + _UC_ATTRIBUTE_PURE; +extern size_t + u32_strlen (const uint32_t *s) + _UC_ATTRIBUTE_PURE; + +/* Return the number of units in S, but at most MAXLEN. */ +/* Similar to strnlen(), wcsnlen(). */ +extern size_t + u8_strnlen (const uint8_t *s, size_t maxlen) + _UC_ATTRIBUTE_PURE; +extern size_t + u16_strnlen (const uint16_t *s, size_t maxlen) + _UC_ATTRIBUTE_PURE; +extern size_t + u32_strnlen (const uint32_t *s, size_t maxlen) + _UC_ATTRIBUTE_PURE; + +/* Copy SRC to DEST. */ +/* Similar to strcpy(), wcscpy(). */ +extern uint8_t * + u8_strcpy (uint8_t *_UC_RESTRICT dest, const uint8_t *src); +extern uint16_t * + u16_strcpy (uint16_t *_UC_RESTRICT dest, const uint16_t *src); +extern uint32_t * + u32_strcpy (uint32_t *_UC_RESTRICT dest, const uint32_t *src); + +/* Copy SRC to DEST, returning the address of the terminating NUL in DEST. */ +/* Similar to stpcpy(). */ +extern uint8_t * + u8_stpcpy (uint8_t *_UC_RESTRICT dest, const uint8_t *src); +extern uint16_t * + u16_stpcpy (uint16_t *_UC_RESTRICT dest, const uint16_t *src); +extern uint32_t * + u32_stpcpy (uint32_t *_UC_RESTRICT dest, const uint32_t *src); + +/* Copy no more than N units of SRC to DEST. */ +/* Similar to strncpy(), wcsncpy(). */ +extern uint8_t * + u8_strncpy (uint8_t *_UC_RESTRICT dest, const uint8_t *src, size_t n); +extern uint16_t * + u16_strncpy (uint16_t *_UC_RESTRICT dest, const uint16_t *src, size_t n); +extern uint32_t * + u32_strncpy (uint32_t *_UC_RESTRICT dest, const uint32_t *src, size_t n); + +/* Copy no more than N units of SRC to DEST. Return a pointer past the last + non-NUL unit written into DEST. */ +/* Similar to stpncpy(). */ +extern uint8_t * + u8_stpncpy (uint8_t *_UC_RESTRICT dest, const uint8_t *src, size_t n); +extern uint16_t * + u16_stpncpy (uint16_t *_UC_RESTRICT dest, const uint16_t *src, size_t n); +extern uint32_t * + u32_stpncpy (uint32_t *_UC_RESTRICT dest, const uint32_t *src, size_t n); + +/* Append SRC onto DEST. */ +/* Similar to strcat(), wcscat(). */ +extern uint8_t * + u8_strcat (uint8_t *_UC_RESTRICT dest, const uint8_t *src); +extern uint16_t * + u16_strcat (uint16_t *_UC_RESTRICT dest, const uint16_t *src); +extern uint32_t * + u32_strcat (uint32_t *_UC_RESTRICT dest, const uint32_t *src); + +/* Append no more than N units of SRC onto DEST. */ +/* Similar to strncat(), wcsncat(). */ +extern uint8_t * + u8_strncat (uint8_t *_UC_RESTRICT dest, const uint8_t *src, size_t n); +extern uint16_t * + u16_strncat (uint16_t *_UC_RESTRICT dest, const uint16_t *src, size_t n); +extern uint32_t * + u32_strncat (uint32_t *_UC_RESTRICT dest, const uint32_t *src, size_t n); + +/* Compare S1 and S2. */ +/* Similar to strcmp(), wcscmp(). */ +#ifdef __sun +/* Avoid a collision with the u8_strcmp() function in Solaris 11 libc. */ +extern int + u8_strcmp_gnu (const uint8_t *s1, const uint8_t *s2) + _UC_ATTRIBUTE_PURE; +# define u8_strcmp u8_strcmp_gnu +#else +extern int + u8_strcmp (const uint8_t *s1, const uint8_t *s2) + _UC_ATTRIBUTE_PURE; +#endif +extern int + u16_strcmp (const uint16_t *s1, const uint16_t *s2) + _UC_ATTRIBUTE_PURE; +extern int + u32_strcmp (const uint32_t *s1, const uint32_t *s2) + _UC_ATTRIBUTE_PURE; + +/* Compare S1 and S2 using the collation rules of the current locale. + Return -1 if S1 < S2, 0 if S1 = S2, 1 if S1 > S2. + Upon failure, set errno and return any value. */ +/* Similar to strcoll(), wcscoll(). */ +extern int + u8_strcoll (const uint8_t *s1, const uint8_t *s2); +extern int + u16_strcoll (const uint16_t *s1, const uint16_t *s2); +extern int + u32_strcoll (const uint32_t *s1, const uint32_t *s2); + +/* Compare no more than N units of S1 and S2. */ +/* Similar to strncmp(), wcsncmp(). */ +extern int + u8_strncmp (const uint8_t *s1, const uint8_t *s2, size_t n) + _UC_ATTRIBUTE_PURE; +extern int + u16_strncmp (const uint16_t *s1, const uint16_t *s2, size_t n) + _UC_ATTRIBUTE_PURE; +extern int + u32_strncmp (const uint32_t *s1, const uint32_t *s2, size_t n) + _UC_ATTRIBUTE_PURE; + +/* Duplicate S, returning an identical malloc'd string. */ +/* Similar to strdup(), wcsdup(). */ +extern uint8_t * + u8_strdup (const uint8_t *s) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE; +extern uint16_t * + u16_strdup (const uint16_t *s) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE; +extern uint32_t * + u32_strdup (const uint32_t *s) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE; + +/* Find the first occurrence of UC in STR. */ +/* Similar to strchr(), wcschr(). */ +extern uint8_t * + u8_strchr (const uint8_t *str, ucs4_t uc) + _UC_ATTRIBUTE_PURE; +extern uint16_t * + u16_strchr (const uint16_t *str, ucs4_t uc) + _UC_ATTRIBUTE_PURE; +extern uint32_t * + u32_strchr (const uint32_t *str, ucs4_t uc) + _UC_ATTRIBUTE_PURE; + +/* Find the last occurrence of UC in STR. */ +/* Similar to strrchr(), wcsrchr(). */ +extern uint8_t * + u8_strrchr (const uint8_t *str, ucs4_t uc) + _UC_ATTRIBUTE_PURE; +extern uint16_t * + u16_strrchr (const uint16_t *str, ucs4_t uc) + _UC_ATTRIBUTE_PURE; +extern uint32_t * + u32_strrchr (const uint32_t *str, ucs4_t uc) + _UC_ATTRIBUTE_PURE; + +/* Return the length of the initial segment of STR which consists entirely + of Unicode characters not in REJECT. */ +/* Similar to strcspn(), wcscspn(). */ +extern size_t + u8_strcspn (const uint8_t *str, const uint8_t *reject) + _UC_ATTRIBUTE_PURE; +extern size_t + u16_strcspn (const uint16_t *str, const uint16_t *reject) + _UC_ATTRIBUTE_PURE; +extern size_t + u32_strcspn (const uint32_t *str, const uint32_t *reject) + _UC_ATTRIBUTE_PURE; + +/* Return the length of the initial segment of STR which consists entirely + of Unicode characters in ACCEPT. */ +/* Similar to strspn(), wcsspn(). */ +extern size_t + u8_strspn (const uint8_t *str, const uint8_t *accept) + _UC_ATTRIBUTE_PURE; +extern size_t + u16_strspn (const uint16_t *str, const uint16_t *accept) + _UC_ATTRIBUTE_PURE; +extern size_t + u32_strspn (const uint32_t *str, const uint32_t *accept) + _UC_ATTRIBUTE_PURE; + +/* Find the first occurrence in STR of any character in ACCEPT. */ +/* Similar to strpbrk(), wcspbrk(). */ +extern uint8_t * + u8_strpbrk (const uint8_t *str, const uint8_t *accept) + _UC_ATTRIBUTE_PURE; +extern uint16_t * + u16_strpbrk (const uint16_t *str, const uint16_t *accept) + _UC_ATTRIBUTE_PURE; +extern uint32_t * + u32_strpbrk (const uint32_t *str, const uint32_t *accept) + _UC_ATTRIBUTE_PURE; + +/* Find the first occurrence of NEEDLE in HAYSTACK. */ +/* Similar to strstr(), wcsstr(). */ +extern uint8_t * + u8_strstr (const uint8_t *haystack, const uint8_t *needle) + _UC_ATTRIBUTE_PURE; +extern uint16_t * + u16_strstr (const uint16_t *haystack, const uint16_t *needle) + _UC_ATTRIBUTE_PURE; +extern uint32_t * + u32_strstr (const uint32_t *haystack, const uint32_t *needle) + _UC_ATTRIBUTE_PURE; + +/* Test whether STR starts with PREFIX. */ +extern bool + u8_startswith (const uint8_t *str, const uint8_t *prefix) + _UC_ATTRIBUTE_PURE; +extern bool + u16_startswith (const uint16_t *str, const uint16_t *prefix) + _UC_ATTRIBUTE_PURE; +extern bool + u32_startswith (const uint32_t *str, const uint32_t *prefix) + _UC_ATTRIBUTE_PURE; + +/* Test whether STR ends with SUFFIX. */ +extern bool + u8_endswith (const uint8_t *str, const uint8_t *suffix) + _UC_ATTRIBUTE_PURE; +extern bool + u16_endswith (const uint16_t *str, const uint16_t *suffix) + _UC_ATTRIBUTE_PURE; +extern bool + u32_endswith (const uint32_t *str, const uint32_t *suffix) + _UC_ATTRIBUTE_PURE; + +/* Divide STR into tokens separated by characters in DELIM. + This interface is actually more similar to wcstok than to strtok. */ +/* Similar to strtok_r(), wcstok(). */ +extern uint8_t * + u8_strtok (uint8_t *_UC_RESTRICT str, const uint8_t *delim, + uint8_t **ptr); +extern uint16_t * + u16_strtok (uint16_t *_UC_RESTRICT str, const uint16_t *delim, + uint16_t **ptr); +extern uint32_t * + u32_strtok (uint32_t *_UC_RESTRICT str, const uint32_t *delim, + uint32_t **ptr); + + +#ifdef __cplusplus +} +#endif + +#endif /* _UNISTR_H */ diff --git a/miniconda3/pkgs/libunistring-1.3-hb25bd0a_0/include/unistring/cdefs.h b/miniconda3/pkgs/libunistring-1.3-hb25bd0a_0/include/unistring/cdefs.h new file mode 100644 index 0000000000000000000000000000000000000000..621235c0496cb2e8136525d63eea9b114410192c --- /dev/null +++ b/miniconda3/pkgs/libunistring-1.3-hb25bd0a_0/include/unistring/cdefs.h @@ -0,0 +1,138 @@ +/* Common macro definitions for C include files. + Copyright (C) 2008-2023 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or + modify it under the terms of either: + + * the GNU Lesser General Public License as published by the Free + Software Foundation; either version 3 of the License, or (at your + option) any later version. + + or + + * the GNU General Public License as published by the Free + Software Foundation; either version 2 of the License, or (at your + option) any later version. + + or both in parallel, as here. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +#ifndef _UNISTRING_CDEFS_H +#define _UNISTRING_CDEFS_H + +/* _GL_UNUSED_PARAMETER is a marker that can be prepended to function parameter + declarations for parameters that are not used. This helps to reduce + warnings, such as from GCC -Wunused-parameter. The syntax is as follows: + _GL_UNUSED_PARAMETER type param + or more generally + _GL_UNUSED_PARAMETER param_decl + For example: + _GL_UNUSED_PARAMETER int param + _GL_UNUSED_PARAMETER int *(*param) (void) + */ +#ifndef _GL_UNUSED_PARAMETER +# define _GL_UNUSED_PARAMETER _UC_ATTRIBUTE_MAYBE_UNUSED +#endif +/* _GL_ATTRIBUTE_MAYBE_UNUSED likewise. */ +#ifndef _GL_ATTRIBUTE_MAYBE_UNUSED +# define _GL_ATTRIBUTE_MAYBE_UNUSED _UC_ATTRIBUTE_MAYBE_UNUSED +#endif + +#ifndef _GL_ATTRIBUTE_MALLOC +# define _GL_ATTRIBUTE_MALLOC _UC_ATTRIBUTE_MALLOC +#endif + +/* _GL_ATTRIBUTE_DEALLOC (F, I) is for functions returning pointers + that can be freed by passing them as the Ith argument to the + function F. _UC_ATTRIBUTE_DEALLOC_FREE is for functions that + return pointers that can be freed via 'free'; it can be used + only after including stdlib.h. These macros cannot be used on + inline functions. */ +#ifndef _GL_ATTRIBUTE_DEALLOC +# define _GL_ATTRIBUTE_DEALLOC _UC_ATTRIBUTE_DEALLOC +#endif +#ifndef _GL_ATTRIBUTE_DEALLOC_FREE +# define _GL_ATTRIBUTE_DEALLOC_FREE _UC_ATTRIBUTE_DEALLOC_FREE +#endif + +/* The definitions below are taken from gnulib/m4/gnulib-common.m4, + with prefix _UC instead of prefix _GL. */ + +/* True if the compiler says it groks GNU C version MAJOR.MINOR. */ +#if defined __GNUC__ && defined __GNUC_MINOR__ +# define _UC_GNUC_PREREQ(major, minor) \ + ((major) < __GNUC__ + ((minor) <= __GNUC_MINOR__)) +#else +# define _UC_GNUC_PREREQ(major, minor) 0 +#endif + +#if (defined __has_attribute \ + && (!defined __clang_minor__ \ + || (defined __apple_build_version__ \ + ? 6000000 <= __apple_build_version__ \ + : 5 <= __clang_major__))) +# define _UC_HAS_ATTRIBUTE(attr) __has_attribute (__##attr##__) +#else +# define _UC_HAS_ATTRIBUTE(attr) _UC_ATTR_##attr +# define _UC_ATTR_malloc _UC_GNUC_PREREQ (3, 0) +# define _UC_ATTR_unused _UC_GNUC_PREREQ (2, 7) +#endif + +#ifdef __cplusplus +# if defined __clang__ +# define _UC_BRACKET_BEFORE_ATTRIBUTE 1 +# endif +#else +# if defined __GNUC__ && !defined __clang__ +# define _UC_BRACKET_BEFORE_ATTRIBUTE 1 +# endif +#endif + +#if _UC_GNUC_PREREQ (11, 0) +# define _UC_ATTRIBUTE_DEALLOC(f, i) __attribute__ ((__malloc__ (f, i))) +#else +# define _UC_ATTRIBUTE_DEALLOC(f, i) +#endif +#if defined __cplusplus && defined __GNUC__ && !defined __clang__ +/* Work around GCC bug */ +# define _UC_ATTRIBUTE_DEALLOC_FREE \ + _UC_ATTRIBUTE_DEALLOC ((void (*) (void *)) free, 1) +#else +# define _UC_ATTRIBUTE_DEALLOC_FREE \ + _UC_ATTRIBUTE_DEALLOC (free, 1) +#endif + +#if _UC_HAS_ATTRIBUTE (malloc) +# define _UC_ATTRIBUTE_MALLOC __attribute__ ((__malloc__)) +#else +# define _UC_ATTRIBUTE_MALLOC +#endif + +#ifndef _UC_BRACKET_BEFORE_ATTRIBUTE +# if defined __clang__ && defined __cplusplus +# if !defined __apple_build_version__ && __clang_major__ >= 10 +# define _UC_ATTRIBUTE_MAYBE_UNUSED [[__maybe_unused__]] +# endif +# elif defined __has_c_attribute +# if __has_c_attribute (__maybe_unused__) +# define _UC_ATTRIBUTE_MAYBE_UNUSED [[__maybe_unused__]] +# endif +# endif +#endif +#ifndef _UC_ATTRIBUTE_MAYBE_UNUSED +# define _UC_ATTRIBUTE_MAYBE_UNUSED _UC_ATTRIBUTE_UNUSED +#endif + +#if _UC_HAS_ATTRIBUTE (unused) +# define _UC_ATTRIBUTE_UNUSED __attribute__ ((__unused__)) +#else +# define _UC_ATTRIBUTE_UNUSED +#endif + +#endif /* _UNISTRING_CDEFS_H */ diff --git a/miniconda3/pkgs/libunistring-1.3-hb25bd0a_0/include/unistring/iconveh.h b/miniconda3/pkgs/libunistring-1.3-hb25bd0a_0/include/unistring/iconveh.h new file mode 100644 index 0000000000000000000000000000000000000000..c607373411e104c3ec8ba39929f19e7f18288cad --- /dev/null +++ b/miniconda3/pkgs/libunistring-1.3-hb25bd0a_0/include/unistring/iconveh.h @@ -0,0 +1,44 @@ +/* Character set conversion handler type. + Copyright (C) 2001-2007, 2009-2024 Free Software Foundation, Inc. + Written by Bruno Haible. + + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. + + This file is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +#ifndef _ICONVEH_H +#define _ICONVEH_H + + +#ifdef __cplusplus +extern "C" { +#endif + + +/* Handling of unconvertible characters. */ +enum iconv_ilseq_handler +{ + iconveh_error, /* return and set errno = EILSEQ */ + iconveh_question_mark, /* use one '?' per unconvertible character */ + iconveh_escape_sequence, /* use escape sequence \uxxxx or \Uxxxxxxxx */ + iconveh_replacement_character /* use one U+FFFD per unconvertible character + if that fits in the target encoding, + otherwise one '?' */ +}; + + +#ifdef __cplusplus +} +#endif + + +#endif /* _ICONVEH_H */ diff --git a/miniconda3/pkgs/libunistring-1.3-hb25bd0a_0/include/unistring/inline.h b/miniconda3/pkgs/libunistring-1.3-hb25bd0a_0/include/unistring/inline.h new file mode 100644 index 0000000000000000000000000000000000000000..710cf5048b6b230414e059a969f15301b5af0388 --- /dev/null +++ b/miniconda3/pkgs/libunistring-1.3-hb25bd0a_0/include/unistring/inline.h @@ -0,0 +1,77 @@ +/* Decision whether to use 'inline' or not. + Copyright (C) 2006-2023 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or + modify it under the terms of either: + + * the GNU Lesser General Public License as published by the Free + Software Foundation; either version 3 of the License, or (at your + option) any later version. + + or + + * the GNU General Public License as published by the Free + Software Foundation; either version 2 of the License, or (at your + option) any later version. + + or both in parallel, as here. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +/* Written by Bruno Haible , 2009. */ + +#ifndef _UNISTRING_INLINE_H +#define _UNISTRING_INLINE_H + +/* This is like the gl_INLINE macro in gnulib/m4/inline.m4, but makes its + decision based on defined preprocessor symbols rather than through + autoconf tests. + See */ + +/* Test for the 'inline' keyword or equivalent. ISO C 99 semantics is not + required, only that 'static inline' works. + Define 'inline' to a supported equivalent, or to nothing if not supported, + like AC_C_INLINE does. Also, define UNISTRING_HAVE_INLINE if 'inline' or an + equivalent is effectively supported, i.e. if the compiler is likely to + drop unused 'static inline' functions. */ + +#if defined __GNUC__ || defined __clang__ +/* GNU C/C++ or clang C/C++. */ +# if defined __NO_INLINE__ +/* GCC and clang define __NO_INLINE__ if not optimizing or if -fno-inline is + specified. */ +# define UNISTRING_HAVE_INLINE 0 +# else +/* Whether 'inline' has the old GCC semantics or the ISO C 99 semantics, + does not matter. */ +# define UNISTRING_HAVE_INLINE 1 +# ifndef inline +# define inline __inline__ +# endif +# endif +#elif defined __cplusplus +/* Any other C++ compiler. */ +# define UNISTRING_HAVE_INLINE 1 +#else +/* Any other C compiler. */ +# if defined __osf__ +/* OSF/1 cc has inline. */ +# define UNISTRING_HAVE_INLINE 1 +# elif defined _AIX || defined __sgi +/* AIX 4 xlc, IRIX 6.5 cc have __inline. */ +# define UNISTRING_HAVE_INLINE 1 +# ifndef inline +# define inline __inline +# endif +# else +/* Some older C compiler. */ +# define UNISTRING_HAVE_INLINE 0 +# endif +#endif + +#endif /* _UNISTRING_INLINE_H */ diff --git a/miniconda3/pkgs/libunistring-1.3-hb25bd0a_0/include/unistring/localcharset.h b/miniconda3/pkgs/libunistring-1.3-hb25bd0a_0/include/unistring/localcharset.h new file mode 100644 index 0000000000000000000000000000000000000000..472140248c3bf0007cae18d2e0e78f8c5419c35c --- /dev/null +++ b/miniconda3/pkgs/libunistring-1.3-hb25bd0a_0/include/unistring/localcharset.h @@ -0,0 +1,135 @@ +/* Determine a canonical name for the current locale's character encoding. + Copyright (C) 2000-2003, 2009-2024 Free Software Foundation, Inc. + This file is part of the GNU CHARSET Library. + + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. + + This file is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +#ifndef _LOCALCHARSET_H +#define _LOCALCHARSET_H + + +#ifdef __cplusplus +extern "C" { +#endif + + +/* Determine the current locale's character encoding, and canonicalize it + into one of the canonical names listed below. + The result must not be freed; it is statically allocated. The result + becomes invalid when setlocale() is used to change the global locale, or + when the value of one of the environment variables LC_ALL, LC_CTYPE, LANG + is changed; threads in multithreaded programs should not do this. + If the canonical name cannot be determined, the result is a non-canonical + name. */ +extern const char * locale_charset (void); + +/* About GNU canonical names for character encodings: + + Every canonical name must be supported by GNU libiconv. Support by GNU libc + is also desirable. + + The name is case insensitive. Usually an upper case MIME charset name is + preferred. + + The current list of these GNU canonical names is: + + name MIME? used by which systems + (darwin = Mac OS X, windows = native Windows) + + ASCII, ANSI_X3.4-1968 glibc solaris freebsd netbsd darwin minix cygwin + ISO-8859-1 Y glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin cygwin zos + ISO-8859-2 Y glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin cygwin zos + ISO-8859-3 Y glibc solaris cygwin + ISO-8859-4 Y hpux osf solaris freebsd netbsd openbsd darwin + ISO-8859-5 Y glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin cygwin zos + ISO-8859-6 Y glibc aix hpux solaris cygwin + ISO-8859-7 Y glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin cygwin zos + ISO-8859-8 Y glibc aix hpux osf solaris cygwin zos + ISO-8859-9 Y glibc aix hpux irix osf solaris freebsd darwin cygwin zos + ISO-8859-13 glibc hpux solaris freebsd netbsd openbsd darwin cygwin + ISO-8859-14 glibc cygwin + ISO-8859-15 glibc aix irix osf solaris freebsd netbsd openbsd darwin cygwin + KOI8-R Y glibc hpux solaris freebsd netbsd openbsd darwin + KOI8-U Y glibc freebsd netbsd openbsd darwin cygwin + KOI8-T glibc + CP437 dos + CP775 dos + CP850 aix osf dos + CP852 dos + CP855 dos + CP856 aix + CP857 dos + CP861 dos + CP862 dos + CP864 dos + CP865 dos + CP866 freebsd netbsd openbsd darwin dos + CP869 dos + CP874 windows dos + CP922 aix + CP932 aix cygwin windows dos + CP943 aix zos + CP949 osf darwin windows dos + CP950 windows dos + CP1046 aix + CP1124 aix + CP1125 dos + CP1129 aix + CP1131 freebsd darwin + CP1250 windows + CP1251 glibc hpux solaris freebsd netbsd openbsd darwin cygwin windows + CP1252 aix windows + CP1253 windows + CP1254 windows + CP1255 glibc windows + CP1256 windows + CP1257 windows + GB2312 Y glibc aix hpux irix solaris freebsd netbsd darwin cygwin zos + EUC-JP Y glibc aix hpux irix osf solaris freebsd netbsd darwin cygwin + EUC-KR Y glibc aix hpux irix osf solaris freebsd netbsd darwin cygwin zos + EUC-TW glibc aix hpux irix osf solaris netbsd + BIG5 Y glibc aix hpux osf solaris freebsd netbsd darwin cygwin zos + BIG5-HKSCS glibc hpux solaris netbsd darwin + GBK glibc aix osf solaris freebsd darwin cygwin windows dos + GB18030 glibc hpux solaris freebsd netbsd darwin + SHIFT_JIS Y hpux osf solaris freebsd netbsd darwin + JOHAB solaris windows + TIS-620 glibc aix hpux osf solaris cygwin zos + ARMSCII-8 glibc freebsd netbsd darwin + GEORGIAN-PS glibc cygwin + PT154 glibc netbsd cygwin + HP-ROMAN8 hpux + HP-ARABIC8 hpux + HP-GREEK8 hpux + HP-HEBREW8 hpux + HP-TURKISH8 hpux + HP-KANA8 hpux + DEC-KANJI osf + DEC-HANYU osf + UTF-8 Y glibc aix hpux osf solaris netbsd darwin cygwin zos + + Note: Names which are not marked as being a MIME name should not be used in + Internet protocols for information interchange (mail, news, etc.). + + Note: ASCII and ANSI_X3.4-1968 are synonymous canonical names. Applications + must understand both names and treat them as equivalent. + */ + + +#ifdef __cplusplus +} +#endif + + +#endif /* _LOCALCHARSET_H */ diff --git a/miniconda3/pkgs/libunistring-1.3-hb25bd0a_0/include/unistring/stdint.h b/miniconda3/pkgs/libunistring-1.3-hb25bd0a_0/include/unistring/stdint.h new file mode 100644 index 0000000000000000000000000000000000000000..e6ed53118a327b9cf7200bf27d96f01eca58058d --- /dev/null +++ b/miniconda3/pkgs/libunistring-1.3-hb25bd0a_0/include/unistring/stdint.h @@ -0,0 +1,132 @@ +/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ +#include +#if __GLIBC__ >= 2 +#include +#else +/* Copyright (C) 2001-2002, 2004-2010 Free Software Foundation, Inc. + Written by Paul Eggert, Bruno Haible, Sam Steingold, Peter Burwood. + This file is part of gnulib. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program; if not, see . */ + +/* + * Subset of ISO C 99 for platforms that lack it. + * + */ + +#ifndef _UNISTRING_STDINT_H + +/* When including a system file that in turn includes , + use the system , not our substitute. This avoids + problems with (for example) VMS, whose includes + . */ +#define _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H + +/* Get those types that are already defined in other system include + files, so that we can "#define int8_t signed char" below without + worrying about a later system include file containing a "typedef + signed char int8_t;" that will get messed up by our macro. Our + macros should all be consistent with the system versions, except + for the "fast" types and macros, which we recommend against using + in public interfaces due to compiler differences. */ + +#if defined __MINGW32__ || defined __HAIKU__ || ((__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5)) && !defined __NetBSD__) +# if defined __sgi && ! defined __c99 + /* Bypass IRIX's if in C89 mode, since it merely annoys users + with "This header file is to be used only for c99 mode compilations" + diagnostics. */ +# define __STDINT_H__ +# endif + /* Other systems may have an incomplete or buggy . + Include it before , since any "#include " + in would reinclude us, skipping our contents because + _UNISTRING_STDINT_H is defined. + The include_next requires a split double-inclusion guard. */ +# if __GNUC__ >= 3 + +# endif +# include +#endif + +#if ! defined _UNISTRING_STDINT_H && ! defined _GL_JUST_INCLUDE_SYSTEM_STDINT_H +#define _UNISTRING_STDINT_H + +/* defines some of the stdint.h types as well, on glibc, + IRIX 6.5, and OpenBSD 3.8 (via ). + AIX 5.2 isn't needed and causes troubles. + MacOS X 10.4.6 includes (which is us), but + relies on the system definitions, so include + after . */ +#if 1 && ! defined _AIX +# include +#endif + +/* Get LONG_MIN, LONG_MAX, ULONG_MAX. */ +#include + +#if defined __MINGW32__ || defined __HAIKU__ + /* In OpenBSD 3.8, includes , which defines + int{8,16,32,64}_t, uint{8,16,32,64}_t and __BIT_TYPES_DEFINED__. + also defines intptr_t and uintptr_t. */ +# include +#elif 0 + /* Solaris 7 has the types except the *_fast*_t types, and + the macros except for *_FAST*_*, INTPTR_MIN, PTRDIFF_MIN, PTRDIFF_MAX. */ +# include +#endif + +#if 0 && ! defined __BIT_TYPES_DEFINED__ + /* Linux libc4 >= 4.6.7 and libc5 have a that defines + int{8,16,32,64}_t and __BIT_TYPES_DEFINED__. In libc5 >= 5.2.2 it is + included by . */ +# include +#endif + +#undef _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H + + +/* 7.18.1.1. Exact-width integer types */ + +/* Here we assume a standard architecture where the hardware integer + types have 8, 16, 32, optionally 64 bits. */ + +#undef int8_t +#undef uint8_t +typedef signed char unistring_int8_t; +typedef unsigned char unistring_uint8_t; +#define int8_t unistring_int8_t +#define uint8_t unistring_uint8_t + +#undef int16_t +#undef uint16_t +typedef short int unistring_int16_t; +typedef unsigned short int unistring_uint16_t; +#define int16_t unistring_int16_t +#define uint16_t unistring_uint16_t + +#undef int32_t +#undef uint32_t +typedef int unistring_int32_t; +typedef unsigned int unistring_uint32_t; +#define int32_t unistring_int32_t +#define uint32_t unistring_uint32_t + +/* Avoid collision with Solaris 2.5.1 etc. */ +#define _UINT8_T +#define _UINT32_T + + +#endif /* _UNISTRING_STDINT_H */ +#endif /* !defined _UNISTRING_STDINT_H && !defined _GL_JUST_INCLUDE_SYSTEM_STDINT_H */ +#endif diff --git a/miniconda3/pkgs/libunistring-1.3-hb25bd0a_0/include/unistring/version.h b/miniconda3/pkgs/libunistring-1.3-hb25bd0a_0/include/unistring/version.h new file mode 100644 index 0000000000000000000000000000000000000000..5684b14c332eeb59e8e29000ddbe1dac4f9053f8 --- /dev/null +++ b/miniconda3/pkgs/libunistring-1.3-hb25bd0a_0/include/unistring/version.h @@ -0,0 +1,53 @@ +/* Meta information about GNU libunistring. + Copyright (C) 2009-2024 Free Software Foundation, Inc. + Written by Bruno Haible , 2009. + + This program is free software: you can redistribute it and/or + modify it under the terms of either: + + * the GNU Lesser General Public License as published by the Free + Software Foundation; either version 3 of the License, or (at your + option) any later version. + + or + + * the GNU General Public License as published by the Free + Software Foundation; either version 2 of the License, or (at your + option) any later version. + + or both in parallel, as here. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +#ifndef _UNISTRING_VERSION_H +#define _UNISTRING_VERSION_H + +/* Get LIBUNISTRING_DLL_VARIABLE. */ +#include + +/* Declare _libunistring_unicode_version. */ +#include + + +#ifdef __cplusplus +extern "C" { +#endif + + +/* Version number: (major<<16) + (minor<<8) + subminor + except that for versions <= 0.9.3 the value was 0x000009. */ +#define _LIBUNISTRING_VERSION 0x010300 +extern LIBUNISTRING_DLL_VARIABLE const int _libunistring_version; /* Likewise */ + + +#ifdef __cplusplus +} +#endif + + +#endif /* _UNISTRING_VERSION_H */ diff --git a/miniconda3/pkgs/libunistring-1.3-hb25bd0a_0/include/unistring/woe32dll.h b/miniconda3/pkgs/libunistring-1.3-hb25bd0a_0/include/unistring/woe32dll.h new file mode 100644 index 0000000000000000000000000000000000000000..003d41cf6983c935754c9ec87248ce65a7287b25 --- /dev/null +++ b/miniconda3/pkgs/libunistring-1.3-hb25bd0a_0/include/unistring/woe32dll.h @@ -0,0 +1,39 @@ +/* Support for variables in shared libraries on Windows platforms. + Copyright (C) 2009 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or + modify it under the terms of either: + + * the GNU Lesser General Public License as published by the Free + Software Foundation; either version 3 of the License, or (at your + option) any later version. + + or + + * the GNU General Public License as published by the Free + Software Foundation; either version 2 of the License, or (at your + option) any later version. + + or both in parallel, as here. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +/* Written by Bruno Haible , 2009. */ + +#ifndef _UNISTRING_WOE32DLL_H +#define _UNISTRING_WOE32DLL_H + +#ifdef IN_LIBUNISTRING +/* All code is collected in a single library, */ +# define LIBUNISTRING_DLL_VARIABLE +#else +/* References from outside of libunistring. */ +# define LIBUNISTRING_DLL_VARIABLE +#endif + +#endif /* _UNISTRING_WOE32DLL_H */ diff --git a/miniconda3/pkgs/libunistring-1.3-hb25bd0a_0/include/unitypes.h b/miniconda3/pkgs/libunistring-1.3-hb25bd0a_0/include/unitypes.h new file mode 100644 index 0000000000000000000000000000000000000000..e0f35e6c37c90f35c4d1b8c52b012ea4a5110597 --- /dev/null +++ b/miniconda3/pkgs/libunistring-1.3-hb25bd0a_0/include/unitypes.h @@ -0,0 +1,72 @@ +/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ +/* Elementary types and macros for the GNU UniString library. + Copyright (C) 2002, 2005-2006, 2009-2024 Free Software Foundation, Inc. + + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. + + This file is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +#ifndef _UNITYPES_H +#define _UNITYPES_H + +/* Get uint8_t, uint16_t, uint32_t. */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + + +/* Type representing a Unicode character. */ +typedef uint32_t ucs4_t; + +/* Attribute of a function whose result depends only on the arguments + (not pointers!) and which has no side effects. */ +#ifndef _UC_ATTRIBUTE_CONST +# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95) || defined __clang__ +# define _UC_ATTRIBUTE_CONST __attribute__ ((__const__)) +# else +# define _UC_ATTRIBUTE_CONST +# endif +#endif + +/* Attribute of a function whose result depends only on the arguments + (possibly pointers) and global memory, and which has no side effects. */ +#ifndef _UC_ATTRIBUTE_PURE +# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) || defined __clang__ +# define _UC_ATTRIBUTE_PURE __attribute__ ((__pure__)) +# else +# define _UC_ATTRIBUTE_PURE +# endif +#endif + +/* Qualifier in a function declaration, that asserts that the caller must + pass a pointer to a different object in the specified pointer argument + than in the other pointer arguments. */ +#ifndef _UC_RESTRICT +# if defined __restrict \ + || 2 < __GNUC__ + (95 <= __GNUC_MINOR__) \ + || __clang_major__ >= 3 +# define _UC_RESTRICT __restrict +# elif 199901L <= __STDC_VERSION__ || defined restrict +# define _UC_RESTRICT restrict +# else +# define _UC_RESTRICT +# endif +#endif + + +#ifdef __cplusplus +} +#endif + +#endif /* _UNITYPES_H */ diff --git a/miniconda3/pkgs/libunistring-1.3-hb25bd0a_0/include/uniwbrk.h b/miniconda3/pkgs/libunistring-1.3-hb25bd0a_0/include/uniwbrk.h new file mode 100644 index 0000000000000000000000000000000000000000..86d3bdb24a215583c1cdaa7bce2557972b6d2106 --- /dev/null +++ b/miniconda3/pkgs/libunistring-1.3-hb25bd0a_0/include/uniwbrk.h @@ -0,0 +1,103 @@ +/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ +/* Word breaks in Unicode strings. + Copyright (C) 2001-2003, 2005-2024 Free Software Foundation, Inc. + Written by Bruno Haible , 2009. + + This file is free software. + It is dual-licensed under "the GNU LGPLv3+ or the GNU GPLv2+". + You can redistribute it and/or modify it under either + - the terms of the GNU Lesser General Public License as published + by the Free Software Foundation, either version 3, or (at your + option) any later version, or + - the terms of the GNU General Public License as published by the + Free Software Foundation; either version 2, or (at your option) + any later version, or + - the same dual license "the GNU LGPLv3+ or the GNU GPLv2+". + + This file is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License and the GNU General Public License + for more details. + + You should have received a copy of the GNU Lesser General Public + License and of the GNU General Public License along with this + program. If not, see . */ + +#ifndef _UNIWBRK_H +#define _UNIWBRK_H + +/* Get size_t. */ +#include + +#include "unitypes.h" + + +#ifdef __cplusplus +extern "C" { +#endif + +/* ========================================================================= */ + +/* Property defined in Unicode Standard Annex #29, section "Word Boundaries" + */ + +/* Possible values of the Word_Break property. + This enumeration may be extended in the future. */ +enum +{ + WBP_OTHER = 0, + WBP_CR = 11, + WBP_LF = 12, + WBP_NEWLINE = 10, + WBP_EXTEND = 8, + WBP_FORMAT = 9, + WBP_KATAKANA = 1, + WBP_ALETTER = 2, + WBP_MIDNUMLET = 3, + WBP_MIDLETTER = 4, + WBP_MIDNUM = 5, + WBP_NUMERIC = 6, + WBP_EXTENDNUMLET = 7, + WBP_RI = 13, + WBP_DQ = 14, + WBP_SQ = 15, + WBP_HL = 16, + WBP_ZWJ = 17, + WBP_EB = 18, /* obsolete */ + WBP_EM = 19, /* obsolete */ + WBP_GAZ = 20, /* obsolete */ + WBP_EBG = 21, /* obsolete */ + WBP_WSS = 22 +}; + +/* Return the Word_Break property of a Unicode character. */ +extern int + uc_wordbreak_property (ucs4_t uc) + _UC_ATTRIBUTE_CONST; + +/* ========================================================================= */ + +/* Word breaks. */ + +/* Determine the word break points in S, and store the result at p[0..n-1]. + p[i] = 1 means that there is a word boundary between s[i-1] and s[i]. + p[i] = 0 means that s[i-1] and s[i] must not be separated. + */ +extern void + u8_wordbreaks (const uint8_t *s, size_t n, char *p); +extern void + u16_wordbreaks (const uint16_t *s, size_t n, char *p); +extern void + u32_wordbreaks (const uint32_t *s, size_t n, char *p); +extern void + ulc_wordbreaks (const char *s, size_t n, char *_UC_RESTRICT p); + +/* ========================================================================= */ + +#ifdef __cplusplus +} +#endif + + +#endif /* _UNIWBRK_H */ diff --git a/miniconda3/pkgs/libunistring-1.3-hb25bd0a_0/include/uniwidth.h b/miniconda3/pkgs/libunistring-1.3-hb25bd0a_0/include/uniwidth.h new file mode 100644 index 0000000000000000000000000000000000000000..92a6e9907e0348204be55b58b715340a5870378a --- /dev/null +++ b/miniconda3/pkgs/libunistring-1.3-hb25bd0a_0/include/uniwidth.h @@ -0,0 +1,73 @@ +/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ +/* Display width functions. + Copyright (C) 2001-2002, 2005, 2007, 2009-2024 Free Software Foundation, + Inc. + + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. + + This file is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +#ifndef _UNIWIDTH_H +#define _UNIWIDTH_H + +#include "unitypes.h" + +/* Get size_t. */ +#include + +/* Get locale_charset() declaration. */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + + +/* Display width. */ + +/* These functions are locale dependent. The encoding argument identifies + the encoding (e.g. "ISO-8859-2" for Polish). */ + +/* Determine number of column positions required for UC. */ +extern int + uc_width (ucs4_t uc, const char *encoding) + _UC_ATTRIBUTE_PURE; + +/* Determine number of column positions required for first N units + (or fewer if S ends before this) in S. */ +extern int + u8_width (const uint8_t *s, size_t n, const char *encoding) + _UC_ATTRIBUTE_PURE; +extern int + u16_width (const uint16_t *s, size_t n, const char *encoding) + _UC_ATTRIBUTE_PURE; +extern int + u32_width (const uint32_t *s, size_t n, const char *encoding) + _UC_ATTRIBUTE_PURE; + +/* Determine number of column positions required for S. */ +extern int + u8_strwidth (const uint8_t *s, const char *encoding) + _UC_ATTRIBUTE_PURE; +extern int + u16_strwidth (const uint16_t *s, const char *encoding) + _UC_ATTRIBUTE_PURE; +extern int + u32_strwidth (const uint32_t *s, const char *encoding) + _UC_ATTRIBUTE_PURE; + + +#ifdef __cplusplus +} +#endif + +#endif /* _UNIWIDTH_H */ diff --git a/miniconda3/pkgs/libunistring-1.3-hb25bd0a_0/info/about.json b/miniconda3/pkgs/libunistring-1.3-hb25bd0a_0/info/about.json new file mode 100644 index 0000000000000000000000000000000000000000..037c9cf6bddfee654280d7fc19cb0b22cedb22cc --- /dev/null +++ b/miniconda3/pkgs/libunistring-1.3-hb25bd0a_0/info/about.json @@ -0,0 +1,133 @@ +{ + "channels": [ + "https://repo.anaconda.com/pkgs/main" + ], + "conda_build_version": "24.1.2", + "conda_version": "24.1.2", + "description": "This library provides functions for manipulating Unicode strings and\nfor manipulating C strings according to the Unicode standard.\n", + "dev_url": "https://git.savannah.gnu.org/gitweb/?p=libunistring.git", + "doc_url": "https://www.gnu.org/software/libunistring/manual/libunistring.html", + "env_vars": { + "CIO_TEST": "" + }, + "extra": { + "copy_test_source_files": true, + "final": true, + "flow_run_id": "2cdea0a0-a12b-46bc-9f35-40218e9fd37a", + "recipe-maintainers": [ + "stefan-balke", + "bgruening", + "chenghlee" + ], + "remote_url": "git@github.com:AnacondaRecipes/libunistring-feedstock.git", + "sha": "8e6f0f0b878447f309b22c664ea53b916e3a2334" + }, + "home": "https://www.gnu.org/software/libunistring", + "identifiers": [], + "keywords": [], + "license": "LGPL-3.0-only", + "license_family": "LGPL", + "license_file": "COPYING", + "root_pkgs": [ + "_libgcc_mutex 0.1 main", + "_openmp_mutex 5.1 1_gnu", + "archspec 0.2.1 pyhd3eb1b0_0", + "boltons 23.0.0 py39h06a4308_0", + "brotli-python 1.0.9 py39h6a678d5_7", + "bzip2 1.0.8 h7b6447c_0", + "c-ares 1.19.1 h5eee18b_0", + "charset-normalizer 2.0.4 pyhd3eb1b0_0", + "conda-content-trust 0.2.0 py39h06a4308_0", + "conda-package-handling 2.2.0 py39h06a4308_0", + "conda-package-streaming 0.9.0 py39h06a4308_0", + "fmt 9.1.0 hdb19cb5_0", + "icu 73.1 h6a678d5_0", + "idna 3.4 py39h06a4308_0", + "jsonpatch 1.32 pyhd3eb1b0_0", + "jsonpointer 2.1 pyhd3eb1b0_0", + "krb5 1.20.1 h143b758_1", + "ld_impl_linux-64 2.38 h1181459_1", + "libarchive 3.6.2 h6ac8c49_2", + "libev 4.33 h7f8727e_1", + "libffi 3.4.4 h6a678d5_0", + "libgcc-ng 11.2.0 h1234567_1", + "libgomp 11.2.0 h1234567_1", + "libnghttp2 1.57.0 h2d74bed_0", + "libsolv 0.7.24 he621ea3_0", + "libssh2 1.10.0 hdbd6064_2", + "libstdcxx-ng 11.2.0 h1234567_1", + "libxml2 2.10.4 hf1b16e4_1", + "lz4-c 1.9.4 h6a678d5_0", + "ncurses 6.4 h6a678d5_0", + "packaging 23.1 py39h06a4308_0", + "pcre2 10.42 hebb0a14_0", + "pluggy 1.0.0 py39h06a4308_1", + "pybind11-abi 4 hd3eb1b0_1", + "pycosat 0.6.6 py39h5eee18b_0", + "pycparser 2.21 pyhd3eb1b0_0", + "pysocks 1.7.1 py39h06a4308_0", + "python 3.9.18 h955ad1f_0", + "readline 8.2 h5eee18b_0", + "reproc 14.2.4 h295c915_1", + "reproc-cpp 14.2.4 h295c915_1", + "ruamel.yaml 0.17.21 py39h5eee18b_0", + "ruamel.yaml.clib 0.2.6 py39h5eee18b_1", + "sqlite 3.41.2 h5eee18b_0", + "tk 8.6.12 h1ccaba5_0", + "tqdm 4.65.0 py39hb070fc8_0", + "wheel 0.41.2 py39h06a4308_0", + "yaml-cpp 0.8.0 h6a678d5_0", + "zlib 1.2.13 h5eee18b_0", + "zstandard 0.19.0 py39h5eee18b_0", + "zstd 1.5.5 hc292b87_0", + "attrs 23.1.0 py39h06a4308_0", + "beautifulsoup4 4.12.2 py39h06a4308_0", + "ca-certificates 2023.12.12 h06a4308_0", + "certifi 2024.2.2 py39h06a4308_0", + "cffi 1.16.0 py39h5eee18b_0", + "chardet 4.0.0 py39h06a4308_1003", + "click 8.1.7 py39h06a4308_0", + "conda 24.1.2 py39h06a4308_0", + "conda-build 24.1.2 py39h06a4308_0", + "conda-index 0.4.0 pyhd3eb1b0_0", + "conda-libmamba-solver 24.1.0 pyhd3eb1b0_0", + "cryptography 42.0.2 py39hdda0065_0", + "distro 1.8.0 py39h06a4308_0", + "filelock 3.13.1 py39h06a4308_0", + "jinja2 3.1.3 py39h06a4308_0", + "jsonschema 4.19.2 py39h06a4308_0", + "jsonschema-specifications 2023.7.1 py39h06a4308_0", + "libcurl 8.5.0 h251f7ec_0", + "libedit 3.1.20230828 h5eee18b_0", + "liblief 0.12.3 h6a678d5_0", + "libmamba 1.5.6 haf1ee3a_0", + "libmambapy 1.5.6 py39h2dafd23_0", + "markupsafe 2.1.3 py39h5eee18b_0", + "menuinst 2.0.2 py39h06a4308_0", + "more-itertools 10.1.0 py39h06a4308_0", + "openssl 3.0.13 h7f8727e_0", + "patch 2.7.6 h7b6447c_1001", + "patchelf 0.17.2 h6a678d5_0", + "pip 23.3.1 py39h06a4308_0", + "pkginfo 1.9.6 py39h06a4308_0", + "platformdirs 3.10.0 py39h06a4308_0", + "psutil 5.9.0 py39h5eee18b_0", + "py-lief 0.12.3 py39h6a678d5_0", + "pyopenssl 24.0.0 py39h06a4308_0", + "python-libarchive-c 2.9 pyhd3eb1b0_1", + "pytz 2023.3.post1 py39h06a4308_0", + "pyyaml 6.0.1 py39h5eee18b_0", + "referencing 0.30.2 py39h06a4308_0", + "requests 2.31.0 py39h06a4308_1", + "rpds-py 0.10.6 py39hb02cf49_0", + "setuptools 68.2.2 py39h06a4308_0", + "soupsieve 2.5 py39h06a4308_0", + "tomli 2.0.1 py39h06a4308_0", + "tzdata 2023d h04d1e81_0", + "urllib3 2.1.0 py39h06a4308_1", + "xz 5.4.5 h5eee18b_0", + "yaml 0.2.5 h7b6447c_0" + ], + "summary": "C unicode string manipulation library", + "tags": [] +} \ No newline at end of file diff --git a/miniconda3/pkgs/libunistring-1.3-hb25bd0a_0/info/files b/miniconda3/pkgs/libunistring-1.3-hb25bd0a_0/info/files new file mode 100644 index 0000000000000000000000000000000000000000..a49e9aa54f0f6774f86fa74e18ffb2e0f0602709 --- /dev/null +++ b/miniconda3/pkgs/libunistring-1.3-hb25bd0a_0/info/files @@ -0,0 +1,23 @@ +include/unicase.h +include/uniconv.h +include/unictype.h +include/unigbrk.h +include/unilbrk.h +include/unimetadata.h +include/uniname.h +include/uninorm.h +include/unistdio.h +include/unistr.h +include/unistring/cdefs.h +include/unistring/iconveh.h +include/unistring/inline.h +include/unistring/localcharset.h +include/unistring/stdint.h +include/unistring/version.h +include/unistring/woe32dll.h +include/unitypes.h +include/uniwbrk.h +include/uniwidth.h +lib/libunistring.so +lib/libunistring.so.5 +lib/libunistring.so.5.2.0 diff --git a/miniconda3/pkgs/libunistring-1.3-hb25bd0a_0/info/git b/miniconda3/pkgs/libunistring-1.3-hb25bd0a_0/info/git new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/miniconda3/pkgs/libunistring-1.3-hb25bd0a_0/info/hash_input.json b/miniconda3/pkgs/libunistring-1.3-hb25bd0a_0/info/hash_input.json new file mode 100644 index 0000000000000000000000000000000000000000..f9745e71106d8d751c10338a083841ec4dd7fc75 --- /dev/null +++ b/miniconda3/pkgs/libunistring-1.3-hb25bd0a_0/info/hash_input.json @@ -0,0 +1,7 @@ +{ + "channel_targets": "defaults", + "target_platform": "linux-64", + "c_compiler_version": "11.2.0", + "c_compiler": "gcc", + "__glibc": "__glibc >=2.17,<3.0.a0" +} \ No newline at end of file diff --git a/miniconda3/pkgs/libunistring-1.3-hb25bd0a_0/info/index.json b/miniconda3/pkgs/libunistring-1.3-hb25bd0a_0/info/index.json new file mode 100644 index 0000000000000000000000000000000000000000..225a5ff2f6b87164f0df645ba884ac69ec01774f --- /dev/null +++ b/miniconda3/pkgs/libunistring-1.3-hb25bd0a_0/info/index.json @@ -0,0 +1,16 @@ +{ + "arch": "x86_64", + "build": "hb25bd0a_0", + "build_number": 0, + "depends": [ + "__glibc >=2.17,<3.0.a0", + "libgcc-ng >=11.2.0" + ], + "license": "LGPL-3.0-only", + "license_family": "LGPL", + "name": "libunistring", + "platform": "linux", + "subdir": "linux-64", + "timestamp": 1755085809430, + "version": "1.3" +} \ No newline at end of file diff --git a/miniconda3/pkgs/libunistring-1.3-hb25bd0a_0/info/licenses/COPYING b/miniconda3/pkgs/libunistring-1.3-hb25bd0a_0/info/licenses/COPYING new file mode 100644 index 0000000000000000000000000000000000000000..94a9ed024d3859793618152ea559a168bbcbb5e2 --- /dev/null +++ b/miniconda3/pkgs/libunistring-1.3-hb25bd0a_0/info/licenses/COPYING @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. diff --git a/miniconda3/pkgs/libunistring-1.3-hb25bd0a_0/info/paths.json b/miniconda3/pkgs/libunistring-1.3-hb25bd0a_0/info/paths.json new file mode 100644 index 0000000000000000000000000000000000000000..08bfb424e327dae0c3bc2b935bd74b3b6fbad35d --- /dev/null +++ b/miniconda3/pkgs/libunistring-1.3-hb25bd0a_0/info/paths.json @@ -0,0 +1,143 @@ +{ + "paths": [ + { + "_path": "include/unicase.h", + "path_type": "hardlink", + "sha256": "9c234e5c0a1c290e49fb24e3083019badc9384c984036ef0872bb03ac786a697", + "size_in_bytes": 20850 + }, + { + "_path": "include/uniconv.h", + "path_type": "hardlink", + "sha256": "ab8dec29ac81d713ca600f5eb237b9a86442829e08ee2bb1e884ab349bfbdbab", + "size_in_bytes": 7532 + }, + { + "_path": "include/unictype.h", + "path_type": "hardlink", + "sha256": "ee6f940e0914b42c77c0e6a9b0f7684b1b410616b2b8517236ca317a964adf42", + "size_in_bytes": 49379 + }, + { + "_path": "include/unigbrk.h", + "path_type": "hardlink", + "sha256": "9202b17af8ef07bba53e150c2200980dc07b74baa7c56a346bdf7f4d9611f078", + "size_in_bytes": 5516 + }, + { + "_path": "include/unilbrk.h", + "path_type": "hardlink", + "sha256": "7546efb91b9c4e77fbfaf300f5d812e7303d45bee148d16a2881ac186934d4b7", + "size_in_bytes": 6948 + }, + { + "_path": "include/unimetadata.h", + "path_type": "hardlink", + "sha256": "feff5ccde46bfa38e9138c298b1ad9c4dd8b0e847f0485bd3ef457c6bc357281", + "size_in_bytes": 1176 + }, + { + "_path": "include/uniname.h", + "path_type": "hardlink", + "sha256": "8bcbdfa3b5d8b5346e358945a1b2aa59c0630666ceb817794188dcac491cd62b", + "size_in_bytes": 1985 + }, + { + "_path": "include/uninorm.h", + "path_type": "hardlink", + "sha256": "9541d6dc262d4a57b8ec84d0c6bbdde87e2dad22891bfdce984f7f051e897f3f", + "size_in_bytes": 10898 + }, + { + "_path": "include/unistdio.h", + "path_type": "hardlink", + "sha256": "f6ef625676526d7f6041d01a100480b9997357ccaa1af80ed731d04b6a960c9b", + "size_in_bytes": 10195 + }, + { + "_path": "include/unistr.h", + "path_type": "hardlink", + "sha256": "2ae243f51219a023fc590d052f024fb288d1f9ad49898fd84c2de86b606fc481", + "size_in_bytes": 23810 + }, + { + "_path": "include/unistring/cdefs.h", + "path_type": "hardlink", + "sha256": "a580a21833eeeb09b3e38806f6a2349c0b9bce2b9f4a88906a7f90b1ef5546b7", + "size_in_bytes": 4642 + }, + { + "_path": "include/unistring/iconveh.h", + "path_type": "hardlink", + "sha256": "38a32b2c077afcf08f5d593688637d9101d09abd57404f3051148355921da239", + "size_in_bytes": 1448 + }, + { + "_path": "include/unistring/inline.h", + "path_type": "hardlink", + "sha256": "450becd366c4d2cf4062140bc5a5edab1bf9af0cdc951f8a82e653ad9dee1f94", + "size_in_bytes": 2695 + }, + { + "_path": "include/unistring/localcharset.h", + "path_type": "hardlink", + "sha256": "e280315203ca4bf48deb6517b0a904e80569bbeee72a9d169cbd30b91d4496f2", + "size_in_bytes": 6270 + }, + { + "_path": "include/unistring/stdint.h", + "path_type": "hardlink", + "sha256": "a22f37b32ac4c1acb025d124d0a8bcedd9e0b35f4ea70a1351737d4c7c6c2fb7", + "size_in_bytes": 4831 + }, + { + "_path": "include/unistring/version.h", + "path_type": "hardlink", + "sha256": "314c34d7f3e369de6775de7294b605b2c5897ced9c7a00b3dbe064d061fdd39d", + "size_in_bytes": 1608 + }, + { + "_path": "include/unistring/woe32dll.h", + "path_type": "hardlink", + "sha256": "51eeea733bce2639cd611a0c7f2eecd8c88f00e3e8238c4153ee29e5040093da", + "size_in_bytes": 1384 + }, + { + "_path": "include/unitypes.h", + "path_type": "hardlink", + "sha256": "16b2a0f056d5338efb830684e727c1e553f6fbcd66aa46559bfaa4ca53ae2f22", + "size_in_bytes": 2319 + }, + { + "_path": "include/uniwbrk.h", + "path_type": "hardlink", + "sha256": "8d8d541ce192bb29b3cc9772142eb600b569c598a037586ec1b0572691a73dc1", + "size_in_bytes": 3257 + }, + { + "_path": "include/uniwidth.h", + "path_type": "hardlink", + "sha256": "36fa98416d1ec92c3a577dbd99a5a6b9f42c660ad0b5f03c750fdfbbf144739e", + "size_in_bytes": 2193 + }, + { + "_path": "lib/libunistring.so", + "path_type": "softlink", + "sha256": "d69a3fdfbd5581d0d8d89fdffdec46ac2cba8cb81b27c39f9e51e906433a03ed", + "size_in_bytes": 2086760 + }, + { + "_path": "lib/libunistring.so.5", + "path_type": "softlink", + "sha256": "d69a3fdfbd5581d0d8d89fdffdec46ac2cba8cb81b27c39f9e51e906433a03ed", + "size_in_bytes": 2086760 + }, + { + "_path": "lib/libunistring.so.5.2.0", + "path_type": "hardlink", + "sha256": "d69a3fdfbd5581d0d8d89fdffdec46ac2cba8cb81b27c39f9e51e906433a03ed", + "size_in_bytes": 2086760 + } + ], + "paths_version": 1 +} \ No newline at end of file diff --git a/miniconda3/pkgs/libunistring-1.3-hb25bd0a_0/info/recipe/build.sh b/miniconda3/pkgs/libunistring-1.3-hb25bd0a_0/info/recipe/build.sh new file mode 100644 index 0000000000000000000000000000000000000000..f09b1c3b0f087d47fe87fa37fd931de636eb0036 --- /dev/null +++ b/miniconda3/pkgs/libunistring-1.3-hb25bd0a_0/info/recipe/build.sh @@ -0,0 +1,30 @@ +#!/usr/bin/env bash + +# Get an updated config.sub and config.guess +cp -r ${BUILD_PREFIX}/share/libtool/build-aux/config.* ./build-aux + +declare -a configure_args + +# Speed up one-time builds +configure_args+=(--disable-dependency-tracking) + +#configure_args+=(--enable-relocatable) +#configure_args+=(--disable-namespacing) + +# conda packages should only use dynamic linking +configure_args+=(--enable-shared) +configure_args+=(--disable-static) + +./configure --prefix=${PREFIX} \ + ${configure_args[@]} + +make -j${CPU_COUNT} +# Part of the test suit fails on any version of the package +if [[ "${target_platform}" == osx-* ]]; then + make check || true +else + make check +fi +make install -j${CPU_COUNT} +rm -f ${PREFIX}/lib/${PKG_NAME}.a +rm -rf ${PREFIX}/share/{doc,info}/${PKG_NAME}* diff --git a/miniconda3/pkgs/libunistring-1.3-hb25bd0a_0/info/recipe/conda_build_config.yaml b/miniconda3/pkgs/libunistring-1.3-hb25bd0a_0/info/recipe/conda_build_config.yaml new file mode 100644 index 0000000000000000000000000000000000000000..dca2ccff525b570887cb049eae3cec8b26d4fde7 --- /dev/null +++ b/miniconda3/pkgs/libunistring-1.3-hb25bd0a_0/info/recipe/conda_build_config.yaml @@ -0,0 +1,395 @@ +VERBOSE_AT: V=1 +VERBOSE_CM: VERBOSE=1 +alsa_lib: '1.2' +ampl_mp: '3.1' +aom: '3.6' +armadillo: '12' +arpack: '3.9' +arrow_cpp: 19.0.0 +assimp: 6.0.2 +at_spi2_core: '2.36' +aws_c_auth: 0.9.0 +aws_c_cal: 0.9.2 +aws_c_common: 0.12.3 +aws_c_compression: 0.3.1 +aws_c_event_stream: 0.5.5 +aws_c_http: 0.10.2 +aws_c_io: 0.20.1 +aws_c_mqtt: 0.13.2 +aws_c_s3: 0.8.3 +aws_c_sdkutils: 0.2.4 +aws_checksums: 0.2.7 +aws_crt_cpp: 0.32.10 +aws_sdk_cpp: 1.11.528 +azure_core_cpp: 1.14.1 +azure_identity_cpp: 1.10.1 +azure_storage_blobs_cpp: 12.13.0 +azure_storage_common_cpp: 12.10.0 +backtrace: '20241216' +blas_impl: openblas +blosc: '1' +boost: '1.82' +boost_cpp: '1.82' +brotli: '1' +brunsli: '0' +bzip2: '1' +c_ares: '1' +c_blosc2: '2.17' +c_compiler: gcc +c_compiler_version: 11.2.0 +c_stdlib: sysroot +c_stdlib_version: '2.17' +cairo: '1' +capnproto: 1.1.0 +ceres_solver: '2.2' +cfitsio: '3.470' +cgo_compiler: go-cgo +cgo_compiler_version: '1.21' +channel_targets: defaults +charls: '2.2' +clang_variant: clang +coin_or_cbc: '2.10' +coin_or_cgl: '0.60' +coin_or_clp: '1.17' +coin_or_osi: '0.108' +coin_or_utils: '2.11' +cpu_optimization_target: nocona +cran_mirror: https://cran.r-project.org +cuda_compiler: cuda-nvcc +cuda_compiler_version: '12.4' +cudnn: '9' +cutensor: '2' +cxx_compiler: gxx +cxx_compiler_version: 11.2.0 +cyrus_sasl: 2.1.28 +dav1d: 1.2.1 +dbus: '1' +eigen: 3.3.7 +epoxy: '1.5' +expat: '2' +extend_keys: +- ignore_version +- pin_run_as_build +- extend_keys +- ignore_build_only_deps +ffmpeg: '6' +fftw: '3.3' +flatbuffers: 25.2.10 +fmt: '9' +fontconfig: '2' +fortran_compiler: gfortran +fortran_compiler_version: 11.2.0 +freeglut: '3' +freetds: '1' +freetype: '2' +freexl: '2' +fribidi: '1' +g2clib: '1.6' +gcab: '1' +gdbm: '1.18' +gdk_pixbuf: '2' +geos: 3.10.6 +geotiff: '1.7' +getopt_win32: '0.1' +gettext: '0' +gflags: '2.2' +giflib: '5.2' +gl2ps: 1.4.2 +glew: '2.2' +glib: '2' +glog: '0.5' +glpk: '4.65' +glslang: '15' +gmp: '6' +gnupg: '2.4' +gnutls: '3.8' +go_compiler: go-nocgo +go_compiler_version: '1.21' +graphite2: '1' +gsl: '2.7' +gst_plugins_base: '1.24' +gst_plugins_good: '1.24' +gstreamer: '1.24' +gstreamer_orc: '0.4' +gtest: 1.14.0 +gtk3: '3' +gts: '0.7' +harfbuzz: '10' +hdf4: 4.2.13 +hdf5: 1.14.5 +hdfeos2: '2.20' +hdfeos5: '5.1' +icu: '73' +ignore_build_only_deps: +- python +- numpy +igraph: '0.10' +isl: '0.22' +jansson: '2' +jasper: '4' +jemalloc: 5.2.1 +jpeg: 9e +json_c: '0.16' +jsoncpp: 1.9.6 +jxrlib: '1.1' +kealib: '1.5' +khronos_opencl_icd_loader: 2024.5.8 +krb5: '1.21' +lame: '3.100' +lcms2: '2' +leptonica: '1.82' +lerc: '4' +level_zero: '1' +leveldb: '1.23' +libabseil: '20250127.0' +libaec: '1' +libaio: '0.3' +libapr: '1' +libapriconv: '1' +libaprutil: '1' +libarchive: '3.7' +libassuan: '3' +libavif: '1' +libbrotlicommon: '1.0' +libbrotlidec: '1.0' +libbrotlienc: '1.0' +libclang13: '14.0' +libclang_cpp14: '14.0' +libcrc32c: '1.1' +libcryptominisat: '5.6' +libcurl: '8' +libdap4: '3.19' +libde265: 1.0.15 +libdeflate: '1.22' +libdrm: '2.4' +libebm: 0.4.4 +libedit: '3.1' +libegl: '1' +libev: '4.33' +libevent: 2.1.12 +libfaiss: 1.0.0 +libffi: '3.4' +libflac: '1.4' +libgcrypt: '1' +libgd: '2.3' +libgdal: '3.11' +libgdal_core: '3.11' +libgit2: '1.6' +libgl: '1' +libgles: '1' +libglib: '2' +libglu: '9' +libglvnd: '1' +libglx: '1' +libgpg_error: '1' +libgrpc: '1.71' +libgsasl: '1' +libgsf: '1.14' +libheif: '1.19' +libhiredis: '1.3' +libiconv: '1' +libidn2: '2' +libjpeg_turbo: '3' +libkml: '1.3' +libksba: '1.6' +liblief: '0.16' +libllvm19: '19.1' +libmamba: '2.0' +libmambapy: '2.0' +libmlir19: '19.1' +libmpdec: '4' +libmpdecxx: '4' +libnetcdf: '4' +libnghttp2: '1' +libnsl: '2.0' +libntlm: '1' +libogg: '1.3' +libopenblas: '0' +libopengl: '1' +libopus: '1' +libortools: '9.9' +libosqp: 0.6.3 +libpcap: '1.10' +libpciaccess: '0.18' +libpng: '1.6' +libpq: '17' +libprotobuf: 5.29.3 +libqdldl: 0.1.7 +librdkafka: '2.2' +libre2_11: '2024' +librsvg: '2' +libsentencepiece: 0.2.0 +libsndfile: '1.2' +libsodium: 1.0.18 +libspatialindex: 1.9.3 +libspatialite: '5.1' +libssh2: '1' +libtasn1: '4' +libtensorflow: 2.18.1 +libtensorflow_cc: 2.18.1 +libtheora: '1' +libthrift: '0.15' +libtiff: '4' +libtmglib: '3' +libtorch: '2.6' +libunistring: '0' +libunwind: '1' +libutf8proc: '2' +libuuid: '1' +libuv: '1' +libvorbis: '1' +libvpx: '1.13' +libvulkan: '1.4' +libwebp: 1.3.2 +libwebp_base: '1' +libxcb: '1' +libxkbcommon: '1' +libxkbfile: '1' +libxml2: '2.13' +libxmlsec1: '1.3' +libxslt: '1' +libzopfli: '1.0' +lmdb: '0' +lua: '5' +lz4_c: '1.9' +lzo: '2' +macports_legacy_support: '1' +mbedtls: '3.5' +mesalib: '25.1' +metis: '5.1' +minizip: '4' +mkl: '2023' +mkl_service: '2' +mpc: '1' +mpfr: '4' +mpich: '4' +mysql_libs: '9.3' +nanobind_abi: '15' +nccl: '2' +ncurses: '6' +nettle: '3.7' +nlopt: '2.7' +npth: '1' +nspr: '4' +nss: '3' +ntbtls: '0' +numpy: '2.1' +ocl_icd: '2' +oniguruma: '6.9' +openblas: '0' +openblas_devel: '0' +openh264: '2.6' +openjpeg: '2' +openldap: '2.6' +openmpi: '4.1' +openssl: '3' +orc: 2.1.1 +pango: '1' +pcre: '8' +pcre2: '10.42' +pdal: '2.5' +perl: '5.38' +pin_run_as_build: + python: + max_pin: x.x + min_pin: x.x + r-base: + max_pin: x.x + min_pin: x.x + libboost: + max_pin: x.x.x +pixman: '0' +popt: '1' +proj: 9.3.1 +ptscotch: 6.0.9 +pugixml: '1.11' +py_lief: '0.16' +pybind11_abi: '5' +pyqt: '6.7' +pyqtchart: '5.15' +pyqtwebengine: '6.7' +python: '3.13' +python_igraph: '0.10' +python_impl: cpython +python_implementation: cpython +pytorch: '2.6' +qhull: '2020.2' +qpdf: '11' +qt: '6.7' +quantlib: '1' +r_base: 4.3.1 +r_implementation: r-base +r_version: 4.3.1 +rdkit: 2023.03.3 +re2: '2024' +readline: '8' +reproc: '14.2' +reproc_cpp: '14.2' +rhash: '1' +ruby: '3.2' +rust_compiler: rust +rust_compiler_version: 1.87.0 +s2n: 1.5.14 +scotch: 6.0.9 +serf: '1.3' +simdjson: '3.10' +sip: '6.10' +sleef: '3' +snappy: '1' +spdlog: '1' +spdlog_fmt_embed: '1' +spirv_tools: '2025' +sqlite: '3' +suitesparse: '7' +target_platform: linux-64 +tesseract: 5.2.0 +tiledb: '2.26' +tk: '8.6' +unixodbc: '2.3' +vc: '14' +vtk_base: 9.4.1 +vtk_io_ffmpeg: 9.4.1 +wayland: '1.24' +x264: 1!152.20180806 +xcb_util: '0.4' +xcb_util_cursor: '0.1' +xcb_util_image: '0.4' +xcb_util_keysyms: '0.4' +xcb_util_renderutil: '0.3' +xcb_util_wm: '0.4' +xerces_c: '3.2' +xorg_libice: '1' +xorg_libsm: '1' +xorg_libx11: '1' +xorg_libxau: '1' +xorg_libxcomposite: '0' +xorg_libxcursor: '1' +xorg_libxdamage: '1' +xorg_libxdmcp: '1' +xorg_libxext: '1' +xorg_libxfixes: '6' +xorg_libxft: '2' +xorg_libxi: '1' +xorg_libxinerama: '1.1' +xorg_libxmu: '1' +xorg_libxrandr: '1' +xorg_libxrender: '0.9' +xorg_libxscrnsaver: '1' +xorg_libxshmfence: '1' +xorg_libxt: '1' +xorg_libxtst: '1' +xorg_libxxf86vm: '1' +xorg_xextproto: '7' +xorg_xorgproto: '2024' +xxhash: 0.8.0 +xz: '5' +yaml: '0.2' +yaml_cpp: '0.8' +zeromq: '4.3' +zfp: '1' +zip_keys: +- - python + - numpy +zlib: '1.2' +zlib_ng: '2.0' +zstd: '1.5' diff --git a/miniconda3/pkgs/libunistring-1.3-hb25bd0a_0/info/recipe/meta.yaml b/miniconda3/pkgs/libunistring-1.3-hb25bd0a_0/info/recipe/meta.yaml new file mode 100644 index 0000000000000000000000000000000000000000..0bde6266a8eea0377554dbb9ade85b5002d28c0d --- /dev/null +++ b/miniconda3/pkgs/libunistring-1.3-hb25bd0a_0/info/recipe/meta.yaml @@ -0,0 +1,69 @@ +# This file created by conda-build 24.1.2 +# meta.yaml template originally from: +# /feedstock/recipe, last modified Wed Aug 13 11:44:49 2025 +# ------------------------------------------------ + +package: + name: libunistring + version: '1.3' +source: + fn: libunistring-1.3.tar.xz + sha256: f245786c831d25150f3dfb4317cda1acc5e3f79a5da4ad073ddca58886569527 + url: https://ftpmirror.gnu.org/libunistring/libunistring-1.3.tar.xz +build: + number: '0' + run_exports: + - libunistring >=1,<2.0a0 + string: hb25bd0a_0 +requirements: + build: + - _libgcc_mutex 0.1 main + - _openmp_mutex 5.1 1_gnu + - _sysroot_linux-64_curr_repodata_hack 3 haa98f57_10 + - binutils_impl_linux-64 2.40 h5293946_0 + - binutils_linux-64 2.40.0 hc2dff05_2 + - gcc_impl_linux-64 11.2.0 h1234567_1 + - gcc_linux-64 11.2.0 h5c386dc_2 + - kernel-headers_linux-64 3.10.0 h57e8cba_10 + - ld_impl_linux-64 2.40 h12ee557_0 + - libgcc-devel_linux-64 11.2.0 h1234567_1 + - libgcc-ng 11.2.0 h1234567_1 + - libgomp 11.2.0 h1234567_1 + - libstdcxx-ng 11.2.0 h1234567_1 + - libtool 2.4.7 h6a678d5_0 + - make 4.2.1 h1bed415_1 + - sysroot_linux-64 2.17 h57e8cba_10 + host: + - _libgcc_mutex 0.1 main + - _openmp_mutex 5.1 1_gnu + - libgcc-ng 11.2.0 h1234567_1 + - libgomp 11.2.0 h1234567_1 + run: + - __glibc >=2.17,<3.0.a0 + - libgcc-ng >=11.2.0 +test: + commands: + - test -e $PREFIX/lib/libunistring${SHLIB_EXT} +about: + description: 'This library provides functions for manipulating Unicode strings and + + for manipulating C strings according to the Unicode standard. + + ' + dev_url: https://git.savannah.gnu.org/gitweb/?p=libunistring.git + doc_url: https://www.gnu.org/software/libunistring/manual/libunistring.html + home: https://www.gnu.org/software/libunistring + license: LGPL-3.0-only + license_family: LGPL + license_file: COPYING + summary: C unicode string manipulation library +extra: + copy_test_source_files: true + final: true + flow_run_id: 2cdea0a0-a12b-46bc-9f35-40218e9fd37a + recipe-maintainers: + - bgruening + - chenghlee + - stefan-balke + remote_url: git@github.com:AnacondaRecipes/libunistring-feedstock.git + sha: 8e6f0f0b878447f309b22c664ea53b916e3a2334 diff --git a/miniconda3/pkgs/libunistring-1.3-hb25bd0a_0/info/recipe/meta.yaml.template b/miniconda3/pkgs/libunistring-1.3-hb25bd0a_0/info/recipe/meta.yaml.template new file mode 100644 index 0000000000000000000000000000000000000000..f1b77f2ffe29d772f264d165a1b6ccd94f195df0 --- /dev/null +++ b/miniconda3/pkgs/libunistring-1.3-hb25bd0a_0/info/recipe/meta.yaml.template @@ -0,0 +1,47 @@ +{% set name = "libunistring" %} +{% set version = "1.3" %} + +package: + name: {{ name|lower }} + version: {{ version }} + +source: + fn: {{ name }}-{{ version }}.tar.xz + url: https://ftpmirror.gnu.org/{{ name }}/{{ name }}-{{ version }}.tar.xz + sha256: f245786c831d25150f3dfb4317cda1acc5e3f79a5da4ad073ddca58886569527 + +build: + number: 0 + skip: True # [win] + run_exports: + # https://abi-laboratory.pro/?view=timeline&l=libunistring + - {{ pin_subpackage('libunistring', min_pin='x', max_pin='x') }} + +requirements: + build: + - {{ stdlib('c') }} + - {{ compiler('c') }} + - make + - libtool + +test: + commands: + - test -e $PREFIX/lib/libunistring${SHLIB_EXT} + +about: + home: https://www.gnu.org/software/libunistring + license: LGPL-3.0-only + license_file: COPYING + license_family: LGPL + summary: C unicode string manipulation library + description: | + This library provides functions for manipulating Unicode strings and + for manipulating C strings according to the Unicode standard. + dev_url: https://git.savannah.gnu.org/gitweb/?p=libunistring.git + doc_url: https://www.gnu.org/software/libunistring/manual/libunistring.html + +extra: + recipe-maintainers: + - stefan-balke + - bgruening + - chenghlee diff --git a/miniconda3/pkgs/libunistring-1.3-hb25bd0a_0/info/repodata_record.json b/miniconda3/pkgs/libunistring-1.3-hb25bd0a_0/info/repodata_record.json new file mode 100644 index 0000000000000000000000000000000000000000..283ae13781a309cbca19c14f1b1b0b722d79a8f3 --- /dev/null +++ b/miniconda3/pkgs/libunistring-1.3-hb25bd0a_0/info/repodata_record.json @@ -0,0 +1,23 @@ +{ + "arch": "x86_64", + "build": "hb25bd0a_0", + "build_number": 0, + "channel": "https://repo.anaconda.com/pkgs/main/linux-64/", + "constrains": [], + "depends": [ + "__glibc >=2.17,<3.0.a0", + "libgcc-ng >=11.2.0" + ], + "fn": "libunistring-1.3-hb25bd0a_0.conda", + "license": "LGPL-3.0-only", + "license_family": "LGPL", + "md5": "46838e72a11b9934a5e4e40530018ccf", + "name": "libunistring", + "platform": "linux", + "sha256": "7b30c28b4cf48110e983bcee62816c5ac6089379e5aac6f65b8c563430b01754", + "size": 737806, + "subdir": "linux-64", + "timestamp": 1755085809000, + "url": "https://repo.anaconda.com/pkgs/main/linux-64/libunistring-1.3-hb25bd0a_0.conda", + "version": "1.3" +} \ No newline at end of file diff --git a/miniconda3/pkgs/libunistring-1.3-hb25bd0a_0/info/run_exports.json b/miniconda3/pkgs/libunistring-1.3-hb25bd0a_0/info/run_exports.json new file mode 100644 index 0000000000000000000000000000000000000000..56d16ce148667f455ecd3d972a7e70b8b2ecfa07 --- /dev/null +++ b/miniconda3/pkgs/libunistring-1.3-hb25bd0a_0/info/run_exports.json @@ -0,0 +1 @@ +{"weak": ["libunistring >=1,<2.0a0"]} \ No newline at end of file diff --git a/miniconda3/pkgs/libunistring-1.3-hb25bd0a_0/info/test/run_test.sh b/miniconda3/pkgs/libunistring-1.3-hb25bd0a_0/info/test/run_test.sh new file mode 100644 index 0000000000000000000000000000000000000000..722c755909d29389ee91314a319101dedb4277f6 --- /dev/null +++ b/miniconda3/pkgs/libunistring-1.3-hb25bd0a_0/info/test/run_test.sh @@ -0,0 +1,8 @@ + + +set -ex + + + +test -e $PREFIX/lib/libunistring${SHLIB_EXT} +exit 0 diff --git a/miniconda3/pkgs/libuuid-1.41.5-h5eee18b_0/include/uuid/uuid.h b/miniconda3/pkgs/libuuid-1.41.5-h5eee18b_0/include/uuid/uuid.h new file mode 100644 index 0000000000000000000000000000000000000000..03c232caad50b4998e44c8e5ca54aa22ba68211f --- /dev/null +++ b/miniconda3/pkgs/libuuid-1.41.5-h5eee18b_0/include/uuid/uuid.h @@ -0,0 +1,121 @@ +/* + * Public include file for the UUID library + * + * Copyright (C) 1996, 1997, 1998 Theodore Ts'o. + * + * %Begin-Header% + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, and the entire permission notice in its entirety, + * including the disclaimer of warranties. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote + * products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ALL OF + * WHICH ARE HEREBY DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE + * USE OF THIS SOFTWARE, EVEN IF NOT ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * %End-Header% + */ + +#ifndef _UUID_UUID_H +#define _UUID_UUID_H + +#include +#ifndef _WIN32 +#include +#endif +#include + +typedef unsigned char uuid_t[16]; + +/* UUID Variant definitions */ +#define UUID_VARIANT_NCS 0 +#define UUID_VARIANT_DCE 1 +#define UUID_VARIANT_MICROSOFT 2 +#define UUID_VARIANT_OTHER 3 + +#define UUID_VARIANT_SHIFT 5 +#define UUID_VARIANT_MASK 0x7 + +/* UUID Type definitions */ +#define UUID_TYPE_DCE_TIME 1 +#define UUID_TYPE_DCE_SECURITY 2 +#define UUID_TYPE_DCE_MD5 3 +#define UUID_TYPE_DCE_RANDOM 4 +#define UUID_TYPE_DCE_SHA1 5 + +#define UUID_TYPE_SHIFT 4 +#define UUID_TYPE_MASK 0xf + +#define UUID_STR_LEN 37 + +/* Allow UUID constants to be defined */ +#ifdef __GNUC__ +#define UUID_DEFINE(name,u0,u1,u2,u3,u4,u5,u6,u7,u8,u9,u10,u11,u12,u13,u14,u15) \ + static const uuid_t name __attribute__ ((unused)) = {u0,u1,u2,u3,u4,u5,u6,u7,u8,u9,u10,u11,u12,u13,u14,u15} +#else +#define UUID_DEFINE(name,u0,u1,u2,u3,u4,u5,u6,u7,u8,u9,u10,u11,u12,u13,u14,u15) \ + static const uuid_t name = {u0,u1,u2,u3,u4,u5,u6,u7,u8,u9,u10,u11,u12,u13,u14,u15} +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +/* clear.c */ +extern void uuid_clear(uuid_t uu); + +/* compare.c */ +extern int uuid_compare(const uuid_t uu1, const uuid_t uu2); + +/* copy.c */ +extern void uuid_copy(uuid_t dst, const uuid_t src); + +/* gen_uuid.c */ +extern void uuid_generate(uuid_t out); +extern void uuid_generate_random(uuid_t out); +extern void uuid_generate_time(uuid_t out); +extern int uuid_generate_time_safe(uuid_t out); + +extern void uuid_generate_md5(uuid_t out, const uuid_t ns, const char *name, size_t len); +extern void uuid_generate_sha1(uuid_t out, const uuid_t ns, const char *name, size_t len); + +/* isnull.c */ +extern int uuid_is_null(const uuid_t uu); + +/* parse.c */ +extern int uuid_parse(const char *in, uuid_t uu); + +/* unparse.c */ +extern void uuid_unparse(const uuid_t uu, char *out); +extern void uuid_unparse_lower(const uuid_t uu, char *out); +extern void uuid_unparse_upper(const uuid_t uu, char *out); + +/* uuid_time.c */ +extern time_t uuid_time(const uuid_t uu, struct timeval *ret_tv); +extern int uuid_type(const uuid_t uu); +extern int uuid_variant(const uuid_t uu); + +/* predefined.c */ +extern const uuid_t *uuid_get_template(const char *alias); + +#ifdef __cplusplus +} +#endif + +#endif /* _UUID_UUID_H */ diff --git a/miniconda3/pkgs/libuuid-1.41.5-h5eee18b_0/info/about.json b/miniconda3/pkgs/libuuid-1.41.5-h5eee18b_0/info/about.json new file mode 100644 index 0000000000000000000000000000000000000000..d30936e8d8d6d608bbbce7f263470432049af027 --- /dev/null +++ b/miniconda3/pkgs/libuuid-1.41.5-h5eee18b_0/info/about.json @@ -0,0 +1,100 @@ +{ + "channels": [ + "https://repo.anaconda.com/pkgs/main" + ], + "conda_build_version": "3.22.0", + "conda_private": false, + "conda_version": "4.14.0", + "description": "The UUID library is used to generate unique identifiers for objects that\nmay be accessible beyond the local system. This library generates UUIDs\ncompatible with those created by the Open Software Foundation (OSF)\nDistributed Computing Environment (DCE) utility uuidgen.\n", + "dev_url": "https://github.com/util-linux/util-linux/", + "doc_url": "https://github.com/util-linux/util-linux/tree/master/libuuid/man", + "env_vars": { + "CIO_TEST": "" + }, + "extra": { + "copy_test_source_files": true, + "final": true, + "flow_run_id": "9a2b1529-513d-4377-b216-e03379e9a7fd", + "recipe-maintainers": [ + "ocefpaf", + "katietz" + ], + "remote_url": "git@github.com:AnacondaRecipes/libuuid-feedstock.git", + "sha": "b40dce90a858994232bde67322d17d3da8eb78b8" + }, + "home": "https://sourceforge.net/projects/libuuid/", + "identifiers": [], + "keywords": [], + "license": "BSD-3-Clause", + "license_family": "BSD", + "license_file": "Documentation/licenses/COPYING.BSD-3", + "root_pkgs": [ + "_libgcc_mutex 0.1 main", + "brotlipy 0.7.0 py39h27cfd23_1003", + "charset-normalizer 2.0.4 pyhd3eb1b0_0", + "idna 3.3 pyhd3eb1b0_0", + "libffi 3.3 he6710b0_2", + "pycosat 0.6.3 py39h27cfd23_0", + "pycparser 2.21 pyhd3eb1b0_0", + "pyopenssl 22.0.0 pyhd3eb1b0_0", + "pysocks 1.7.1 py39h06a4308_0", + "readline 8.1.2 h7f8727e_1", + "ruamel_yaml 0.15.100 py39h27cfd23_0", + "six 1.16.0 pyhd3eb1b0_1", + "wheel 0.37.1 pyhd3eb1b0_0", + "yaml 0.2.5 h7b6447c_0", + "_openmp_mutex 5.1 1_gnu", + "beautifulsoup4 4.11.1 py39h06a4308_0", + "bzip2 1.0.8 h7b6447c_0", + "ca-certificates 2022.07.19 h06a4308_0", + "certifi 2022.9.14 py39h06a4308_0", + "cffi 1.15.1 py39h74dc2b5_0", + "chardet 4.0.0 py39h06a4308_1003", + "conda 4.14.0 py39h06a4308_0", + "conda-build 3.22.0 py39h06a4308_0", + "conda-package-handling 1.9.0 py39h5eee18b_0", + "cryptography 37.0.1 py39h9ce1e76_0", + "cytoolz 0.11.0 py39h27cfd23_0", + "filelock 3.6.0 pyhd3eb1b0_0", + "glob2 0.7 pyhd3eb1b0_0", + "icu 58.2 he6710b0_3", + "jinja2 2.11.3 pyhd3eb1b0_0", + "ld_impl_linux-64 2.38 h1181459_1", + "libarchive 3.6.1 hab531cd_0", + "libgcc-ng 11.2.0 h1234567_1", + "libgomp 11.2.0 h1234567_1", + "liblief 0.11.5 h295c915_1", + "libstdcxx-ng 11.2.0 h1234567_1", + "libxml2 2.9.14 h74e7548_0", + "lz4-c 1.9.3 h295c915_1", + "markupsafe 2.0.1 py39h27cfd23_0", + "ncurses 6.3 h5eee18b_3", + "openssl 1.1.1q h7f8727e_0", + "patch 2.7.6 h7b6447c_1001", + "patchelf 0.13 h295c915_0", + "pip 22.1.2 py39h06a4308_0", + "pkginfo 1.8.2 pyhd3eb1b0_0", + "psutil 5.9.0 py39h5eee18b_0", + "py-lief 0.11.5 py39h295c915_1", + "python 3.9.13 haa1d7c7_1", + "python-libarchive-c 2.9 pyhd3eb1b0_1", + "pytz 2022.1 py39h06a4308_0", + "pyyaml 6.0 py39h7f8727e_1", + "requests 2.28.1 py39h06a4308_0", + "ripgrep 13.0.0 hbdeaff8_0", + "setuptools 63.4.1 py39h06a4308_0", + "soupsieve 2.3.1 pyhd3eb1b0_0", + "sqlite 3.39.2 h5082296_0", + "tk 8.6.12 h1ccaba5_0", + "toml 0.10.2 pyhd3eb1b0_0", + "toolz 0.11.2 pyhd3eb1b0_0", + "tqdm 4.64.0 py39h06a4308_0", + "tzdata 2022c h04d1e81_0", + "urllib3 1.26.11 py39h06a4308_0", + "xz 5.2.5 h7f8727e_1", + "zlib 1.2.12 h5eee18b_3", + "zstd 1.5.2 ha4553b6_0" + ], + "summary": "Portable uuid C library 2.32.1 as pk-version 1.41.5.", + "tags": [] +} \ No newline at end of file diff --git a/miniconda3/pkgs/libuuid-1.41.5-h5eee18b_0/info/files b/miniconda3/pkgs/libuuid-1.41.5-h5eee18b_0/info/files new file mode 100644 index 0000000000000000000000000000000000000000..a990fb97e22f2898a5243e2ed465b599a0770e0b --- /dev/null +++ b/miniconda3/pkgs/libuuid-1.41.5-h5eee18b_0/info/files @@ -0,0 +1,6 @@ +include/uuid/uuid.h +lib/libuuid.a +lib/libuuid.so +lib/libuuid.so.1 +lib/libuuid.so.1.3.0 +lib/pkgconfig/uuid.pc diff --git a/miniconda3/pkgs/libuuid-1.41.5-h5eee18b_0/info/git b/miniconda3/pkgs/libuuid-1.41.5-h5eee18b_0/info/git new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/miniconda3/pkgs/libuuid-1.41.5-h5eee18b_0/info/has_prefix b/miniconda3/pkgs/libuuid-1.41.5-h5eee18b_0/info/has_prefix new file mode 100644 index 0000000000000000000000000000000000000000..1391619613460303b02fc86ab4336c15d7f5ec15 --- /dev/null +++ b/miniconda3/pkgs/libuuid-1.41.5-h5eee18b_0/info/has_prefix @@ -0,0 +1 @@ +/croot/libuuid_1668082679328/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold text lib/pkgconfig/uuid.pc diff --git a/miniconda3/pkgs/libuuid-1.41.5-h5eee18b_0/info/hash_input.json b/miniconda3/pkgs/libuuid-1.41.5-h5eee18b_0/info/hash_input.json new file mode 100644 index 0000000000000000000000000000000000000000..8fe834d106722c7acfc50de2c774febfc217ba97 --- /dev/null +++ b/miniconda3/pkgs/libuuid-1.41.5-h5eee18b_0/info/hash_input.json @@ -0,0 +1,6 @@ +{ + "c_compiler": "gcc", + "c_compiler_version": "11.2.0", + "channel_targets": "defaults", + "target_platform": "linux-64" +} \ No newline at end of file diff --git a/miniconda3/pkgs/libuuid-1.41.5-h5eee18b_0/info/index.json b/miniconda3/pkgs/libuuid-1.41.5-h5eee18b_0/info/index.json new file mode 100644 index 0000000000000000000000000000000000000000..666fca43d58a3437b13e5e023b8ab5838481f26e --- /dev/null +++ b/miniconda3/pkgs/libuuid-1.41.5-h5eee18b_0/info/index.json @@ -0,0 +1,15 @@ +{ + "arch": "x86_64", + "build": "h5eee18b_0", + "build_number": 0, + "depends": [ + "libgcc-ng >=11.2.0" + ], + "license": "BSD-3-Clause", + "license_family": "BSD", + "name": "libuuid", + "platform": "linux", + "subdir": "linux-64", + "timestamp": 1668082729834, + "version": "1.41.5" +} \ No newline at end of file diff --git a/miniconda3/pkgs/libuuid-1.41.5-h5eee18b_0/info/licenses/Documentation/licenses/COPYING.BSD-3 b/miniconda3/pkgs/libuuid-1.41.5-h5eee18b_0/info/licenses/Documentation/licenses/COPYING.BSD-3 new file mode 100644 index 0000000000000000000000000000000000000000..2f17068367d962ff5dc7a3c1bf213bc0bf6a383d --- /dev/null +++ b/miniconda3/pkgs/libuuid-1.41.5-h5eee18b_0/info/licenses/Documentation/licenses/COPYING.BSD-3 @@ -0,0 +1,25 @@ +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, and the entire permission notice in its entirety, + including the disclaimer of warranties. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. +3. The name of the author may not be used to endorse or promote + products derived from this software without specific prior + written permission. + +THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED +WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ALL OF +WHICH ARE HEREBY DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT +OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE +USE OF THIS SOFTWARE, EVEN IF NOT ADVISED OF THE POSSIBILITY OF SUCH +DAMAGE. diff --git a/miniconda3/pkgs/libuuid-1.41.5-h5eee18b_0/info/paths.json b/miniconda3/pkgs/libuuid-1.41.5-h5eee18b_0/info/paths.json new file mode 100644 index 0000000000000000000000000000000000000000..0dc7d270a0b0fb02202cc4f7a669c02ab42f674f --- /dev/null +++ b/miniconda3/pkgs/libuuid-1.41.5-h5eee18b_0/info/paths.json @@ -0,0 +1,43 @@ +{ + "paths": [ + { + "_path": "include/uuid/uuid.h", + "path_type": "hardlink", + "sha256": "926b9441cae3c113950827ef438cb0b07657f6ec1d2fe5f3ba557662ddbb526b", + "size_in_bytes": 3910 + }, + { + "_path": "lib/libuuid.a", + "path_type": "hardlink", + "sha256": "d16861859d7ad6a76c11296ef77000e95f64d75330ce6365f679c1c88c0ecabd", + "size_in_bytes": 53390 + }, + { + "_path": "lib/libuuid.so", + "path_type": "softlink", + "sha256": "b42fa6cf1dcaca6b84e8155c4649d6bad561eaca2e8fa9473db178dbaa4aec53", + "size_in_bytes": 35944 + }, + { + "_path": "lib/libuuid.so.1", + "path_type": "softlink", + "sha256": "b42fa6cf1dcaca6b84e8155c4649d6bad561eaca2e8fa9473db178dbaa4aec53", + "size_in_bytes": 35944 + }, + { + "_path": "lib/libuuid.so.1.3.0", + "path_type": "hardlink", + "sha256": "b42fa6cf1dcaca6b84e8155c4649d6bad561eaca2e8fa9473db178dbaa4aec53", + "size_in_bytes": 35944 + }, + { + "_path": "lib/pkgconfig/uuid.pc", + "file_mode": "text", + "path_type": "hardlink", + "prefix_placeholder": "/croot/libuuid_1668082679328/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold", + "sha256": "ad771b4cb15ca6fcc526199ebbc1c4ff31e1cf96f01fb4710b14462327ebbef1", + "size_in_bytes": 1208 + } + ], + "paths_version": 1 +} \ No newline at end of file diff --git a/miniconda3/pkgs/libuuid-1.41.5-h5eee18b_0/info/recipe/build.sh b/miniconda3/pkgs/libuuid-1.41.5-h5eee18b_0/info/recipe/build.sh new file mode 100644 index 0000000000000000000000000000000000000000..6a81a238c1c5d55264b2b0cc1aa43843e3a2b4b4 --- /dev/null +++ b/miniconda3/pkgs/libuuid-1.41.5-h5eee18b_0/info/recipe/build.sh @@ -0,0 +1,13 @@ +#!/bin/bash +# Get an updated config.sub and config.guess +cp $BUILD_PREFIX/share/gnuconfig/config.* ./config + +bash configure --prefix=$PREFIX --disable-all-programs --enable-libuuid --with-bashcompletiondir=$PREFIX/share + +make +if [[ "${CONDA_BUILD_CROSS_COMPILATION}" != "1" ]]; then +make tests +fi +make install + +rm -fr $PREFIX/share diff --git a/miniconda3/pkgs/libuuid-1.41.5-h5eee18b_0/info/recipe/conda_build_config.yaml b/miniconda3/pkgs/libuuid-1.41.5-h5eee18b_0/info/recipe/conda_build_config.yaml new file mode 100644 index 0000000000000000000000000000000000000000..ae405b7c91e83118d9cc26e3d7a93b6ef3b163d9 --- /dev/null +++ b/miniconda3/pkgs/libuuid-1.41.5-h5eee18b_0/info/recipe/conda_build_config.yaml @@ -0,0 +1,100 @@ +VERBOSE_AT: V=1 +VERBOSE_CM: VERBOSE=1 +apr: 1.6.3 +blas_impl: mkl +boost: '1.73' +boost_cpp: '1.73' +bzip2: '1.0' +c_compiler: gcc +c_compiler_version: 11.2.0 +cairo: '1.16' +channel_targets: defaults +clang_variant: clang +cpu_optimization_target: nocona +cran_mirror: https://mran.microsoft.com/snapshot/2018-01-01 +cxx_compiler: gxx +cxx_compiler_version: 11.2.0 +cyrus_sasl: 2.1.26 +dbus: '1' +expat: '2' +extend_keys: +- ignore_build_only_deps +- pin_run_as_build +- ignore_version +- extend_keys +fontconfig: '2.13' +fortran_compiler: gfortran +fortran_compiler_version: 11.2.0 +freetype: '2.10' +g2clib: '1.6' +geos: 3.8.0 +giflib: '5' +glib: '2' +gmp: '6.1' +gnu: 2.12.2 +gst_plugins_base: '1.14' +gstreamer: '1.14' +harfbuzz: 4.3.0 +hdf4: '4.2' +hdf5: 1.10.6 +hdfeos2: '2.20' +hdfeos5: '5.1' +icu: '58' +ignore_build_only_deps: +- numpy +- python +jpeg: '9' +libdap4: '3.19' +libffi: '3.3' +libgd: 2.3.3 +libgdal: '3.0' +libgsasl: '1.8' +libkml: '1.3' +libnetcdf: '4.8' +libpng: '1.6' +libprotobuf: 3.20.1 +libtiff: '4.1' +libwebp: 1.2.0 +libxml2: '2.9' +libxslt: '1.1' +llvm_variant: llvm +lua: '5' +lzo: '2' +mkl: 2021.* +mpfr: '4' +numpy: '1.16' +openblas: 0.3.20 +openjpeg: '2.3' +openssl: 1.1.1 +perl: '5.34' +pin_run_as_build: + python: + min_pin: x.x + max_pin: x.x + r-base: + min_pin: x.x + max_pin: x.x + libboost: + max_pin: x.x.x +pixman: '0.40' +proj: 6.2.1 +proj4: 5.2.0 +python: '3.8' +python_impl: cpython +python_implementation: cpython +r_base: '3.5' +r_implementation: mro-base +r_version: 3.5.0 +readline: '8.0' +rust_compiler: rust +rust_compiler_version: 1.56.0 +serf: 1.3.9 +sqlite: '3' +target_platform: linux-64 +tk: '8.6' +xz: '5' +zip_keys: +- - python + - numpy +zlib: '1.2' +zstd: 1.5.2 diff --git a/miniconda3/pkgs/libuuid-1.41.5-h5eee18b_0/info/recipe/meta.yaml b/miniconda3/pkgs/libuuid-1.41.5-h5eee18b_0/info/recipe/meta.yaml new file mode 100644 index 0000000000000000000000000000000000000000..1b6bc0fab59bb5d8db5ede00d0d28de4d6d0fd93 --- /dev/null +++ b/miniconda3/pkgs/libuuid-1.41.5-h5eee18b_0/info/recipe/meta.yaml @@ -0,0 +1,76 @@ +# This file created by conda-build 3.22.0 +# meta.yaml template originally from: +# /feedstock/recipe, last modified Thu Nov 10 12:17:44 2022 +# ------------------------------------------------ + +package: + name: libuuid + version: 1.41.5 +source: + fn: libuuid-2.32.1.tar.gz + sha256: 3bbf9f3d4a33d6653cf0f7e4fc422091b6a38c3b1195c0ee716c67148a1a7122 + url: https://mirrors.edge.kernel.org/pub/linux/utils/util-linux/v2.32/util-linux-2.32.1.tar.gz +build: + missing_dso_whitelist: + - $RPATH/ld64.so.1 + number: '0' + run_exports: + - libuuid >=1.41.5,<2.0a0 + string: h5eee18b_0 +requirements: + build: + - _libgcc_mutex 0.1 main + - _openmp_mutex 5.1 1_gnu + - _sysroot_linux-64_curr_repodata_hack 3 haa98f57_10 + - binutils_impl_linux-64 2.38 h2a08ee3_1 + - binutils_linux-64 2.38.0 hc2dff05_0 + - gcc_impl_linux-64 11.2.0 h1234567_1 + - gcc_linux-64 11.2.0 h5c386dc_0 + - gnuconfig 2021.05.24 hd3eb1b0_0 + - kernel-headers_linux-64 3.10.0 h57e8cba_10 + - ld_impl_linux-64 2.38 h1181459_1 + - libgcc-devel_linux-64 11.2.0 h1234567_1 + - libgcc-ng 11.2.0 h1234567_1 + - libgomp 11.2.0 h1234567_1 + - libstdcxx-ng 11.2.0 h1234567_1 + - make 4.2.1 h1bed415_1 + - sysroot_linux-64 2.17 h57e8cba_10 + host: + - _libgcc_mutex 0.1 main + - _openmp_mutex 5.1 1_gnu + - libgcc-ng 11.2.0 h1234567_1 + - libgomp 11.2.0 h1234567_1 + run: + - libgcc-ng >=11.2.0 +test: + commands: + - test -f ${PREFIX}/lib/libuuid.a + - test -f ${PREFIX}/lib/libuuid.so + - echo "make linter happy" +about: + description: 'The UUID library is used to generate unique identifiers for objects + that + + may be accessible beyond the local system. This library generates UUIDs + + compatible with those created by the Open Software Foundation (OSF) + + Distributed Computing Environment (DCE) utility uuidgen. + + ' + dev_url: https://github.com/util-linux/util-linux/ + doc_url: https://github.com/util-linux/util-linux/tree/master/libuuid/man + home: https://sourceforge.net/projects/libuuid/ + license: BSD-3-Clause + license_family: BSD + license_file: Documentation/licenses/COPYING.BSD-3 + summary: Portable uuid C library 2.32.1 as pk-version 1.41.5. +extra: + copy_test_source_files: true + final: true + flow_run_id: 9a2b1529-513d-4377-b216-e03379e9a7fd + recipe-maintainers: + - katietz + - ocefpaf + remote_url: git@github.com:AnacondaRecipes/libuuid-feedstock.git + sha: b40dce90a858994232bde67322d17d3da8eb78b8 diff --git a/miniconda3/pkgs/libuuid-1.41.5-h5eee18b_0/info/recipe/meta.yaml.template b/miniconda3/pkgs/libuuid-1.41.5-h5eee18b_0/info/recipe/meta.yaml.template new file mode 100644 index 0000000000000000000000000000000000000000..8a050fd48309690a976652008ff438eab5d7cadd --- /dev/null +++ b/miniconda3/pkgs/libuuid-1.41.5-h5eee18b_0/info/recipe/meta.yaml.template @@ -0,0 +1,56 @@ +{% set major_minor = "2.32" %} +{% set version = major_minor + ".1" %} +# we map 2.x version to 1.41.5+ for compatibility reason. +# if we build libuuid as version 2.x, all older libuuid dependencies would +# fail to resolve, but the library contains backward-compatibility. By this +# remapping we make use of this feature and avoid useless rebuilding/hotfixing. +{% set compat_version = "1.41.5" %} + +package: + name: libuuid + version: {{ compat_version }} + +source: + fn: libuuid-{{ version }}.tar.gz + url: https://mirrors.edge.kernel.org/pub/linux/utils/util-linux/v{{ major_minor }}/util-linux-{{ version }}.tar.gz + sha256: 3bbf9f3d4a33d6653cf0f7e4fc422091b6a38c3b1195c0ee716c67148a1a7122 + +build: + number: 0 + skip: True # [win] + missing_dso_whitelist: + - $RPATH/ld64.so.1 + run_exports: + # https://abi-laboratory.pro/index.php?view=timeline&l=util-linux + - {{ pin_subpackage('libuuid') }} + +requirements: + build: + - gnuconfig # [unix] + - {{ compiler('c') }} + - make # [unix] + +test: + commands: + - test -f ${PREFIX}/lib/libuuid.a # [unix] + - test -f ${PREFIX}/lib/libuuid.so # [linux] + - test -f ${PREFIX}/lib/libuuid.dylib # [osx] + - echo "make linter happy" +about: + home: https://sourceforge.net/projects/libuuid/ + license: BSD-3-Clause + license_family: BSD + license_file: Documentation/licenses/COPYING.BSD-3 + summary: Portable uuid C library {{ version }} as pk-version {{ compat_version}}. + description: | + The UUID library is used to generate unique identifiers for objects that + may be accessible beyond the local system. This library generates UUIDs + compatible with those created by the Open Software Foundation (OSF) + Distributed Computing Environment (DCE) utility uuidgen. + doc_url: https://github.com/util-linux/util-linux/tree/master/libuuid/man + dev_url: https://github.com/util-linux/util-linux/ + +extra: + recipe-maintainers: + - ocefpaf + - katietz diff --git a/miniconda3/pkgs/libuuid-1.41.5-h5eee18b_0/info/repodata_record.json b/miniconda3/pkgs/libuuid-1.41.5-h5eee18b_0/info/repodata_record.json new file mode 100644 index 0000000000000000000000000000000000000000..2116a8e89e8dac2e951f82fa974dfbc05db74847 --- /dev/null +++ b/miniconda3/pkgs/libuuid-1.41.5-h5eee18b_0/info/repodata_record.json @@ -0,0 +1,22 @@ +{ + "arch": "x86_64", + "build": "h5eee18b_0", + "build_number": 0, + "channel": "https://repo.anaconda.com/pkgs/main/linux-64/", + "constrains": [], + "depends": [ + "libgcc-ng >=11.2.0" + ], + "fn": "libuuid-1.41.5-h5eee18b_0.conda", + "license": "BSD-3-Clause", + "license_family": "BSD", + "md5": "4a6a2354414c9080327274aa514e5299", + "name": "libuuid", + "platform": "linux", + "sha256": "2a401aafabac51b7736cfe12d2ab205d29052640ea8183253c9d0a8e7ed0d49a", + "size": 28110, + "subdir": "linux-64", + "timestamp": 1668082729000, + "url": "https://repo.anaconda.com/pkgs/main/linux-64/libuuid-1.41.5-h5eee18b_0.conda", + "version": "1.41.5" +} \ No newline at end of file diff --git a/miniconda3/pkgs/libuuid-1.41.5-h5eee18b_0/info/run_exports.json b/miniconda3/pkgs/libuuid-1.41.5-h5eee18b_0/info/run_exports.json new file mode 100644 index 0000000000000000000000000000000000000000..b874d7248e83dfbe435702e0b8f44d5a27825422 --- /dev/null +++ b/miniconda3/pkgs/libuuid-1.41.5-h5eee18b_0/info/run_exports.json @@ -0,0 +1 @@ +{"weak": ["libuuid >=1.41.5,<2.0a0"]} \ No newline at end of file diff --git a/miniconda3/pkgs/libuuid-1.41.5-h5eee18b_0/info/test/run_test.sh b/miniconda3/pkgs/libuuid-1.41.5-h5eee18b_0/info/test/run_test.sh new file mode 100644 index 0000000000000000000000000000000000000000..1c4b8e96a7c8cd57054390366b9cb3eade79b327 --- /dev/null +++ b/miniconda3/pkgs/libuuid-1.41.5-h5eee18b_0/info/test/run_test.sh @@ -0,0 +1,10 @@ + + +set -ex + + + +test -f ${PREFIX}/lib/libuuid.a +test -f ${PREFIX}/lib/libuuid.so +echo "make linter happy" +exit 0 diff --git a/miniconda3/pkgs/libuuid-1.41.5-h5eee18b_0/lib/libuuid.a b/miniconda3/pkgs/libuuid-1.41.5-h5eee18b_0/lib/libuuid.a new file mode 100644 index 0000000000000000000000000000000000000000..130124cef4b653a84827c7c3fe9b0e7eba0daa0d Binary files /dev/null and b/miniconda3/pkgs/libuuid-1.41.5-h5eee18b_0/lib/libuuid.a differ diff --git a/miniconda3/pkgs/libuuid-1.41.5-h5eee18b_0/lib/libuuid.so b/miniconda3/pkgs/libuuid-1.41.5-h5eee18b_0/lib/libuuid.so new file mode 100644 index 0000000000000000000000000000000000000000..87e7c36b4c42406e82c44d062a11e9cbb7f0c4c4 Binary files /dev/null and b/miniconda3/pkgs/libuuid-1.41.5-h5eee18b_0/lib/libuuid.so differ diff --git a/miniconda3/pkgs/libuuid-1.41.5-h5eee18b_0/lib/libuuid.so.1 b/miniconda3/pkgs/libuuid-1.41.5-h5eee18b_0/lib/libuuid.so.1 new file mode 100644 index 0000000000000000000000000000000000000000..87e7c36b4c42406e82c44d062a11e9cbb7f0c4c4 Binary files /dev/null and b/miniconda3/pkgs/libuuid-1.41.5-h5eee18b_0/lib/libuuid.so.1 differ diff --git a/miniconda3/pkgs/libuuid-1.41.5-h5eee18b_0/lib/libuuid.so.1.3.0 b/miniconda3/pkgs/libuuid-1.41.5-h5eee18b_0/lib/libuuid.so.1.3.0 new file mode 100644 index 0000000000000000000000000000000000000000..87e7c36b4c42406e82c44d062a11e9cbb7f0c4c4 Binary files /dev/null and b/miniconda3/pkgs/libuuid-1.41.5-h5eee18b_0/lib/libuuid.so.1.3.0 differ diff --git a/miniconda3/pkgs/libuuid-1.41.5-h5eee18b_0/lib/pkgconfig/uuid.pc b/miniconda3/pkgs/libuuid-1.41.5-h5eee18b_0/lib/pkgconfig/uuid.pc new file mode 100644 index 0000000000000000000000000000000000000000..eb2edeb5e038ebd34be461de2ff23bae0a6d4f16 --- /dev/null +++ b/miniconda3/pkgs/libuuid-1.41.5-h5eee18b_0/lib/pkgconfig/uuid.pc @@ -0,0 +1,11 @@ +prefix=/croot/libuuid_1668082679328/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold +exec_prefix=/croot/libuuid_1668082679328/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold +libdir=/croot/libuuid_1668082679328/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold/lib +includedir=/croot/libuuid_1668082679328/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold/include + +Name: uuid +Description: Universally unique id library +Version: 2.32.1 +Requires: +Cflags: -I${includedir}/uuid +Libs: -L${libdir} -luuid diff --git a/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/include/xcb/bigreq.h b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/include/xcb/bigreq.h new file mode 100644 index 0000000000000000000000000000000000000000..becd16de81ea749bec3b96712e437efd975c8957 --- /dev/null +++ b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/include/xcb/bigreq.h @@ -0,0 +1,117 @@ +/* + * This file generated automatically from bigreq.xml by c_client.py. + * Edit at your peril. + */ + +/** + * @defgroup XCB_BigRequests_API XCB BigRequests API + * @brief BigRequests XCB Protocol Implementation. + * @{ + **/ + +#ifndef __BIGREQ_H +#define __BIGREQ_H + +#include "xcb.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#define XCB_BIGREQUESTS_MAJOR_VERSION 0 +#define XCB_BIGREQUESTS_MINOR_VERSION 0 + +extern xcb_extension_t xcb_big_requests_id; + +/** + * @brief xcb_big_requests_enable_cookie_t + **/ +typedef struct xcb_big_requests_enable_cookie_t { + unsigned int sequence; +} xcb_big_requests_enable_cookie_t; + +/** Opcode for xcb_big_requests_enable. */ +#define XCB_BIG_REQUESTS_ENABLE 0 + +/** + * @brief xcb_big_requests_enable_request_t + **/ +typedef struct xcb_big_requests_enable_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; +} xcb_big_requests_enable_request_t; + +/** + * @brief xcb_big_requests_enable_reply_t + **/ +typedef struct xcb_big_requests_enable_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint32_t maximum_request_length; +} xcb_big_requests_enable_reply_t; + +/** + * @brief Enable the BIG-REQUESTS extension + * + * @param c The connection + * @return A cookie + * + * This enables the BIG-REQUESTS extension, which allows for requests larger than + * 262140 bytes in length. When enabled, if the 16-bit length field is zero, it + * is immediately followed by a 32-bit length field specifying the length of the + * request in 4-byte units. + * + */ +xcb_big_requests_enable_cookie_t +xcb_big_requests_enable (xcb_connection_t *c); + +/** + * @brief Enable the BIG-REQUESTS extension + * + * @param c The connection + * @return A cookie + * + * This enables the BIG-REQUESTS extension, which allows for requests larger than + * 262140 bytes in length. When enabled, if the 16-bit length field is zero, it + * is immediately followed by a 32-bit length field specifying the length of the + * request in 4-byte units. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_big_requests_enable_cookie_t +xcb_big_requests_enable_unchecked (xcb_connection_t *c); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_big_requests_enable_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_big_requests_enable_reply_t * +xcb_big_requests_enable_reply (xcb_connection_t *c, + xcb_big_requests_enable_cookie_t cookie /**< */, + xcb_generic_error_t **e); + + +#ifdef __cplusplus +} +#endif + +#endif + +/** + * @} + */ diff --git a/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/include/xcb/composite.h b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/include/xcb/composite.h new file mode 100644 index 0000000000000000000000000000000000000000..d05d0729d6c869a2dcf0be7a60471a933e057096 --- /dev/null +++ b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/include/xcb/composite.h @@ -0,0 +1,580 @@ +/* + * This file generated automatically from composite.xml by c_client.py. + * Edit at your peril. + */ + +/** + * @defgroup XCB_Composite_API XCB Composite API + * @brief Composite XCB Protocol Implementation. + * @{ + **/ + +#ifndef __COMPOSITE_H +#define __COMPOSITE_H + +#include "xcb.h" +#include "xproto.h" +#include "xfixes.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#define XCB_COMPOSITE_MAJOR_VERSION 0 +#define XCB_COMPOSITE_MINOR_VERSION 4 + +extern xcb_extension_t xcb_composite_id; + +typedef enum xcb_composite_redirect_t { + XCB_COMPOSITE_REDIRECT_AUTOMATIC = 0, + XCB_COMPOSITE_REDIRECT_MANUAL = 1 +} xcb_composite_redirect_t; + +/** + * @brief xcb_composite_query_version_cookie_t + **/ +typedef struct xcb_composite_query_version_cookie_t { + unsigned int sequence; +} xcb_composite_query_version_cookie_t; + +/** Opcode for xcb_composite_query_version. */ +#define XCB_COMPOSITE_QUERY_VERSION 0 + +/** + * @brief xcb_composite_query_version_request_t + **/ +typedef struct xcb_composite_query_version_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + uint32_t client_major_version; + uint32_t client_minor_version; +} xcb_composite_query_version_request_t; + +/** + * @brief xcb_composite_query_version_reply_t + **/ +typedef struct xcb_composite_query_version_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint32_t major_version; + uint32_t minor_version; + uint8_t pad1[16]; +} xcb_composite_query_version_reply_t; + +/** Opcode for xcb_composite_redirect_window. */ +#define XCB_COMPOSITE_REDIRECT_WINDOW 1 + +/** + * @brief xcb_composite_redirect_window_request_t + **/ +typedef struct xcb_composite_redirect_window_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_window_t window; + uint8_t update; + uint8_t pad0[3]; +} xcb_composite_redirect_window_request_t; + +/** Opcode for xcb_composite_redirect_subwindows. */ +#define XCB_COMPOSITE_REDIRECT_SUBWINDOWS 2 + +/** + * @brief xcb_composite_redirect_subwindows_request_t + **/ +typedef struct xcb_composite_redirect_subwindows_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_window_t window; + uint8_t update; + uint8_t pad0[3]; +} xcb_composite_redirect_subwindows_request_t; + +/** Opcode for xcb_composite_unredirect_window. */ +#define XCB_COMPOSITE_UNREDIRECT_WINDOW 3 + +/** + * @brief xcb_composite_unredirect_window_request_t + **/ +typedef struct xcb_composite_unredirect_window_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_window_t window; + uint8_t update; + uint8_t pad0[3]; +} xcb_composite_unredirect_window_request_t; + +/** Opcode for xcb_composite_unredirect_subwindows. */ +#define XCB_COMPOSITE_UNREDIRECT_SUBWINDOWS 4 + +/** + * @brief xcb_composite_unredirect_subwindows_request_t + **/ +typedef struct xcb_composite_unredirect_subwindows_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_window_t window; + uint8_t update; + uint8_t pad0[3]; +} xcb_composite_unredirect_subwindows_request_t; + +/** Opcode for xcb_composite_create_region_from_border_clip. */ +#define XCB_COMPOSITE_CREATE_REGION_FROM_BORDER_CLIP 5 + +/** + * @brief xcb_composite_create_region_from_border_clip_request_t + **/ +typedef struct xcb_composite_create_region_from_border_clip_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_xfixes_region_t region; + xcb_window_t window; +} xcb_composite_create_region_from_border_clip_request_t; + +/** Opcode for xcb_composite_name_window_pixmap. */ +#define XCB_COMPOSITE_NAME_WINDOW_PIXMAP 6 + +/** + * @brief xcb_composite_name_window_pixmap_request_t + **/ +typedef struct xcb_composite_name_window_pixmap_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_window_t window; + xcb_pixmap_t pixmap; +} xcb_composite_name_window_pixmap_request_t; + +/** + * @brief xcb_composite_get_overlay_window_cookie_t + **/ +typedef struct xcb_composite_get_overlay_window_cookie_t { + unsigned int sequence; +} xcb_composite_get_overlay_window_cookie_t; + +/** Opcode for xcb_composite_get_overlay_window. */ +#define XCB_COMPOSITE_GET_OVERLAY_WINDOW 7 + +/** + * @brief xcb_composite_get_overlay_window_request_t + **/ +typedef struct xcb_composite_get_overlay_window_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_window_t window; +} xcb_composite_get_overlay_window_request_t; + +/** + * @brief xcb_composite_get_overlay_window_reply_t + **/ +typedef struct xcb_composite_get_overlay_window_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + xcb_window_t overlay_win; + uint8_t pad1[20]; +} xcb_composite_get_overlay_window_reply_t; + +/** Opcode for xcb_composite_release_overlay_window. */ +#define XCB_COMPOSITE_RELEASE_OVERLAY_WINDOW 8 + +/** + * @brief xcb_composite_release_overlay_window_request_t + **/ +typedef struct xcb_composite_release_overlay_window_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_window_t window; +} xcb_composite_release_overlay_window_request_t; + +/** + * @brief Negotiate the version of Composite + * + * @param c The connection + * @param client_major_version The major version supported by the client. + * @param client_minor_version The minor version supported by the client. + * @return A cookie + * + * This negotiates the version of the Composite extension. It must be precede all + * other requests using Composite. Failure to do so will cause a BadRequest error. + * + */ +xcb_composite_query_version_cookie_t +xcb_composite_query_version (xcb_connection_t *c, + uint32_t client_major_version, + uint32_t client_minor_version); + +/** + * @brief Negotiate the version of Composite + * + * @param c The connection + * @param client_major_version The major version supported by the client. + * @param client_minor_version The minor version supported by the client. + * @return A cookie + * + * This negotiates the version of the Composite extension. It must be precede all + * other requests using Composite. Failure to do so will cause a BadRequest error. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_composite_query_version_cookie_t +xcb_composite_query_version_unchecked (xcb_connection_t *c, + uint32_t client_major_version, + uint32_t client_minor_version); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_composite_query_version_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_composite_query_version_reply_t * +xcb_composite_query_version_reply (xcb_connection_t *c, + xcb_composite_query_version_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +/** + * @brief Redirect the hierarchy starting at "window" to off-screen storage. + * + * @param c The connection + * @param window The root of the hierarchy to redirect to off-screen storage. + * @param update A bitmask of #xcb_composite_redirect_t values. + * @param update Whether contents are automatically mirrored to the parent window. If one client + * already specifies an update type of Manual, any attempt by another to specify a + * mode of Manual so will result in an Access error. + * @return A cookie + * + * The hierarchy starting at 'window' is directed to off-screen + * storage. When all clients enabling redirection terminate, + * the redirection will automatically be disabled. + * + * The root window may not be redirected. Doing so results in a Match + * error. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_composite_redirect_window_checked (xcb_connection_t *c, + xcb_window_t window, + uint8_t update); + +/** + * @brief Redirect the hierarchy starting at "window" to off-screen storage. + * + * @param c The connection + * @param window The root of the hierarchy to redirect to off-screen storage. + * @param update A bitmask of #xcb_composite_redirect_t values. + * @param update Whether contents are automatically mirrored to the parent window. If one client + * already specifies an update type of Manual, any attempt by another to specify a + * mode of Manual so will result in an Access error. + * @return A cookie + * + * The hierarchy starting at 'window' is directed to off-screen + * storage. When all clients enabling redirection terminate, + * the redirection will automatically be disabled. + * + * The root window may not be redirected. Doing so results in a Match + * error. + * + */ +xcb_void_cookie_t +xcb_composite_redirect_window (xcb_connection_t *c, + xcb_window_t window, + uint8_t update); + +/** + * @brief Redirect all current and future children of ‘window’ + * + * @param c The connection + * @param window The root of the hierarchy to redirect to off-screen storage. + * @param update A bitmask of #xcb_composite_redirect_t values. + * @param update Whether contents are automatically mirrored to the parent window. If one client + * already specifies an update type of Manual, any attempt by another to specify a + * mode of Manual so will result in an Access error. + * @return A cookie + * + * Hierarchies starting at all current and future children of window + * will be redirected as in RedirectWindow. If update is Manual, + * then painting of the window background during window manipulation + * and ClearArea requests is inhibited. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_composite_redirect_subwindows_checked (xcb_connection_t *c, + xcb_window_t window, + uint8_t update); + +/** + * @brief Redirect all current and future children of ‘window’ + * + * @param c The connection + * @param window The root of the hierarchy to redirect to off-screen storage. + * @param update A bitmask of #xcb_composite_redirect_t values. + * @param update Whether contents are automatically mirrored to the parent window. If one client + * already specifies an update type of Manual, any attempt by another to specify a + * mode of Manual so will result in an Access error. + * @return A cookie + * + * Hierarchies starting at all current and future children of window + * will be redirected as in RedirectWindow. If update is Manual, + * then painting of the window background during window manipulation + * and ClearArea requests is inhibited. + * + */ +xcb_void_cookie_t +xcb_composite_redirect_subwindows (xcb_connection_t *c, + xcb_window_t window, + uint8_t update); + +/** + * @brief Terminate redirection of the specified window. + * + * @param c The connection + * @param window The window to terminate redirection of. Must be redirected by the + * current client, or a Value error results. + * @param update A bitmask of #xcb_composite_redirect_t values. + * @param update The update type passed to RedirectWindows. If this does not match the + * previously requested update type, a Value error results. + * @return A cookie + * + * Redirection of the specified window will be terminated. This cannot be + * used if the window was redirected with RedirectSubwindows. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_composite_unredirect_window_checked (xcb_connection_t *c, + xcb_window_t window, + uint8_t update); + +/** + * @brief Terminate redirection of the specified window. + * + * @param c The connection + * @param window The window to terminate redirection of. Must be redirected by the + * current client, or a Value error results. + * @param update A bitmask of #xcb_composite_redirect_t values. + * @param update The update type passed to RedirectWindows. If this does not match the + * previously requested update type, a Value error results. + * @return A cookie + * + * Redirection of the specified window will be terminated. This cannot be + * used if the window was redirected with RedirectSubwindows. + * + */ +xcb_void_cookie_t +xcb_composite_unredirect_window (xcb_connection_t *c, + xcb_window_t window, + uint8_t update); + +/** + * @brief Terminate redirection of the specified window’s children + * + * @param c The connection + * @param window The window to terminate redirection of. Must have previously been + * selected for sub-redirection by the current client, or a Value error + * results. + * @param update A bitmask of #xcb_composite_redirect_t values. + * @param update The update type passed to RedirectSubWindows. If this does not match + * the previously requested update type, a Value error results. + * @return A cookie + * + * Redirection of all children of window will be terminated. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_composite_unredirect_subwindows_checked (xcb_connection_t *c, + xcb_window_t window, + uint8_t update); + +/** + * @brief Terminate redirection of the specified window’s children + * + * @param c The connection + * @param window The window to terminate redirection of. Must have previously been + * selected for sub-redirection by the current client, or a Value error + * results. + * @param update A bitmask of #xcb_composite_redirect_t values. + * @param update The update type passed to RedirectSubWindows. If this does not match + * the previously requested update type, a Value error results. + * @return A cookie + * + * Redirection of all children of window will be terminated. + * + */ +xcb_void_cookie_t +xcb_composite_unredirect_subwindows (xcb_connection_t *c, + xcb_window_t window, + uint8_t update); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_composite_create_region_from_border_clip_checked (xcb_connection_t *c, + xcb_xfixes_region_t region, + xcb_window_t window); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_composite_create_region_from_border_clip (xcb_connection_t *c, + xcb_xfixes_region_t region, + xcb_window_t window); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_composite_name_window_pixmap_checked (xcb_connection_t *c, + xcb_window_t window, + xcb_pixmap_t pixmap); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_composite_name_window_pixmap (xcb_connection_t *c, + xcb_window_t window, + xcb_pixmap_t pixmap); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_composite_get_overlay_window_cookie_t +xcb_composite_get_overlay_window (xcb_connection_t *c, + xcb_window_t window); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_composite_get_overlay_window_cookie_t +xcb_composite_get_overlay_window_unchecked (xcb_connection_t *c, + xcb_window_t window); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_composite_get_overlay_window_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_composite_get_overlay_window_reply_t * +xcb_composite_get_overlay_window_reply (xcb_connection_t *c, + xcb_composite_get_overlay_window_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_composite_release_overlay_window_checked (xcb_connection_t *c, + xcb_window_t window); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_composite_release_overlay_window (xcb_connection_t *c, + xcb_window_t window); + + +#ifdef __cplusplus +} +#endif + +#endif + +/** + * @} + */ diff --git a/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/include/xcb/damage.h b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/include/xcb/damage.h new file mode 100644 index 0000000000000000000000000000000000000000..0f432b9adcddb850e839b601596457957788a60b --- /dev/null +++ b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/include/xcb/damage.h @@ -0,0 +1,456 @@ +/* + * This file generated automatically from damage.xml by c_client.py. + * Edit at your peril. + */ + +/** + * @defgroup XCB_Damage_API XCB Damage API + * @brief Damage XCB Protocol Implementation. + * @{ + **/ + +#ifndef __DAMAGE_H +#define __DAMAGE_H + +#include "xcb.h" +#include "xproto.h" +#include "xfixes.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#define XCB_DAMAGE_MAJOR_VERSION 1 +#define XCB_DAMAGE_MINOR_VERSION 1 + +extern xcb_extension_t xcb_damage_id; + +typedef uint32_t xcb_damage_damage_t; + +/** + * @brief xcb_damage_damage_iterator_t + **/ +typedef struct xcb_damage_damage_iterator_t { + xcb_damage_damage_t *data; + int rem; + int index; +} xcb_damage_damage_iterator_t; + +typedef enum xcb_damage_report_level_t { + XCB_DAMAGE_REPORT_LEVEL_RAW_RECTANGLES = 0, + XCB_DAMAGE_REPORT_LEVEL_DELTA_RECTANGLES = 1, + XCB_DAMAGE_REPORT_LEVEL_BOUNDING_BOX = 2, + XCB_DAMAGE_REPORT_LEVEL_NON_EMPTY = 3 +} xcb_damage_report_level_t; + +/** Opcode for xcb_damage_bad_damage. */ +#define XCB_DAMAGE_BAD_DAMAGE 0 + +/** + * @brief xcb_damage_bad_damage_error_t + **/ +typedef struct xcb_damage_bad_damage_error_t { + uint8_t response_type; + uint8_t error_code; + uint16_t sequence; + uint32_t bad_value; + uint16_t minor_opcode; + uint8_t major_opcode; +} xcb_damage_bad_damage_error_t; + +/** + * @brief xcb_damage_query_version_cookie_t + **/ +typedef struct xcb_damage_query_version_cookie_t { + unsigned int sequence; +} xcb_damage_query_version_cookie_t; + +/** Opcode for xcb_damage_query_version. */ +#define XCB_DAMAGE_QUERY_VERSION 0 + +/** + * @brief xcb_damage_query_version_request_t + **/ +typedef struct xcb_damage_query_version_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + uint32_t client_major_version; + uint32_t client_minor_version; +} xcb_damage_query_version_request_t; + +/** + * @brief xcb_damage_query_version_reply_t + **/ +typedef struct xcb_damage_query_version_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint32_t major_version; + uint32_t minor_version; + uint8_t pad1[16]; +} xcb_damage_query_version_reply_t; + +/** Opcode for xcb_damage_create. */ +#define XCB_DAMAGE_CREATE 1 + +/** + * @brief xcb_damage_create_request_t + **/ +typedef struct xcb_damage_create_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_damage_damage_t damage; + xcb_drawable_t drawable; + uint8_t level; + uint8_t pad0[3]; +} xcb_damage_create_request_t; + +/** Opcode for xcb_damage_destroy. */ +#define XCB_DAMAGE_DESTROY 2 + +/** + * @brief xcb_damage_destroy_request_t + **/ +typedef struct xcb_damage_destroy_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_damage_damage_t damage; +} xcb_damage_destroy_request_t; + +/** Opcode for xcb_damage_subtract. */ +#define XCB_DAMAGE_SUBTRACT 3 + +/** + * @brief xcb_damage_subtract_request_t + **/ +typedef struct xcb_damage_subtract_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_damage_damage_t damage; + xcb_xfixes_region_t repair; + xcb_xfixes_region_t parts; +} xcb_damage_subtract_request_t; + +/** Opcode for xcb_damage_add. */ +#define XCB_DAMAGE_ADD 4 + +/** + * @brief xcb_damage_add_request_t + **/ +typedef struct xcb_damage_add_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_drawable_t drawable; + xcb_xfixes_region_t region; +} xcb_damage_add_request_t; + +/** Opcode for xcb_damage_notify. */ +#define XCB_DAMAGE_NOTIFY 0 + +/** + * @brief xcb_damage_notify_event_t + **/ +typedef struct xcb_damage_notify_event_t { + uint8_t response_type; + uint8_t level; + uint16_t sequence; + xcb_drawable_t drawable; + xcb_damage_damage_t damage; + xcb_timestamp_t timestamp; + xcb_rectangle_t area; + xcb_rectangle_t geometry; +} xcb_damage_notify_event_t; + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_damage_damage_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_damage_damage_t) + */ +void +xcb_damage_damage_next (xcb_damage_damage_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_damage_damage_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_damage_damage_end (xcb_damage_damage_iterator_t i); + +/** + * @brief Negotiate the version of the DAMAGE extension + * + * @param c The connection + * @param client_major_version The major version supported by the client. + * @param client_minor_version The minor version supported by the client. + * @return A cookie + * + * This negotiates the version of the DAMAGE extension. It must precede any other + * request using the DAMAGE extension. Failure to do so will cause a BadRequest + * error for those requests. + * + */ +xcb_damage_query_version_cookie_t +xcb_damage_query_version (xcb_connection_t *c, + uint32_t client_major_version, + uint32_t client_minor_version); + +/** + * @brief Negotiate the version of the DAMAGE extension + * + * @param c The connection + * @param client_major_version The major version supported by the client. + * @param client_minor_version The minor version supported by the client. + * @return A cookie + * + * This negotiates the version of the DAMAGE extension. It must precede any other + * request using the DAMAGE extension. Failure to do so will cause a BadRequest + * error for those requests. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_damage_query_version_cookie_t +xcb_damage_query_version_unchecked (xcb_connection_t *c, + uint32_t client_major_version, + uint32_t client_minor_version); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_damage_query_version_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_damage_query_version_reply_t * +xcb_damage_query_version_reply (xcb_connection_t *c, + xcb_damage_query_version_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +/** + * @brief Creates a Damage object to monitor changes to a drawable. + * + * @param c The connection + * @param damage The ID with which you will refer to the new Damage object, created by + * `xcb_generate_id`. + * @param drawable The ID of the drawable to be monitored. + * @param level A bitmask of #xcb_damage_report_level_t values. + * @param level The level of detail to be provided in Damage events. + * @return A cookie + * + * This creates a Damage object to monitor changes to a drawable, and specifies + * the level of detail to be reported for changes. + * + * We call changes made to pixel contents of windows and pixmaps 'damage' + * throughout this extension. + * + * Damage accumulates as drawing occurs in the drawable. Each drawing operation + * 'damages' one or more rectangular areas within the drawable. The rectangles + * are guaranteed to include the set of pixels modified by each operation, but + * may include significantly more than just those pixels. The desire is for + * the damage to strike a balance between the number of rectangles reported and + * the extraneous area included. A reasonable goal is for each primitive + * object drawn (line, string, rectangle) to be represented as a single + * rectangle and for the damage area of the operation to be the union of these + * rectangles. + * + * The DAMAGE extension allows applications to either receive the raw + * rectangles as a stream of events, or to have them partially processed within + * the X server to reduce the amount of data transmitted as well as reduce the + * processing latency once the repaint operation has started. + * + * The Damage object holds any accumulated damage region and reflects the + * relationship between the drawable selected for damage notification and the + * drawable for which damage is tracked. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_damage_create_checked (xcb_connection_t *c, + xcb_damage_damage_t damage, + xcb_drawable_t drawable, + uint8_t level); + +/** + * @brief Creates a Damage object to monitor changes to a drawable. + * + * @param c The connection + * @param damage The ID with which you will refer to the new Damage object, created by + * `xcb_generate_id`. + * @param drawable The ID of the drawable to be monitored. + * @param level A bitmask of #xcb_damage_report_level_t values. + * @param level The level of detail to be provided in Damage events. + * @return A cookie + * + * This creates a Damage object to monitor changes to a drawable, and specifies + * the level of detail to be reported for changes. + * + * We call changes made to pixel contents of windows and pixmaps 'damage' + * throughout this extension. + * + * Damage accumulates as drawing occurs in the drawable. Each drawing operation + * 'damages' one or more rectangular areas within the drawable. The rectangles + * are guaranteed to include the set of pixels modified by each operation, but + * may include significantly more than just those pixels. The desire is for + * the damage to strike a balance between the number of rectangles reported and + * the extraneous area included. A reasonable goal is for each primitive + * object drawn (line, string, rectangle) to be represented as a single + * rectangle and for the damage area of the operation to be the union of these + * rectangles. + * + * The DAMAGE extension allows applications to either receive the raw + * rectangles as a stream of events, or to have them partially processed within + * the X server to reduce the amount of data transmitted as well as reduce the + * processing latency once the repaint operation has started. + * + * The Damage object holds any accumulated damage region and reflects the + * relationship between the drawable selected for damage notification and the + * drawable for which damage is tracked. + * + */ +xcb_void_cookie_t +xcb_damage_create (xcb_connection_t *c, + xcb_damage_damage_t damage, + xcb_drawable_t drawable, + uint8_t level); + +/** + * @brief Destroys a previously created Damage object. + * + * @param c The connection + * @param damage The ID you provided to `xcb_create_damage`. + * @return A cookie + * + * This destroys a Damage object and requests the X server stop reporting + * the changes it was tracking. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_damage_destroy_checked (xcb_connection_t *c, + xcb_damage_damage_t damage); + +/** + * @brief Destroys a previously created Damage object. + * + * @param c The connection + * @param damage The ID you provided to `xcb_create_damage`. + * @return A cookie + * + * This destroys a Damage object and requests the X server stop reporting + * the changes it was tracking. + * + */ +xcb_void_cookie_t +xcb_damage_destroy (xcb_connection_t *c, + xcb_damage_damage_t damage); + +/** + * @brief Remove regions from a previously created Damage object. + * + * @param c The connection + * @param damage The ID you provided to `xcb_create_damage`. + * @return A cookie + * + * This updates the regions of damage recorded in a a Damage object. + * See https://www.x.org/releases/current/doc/damageproto/damageproto.txt + * for details. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_damage_subtract_checked (xcb_connection_t *c, + xcb_damage_damage_t damage, + xcb_xfixes_region_t repair, + xcb_xfixes_region_t parts); + +/** + * @brief Remove regions from a previously created Damage object. + * + * @param c The connection + * @param damage The ID you provided to `xcb_create_damage`. + * @return A cookie + * + * This updates the regions of damage recorded in a a Damage object. + * See https://www.x.org/releases/current/doc/damageproto/damageproto.txt + * for details. + * + */ +xcb_void_cookie_t +xcb_damage_subtract (xcb_connection_t *c, + xcb_damage_damage_t damage, + xcb_xfixes_region_t repair, + xcb_xfixes_region_t parts); + +/** + * @brief Add a region to a previously created Damage object. + * + * @param c The connection + * @return A cookie + * + * This updates the regions of damage recorded in a a Damage object. + * See https://www.x.org/releases/current/doc/damageproto/damageproto.txt + * for details. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_damage_add_checked (xcb_connection_t *c, + xcb_drawable_t drawable, + xcb_xfixes_region_t region); + +/** + * @brief Add a region to a previously created Damage object. + * + * @param c The connection + * @return A cookie + * + * This updates the regions of damage recorded in a a Damage object. + * See https://www.x.org/releases/current/doc/damageproto/damageproto.txt + * for details. + * + */ +xcb_void_cookie_t +xcb_damage_add (xcb_connection_t *c, + xcb_drawable_t drawable, + xcb_xfixes_region_t region); + + +#ifdef __cplusplus +} +#endif + +#endif + +/** + * @} + */ diff --git a/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/include/xcb/dbe.h b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/include/xcb/dbe.h new file mode 100644 index 0000000000000000000000000000000000000000..823c5c60b526b986dc4c383ec6a136343c7805b6 --- /dev/null +++ b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/include/xcb/dbe.h @@ -0,0 +1,772 @@ +/* + * This file generated automatically from dbe.xml by c_client.py. + * Edit at your peril. + */ + +/** + * @defgroup XCB_Dbe_API XCB Dbe API + * @brief Dbe XCB Protocol Implementation. + * @{ + **/ + +#ifndef __DBE_H +#define __DBE_H + +#include "xcb.h" +#include "xproto.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#define XCB_DBE_MAJOR_VERSION 1 +#define XCB_DBE_MINOR_VERSION 0 + +extern xcb_extension_t xcb_dbe_id; + +typedef uint32_t xcb_dbe_back_buffer_t; + +/** + * @brief xcb_dbe_back_buffer_iterator_t + **/ +typedef struct xcb_dbe_back_buffer_iterator_t { + xcb_dbe_back_buffer_t *data; + int rem; + int index; +} xcb_dbe_back_buffer_iterator_t; + +typedef enum xcb_dbe_swap_action_t { + XCB_DBE_SWAP_ACTION_UNDEFINED = 0, +/**< Discard the buffer. The buffer may be reallocated and end up with random VRAM content. */ + + XCB_DBE_SWAP_ACTION_BACKGROUND = 1, +/**< Erase with window background. */ + + XCB_DBE_SWAP_ACTION_UNTOUCHED = 2, +/**< Leave untouched. */ + + XCB_DBE_SWAP_ACTION_COPIED = 3 +/**< Copy the newly displayed front buffer. */ + +} xcb_dbe_swap_action_t; + +/** + * @brief xcb_dbe_swap_info_t + **/ +typedef struct xcb_dbe_swap_info_t { + xcb_window_t window; + uint8_t swap_action; + uint8_t pad0[3]; +} xcb_dbe_swap_info_t; + +/** + * @brief xcb_dbe_swap_info_iterator_t + **/ +typedef struct xcb_dbe_swap_info_iterator_t { + xcb_dbe_swap_info_t *data; + int rem; + int index; +} xcb_dbe_swap_info_iterator_t; + +/** + * @brief xcb_dbe_buffer_attributes_t + **/ +typedef struct xcb_dbe_buffer_attributes_t { + xcb_window_t window; +} xcb_dbe_buffer_attributes_t; + +/** + * @brief xcb_dbe_buffer_attributes_iterator_t + **/ +typedef struct xcb_dbe_buffer_attributes_iterator_t { + xcb_dbe_buffer_attributes_t *data; + int rem; + int index; +} xcb_dbe_buffer_attributes_iterator_t; + +/** + * @brief xcb_dbe_visual_info_t + **/ +typedef struct xcb_dbe_visual_info_t { + xcb_visualid_t visual_id; + uint8_t depth; + uint8_t perf_level; + uint8_t pad0[2]; +} xcb_dbe_visual_info_t; + +/** + * @brief xcb_dbe_visual_info_iterator_t + **/ +typedef struct xcb_dbe_visual_info_iterator_t { + xcb_dbe_visual_info_t *data; + int rem; + int index; +} xcb_dbe_visual_info_iterator_t; + +/** + * @brief xcb_dbe_visual_infos_t + **/ +typedef struct xcb_dbe_visual_infos_t { + uint32_t n_infos; +} xcb_dbe_visual_infos_t; + +/** + * @brief xcb_dbe_visual_infos_iterator_t + **/ +typedef struct xcb_dbe_visual_infos_iterator_t { + xcb_dbe_visual_infos_t *data; + int rem; + int index; +} xcb_dbe_visual_infos_iterator_t; + +/** Opcode for xcb_dbe_bad_buffer. */ +#define XCB_DBE_BAD_BUFFER 0 + +/** + * @brief xcb_dbe_bad_buffer_error_t + **/ +typedef struct xcb_dbe_bad_buffer_error_t { + uint8_t response_type; + uint8_t error_code; + uint16_t sequence; + xcb_dbe_back_buffer_t bad_buffer; + uint16_t minor_opcode; + uint8_t major_opcode; +} xcb_dbe_bad_buffer_error_t; + +/** + * @brief xcb_dbe_query_version_cookie_t + **/ +typedef struct xcb_dbe_query_version_cookie_t { + unsigned int sequence; +} xcb_dbe_query_version_cookie_t; + +/** Opcode for xcb_dbe_query_version. */ +#define XCB_DBE_QUERY_VERSION 0 + +/** + * @brief xcb_dbe_query_version_request_t + **/ +typedef struct xcb_dbe_query_version_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + uint8_t major_version; + uint8_t minor_version; + uint8_t pad0[2]; +} xcb_dbe_query_version_request_t; + +/** + * @brief xcb_dbe_query_version_reply_t + **/ +typedef struct xcb_dbe_query_version_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint8_t major_version; + uint8_t minor_version; + uint8_t pad1[22]; +} xcb_dbe_query_version_reply_t; + +/** Opcode for xcb_dbe_allocate_back_buffer. */ +#define XCB_DBE_ALLOCATE_BACK_BUFFER 1 + +/** + * @brief xcb_dbe_allocate_back_buffer_request_t + **/ +typedef struct xcb_dbe_allocate_back_buffer_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_window_t window; + xcb_dbe_back_buffer_t buffer; + uint8_t swap_action; + uint8_t pad0[3]; +} xcb_dbe_allocate_back_buffer_request_t; + +/** Opcode for xcb_dbe_deallocate_back_buffer. */ +#define XCB_DBE_DEALLOCATE_BACK_BUFFER 2 + +/** + * @brief xcb_dbe_deallocate_back_buffer_request_t + **/ +typedef struct xcb_dbe_deallocate_back_buffer_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_dbe_back_buffer_t buffer; +} xcb_dbe_deallocate_back_buffer_request_t; + +/** Opcode for xcb_dbe_swap_buffers. */ +#define XCB_DBE_SWAP_BUFFERS 3 + +/** + * @brief xcb_dbe_swap_buffers_request_t + **/ +typedef struct xcb_dbe_swap_buffers_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + uint32_t n_actions; +} xcb_dbe_swap_buffers_request_t; + +/** Opcode for xcb_dbe_begin_idiom. */ +#define XCB_DBE_BEGIN_IDIOM 4 + +/** + * @brief xcb_dbe_begin_idiom_request_t + **/ +typedef struct xcb_dbe_begin_idiom_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; +} xcb_dbe_begin_idiom_request_t; + +/** Opcode for xcb_dbe_end_idiom. */ +#define XCB_DBE_END_IDIOM 5 + +/** + * @brief xcb_dbe_end_idiom_request_t + **/ +typedef struct xcb_dbe_end_idiom_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; +} xcb_dbe_end_idiom_request_t; + +/** + * @brief xcb_dbe_get_visual_info_cookie_t + **/ +typedef struct xcb_dbe_get_visual_info_cookie_t { + unsigned int sequence; +} xcb_dbe_get_visual_info_cookie_t; + +/** Opcode for xcb_dbe_get_visual_info. */ +#define XCB_DBE_GET_VISUAL_INFO 6 + +/** + * @brief xcb_dbe_get_visual_info_request_t + **/ +typedef struct xcb_dbe_get_visual_info_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + uint32_t n_drawables; +} xcb_dbe_get_visual_info_request_t; + +/** + * @brief xcb_dbe_get_visual_info_reply_t + **/ +typedef struct xcb_dbe_get_visual_info_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint32_t n_supported_visuals; + uint8_t pad1[20]; +} xcb_dbe_get_visual_info_reply_t; + +/** + * @brief xcb_dbe_get_back_buffer_attributes_cookie_t + **/ +typedef struct xcb_dbe_get_back_buffer_attributes_cookie_t { + unsigned int sequence; +} xcb_dbe_get_back_buffer_attributes_cookie_t; + +/** Opcode for xcb_dbe_get_back_buffer_attributes. */ +#define XCB_DBE_GET_BACK_BUFFER_ATTRIBUTES 7 + +/** + * @brief xcb_dbe_get_back_buffer_attributes_request_t + **/ +typedef struct xcb_dbe_get_back_buffer_attributes_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_dbe_back_buffer_t buffer; +} xcb_dbe_get_back_buffer_attributes_request_t; + +/** + * @brief xcb_dbe_get_back_buffer_attributes_reply_t + **/ +typedef struct xcb_dbe_get_back_buffer_attributes_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + xcb_dbe_buffer_attributes_t attributes; + uint8_t pad1[20]; +} xcb_dbe_get_back_buffer_attributes_reply_t; + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_dbe_back_buffer_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_dbe_back_buffer_t) + */ +void +xcb_dbe_back_buffer_next (xcb_dbe_back_buffer_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_dbe_back_buffer_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_dbe_back_buffer_end (xcb_dbe_back_buffer_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_dbe_swap_info_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_dbe_swap_info_t) + */ +void +xcb_dbe_swap_info_next (xcb_dbe_swap_info_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_dbe_swap_info_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_dbe_swap_info_end (xcb_dbe_swap_info_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_dbe_buffer_attributes_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_dbe_buffer_attributes_t) + */ +void +xcb_dbe_buffer_attributes_next (xcb_dbe_buffer_attributes_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_dbe_buffer_attributes_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_dbe_buffer_attributes_end (xcb_dbe_buffer_attributes_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_dbe_visual_info_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_dbe_visual_info_t) + */ +void +xcb_dbe_visual_info_next (xcb_dbe_visual_info_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_dbe_visual_info_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_dbe_visual_info_end (xcb_dbe_visual_info_iterator_t i); + +int +xcb_dbe_visual_infos_sizeof (const void *_buffer); + +xcb_dbe_visual_info_t * +xcb_dbe_visual_infos_infos (const xcb_dbe_visual_infos_t *R); + +int +xcb_dbe_visual_infos_infos_length (const xcb_dbe_visual_infos_t *R); + +xcb_dbe_visual_info_iterator_t +xcb_dbe_visual_infos_infos_iterator (const xcb_dbe_visual_infos_t *R); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_dbe_visual_infos_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_dbe_visual_infos_t) + */ +void +xcb_dbe_visual_infos_next (xcb_dbe_visual_infos_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_dbe_visual_infos_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_dbe_visual_infos_end (xcb_dbe_visual_infos_iterator_t i); + +/** + * @brief Queries the version of this extension + * + * @param c The connection + * @param major_version The major version of the extension. Check that it is compatible with the XCB_DBE_MAJOR_VERSION that your code is compiled with. + * @param minor_version The minor version of the extension. Check that it is compatible with the XCB_DBE_MINOR_VERSION that your code is compiled with. + * @return A cookie + * + * Queries the version of this extension. You must do this before using any functionality it provides. + * + */ +xcb_dbe_query_version_cookie_t +xcb_dbe_query_version (xcb_connection_t *c, + uint8_t major_version, + uint8_t minor_version); + +/** + * @brief Queries the version of this extension + * + * @param c The connection + * @param major_version The major version of the extension. Check that it is compatible with the XCB_DBE_MAJOR_VERSION that your code is compiled with. + * @param minor_version The minor version of the extension. Check that it is compatible with the XCB_DBE_MINOR_VERSION that your code is compiled with. + * @return A cookie + * + * Queries the version of this extension. You must do this before using any functionality it provides. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_dbe_query_version_cookie_t +xcb_dbe_query_version_unchecked (xcb_connection_t *c, + uint8_t major_version, + uint8_t minor_version); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_dbe_query_version_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_dbe_query_version_reply_t * +xcb_dbe_query_version_reply (xcb_connection_t *c, + xcb_dbe_query_version_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +/** + * @brief Allocates a back buffer + * + * @param c The connection + * @param window The window to which to add the back buffer. + * @param buffer The buffer id to associate with the back buffer. + * @param swap_action The swap action most likely to be used to present this back buffer. This is only a hint, and does not preclude the use of other swap actions. + * @return A cookie + * + * Associates \a buffer with the back buffer of \a window. Multiple ids may be associated with the back buffer, which is created by the first allocate call and destroyed by the last deallocate. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_dbe_allocate_back_buffer_checked (xcb_connection_t *c, + xcb_window_t window, + xcb_dbe_back_buffer_t buffer, + uint8_t swap_action); + +/** + * @brief Allocates a back buffer + * + * @param c The connection + * @param window The window to which to add the back buffer. + * @param buffer The buffer id to associate with the back buffer. + * @param swap_action The swap action most likely to be used to present this back buffer. This is only a hint, and does not preclude the use of other swap actions. + * @return A cookie + * + * Associates \a buffer with the back buffer of \a window. Multiple ids may be associated with the back buffer, which is created by the first allocate call and destroyed by the last deallocate. + * + */ +xcb_void_cookie_t +xcb_dbe_allocate_back_buffer (xcb_connection_t *c, + xcb_window_t window, + xcb_dbe_back_buffer_t buffer, + uint8_t swap_action); + +/** + * @brief Deallocates a back buffer + * + * @param c The connection + * @param buffer The back buffer to deallocate. + * @return A cookie + * + * Deallocates the given \a buffer. If \a buffer is an invalid id, a `BadBuffer` error is returned. Because a window may have allocated multiple back buffer ids, the back buffer itself is not deleted until all these ids are deallocated by this call. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_dbe_deallocate_back_buffer_checked (xcb_connection_t *c, + xcb_dbe_back_buffer_t buffer); + +/** + * @brief Deallocates a back buffer + * + * @param c The connection + * @param buffer The back buffer to deallocate. + * @return A cookie + * + * Deallocates the given \a buffer. If \a buffer is an invalid id, a `BadBuffer` error is returned. Because a window may have allocated multiple back buffer ids, the back buffer itself is not deleted until all these ids are deallocated by this call. + * + */ +xcb_void_cookie_t +xcb_dbe_deallocate_back_buffer (xcb_connection_t *c, + xcb_dbe_back_buffer_t buffer); + +int +xcb_dbe_swap_buffers_sizeof (const void *_buffer); + +/** + * @brief Swaps front and back buffers + * + * @param c The connection + * @param n_actions Number of swap actions in \a actions. + * @param actions List of windows on which to swap buffers. + * @return A cookie + * + * Swaps the front and back buffers on the specified windows. The front and back buffers retain their ids, so that the window id continues to refer to the front buffer, while the back buffer id created by this extension continues to refer to the back buffer. Back buffer contents is moved to the front buffer. Back buffer contents after the operation depends on the given swap action. The optimal swap action depends on how each frame is rendered. For example, if the buffer is cleared and fully overwritten on every frame, the "untouched" action, which throws away the buffer contents, would provide the best performance. To eliminate visual artifacts, the swap will occure during the monitor VSync, if the X server supports detecting it. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_dbe_swap_buffers_checked (xcb_connection_t *c, + uint32_t n_actions, + const xcb_dbe_swap_info_t *actions); + +/** + * @brief Swaps front and back buffers + * + * @param c The connection + * @param n_actions Number of swap actions in \a actions. + * @param actions List of windows on which to swap buffers. + * @return A cookie + * + * Swaps the front and back buffers on the specified windows. The front and back buffers retain their ids, so that the window id continues to refer to the front buffer, while the back buffer id created by this extension continues to refer to the back buffer. Back buffer contents is moved to the front buffer. Back buffer contents after the operation depends on the given swap action. The optimal swap action depends on how each frame is rendered. For example, if the buffer is cleared and fully overwritten on every frame, the "untouched" action, which throws away the buffer contents, would provide the best performance. To eliminate visual artifacts, the swap will occure during the monitor VSync, if the X server supports detecting it. + * + */ +xcb_void_cookie_t +xcb_dbe_swap_buffers (xcb_connection_t *c, + uint32_t n_actions, + const xcb_dbe_swap_info_t *actions); + +xcb_dbe_swap_info_t * +xcb_dbe_swap_buffers_actions (const xcb_dbe_swap_buffers_request_t *R); + +int +xcb_dbe_swap_buffers_actions_length (const xcb_dbe_swap_buffers_request_t *R); + +xcb_dbe_swap_info_iterator_t +xcb_dbe_swap_buffers_actions_iterator (const xcb_dbe_swap_buffers_request_t *R); + +/** + * @brief Begins a logical swap block + * + * @param c The connection + * @return A cookie + * + * Creates a block of operations intended to occur together. This may be needed if window presentation requires changing buffers unknown to this extension, such as depth or stencil buffers. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_dbe_begin_idiom_checked (xcb_connection_t *c); + +/** + * @brief Begins a logical swap block + * + * @param c The connection + * @return A cookie + * + * Creates a block of operations intended to occur together. This may be needed if window presentation requires changing buffers unknown to this extension, such as depth or stencil buffers. + * + */ +xcb_void_cookie_t +xcb_dbe_begin_idiom (xcb_connection_t *c); + +/** + * @brief Ends a logical swap block + * + * @param c The connection + * @return A cookie + * + * No description yet + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_dbe_end_idiom_checked (xcb_connection_t *c); + +/** + * @brief Ends a logical swap block + * + * @param c The connection + * @return A cookie + * + * No description yet + * + */ +xcb_void_cookie_t +xcb_dbe_end_idiom (xcb_connection_t *c); + +int +xcb_dbe_get_visual_info_sizeof (const void *_buffer); + +/** + * @brief Requests visuals that support double buffering + * + * @param c The connection + * @return A cookie + * + * No description yet + * + */ +xcb_dbe_get_visual_info_cookie_t +xcb_dbe_get_visual_info (xcb_connection_t *c, + uint32_t n_drawables, + const xcb_drawable_t *drawables); + +/** + * @brief Requests visuals that support double buffering + * + * @param c The connection + * @return A cookie + * + * No description yet + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_dbe_get_visual_info_cookie_t +xcb_dbe_get_visual_info_unchecked (xcb_connection_t *c, + uint32_t n_drawables, + const xcb_drawable_t *drawables); + +int +xcb_dbe_get_visual_info_supported_visuals_length (const xcb_dbe_get_visual_info_reply_t *R); + +xcb_dbe_visual_infos_iterator_t +xcb_dbe_get_visual_info_supported_visuals_iterator (const xcb_dbe_get_visual_info_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_dbe_get_visual_info_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_dbe_get_visual_info_reply_t * +xcb_dbe_get_visual_info_reply (xcb_connection_t *c, + xcb_dbe_get_visual_info_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +/** + * @brief Gets back buffer attributes + * + * @param c The connection + * @param buffer The back buffer to query. + * @return A cookie + * + * Returns the attributes of the specified \a buffer. + * + */ +xcb_dbe_get_back_buffer_attributes_cookie_t +xcb_dbe_get_back_buffer_attributes (xcb_connection_t *c, + xcb_dbe_back_buffer_t buffer); + +/** + * @brief Gets back buffer attributes + * + * @param c The connection + * @param buffer The back buffer to query. + * @return A cookie + * + * Returns the attributes of the specified \a buffer. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_dbe_get_back_buffer_attributes_cookie_t +xcb_dbe_get_back_buffer_attributes_unchecked (xcb_connection_t *c, + xcb_dbe_back_buffer_t buffer); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_dbe_get_back_buffer_attributes_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_dbe_get_back_buffer_attributes_reply_t * +xcb_dbe_get_back_buffer_attributes_reply (xcb_connection_t *c, + xcb_dbe_get_back_buffer_attributes_cookie_t cookie /**< */, + xcb_generic_error_t **e); + + +#ifdef __cplusplus +} +#endif + +#endif + +/** + * @} + */ diff --git a/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/include/xcb/dpms.h b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/include/xcb/dpms.h new file mode 100644 index 0000000000000000000000000000000000000000..42c56e985fa3acc9d118f6a12d8d2049cfe76d3b --- /dev/null +++ b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/include/xcb/dpms.h @@ -0,0 +1,575 @@ +/* + * This file generated automatically from dpms.xml by c_client.py. + * Edit at your peril. + */ + +/** + * @defgroup XCB_DPMS_API XCB DPMS API + * @brief DPMS XCB Protocol Implementation. + * @{ + **/ + +#ifndef __DPMS_H +#define __DPMS_H + +#include "xcb.h" +#include "xproto.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#define XCB_DPMS_MAJOR_VERSION 1 +#define XCB_DPMS_MINOR_VERSION 2 + +extern xcb_extension_t xcb_dpms_id; + +/** + * @brief xcb_dpms_get_version_cookie_t + **/ +typedef struct xcb_dpms_get_version_cookie_t { + unsigned int sequence; +} xcb_dpms_get_version_cookie_t; + +/** Opcode for xcb_dpms_get_version. */ +#define XCB_DPMS_GET_VERSION 0 + +/** + * @brief xcb_dpms_get_version_request_t + **/ +typedef struct xcb_dpms_get_version_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + uint16_t client_major_version; + uint16_t client_minor_version; +} xcb_dpms_get_version_request_t; + +/** + * @brief xcb_dpms_get_version_reply_t + **/ +typedef struct xcb_dpms_get_version_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint16_t server_major_version; + uint16_t server_minor_version; +} xcb_dpms_get_version_reply_t; + +/** + * @brief xcb_dpms_capable_cookie_t + **/ +typedef struct xcb_dpms_capable_cookie_t { + unsigned int sequence; +} xcb_dpms_capable_cookie_t; + +/** Opcode for xcb_dpms_capable. */ +#define XCB_DPMS_CAPABLE 1 + +/** + * @brief xcb_dpms_capable_request_t + **/ +typedef struct xcb_dpms_capable_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; +} xcb_dpms_capable_request_t; + +/** + * @brief xcb_dpms_capable_reply_t + **/ +typedef struct xcb_dpms_capable_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint8_t capable; + uint8_t pad1[23]; +} xcb_dpms_capable_reply_t; + +/** + * @brief xcb_dpms_get_timeouts_cookie_t + **/ +typedef struct xcb_dpms_get_timeouts_cookie_t { + unsigned int sequence; +} xcb_dpms_get_timeouts_cookie_t; + +/** Opcode for xcb_dpms_get_timeouts. */ +#define XCB_DPMS_GET_TIMEOUTS 2 + +/** + * @brief xcb_dpms_get_timeouts_request_t + **/ +typedef struct xcb_dpms_get_timeouts_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; +} xcb_dpms_get_timeouts_request_t; + +/** + * @brief xcb_dpms_get_timeouts_reply_t + **/ +typedef struct xcb_dpms_get_timeouts_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint16_t standby_timeout; + uint16_t suspend_timeout; + uint16_t off_timeout; + uint8_t pad1[18]; +} xcb_dpms_get_timeouts_reply_t; + +/** Opcode for xcb_dpms_set_timeouts. */ +#define XCB_DPMS_SET_TIMEOUTS 3 + +/** + * @brief xcb_dpms_set_timeouts_request_t + **/ +typedef struct xcb_dpms_set_timeouts_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + uint16_t standby_timeout; + uint16_t suspend_timeout; + uint16_t off_timeout; +} xcb_dpms_set_timeouts_request_t; + +/** Opcode for xcb_dpms_enable. */ +#define XCB_DPMS_ENABLE 4 + +/** + * @brief xcb_dpms_enable_request_t + **/ +typedef struct xcb_dpms_enable_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; +} xcb_dpms_enable_request_t; + +/** Opcode for xcb_dpms_disable. */ +#define XCB_DPMS_DISABLE 5 + +/** + * @brief xcb_dpms_disable_request_t + **/ +typedef struct xcb_dpms_disable_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; +} xcb_dpms_disable_request_t; + +typedef enum xcb_dpms_dpms_mode_t { + XCB_DPMS_DPMS_MODE_ON = 0, + XCB_DPMS_DPMS_MODE_STANDBY = 1, + XCB_DPMS_DPMS_MODE_SUSPEND = 2, + XCB_DPMS_DPMS_MODE_OFF = 3 +} xcb_dpms_dpms_mode_t; + +/** Opcode for xcb_dpms_force_level. */ +#define XCB_DPMS_FORCE_LEVEL 6 + +/** + * @brief xcb_dpms_force_level_request_t + **/ +typedef struct xcb_dpms_force_level_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + uint16_t power_level; +} xcb_dpms_force_level_request_t; + +/** + * @brief xcb_dpms_info_cookie_t + **/ +typedef struct xcb_dpms_info_cookie_t { + unsigned int sequence; +} xcb_dpms_info_cookie_t; + +/** Opcode for xcb_dpms_info. */ +#define XCB_DPMS_INFO 7 + +/** + * @brief xcb_dpms_info_request_t + **/ +typedef struct xcb_dpms_info_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; +} xcb_dpms_info_request_t; + +/** + * @brief xcb_dpms_info_reply_t + **/ +typedef struct xcb_dpms_info_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint16_t power_level; + uint8_t state; + uint8_t pad1[21]; +} xcb_dpms_info_reply_t; + +typedef enum xcb_dpms_event_mask_t { + XCB_DPMS_EVENT_MASK_INFO_NOTIFY = 1 +} xcb_dpms_event_mask_t; + +/** Opcode for xcb_dpms_select_input. */ +#define XCB_DPMS_SELECT_INPUT 8 + +/** + * @brief xcb_dpms_select_input_request_t + **/ +typedef struct xcb_dpms_select_input_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + uint32_t event_mask; +} xcb_dpms_select_input_request_t; + +/** Opcode for xcb_dpms_info_notify. */ +#define XCB_DPMS_INFO_NOTIFY 0 + +/** + * @brief xcb_dpms_info_notify_event_t + **/ +typedef struct xcb_dpms_info_notify_event_t { + uint8_t response_type; + uint8_t extension; + uint16_t sequence; + uint32_t length; + uint16_t event_type; + uint8_t pad0[2]; + xcb_timestamp_t timestamp; + uint16_t power_level; + uint8_t state; + uint8_t pad1[21]; +} xcb_dpms_info_notify_event_t; + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_dpms_get_version_cookie_t +xcb_dpms_get_version (xcb_connection_t *c, + uint16_t client_major_version, + uint16_t client_minor_version); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_dpms_get_version_cookie_t +xcb_dpms_get_version_unchecked (xcb_connection_t *c, + uint16_t client_major_version, + uint16_t client_minor_version); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_dpms_get_version_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_dpms_get_version_reply_t * +xcb_dpms_get_version_reply (xcb_connection_t *c, + xcb_dpms_get_version_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_dpms_capable_cookie_t +xcb_dpms_capable (xcb_connection_t *c); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_dpms_capable_cookie_t +xcb_dpms_capable_unchecked (xcb_connection_t *c); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_dpms_capable_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_dpms_capable_reply_t * +xcb_dpms_capable_reply (xcb_connection_t *c, + xcb_dpms_capable_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_dpms_get_timeouts_cookie_t +xcb_dpms_get_timeouts (xcb_connection_t *c); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_dpms_get_timeouts_cookie_t +xcb_dpms_get_timeouts_unchecked (xcb_connection_t *c); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_dpms_get_timeouts_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_dpms_get_timeouts_reply_t * +xcb_dpms_get_timeouts_reply (xcb_connection_t *c, + xcb_dpms_get_timeouts_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_dpms_set_timeouts_checked (xcb_connection_t *c, + uint16_t standby_timeout, + uint16_t suspend_timeout, + uint16_t off_timeout); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_dpms_set_timeouts (xcb_connection_t *c, + uint16_t standby_timeout, + uint16_t suspend_timeout, + uint16_t off_timeout); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_dpms_enable_checked (xcb_connection_t *c); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_dpms_enable (xcb_connection_t *c); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_dpms_disable_checked (xcb_connection_t *c); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_dpms_disable (xcb_connection_t *c); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_dpms_force_level_checked (xcb_connection_t *c, + uint16_t power_level); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_dpms_force_level (xcb_connection_t *c, + uint16_t power_level); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_dpms_info_cookie_t +xcb_dpms_info (xcb_connection_t *c); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_dpms_info_cookie_t +xcb_dpms_info_unchecked (xcb_connection_t *c); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_dpms_info_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_dpms_info_reply_t * +xcb_dpms_info_reply (xcb_connection_t *c, + xcb_dpms_info_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_dpms_select_input_checked (xcb_connection_t *c, + uint32_t event_mask); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_dpms_select_input (xcb_connection_t *c, + uint32_t event_mask); + + +#ifdef __cplusplus +} +#endif + +#endif + +/** + * @} + */ diff --git a/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/include/xcb/dri2.h b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/include/xcb/dri2.h new file mode 100644 index 0000000000000000000000000000000000000000..4ec2f40c69a3b3edcab8b450151cda4179cfe0fb --- /dev/null +++ b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/include/xcb/dri2.h @@ -0,0 +1,1305 @@ +/* + * This file generated automatically from dri2.xml by c_client.py. + * Edit at your peril. + */ + +/** + * @defgroup XCB_DRI2_API XCB DRI2 API + * @brief DRI2 XCB Protocol Implementation. + * @{ + **/ + +#ifndef __DRI2_H +#define __DRI2_H + +#include "xcb.h" +#include "xproto.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#define XCB_DRI2_MAJOR_VERSION 1 +#define XCB_DRI2_MINOR_VERSION 4 + +extern xcb_extension_t xcb_dri2_id; + +typedef enum xcb_dri2_attachment_t { + XCB_DRI2_ATTACHMENT_BUFFER_FRONT_LEFT = 0, + XCB_DRI2_ATTACHMENT_BUFFER_BACK_LEFT = 1, + XCB_DRI2_ATTACHMENT_BUFFER_FRONT_RIGHT = 2, + XCB_DRI2_ATTACHMENT_BUFFER_BACK_RIGHT = 3, + XCB_DRI2_ATTACHMENT_BUFFER_DEPTH = 4, + XCB_DRI2_ATTACHMENT_BUFFER_STENCIL = 5, + XCB_DRI2_ATTACHMENT_BUFFER_ACCUM = 6, + XCB_DRI2_ATTACHMENT_BUFFER_FAKE_FRONT_LEFT = 7, + XCB_DRI2_ATTACHMENT_BUFFER_FAKE_FRONT_RIGHT = 8, + XCB_DRI2_ATTACHMENT_BUFFER_DEPTH_STENCIL = 9, + XCB_DRI2_ATTACHMENT_BUFFER_HIZ = 10 +} xcb_dri2_attachment_t; + +typedef enum xcb_dri2_driver_type_t { + XCB_DRI2_DRIVER_TYPE_DRI = 0, + XCB_DRI2_DRIVER_TYPE_VDPAU = 1 +} xcb_dri2_driver_type_t; + +typedef enum xcb_dri2_event_type_t { + XCB_DRI2_EVENT_TYPE_EXCHANGE_COMPLETE = 1, + XCB_DRI2_EVENT_TYPE_BLIT_COMPLETE = 2, + XCB_DRI2_EVENT_TYPE_FLIP_COMPLETE = 3 +} xcb_dri2_event_type_t; + +/** + * @brief xcb_dri2_dri2_buffer_t + **/ +typedef struct xcb_dri2_dri2_buffer_t { + uint32_t attachment; + uint32_t name; + uint32_t pitch; + uint32_t cpp; + uint32_t flags; +} xcb_dri2_dri2_buffer_t; + +/** + * @brief xcb_dri2_dri2_buffer_iterator_t + **/ +typedef struct xcb_dri2_dri2_buffer_iterator_t { + xcb_dri2_dri2_buffer_t *data; + int rem; + int index; +} xcb_dri2_dri2_buffer_iterator_t; + +/** + * @brief xcb_dri2_attach_format_t + **/ +typedef struct xcb_dri2_attach_format_t { + uint32_t attachment; + uint32_t format; +} xcb_dri2_attach_format_t; + +/** + * @brief xcb_dri2_attach_format_iterator_t + **/ +typedef struct xcb_dri2_attach_format_iterator_t { + xcb_dri2_attach_format_t *data; + int rem; + int index; +} xcb_dri2_attach_format_iterator_t; + +/** + * @brief xcb_dri2_query_version_cookie_t + **/ +typedef struct xcb_dri2_query_version_cookie_t { + unsigned int sequence; +} xcb_dri2_query_version_cookie_t; + +/** Opcode for xcb_dri2_query_version. */ +#define XCB_DRI2_QUERY_VERSION 0 + +/** + * @brief xcb_dri2_query_version_request_t + **/ +typedef struct xcb_dri2_query_version_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + uint32_t major_version; + uint32_t minor_version; +} xcb_dri2_query_version_request_t; + +/** + * @brief xcb_dri2_query_version_reply_t + **/ +typedef struct xcb_dri2_query_version_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint32_t major_version; + uint32_t minor_version; +} xcb_dri2_query_version_reply_t; + +/** + * @brief xcb_dri2_connect_cookie_t + **/ +typedef struct xcb_dri2_connect_cookie_t { + unsigned int sequence; +} xcb_dri2_connect_cookie_t; + +/** Opcode for xcb_dri2_connect. */ +#define XCB_DRI2_CONNECT 1 + +/** + * @brief xcb_dri2_connect_request_t + **/ +typedef struct xcb_dri2_connect_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_window_t window; + uint32_t driver_type; +} xcb_dri2_connect_request_t; + +/** + * @brief xcb_dri2_connect_reply_t + **/ +typedef struct xcb_dri2_connect_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint32_t driver_name_length; + uint32_t device_name_length; + uint8_t pad1[16]; +} xcb_dri2_connect_reply_t; + +/** + * @brief xcb_dri2_authenticate_cookie_t + **/ +typedef struct xcb_dri2_authenticate_cookie_t { + unsigned int sequence; +} xcb_dri2_authenticate_cookie_t; + +/** Opcode for xcb_dri2_authenticate. */ +#define XCB_DRI2_AUTHENTICATE 2 + +/** + * @brief xcb_dri2_authenticate_request_t + **/ +typedef struct xcb_dri2_authenticate_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_window_t window; + uint32_t magic; +} xcb_dri2_authenticate_request_t; + +/** + * @brief xcb_dri2_authenticate_reply_t + **/ +typedef struct xcb_dri2_authenticate_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint32_t authenticated; +} xcb_dri2_authenticate_reply_t; + +/** Opcode for xcb_dri2_create_drawable. */ +#define XCB_DRI2_CREATE_DRAWABLE 3 + +/** + * @brief xcb_dri2_create_drawable_request_t + **/ +typedef struct xcb_dri2_create_drawable_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_drawable_t drawable; +} xcb_dri2_create_drawable_request_t; + +/** Opcode for xcb_dri2_destroy_drawable. */ +#define XCB_DRI2_DESTROY_DRAWABLE 4 + +/** + * @brief xcb_dri2_destroy_drawable_request_t + **/ +typedef struct xcb_dri2_destroy_drawable_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_drawable_t drawable; +} xcb_dri2_destroy_drawable_request_t; + +/** + * @brief xcb_dri2_get_buffers_cookie_t + **/ +typedef struct xcb_dri2_get_buffers_cookie_t { + unsigned int sequence; +} xcb_dri2_get_buffers_cookie_t; + +/** Opcode for xcb_dri2_get_buffers. */ +#define XCB_DRI2_GET_BUFFERS 5 + +/** + * @brief xcb_dri2_get_buffers_request_t + **/ +typedef struct xcb_dri2_get_buffers_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_drawable_t drawable; + uint32_t count; +} xcb_dri2_get_buffers_request_t; + +/** + * @brief xcb_dri2_get_buffers_reply_t + **/ +typedef struct xcb_dri2_get_buffers_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint32_t width; + uint32_t height; + uint32_t count; + uint8_t pad1[12]; +} xcb_dri2_get_buffers_reply_t; + +/** + * @brief xcb_dri2_copy_region_cookie_t + **/ +typedef struct xcb_dri2_copy_region_cookie_t { + unsigned int sequence; +} xcb_dri2_copy_region_cookie_t; + +/** Opcode for xcb_dri2_copy_region. */ +#define XCB_DRI2_COPY_REGION 6 + +/** + * @brief xcb_dri2_copy_region_request_t + **/ +typedef struct xcb_dri2_copy_region_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_drawable_t drawable; + uint32_t region; + uint32_t dest; + uint32_t src; +} xcb_dri2_copy_region_request_t; + +/** + * @brief xcb_dri2_copy_region_reply_t + **/ +typedef struct xcb_dri2_copy_region_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; +} xcb_dri2_copy_region_reply_t; + +/** + * @brief xcb_dri2_get_buffers_with_format_cookie_t + **/ +typedef struct xcb_dri2_get_buffers_with_format_cookie_t { + unsigned int sequence; +} xcb_dri2_get_buffers_with_format_cookie_t; + +/** Opcode for xcb_dri2_get_buffers_with_format. */ +#define XCB_DRI2_GET_BUFFERS_WITH_FORMAT 7 + +/** + * @brief xcb_dri2_get_buffers_with_format_request_t + **/ +typedef struct xcb_dri2_get_buffers_with_format_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_drawable_t drawable; + uint32_t count; +} xcb_dri2_get_buffers_with_format_request_t; + +/** + * @brief xcb_dri2_get_buffers_with_format_reply_t + **/ +typedef struct xcb_dri2_get_buffers_with_format_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint32_t width; + uint32_t height; + uint32_t count; + uint8_t pad1[12]; +} xcb_dri2_get_buffers_with_format_reply_t; + +/** + * @brief xcb_dri2_swap_buffers_cookie_t + **/ +typedef struct xcb_dri2_swap_buffers_cookie_t { + unsigned int sequence; +} xcb_dri2_swap_buffers_cookie_t; + +/** Opcode for xcb_dri2_swap_buffers. */ +#define XCB_DRI2_SWAP_BUFFERS 8 + +/** + * @brief xcb_dri2_swap_buffers_request_t + **/ +typedef struct xcb_dri2_swap_buffers_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_drawable_t drawable; + uint32_t target_msc_hi; + uint32_t target_msc_lo; + uint32_t divisor_hi; + uint32_t divisor_lo; + uint32_t remainder_hi; + uint32_t remainder_lo; +} xcb_dri2_swap_buffers_request_t; + +/** + * @brief xcb_dri2_swap_buffers_reply_t + **/ +typedef struct xcb_dri2_swap_buffers_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint32_t swap_hi; + uint32_t swap_lo; +} xcb_dri2_swap_buffers_reply_t; + +/** + * @brief xcb_dri2_get_msc_cookie_t + **/ +typedef struct xcb_dri2_get_msc_cookie_t { + unsigned int sequence; +} xcb_dri2_get_msc_cookie_t; + +/** Opcode for xcb_dri2_get_msc. */ +#define XCB_DRI2_GET_MSC 9 + +/** + * @brief xcb_dri2_get_msc_request_t + **/ +typedef struct xcb_dri2_get_msc_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_drawable_t drawable; +} xcb_dri2_get_msc_request_t; + +/** + * @brief xcb_dri2_get_msc_reply_t + **/ +typedef struct xcb_dri2_get_msc_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint32_t ust_hi; + uint32_t ust_lo; + uint32_t msc_hi; + uint32_t msc_lo; + uint32_t sbc_hi; + uint32_t sbc_lo; +} xcb_dri2_get_msc_reply_t; + +/** + * @brief xcb_dri2_wait_msc_cookie_t + **/ +typedef struct xcb_dri2_wait_msc_cookie_t { + unsigned int sequence; +} xcb_dri2_wait_msc_cookie_t; + +/** Opcode for xcb_dri2_wait_msc. */ +#define XCB_DRI2_WAIT_MSC 10 + +/** + * @brief xcb_dri2_wait_msc_request_t + **/ +typedef struct xcb_dri2_wait_msc_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_drawable_t drawable; + uint32_t target_msc_hi; + uint32_t target_msc_lo; + uint32_t divisor_hi; + uint32_t divisor_lo; + uint32_t remainder_hi; + uint32_t remainder_lo; +} xcb_dri2_wait_msc_request_t; + +/** + * @brief xcb_dri2_wait_msc_reply_t + **/ +typedef struct xcb_dri2_wait_msc_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint32_t ust_hi; + uint32_t ust_lo; + uint32_t msc_hi; + uint32_t msc_lo; + uint32_t sbc_hi; + uint32_t sbc_lo; +} xcb_dri2_wait_msc_reply_t; + +/** + * @brief xcb_dri2_wait_sbc_cookie_t + **/ +typedef struct xcb_dri2_wait_sbc_cookie_t { + unsigned int sequence; +} xcb_dri2_wait_sbc_cookie_t; + +/** Opcode for xcb_dri2_wait_sbc. */ +#define XCB_DRI2_WAIT_SBC 11 + +/** + * @brief xcb_dri2_wait_sbc_request_t + **/ +typedef struct xcb_dri2_wait_sbc_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_drawable_t drawable; + uint32_t target_sbc_hi; + uint32_t target_sbc_lo; +} xcb_dri2_wait_sbc_request_t; + +/** + * @brief xcb_dri2_wait_sbc_reply_t + **/ +typedef struct xcb_dri2_wait_sbc_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint32_t ust_hi; + uint32_t ust_lo; + uint32_t msc_hi; + uint32_t msc_lo; + uint32_t sbc_hi; + uint32_t sbc_lo; +} xcb_dri2_wait_sbc_reply_t; + +/** Opcode for xcb_dri2_swap_interval. */ +#define XCB_DRI2_SWAP_INTERVAL 12 + +/** + * @brief xcb_dri2_swap_interval_request_t + **/ +typedef struct xcb_dri2_swap_interval_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_drawable_t drawable; + uint32_t interval; +} xcb_dri2_swap_interval_request_t; + +/** + * @brief xcb_dri2_get_param_cookie_t + **/ +typedef struct xcb_dri2_get_param_cookie_t { + unsigned int sequence; +} xcb_dri2_get_param_cookie_t; + +/** Opcode for xcb_dri2_get_param. */ +#define XCB_DRI2_GET_PARAM 13 + +/** + * @brief xcb_dri2_get_param_request_t + **/ +typedef struct xcb_dri2_get_param_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_drawable_t drawable; + uint32_t param; +} xcb_dri2_get_param_request_t; + +/** + * @brief xcb_dri2_get_param_reply_t + **/ +typedef struct xcb_dri2_get_param_reply_t { + uint8_t response_type; + uint8_t is_param_recognized; + uint16_t sequence; + uint32_t length; + uint32_t value_hi; + uint32_t value_lo; +} xcb_dri2_get_param_reply_t; + +/** Opcode for xcb_dri2_buffer_swap_complete. */ +#define XCB_DRI2_BUFFER_SWAP_COMPLETE 0 + +/** + * @brief xcb_dri2_buffer_swap_complete_event_t + **/ +typedef struct xcb_dri2_buffer_swap_complete_event_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint16_t event_type; + uint8_t pad1[2]; + xcb_drawable_t drawable; + uint32_t ust_hi; + uint32_t ust_lo; + uint32_t msc_hi; + uint32_t msc_lo; + uint32_t sbc; +} xcb_dri2_buffer_swap_complete_event_t; + +/** Opcode for xcb_dri2_invalidate_buffers. */ +#define XCB_DRI2_INVALIDATE_BUFFERS 1 + +/** + * @brief xcb_dri2_invalidate_buffers_event_t + **/ +typedef struct xcb_dri2_invalidate_buffers_event_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + xcb_drawable_t drawable; +} xcb_dri2_invalidate_buffers_event_t; + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_dri2_dri2_buffer_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_dri2_dri2_buffer_t) + */ +void +xcb_dri2_dri2_buffer_next (xcb_dri2_dri2_buffer_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_dri2_dri2_buffer_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_dri2_dri2_buffer_end (xcb_dri2_dri2_buffer_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_dri2_attach_format_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_dri2_attach_format_t) + */ +void +xcb_dri2_attach_format_next (xcb_dri2_attach_format_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_dri2_attach_format_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_dri2_attach_format_end (xcb_dri2_attach_format_iterator_t i); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_dri2_query_version_cookie_t +xcb_dri2_query_version (xcb_connection_t *c, + uint32_t major_version, + uint32_t minor_version); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_dri2_query_version_cookie_t +xcb_dri2_query_version_unchecked (xcb_connection_t *c, + uint32_t major_version, + uint32_t minor_version); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_dri2_query_version_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_dri2_query_version_reply_t * +xcb_dri2_query_version_reply (xcb_connection_t *c, + xcb_dri2_query_version_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_dri2_connect_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_dri2_connect_cookie_t +xcb_dri2_connect (xcb_connection_t *c, + xcb_window_t window, + uint32_t driver_type); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_dri2_connect_cookie_t +xcb_dri2_connect_unchecked (xcb_connection_t *c, + xcb_window_t window, + uint32_t driver_type); + +char * +xcb_dri2_connect_driver_name (const xcb_dri2_connect_reply_t *R); + +int +xcb_dri2_connect_driver_name_length (const xcb_dri2_connect_reply_t *R); + +xcb_generic_iterator_t +xcb_dri2_connect_driver_name_end (const xcb_dri2_connect_reply_t *R); + +void * +xcb_dri2_connect_alignment_pad (const xcb_dri2_connect_reply_t *R); + +int +xcb_dri2_connect_alignment_pad_length (const xcb_dri2_connect_reply_t *R); + +xcb_generic_iterator_t +xcb_dri2_connect_alignment_pad_end (const xcb_dri2_connect_reply_t *R); + +char * +xcb_dri2_connect_device_name (const xcb_dri2_connect_reply_t *R); + +int +xcb_dri2_connect_device_name_length (const xcb_dri2_connect_reply_t *R); + +xcb_generic_iterator_t +xcb_dri2_connect_device_name_end (const xcb_dri2_connect_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_dri2_connect_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_dri2_connect_reply_t * +xcb_dri2_connect_reply (xcb_connection_t *c, + xcb_dri2_connect_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_dri2_authenticate_cookie_t +xcb_dri2_authenticate (xcb_connection_t *c, + xcb_window_t window, + uint32_t magic); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_dri2_authenticate_cookie_t +xcb_dri2_authenticate_unchecked (xcb_connection_t *c, + xcb_window_t window, + uint32_t magic); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_dri2_authenticate_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_dri2_authenticate_reply_t * +xcb_dri2_authenticate_reply (xcb_connection_t *c, + xcb_dri2_authenticate_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_dri2_create_drawable_checked (xcb_connection_t *c, + xcb_drawable_t drawable); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_dri2_create_drawable (xcb_connection_t *c, + xcb_drawable_t drawable); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_dri2_destroy_drawable_checked (xcb_connection_t *c, + xcb_drawable_t drawable); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_dri2_destroy_drawable (xcb_connection_t *c, + xcb_drawable_t drawable); + +int +xcb_dri2_get_buffers_sizeof (const void *_buffer, + uint32_t attachments_len); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_dri2_get_buffers_cookie_t +xcb_dri2_get_buffers (xcb_connection_t *c, + xcb_drawable_t drawable, + uint32_t count, + uint32_t attachments_len, + const uint32_t *attachments); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_dri2_get_buffers_cookie_t +xcb_dri2_get_buffers_unchecked (xcb_connection_t *c, + xcb_drawable_t drawable, + uint32_t count, + uint32_t attachments_len, + const uint32_t *attachments); + +xcb_dri2_dri2_buffer_t * +xcb_dri2_get_buffers_buffers (const xcb_dri2_get_buffers_reply_t *R); + +int +xcb_dri2_get_buffers_buffers_length (const xcb_dri2_get_buffers_reply_t *R); + +xcb_dri2_dri2_buffer_iterator_t +xcb_dri2_get_buffers_buffers_iterator (const xcb_dri2_get_buffers_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_dri2_get_buffers_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_dri2_get_buffers_reply_t * +xcb_dri2_get_buffers_reply (xcb_connection_t *c, + xcb_dri2_get_buffers_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_dri2_copy_region_cookie_t +xcb_dri2_copy_region (xcb_connection_t *c, + xcb_drawable_t drawable, + uint32_t region, + uint32_t dest, + uint32_t src); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_dri2_copy_region_cookie_t +xcb_dri2_copy_region_unchecked (xcb_connection_t *c, + xcb_drawable_t drawable, + uint32_t region, + uint32_t dest, + uint32_t src); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_dri2_copy_region_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_dri2_copy_region_reply_t * +xcb_dri2_copy_region_reply (xcb_connection_t *c, + xcb_dri2_copy_region_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_dri2_get_buffers_with_format_sizeof (const void *_buffer, + uint32_t attachments_len); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_dri2_get_buffers_with_format_cookie_t +xcb_dri2_get_buffers_with_format (xcb_connection_t *c, + xcb_drawable_t drawable, + uint32_t count, + uint32_t attachments_len, + const xcb_dri2_attach_format_t *attachments); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_dri2_get_buffers_with_format_cookie_t +xcb_dri2_get_buffers_with_format_unchecked (xcb_connection_t *c, + xcb_drawable_t drawable, + uint32_t count, + uint32_t attachments_len, + const xcb_dri2_attach_format_t *attachments); + +xcb_dri2_dri2_buffer_t * +xcb_dri2_get_buffers_with_format_buffers (const xcb_dri2_get_buffers_with_format_reply_t *R); + +int +xcb_dri2_get_buffers_with_format_buffers_length (const xcb_dri2_get_buffers_with_format_reply_t *R); + +xcb_dri2_dri2_buffer_iterator_t +xcb_dri2_get_buffers_with_format_buffers_iterator (const xcb_dri2_get_buffers_with_format_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_dri2_get_buffers_with_format_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_dri2_get_buffers_with_format_reply_t * +xcb_dri2_get_buffers_with_format_reply (xcb_connection_t *c, + xcb_dri2_get_buffers_with_format_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_dri2_swap_buffers_cookie_t +xcb_dri2_swap_buffers (xcb_connection_t *c, + xcb_drawable_t drawable, + uint32_t target_msc_hi, + uint32_t target_msc_lo, + uint32_t divisor_hi, + uint32_t divisor_lo, + uint32_t remainder_hi, + uint32_t remainder_lo); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_dri2_swap_buffers_cookie_t +xcb_dri2_swap_buffers_unchecked (xcb_connection_t *c, + xcb_drawable_t drawable, + uint32_t target_msc_hi, + uint32_t target_msc_lo, + uint32_t divisor_hi, + uint32_t divisor_lo, + uint32_t remainder_hi, + uint32_t remainder_lo); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_dri2_swap_buffers_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_dri2_swap_buffers_reply_t * +xcb_dri2_swap_buffers_reply (xcb_connection_t *c, + xcb_dri2_swap_buffers_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_dri2_get_msc_cookie_t +xcb_dri2_get_msc (xcb_connection_t *c, + xcb_drawable_t drawable); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_dri2_get_msc_cookie_t +xcb_dri2_get_msc_unchecked (xcb_connection_t *c, + xcb_drawable_t drawable); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_dri2_get_msc_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_dri2_get_msc_reply_t * +xcb_dri2_get_msc_reply (xcb_connection_t *c, + xcb_dri2_get_msc_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_dri2_wait_msc_cookie_t +xcb_dri2_wait_msc (xcb_connection_t *c, + xcb_drawable_t drawable, + uint32_t target_msc_hi, + uint32_t target_msc_lo, + uint32_t divisor_hi, + uint32_t divisor_lo, + uint32_t remainder_hi, + uint32_t remainder_lo); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_dri2_wait_msc_cookie_t +xcb_dri2_wait_msc_unchecked (xcb_connection_t *c, + xcb_drawable_t drawable, + uint32_t target_msc_hi, + uint32_t target_msc_lo, + uint32_t divisor_hi, + uint32_t divisor_lo, + uint32_t remainder_hi, + uint32_t remainder_lo); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_dri2_wait_msc_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_dri2_wait_msc_reply_t * +xcb_dri2_wait_msc_reply (xcb_connection_t *c, + xcb_dri2_wait_msc_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_dri2_wait_sbc_cookie_t +xcb_dri2_wait_sbc (xcb_connection_t *c, + xcb_drawable_t drawable, + uint32_t target_sbc_hi, + uint32_t target_sbc_lo); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_dri2_wait_sbc_cookie_t +xcb_dri2_wait_sbc_unchecked (xcb_connection_t *c, + xcb_drawable_t drawable, + uint32_t target_sbc_hi, + uint32_t target_sbc_lo); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_dri2_wait_sbc_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_dri2_wait_sbc_reply_t * +xcb_dri2_wait_sbc_reply (xcb_connection_t *c, + xcb_dri2_wait_sbc_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_dri2_swap_interval_checked (xcb_connection_t *c, + xcb_drawable_t drawable, + uint32_t interval); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_dri2_swap_interval (xcb_connection_t *c, + xcb_drawable_t drawable, + uint32_t interval); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_dri2_get_param_cookie_t +xcb_dri2_get_param (xcb_connection_t *c, + xcb_drawable_t drawable, + uint32_t param); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_dri2_get_param_cookie_t +xcb_dri2_get_param_unchecked (xcb_connection_t *c, + xcb_drawable_t drawable, + uint32_t param); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_dri2_get_param_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_dri2_get_param_reply_t * +xcb_dri2_get_param_reply (xcb_connection_t *c, + xcb_dri2_get_param_cookie_t cookie /**< */, + xcb_generic_error_t **e); + + +#ifdef __cplusplus +} +#endif + +#endif + +/** + * @} + */ diff --git a/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/include/xcb/dri3.h b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/include/xcb/dri3.h new file mode 100644 index 0000000000000000000000000000000000000000..0968a1e1a0ab9bab503ceee51958767944a6ac34 --- /dev/null +++ b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/include/xcb/dri3.h @@ -0,0 +1,1003 @@ +/* + * This file generated automatically from dri3.xml by c_client.py. + * Edit at your peril. + */ + +/** + * @defgroup XCB_DRI3_API XCB DRI3 API + * @brief DRI3 XCB Protocol Implementation. + * @{ + **/ + +#ifndef __DRI3_H +#define __DRI3_H + +#include "xcb.h" +#include "xproto.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#define XCB_DRI3_MAJOR_VERSION 1 +#define XCB_DRI3_MINOR_VERSION 4 + +extern xcb_extension_t xcb_dri3_id; + +typedef uint32_t xcb_dri3_syncobj_t; + +/** + * @brief xcb_dri3_syncobj_iterator_t + **/ +typedef struct xcb_dri3_syncobj_iterator_t { + xcb_dri3_syncobj_t *data; + int rem; + int index; +} xcb_dri3_syncobj_iterator_t; + +/** + * @brief xcb_dri3_query_version_cookie_t + **/ +typedef struct xcb_dri3_query_version_cookie_t { + unsigned int sequence; +} xcb_dri3_query_version_cookie_t; + +/** Opcode for xcb_dri3_query_version. */ +#define XCB_DRI3_QUERY_VERSION 0 + +/** + * @brief xcb_dri3_query_version_request_t + **/ +typedef struct xcb_dri3_query_version_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + uint32_t major_version; + uint32_t minor_version; +} xcb_dri3_query_version_request_t; + +/** + * @brief xcb_dri3_query_version_reply_t + **/ +typedef struct xcb_dri3_query_version_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint32_t major_version; + uint32_t minor_version; +} xcb_dri3_query_version_reply_t; + +/** + * @brief xcb_dri3_open_cookie_t + **/ +typedef struct xcb_dri3_open_cookie_t { + unsigned int sequence; +} xcb_dri3_open_cookie_t; + +/** Opcode for xcb_dri3_open. */ +#define XCB_DRI3_OPEN 1 + +/** + * @brief xcb_dri3_open_request_t + **/ +typedef struct xcb_dri3_open_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_drawable_t drawable; + uint32_t provider; +} xcb_dri3_open_request_t; + +/** + * @brief xcb_dri3_open_reply_t + **/ +typedef struct xcb_dri3_open_reply_t { + uint8_t response_type; + uint8_t nfd; + uint16_t sequence; + uint32_t length; + uint8_t pad0[24]; +} xcb_dri3_open_reply_t; + +/** Opcode for xcb_dri3_pixmap_from_buffer. */ +#define XCB_DRI3_PIXMAP_FROM_BUFFER 2 + +/** + * @brief xcb_dri3_pixmap_from_buffer_request_t + **/ +typedef struct xcb_dri3_pixmap_from_buffer_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_pixmap_t pixmap; + xcb_drawable_t drawable; + uint32_t size; + uint16_t width; + uint16_t height; + uint16_t stride; + uint8_t depth; + uint8_t bpp; +} xcb_dri3_pixmap_from_buffer_request_t; + +/** + * @brief xcb_dri3_buffer_from_pixmap_cookie_t + **/ +typedef struct xcb_dri3_buffer_from_pixmap_cookie_t { + unsigned int sequence; +} xcb_dri3_buffer_from_pixmap_cookie_t; + +/** Opcode for xcb_dri3_buffer_from_pixmap. */ +#define XCB_DRI3_BUFFER_FROM_PIXMAP 3 + +/** + * @brief xcb_dri3_buffer_from_pixmap_request_t + **/ +typedef struct xcb_dri3_buffer_from_pixmap_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_pixmap_t pixmap; +} xcb_dri3_buffer_from_pixmap_request_t; + +/** + * @brief xcb_dri3_buffer_from_pixmap_reply_t + **/ +typedef struct xcb_dri3_buffer_from_pixmap_reply_t { + uint8_t response_type; + uint8_t nfd; + uint16_t sequence; + uint32_t length; + uint32_t size; + uint16_t width; + uint16_t height; + uint16_t stride; + uint8_t depth; + uint8_t bpp; + uint8_t pad0[12]; +} xcb_dri3_buffer_from_pixmap_reply_t; + +/** Opcode for xcb_dri3_fence_from_fd. */ +#define XCB_DRI3_FENCE_FROM_FD 4 + +/** + * @brief xcb_dri3_fence_from_fd_request_t + **/ +typedef struct xcb_dri3_fence_from_fd_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_drawable_t drawable; + uint32_t fence; + uint8_t initially_triggered; + uint8_t pad0[3]; +} xcb_dri3_fence_from_fd_request_t; + +/** + * @brief xcb_dri3_fd_from_fence_cookie_t + **/ +typedef struct xcb_dri3_fd_from_fence_cookie_t { + unsigned int sequence; +} xcb_dri3_fd_from_fence_cookie_t; + +/** Opcode for xcb_dri3_fd_from_fence. */ +#define XCB_DRI3_FD_FROM_FENCE 5 + +/** + * @brief xcb_dri3_fd_from_fence_request_t + **/ +typedef struct xcb_dri3_fd_from_fence_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_drawable_t drawable; + uint32_t fence; +} xcb_dri3_fd_from_fence_request_t; + +/** + * @brief xcb_dri3_fd_from_fence_reply_t + **/ +typedef struct xcb_dri3_fd_from_fence_reply_t { + uint8_t response_type; + uint8_t nfd; + uint16_t sequence; + uint32_t length; + uint8_t pad0[24]; +} xcb_dri3_fd_from_fence_reply_t; + +/** + * @brief xcb_dri3_get_supported_modifiers_cookie_t + **/ +typedef struct xcb_dri3_get_supported_modifiers_cookie_t { + unsigned int sequence; +} xcb_dri3_get_supported_modifiers_cookie_t; + +/** Opcode for xcb_dri3_get_supported_modifiers. */ +#define XCB_DRI3_GET_SUPPORTED_MODIFIERS 6 + +/** + * @brief xcb_dri3_get_supported_modifiers_request_t + **/ +typedef struct xcb_dri3_get_supported_modifiers_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + uint32_t window; + uint8_t depth; + uint8_t bpp; + uint8_t pad0[2]; +} xcb_dri3_get_supported_modifiers_request_t; + +/** + * @brief xcb_dri3_get_supported_modifiers_reply_t + **/ +typedef struct xcb_dri3_get_supported_modifiers_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint32_t num_window_modifiers; + uint32_t num_screen_modifiers; + uint8_t pad1[16]; +} xcb_dri3_get_supported_modifiers_reply_t; + +/** Opcode for xcb_dri3_pixmap_from_buffers. */ +#define XCB_DRI3_PIXMAP_FROM_BUFFERS 7 + +/** + * @brief xcb_dri3_pixmap_from_buffers_request_t + **/ +typedef struct xcb_dri3_pixmap_from_buffers_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_pixmap_t pixmap; + xcb_window_t window; + uint8_t num_buffers; + uint8_t pad0[3]; + uint16_t width; + uint16_t height; + uint32_t stride0; + uint32_t offset0; + uint32_t stride1; + uint32_t offset1; + uint32_t stride2; + uint32_t offset2; + uint32_t stride3; + uint32_t offset3; + uint8_t depth; + uint8_t bpp; + uint8_t pad1[2]; + uint64_t modifier; +} xcb_dri3_pixmap_from_buffers_request_t; + +/** + * @brief xcb_dri3_buffers_from_pixmap_cookie_t + **/ +typedef struct xcb_dri3_buffers_from_pixmap_cookie_t { + unsigned int sequence; +} xcb_dri3_buffers_from_pixmap_cookie_t; + +/** Opcode for xcb_dri3_buffers_from_pixmap. */ +#define XCB_DRI3_BUFFERS_FROM_PIXMAP 8 + +/** + * @brief xcb_dri3_buffers_from_pixmap_request_t + **/ +typedef struct xcb_dri3_buffers_from_pixmap_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_pixmap_t pixmap; +} xcb_dri3_buffers_from_pixmap_request_t; + +/** + * @brief xcb_dri3_buffers_from_pixmap_reply_t + **/ +typedef struct xcb_dri3_buffers_from_pixmap_reply_t { + uint8_t response_type; + uint8_t nfd; + uint16_t sequence; + uint32_t length; + uint16_t width; + uint16_t height; + uint8_t pad0[4]; + uint64_t modifier; + uint8_t depth; + uint8_t bpp; + uint8_t pad1[6]; +} xcb_dri3_buffers_from_pixmap_reply_t; + +/** Opcode for xcb_dri3_set_drm_device_in_use. */ +#define XCB_DRI3_SET_DRM_DEVICE_IN_USE 9 + +/** + * @brief xcb_dri3_set_drm_device_in_use_request_t + **/ +typedef struct xcb_dri3_set_drm_device_in_use_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_window_t window; + uint32_t drmMajor; + uint32_t drmMinor; +} xcb_dri3_set_drm_device_in_use_request_t; + +/** Opcode for xcb_dri3_import_syncobj. */ +#define XCB_DRI3_IMPORT_SYNCOBJ 10 + +/** + * @brief xcb_dri3_import_syncobj_request_t + **/ +typedef struct xcb_dri3_import_syncobj_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_dri3_syncobj_t syncobj; + xcb_drawable_t drawable; +} xcb_dri3_import_syncobj_request_t; + +/** Opcode for xcb_dri3_free_syncobj. */ +#define XCB_DRI3_FREE_SYNCOBJ 11 + +/** + * @brief xcb_dri3_free_syncobj_request_t + **/ +typedef struct xcb_dri3_free_syncobj_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_dri3_syncobj_t syncobj; +} xcb_dri3_free_syncobj_request_t; + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_dri3_syncobj_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_dri3_syncobj_t) + */ +void +xcb_dri3_syncobj_next (xcb_dri3_syncobj_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_dri3_syncobj_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_dri3_syncobj_end (xcb_dri3_syncobj_iterator_t i); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_dri3_query_version_cookie_t +xcb_dri3_query_version (xcb_connection_t *c, + uint32_t major_version, + uint32_t minor_version); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_dri3_query_version_cookie_t +xcb_dri3_query_version_unchecked (xcb_connection_t *c, + uint32_t major_version, + uint32_t minor_version); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_dri3_query_version_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_dri3_query_version_reply_t * +xcb_dri3_query_version_reply (xcb_connection_t *c, + xcb_dri3_query_version_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_dri3_open_cookie_t +xcb_dri3_open (xcb_connection_t *c, + xcb_drawable_t drawable, + uint32_t provider); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_dri3_open_cookie_t +xcb_dri3_open_unchecked (xcb_connection_t *c, + xcb_drawable_t drawable, + uint32_t provider); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_dri3_open_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_dri3_open_reply_t * +xcb_dri3_open_reply (xcb_connection_t *c, + xcb_dri3_open_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +/** + * Return the reply fds + * @param c The connection + * @param reply The reply + * + * Returns a pointer to the array of reply fds of the reply. + * + * The returned value points into the reply and must not be free(). + * The fds are not managed by xcb. You must close() them before freeing the reply. + */ +int * +xcb_dri3_open_reply_fds (xcb_connection_t *c /**< */, + xcb_dri3_open_reply_t *reply); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_dri3_pixmap_from_buffer_checked (xcb_connection_t *c, + xcb_pixmap_t pixmap, + xcb_drawable_t drawable, + uint32_t size, + uint16_t width, + uint16_t height, + uint16_t stride, + uint8_t depth, + uint8_t bpp, + int32_t pixmap_fd); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_dri3_pixmap_from_buffer (xcb_connection_t *c, + xcb_pixmap_t pixmap, + xcb_drawable_t drawable, + uint32_t size, + uint16_t width, + uint16_t height, + uint16_t stride, + uint8_t depth, + uint8_t bpp, + int32_t pixmap_fd); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_dri3_buffer_from_pixmap_cookie_t +xcb_dri3_buffer_from_pixmap (xcb_connection_t *c, + xcb_pixmap_t pixmap); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_dri3_buffer_from_pixmap_cookie_t +xcb_dri3_buffer_from_pixmap_unchecked (xcb_connection_t *c, + xcb_pixmap_t pixmap); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_dri3_buffer_from_pixmap_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_dri3_buffer_from_pixmap_reply_t * +xcb_dri3_buffer_from_pixmap_reply (xcb_connection_t *c, + xcb_dri3_buffer_from_pixmap_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +/** + * Return the reply fds + * @param c The connection + * @param reply The reply + * + * Returns a pointer to the array of reply fds of the reply. + * + * The returned value points into the reply and must not be free(). + * The fds are not managed by xcb. You must close() them before freeing the reply. + */ +int * +xcb_dri3_buffer_from_pixmap_reply_fds (xcb_connection_t *c /**< */, + xcb_dri3_buffer_from_pixmap_reply_t *reply); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_dri3_fence_from_fd_checked (xcb_connection_t *c, + xcb_drawable_t drawable, + uint32_t fence, + uint8_t initially_triggered, + int32_t fence_fd); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_dri3_fence_from_fd (xcb_connection_t *c, + xcb_drawable_t drawable, + uint32_t fence, + uint8_t initially_triggered, + int32_t fence_fd); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_dri3_fd_from_fence_cookie_t +xcb_dri3_fd_from_fence (xcb_connection_t *c, + xcb_drawable_t drawable, + uint32_t fence); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_dri3_fd_from_fence_cookie_t +xcb_dri3_fd_from_fence_unchecked (xcb_connection_t *c, + xcb_drawable_t drawable, + uint32_t fence); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_dri3_fd_from_fence_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_dri3_fd_from_fence_reply_t * +xcb_dri3_fd_from_fence_reply (xcb_connection_t *c, + xcb_dri3_fd_from_fence_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +/** + * Return the reply fds + * @param c The connection + * @param reply The reply + * + * Returns a pointer to the array of reply fds of the reply. + * + * The returned value points into the reply and must not be free(). + * The fds are not managed by xcb. You must close() them before freeing the reply. + */ +int * +xcb_dri3_fd_from_fence_reply_fds (xcb_connection_t *c /**< */, + xcb_dri3_fd_from_fence_reply_t *reply); + +int +xcb_dri3_get_supported_modifiers_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_dri3_get_supported_modifiers_cookie_t +xcb_dri3_get_supported_modifiers (xcb_connection_t *c, + uint32_t window, + uint8_t depth, + uint8_t bpp); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_dri3_get_supported_modifiers_cookie_t +xcb_dri3_get_supported_modifiers_unchecked (xcb_connection_t *c, + uint32_t window, + uint8_t depth, + uint8_t bpp); + +uint64_t * +xcb_dri3_get_supported_modifiers_window_modifiers (const xcb_dri3_get_supported_modifiers_reply_t *R); + +int +xcb_dri3_get_supported_modifiers_window_modifiers_length (const xcb_dri3_get_supported_modifiers_reply_t *R); + +xcb_generic_iterator_t +xcb_dri3_get_supported_modifiers_window_modifiers_end (const xcb_dri3_get_supported_modifiers_reply_t *R); + +uint64_t * +xcb_dri3_get_supported_modifiers_screen_modifiers (const xcb_dri3_get_supported_modifiers_reply_t *R); + +int +xcb_dri3_get_supported_modifiers_screen_modifiers_length (const xcb_dri3_get_supported_modifiers_reply_t *R); + +xcb_generic_iterator_t +xcb_dri3_get_supported_modifiers_screen_modifiers_end (const xcb_dri3_get_supported_modifiers_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_dri3_get_supported_modifiers_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_dri3_get_supported_modifiers_reply_t * +xcb_dri3_get_supported_modifiers_reply (xcb_connection_t *c, + xcb_dri3_get_supported_modifiers_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_dri3_pixmap_from_buffers_checked (xcb_connection_t *c, + xcb_pixmap_t pixmap, + xcb_window_t window, + uint8_t num_buffers, + uint16_t width, + uint16_t height, + uint32_t stride0, + uint32_t offset0, + uint32_t stride1, + uint32_t offset1, + uint32_t stride2, + uint32_t offset2, + uint32_t stride3, + uint32_t offset3, + uint8_t depth, + uint8_t bpp, + uint64_t modifier, + const int32_t *buffers); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_dri3_pixmap_from_buffers (xcb_connection_t *c, + xcb_pixmap_t pixmap, + xcb_window_t window, + uint8_t num_buffers, + uint16_t width, + uint16_t height, + uint32_t stride0, + uint32_t offset0, + uint32_t stride1, + uint32_t offset1, + uint32_t stride2, + uint32_t offset2, + uint32_t stride3, + uint32_t offset3, + uint8_t depth, + uint8_t bpp, + uint64_t modifier, + const int32_t *buffers); + +int +xcb_dri3_buffers_from_pixmap_sizeof (const void *_buffer, + int32_t buffers); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_dri3_buffers_from_pixmap_cookie_t +xcb_dri3_buffers_from_pixmap (xcb_connection_t *c, + xcb_pixmap_t pixmap); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_dri3_buffers_from_pixmap_cookie_t +xcb_dri3_buffers_from_pixmap_unchecked (xcb_connection_t *c, + xcb_pixmap_t pixmap); + +uint32_t * +xcb_dri3_buffers_from_pixmap_strides (const xcb_dri3_buffers_from_pixmap_reply_t *R); + +int +xcb_dri3_buffers_from_pixmap_strides_length (const xcb_dri3_buffers_from_pixmap_reply_t *R); + +xcb_generic_iterator_t +xcb_dri3_buffers_from_pixmap_strides_end (const xcb_dri3_buffers_from_pixmap_reply_t *R); + +uint32_t * +xcb_dri3_buffers_from_pixmap_offsets (const xcb_dri3_buffers_from_pixmap_reply_t *R); + +int +xcb_dri3_buffers_from_pixmap_offsets_length (const xcb_dri3_buffers_from_pixmap_reply_t *R); + +xcb_generic_iterator_t +xcb_dri3_buffers_from_pixmap_offsets_end (const xcb_dri3_buffers_from_pixmap_reply_t *R); + +int32_t * +xcb_dri3_buffers_from_pixmap_buffers (const xcb_dri3_buffers_from_pixmap_reply_t *R); + +int +xcb_dri3_buffers_from_pixmap_buffers_length (const xcb_dri3_buffers_from_pixmap_reply_t *R); + +xcb_generic_iterator_t +xcb_dri3_buffers_from_pixmap_buffers_end (const xcb_dri3_buffers_from_pixmap_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_dri3_buffers_from_pixmap_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_dri3_buffers_from_pixmap_reply_t * +xcb_dri3_buffers_from_pixmap_reply (xcb_connection_t *c, + xcb_dri3_buffers_from_pixmap_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +/** + * Return the reply fds + * @param c The connection + * @param reply The reply + * + * Returns a pointer to the array of reply fds of the reply. + * + * The returned value points into the reply and must not be free(). + * The fds are not managed by xcb. You must close() them before freeing the reply. + */ +int * +xcb_dri3_buffers_from_pixmap_reply_fds (xcb_connection_t *c /**< */, + xcb_dri3_buffers_from_pixmap_reply_t *reply); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_dri3_set_drm_device_in_use_checked (xcb_connection_t *c, + xcb_window_t window, + uint32_t drmMajor, + uint32_t drmMinor); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_dri3_set_drm_device_in_use (xcb_connection_t *c, + xcb_window_t window, + uint32_t drmMajor, + uint32_t drmMinor); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_dri3_import_syncobj_checked (xcb_connection_t *c, + xcb_dri3_syncobj_t syncobj, + xcb_drawable_t drawable, + int32_t syncobj_fd); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_dri3_import_syncobj (xcb_connection_t *c, + xcb_dri3_syncobj_t syncobj, + xcb_drawable_t drawable, + int32_t syncobj_fd); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_dri3_free_syncobj_checked (xcb_connection_t *c, + xcb_dri3_syncobj_t syncobj); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_dri3_free_syncobj (xcb_connection_t *c, + xcb_dri3_syncobj_t syncobj); + + +#ifdef __cplusplus +} +#endif + +#endif + +/** + * @} + */ diff --git a/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/include/xcb/ge.h b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/include/xcb/ge.h new file mode 100644 index 0000000000000000000000000000000000000000..9887e576475f317c7d9a609112e5396b03710d27 --- /dev/null +++ b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/include/xcb/ge.h @@ -0,0 +1,117 @@ +/* + * This file generated automatically from ge.xml by c_client.py. + * Edit at your peril. + */ + +/** + * @defgroup XCB_GenericEvent_API XCB GenericEvent API + * @brief GenericEvent XCB Protocol Implementation. + * @{ + **/ + +#ifndef __GE_H +#define __GE_H + +#include "xcb.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#define XCB_GENERICEVENT_MAJOR_VERSION 1 +#define XCB_GENERICEVENT_MINOR_VERSION 0 + +extern xcb_extension_t xcb_genericevent_id; + +/** + * @brief xcb_genericevent_query_version_cookie_t + **/ +typedef struct xcb_genericevent_query_version_cookie_t { + unsigned int sequence; +} xcb_genericevent_query_version_cookie_t; + +/** Opcode for xcb_genericevent_query_version. */ +#define XCB_GENERICEVENT_QUERY_VERSION 0 + +/** + * @brief xcb_genericevent_query_version_request_t + **/ +typedef struct xcb_genericevent_query_version_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + uint16_t client_major_version; + uint16_t client_minor_version; +} xcb_genericevent_query_version_request_t; + +/** + * @brief xcb_genericevent_query_version_reply_t + **/ +typedef struct xcb_genericevent_query_version_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint16_t major_version; + uint16_t minor_version; + uint8_t pad1[20]; +} xcb_genericevent_query_version_reply_t; + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_genericevent_query_version_cookie_t +xcb_genericevent_query_version (xcb_connection_t *c, + uint16_t client_major_version, + uint16_t client_minor_version); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_genericevent_query_version_cookie_t +xcb_genericevent_query_version_unchecked (xcb_connection_t *c, + uint16_t client_major_version, + uint16_t client_minor_version); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_genericevent_query_version_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_genericevent_query_version_reply_t * +xcb_genericevent_query_version_reply (xcb_connection_t *c, + xcb_genericevent_query_version_cookie_t cookie /**< */, + xcb_generic_error_t **e); + + +#ifdef __cplusplus +} +#endif + +#endif + +/** + * @} + */ diff --git a/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/include/xcb/glx.h b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/include/xcb/glx.h new file mode 100644 index 0000000000000000000000000000000000000000..d864bcc0b5423aaa0fb0c9cf1f394335cf82d6dc --- /dev/null +++ b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/include/xcb/glx.h @@ -0,0 +1,8657 @@ +/* + * This file generated automatically from glx.xml by c_client.py. + * Edit at your peril. + */ + +/** + * @defgroup XCB_Glx_API XCB Glx API + * @brief Glx XCB Protocol Implementation. + * @{ + **/ + +#ifndef __GLX_H +#define __GLX_H + +#include "xcb.h" +#include "xproto.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#define XCB_GLX_MAJOR_VERSION 1 +#define XCB_GLX_MINOR_VERSION 4 + +extern xcb_extension_t xcb_glx_id; + +typedef uint32_t xcb_glx_pixmap_t; + +/** + * @brief xcb_glx_pixmap_iterator_t + **/ +typedef struct xcb_glx_pixmap_iterator_t { + xcb_glx_pixmap_t *data; + int rem; + int index; +} xcb_glx_pixmap_iterator_t; + +typedef uint32_t xcb_glx_context_t; + +/** + * @brief xcb_glx_context_iterator_t + **/ +typedef struct xcb_glx_context_iterator_t { + xcb_glx_context_t *data; + int rem; + int index; +} xcb_glx_context_iterator_t; + +typedef uint32_t xcb_glx_pbuffer_t; + +/** + * @brief xcb_glx_pbuffer_iterator_t + **/ +typedef struct xcb_glx_pbuffer_iterator_t { + xcb_glx_pbuffer_t *data; + int rem; + int index; +} xcb_glx_pbuffer_iterator_t; + +typedef uint32_t xcb_glx_window_t; + +/** + * @brief xcb_glx_window_iterator_t + **/ +typedef struct xcb_glx_window_iterator_t { + xcb_glx_window_t *data; + int rem; + int index; +} xcb_glx_window_iterator_t; + +typedef uint32_t xcb_glx_fbconfig_t; + +/** + * @brief xcb_glx_fbconfig_iterator_t + **/ +typedef struct xcb_glx_fbconfig_iterator_t { + xcb_glx_fbconfig_t *data; + int rem; + int index; +} xcb_glx_fbconfig_iterator_t; + +typedef uint32_t xcb_glx_drawable_t; + +/** + * @brief xcb_glx_drawable_iterator_t + **/ +typedef struct xcb_glx_drawable_iterator_t { + xcb_glx_drawable_t *data; + int rem; + int index; +} xcb_glx_drawable_iterator_t; + +typedef float xcb_glx_float32_t; + +/** + * @brief xcb_glx_float32_iterator_t + **/ +typedef struct xcb_glx_float32_iterator_t { + xcb_glx_float32_t *data; + int rem; + int index; +} xcb_glx_float32_iterator_t; + +typedef double xcb_glx_float64_t; + +/** + * @brief xcb_glx_float64_iterator_t + **/ +typedef struct xcb_glx_float64_iterator_t { + xcb_glx_float64_t *data; + int rem; + int index; +} xcb_glx_float64_iterator_t; + +typedef uint32_t xcb_glx_bool32_t; + +/** + * @brief xcb_glx_bool32_iterator_t + **/ +typedef struct xcb_glx_bool32_iterator_t { + xcb_glx_bool32_t *data; + int rem; + int index; +} xcb_glx_bool32_iterator_t; + +typedef uint32_t xcb_glx_context_tag_t; + +/** + * @brief xcb_glx_context_tag_iterator_t + **/ +typedef struct xcb_glx_context_tag_iterator_t { + xcb_glx_context_tag_t *data; + int rem; + int index; +} xcb_glx_context_tag_iterator_t; + +/** Opcode for xcb_glx_generic. */ +#define XCB_GLX_GENERIC -1 + +/** + * @brief xcb_glx_generic_error_t + **/ +typedef struct xcb_glx_generic_error_t { + uint8_t response_type; + uint8_t error_code; + uint16_t sequence; + uint32_t bad_value; + uint16_t minor_opcode; + uint8_t major_opcode; + uint8_t pad0[21]; +} xcb_glx_generic_error_t; + +/** Opcode for xcb_glx_bad_context. */ +#define XCB_GLX_BAD_CONTEXT 0 + +typedef xcb_glx_generic_error_t xcb_glx_bad_context_error_t; + +/** Opcode for xcb_glx_bad_context_state. */ +#define XCB_GLX_BAD_CONTEXT_STATE 1 + +typedef xcb_glx_generic_error_t xcb_glx_bad_context_state_error_t; + +/** Opcode for xcb_glx_bad_drawable. */ +#define XCB_GLX_BAD_DRAWABLE 2 + +typedef xcb_glx_generic_error_t xcb_glx_bad_drawable_error_t; + +/** Opcode for xcb_glx_bad_pixmap. */ +#define XCB_GLX_BAD_PIXMAP 3 + +typedef xcb_glx_generic_error_t xcb_glx_bad_pixmap_error_t; + +/** Opcode for xcb_glx_bad_context_tag. */ +#define XCB_GLX_BAD_CONTEXT_TAG 4 + +typedef xcb_glx_generic_error_t xcb_glx_bad_context_tag_error_t; + +/** Opcode for xcb_glx_bad_current_window. */ +#define XCB_GLX_BAD_CURRENT_WINDOW 5 + +typedef xcb_glx_generic_error_t xcb_glx_bad_current_window_error_t; + +/** Opcode for xcb_glx_bad_render_request. */ +#define XCB_GLX_BAD_RENDER_REQUEST 6 + +typedef xcb_glx_generic_error_t xcb_glx_bad_render_request_error_t; + +/** Opcode for xcb_glx_bad_large_request. */ +#define XCB_GLX_BAD_LARGE_REQUEST 7 + +typedef xcb_glx_generic_error_t xcb_glx_bad_large_request_error_t; + +/** Opcode for xcb_glx_unsupported_private_request. */ +#define XCB_GLX_UNSUPPORTED_PRIVATE_REQUEST 8 + +typedef xcb_glx_generic_error_t xcb_glx_unsupported_private_request_error_t; + +/** Opcode for xcb_glx_bad_fb_config. */ +#define XCB_GLX_BAD_FB_CONFIG 9 + +typedef xcb_glx_generic_error_t xcb_glx_bad_fb_config_error_t; + +/** Opcode for xcb_glx_bad_pbuffer. */ +#define XCB_GLX_BAD_PBUFFER 10 + +typedef xcb_glx_generic_error_t xcb_glx_bad_pbuffer_error_t; + +/** Opcode for xcb_glx_bad_current_drawable. */ +#define XCB_GLX_BAD_CURRENT_DRAWABLE 11 + +typedef xcb_glx_generic_error_t xcb_glx_bad_current_drawable_error_t; + +/** Opcode for xcb_glx_bad_window. */ +#define XCB_GLX_BAD_WINDOW 12 + +typedef xcb_glx_generic_error_t xcb_glx_bad_window_error_t; + +/** Opcode for xcb_glx_glx_bad_profile_arb. */ +#define XCB_GLX_GLX_BAD_PROFILE_ARB 13 + +typedef xcb_glx_generic_error_t xcb_glx_glx_bad_profile_arb_error_t; + +/** Opcode for xcb_glx_pbuffer_clobber. */ +#define XCB_GLX_PBUFFER_CLOBBER 0 + +/** + * @brief xcb_glx_pbuffer_clobber_event_t + **/ +typedef struct xcb_glx_pbuffer_clobber_event_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint16_t event_type; + uint16_t draw_type; + xcb_glx_drawable_t drawable; + uint32_t b_mask; + uint16_t aux_buffer; + uint16_t x; + uint16_t y; + uint16_t width; + uint16_t height; + uint16_t count; + uint8_t pad1[4]; +} xcb_glx_pbuffer_clobber_event_t; + +/** Opcode for xcb_glx_buffer_swap_complete. */ +#define XCB_GLX_BUFFER_SWAP_COMPLETE 1 + +/** + * @brief xcb_glx_buffer_swap_complete_event_t + **/ +typedef struct xcb_glx_buffer_swap_complete_event_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint16_t event_type; + uint8_t pad1[2]; + xcb_glx_drawable_t drawable; + uint32_t ust_hi; + uint32_t ust_lo; + uint32_t msc_hi; + uint32_t msc_lo; + uint32_t sbc; +} xcb_glx_buffer_swap_complete_event_t; + +typedef enum xcb_glx_pbcet_t { + XCB_GLX_PBCET_DAMAGED = 32791, + XCB_GLX_PBCET_SAVED = 32792 +} xcb_glx_pbcet_t; + +typedef enum xcb_glx_pbcdt_t { + XCB_GLX_PBCDT_WINDOW = 32793, + XCB_GLX_PBCDT_PBUFFER = 32794 +} xcb_glx_pbcdt_t; + +/** Opcode for xcb_glx_render. */ +#define XCB_GLX_RENDER 1 + +/** + * @brief xcb_glx_render_request_t + **/ +typedef struct xcb_glx_render_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_glx_context_tag_t context_tag; +} xcb_glx_render_request_t; + +/** Opcode for xcb_glx_render_large. */ +#define XCB_GLX_RENDER_LARGE 2 + +/** + * @brief xcb_glx_render_large_request_t + **/ +typedef struct xcb_glx_render_large_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_glx_context_tag_t context_tag; + uint16_t request_num; + uint16_t request_total; + uint32_t data_len; +} xcb_glx_render_large_request_t; + +/** Opcode for xcb_glx_create_context. */ +#define XCB_GLX_CREATE_CONTEXT 3 + +/** + * @brief xcb_glx_create_context_request_t + **/ +typedef struct xcb_glx_create_context_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_glx_context_t context; + xcb_visualid_t visual; + uint32_t screen; + xcb_glx_context_t share_list; + uint8_t is_direct; + uint8_t pad0[3]; +} xcb_glx_create_context_request_t; + +/** Opcode for xcb_glx_destroy_context. */ +#define XCB_GLX_DESTROY_CONTEXT 4 + +/** + * @brief xcb_glx_destroy_context_request_t + **/ +typedef struct xcb_glx_destroy_context_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_glx_context_t context; +} xcb_glx_destroy_context_request_t; + +/** + * @brief xcb_glx_make_current_cookie_t + **/ +typedef struct xcb_glx_make_current_cookie_t { + unsigned int sequence; +} xcb_glx_make_current_cookie_t; + +/** Opcode for xcb_glx_make_current. */ +#define XCB_GLX_MAKE_CURRENT 5 + +/** + * @brief xcb_glx_make_current_request_t + **/ +typedef struct xcb_glx_make_current_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_glx_drawable_t drawable; + xcb_glx_context_t context; + xcb_glx_context_tag_t old_context_tag; +} xcb_glx_make_current_request_t; + +/** + * @brief xcb_glx_make_current_reply_t + **/ +typedef struct xcb_glx_make_current_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + xcb_glx_context_tag_t context_tag; + uint8_t pad1[20]; +} xcb_glx_make_current_reply_t; + +/** + * @brief xcb_glx_is_direct_cookie_t + **/ +typedef struct xcb_glx_is_direct_cookie_t { + unsigned int sequence; +} xcb_glx_is_direct_cookie_t; + +/** Opcode for xcb_glx_is_direct. */ +#define XCB_GLX_IS_DIRECT 6 + +/** + * @brief xcb_glx_is_direct_request_t + **/ +typedef struct xcb_glx_is_direct_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_glx_context_t context; +} xcb_glx_is_direct_request_t; + +/** + * @brief xcb_glx_is_direct_reply_t + **/ +typedef struct xcb_glx_is_direct_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint8_t is_direct; + uint8_t pad1[23]; +} xcb_glx_is_direct_reply_t; + +/** + * @brief xcb_glx_query_version_cookie_t + **/ +typedef struct xcb_glx_query_version_cookie_t { + unsigned int sequence; +} xcb_glx_query_version_cookie_t; + +/** Opcode for xcb_glx_query_version. */ +#define XCB_GLX_QUERY_VERSION 7 + +/** + * @brief xcb_glx_query_version_request_t + **/ +typedef struct xcb_glx_query_version_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + uint32_t major_version; + uint32_t minor_version; +} xcb_glx_query_version_request_t; + +/** + * @brief xcb_glx_query_version_reply_t + **/ +typedef struct xcb_glx_query_version_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint32_t major_version; + uint32_t minor_version; + uint8_t pad1[16]; +} xcb_glx_query_version_reply_t; + +/** Opcode for xcb_glx_wait_gl. */ +#define XCB_GLX_WAIT_GL 8 + +/** + * @brief xcb_glx_wait_gl_request_t + **/ +typedef struct xcb_glx_wait_gl_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_glx_context_tag_t context_tag; +} xcb_glx_wait_gl_request_t; + +/** Opcode for xcb_glx_wait_x. */ +#define XCB_GLX_WAIT_X 9 + +/** + * @brief xcb_glx_wait_x_request_t + **/ +typedef struct xcb_glx_wait_x_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_glx_context_tag_t context_tag; +} xcb_glx_wait_x_request_t; + +/** Opcode for xcb_glx_copy_context. */ +#define XCB_GLX_COPY_CONTEXT 10 + +/** + * @brief xcb_glx_copy_context_request_t + **/ +typedef struct xcb_glx_copy_context_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_glx_context_t src; + xcb_glx_context_t dest; + uint32_t mask; + xcb_glx_context_tag_t src_context_tag; +} xcb_glx_copy_context_request_t; + +typedef enum xcb_glx_gc_t { + XCB_GLX_GC_GL_CURRENT_BIT = 1, + XCB_GLX_GC_GL_POINT_BIT = 2, + XCB_GLX_GC_GL_LINE_BIT = 4, + XCB_GLX_GC_GL_POLYGON_BIT = 8, + XCB_GLX_GC_GL_POLYGON_STIPPLE_BIT = 16, + XCB_GLX_GC_GL_PIXEL_MODE_BIT = 32, + XCB_GLX_GC_GL_LIGHTING_BIT = 64, + XCB_GLX_GC_GL_FOG_BIT = 128, + XCB_GLX_GC_GL_DEPTH_BUFFER_BIT = 256, + XCB_GLX_GC_GL_ACCUM_BUFFER_BIT = 512, + XCB_GLX_GC_GL_STENCIL_BUFFER_BIT = 1024, + XCB_GLX_GC_GL_VIEWPORT_BIT = 2048, + XCB_GLX_GC_GL_TRANSFORM_BIT = 4096, + XCB_GLX_GC_GL_ENABLE_BIT = 8192, + XCB_GLX_GC_GL_COLOR_BUFFER_BIT = 16384, + XCB_GLX_GC_GL_HINT_BIT = 32768, + XCB_GLX_GC_GL_EVAL_BIT = 65536, + XCB_GLX_GC_GL_LIST_BIT = 131072, + XCB_GLX_GC_GL_TEXTURE_BIT = 262144, + XCB_GLX_GC_GL_SCISSOR_BIT = 524288, + XCB_GLX_GC_GL_ALL_ATTRIB_BITS = 16777215 +} xcb_glx_gc_t; + +/** Opcode for xcb_glx_swap_buffers. */ +#define XCB_GLX_SWAP_BUFFERS 11 + +/** + * @brief xcb_glx_swap_buffers_request_t + **/ +typedef struct xcb_glx_swap_buffers_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_glx_context_tag_t context_tag; + xcb_glx_drawable_t drawable; +} xcb_glx_swap_buffers_request_t; + +/** Opcode for xcb_glx_use_x_font. */ +#define XCB_GLX_USE_X_FONT 12 + +/** + * @brief xcb_glx_use_x_font_request_t + **/ +typedef struct xcb_glx_use_x_font_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_glx_context_tag_t context_tag; + xcb_font_t font; + uint32_t first; + uint32_t count; + uint32_t list_base; +} xcb_glx_use_x_font_request_t; + +/** Opcode for xcb_glx_create_glx_pixmap. */ +#define XCB_GLX_CREATE_GLX_PIXMAP 13 + +/** + * @brief xcb_glx_create_glx_pixmap_request_t + **/ +typedef struct xcb_glx_create_glx_pixmap_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + uint32_t screen; + xcb_visualid_t visual; + xcb_pixmap_t pixmap; + xcb_glx_pixmap_t glx_pixmap; +} xcb_glx_create_glx_pixmap_request_t; + +/** + * @brief xcb_glx_get_visual_configs_cookie_t + **/ +typedef struct xcb_glx_get_visual_configs_cookie_t { + unsigned int sequence; +} xcb_glx_get_visual_configs_cookie_t; + +/** Opcode for xcb_glx_get_visual_configs. */ +#define XCB_GLX_GET_VISUAL_CONFIGS 14 + +/** + * @brief xcb_glx_get_visual_configs_request_t + **/ +typedef struct xcb_glx_get_visual_configs_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + uint32_t screen; +} xcb_glx_get_visual_configs_request_t; + +/** + * @brief xcb_glx_get_visual_configs_reply_t + **/ +typedef struct xcb_glx_get_visual_configs_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint32_t num_visuals; + uint32_t num_properties; + uint8_t pad1[16]; +} xcb_glx_get_visual_configs_reply_t; + +/** Opcode for xcb_glx_destroy_glx_pixmap. */ +#define XCB_GLX_DESTROY_GLX_PIXMAP 15 + +/** + * @brief xcb_glx_destroy_glx_pixmap_request_t + **/ +typedef struct xcb_glx_destroy_glx_pixmap_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_glx_pixmap_t glx_pixmap; +} xcb_glx_destroy_glx_pixmap_request_t; + +/** Opcode for xcb_glx_vendor_private. */ +#define XCB_GLX_VENDOR_PRIVATE 16 + +/** + * @brief xcb_glx_vendor_private_request_t + **/ +typedef struct xcb_glx_vendor_private_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + uint32_t vendor_code; + xcb_glx_context_tag_t context_tag; +} xcb_glx_vendor_private_request_t; + +/** + * @brief xcb_glx_vendor_private_with_reply_cookie_t + **/ +typedef struct xcb_glx_vendor_private_with_reply_cookie_t { + unsigned int sequence; +} xcb_glx_vendor_private_with_reply_cookie_t; + +/** Opcode for xcb_glx_vendor_private_with_reply. */ +#define XCB_GLX_VENDOR_PRIVATE_WITH_REPLY 17 + +/** + * @brief xcb_glx_vendor_private_with_reply_request_t + **/ +typedef struct xcb_glx_vendor_private_with_reply_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + uint32_t vendor_code; + xcb_glx_context_tag_t context_tag; +} xcb_glx_vendor_private_with_reply_request_t; + +/** + * @brief xcb_glx_vendor_private_with_reply_reply_t + **/ +typedef struct xcb_glx_vendor_private_with_reply_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint32_t retval; + uint8_t data1[24]; +} xcb_glx_vendor_private_with_reply_reply_t; + +/** + * @brief xcb_glx_query_extensions_string_cookie_t + **/ +typedef struct xcb_glx_query_extensions_string_cookie_t { + unsigned int sequence; +} xcb_glx_query_extensions_string_cookie_t; + +/** Opcode for xcb_glx_query_extensions_string. */ +#define XCB_GLX_QUERY_EXTENSIONS_STRING 18 + +/** + * @brief xcb_glx_query_extensions_string_request_t + **/ +typedef struct xcb_glx_query_extensions_string_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + uint32_t screen; +} xcb_glx_query_extensions_string_request_t; + +/** + * @brief xcb_glx_query_extensions_string_reply_t + **/ +typedef struct xcb_glx_query_extensions_string_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint8_t pad1[4]; + uint32_t n; + uint8_t pad2[16]; +} xcb_glx_query_extensions_string_reply_t; + +/** + * @brief xcb_glx_query_server_string_cookie_t + **/ +typedef struct xcb_glx_query_server_string_cookie_t { + unsigned int sequence; +} xcb_glx_query_server_string_cookie_t; + +/** Opcode for xcb_glx_query_server_string. */ +#define XCB_GLX_QUERY_SERVER_STRING 19 + +/** + * @brief xcb_glx_query_server_string_request_t + **/ +typedef struct xcb_glx_query_server_string_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + uint32_t screen; + uint32_t name; +} xcb_glx_query_server_string_request_t; + +/** + * @brief xcb_glx_query_server_string_reply_t + **/ +typedef struct xcb_glx_query_server_string_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint8_t pad1[4]; + uint32_t str_len; + uint8_t pad2[16]; +} xcb_glx_query_server_string_reply_t; + +/** Opcode for xcb_glx_client_info. */ +#define XCB_GLX_CLIENT_INFO 20 + +/** + * @brief xcb_glx_client_info_request_t + **/ +typedef struct xcb_glx_client_info_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + uint32_t major_version; + uint32_t minor_version; + uint32_t str_len; +} xcb_glx_client_info_request_t; + +/** + * @brief xcb_glx_get_fb_configs_cookie_t + **/ +typedef struct xcb_glx_get_fb_configs_cookie_t { + unsigned int sequence; +} xcb_glx_get_fb_configs_cookie_t; + +/** Opcode for xcb_glx_get_fb_configs. */ +#define XCB_GLX_GET_FB_CONFIGS 21 + +/** + * @brief xcb_glx_get_fb_configs_request_t + **/ +typedef struct xcb_glx_get_fb_configs_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + uint32_t screen; +} xcb_glx_get_fb_configs_request_t; + +/** + * @brief xcb_glx_get_fb_configs_reply_t + **/ +typedef struct xcb_glx_get_fb_configs_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint32_t num_FB_configs; + uint32_t num_properties; + uint8_t pad1[16]; +} xcb_glx_get_fb_configs_reply_t; + +/** Opcode for xcb_glx_create_pixmap. */ +#define XCB_GLX_CREATE_PIXMAP 22 + +/** + * @brief xcb_glx_create_pixmap_request_t + **/ +typedef struct xcb_glx_create_pixmap_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + uint32_t screen; + xcb_glx_fbconfig_t fbconfig; + xcb_pixmap_t pixmap; + xcb_glx_pixmap_t glx_pixmap; + uint32_t num_attribs; +} xcb_glx_create_pixmap_request_t; + +/** Opcode for xcb_glx_destroy_pixmap. */ +#define XCB_GLX_DESTROY_PIXMAP 23 + +/** + * @brief xcb_glx_destroy_pixmap_request_t + **/ +typedef struct xcb_glx_destroy_pixmap_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_glx_pixmap_t glx_pixmap; +} xcb_glx_destroy_pixmap_request_t; + +/** Opcode for xcb_glx_create_new_context. */ +#define XCB_GLX_CREATE_NEW_CONTEXT 24 + +/** + * @brief xcb_glx_create_new_context_request_t + **/ +typedef struct xcb_glx_create_new_context_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_glx_context_t context; + xcb_glx_fbconfig_t fbconfig; + uint32_t screen; + uint32_t render_type; + xcb_glx_context_t share_list; + uint8_t is_direct; + uint8_t pad0[3]; +} xcb_glx_create_new_context_request_t; + +/** + * @brief xcb_glx_query_context_cookie_t + **/ +typedef struct xcb_glx_query_context_cookie_t { + unsigned int sequence; +} xcb_glx_query_context_cookie_t; + +/** Opcode for xcb_glx_query_context. */ +#define XCB_GLX_QUERY_CONTEXT 25 + +/** + * @brief xcb_glx_query_context_request_t + **/ +typedef struct xcb_glx_query_context_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_glx_context_t context; +} xcb_glx_query_context_request_t; + +/** + * @brief xcb_glx_query_context_reply_t + **/ +typedef struct xcb_glx_query_context_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint32_t num_attribs; + uint8_t pad1[20]; +} xcb_glx_query_context_reply_t; + +/** + * @brief xcb_glx_make_context_current_cookie_t + **/ +typedef struct xcb_glx_make_context_current_cookie_t { + unsigned int sequence; +} xcb_glx_make_context_current_cookie_t; + +/** Opcode for xcb_glx_make_context_current. */ +#define XCB_GLX_MAKE_CONTEXT_CURRENT 26 + +/** + * @brief xcb_glx_make_context_current_request_t + **/ +typedef struct xcb_glx_make_context_current_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_glx_context_tag_t old_context_tag; + xcb_glx_drawable_t drawable; + xcb_glx_drawable_t read_drawable; + xcb_glx_context_t context; +} xcb_glx_make_context_current_request_t; + +/** + * @brief xcb_glx_make_context_current_reply_t + **/ +typedef struct xcb_glx_make_context_current_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + xcb_glx_context_tag_t context_tag; + uint8_t pad1[20]; +} xcb_glx_make_context_current_reply_t; + +/** Opcode for xcb_glx_create_pbuffer. */ +#define XCB_GLX_CREATE_PBUFFER 27 + +/** + * @brief xcb_glx_create_pbuffer_request_t + **/ +typedef struct xcb_glx_create_pbuffer_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + uint32_t screen; + xcb_glx_fbconfig_t fbconfig; + xcb_glx_pbuffer_t pbuffer; + uint32_t num_attribs; +} xcb_glx_create_pbuffer_request_t; + +/** Opcode for xcb_glx_destroy_pbuffer. */ +#define XCB_GLX_DESTROY_PBUFFER 28 + +/** + * @brief xcb_glx_destroy_pbuffer_request_t + **/ +typedef struct xcb_glx_destroy_pbuffer_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_glx_pbuffer_t pbuffer; +} xcb_glx_destroy_pbuffer_request_t; + +/** + * @brief xcb_glx_get_drawable_attributes_cookie_t + **/ +typedef struct xcb_glx_get_drawable_attributes_cookie_t { + unsigned int sequence; +} xcb_glx_get_drawable_attributes_cookie_t; + +/** Opcode for xcb_glx_get_drawable_attributes. */ +#define XCB_GLX_GET_DRAWABLE_ATTRIBUTES 29 + +/** + * @brief xcb_glx_get_drawable_attributes_request_t + **/ +typedef struct xcb_glx_get_drawable_attributes_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_glx_drawable_t drawable; +} xcb_glx_get_drawable_attributes_request_t; + +/** + * @brief xcb_glx_get_drawable_attributes_reply_t + **/ +typedef struct xcb_glx_get_drawable_attributes_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint32_t num_attribs; + uint8_t pad1[20]; +} xcb_glx_get_drawable_attributes_reply_t; + +/** Opcode for xcb_glx_change_drawable_attributes. */ +#define XCB_GLX_CHANGE_DRAWABLE_ATTRIBUTES 30 + +/** + * @brief xcb_glx_change_drawable_attributes_request_t + **/ +typedef struct xcb_glx_change_drawable_attributes_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_glx_drawable_t drawable; + uint32_t num_attribs; +} xcb_glx_change_drawable_attributes_request_t; + +/** Opcode for xcb_glx_create_window. */ +#define XCB_GLX_CREATE_WINDOW 31 + +/** + * @brief xcb_glx_create_window_request_t + **/ +typedef struct xcb_glx_create_window_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + uint32_t screen; + xcb_glx_fbconfig_t fbconfig; + xcb_window_t window; + xcb_glx_window_t glx_window; + uint32_t num_attribs; +} xcb_glx_create_window_request_t; + +/** Opcode for xcb_glx_delete_window. */ +#define XCB_GLX_DELETE_WINDOW 32 + +/** + * @brief xcb_glx_delete_window_request_t + **/ +typedef struct xcb_glx_delete_window_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_glx_window_t glxwindow; +} xcb_glx_delete_window_request_t; + +/** Opcode for xcb_glx_set_client_info_arb. */ +#define XCB_GLX_SET_CLIENT_INFO_ARB 33 + +/** + * @brief xcb_glx_set_client_info_arb_request_t + **/ +typedef struct xcb_glx_set_client_info_arb_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + uint32_t major_version; + uint32_t minor_version; + uint32_t num_versions; + uint32_t gl_str_len; + uint32_t glx_str_len; +} xcb_glx_set_client_info_arb_request_t; + +/** Opcode for xcb_glx_create_context_attribs_arb. */ +#define XCB_GLX_CREATE_CONTEXT_ATTRIBS_ARB 34 + +/** + * @brief xcb_glx_create_context_attribs_arb_request_t + **/ +typedef struct xcb_glx_create_context_attribs_arb_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_glx_context_t context; + xcb_glx_fbconfig_t fbconfig; + uint32_t screen; + xcb_glx_context_t share_list; + uint8_t is_direct; + uint8_t pad0[3]; + uint32_t num_attribs; +} xcb_glx_create_context_attribs_arb_request_t; + +/** Opcode for xcb_glx_set_client_info_2arb. */ +#define XCB_GLX_SET_CLIENT_INFO_2ARB 35 + +/** + * @brief xcb_glx_set_client_info_2arb_request_t + **/ +typedef struct xcb_glx_set_client_info_2arb_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + uint32_t major_version; + uint32_t minor_version; + uint32_t num_versions; + uint32_t gl_str_len; + uint32_t glx_str_len; +} xcb_glx_set_client_info_2arb_request_t; + +/** Opcode for xcb_glx_new_list. */ +#define XCB_GLX_NEW_LIST 101 + +/** + * @brief xcb_glx_new_list_request_t + **/ +typedef struct xcb_glx_new_list_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_glx_context_tag_t context_tag; + uint32_t list; + uint32_t mode; +} xcb_glx_new_list_request_t; + +/** Opcode for xcb_glx_end_list. */ +#define XCB_GLX_END_LIST 102 + +/** + * @brief xcb_glx_end_list_request_t + **/ +typedef struct xcb_glx_end_list_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_glx_context_tag_t context_tag; +} xcb_glx_end_list_request_t; + +/** Opcode for xcb_glx_delete_lists. */ +#define XCB_GLX_DELETE_LISTS 103 + +/** + * @brief xcb_glx_delete_lists_request_t + **/ +typedef struct xcb_glx_delete_lists_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_glx_context_tag_t context_tag; + uint32_t list; + int32_t range; +} xcb_glx_delete_lists_request_t; + +/** + * @brief xcb_glx_gen_lists_cookie_t + **/ +typedef struct xcb_glx_gen_lists_cookie_t { + unsigned int sequence; +} xcb_glx_gen_lists_cookie_t; + +/** Opcode for xcb_glx_gen_lists. */ +#define XCB_GLX_GEN_LISTS 104 + +/** + * @brief xcb_glx_gen_lists_request_t + **/ +typedef struct xcb_glx_gen_lists_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_glx_context_tag_t context_tag; + int32_t range; +} xcb_glx_gen_lists_request_t; + +/** + * @brief xcb_glx_gen_lists_reply_t + **/ +typedef struct xcb_glx_gen_lists_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint32_t ret_val; +} xcb_glx_gen_lists_reply_t; + +/** Opcode for xcb_glx_feedback_buffer. */ +#define XCB_GLX_FEEDBACK_BUFFER 105 + +/** + * @brief xcb_glx_feedback_buffer_request_t + **/ +typedef struct xcb_glx_feedback_buffer_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_glx_context_tag_t context_tag; + int32_t size; + int32_t type; +} xcb_glx_feedback_buffer_request_t; + +/** Opcode for xcb_glx_select_buffer. */ +#define XCB_GLX_SELECT_BUFFER 106 + +/** + * @brief xcb_glx_select_buffer_request_t + **/ +typedef struct xcb_glx_select_buffer_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_glx_context_tag_t context_tag; + int32_t size; +} xcb_glx_select_buffer_request_t; + +/** + * @brief xcb_glx_render_mode_cookie_t + **/ +typedef struct xcb_glx_render_mode_cookie_t { + unsigned int sequence; +} xcb_glx_render_mode_cookie_t; + +/** Opcode for xcb_glx_render_mode. */ +#define XCB_GLX_RENDER_MODE 107 + +/** + * @brief xcb_glx_render_mode_request_t + **/ +typedef struct xcb_glx_render_mode_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_glx_context_tag_t context_tag; + uint32_t mode; +} xcb_glx_render_mode_request_t; + +/** + * @brief xcb_glx_render_mode_reply_t + **/ +typedef struct xcb_glx_render_mode_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint32_t ret_val; + uint32_t n; + uint32_t new_mode; + uint8_t pad1[12]; +} xcb_glx_render_mode_reply_t; + +typedef enum xcb_glx_rm_t { + XCB_GLX_RM_GL_RENDER = 7168, + XCB_GLX_RM_GL_FEEDBACK = 7169, + XCB_GLX_RM_GL_SELECT = 7170 +} xcb_glx_rm_t; + +/** + * @brief xcb_glx_finish_cookie_t + **/ +typedef struct xcb_glx_finish_cookie_t { + unsigned int sequence; +} xcb_glx_finish_cookie_t; + +/** Opcode for xcb_glx_finish. */ +#define XCB_GLX_FINISH 108 + +/** + * @brief xcb_glx_finish_request_t + **/ +typedef struct xcb_glx_finish_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_glx_context_tag_t context_tag; +} xcb_glx_finish_request_t; + +/** + * @brief xcb_glx_finish_reply_t + **/ +typedef struct xcb_glx_finish_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; +} xcb_glx_finish_reply_t; + +/** Opcode for xcb_glx_pixel_storef. */ +#define XCB_GLX_PIXEL_STOREF 109 + +/** + * @brief xcb_glx_pixel_storef_request_t + **/ +typedef struct xcb_glx_pixel_storef_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_glx_context_tag_t context_tag; + uint32_t pname; + xcb_glx_float32_t datum; +} xcb_glx_pixel_storef_request_t; + +/** Opcode for xcb_glx_pixel_storei. */ +#define XCB_GLX_PIXEL_STOREI 110 + +/** + * @brief xcb_glx_pixel_storei_request_t + **/ +typedef struct xcb_glx_pixel_storei_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_glx_context_tag_t context_tag; + uint32_t pname; + int32_t datum; +} xcb_glx_pixel_storei_request_t; + +/** + * @brief xcb_glx_read_pixels_cookie_t + **/ +typedef struct xcb_glx_read_pixels_cookie_t { + unsigned int sequence; +} xcb_glx_read_pixels_cookie_t; + +/** Opcode for xcb_glx_read_pixels. */ +#define XCB_GLX_READ_PIXELS 111 + +/** + * @brief xcb_glx_read_pixels_request_t + **/ +typedef struct xcb_glx_read_pixels_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_glx_context_tag_t context_tag; + int32_t x; + int32_t y; + int32_t width; + int32_t height; + uint32_t format; + uint32_t type; + uint8_t swap_bytes; + uint8_t lsb_first; +} xcb_glx_read_pixels_request_t; + +/** + * @brief xcb_glx_read_pixels_reply_t + **/ +typedef struct xcb_glx_read_pixels_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint8_t pad1[24]; +} xcb_glx_read_pixels_reply_t; + +/** + * @brief xcb_glx_get_booleanv_cookie_t + **/ +typedef struct xcb_glx_get_booleanv_cookie_t { + unsigned int sequence; +} xcb_glx_get_booleanv_cookie_t; + +/** Opcode for xcb_glx_get_booleanv. */ +#define XCB_GLX_GET_BOOLEANV 112 + +/** + * @brief xcb_glx_get_booleanv_request_t + **/ +typedef struct xcb_glx_get_booleanv_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_glx_context_tag_t context_tag; + int32_t pname; +} xcb_glx_get_booleanv_request_t; + +/** + * @brief xcb_glx_get_booleanv_reply_t + **/ +typedef struct xcb_glx_get_booleanv_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint8_t pad1[4]; + uint32_t n; + uint8_t datum; + uint8_t pad2[15]; +} xcb_glx_get_booleanv_reply_t; + +/** + * @brief xcb_glx_get_clip_plane_cookie_t + **/ +typedef struct xcb_glx_get_clip_plane_cookie_t { + unsigned int sequence; +} xcb_glx_get_clip_plane_cookie_t; + +/** Opcode for xcb_glx_get_clip_plane. */ +#define XCB_GLX_GET_CLIP_PLANE 113 + +/** + * @brief xcb_glx_get_clip_plane_request_t + **/ +typedef struct xcb_glx_get_clip_plane_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_glx_context_tag_t context_tag; + int32_t plane; +} xcb_glx_get_clip_plane_request_t; + +/** + * @brief xcb_glx_get_clip_plane_reply_t + **/ +typedef struct xcb_glx_get_clip_plane_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint8_t pad1[24]; +} xcb_glx_get_clip_plane_reply_t; + +/** + * @brief xcb_glx_get_doublev_cookie_t + **/ +typedef struct xcb_glx_get_doublev_cookie_t { + unsigned int sequence; +} xcb_glx_get_doublev_cookie_t; + +/** Opcode for xcb_glx_get_doublev. */ +#define XCB_GLX_GET_DOUBLEV 114 + +/** + * @brief xcb_glx_get_doublev_request_t + **/ +typedef struct xcb_glx_get_doublev_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_glx_context_tag_t context_tag; + uint32_t pname; +} xcb_glx_get_doublev_request_t; + +/** + * @brief xcb_glx_get_doublev_reply_t + **/ +typedef struct xcb_glx_get_doublev_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint8_t pad1[4]; + uint32_t n; + xcb_glx_float64_t datum; + uint8_t pad2[8]; +} xcb_glx_get_doublev_reply_t; + +/** + * @brief xcb_glx_get_error_cookie_t + **/ +typedef struct xcb_glx_get_error_cookie_t { + unsigned int sequence; +} xcb_glx_get_error_cookie_t; + +/** Opcode for xcb_glx_get_error. */ +#define XCB_GLX_GET_ERROR 115 + +/** + * @brief xcb_glx_get_error_request_t + **/ +typedef struct xcb_glx_get_error_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_glx_context_tag_t context_tag; +} xcb_glx_get_error_request_t; + +/** + * @brief xcb_glx_get_error_reply_t + **/ +typedef struct xcb_glx_get_error_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + int32_t error; +} xcb_glx_get_error_reply_t; + +/** + * @brief xcb_glx_get_floatv_cookie_t + **/ +typedef struct xcb_glx_get_floatv_cookie_t { + unsigned int sequence; +} xcb_glx_get_floatv_cookie_t; + +/** Opcode for xcb_glx_get_floatv. */ +#define XCB_GLX_GET_FLOATV 116 + +/** + * @brief xcb_glx_get_floatv_request_t + **/ +typedef struct xcb_glx_get_floatv_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_glx_context_tag_t context_tag; + uint32_t pname; +} xcb_glx_get_floatv_request_t; + +/** + * @brief xcb_glx_get_floatv_reply_t + **/ +typedef struct xcb_glx_get_floatv_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint8_t pad1[4]; + uint32_t n; + xcb_glx_float32_t datum; + uint8_t pad2[12]; +} xcb_glx_get_floatv_reply_t; + +/** + * @brief xcb_glx_get_integerv_cookie_t + **/ +typedef struct xcb_glx_get_integerv_cookie_t { + unsigned int sequence; +} xcb_glx_get_integerv_cookie_t; + +/** Opcode for xcb_glx_get_integerv. */ +#define XCB_GLX_GET_INTEGERV 117 + +/** + * @brief xcb_glx_get_integerv_request_t + **/ +typedef struct xcb_glx_get_integerv_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_glx_context_tag_t context_tag; + uint32_t pname; +} xcb_glx_get_integerv_request_t; + +/** + * @brief xcb_glx_get_integerv_reply_t + **/ +typedef struct xcb_glx_get_integerv_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint8_t pad1[4]; + uint32_t n; + int32_t datum; + uint8_t pad2[12]; +} xcb_glx_get_integerv_reply_t; + +/** + * @brief xcb_glx_get_lightfv_cookie_t + **/ +typedef struct xcb_glx_get_lightfv_cookie_t { + unsigned int sequence; +} xcb_glx_get_lightfv_cookie_t; + +/** Opcode for xcb_glx_get_lightfv. */ +#define XCB_GLX_GET_LIGHTFV 118 + +/** + * @brief xcb_glx_get_lightfv_request_t + **/ +typedef struct xcb_glx_get_lightfv_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_glx_context_tag_t context_tag; + uint32_t light; + uint32_t pname; +} xcb_glx_get_lightfv_request_t; + +/** + * @brief xcb_glx_get_lightfv_reply_t + **/ +typedef struct xcb_glx_get_lightfv_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint8_t pad1[4]; + uint32_t n; + xcb_glx_float32_t datum; + uint8_t pad2[12]; +} xcb_glx_get_lightfv_reply_t; + +/** + * @brief xcb_glx_get_lightiv_cookie_t + **/ +typedef struct xcb_glx_get_lightiv_cookie_t { + unsigned int sequence; +} xcb_glx_get_lightiv_cookie_t; + +/** Opcode for xcb_glx_get_lightiv. */ +#define XCB_GLX_GET_LIGHTIV 119 + +/** + * @brief xcb_glx_get_lightiv_request_t + **/ +typedef struct xcb_glx_get_lightiv_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_glx_context_tag_t context_tag; + uint32_t light; + uint32_t pname; +} xcb_glx_get_lightiv_request_t; + +/** + * @brief xcb_glx_get_lightiv_reply_t + **/ +typedef struct xcb_glx_get_lightiv_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint8_t pad1[4]; + uint32_t n; + int32_t datum; + uint8_t pad2[12]; +} xcb_glx_get_lightiv_reply_t; + +/** + * @brief xcb_glx_get_mapdv_cookie_t + **/ +typedef struct xcb_glx_get_mapdv_cookie_t { + unsigned int sequence; +} xcb_glx_get_mapdv_cookie_t; + +/** Opcode for xcb_glx_get_mapdv. */ +#define XCB_GLX_GET_MAPDV 120 + +/** + * @brief xcb_glx_get_mapdv_request_t + **/ +typedef struct xcb_glx_get_mapdv_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_glx_context_tag_t context_tag; + uint32_t target; + uint32_t query; +} xcb_glx_get_mapdv_request_t; + +/** + * @brief xcb_glx_get_mapdv_reply_t + **/ +typedef struct xcb_glx_get_mapdv_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint8_t pad1[4]; + uint32_t n; + xcb_glx_float64_t datum; + uint8_t pad2[8]; +} xcb_glx_get_mapdv_reply_t; + +/** + * @brief xcb_glx_get_mapfv_cookie_t + **/ +typedef struct xcb_glx_get_mapfv_cookie_t { + unsigned int sequence; +} xcb_glx_get_mapfv_cookie_t; + +/** Opcode for xcb_glx_get_mapfv. */ +#define XCB_GLX_GET_MAPFV 121 + +/** + * @brief xcb_glx_get_mapfv_request_t + **/ +typedef struct xcb_glx_get_mapfv_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_glx_context_tag_t context_tag; + uint32_t target; + uint32_t query; +} xcb_glx_get_mapfv_request_t; + +/** + * @brief xcb_glx_get_mapfv_reply_t + **/ +typedef struct xcb_glx_get_mapfv_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint8_t pad1[4]; + uint32_t n; + xcb_glx_float32_t datum; + uint8_t pad2[12]; +} xcb_glx_get_mapfv_reply_t; + +/** + * @brief xcb_glx_get_mapiv_cookie_t + **/ +typedef struct xcb_glx_get_mapiv_cookie_t { + unsigned int sequence; +} xcb_glx_get_mapiv_cookie_t; + +/** Opcode for xcb_glx_get_mapiv. */ +#define XCB_GLX_GET_MAPIV 122 + +/** + * @brief xcb_glx_get_mapiv_request_t + **/ +typedef struct xcb_glx_get_mapiv_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_glx_context_tag_t context_tag; + uint32_t target; + uint32_t query; +} xcb_glx_get_mapiv_request_t; + +/** + * @brief xcb_glx_get_mapiv_reply_t + **/ +typedef struct xcb_glx_get_mapiv_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint8_t pad1[4]; + uint32_t n; + int32_t datum; + uint8_t pad2[12]; +} xcb_glx_get_mapiv_reply_t; + +/** + * @brief xcb_glx_get_materialfv_cookie_t + **/ +typedef struct xcb_glx_get_materialfv_cookie_t { + unsigned int sequence; +} xcb_glx_get_materialfv_cookie_t; + +/** Opcode for xcb_glx_get_materialfv. */ +#define XCB_GLX_GET_MATERIALFV 123 + +/** + * @brief xcb_glx_get_materialfv_request_t + **/ +typedef struct xcb_glx_get_materialfv_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_glx_context_tag_t context_tag; + uint32_t face; + uint32_t pname; +} xcb_glx_get_materialfv_request_t; + +/** + * @brief xcb_glx_get_materialfv_reply_t + **/ +typedef struct xcb_glx_get_materialfv_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint8_t pad1[4]; + uint32_t n; + xcb_glx_float32_t datum; + uint8_t pad2[12]; +} xcb_glx_get_materialfv_reply_t; + +/** + * @brief xcb_glx_get_materialiv_cookie_t + **/ +typedef struct xcb_glx_get_materialiv_cookie_t { + unsigned int sequence; +} xcb_glx_get_materialiv_cookie_t; + +/** Opcode for xcb_glx_get_materialiv. */ +#define XCB_GLX_GET_MATERIALIV 124 + +/** + * @brief xcb_glx_get_materialiv_request_t + **/ +typedef struct xcb_glx_get_materialiv_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_glx_context_tag_t context_tag; + uint32_t face; + uint32_t pname; +} xcb_glx_get_materialiv_request_t; + +/** + * @brief xcb_glx_get_materialiv_reply_t + **/ +typedef struct xcb_glx_get_materialiv_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint8_t pad1[4]; + uint32_t n; + int32_t datum; + uint8_t pad2[12]; +} xcb_glx_get_materialiv_reply_t; + +/** + * @brief xcb_glx_get_pixel_mapfv_cookie_t + **/ +typedef struct xcb_glx_get_pixel_mapfv_cookie_t { + unsigned int sequence; +} xcb_glx_get_pixel_mapfv_cookie_t; + +/** Opcode for xcb_glx_get_pixel_mapfv. */ +#define XCB_GLX_GET_PIXEL_MAPFV 125 + +/** + * @brief xcb_glx_get_pixel_mapfv_request_t + **/ +typedef struct xcb_glx_get_pixel_mapfv_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_glx_context_tag_t context_tag; + uint32_t map; +} xcb_glx_get_pixel_mapfv_request_t; + +/** + * @brief xcb_glx_get_pixel_mapfv_reply_t + **/ +typedef struct xcb_glx_get_pixel_mapfv_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint8_t pad1[4]; + uint32_t n; + xcb_glx_float32_t datum; + uint8_t pad2[12]; +} xcb_glx_get_pixel_mapfv_reply_t; + +/** + * @brief xcb_glx_get_pixel_mapuiv_cookie_t + **/ +typedef struct xcb_glx_get_pixel_mapuiv_cookie_t { + unsigned int sequence; +} xcb_glx_get_pixel_mapuiv_cookie_t; + +/** Opcode for xcb_glx_get_pixel_mapuiv. */ +#define XCB_GLX_GET_PIXEL_MAPUIV 126 + +/** + * @brief xcb_glx_get_pixel_mapuiv_request_t + **/ +typedef struct xcb_glx_get_pixel_mapuiv_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_glx_context_tag_t context_tag; + uint32_t map; +} xcb_glx_get_pixel_mapuiv_request_t; + +/** + * @brief xcb_glx_get_pixel_mapuiv_reply_t + **/ +typedef struct xcb_glx_get_pixel_mapuiv_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint8_t pad1[4]; + uint32_t n; + uint32_t datum; + uint8_t pad2[12]; +} xcb_glx_get_pixel_mapuiv_reply_t; + +/** + * @brief xcb_glx_get_pixel_mapusv_cookie_t + **/ +typedef struct xcb_glx_get_pixel_mapusv_cookie_t { + unsigned int sequence; +} xcb_glx_get_pixel_mapusv_cookie_t; + +/** Opcode for xcb_glx_get_pixel_mapusv. */ +#define XCB_GLX_GET_PIXEL_MAPUSV 127 + +/** + * @brief xcb_glx_get_pixel_mapusv_request_t + **/ +typedef struct xcb_glx_get_pixel_mapusv_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_glx_context_tag_t context_tag; + uint32_t map; +} xcb_glx_get_pixel_mapusv_request_t; + +/** + * @brief xcb_glx_get_pixel_mapusv_reply_t + **/ +typedef struct xcb_glx_get_pixel_mapusv_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint8_t pad1[4]; + uint32_t n; + uint16_t datum; + uint8_t pad2[16]; +} xcb_glx_get_pixel_mapusv_reply_t; + +/** + * @brief xcb_glx_get_polygon_stipple_cookie_t + **/ +typedef struct xcb_glx_get_polygon_stipple_cookie_t { + unsigned int sequence; +} xcb_glx_get_polygon_stipple_cookie_t; + +/** Opcode for xcb_glx_get_polygon_stipple. */ +#define XCB_GLX_GET_POLYGON_STIPPLE 128 + +/** + * @brief xcb_glx_get_polygon_stipple_request_t + **/ +typedef struct xcb_glx_get_polygon_stipple_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_glx_context_tag_t context_tag; + uint8_t lsb_first; +} xcb_glx_get_polygon_stipple_request_t; + +/** + * @brief xcb_glx_get_polygon_stipple_reply_t + **/ +typedef struct xcb_glx_get_polygon_stipple_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint8_t pad1[24]; +} xcb_glx_get_polygon_stipple_reply_t; + +/** + * @brief xcb_glx_get_string_cookie_t + **/ +typedef struct xcb_glx_get_string_cookie_t { + unsigned int sequence; +} xcb_glx_get_string_cookie_t; + +/** Opcode for xcb_glx_get_string. */ +#define XCB_GLX_GET_STRING 129 + +/** + * @brief xcb_glx_get_string_request_t + **/ +typedef struct xcb_glx_get_string_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_glx_context_tag_t context_tag; + uint32_t name; +} xcb_glx_get_string_request_t; + +/** + * @brief xcb_glx_get_string_reply_t + **/ +typedef struct xcb_glx_get_string_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint8_t pad1[4]; + uint32_t n; + uint8_t pad2[16]; +} xcb_glx_get_string_reply_t; + +/** + * @brief xcb_glx_get_tex_envfv_cookie_t + **/ +typedef struct xcb_glx_get_tex_envfv_cookie_t { + unsigned int sequence; +} xcb_glx_get_tex_envfv_cookie_t; + +/** Opcode for xcb_glx_get_tex_envfv. */ +#define XCB_GLX_GET_TEX_ENVFV 130 + +/** + * @brief xcb_glx_get_tex_envfv_request_t + **/ +typedef struct xcb_glx_get_tex_envfv_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_glx_context_tag_t context_tag; + uint32_t target; + uint32_t pname; +} xcb_glx_get_tex_envfv_request_t; + +/** + * @brief xcb_glx_get_tex_envfv_reply_t + **/ +typedef struct xcb_glx_get_tex_envfv_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint8_t pad1[4]; + uint32_t n; + xcb_glx_float32_t datum; + uint8_t pad2[12]; +} xcb_glx_get_tex_envfv_reply_t; + +/** + * @brief xcb_glx_get_tex_enviv_cookie_t + **/ +typedef struct xcb_glx_get_tex_enviv_cookie_t { + unsigned int sequence; +} xcb_glx_get_tex_enviv_cookie_t; + +/** Opcode for xcb_glx_get_tex_enviv. */ +#define XCB_GLX_GET_TEX_ENVIV 131 + +/** + * @brief xcb_glx_get_tex_enviv_request_t + **/ +typedef struct xcb_glx_get_tex_enviv_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_glx_context_tag_t context_tag; + uint32_t target; + uint32_t pname; +} xcb_glx_get_tex_enviv_request_t; + +/** + * @brief xcb_glx_get_tex_enviv_reply_t + **/ +typedef struct xcb_glx_get_tex_enviv_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint8_t pad1[4]; + uint32_t n; + int32_t datum; + uint8_t pad2[12]; +} xcb_glx_get_tex_enviv_reply_t; + +/** + * @brief xcb_glx_get_tex_gendv_cookie_t + **/ +typedef struct xcb_glx_get_tex_gendv_cookie_t { + unsigned int sequence; +} xcb_glx_get_tex_gendv_cookie_t; + +/** Opcode for xcb_glx_get_tex_gendv. */ +#define XCB_GLX_GET_TEX_GENDV 132 + +/** + * @brief xcb_glx_get_tex_gendv_request_t + **/ +typedef struct xcb_glx_get_tex_gendv_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_glx_context_tag_t context_tag; + uint32_t coord; + uint32_t pname; +} xcb_glx_get_tex_gendv_request_t; + +/** + * @brief xcb_glx_get_tex_gendv_reply_t + **/ +typedef struct xcb_glx_get_tex_gendv_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint8_t pad1[4]; + uint32_t n; + xcb_glx_float64_t datum; + uint8_t pad2[8]; +} xcb_glx_get_tex_gendv_reply_t; + +/** + * @brief xcb_glx_get_tex_genfv_cookie_t + **/ +typedef struct xcb_glx_get_tex_genfv_cookie_t { + unsigned int sequence; +} xcb_glx_get_tex_genfv_cookie_t; + +/** Opcode for xcb_glx_get_tex_genfv. */ +#define XCB_GLX_GET_TEX_GENFV 133 + +/** + * @brief xcb_glx_get_tex_genfv_request_t + **/ +typedef struct xcb_glx_get_tex_genfv_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_glx_context_tag_t context_tag; + uint32_t coord; + uint32_t pname; +} xcb_glx_get_tex_genfv_request_t; + +/** + * @brief xcb_glx_get_tex_genfv_reply_t + **/ +typedef struct xcb_glx_get_tex_genfv_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint8_t pad1[4]; + uint32_t n; + xcb_glx_float32_t datum; + uint8_t pad2[12]; +} xcb_glx_get_tex_genfv_reply_t; + +/** + * @brief xcb_glx_get_tex_geniv_cookie_t + **/ +typedef struct xcb_glx_get_tex_geniv_cookie_t { + unsigned int sequence; +} xcb_glx_get_tex_geniv_cookie_t; + +/** Opcode for xcb_glx_get_tex_geniv. */ +#define XCB_GLX_GET_TEX_GENIV 134 + +/** + * @brief xcb_glx_get_tex_geniv_request_t + **/ +typedef struct xcb_glx_get_tex_geniv_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_glx_context_tag_t context_tag; + uint32_t coord; + uint32_t pname; +} xcb_glx_get_tex_geniv_request_t; + +/** + * @brief xcb_glx_get_tex_geniv_reply_t + **/ +typedef struct xcb_glx_get_tex_geniv_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint8_t pad1[4]; + uint32_t n; + int32_t datum; + uint8_t pad2[12]; +} xcb_glx_get_tex_geniv_reply_t; + +/** + * @brief xcb_glx_get_tex_image_cookie_t + **/ +typedef struct xcb_glx_get_tex_image_cookie_t { + unsigned int sequence; +} xcb_glx_get_tex_image_cookie_t; + +/** Opcode for xcb_glx_get_tex_image. */ +#define XCB_GLX_GET_TEX_IMAGE 135 + +/** + * @brief xcb_glx_get_tex_image_request_t + **/ +typedef struct xcb_glx_get_tex_image_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_glx_context_tag_t context_tag; + uint32_t target; + int32_t level; + uint32_t format; + uint32_t type; + uint8_t swap_bytes; +} xcb_glx_get_tex_image_request_t; + +/** + * @brief xcb_glx_get_tex_image_reply_t + **/ +typedef struct xcb_glx_get_tex_image_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint8_t pad1[8]; + int32_t width; + int32_t height; + int32_t depth; + uint8_t pad2[4]; +} xcb_glx_get_tex_image_reply_t; + +/** + * @brief xcb_glx_get_tex_parameterfv_cookie_t + **/ +typedef struct xcb_glx_get_tex_parameterfv_cookie_t { + unsigned int sequence; +} xcb_glx_get_tex_parameterfv_cookie_t; + +/** Opcode for xcb_glx_get_tex_parameterfv. */ +#define XCB_GLX_GET_TEX_PARAMETERFV 136 + +/** + * @brief xcb_glx_get_tex_parameterfv_request_t + **/ +typedef struct xcb_glx_get_tex_parameterfv_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_glx_context_tag_t context_tag; + uint32_t target; + uint32_t pname; +} xcb_glx_get_tex_parameterfv_request_t; + +/** + * @brief xcb_glx_get_tex_parameterfv_reply_t + **/ +typedef struct xcb_glx_get_tex_parameterfv_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint8_t pad1[4]; + uint32_t n; + xcb_glx_float32_t datum; + uint8_t pad2[12]; +} xcb_glx_get_tex_parameterfv_reply_t; + +/** + * @brief xcb_glx_get_tex_parameteriv_cookie_t + **/ +typedef struct xcb_glx_get_tex_parameteriv_cookie_t { + unsigned int sequence; +} xcb_glx_get_tex_parameteriv_cookie_t; + +/** Opcode for xcb_glx_get_tex_parameteriv. */ +#define XCB_GLX_GET_TEX_PARAMETERIV 137 + +/** + * @brief xcb_glx_get_tex_parameteriv_request_t + **/ +typedef struct xcb_glx_get_tex_parameteriv_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_glx_context_tag_t context_tag; + uint32_t target; + uint32_t pname; +} xcb_glx_get_tex_parameteriv_request_t; + +/** + * @brief xcb_glx_get_tex_parameteriv_reply_t + **/ +typedef struct xcb_glx_get_tex_parameteriv_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint8_t pad1[4]; + uint32_t n; + int32_t datum; + uint8_t pad2[12]; +} xcb_glx_get_tex_parameteriv_reply_t; + +/** + * @brief xcb_glx_get_tex_level_parameterfv_cookie_t + **/ +typedef struct xcb_glx_get_tex_level_parameterfv_cookie_t { + unsigned int sequence; +} xcb_glx_get_tex_level_parameterfv_cookie_t; + +/** Opcode for xcb_glx_get_tex_level_parameterfv. */ +#define XCB_GLX_GET_TEX_LEVEL_PARAMETERFV 138 + +/** + * @brief xcb_glx_get_tex_level_parameterfv_request_t + **/ +typedef struct xcb_glx_get_tex_level_parameterfv_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_glx_context_tag_t context_tag; + uint32_t target; + int32_t level; + uint32_t pname; +} xcb_glx_get_tex_level_parameterfv_request_t; + +/** + * @brief xcb_glx_get_tex_level_parameterfv_reply_t + **/ +typedef struct xcb_glx_get_tex_level_parameterfv_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint8_t pad1[4]; + uint32_t n; + xcb_glx_float32_t datum; + uint8_t pad2[12]; +} xcb_glx_get_tex_level_parameterfv_reply_t; + +/** + * @brief xcb_glx_get_tex_level_parameteriv_cookie_t + **/ +typedef struct xcb_glx_get_tex_level_parameteriv_cookie_t { + unsigned int sequence; +} xcb_glx_get_tex_level_parameteriv_cookie_t; + +/** Opcode for xcb_glx_get_tex_level_parameteriv. */ +#define XCB_GLX_GET_TEX_LEVEL_PARAMETERIV 139 + +/** + * @brief xcb_glx_get_tex_level_parameteriv_request_t + **/ +typedef struct xcb_glx_get_tex_level_parameteriv_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_glx_context_tag_t context_tag; + uint32_t target; + int32_t level; + uint32_t pname; +} xcb_glx_get_tex_level_parameteriv_request_t; + +/** + * @brief xcb_glx_get_tex_level_parameteriv_reply_t + **/ +typedef struct xcb_glx_get_tex_level_parameteriv_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint8_t pad1[4]; + uint32_t n; + int32_t datum; + uint8_t pad2[12]; +} xcb_glx_get_tex_level_parameteriv_reply_t; + +/** + * @brief xcb_glx_is_enabled_cookie_t + **/ +typedef struct xcb_glx_is_enabled_cookie_t { + unsigned int sequence; +} xcb_glx_is_enabled_cookie_t; + +/** Opcode for xcb_glx_is_enabled. */ +#define XCB_GLX_IS_ENABLED 140 + +/** + * @brief xcb_glx_is_enabled_request_t + **/ +typedef struct xcb_glx_is_enabled_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_glx_context_tag_t context_tag; + uint32_t capability; +} xcb_glx_is_enabled_request_t; + +/** + * @brief xcb_glx_is_enabled_reply_t + **/ +typedef struct xcb_glx_is_enabled_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + xcb_glx_bool32_t ret_val; +} xcb_glx_is_enabled_reply_t; + +/** + * @brief xcb_glx_is_list_cookie_t + **/ +typedef struct xcb_glx_is_list_cookie_t { + unsigned int sequence; +} xcb_glx_is_list_cookie_t; + +/** Opcode for xcb_glx_is_list. */ +#define XCB_GLX_IS_LIST 141 + +/** + * @brief xcb_glx_is_list_request_t + **/ +typedef struct xcb_glx_is_list_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_glx_context_tag_t context_tag; + uint32_t list; +} xcb_glx_is_list_request_t; + +/** + * @brief xcb_glx_is_list_reply_t + **/ +typedef struct xcb_glx_is_list_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + xcb_glx_bool32_t ret_val; +} xcb_glx_is_list_reply_t; + +/** Opcode for xcb_glx_flush. */ +#define XCB_GLX_FLUSH 142 + +/** + * @brief xcb_glx_flush_request_t + **/ +typedef struct xcb_glx_flush_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_glx_context_tag_t context_tag; +} xcb_glx_flush_request_t; + +/** + * @brief xcb_glx_are_textures_resident_cookie_t + **/ +typedef struct xcb_glx_are_textures_resident_cookie_t { + unsigned int sequence; +} xcb_glx_are_textures_resident_cookie_t; + +/** Opcode for xcb_glx_are_textures_resident. */ +#define XCB_GLX_ARE_TEXTURES_RESIDENT 143 + +/** + * @brief xcb_glx_are_textures_resident_request_t + **/ +typedef struct xcb_glx_are_textures_resident_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_glx_context_tag_t context_tag; + int32_t n; +} xcb_glx_are_textures_resident_request_t; + +/** + * @brief xcb_glx_are_textures_resident_reply_t + **/ +typedef struct xcb_glx_are_textures_resident_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + xcb_glx_bool32_t ret_val; + uint8_t pad1[20]; +} xcb_glx_are_textures_resident_reply_t; + +/** Opcode for xcb_glx_delete_textures. */ +#define XCB_GLX_DELETE_TEXTURES 144 + +/** + * @brief xcb_glx_delete_textures_request_t + **/ +typedef struct xcb_glx_delete_textures_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_glx_context_tag_t context_tag; + int32_t n; +} xcb_glx_delete_textures_request_t; + +/** + * @brief xcb_glx_gen_textures_cookie_t + **/ +typedef struct xcb_glx_gen_textures_cookie_t { + unsigned int sequence; +} xcb_glx_gen_textures_cookie_t; + +/** Opcode for xcb_glx_gen_textures. */ +#define XCB_GLX_GEN_TEXTURES 145 + +/** + * @brief xcb_glx_gen_textures_request_t + **/ +typedef struct xcb_glx_gen_textures_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_glx_context_tag_t context_tag; + int32_t n; +} xcb_glx_gen_textures_request_t; + +/** + * @brief xcb_glx_gen_textures_reply_t + **/ +typedef struct xcb_glx_gen_textures_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint8_t pad1[24]; +} xcb_glx_gen_textures_reply_t; + +/** + * @brief xcb_glx_is_texture_cookie_t + **/ +typedef struct xcb_glx_is_texture_cookie_t { + unsigned int sequence; +} xcb_glx_is_texture_cookie_t; + +/** Opcode for xcb_glx_is_texture. */ +#define XCB_GLX_IS_TEXTURE 146 + +/** + * @brief xcb_glx_is_texture_request_t + **/ +typedef struct xcb_glx_is_texture_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_glx_context_tag_t context_tag; + uint32_t texture; +} xcb_glx_is_texture_request_t; + +/** + * @brief xcb_glx_is_texture_reply_t + **/ +typedef struct xcb_glx_is_texture_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + xcb_glx_bool32_t ret_val; +} xcb_glx_is_texture_reply_t; + +/** + * @brief xcb_glx_get_color_table_cookie_t + **/ +typedef struct xcb_glx_get_color_table_cookie_t { + unsigned int sequence; +} xcb_glx_get_color_table_cookie_t; + +/** Opcode for xcb_glx_get_color_table. */ +#define XCB_GLX_GET_COLOR_TABLE 147 + +/** + * @brief xcb_glx_get_color_table_request_t + **/ +typedef struct xcb_glx_get_color_table_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_glx_context_tag_t context_tag; + uint32_t target; + uint32_t format; + uint32_t type; + uint8_t swap_bytes; +} xcb_glx_get_color_table_request_t; + +/** + * @brief xcb_glx_get_color_table_reply_t + **/ +typedef struct xcb_glx_get_color_table_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint8_t pad1[8]; + int32_t width; + uint8_t pad2[12]; +} xcb_glx_get_color_table_reply_t; + +/** + * @brief xcb_glx_get_color_table_parameterfv_cookie_t + **/ +typedef struct xcb_glx_get_color_table_parameterfv_cookie_t { + unsigned int sequence; +} xcb_glx_get_color_table_parameterfv_cookie_t; + +/** Opcode for xcb_glx_get_color_table_parameterfv. */ +#define XCB_GLX_GET_COLOR_TABLE_PARAMETERFV 148 + +/** + * @brief xcb_glx_get_color_table_parameterfv_request_t + **/ +typedef struct xcb_glx_get_color_table_parameterfv_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_glx_context_tag_t context_tag; + uint32_t target; + uint32_t pname; +} xcb_glx_get_color_table_parameterfv_request_t; + +/** + * @brief xcb_glx_get_color_table_parameterfv_reply_t + **/ +typedef struct xcb_glx_get_color_table_parameterfv_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint8_t pad1[4]; + uint32_t n; + xcb_glx_float32_t datum; + uint8_t pad2[12]; +} xcb_glx_get_color_table_parameterfv_reply_t; + +/** + * @brief xcb_glx_get_color_table_parameteriv_cookie_t + **/ +typedef struct xcb_glx_get_color_table_parameteriv_cookie_t { + unsigned int sequence; +} xcb_glx_get_color_table_parameteriv_cookie_t; + +/** Opcode for xcb_glx_get_color_table_parameteriv. */ +#define XCB_GLX_GET_COLOR_TABLE_PARAMETERIV 149 + +/** + * @brief xcb_glx_get_color_table_parameteriv_request_t + **/ +typedef struct xcb_glx_get_color_table_parameteriv_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_glx_context_tag_t context_tag; + uint32_t target; + uint32_t pname; +} xcb_glx_get_color_table_parameteriv_request_t; + +/** + * @brief xcb_glx_get_color_table_parameteriv_reply_t + **/ +typedef struct xcb_glx_get_color_table_parameteriv_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint8_t pad1[4]; + uint32_t n; + int32_t datum; + uint8_t pad2[12]; +} xcb_glx_get_color_table_parameteriv_reply_t; + +/** + * @brief xcb_glx_get_convolution_filter_cookie_t + **/ +typedef struct xcb_glx_get_convolution_filter_cookie_t { + unsigned int sequence; +} xcb_glx_get_convolution_filter_cookie_t; + +/** Opcode for xcb_glx_get_convolution_filter. */ +#define XCB_GLX_GET_CONVOLUTION_FILTER 150 + +/** + * @brief xcb_glx_get_convolution_filter_request_t + **/ +typedef struct xcb_glx_get_convolution_filter_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_glx_context_tag_t context_tag; + uint32_t target; + uint32_t format; + uint32_t type; + uint8_t swap_bytes; +} xcb_glx_get_convolution_filter_request_t; + +/** + * @brief xcb_glx_get_convolution_filter_reply_t + **/ +typedef struct xcb_glx_get_convolution_filter_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint8_t pad1[8]; + int32_t width; + int32_t height; + uint8_t pad2[8]; +} xcb_glx_get_convolution_filter_reply_t; + +/** + * @brief xcb_glx_get_convolution_parameterfv_cookie_t + **/ +typedef struct xcb_glx_get_convolution_parameterfv_cookie_t { + unsigned int sequence; +} xcb_glx_get_convolution_parameterfv_cookie_t; + +/** Opcode for xcb_glx_get_convolution_parameterfv. */ +#define XCB_GLX_GET_CONVOLUTION_PARAMETERFV 151 + +/** + * @brief xcb_glx_get_convolution_parameterfv_request_t + **/ +typedef struct xcb_glx_get_convolution_parameterfv_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_glx_context_tag_t context_tag; + uint32_t target; + uint32_t pname; +} xcb_glx_get_convolution_parameterfv_request_t; + +/** + * @brief xcb_glx_get_convolution_parameterfv_reply_t + **/ +typedef struct xcb_glx_get_convolution_parameterfv_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint8_t pad1[4]; + uint32_t n; + xcb_glx_float32_t datum; + uint8_t pad2[12]; +} xcb_glx_get_convolution_parameterfv_reply_t; + +/** + * @brief xcb_glx_get_convolution_parameteriv_cookie_t + **/ +typedef struct xcb_glx_get_convolution_parameteriv_cookie_t { + unsigned int sequence; +} xcb_glx_get_convolution_parameteriv_cookie_t; + +/** Opcode for xcb_glx_get_convolution_parameteriv. */ +#define XCB_GLX_GET_CONVOLUTION_PARAMETERIV 152 + +/** + * @brief xcb_glx_get_convolution_parameteriv_request_t + **/ +typedef struct xcb_glx_get_convolution_parameteriv_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_glx_context_tag_t context_tag; + uint32_t target; + uint32_t pname; +} xcb_glx_get_convolution_parameteriv_request_t; + +/** + * @brief xcb_glx_get_convolution_parameteriv_reply_t + **/ +typedef struct xcb_glx_get_convolution_parameteriv_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint8_t pad1[4]; + uint32_t n; + int32_t datum; + uint8_t pad2[12]; +} xcb_glx_get_convolution_parameteriv_reply_t; + +/** + * @brief xcb_glx_get_separable_filter_cookie_t + **/ +typedef struct xcb_glx_get_separable_filter_cookie_t { + unsigned int sequence; +} xcb_glx_get_separable_filter_cookie_t; + +/** Opcode for xcb_glx_get_separable_filter. */ +#define XCB_GLX_GET_SEPARABLE_FILTER 153 + +/** + * @brief xcb_glx_get_separable_filter_request_t + **/ +typedef struct xcb_glx_get_separable_filter_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_glx_context_tag_t context_tag; + uint32_t target; + uint32_t format; + uint32_t type; + uint8_t swap_bytes; +} xcb_glx_get_separable_filter_request_t; + +/** + * @brief xcb_glx_get_separable_filter_reply_t + **/ +typedef struct xcb_glx_get_separable_filter_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint8_t pad1[8]; + int32_t row_w; + int32_t col_h; + uint8_t pad2[8]; +} xcb_glx_get_separable_filter_reply_t; + +/** + * @brief xcb_glx_get_histogram_cookie_t + **/ +typedef struct xcb_glx_get_histogram_cookie_t { + unsigned int sequence; +} xcb_glx_get_histogram_cookie_t; + +/** Opcode for xcb_glx_get_histogram. */ +#define XCB_GLX_GET_HISTOGRAM 154 + +/** + * @brief xcb_glx_get_histogram_request_t + **/ +typedef struct xcb_glx_get_histogram_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_glx_context_tag_t context_tag; + uint32_t target; + uint32_t format; + uint32_t type; + uint8_t swap_bytes; + uint8_t reset; +} xcb_glx_get_histogram_request_t; + +/** + * @brief xcb_glx_get_histogram_reply_t + **/ +typedef struct xcb_glx_get_histogram_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint8_t pad1[8]; + int32_t width; + uint8_t pad2[12]; +} xcb_glx_get_histogram_reply_t; + +/** + * @brief xcb_glx_get_histogram_parameterfv_cookie_t + **/ +typedef struct xcb_glx_get_histogram_parameterfv_cookie_t { + unsigned int sequence; +} xcb_glx_get_histogram_parameterfv_cookie_t; + +/** Opcode for xcb_glx_get_histogram_parameterfv. */ +#define XCB_GLX_GET_HISTOGRAM_PARAMETERFV 155 + +/** + * @brief xcb_glx_get_histogram_parameterfv_request_t + **/ +typedef struct xcb_glx_get_histogram_parameterfv_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_glx_context_tag_t context_tag; + uint32_t target; + uint32_t pname; +} xcb_glx_get_histogram_parameterfv_request_t; + +/** + * @brief xcb_glx_get_histogram_parameterfv_reply_t + **/ +typedef struct xcb_glx_get_histogram_parameterfv_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint8_t pad1[4]; + uint32_t n; + xcb_glx_float32_t datum; + uint8_t pad2[12]; +} xcb_glx_get_histogram_parameterfv_reply_t; + +/** + * @brief xcb_glx_get_histogram_parameteriv_cookie_t + **/ +typedef struct xcb_glx_get_histogram_parameteriv_cookie_t { + unsigned int sequence; +} xcb_glx_get_histogram_parameteriv_cookie_t; + +/** Opcode for xcb_glx_get_histogram_parameteriv. */ +#define XCB_GLX_GET_HISTOGRAM_PARAMETERIV 156 + +/** + * @brief xcb_glx_get_histogram_parameteriv_request_t + **/ +typedef struct xcb_glx_get_histogram_parameteriv_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_glx_context_tag_t context_tag; + uint32_t target; + uint32_t pname; +} xcb_glx_get_histogram_parameteriv_request_t; + +/** + * @brief xcb_glx_get_histogram_parameteriv_reply_t + **/ +typedef struct xcb_glx_get_histogram_parameteriv_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint8_t pad1[4]; + uint32_t n; + int32_t datum; + uint8_t pad2[12]; +} xcb_glx_get_histogram_parameteriv_reply_t; + +/** + * @brief xcb_glx_get_minmax_cookie_t + **/ +typedef struct xcb_glx_get_minmax_cookie_t { + unsigned int sequence; +} xcb_glx_get_minmax_cookie_t; + +/** Opcode for xcb_glx_get_minmax. */ +#define XCB_GLX_GET_MINMAX 157 + +/** + * @brief xcb_glx_get_minmax_request_t + **/ +typedef struct xcb_glx_get_minmax_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_glx_context_tag_t context_tag; + uint32_t target; + uint32_t format; + uint32_t type; + uint8_t swap_bytes; + uint8_t reset; +} xcb_glx_get_minmax_request_t; + +/** + * @brief xcb_glx_get_minmax_reply_t + **/ +typedef struct xcb_glx_get_minmax_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint8_t pad1[24]; +} xcb_glx_get_minmax_reply_t; + +/** + * @brief xcb_glx_get_minmax_parameterfv_cookie_t + **/ +typedef struct xcb_glx_get_minmax_parameterfv_cookie_t { + unsigned int sequence; +} xcb_glx_get_minmax_parameterfv_cookie_t; + +/** Opcode for xcb_glx_get_minmax_parameterfv. */ +#define XCB_GLX_GET_MINMAX_PARAMETERFV 158 + +/** + * @brief xcb_glx_get_minmax_parameterfv_request_t + **/ +typedef struct xcb_glx_get_minmax_parameterfv_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_glx_context_tag_t context_tag; + uint32_t target; + uint32_t pname; +} xcb_glx_get_minmax_parameterfv_request_t; + +/** + * @brief xcb_glx_get_minmax_parameterfv_reply_t + **/ +typedef struct xcb_glx_get_minmax_parameterfv_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint8_t pad1[4]; + uint32_t n; + xcb_glx_float32_t datum; + uint8_t pad2[12]; +} xcb_glx_get_minmax_parameterfv_reply_t; + +/** + * @brief xcb_glx_get_minmax_parameteriv_cookie_t + **/ +typedef struct xcb_glx_get_minmax_parameteriv_cookie_t { + unsigned int sequence; +} xcb_glx_get_minmax_parameteriv_cookie_t; + +/** Opcode for xcb_glx_get_minmax_parameteriv. */ +#define XCB_GLX_GET_MINMAX_PARAMETERIV 159 + +/** + * @brief xcb_glx_get_minmax_parameteriv_request_t + **/ +typedef struct xcb_glx_get_minmax_parameteriv_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_glx_context_tag_t context_tag; + uint32_t target; + uint32_t pname; +} xcb_glx_get_minmax_parameteriv_request_t; + +/** + * @brief xcb_glx_get_minmax_parameteriv_reply_t + **/ +typedef struct xcb_glx_get_minmax_parameteriv_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint8_t pad1[4]; + uint32_t n; + int32_t datum; + uint8_t pad2[12]; +} xcb_glx_get_minmax_parameteriv_reply_t; + +/** + * @brief xcb_glx_get_compressed_tex_image_arb_cookie_t + **/ +typedef struct xcb_glx_get_compressed_tex_image_arb_cookie_t { + unsigned int sequence; +} xcb_glx_get_compressed_tex_image_arb_cookie_t; + +/** Opcode for xcb_glx_get_compressed_tex_image_arb. */ +#define XCB_GLX_GET_COMPRESSED_TEX_IMAGE_ARB 160 + +/** + * @brief xcb_glx_get_compressed_tex_image_arb_request_t + **/ +typedef struct xcb_glx_get_compressed_tex_image_arb_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_glx_context_tag_t context_tag; + uint32_t target; + int32_t level; +} xcb_glx_get_compressed_tex_image_arb_request_t; + +/** + * @brief xcb_glx_get_compressed_tex_image_arb_reply_t + **/ +typedef struct xcb_glx_get_compressed_tex_image_arb_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint8_t pad1[8]; + int32_t size; + uint8_t pad2[12]; +} xcb_glx_get_compressed_tex_image_arb_reply_t; + +/** Opcode for xcb_glx_delete_queries_arb. */ +#define XCB_GLX_DELETE_QUERIES_ARB 161 + +/** + * @brief xcb_glx_delete_queries_arb_request_t + **/ +typedef struct xcb_glx_delete_queries_arb_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_glx_context_tag_t context_tag; + int32_t n; +} xcb_glx_delete_queries_arb_request_t; + +/** + * @brief xcb_glx_gen_queries_arb_cookie_t + **/ +typedef struct xcb_glx_gen_queries_arb_cookie_t { + unsigned int sequence; +} xcb_glx_gen_queries_arb_cookie_t; + +/** Opcode for xcb_glx_gen_queries_arb. */ +#define XCB_GLX_GEN_QUERIES_ARB 162 + +/** + * @brief xcb_glx_gen_queries_arb_request_t + **/ +typedef struct xcb_glx_gen_queries_arb_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_glx_context_tag_t context_tag; + int32_t n; +} xcb_glx_gen_queries_arb_request_t; + +/** + * @brief xcb_glx_gen_queries_arb_reply_t + **/ +typedef struct xcb_glx_gen_queries_arb_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint8_t pad1[24]; +} xcb_glx_gen_queries_arb_reply_t; + +/** + * @brief xcb_glx_is_query_arb_cookie_t + **/ +typedef struct xcb_glx_is_query_arb_cookie_t { + unsigned int sequence; +} xcb_glx_is_query_arb_cookie_t; + +/** Opcode for xcb_glx_is_query_arb. */ +#define XCB_GLX_IS_QUERY_ARB 163 + +/** + * @brief xcb_glx_is_query_arb_request_t + **/ +typedef struct xcb_glx_is_query_arb_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_glx_context_tag_t context_tag; + uint32_t id; +} xcb_glx_is_query_arb_request_t; + +/** + * @brief xcb_glx_is_query_arb_reply_t + **/ +typedef struct xcb_glx_is_query_arb_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + xcb_glx_bool32_t ret_val; +} xcb_glx_is_query_arb_reply_t; + +/** + * @brief xcb_glx_get_queryiv_arb_cookie_t + **/ +typedef struct xcb_glx_get_queryiv_arb_cookie_t { + unsigned int sequence; +} xcb_glx_get_queryiv_arb_cookie_t; + +/** Opcode for xcb_glx_get_queryiv_arb. */ +#define XCB_GLX_GET_QUERYIV_ARB 164 + +/** + * @brief xcb_glx_get_queryiv_arb_request_t + **/ +typedef struct xcb_glx_get_queryiv_arb_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_glx_context_tag_t context_tag; + uint32_t target; + uint32_t pname; +} xcb_glx_get_queryiv_arb_request_t; + +/** + * @brief xcb_glx_get_queryiv_arb_reply_t + **/ +typedef struct xcb_glx_get_queryiv_arb_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint8_t pad1[4]; + uint32_t n; + int32_t datum; + uint8_t pad2[12]; +} xcb_glx_get_queryiv_arb_reply_t; + +/** + * @brief xcb_glx_get_query_objectiv_arb_cookie_t + **/ +typedef struct xcb_glx_get_query_objectiv_arb_cookie_t { + unsigned int sequence; +} xcb_glx_get_query_objectiv_arb_cookie_t; + +/** Opcode for xcb_glx_get_query_objectiv_arb. */ +#define XCB_GLX_GET_QUERY_OBJECTIV_ARB 165 + +/** + * @brief xcb_glx_get_query_objectiv_arb_request_t + **/ +typedef struct xcb_glx_get_query_objectiv_arb_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_glx_context_tag_t context_tag; + uint32_t id; + uint32_t pname; +} xcb_glx_get_query_objectiv_arb_request_t; + +/** + * @brief xcb_glx_get_query_objectiv_arb_reply_t + **/ +typedef struct xcb_glx_get_query_objectiv_arb_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint8_t pad1[4]; + uint32_t n; + int32_t datum; + uint8_t pad2[12]; +} xcb_glx_get_query_objectiv_arb_reply_t; + +/** + * @brief xcb_glx_get_query_objectuiv_arb_cookie_t + **/ +typedef struct xcb_glx_get_query_objectuiv_arb_cookie_t { + unsigned int sequence; +} xcb_glx_get_query_objectuiv_arb_cookie_t; + +/** Opcode for xcb_glx_get_query_objectuiv_arb. */ +#define XCB_GLX_GET_QUERY_OBJECTUIV_ARB 166 + +/** + * @brief xcb_glx_get_query_objectuiv_arb_request_t + **/ +typedef struct xcb_glx_get_query_objectuiv_arb_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_glx_context_tag_t context_tag; + uint32_t id; + uint32_t pname; +} xcb_glx_get_query_objectuiv_arb_request_t; + +/** + * @brief xcb_glx_get_query_objectuiv_arb_reply_t + **/ +typedef struct xcb_glx_get_query_objectuiv_arb_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint8_t pad1[4]; + uint32_t n; + uint32_t datum; + uint8_t pad2[12]; +} xcb_glx_get_query_objectuiv_arb_reply_t; + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_glx_pixmap_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_glx_pixmap_t) + */ +void +xcb_glx_pixmap_next (xcb_glx_pixmap_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_glx_pixmap_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_glx_pixmap_end (xcb_glx_pixmap_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_glx_context_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_glx_context_t) + */ +void +xcb_glx_context_next (xcb_glx_context_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_glx_context_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_glx_context_end (xcb_glx_context_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_glx_pbuffer_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_glx_pbuffer_t) + */ +void +xcb_glx_pbuffer_next (xcb_glx_pbuffer_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_glx_pbuffer_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_glx_pbuffer_end (xcb_glx_pbuffer_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_glx_window_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_glx_window_t) + */ +void +xcb_glx_window_next (xcb_glx_window_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_glx_window_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_glx_window_end (xcb_glx_window_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_glx_fbconfig_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_glx_fbconfig_t) + */ +void +xcb_glx_fbconfig_next (xcb_glx_fbconfig_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_glx_fbconfig_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_glx_fbconfig_end (xcb_glx_fbconfig_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_glx_drawable_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_glx_drawable_t) + */ +void +xcb_glx_drawable_next (xcb_glx_drawable_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_glx_drawable_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_glx_drawable_end (xcb_glx_drawable_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_glx_float32_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_glx_float32_t) + */ +void +xcb_glx_float32_next (xcb_glx_float32_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_glx_float32_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_glx_float32_end (xcb_glx_float32_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_glx_float64_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_glx_float64_t) + */ +void +xcb_glx_float64_next (xcb_glx_float64_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_glx_float64_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_glx_float64_end (xcb_glx_float64_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_glx_bool32_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_glx_bool32_t) + */ +void +xcb_glx_bool32_next (xcb_glx_bool32_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_glx_bool32_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_glx_bool32_end (xcb_glx_bool32_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_glx_context_tag_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_glx_context_tag_t) + */ +void +xcb_glx_context_tag_next (xcb_glx_context_tag_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_glx_context_tag_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_glx_context_tag_end (xcb_glx_context_tag_iterator_t i); + +int +xcb_glx_render_sizeof (const void *_buffer, + uint32_t data_len); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_glx_render_checked (xcb_connection_t *c, + xcb_glx_context_tag_t context_tag, + uint32_t data_len, + const uint8_t *data); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_glx_render (xcb_connection_t *c, + xcb_glx_context_tag_t context_tag, + uint32_t data_len, + const uint8_t *data); + +uint8_t * +xcb_glx_render_data (const xcb_glx_render_request_t *R); + +int +xcb_glx_render_data_length (const xcb_glx_render_request_t *R); + +xcb_generic_iterator_t +xcb_glx_render_data_end (const xcb_glx_render_request_t *R); + +int +xcb_glx_render_large_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_glx_render_large_checked (xcb_connection_t *c, + xcb_glx_context_tag_t context_tag, + uint16_t request_num, + uint16_t request_total, + uint32_t data_len, + const uint8_t *data); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_glx_render_large (xcb_connection_t *c, + xcb_glx_context_tag_t context_tag, + uint16_t request_num, + uint16_t request_total, + uint32_t data_len, + const uint8_t *data); + +uint8_t * +xcb_glx_render_large_data (const xcb_glx_render_large_request_t *R); + +int +xcb_glx_render_large_data_length (const xcb_glx_render_large_request_t *R); + +xcb_generic_iterator_t +xcb_glx_render_large_data_end (const xcb_glx_render_large_request_t *R); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_glx_create_context_checked (xcb_connection_t *c, + xcb_glx_context_t context, + xcb_visualid_t visual, + uint32_t screen, + xcb_glx_context_t share_list, + uint8_t is_direct); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_glx_create_context (xcb_connection_t *c, + xcb_glx_context_t context, + xcb_visualid_t visual, + uint32_t screen, + xcb_glx_context_t share_list, + uint8_t is_direct); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_glx_destroy_context_checked (xcb_connection_t *c, + xcb_glx_context_t context); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_glx_destroy_context (xcb_connection_t *c, + xcb_glx_context_t context); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_glx_make_current_cookie_t +xcb_glx_make_current (xcb_connection_t *c, + xcb_glx_drawable_t drawable, + xcb_glx_context_t context, + xcb_glx_context_tag_t old_context_tag); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_glx_make_current_cookie_t +xcb_glx_make_current_unchecked (xcb_connection_t *c, + xcb_glx_drawable_t drawable, + xcb_glx_context_t context, + xcb_glx_context_tag_t old_context_tag); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_glx_make_current_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_glx_make_current_reply_t * +xcb_glx_make_current_reply (xcb_connection_t *c, + xcb_glx_make_current_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_glx_is_direct_cookie_t +xcb_glx_is_direct (xcb_connection_t *c, + xcb_glx_context_t context); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_glx_is_direct_cookie_t +xcb_glx_is_direct_unchecked (xcb_connection_t *c, + xcb_glx_context_t context); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_glx_is_direct_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_glx_is_direct_reply_t * +xcb_glx_is_direct_reply (xcb_connection_t *c, + xcb_glx_is_direct_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_glx_query_version_cookie_t +xcb_glx_query_version (xcb_connection_t *c, + uint32_t major_version, + uint32_t minor_version); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_glx_query_version_cookie_t +xcb_glx_query_version_unchecked (xcb_connection_t *c, + uint32_t major_version, + uint32_t minor_version); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_glx_query_version_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_glx_query_version_reply_t * +xcb_glx_query_version_reply (xcb_connection_t *c, + xcb_glx_query_version_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_glx_wait_gl_checked (xcb_connection_t *c, + xcb_glx_context_tag_t context_tag); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_glx_wait_gl (xcb_connection_t *c, + xcb_glx_context_tag_t context_tag); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_glx_wait_x_checked (xcb_connection_t *c, + xcb_glx_context_tag_t context_tag); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_glx_wait_x (xcb_connection_t *c, + xcb_glx_context_tag_t context_tag); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_glx_copy_context_checked (xcb_connection_t *c, + xcb_glx_context_t src, + xcb_glx_context_t dest, + uint32_t mask, + xcb_glx_context_tag_t src_context_tag); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_glx_copy_context (xcb_connection_t *c, + xcb_glx_context_t src, + xcb_glx_context_t dest, + uint32_t mask, + xcb_glx_context_tag_t src_context_tag); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_glx_swap_buffers_checked (xcb_connection_t *c, + xcb_glx_context_tag_t context_tag, + xcb_glx_drawable_t drawable); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_glx_swap_buffers (xcb_connection_t *c, + xcb_glx_context_tag_t context_tag, + xcb_glx_drawable_t drawable); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_glx_use_x_font_checked (xcb_connection_t *c, + xcb_glx_context_tag_t context_tag, + xcb_font_t font, + uint32_t first, + uint32_t count, + uint32_t list_base); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_glx_use_x_font (xcb_connection_t *c, + xcb_glx_context_tag_t context_tag, + xcb_font_t font, + uint32_t first, + uint32_t count, + uint32_t list_base); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_glx_create_glx_pixmap_checked (xcb_connection_t *c, + uint32_t screen, + xcb_visualid_t visual, + xcb_pixmap_t pixmap, + xcb_glx_pixmap_t glx_pixmap); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_glx_create_glx_pixmap (xcb_connection_t *c, + uint32_t screen, + xcb_visualid_t visual, + xcb_pixmap_t pixmap, + xcb_glx_pixmap_t glx_pixmap); + +int +xcb_glx_get_visual_configs_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_glx_get_visual_configs_cookie_t +xcb_glx_get_visual_configs (xcb_connection_t *c, + uint32_t screen); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_glx_get_visual_configs_cookie_t +xcb_glx_get_visual_configs_unchecked (xcb_connection_t *c, + uint32_t screen); + +uint32_t * +xcb_glx_get_visual_configs_property_list (const xcb_glx_get_visual_configs_reply_t *R); + +int +xcb_glx_get_visual_configs_property_list_length (const xcb_glx_get_visual_configs_reply_t *R); + +xcb_generic_iterator_t +xcb_glx_get_visual_configs_property_list_end (const xcb_glx_get_visual_configs_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_glx_get_visual_configs_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_glx_get_visual_configs_reply_t * +xcb_glx_get_visual_configs_reply (xcb_connection_t *c, + xcb_glx_get_visual_configs_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_glx_destroy_glx_pixmap_checked (xcb_connection_t *c, + xcb_glx_pixmap_t glx_pixmap); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_glx_destroy_glx_pixmap (xcb_connection_t *c, + xcb_glx_pixmap_t glx_pixmap); + +int +xcb_glx_vendor_private_sizeof (const void *_buffer, + uint32_t data_len); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_glx_vendor_private_checked (xcb_connection_t *c, + uint32_t vendor_code, + xcb_glx_context_tag_t context_tag, + uint32_t data_len, + const uint8_t *data); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_glx_vendor_private (xcb_connection_t *c, + uint32_t vendor_code, + xcb_glx_context_tag_t context_tag, + uint32_t data_len, + const uint8_t *data); + +uint8_t * +xcb_glx_vendor_private_data (const xcb_glx_vendor_private_request_t *R); + +int +xcb_glx_vendor_private_data_length (const xcb_glx_vendor_private_request_t *R); + +xcb_generic_iterator_t +xcb_glx_vendor_private_data_end (const xcb_glx_vendor_private_request_t *R); + +int +xcb_glx_vendor_private_with_reply_sizeof (const void *_buffer, + uint32_t data_len); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_glx_vendor_private_with_reply_cookie_t +xcb_glx_vendor_private_with_reply (xcb_connection_t *c, + uint32_t vendor_code, + xcb_glx_context_tag_t context_tag, + uint32_t data_len, + const uint8_t *data); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_glx_vendor_private_with_reply_cookie_t +xcb_glx_vendor_private_with_reply_unchecked (xcb_connection_t *c, + uint32_t vendor_code, + xcb_glx_context_tag_t context_tag, + uint32_t data_len, + const uint8_t *data); + +uint8_t * +xcb_glx_vendor_private_with_reply_data_2 (const xcb_glx_vendor_private_with_reply_reply_t *R); + +int +xcb_glx_vendor_private_with_reply_data_2_length (const xcb_glx_vendor_private_with_reply_reply_t *R); + +xcb_generic_iterator_t +xcb_glx_vendor_private_with_reply_data_2_end (const xcb_glx_vendor_private_with_reply_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_glx_vendor_private_with_reply_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_glx_vendor_private_with_reply_reply_t * +xcb_glx_vendor_private_with_reply_reply (xcb_connection_t *c, + xcb_glx_vendor_private_with_reply_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_glx_query_extensions_string_cookie_t +xcb_glx_query_extensions_string (xcb_connection_t *c, + uint32_t screen); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_glx_query_extensions_string_cookie_t +xcb_glx_query_extensions_string_unchecked (xcb_connection_t *c, + uint32_t screen); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_glx_query_extensions_string_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_glx_query_extensions_string_reply_t * +xcb_glx_query_extensions_string_reply (xcb_connection_t *c, + xcb_glx_query_extensions_string_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_glx_query_server_string_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_glx_query_server_string_cookie_t +xcb_glx_query_server_string (xcb_connection_t *c, + uint32_t screen, + uint32_t name); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_glx_query_server_string_cookie_t +xcb_glx_query_server_string_unchecked (xcb_connection_t *c, + uint32_t screen, + uint32_t name); + +char * +xcb_glx_query_server_string_string (const xcb_glx_query_server_string_reply_t *R); + +int +xcb_glx_query_server_string_string_length (const xcb_glx_query_server_string_reply_t *R); + +xcb_generic_iterator_t +xcb_glx_query_server_string_string_end (const xcb_glx_query_server_string_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_glx_query_server_string_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_glx_query_server_string_reply_t * +xcb_glx_query_server_string_reply (xcb_connection_t *c, + xcb_glx_query_server_string_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_glx_client_info_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_glx_client_info_checked (xcb_connection_t *c, + uint32_t major_version, + uint32_t minor_version, + uint32_t str_len, + const char *string); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_glx_client_info (xcb_connection_t *c, + uint32_t major_version, + uint32_t minor_version, + uint32_t str_len, + const char *string); + +char * +xcb_glx_client_info_string (const xcb_glx_client_info_request_t *R); + +int +xcb_glx_client_info_string_length (const xcb_glx_client_info_request_t *R); + +xcb_generic_iterator_t +xcb_glx_client_info_string_end (const xcb_glx_client_info_request_t *R); + +int +xcb_glx_get_fb_configs_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_glx_get_fb_configs_cookie_t +xcb_glx_get_fb_configs (xcb_connection_t *c, + uint32_t screen); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_glx_get_fb_configs_cookie_t +xcb_glx_get_fb_configs_unchecked (xcb_connection_t *c, + uint32_t screen); + +uint32_t * +xcb_glx_get_fb_configs_property_list (const xcb_glx_get_fb_configs_reply_t *R); + +int +xcb_glx_get_fb_configs_property_list_length (const xcb_glx_get_fb_configs_reply_t *R); + +xcb_generic_iterator_t +xcb_glx_get_fb_configs_property_list_end (const xcb_glx_get_fb_configs_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_glx_get_fb_configs_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_glx_get_fb_configs_reply_t * +xcb_glx_get_fb_configs_reply (xcb_connection_t *c, + xcb_glx_get_fb_configs_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_glx_create_pixmap_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_glx_create_pixmap_checked (xcb_connection_t *c, + uint32_t screen, + xcb_glx_fbconfig_t fbconfig, + xcb_pixmap_t pixmap, + xcb_glx_pixmap_t glx_pixmap, + uint32_t num_attribs, + const uint32_t *attribs); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_glx_create_pixmap (xcb_connection_t *c, + uint32_t screen, + xcb_glx_fbconfig_t fbconfig, + xcb_pixmap_t pixmap, + xcb_glx_pixmap_t glx_pixmap, + uint32_t num_attribs, + const uint32_t *attribs); + +uint32_t * +xcb_glx_create_pixmap_attribs (const xcb_glx_create_pixmap_request_t *R); + +int +xcb_glx_create_pixmap_attribs_length (const xcb_glx_create_pixmap_request_t *R); + +xcb_generic_iterator_t +xcb_glx_create_pixmap_attribs_end (const xcb_glx_create_pixmap_request_t *R); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_glx_destroy_pixmap_checked (xcb_connection_t *c, + xcb_glx_pixmap_t glx_pixmap); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_glx_destroy_pixmap (xcb_connection_t *c, + xcb_glx_pixmap_t glx_pixmap); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_glx_create_new_context_checked (xcb_connection_t *c, + xcb_glx_context_t context, + xcb_glx_fbconfig_t fbconfig, + uint32_t screen, + uint32_t render_type, + xcb_glx_context_t share_list, + uint8_t is_direct); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_glx_create_new_context (xcb_connection_t *c, + xcb_glx_context_t context, + xcb_glx_fbconfig_t fbconfig, + uint32_t screen, + uint32_t render_type, + xcb_glx_context_t share_list, + uint8_t is_direct); + +int +xcb_glx_query_context_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_glx_query_context_cookie_t +xcb_glx_query_context (xcb_connection_t *c, + xcb_glx_context_t context); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_glx_query_context_cookie_t +xcb_glx_query_context_unchecked (xcb_connection_t *c, + xcb_glx_context_t context); + +uint32_t * +xcb_glx_query_context_attribs (const xcb_glx_query_context_reply_t *R); + +int +xcb_glx_query_context_attribs_length (const xcb_glx_query_context_reply_t *R); + +xcb_generic_iterator_t +xcb_glx_query_context_attribs_end (const xcb_glx_query_context_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_glx_query_context_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_glx_query_context_reply_t * +xcb_glx_query_context_reply (xcb_connection_t *c, + xcb_glx_query_context_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_glx_make_context_current_cookie_t +xcb_glx_make_context_current (xcb_connection_t *c, + xcb_glx_context_tag_t old_context_tag, + xcb_glx_drawable_t drawable, + xcb_glx_drawable_t read_drawable, + xcb_glx_context_t context); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_glx_make_context_current_cookie_t +xcb_glx_make_context_current_unchecked (xcb_connection_t *c, + xcb_glx_context_tag_t old_context_tag, + xcb_glx_drawable_t drawable, + xcb_glx_drawable_t read_drawable, + xcb_glx_context_t context); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_glx_make_context_current_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_glx_make_context_current_reply_t * +xcb_glx_make_context_current_reply (xcb_connection_t *c, + xcb_glx_make_context_current_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_glx_create_pbuffer_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_glx_create_pbuffer_checked (xcb_connection_t *c, + uint32_t screen, + xcb_glx_fbconfig_t fbconfig, + xcb_glx_pbuffer_t pbuffer, + uint32_t num_attribs, + const uint32_t *attribs); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_glx_create_pbuffer (xcb_connection_t *c, + uint32_t screen, + xcb_glx_fbconfig_t fbconfig, + xcb_glx_pbuffer_t pbuffer, + uint32_t num_attribs, + const uint32_t *attribs); + +uint32_t * +xcb_glx_create_pbuffer_attribs (const xcb_glx_create_pbuffer_request_t *R); + +int +xcb_glx_create_pbuffer_attribs_length (const xcb_glx_create_pbuffer_request_t *R); + +xcb_generic_iterator_t +xcb_glx_create_pbuffer_attribs_end (const xcb_glx_create_pbuffer_request_t *R); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_glx_destroy_pbuffer_checked (xcb_connection_t *c, + xcb_glx_pbuffer_t pbuffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_glx_destroy_pbuffer (xcb_connection_t *c, + xcb_glx_pbuffer_t pbuffer); + +int +xcb_glx_get_drawable_attributes_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_glx_get_drawable_attributes_cookie_t +xcb_glx_get_drawable_attributes (xcb_connection_t *c, + xcb_glx_drawable_t drawable); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_glx_get_drawable_attributes_cookie_t +xcb_glx_get_drawable_attributes_unchecked (xcb_connection_t *c, + xcb_glx_drawable_t drawable); + +uint32_t * +xcb_glx_get_drawable_attributes_attribs (const xcb_glx_get_drawable_attributes_reply_t *R); + +int +xcb_glx_get_drawable_attributes_attribs_length (const xcb_glx_get_drawable_attributes_reply_t *R); + +xcb_generic_iterator_t +xcb_glx_get_drawable_attributes_attribs_end (const xcb_glx_get_drawable_attributes_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_glx_get_drawable_attributes_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_glx_get_drawable_attributes_reply_t * +xcb_glx_get_drawable_attributes_reply (xcb_connection_t *c, + xcb_glx_get_drawable_attributes_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_glx_change_drawable_attributes_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_glx_change_drawable_attributes_checked (xcb_connection_t *c, + xcb_glx_drawable_t drawable, + uint32_t num_attribs, + const uint32_t *attribs); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_glx_change_drawable_attributes (xcb_connection_t *c, + xcb_glx_drawable_t drawable, + uint32_t num_attribs, + const uint32_t *attribs); + +uint32_t * +xcb_glx_change_drawable_attributes_attribs (const xcb_glx_change_drawable_attributes_request_t *R); + +int +xcb_glx_change_drawable_attributes_attribs_length (const xcb_glx_change_drawable_attributes_request_t *R); + +xcb_generic_iterator_t +xcb_glx_change_drawable_attributes_attribs_end (const xcb_glx_change_drawable_attributes_request_t *R); + +int +xcb_glx_create_window_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_glx_create_window_checked (xcb_connection_t *c, + uint32_t screen, + xcb_glx_fbconfig_t fbconfig, + xcb_window_t window, + xcb_glx_window_t glx_window, + uint32_t num_attribs, + const uint32_t *attribs); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_glx_create_window (xcb_connection_t *c, + uint32_t screen, + xcb_glx_fbconfig_t fbconfig, + xcb_window_t window, + xcb_glx_window_t glx_window, + uint32_t num_attribs, + const uint32_t *attribs); + +uint32_t * +xcb_glx_create_window_attribs (const xcb_glx_create_window_request_t *R); + +int +xcb_glx_create_window_attribs_length (const xcb_glx_create_window_request_t *R); + +xcb_generic_iterator_t +xcb_glx_create_window_attribs_end (const xcb_glx_create_window_request_t *R); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_glx_delete_window_checked (xcb_connection_t *c, + xcb_glx_window_t glxwindow); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_glx_delete_window (xcb_connection_t *c, + xcb_glx_window_t glxwindow); + +int +xcb_glx_set_client_info_arb_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_glx_set_client_info_arb_checked (xcb_connection_t *c, + uint32_t major_version, + uint32_t minor_version, + uint32_t num_versions, + uint32_t gl_str_len, + uint32_t glx_str_len, + const uint32_t *gl_versions, + const char *gl_extension_string, + const char *glx_extension_string); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_glx_set_client_info_arb (xcb_connection_t *c, + uint32_t major_version, + uint32_t minor_version, + uint32_t num_versions, + uint32_t gl_str_len, + uint32_t glx_str_len, + const uint32_t *gl_versions, + const char *gl_extension_string, + const char *glx_extension_string); + +uint32_t * +xcb_glx_set_client_info_arb_gl_versions (const xcb_glx_set_client_info_arb_request_t *R); + +int +xcb_glx_set_client_info_arb_gl_versions_length (const xcb_glx_set_client_info_arb_request_t *R); + +xcb_generic_iterator_t +xcb_glx_set_client_info_arb_gl_versions_end (const xcb_glx_set_client_info_arb_request_t *R); + +char * +xcb_glx_set_client_info_arb_gl_extension_string (const xcb_glx_set_client_info_arb_request_t *R); + +int +xcb_glx_set_client_info_arb_gl_extension_string_length (const xcb_glx_set_client_info_arb_request_t *R); + +xcb_generic_iterator_t +xcb_glx_set_client_info_arb_gl_extension_string_end (const xcb_glx_set_client_info_arb_request_t *R); + +char * +xcb_glx_set_client_info_arb_glx_extension_string (const xcb_glx_set_client_info_arb_request_t *R); + +int +xcb_glx_set_client_info_arb_glx_extension_string_length (const xcb_glx_set_client_info_arb_request_t *R); + +xcb_generic_iterator_t +xcb_glx_set_client_info_arb_glx_extension_string_end (const xcb_glx_set_client_info_arb_request_t *R); + +int +xcb_glx_create_context_attribs_arb_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_glx_create_context_attribs_arb_checked (xcb_connection_t *c, + xcb_glx_context_t context, + xcb_glx_fbconfig_t fbconfig, + uint32_t screen, + xcb_glx_context_t share_list, + uint8_t is_direct, + uint32_t num_attribs, + const uint32_t *attribs); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_glx_create_context_attribs_arb (xcb_connection_t *c, + xcb_glx_context_t context, + xcb_glx_fbconfig_t fbconfig, + uint32_t screen, + xcb_glx_context_t share_list, + uint8_t is_direct, + uint32_t num_attribs, + const uint32_t *attribs); + +uint32_t * +xcb_glx_create_context_attribs_arb_attribs (const xcb_glx_create_context_attribs_arb_request_t *R); + +int +xcb_glx_create_context_attribs_arb_attribs_length (const xcb_glx_create_context_attribs_arb_request_t *R); + +xcb_generic_iterator_t +xcb_glx_create_context_attribs_arb_attribs_end (const xcb_glx_create_context_attribs_arb_request_t *R); + +int +xcb_glx_set_client_info_2arb_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_glx_set_client_info_2arb_checked (xcb_connection_t *c, + uint32_t major_version, + uint32_t minor_version, + uint32_t num_versions, + uint32_t gl_str_len, + uint32_t glx_str_len, + const uint32_t *gl_versions, + const char *gl_extension_string, + const char *glx_extension_string); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_glx_set_client_info_2arb (xcb_connection_t *c, + uint32_t major_version, + uint32_t minor_version, + uint32_t num_versions, + uint32_t gl_str_len, + uint32_t glx_str_len, + const uint32_t *gl_versions, + const char *gl_extension_string, + const char *glx_extension_string); + +uint32_t * +xcb_glx_set_client_info_2arb_gl_versions (const xcb_glx_set_client_info_2arb_request_t *R); + +int +xcb_glx_set_client_info_2arb_gl_versions_length (const xcb_glx_set_client_info_2arb_request_t *R); + +xcb_generic_iterator_t +xcb_glx_set_client_info_2arb_gl_versions_end (const xcb_glx_set_client_info_2arb_request_t *R); + +char * +xcb_glx_set_client_info_2arb_gl_extension_string (const xcb_glx_set_client_info_2arb_request_t *R); + +int +xcb_glx_set_client_info_2arb_gl_extension_string_length (const xcb_glx_set_client_info_2arb_request_t *R); + +xcb_generic_iterator_t +xcb_glx_set_client_info_2arb_gl_extension_string_end (const xcb_glx_set_client_info_2arb_request_t *R); + +char * +xcb_glx_set_client_info_2arb_glx_extension_string (const xcb_glx_set_client_info_2arb_request_t *R); + +int +xcb_glx_set_client_info_2arb_glx_extension_string_length (const xcb_glx_set_client_info_2arb_request_t *R); + +xcb_generic_iterator_t +xcb_glx_set_client_info_2arb_glx_extension_string_end (const xcb_glx_set_client_info_2arb_request_t *R); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_glx_new_list_checked (xcb_connection_t *c, + xcb_glx_context_tag_t context_tag, + uint32_t list, + uint32_t mode); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_glx_new_list (xcb_connection_t *c, + xcb_glx_context_tag_t context_tag, + uint32_t list, + uint32_t mode); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_glx_end_list_checked (xcb_connection_t *c, + xcb_glx_context_tag_t context_tag); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_glx_end_list (xcb_connection_t *c, + xcb_glx_context_tag_t context_tag); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_glx_delete_lists_checked (xcb_connection_t *c, + xcb_glx_context_tag_t context_tag, + uint32_t list, + int32_t range); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_glx_delete_lists (xcb_connection_t *c, + xcb_glx_context_tag_t context_tag, + uint32_t list, + int32_t range); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_glx_gen_lists_cookie_t +xcb_glx_gen_lists (xcb_connection_t *c, + xcb_glx_context_tag_t context_tag, + int32_t range); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_glx_gen_lists_cookie_t +xcb_glx_gen_lists_unchecked (xcb_connection_t *c, + xcb_glx_context_tag_t context_tag, + int32_t range); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_glx_gen_lists_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_glx_gen_lists_reply_t * +xcb_glx_gen_lists_reply (xcb_connection_t *c, + xcb_glx_gen_lists_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_glx_feedback_buffer_checked (xcb_connection_t *c, + xcb_glx_context_tag_t context_tag, + int32_t size, + int32_t type); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_glx_feedback_buffer (xcb_connection_t *c, + xcb_glx_context_tag_t context_tag, + int32_t size, + int32_t type); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_glx_select_buffer_checked (xcb_connection_t *c, + xcb_glx_context_tag_t context_tag, + int32_t size); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_glx_select_buffer (xcb_connection_t *c, + xcb_glx_context_tag_t context_tag, + int32_t size); + +int +xcb_glx_render_mode_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_glx_render_mode_cookie_t +xcb_glx_render_mode (xcb_connection_t *c, + xcb_glx_context_tag_t context_tag, + uint32_t mode); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_glx_render_mode_cookie_t +xcb_glx_render_mode_unchecked (xcb_connection_t *c, + xcb_glx_context_tag_t context_tag, + uint32_t mode); + +uint32_t * +xcb_glx_render_mode_data (const xcb_glx_render_mode_reply_t *R); + +int +xcb_glx_render_mode_data_length (const xcb_glx_render_mode_reply_t *R); + +xcb_generic_iterator_t +xcb_glx_render_mode_data_end (const xcb_glx_render_mode_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_glx_render_mode_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_glx_render_mode_reply_t * +xcb_glx_render_mode_reply (xcb_connection_t *c, + xcb_glx_render_mode_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_glx_finish_cookie_t +xcb_glx_finish (xcb_connection_t *c, + xcb_glx_context_tag_t context_tag); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_glx_finish_cookie_t +xcb_glx_finish_unchecked (xcb_connection_t *c, + xcb_glx_context_tag_t context_tag); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_glx_finish_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_glx_finish_reply_t * +xcb_glx_finish_reply (xcb_connection_t *c, + xcb_glx_finish_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_glx_pixel_storef_checked (xcb_connection_t *c, + xcb_glx_context_tag_t context_tag, + uint32_t pname, + xcb_glx_float32_t datum); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_glx_pixel_storef (xcb_connection_t *c, + xcb_glx_context_tag_t context_tag, + uint32_t pname, + xcb_glx_float32_t datum); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_glx_pixel_storei_checked (xcb_connection_t *c, + xcb_glx_context_tag_t context_tag, + uint32_t pname, + int32_t datum); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_glx_pixel_storei (xcb_connection_t *c, + xcb_glx_context_tag_t context_tag, + uint32_t pname, + int32_t datum); + +int +xcb_glx_read_pixels_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_glx_read_pixels_cookie_t +xcb_glx_read_pixels (xcb_connection_t *c, + xcb_glx_context_tag_t context_tag, + int32_t x, + int32_t y, + int32_t width, + int32_t height, + uint32_t format, + uint32_t type, + uint8_t swap_bytes, + uint8_t lsb_first); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_glx_read_pixels_cookie_t +xcb_glx_read_pixels_unchecked (xcb_connection_t *c, + xcb_glx_context_tag_t context_tag, + int32_t x, + int32_t y, + int32_t width, + int32_t height, + uint32_t format, + uint32_t type, + uint8_t swap_bytes, + uint8_t lsb_first); + +uint8_t * +xcb_glx_read_pixels_data (const xcb_glx_read_pixels_reply_t *R); + +int +xcb_glx_read_pixels_data_length (const xcb_glx_read_pixels_reply_t *R); + +xcb_generic_iterator_t +xcb_glx_read_pixels_data_end (const xcb_glx_read_pixels_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_glx_read_pixels_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_glx_read_pixels_reply_t * +xcb_glx_read_pixels_reply (xcb_connection_t *c, + xcb_glx_read_pixels_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_glx_get_booleanv_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_glx_get_booleanv_cookie_t +xcb_glx_get_booleanv (xcb_connection_t *c, + xcb_glx_context_tag_t context_tag, + int32_t pname); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_glx_get_booleanv_cookie_t +xcb_glx_get_booleanv_unchecked (xcb_connection_t *c, + xcb_glx_context_tag_t context_tag, + int32_t pname); + +uint8_t * +xcb_glx_get_booleanv_data (const xcb_glx_get_booleanv_reply_t *R); + +int +xcb_glx_get_booleanv_data_length (const xcb_glx_get_booleanv_reply_t *R); + +xcb_generic_iterator_t +xcb_glx_get_booleanv_data_end (const xcb_glx_get_booleanv_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_glx_get_booleanv_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_glx_get_booleanv_reply_t * +xcb_glx_get_booleanv_reply (xcb_connection_t *c, + xcb_glx_get_booleanv_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_glx_get_clip_plane_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_glx_get_clip_plane_cookie_t +xcb_glx_get_clip_plane (xcb_connection_t *c, + xcb_glx_context_tag_t context_tag, + int32_t plane); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_glx_get_clip_plane_cookie_t +xcb_glx_get_clip_plane_unchecked (xcb_connection_t *c, + xcb_glx_context_tag_t context_tag, + int32_t plane); + +xcb_glx_float64_t * +xcb_glx_get_clip_plane_data (const xcb_glx_get_clip_plane_reply_t *R); + +int +xcb_glx_get_clip_plane_data_length (const xcb_glx_get_clip_plane_reply_t *R); + +xcb_generic_iterator_t +xcb_glx_get_clip_plane_data_end (const xcb_glx_get_clip_plane_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_glx_get_clip_plane_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_glx_get_clip_plane_reply_t * +xcb_glx_get_clip_plane_reply (xcb_connection_t *c, + xcb_glx_get_clip_plane_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_glx_get_doublev_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_glx_get_doublev_cookie_t +xcb_glx_get_doublev (xcb_connection_t *c, + xcb_glx_context_tag_t context_tag, + uint32_t pname); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_glx_get_doublev_cookie_t +xcb_glx_get_doublev_unchecked (xcb_connection_t *c, + xcb_glx_context_tag_t context_tag, + uint32_t pname); + +xcb_glx_float64_t * +xcb_glx_get_doublev_data (const xcb_glx_get_doublev_reply_t *R); + +int +xcb_glx_get_doublev_data_length (const xcb_glx_get_doublev_reply_t *R); + +xcb_generic_iterator_t +xcb_glx_get_doublev_data_end (const xcb_glx_get_doublev_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_glx_get_doublev_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_glx_get_doublev_reply_t * +xcb_glx_get_doublev_reply (xcb_connection_t *c, + xcb_glx_get_doublev_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_glx_get_error_cookie_t +xcb_glx_get_error (xcb_connection_t *c, + xcb_glx_context_tag_t context_tag); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_glx_get_error_cookie_t +xcb_glx_get_error_unchecked (xcb_connection_t *c, + xcb_glx_context_tag_t context_tag); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_glx_get_error_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_glx_get_error_reply_t * +xcb_glx_get_error_reply (xcb_connection_t *c, + xcb_glx_get_error_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_glx_get_floatv_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_glx_get_floatv_cookie_t +xcb_glx_get_floatv (xcb_connection_t *c, + xcb_glx_context_tag_t context_tag, + uint32_t pname); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_glx_get_floatv_cookie_t +xcb_glx_get_floatv_unchecked (xcb_connection_t *c, + xcb_glx_context_tag_t context_tag, + uint32_t pname); + +xcb_glx_float32_t * +xcb_glx_get_floatv_data (const xcb_glx_get_floatv_reply_t *R); + +int +xcb_glx_get_floatv_data_length (const xcb_glx_get_floatv_reply_t *R); + +xcb_generic_iterator_t +xcb_glx_get_floatv_data_end (const xcb_glx_get_floatv_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_glx_get_floatv_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_glx_get_floatv_reply_t * +xcb_glx_get_floatv_reply (xcb_connection_t *c, + xcb_glx_get_floatv_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_glx_get_integerv_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_glx_get_integerv_cookie_t +xcb_glx_get_integerv (xcb_connection_t *c, + xcb_glx_context_tag_t context_tag, + uint32_t pname); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_glx_get_integerv_cookie_t +xcb_glx_get_integerv_unchecked (xcb_connection_t *c, + xcb_glx_context_tag_t context_tag, + uint32_t pname); + +int32_t * +xcb_glx_get_integerv_data (const xcb_glx_get_integerv_reply_t *R); + +int +xcb_glx_get_integerv_data_length (const xcb_glx_get_integerv_reply_t *R); + +xcb_generic_iterator_t +xcb_glx_get_integerv_data_end (const xcb_glx_get_integerv_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_glx_get_integerv_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_glx_get_integerv_reply_t * +xcb_glx_get_integerv_reply (xcb_connection_t *c, + xcb_glx_get_integerv_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_glx_get_lightfv_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_glx_get_lightfv_cookie_t +xcb_glx_get_lightfv (xcb_connection_t *c, + xcb_glx_context_tag_t context_tag, + uint32_t light, + uint32_t pname); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_glx_get_lightfv_cookie_t +xcb_glx_get_lightfv_unchecked (xcb_connection_t *c, + xcb_glx_context_tag_t context_tag, + uint32_t light, + uint32_t pname); + +xcb_glx_float32_t * +xcb_glx_get_lightfv_data (const xcb_glx_get_lightfv_reply_t *R); + +int +xcb_glx_get_lightfv_data_length (const xcb_glx_get_lightfv_reply_t *R); + +xcb_generic_iterator_t +xcb_glx_get_lightfv_data_end (const xcb_glx_get_lightfv_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_glx_get_lightfv_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_glx_get_lightfv_reply_t * +xcb_glx_get_lightfv_reply (xcb_connection_t *c, + xcb_glx_get_lightfv_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_glx_get_lightiv_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_glx_get_lightiv_cookie_t +xcb_glx_get_lightiv (xcb_connection_t *c, + xcb_glx_context_tag_t context_tag, + uint32_t light, + uint32_t pname); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_glx_get_lightiv_cookie_t +xcb_glx_get_lightiv_unchecked (xcb_connection_t *c, + xcb_glx_context_tag_t context_tag, + uint32_t light, + uint32_t pname); + +int32_t * +xcb_glx_get_lightiv_data (const xcb_glx_get_lightiv_reply_t *R); + +int +xcb_glx_get_lightiv_data_length (const xcb_glx_get_lightiv_reply_t *R); + +xcb_generic_iterator_t +xcb_glx_get_lightiv_data_end (const xcb_glx_get_lightiv_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_glx_get_lightiv_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_glx_get_lightiv_reply_t * +xcb_glx_get_lightiv_reply (xcb_connection_t *c, + xcb_glx_get_lightiv_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_glx_get_mapdv_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_glx_get_mapdv_cookie_t +xcb_glx_get_mapdv (xcb_connection_t *c, + xcb_glx_context_tag_t context_tag, + uint32_t target, + uint32_t query); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_glx_get_mapdv_cookie_t +xcb_glx_get_mapdv_unchecked (xcb_connection_t *c, + xcb_glx_context_tag_t context_tag, + uint32_t target, + uint32_t query); + +xcb_glx_float64_t * +xcb_glx_get_mapdv_data (const xcb_glx_get_mapdv_reply_t *R); + +int +xcb_glx_get_mapdv_data_length (const xcb_glx_get_mapdv_reply_t *R); + +xcb_generic_iterator_t +xcb_glx_get_mapdv_data_end (const xcb_glx_get_mapdv_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_glx_get_mapdv_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_glx_get_mapdv_reply_t * +xcb_glx_get_mapdv_reply (xcb_connection_t *c, + xcb_glx_get_mapdv_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_glx_get_mapfv_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_glx_get_mapfv_cookie_t +xcb_glx_get_mapfv (xcb_connection_t *c, + xcb_glx_context_tag_t context_tag, + uint32_t target, + uint32_t query); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_glx_get_mapfv_cookie_t +xcb_glx_get_mapfv_unchecked (xcb_connection_t *c, + xcb_glx_context_tag_t context_tag, + uint32_t target, + uint32_t query); + +xcb_glx_float32_t * +xcb_glx_get_mapfv_data (const xcb_glx_get_mapfv_reply_t *R); + +int +xcb_glx_get_mapfv_data_length (const xcb_glx_get_mapfv_reply_t *R); + +xcb_generic_iterator_t +xcb_glx_get_mapfv_data_end (const xcb_glx_get_mapfv_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_glx_get_mapfv_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_glx_get_mapfv_reply_t * +xcb_glx_get_mapfv_reply (xcb_connection_t *c, + xcb_glx_get_mapfv_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_glx_get_mapiv_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_glx_get_mapiv_cookie_t +xcb_glx_get_mapiv (xcb_connection_t *c, + xcb_glx_context_tag_t context_tag, + uint32_t target, + uint32_t query); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_glx_get_mapiv_cookie_t +xcb_glx_get_mapiv_unchecked (xcb_connection_t *c, + xcb_glx_context_tag_t context_tag, + uint32_t target, + uint32_t query); + +int32_t * +xcb_glx_get_mapiv_data (const xcb_glx_get_mapiv_reply_t *R); + +int +xcb_glx_get_mapiv_data_length (const xcb_glx_get_mapiv_reply_t *R); + +xcb_generic_iterator_t +xcb_glx_get_mapiv_data_end (const xcb_glx_get_mapiv_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_glx_get_mapiv_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_glx_get_mapiv_reply_t * +xcb_glx_get_mapiv_reply (xcb_connection_t *c, + xcb_glx_get_mapiv_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_glx_get_materialfv_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_glx_get_materialfv_cookie_t +xcb_glx_get_materialfv (xcb_connection_t *c, + xcb_glx_context_tag_t context_tag, + uint32_t face, + uint32_t pname); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_glx_get_materialfv_cookie_t +xcb_glx_get_materialfv_unchecked (xcb_connection_t *c, + xcb_glx_context_tag_t context_tag, + uint32_t face, + uint32_t pname); + +xcb_glx_float32_t * +xcb_glx_get_materialfv_data (const xcb_glx_get_materialfv_reply_t *R); + +int +xcb_glx_get_materialfv_data_length (const xcb_glx_get_materialfv_reply_t *R); + +xcb_generic_iterator_t +xcb_glx_get_materialfv_data_end (const xcb_glx_get_materialfv_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_glx_get_materialfv_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_glx_get_materialfv_reply_t * +xcb_glx_get_materialfv_reply (xcb_connection_t *c, + xcb_glx_get_materialfv_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_glx_get_materialiv_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_glx_get_materialiv_cookie_t +xcb_glx_get_materialiv (xcb_connection_t *c, + xcb_glx_context_tag_t context_tag, + uint32_t face, + uint32_t pname); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_glx_get_materialiv_cookie_t +xcb_glx_get_materialiv_unchecked (xcb_connection_t *c, + xcb_glx_context_tag_t context_tag, + uint32_t face, + uint32_t pname); + +int32_t * +xcb_glx_get_materialiv_data (const xcb_glx_get_materialiv_reply_t *R); + +int +xcb_glx_get_materialiv_data_length (const xcb_glx_get_materialiv_reply_t *R); + +xcb_generic_iterator_t +xcb_glx_get_materialiv_data_end (const xcb_glx_get_materialiv_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_glx_get_materialiv_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_glx_get_materialiv_reply_t * +xcb_glx_get_materialiv_reply (xcb_connection_t *c, + xcb_glx_get_materialiv_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_glx_get_pixel_mapfv_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_glx_get_pixel_mapfv_cookie_t +xcb_glx_get_pixel_mapfv (xcb_connection_t *c, + xcb_glx_context_tag_t context_tag, + uint32_t map); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_glx_get_pixel_mapfv_cookie_t +xcb_glx_get_pixel_mapfv_unchecked (xcb_connection_t *c, + xcb_glx_context_tag_t context_tag, + uint32_t map); + +xcb_glx_float32_t * +xcb_glx_get_pixel_mapfv_data (const xcb_glx_get_pixel_mapfv_reply_t *R); + +int +xcb_glx_get_pixel_mapfv_data_length (const xcb_glx_get_pixel_mapfv_reply_t *R); + +xcb_generic_iterator_t +xcb_glx_get_pixel_mapfv_data_end (const xcb_glx_get_pixel_mapfv_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_glx_get_pixel_mapfv_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_glx_get_pixel_mapfv_reply_t * +xcb_glx_get_pixel_mapfv_reply (xcb_connection_t *c, + xcb_glx_get_pixel_mapfv_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_glx_get_pixel_mapuiv_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_glx_get_pixel_mapuiv_cookie_t +xcb_glx_get_pixel_mapuiv (xcb_connection_t *c, + xcb_glx_context_tag_t context_tag, + uint32_t map); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_glx_get_pixel_mapuiv_cookie_t +xcb_glx_get_pixel_mapuiv_unchecked (xcb_connection_t *c, + xcb_glx_context_tag_t context_tag, + uint32_t map); + +uint32_t * +xcb_glx_get_pixel_mapuiv_data (const xcb_glx_get_pixel_mapuiv_reply_t *R); + +int +xcb_glx_get_pixel_mapuiv_data_length (const xcb_glx_get_pixel_mapuiv_reply_t *R); + +xcb_generic_iterator_t +xcb_glx_get_pixel_mapuiv_data_end (const xcb_glx_get_pixel_mapuiv_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_glx_get_pixel_mapuiv_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_glx_get_pixel_mapuiv_reply_t * +xcb_glx_get_pixel_mapuiv_reply (xcb_connection_t *c, + xcb_glx_get_pixel_mapuiv_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_glx_get_pixel_mapusv_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_glx_get_pixel_mapusv_cookie_t +xcb_glx_get_pixel_mapusv (xcb_connection_t *c, + xcb_glx_context_tag_t context_tag, + uint32_t map); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_glx_get_pixel_mapusv_cookie_t +xcb_glx_get_pixel_mapusv_unchecked (xcb_connection_t *c, + xcb_glx_context_tag_t context_tag, + uint32_t map); + +uint16_t * +xcb_glx_get_pixel_mapusv_data (const xcb_glx_get_pixel_mapusv_reply_t *R); + +int +xcb_glx_get_pixel_mapusv_data_length (const xcb_glx_get_pixel_mapusv_reply_t *R); + +xcb_generic_iterator_t +xcb_glx_get_pixel_mapusv_data_end (const xcb_glx_get_pixel_mapusv_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_glx_get_pixel_mapusv_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_glx_get_pixel_mapusv_reply_t * +xcb_glx_get_pixel_mapusv_reply (xcb_connection_t *c, + xcb_glx_get_pixel_mapusv_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_glx_get_polygon_stipple_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_glx_get_polygon_stipple_cookie_t +xcb_glx_get_polygon_stipple (xcb_connection_t *c, + xcb_glx_context_tag_t context_tag, + uint8_t lsb_first); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_glx_get_polygon_stipple_cookie_t +xcb_glx_get_polygon_stipple_unchecked (xcb_connection_t *c, + xcb_glx_context_tag_t context_tag, + uint8_t lsb_first); + +uint8_t * +xcb_glx_get_polygon_stipple_data (const xcb_glx_get_polygon_stipple_reply_t *R); + +int +xcb_glx_get_polygon_stipple_data_length (const xcb_glx_get_polygon_stipple_reply_t *R); + +xcb_generic_iterator_t +xcb_glx_get_polygon_stipple_data_end (const xcb_glx_get_polygon_stipple_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_glx_get_polygon_stipple_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_glx_get_polygon_stipple_reply_t * +xcb_glx_get_polygon_stipple_reply (xcb_connection_t *c, + xcb_glx_get_polygon_stipple_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_glx_get_string_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_glx_get_string_cookie_t +xcb_glx_get_string (xcb_connection_t *c, + xcb_glx_context_tag_t context_tag, + uint32_t name); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_glx_get_string_cookie_t +xcb_glx_get_string_unchecked (xcb_connection_t *c, + xcb_glx_context_tag_t context_tag, + uint32_t name); + +char * +xcb_glx_get_string_string (const xcb_glx_get_string_reply_t *R); + +int +xcb_glx_get_string_string_length (const xcb_glx_get_string_reply_t *R); + +xcb_generic_iterator_t +xcb_glx_get_string_string_end (const xcb_glx_get_string_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_glx_get_string_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_glx_get_string_reply_t * +xcb_glx_get_string_reply (xcb_connection_t *c, + xcb_glx_get_string_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_glx_get_tex_envfv_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_glx_get_tex_envfv_cookie_t +xcb_glx_get_tex_envfv (xcb_connection_t *c, + xcb_glx_context_tag_t context_tag, + uint32_t target, + uint32_t pname); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_glx_get_tex_envfv_cookie_t +xcb_glx_get_tex_envfv_unchecked (xcb_connection_t *c, + xcb_glx_context_tag_t context_tag, + uint32_t target, + uint32_t pname); + +xcb_glx_float32_t * +xcb_glx_get_tex_envfv_data (const xcb_glx_get_tex_envfv_reply_t *R); + +int +xcb_glx_get_tex_envfv_data_length (const xcb_glx_get_tex_envfv_reply_t *R); + +xcb_generic_iterator_t +xcb_glx_get_tex_envfv_data_end (const xcb_glx_get_tex_envfv_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_glx_get_tex_envfv_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_glx_get_tex_envfv_reply_t * +xcb_glx_get_tex_envfv_reply (xcb_connection_t *c, + xcb_glx_get_tex_envfv_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_glx_get_tex_enviv_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_glx_get_tex_enviv_cookie_t +xcb_glx_get_tex_enviv (xcb_connection_t *c, + xcb_glx_context_tag_t context_tag, + uint32_t target, + uint32_t pname); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_glx_get_tex_enviv_cookie_t +xcb_glx_get_tex_enviv_unchecked (xcb_connection_t *c, + xcb_glx_context_tag_t context_tag, + uint32_t target, + uint32_t pname); + +int32_t * +xcb_glx_get_tex_enviv_data (const xcb_glx_get_tex_enviv_reply_t *R); + +int +xcb_glx_get_tex_enviv_data_length (const xcb_glx_get_tex_enviv_reply_t *R); + +xcb_generic_iterator_t +xcb_glx_get_tex_enviv_data_end (const xcb_glx_get_tex_enviv_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_glx_get_tex_enviv_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_glx_get_tex_enviv_reply_t * +xcb_glx_get_tex_enviv_reply (xcb_connection_t *c, + xcb_glx_get_tex_enviv_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_glx_get_tex_gendv_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_glx_get_tex_gendv_cookie_t +xcb_glx_get_tex_gendv (xcb_connection_t *c, + xcb_glx_context_tag_t context_tag, + uint32_t coord, + uint32_t pname); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_glx_get_tex_gendv_cookie_t +xcb_glx_get_tex_gendv_unchecked (xcb_connection_t *c, + xcb_glx_context_tag_t context_tag, + uint32_t coord, + uint32_t pname); + +xcb_glx_float64_t * +xcb_glx_get_tex_gendv_data (const xcb_glx_get_tex_gendv_reply_t *R); + +int +xcb_glx_get_tex_gendv_data_length (const xcb_glx_get_tex_gendv_reply_t *R); + +xcb_generic_iterator_t +xcb_glx_get_tex_gendv_data_end (const xcb_glx_get_tex_gendv_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_glx_get_tex_gendv_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_glx_get_tex_gendv_reply_t * +xcb_glx_get_tex_gendv_reply (xcb_connection_t *c, + xcb_glx_get_tex_gendv_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_glx_get_tex_genfv_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_glx_get_tex_genfv_cookie_t +xcb_glx_get_tex_genfv (xcb_connection_t *c, + xcb_glx_context_tag_t context_tag, + uint32_t coord, + uint32_t pname); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_glx_get_tex_genfv_cookie_t +xcb_glx_get_tex_genfv_unchecked (xcb_connection_t *c, + xcb_glx_context_tag_t context_tag, + uint32_t coord, + uint32_t pname); + +xcb_glx_float32_t * +xcb_glx_get_tex_genfv_data (const xcb_glx_get_tex_genfv_reply_t *R); + +int +xcb_glx_get_tex_genfv_data_length (const xcb_glx_get_tex_genfv_reply_t *R); + +xcb_generic_iterator_t +xcb_glx_get_tex_genfv_data_end (const xcb_glx_get_tex_genfv_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_glx_get_tex_genfv_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_glx_get_tex_genfv_reply_t * +xcb_glx_get_tex_genfv_reply (xcb_connection_t *c, + xcb_glx_get_tex_genfv_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_glx_get_tex_geniv_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_glx_get_tex_geniv_cookie_t +xcb_glx_get_tex_geniv (xcb_connection_t *c, + xcb_glx_context_tag_t context_tag, + uint32_t coord, + uint32_t pname); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_glx_get_tex_geniv_cookie_t +xcb_glx_get_tex_geniv_unchecked (xcb_connection_t *c, + xcb_glx_context_tag_t context_tag, + uint32_t coord, + uint32_t pname); + +int32_t * +xcb_glx_get_tex_geniv_data (const xcb_glx_get_tex_geniv_reply_t *R); + +int +xcb_glx_get_tex_geniv_data_length (const xcb_glx_get_tex_geniv_reply_t *R); + +xcb_generic_iterator_t +xcb_glx_get_tex_geniv_data_end (const xcb_glx_get_tex_geniv_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_glx_get_tex_geniv_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_glx_get_tex_geniv_reply_t * +xcb_glx_get_tex_geniv_reply (xcb_connection_t *c, + xcb_glx_get_tex_geniv_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_glx_get_tex_image_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_glx_get_tex_image_cookie_t +xcb_glx_get_tex_image (xcb_connection_t *c, + xcb_glx_context_tag_t context_tag, + uint32_t target, + int32_t level, + uint32_t format, + uint32_t type, + uint8_t swap_bytes); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_glx_get_tex_image_cookie_t +xcb_glx_get_tex_image_unchecked (xcb_connection_t *c, + xcb_glx_context_tag_t context_tag, + uint32_t target, + int32_t level, + uint32_t format, + uint32_t type, + uint8_t swap_bytes); + +uint8_t * +xcb_glx_get_tex_image_data (const xcb_glx_get_tex_image_reply_t *R); + +int +xcb_glx_get_tex_image_data_length (const xcb_glx_get_tex_image_reply_t *R); + +xcb_generic_iterator_t +xcb_glx_get_tex_image_data_end (const xcb_glx_get_tex_image_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_glx_get_tex_image_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_glx_get_tex_image_reply_t * +xcb_glx_get_tex_image_reply (xcb_connection_t *c, + xcb_glx_get_tex_image_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_glx_get_tex_parameterfv_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_glx_get_tex_parameterfv_cookie_t +xcb_glx_get_tex_parameterfv (xcb_connection_t *c, + xcb_glx_context_tag_t context_tag, + uint32_t target, + uint32_t pname); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_glx_get_tex_parameterfv_cookie_t +xcb_glx_get_tex_parameterfv_unchecked (xcb_connection_t *c, + xcb_glx_context_tag_t context_tag, + uint32_t target, + uint32_t pname); + +xcb_glx_float32_t * +xcb_glx_get_tex_parameterfv_data (const xcb_glx_get_tex_parameterfv_reply_t *R); + +int +xcb_glx_get_tex_parameterfv_data_length (const xcb_glx_get_tex_parameterfv_reply_t *R); + +xcb_generic_iterator_t +xcb_glx_get_tex_parameterfv_data_end (const xcb_glx_get_tex_parameterfv_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_glx_get_tex_parameterfv_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_glx_get_tex_parameterfv_reply_t * +xcb_glx_get_tex_parameterfv_reply (xcb_connection_t *c, + xcb_glx_get_tex_parameterfv_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_glx_get_tex_parameteriv_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_glx_get_tex_parameteriv_cookie_t +xcb_glx_get_tex_parameteriv (xcb_connection_t *c, + xcb_glx_context_tag_t context_tag, + uint32_t target, + uint32_t pname); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_glx_get_tex_parameteriv_cookie_t +xcb_glx_get_tex_parameteriv_unchecked (xcb_connection_t *c, + xcb_glx_context_tag_t context_tag, + uint32_t target, + uint32_t pname); + +int32_t * +xcb_glx_get_tex_parameteriv_data (const xcb_glx_get_tex_parameteriv_reply_t *R); + +int +xcb_glx_get_tex_parameteriv_data_length (const xcb_glx_get_tex_parameteriv_reply_t *R); + +xcb_generic_iterator_t +xcb_glx_get_tex_parameteriv_data_end (const xcb_glx_get_tex_parameteriv_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_glx_get_tex_parameteriv_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_glx_get_tex_parameteriv_reply_t * +xcb_glx_get_tex_parameteriv_reply (xcb_connection_t *c, + xcb_glx_get_tex_parameteriv_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_glx_get_tex_level_parameterfv_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_glx_get_tex_level_parameterfv_cookie_t +xcb_glx_get_tex_level_parameterfv (xcb_connection_t *c, + xcb_glx_context_tag_t context_tag, + uint32_t target, + int32_t level, + uint32_t pname); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_glx_get_tex_level_parameterfv_cookie_t +xcb_glx_get_tex_level_parameterfv_unchecked (xcb_connection_t *c, + xcb_glx_context_tag_t context_tag, + uint32_t target, + int32_t level, + uint32_t pname); + +xcb_glx_float32_t * +xcb_glx_get_tex_level_parameterfv_data (const xcb_glx_get_tex_level_parameterfv_reply_t *R); + +int +xcb_glx_get_tex_level_parameterfv_data_length (const xcb_glx_get_tex_level_parameterfv_reply_t *R); + +xcb_generic_iterator_t +xcb_glx_get_tex_level_parameterfv_data_end (const xcb_glx_get_tex_level_parameterfv_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_glx_get_tex_level_parameterfv_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_glx_get_tex_level_parameterfv_reply_t * +xcb_glx_get_tex_level_parameterfv_reply (xcb_connection_t *c, + xcb_glx_get_tex_level_parameterfv_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_glx_get_tex_level_parameteriv_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_glx_get_tex_level_parameteriv_cookie_t +xcb_glx_get_tex_level_parameteriv (xcb_connection_t *c, + xcb_glx_context_tag_t context_tag, + uint32_t target, + int32_t level, + uint32_t pname); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_glx_get_tex_level_parameteriv_cookie_t +xcb_glx_get_tex_level_parameteriv_unchecked (xcb_connection_t *c, + xcb_glx_context_tag_t context_tag, + uint32_t target, + int32_t level, + uint32_t pname); + +int32_t * +xcb_glx_get_tex_level_parameteriv_data (const xcb_glx_get_tex_level_parameteriv_reply_t *R); + +int +xcb_glx_get_tex_level_parameteriv_data_length (const xcb_glx_get_tex_level_parameteriv_reply_t *R); + +xcb_generic_iterator_t +xcb_glx_get_tex_level_parameteriv_data_end (const xcb_glx_get_tex_level_parameteriv_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_glx_get_tex_level_parameteriv_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_glx_get_tex_level_parameteriv_reply_t * +xcb_glx_get_tex_level_parameteriv_reply (xcb_connection_t *c, + xcb_glx_get_tex_level_parameteriv_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_glx_is_enabled_cookie_t +xcb_glx_is_enabled (xcb_connection_t *c, + xcb_glx_context_tag_t context_tag, + uint32_t capability); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_glx_is_enabled_cookie_t +xcb_glx_is_enabled_unchecked (xcb_connection_t *c, + xcb_glx_context_tag_t context_tag, + uint32_t capability); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_glx_is_enabled_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_glx_is_enabled_reply_t * +xcb_glx_is_enabled_reply (xcb_connection_t *c, + xcb_glx_is_enabled_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_glx_is_list_cookie_t +xcb_glx_is_list (xcb_connection_t *c, + xcb_glx_context_tag_t context_tag, + uint32_t list); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_glx_is_list_cookie_t +xcb_glx_is_list_unchecked (xcb_connection_t *c, + xcb_glx_context_tag_t context_tag, + uint32_t list); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_glx_is_list_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_glx_is_list_reply_t * +xcb_glx_is_list_reply (xcb_connection_t *c, + xcb_glx_is_list_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_glx_flush_checked (xcb_connection_t *c, + xcb_glx_context_tag_t context_tag); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_glx_flush (xcb_connection_t *c, + xcb_glx_context_tag_t context_tag); + +int +xcb_glx_are_textures_resident_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_glx_are_textures_resident_cookie_t +xcb_glx_are_textures_resident (xcb_connection_t *c, + xcb_glx_context_tag_t context_tag, + int32_t n, + const uint32_t *textures); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_glx_are_textures_resident_cookie_t +xcb_glx_are_textures_resident_unchecked (xcb_connection_t *c, + xcb_glx_context_tag_t context_tag, + int32_t n, + const uint32_t *textures); + +uint8_t * +xcb_glx_are_textures_resident_data (const xcb_glx_are_textures_resident_reply_t *R); + +int +xcb_glx_are_textures_resident_data_length (const xcb_glx_are_textures_resident_reply_t *R); + +xcb_generic_iterator_t +xcb_glx_are_textures_resident_data_end (const xcb_glx_are_textures_resident_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_glx_are_textures_resident_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_glx_are_textures_resident_reply_t * +xcb_glx_are_textures_resident_reply (xcb_connection_t *c, + xcb_glx_are_textures_resident_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_glx_delete_textures_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_glx_delete_textures_checked (xcb_connection_t *c, + xcb_glx_context_tag_t context_tag, + int32_t n, + const uint32_t *textures); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_glx_delete_textures (xcb_connection_t *c, + xcb_glx_context_tag_t context_tag, + int32_t n, + const uint32_t *textures); + +uint32_t * +xcb_glx_delete_textures_textures (const xcb_glx_delete_textures_request_t *R); + +int +xcb_glx_delete_textures_textures_length (const xcb_glx_delete_textures_request_t *R); + +xcb_generic_iterator_t +xcb_glx_delete_textures_textures_end (const xcb_glx_delete_textures_request_t *R); + +int +xcb_glx_gen_textures_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_glx_gen_textures_cookie_t +xcb_glx_gen_textures (xcb_connection_t *c, + xcb_glx_context_tag_t context_tag, + int32_t n); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_glx_gen_textures_cookie_t +xcb_glx_gen_textures_unchecked (xcb_connection_t *c, + xcb_glx_context_tag_t context_tag, + int32_t n); + +uint32_t * +xcb_glx_gen_textures_data (const xcb_glx_gen_textures_reply_t *R); + +int +xcb_glx_gen_textures_data_length (const xcb_glx_gen_textures_reply_t *R); + +xcb_generic_iterator_t +xcb_glx_gen_textures_data_end (const xcb_glx_gen_textures_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_glx_gen_textures_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_glx_gen_textures_reply_t * +xcb_glx_gen_textures_reply (xcb_connection_t *c, + xcb_glx_gen_textures_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_glx_is_texture_cookie_t +xcb_glx_is_texture (xcb_connection_t *c, + xcb_glx_context_tag_t context_tag, + uint32_t texture); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_glx_is_texture_cookie_t +xcb_glx_is_texture_unchecked (xcb_connection_t *c, + xcb_glx_context_tag_t context_tag, + uint32_t texture); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_glx_is_texture_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_glx_is_texture_reply_t * +xcb_glx_is_texture_reply (xcb_connection_t *c, + xcb_glx_is_texture_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_glx_get_color_table_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_glx_get_color_table_cookie_t +xcb_glx_get_color_table (xcb_connection_t *c, + xcb_glx_context_tag_t context_tag, + uint32_t target, + uint32_t format, + uint32_t type, + uint8_t swap_bytes); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_glx_get_color_table_cookie_t +xcb_glx_get_color_table_unchecked (xcb_connection_t *c, + xcb_glx_context_tag_t context_tag, + uint32_t target, + uint32_t format, + uint32_t type, + uint8_t swap_bytes); + +uint8_t * +xcb_glx_get_color_table_data (const xcb_glx_get_color_table_reply_t *R); + +int +xcb_glx_get_color_table_data_length (const xcb_glx_get_color_table_reply_t *R); + +xcb_generic_iterator_t +xcb_glx_get_color_table_data_end (const xcb_glx_get_color_table_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_glx_get_color_table_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_glx_get_color_table_reply_t * +xcb_glx_get_color_table_reply (xcb_connection_t *c, + xcb_glx_get_color_table_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_glx_get_color_table_parameterfv_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_glx_get_color_table_parameterfv_cookie_t +xcb_glx_get_color_table_parameterfv (xcb_connection_t *c, + xcb_glx_context_tag_t context_tag, + uint32_t target, + uint32_t pname); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_glx_get_color_table_parameterfv_cookie_t +xcb_glx_get_color_table_parameterfv_unchecked (xcb_connection_t *c, + xcb_glx_context_tag_t context_tag, + uint32_t target, + uint32_t pname); + +xcb_glx_float32_t * +xcb_glx_get_color_table_parameterfv_data (const xcb_glx_get_color_table_parameterfv_reply_t *R); + +int +xcb_glx_get_color_table_parameterfv_data_length (const xcb_glx_get_color_table_parameterfv_reply_t *R); + +xcb_generic_iterator_t +xcb_glx_get_color_table_parameterfv_data_end (const xcb_glx_get_color_table_parameterfv_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_glx_get_color_table_parameterfv_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_glx_get_color_table_parameterfv_reply_t * +xcb_glx_get_color_table_parameterfv_reply (xcb_connection_t *c, + xcb_glx_get_color_table_parameterfv_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_glx_get_color_table_parameteriv_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_glx_get_color_table_parameteriv_cookie_t +xcb_glx_get_color_table_parameteriv (xcb_connection_t *c, + xcb_glx_context_tag_t context_tag, + uint32_t target, + uint32_t pname); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_glx_get_color_table_parameteriv_cookie_t +xcb_glx_get_color_table_parameteriv_unchecked (xcb_connection_t *c, + xcb_glx_context_tag_t context_tag, + uint32_t target, + uint32_t pname); + +int32_t * +xcb_glx_get_color_table_parameteriv_data (const xcb_glx_get_color_table_parameteriv_reply_t *R); + +int +xcb_glx_get_color_table_parameteriv_data_length (const xcb_glx_get_color_table_parameteriv_reply_t *R); + +xcb_generic_iterator_t +xcb_glx_get_color_table_parameteriv_data_end (const xcb_glx_get_color_table_parameteriv_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_glx_get_color_table_parameteriv_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_glx_get_color_table_parameteriv_reply_t * +xcb_glx_get_color_table_parameteriv_reply (xcb_connection_t *c, + xcb_glx_get_color_table_parameteriv_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_glx_get_convolution_filter_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_glx_get_convolution_filter_cookie_t +xcb_glx_get_convolution_filter (xcb_connection_t *c, + xcb_glx_context_tag_t context_tag, + uint32_t target, + uint32_t format, + uint32_t type, + uint8_t swap_bytes); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_glx_get_convolution_filter_cookie_t +xcb_glx_get_convolution_filter_unchecked (xcb_connection_t *c, + xcb_glx_context_tag_t context_tag, + uint32_t target, + uint32_t format, + uint32_t type, + uint8_t swap_bytes); + +uint8_t * +xcb_glx_get_convolution_filter_data (const xcb_glx_get_convolution_filter_reply_t *R); + +int +xcb_glx_get_convolution_filter_data_length (const xcb_glx_get_convolution_filter_reply_t *R); + +xcb_generic_iterator_t +xcb_glx_get_convolution_filter_data_end (const xcb_glx_get_convolution_filter_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_glx_get_convolution_filter_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_glx_get_convolution_filter_reply_t * +xcb_glx_get_convolution_filter_reply (xcb_connection_t *c, + xcb_glx_get_convolution_filter_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_glx_get_convolution_parameterfv_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_glx_get_convolution_parameterfv_cookie_t +xcb_glx_get_convolution_parameterfv (xcb_connection_t *c, + xcb_glx_context_tag_t context_tag, + uint32_t target, + uint32_t pname); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_glx_get_convolution_parameterfv_cookie_t +xcb_glx_get_convolution_parameterfv_unchecked (xcb_connection_t *c, + xcb_glx_context_tag_t context_tag, + uint32_t target, + uint32_t pname); + +xcb_glx_float32_t * +xcb_glx_get_convolution_parameterfv_data (const xcb_glx_get_convolution_parameterfv_reply_t *R); + +int +xcb_glx_get_convolution_parameterfv_data_length (const xcb_glx_get_convolution_parameterfv_reply_t *R); + +xcb_generic_iterator_t +xcb_glx_get_convolution_parameterfv_data_end (const xcb_glx_get_convolution_parameterfv_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_glx_get_convolution_parameterfv_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_glx_get_convolution_parameterfv_reply_t * +xcb_glx_get_convolution_parameterfv_reply (xcb_connection_t *c, + xcb_glx_get_convolution_parameterfv_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_glx_get_convolution_parameteriv_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_glx_get_convolution_parameteriv_cookie_t +xcb_glx_get_convolution_parameteriv (xcb_connection_t *c, + xcb_glx_context_tag_t context_tag, + uint32_t target, + uint32_t pname); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_glx_get_convolution_parameteriv_cookie_t +xcb_glx_get_convolution_parameteriv_unchecked (xcb_connection_t *c, + xcb_glx_context_tag_t context_tag, + uint32_t target, + uint32_t pname); + +int32_t * +xcb_glx_get_convolution_parameteriv_data (const xcb_glx_get_convolution_parameteriv_reply_t *R); + +int +xcb_glx_get_convolution_parameteriv_data_length (const xcb_glx_get_convolution_parameteriv_reply_t *R); + +xcb_generic_iterator_t +xcb_glx_get_convolution_parameteriv_data_end (const xcb_glx_get_convolution_parameteriv_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_glx_get_convolution_parameteriv_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_glx_get_convolution_parameteriv_reply_t * +xcb_glx_get_convolution_parameteriv_reply (xcb_connection_t *c, + xcb_glx_get_convolution_parameteriv_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_glx_get_separable_filter_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_glx_get_separable_filter_cookie_t +xcb_glx_get_separable_filter (xcb_connection_t *c, + xcb_glx_context_tag_t context_tag, + uint32_t target, + uint32_t format, + uint32_t type, + uint8_t swap_bytes); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_glx_get_separable_filter_cookie_t +xcb_glx_get_separable_filter_unchecked (xcb_connection_t *c, + xcb_glx_context_tag_t context_tag, + uint32_t target, + uint32_t format, + uint32_t type, + uint8_t swap_bytes); + +uint8_t * +xcb_glx_get_separable_filter_rows_and_cols (const xcb_glx_get_separable_filter_reply_t *R); + +int +xcb_glx_get_separable_filter_rows_and_cols_length (const xcb_glx_get_separable_filter_reply_t *R); + +xcb_generic_iterator_t +xcb_glx_get_separable_filter_rows_and_cols_end (const xcb_glx_get_separable_filter_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_glx_get_separable_filter_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_glx_get_separable_filter_reply_t * +xcb_glx_get_separable_filter_reply (xcb_connection_t *c, + xcb_glx_get_separable_filter_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_glx_get_histogram_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_glx_get_histogram_cookie_t +xcb_glx_get_histogram (xcb_connection_t *c, + xcb_glx_context_tag_t context_tag, + uint32_t target, + uint32_t format, + uint32_t type, + uint8_t swap_bytes, + uint8_t reset); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_glx_get_histogram_cookie_t +xcb_glx_get_histogram_unchecked (xcb_connection_t *c, + xcb_glx_context_tag_t context_tag, + uint32_t target, + uint32_t format, + uint32_t type, + uint8_t swap_bytes, + uint8_t reset); + +uint8_t * +xcb_glx_get_histogram_data (const xcb_glx_get_histogram_reply_t *R); + +int +xcb_glx_get_histogram_data_length (const xcb_glx_get_histogram_reply_t *R); + +xcb_generic_iterator_t +xcb_glx_get_histogram_data_end (const xcb_glx_get_histogram_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_glx_get_histogram_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_glx_get_histogram_reply_t * +xcb_glx_get_histogram_reply (xcb_connection_t *c, + xcb_glx_get_histogram_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_glx_get_histogram_parameterfv_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_glx_get_histogram_parameterfv_cookie_t +xcb_glx_get_histogram_parameterfv (xcb_connection_t *c, + xcb_glx_context_tag_t context_tag, + uint32_t target, + uint32_t pname); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_glx_get_histogram_parameterfv_cookie_t +xcb_glx_get_histogram_parameterfv_unchecked (xcb_connection_t *c, + xcb_glx_context_tag_t context_tag, + uint32_t target, + uint32_t pname); + +xcb_glx_float32_t * +xcb_glx_get_histogram_parameterfv_data (const xcb_glx_get_histogram_parameterfv_reply_t *R); + +int +xcb_glx_get_histogram_parameterfv_data_length (const xcb_glx_get_histogram_parameterfv_reply_t *R); + +xcb_generic_iterator_t +xcb_glx_get_histogram_parameterfv_data_end (const xcb_glx_get_histogram_parameterfv_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_glx_get_histogram_parameterfv_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_glx_get_histogram_parameterfv_reply_t * +xcb_glx_get_histogram_parameterfv_reply (xcb_connection_t *c, + xcb_glx_get_histogram_parameterfv_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_glx_get_histogram_parameteriv_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_glx_get_histogram_parameteriv_cookie_t +xcb_glx_get_histogram_parameteriv (xcb_connection_t *c, + xcb_glx_context_tag_t context_tag, + uint32_t target, + uint32_t pname); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_glx_get_histogram_parameteriv_cookie_t +xcb_glx_get_histogram_parameteriv_unchecked (xcb_connection_t *c, + xcb_glx_context_tag_t context_tag, + uint32_t target, + uint32_t pname); + +int32_t * +xcb_glx_get_histogram_parameteriv_data (const xcb_glx_get_histogram_parameteriv_reply_t *R); + +int +xcb_glx_get_histogram_parameteriv_data_length (const xcb_glx_get_histogram_parameteriv_reply_t *R); + +xcb_generic_iterator_t +xcb_glx_get_histogram_parameteriv_data_end (const xcb_glx_get_histogram_parameteriv_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_glx_get_histogram_parameteriv_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_glx_get_histogram_parameteriv_reply_t * +xcb_glx_get_histogram_parameteriv_reply (xcb_connection_t *c, + xcb_glx_get_histogram_parameteriv_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_glx_get_minmax_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_glx_get_minmax_cookie_t +xcb_glx_get_minmax (xcb_connection_t *c, + xcb_glx_context_tag_t context_tag, + uint32_t target, + uint32_t format, + uint32_t type, + uint8_t swap_bytes, + uint8_t reset); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_glx_get_minmax_cookie_t +xcb_glx_get_minmax_unchecked (xcb_connection_t *c, + xcb_glx_context_tag_t context_tag, + uint32_t target, + uint32_t format, + uint32_t type, + uint8_t swap_bytes, + uint8_t reset); + +uint8_t * +xcb_glx_get_minmax_data (const xcb_glx_get_minmax_reply_t *R); + +int +xcb_glx_get_minmax_data_length (const xcb_glx_get_minmax_reply_t *R); + +xcb_generic_iterator_t +xcb_glx_get_minmax_data_end (const xcb_glx_get_minmax_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_glx_get_minmax_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_glx_get_minmax_reply_t * +xcb_glx_get_minmax_reply (xcb_connection_t *c, + xcb_glx_get_minmax_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_glx_get_minmax_parameterfv_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_glx_get_minmax_parameterfv_cookie_t +xcb_glx_get_minmax_parameterfv (xcb_connection_t *c, + xcb_glx_context_tag_t context_tag, + uint32_t target, + uint32_t pname); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_glx_get_minmax_parameterfv_cookie_t +xcb_glx_get_minmax_parameterfv_unchecked (xcb_connection_t *c, + xcb_glx_context_tag_t context_tag, + uint32_t target, + uint32_t pname); + +xcb_glx_float32_t * +xcb_glx_get_minmax_parameterfv_data (const xcb_glx_get_minmax_parameterfv_reply_t *R); + +int +xcb_glx_get_minmax_parameterfv_data_length (const xcb_glx_get_minmax_parameterfv_reply_t *R); + +xcb_generic_iterator_t +xcb_glx_get_minmax_parameterfv_data_end (const xcb_glx_get_minmax_parameterfv_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_glx_get_minmax_parameterfv_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_glx_get_minmax_parameterfv_reply_t * +xcb_glx_get_minmax_parameterfv_reply (xcb_connection_t *c, + xcb_glx_get_minmax_parameterfv_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_glx_get_minmax_parameteriv_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_glx_get_minmax_parameteriv_cookie_t +xcb_glx_get_minmax_parameteriv (xcb_connection_t *c, + xcb_glx_context_tag_t context_tag, + uint32_t target, + uint32_t pname); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_glx_get_minmax_parameteriv_cookie_t +xcb_glx_get_minmax_parameteriv_unchecked (xcb_connection_t *c, + xcb_glx_context_tag_t context_tag, + uint32_t target, + uint32_t pname); + +int32_t * +xcb_glx_get_minmax_parameteriv_data (const xcb_glx_get_minmax_parameteriv_reply_t *R); + +int +xcb_glx_get_minmax_parameteriv_data_length (const xcb_glx_get_minmax_parameteriv_reply_t *R); + +xcb_generic_iterator_t +xcb_glx_get_minmax_parameteriv_data_end (const xcb_glx_get_minmax_parameteriv_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_glx_get_minmax_parameteriv_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_glx_get_minmax_parameteriv_reply_t * +xcb_glx_get_minmax_parameteriv_reply (xcb_connection_t *c, + xcb_glx_get_minmax_parameteriv_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_glx_get_compressed_tex_image_arb_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_glx_get_compressed_tex_image_arb_cookie_t +xcb_glx_get_compressed_tex_image_arb (xcb_connection_t *c, + xcb_glx_context_tag_t context_tag, + uint32_t target, + int32_t level); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_glx_get_compressed_tex_image_arb_cookie_t +xcb_glx_get_compressed_tex_image_arb_unchecked (xcb_connection_t *c, + xcb_glx_context_tag_t context_tag, + uint32_t target, + int32_t level); + +uint8_t * +xcb_glx_get_compressed_tex_image_arb_data (const xcb_glx_get_compressed_tex_image_arb_reply_t *R); + +int +xcb_glx_get_compressed_tex_image_arb_data_length (const xcb_glx_get_compressed_tex_image_arb_reply_t *R); + +xcb_generic_iterator_t +xcb_glx_get_compressed_tex_image_arb_data_end (const xcb_glx_get_compressed_tex_image_arb_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_glx_get_compressed_tex_image_arb_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_glx_get_compressed_tex_image_arb_reply_t * +xcb_glx_get_compressed_tex_image_arb_reply (xcb_connection_t *c, + xcb_glx_get_compressed_tex_image_arb_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_glx_delete_queries_arb_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_glx_delete_queries_arb_checked (xcb_connection_t *c, + xcb_glx_context_tag_t context_tag, + int32_t n, + const uint32_t *ids); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_glx_delete_queries_arb (xcb_connection_t *c, + xcb_glx_context_tag_t context_tag, + int32_t n, + const uint32_t *ids); + +uint32_t * +xcb_glx_delete_queries_arb_ids (const xcb_glx_delete_queries_arb_request_t *R); + +int +xcb_glx_delete_queries_arb_ids_length (const xcb_glx_delete_queries_arb_request_t *R); + +xcb_generic_iterator_t +xcb_glx_delete_queries_arb_ids_end (const xcb_glx_delete_queries_arb_request_t *R); + +int +xcb_glx_gen_queries_arb_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_glx_gen_queries_arb_cookie_t +xcb_glx_gen_queries_arb (xcb_connection_t *c, + xcb_glx_context_tag_t context_tag, + int32_t n); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_glx_gen_queries_arb_cookie_t +xcb_glx_gen_queries_arb_unchecked (xcb_connection_t *c, + xcb_glx_context_tag_t context_tag, + int32_t n); + +uint32_t * +xcb_glx_gen_queries_arb_data (const xcb_glx_gen_queries_arb_reply_t *R); + +int +xcb_glx_gen_queries_arb_data_length (const xcb_glx_gen_queries_arb_reply_t *R); + +xcb_generic_iterator_t +xcb_glx_gen_queries_arb_data_end (const xcb_glx_gen_queries_arb_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_glx_gen_queries_arb_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_glx_gen_queries_arb_reply_t * +xcb_glx_gen_queries_arb_reply (xcb_connection_t *c, + xcb_glx_gen_queries_arb_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_glx_is_query_arb_cookie_t +xcb_glx_is_query_arb (xcb_connection_t *c, + xcb_glx_context_tag_t context_tag, + uint32_t id); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_glx_is_query_arb_cookie_t +xcb_glx_is_query_arb_unchecked (xcb_connection_t *c, + xcb_glx_context_tag_t context_tag, + uint32_t id); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_glx_is_query_arb_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_glx_is_query_arb_reply_t * +xcb_glx_is_query_arb_reply (xcb_connection_t *c, + xcb_glx_is_query_arb_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_glx_get_queryiv_arb_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_glx_get_queryiv_arb_cookie_t +xcb_glx_get_queryiv_arb (xcb_connection_t *c, + xcb_glx_context_tag_t context_tag, + uint32_t target, + uint32_t pname); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_glx_get_queryiv_arb_cookie_t +xcb_glx_get_queryiv_arb_unchecked (xcb_connection_t *c, + xcb_glx_context_tag_t context_tag, + uint32_t target, + uint32_t pname); + +int32_t * +xcb_glx_get_queryiv_arb_data (const xcb_glx_get_queryiv_arb_reply_t *R); + +int +xcb_glx_get_queryiv_arb_data_length (const xcb_glx_get_queryiv_arb_reply_t *R); + +xcb_generic_iterator_t +xcb_glx_get_queryiv_arb_data_end (const xcb_glx_get_queryiv_arb_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_glx_get_queryiv_arb_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_glx_get_queryiv_arb_reply_t * +xcb_glx_get_queryiv_arb_reply (xcb_connection_t *c, + xcb_glx_get_queryiv_arb_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_glx_get_query_objectiv_arb_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_glx_get_query_objectiv_arb_cookie_t +xcb_glx_get_query_objectiv_arb (xcb_connection_t *c, + xcb_glx_context_tag_t context_tag, + uint32_t id, + uint32_t pname); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_glx_get_query_objectiv_arb_cookie_t +xcb_glx_get_query_objectiv_arb_unchecked (xcb_connection_t *c, + xcb_glx_context_tag_t context_tag, + uint32_t id, + uint32_t pname); + +int32_t * +xcb_glx_get_query_objectiv_arb_data (const xcb_glx_get_query_objectiv_arb_reply_t *R); + +int +xcb_glx_get_query_objectiv_arb_data_length (const xcb_glx_get_query_objectiv_arb_reply_t *R); + +xcb_generic_iterator_t +xcb_glx_get_query_objectiv_arb_data_end (const xcb_glx_get_query_objectiv_arb_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_glx_get_query_objectiv_arb_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_glx_get_query_objectiv_arb_reply_t * +xcb_glx_get_query_objectiv_arb_reply (xcb_connection_t *c, + xcb_glx_get_query_objectiv_arb_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_glx_get_query_objectuiv_arb_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_glx_get_query_objectuiv_arb_cookie_t +xcb_glx_get_query_objectuiv_arb (xcb_connection_t *c, + xcb_glx_context_tag_t context_tag, + uint32_t id, + uint32_t pname); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_glx_get_query_objectuiv_arb_cookie_t +xcb_glx_get_query_objectuiv_arb_unchecked (xcb_connection_t *c, + xcb_glx_context_tag_t context_tag, + uint32_t id, + uint32_t pname); + +uint32_t * +xcb_glx_get_query_objectuiv_arb_data (const xcb_glx_get_query_objectuiv_arb_reply_t *R); + +int +xcb_glx_get_query_objectuiv_arb_data_length (const xcb_glx_get_query_objectuiv_arb_reply_t *R); + +xcb_generic_iterator_t +xcb_glx_get_query_objectuiv_arb_data_end (const xcb_glx_get_query_objectuiv_arb_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_glx_get_query_objectuiv_arb_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_glx_get_query_objectuiv_arb_reply_t * +xcb_glx_get_query_objectuiv_arb_reply (xcb_connection_t *c, + xcb_glx_get_query_objectuiv_arb_cookie_t cookie /**< */, + xcb_generic_error_t **e); + + +#ifdef __cplusplus +} +#endif + +#endif + +/** + * @} + */ diff --git a/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/include/xcb/present.h b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/include/xcb/present.h new file mode 100644 index 0000000000000000000000000000000000000000..963f035915f8a9bf437d500028898c811554f8e7 --- /dev/null +++ b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/include/xcb/present.h @@ -0,0 +1,751 @@ +/* + * This file generated automatically from present.xml by c_client.py. + * Edit at your peril. + */ + +/** + * @defgroup XCB_Present_API XCB Present API + * @brief Present XCB Protocol Implementation. + * @{ + **/ + +#ifndef __PRESENT_H +#define __PRESENT_H + +#include "xcb.h" +#include "xproto.h" +#include "randr.h" +#include "xfixes.h" +#include "sync.h" +#include "dri3.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#define XCB_PRESENT_MAJOR_VERSION 1 +#define XCB_PRESENT_MINOR_VERSION 4 + +extern xcb_extension_t xcb_present_id; + +typedef enum xcb_present_event_enum_t { + XCB_PRESENT_EVENT_CONFIGURE_NOTIFY = 0, + XCB_PRESENT_EVENT_COMPLETE_NOTIFY = 1, + XCB_PRESENT_EVENT_IDLE_NOTIFY = 2, + XCB_PRESENT_EVENT_REDIRECT_NOTIFY = 3 +} xcb_present_event_enum_t; + +typedef enum xcb_present_event_mask_t { + XCB_PRESENT_EVENT_MASK_NO_EVENT = 0, + XCB_PRESENT_EVENT_MASK_CONFIGURE_NOTIFY = 1, + XCB_PRESENT_EVENT_MASK_COMPLETE_NOTIFY = 2, + XCB_PRESENT_EVENT_MASK_IDLE_NOTIFY = 4, + XCB_PRESENT_EVENT_MASK_REDIRECT_NOTIFY = 8 +} xcb_present_event_mask_t; + +typedef enum xcb_present_option_t { + XCB_PRESENT_OPTION_NONE = 0, + XCB_PRESENT_OPTION_ASYNC = 1, + XCB_PRESENT_OPTION_COPY = 2, + XCB_PRESENT_OPTION_UST = 4, + XCB_PRESENT_OPTION_SUBOPTIMAL = 8, + XCB_PRESENT_OPTION_ASYNC_MAY_TEAR = 16 +} xcb_present_option_t; + +typedef enum xcb_present_capability_t { + XCB_PRESENT_CAPABILITY_NONE = 0, + XCB_PRESENT_CAPABILITY_ASYNC = 1, + XCB_PRESENT_CAPABILITY_FENCE = 2, + XCB_PRESENT_CAPABILITY_UST = 4, + XCB_PRESENT_CAPABILITY_ASYNC_MAY_TEAR = 8, + XCB_PRESENT_CAPABILITY_SYNCOBJ = 16 +} xcb_present_capability_t; + +typedef enum xcb_present_complete_kind_t { + XCB_PRESENT_COMPLETE_KIND_PIXMAP = 0, + XCB_PRESENT_COMPLETE_KIND_NOTIFY_MSC = 1 +} xcb_present_complete_kind_t; + +typedef enum xcb_present_complete_mode_t { + XCB_PRESENT_COMPLETE_MODE_COPY = 0, + XCB_PRESENT_COMPLETE_MODE_FLIP = 1, + XCB_PRESENT_COMPLETE_MODE_SKIP = 2, + XCB_PRESENT_COMPLETE_MODE_SUBOPTIMAL_COPY = 3 +} xcb_present_complete_mode_t; + +/** + * @brief xcb_present_notify_t + **/ +typedef struct xcb_present_notify_t { + xcb_window_t window; + uint32_t serial; +} xcb_present_notify_t; + +/** + * @brief xcb_present_notify_iterator_t + **/ +typedef struct xcb_present_notify_iterator_t { + xcb_present_notify_t *data; + int rem; + int index; +} xcb_present_notify_iterator_t; + +/** + * @brief xcb_present_query_version_cookie_t + **/ +typedef struct xcb_present_query_version_cookie_t { + unsigned int sequence; +} xcb_present_query_version_cookie_t; + +/** Opcode for xcb_present_query_version. */ +#define XCB_PRESENT_QUERY_VERSION 0 + +/** + * @brief xcb_present_query_version_request_t + **/ +typedef struct xcb_present_query_version_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + uint32_t major_version; + uint32_t minor_version; +} xcb_present_query_version_request_t; + +/** + * @brief xcb_present_query_version_reply_t + **/ +typedef struct xcb_present_query_version_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint32_t major_version; + uint32_t minor_version; +} xcb_present_query_version_reply_t; + +/** Opcode for xcb_present_pixmap. */ +#define XCB_PRESENT_PIXMAP 1 + +/** + * @brief xcb_present_pixmap_request_t + **/ +typedef struct xcb_present_pixmap_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_window_t window; + xcb_pixmap_t pixmap; + uint32_t serial; + xcb_xfixes_region_t valid; + xcb_xfixes_region_t update; + int16_t x_off; + int16_t y_off; + xcb_randr_crtc_t target_crtc; + xcb_sync_fence_t wait_fence; + xcb_sync_fence_t idle_fence; + uint32_t options; + uint8_t pad0[4]; + uint64_t target_msc; + uint64_t divisor; + uint64_t remainder; +} xcb_present_pixmap_request_t; + +/** Opcode for xcb_present_notify_msc. */ +#define XCB_PRESENT_NOTIFY_MSC 2 + +/** + * @brief xcb_present_notify_msc_request_t + **/ +typedef struct xcb_present_notify_msc_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_window_t window; + uint32_t serial; + uint8_t pad0[4]; + uint64_t target_msc; + uint64_t divisor; + uint64_t remainder; +} xcb_present_notify_msc_request_t; + +typedef uint32_t xcb_present_event_t; + +/** + * @brief xcb_present_event_iterator_t + **/ +typedef struct xcb_present_event_iterator_t { + xcb_present_event_t *data; + int rem; + int index; +} xcb_present_event_iterator_t; + +/** Opcode for xcb_present_select_input. */ +#define XCB_PRESENT_SELECT_INPUT 3 + +/** + * @brief xcb_present_select_input_request_t + **/ +typedef struct xcb_present_select_input_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_present_event_t eid; + xcb_window_t window; + uint32_t event_mask; +} xcb_present_select_input_request_t; + +/** + * @brief xcb_present_query_capabilities_cookie_t + **/ +typedef struct xcb_present_query_capabilities_cookie_t { + unsigned int sequence; +} xcb_present_query_capabilities_cookie_t; + +/** Opcode for xcb_present_query_capabilities. */ +#define XCB_PRESENT_QUERY_CAPABILITIES 4 + +/** + * @brief xcb_present_query_capabilities_request_t + **/ +typedef struct xcb_present_query_capabilities_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + uint32_t target; +} xcb_present_query_capabilities_request_t; + +/** + * @brief xcb_present_query_capabilities_reply_t + **/ +typedef struct xcb_present_query_capabilities_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint32_t capabilities; +} xcb_present_query_capabilities_reply_t; + +/** Opcode for xcb_present_pixmap_synced. */ +#define XCB_PRESENT_PIXMAP_SYNCED 5 + +/** + * @brief xcb_present_pixmap_synced_request_t + **/ +typedef struct xcb_present_pixmap_synced_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_window_t window; + xcb_pixmap_t pixmap; + uint32_t serial; + xcb_xfixes_region_t valid; + xcb_xfixes_region_t update; + int16_t x_off; + int16_t y_off; + xcb_randr_crtc_t target_crtc; + xcb_dri3_syncobj_t acquire_syncobj; + xcb_dri3_syncobj_t release_syncobj; + uint64_t acquire_point; + uint64_t release_point; + uint32_t options; + uint8_t pad0[4]; + uint64_t target_msc; + uint64_t divisor; + uint64_t remainder; +} xcb_present_pixmap_synced_request_t; + +/** Opcode for xcb_present_generic. */ +#define XCB_PRESENT_GENERIC 0 + +/** + * @brief xcb_present_generic_event_t + **/ +typedef struct xcb_present_generic_event_t { + uint8_t response_type; + uint8_t extension; + uint16_t sequence; + uint32_t length; + uint16_t evtype; + uint8_t pad0[2]; + xcb_present_event_t event; +} xcb_present_generic_event_t; + +/** Opcode for xcb_present_configure_notify. */ +#define XCB_PRESENT_CONFIGURE_NOTIFY 0 + +/** + * @brief xcb_present_configure_notify_event_t + **/ +typedef struct xcb_present_configure_notify_event_t { + uint8_t response_type; + uint8_t extension; + uint16_t sequence; + uint32_t length; + uint16_t event_type; + uint8_t pad0[2]; + xcb_present_event_t event; + xcb_window_t window; + int16_t x; + int16_t y; + uint16_t width; + uint16_t height; + int16_t off_x; + int16_t off_y; + uint32_t full_sequence; + uint16_t pixmap_width; + uint16_t pixmap_height; + uint32_t pixmap_flags; +} xcb_present_configure_notify_event_t; + +/** Opcode for xcb_present_complete_notify. */ +#define XCB_PRESENT_COMPLETE_NOTIFY 1 + +/** + * @brief xcb_present_complete_notify_event_t + **/ +typedef struct xcb_present_complete_notify_event_t { + uint8_t response_type; + uint8_t extension; + uint16_t sequence; + uint32_t length; + uint16_t event_type; + uint8_t kind; + uint8_t mode; + xcb_present_event_t event; + xcb_window_t window; + uint32_t serial; + uint64_t ust; + uint32_t full_sequence; + uint64_t msc; +} XCB_PACKED xcb_present_complete_notify_event_t; + +/** Opcode for xcb_present_idle_notify. */ +#define XCB_PRESENT_IDLE_NOTIFY 2 + +/** + * @brief xcb_present_idle_notify_event_t + **/ +typedef struct xcb_present_idle_notify_event_t { + uint8_t response_type; + uint8_t extension; + uint16_t sequence; + uint32_t length; + uint16_t event_type; + uint8_t pad0[2]; + xcb_present_event_t event; + xcb_window_t window; + uint32_t serial; + xcb_pixmap_t pixmap; + xcb_sync_fence_t idle_fence; + uint32_t full_sequence; +} xcb_present_idle_notify_event_t; + +/** Opcode for xcb_present_redirect_notify. */ +#define XCB_PRESENT_REDIRECT_NOTIFY 3 + +/** + * @brief xcb_present_redirect_notify_event_t + **/ +typedef struct xcb_present_redirect_notify_event_t { + uint8_t response_type; + uint8_t extension; + uint16_t sequence; + uint32_t length; + uint16_t event_type; + uint8_t update_window; + uint8_t pad0; + xcb_present_event_t event; + xcb_window_t event_window; + xcb_window_t window; + xcb_pixmap_t pixmap; + uint32_t serial; + uint32_t full_sequence; + xcb_xfixes_region_t valid_region; + xcb_xfixes_region_t update_region; + xcb_rectangle_t valid_rect; + xcb_rectangle_t update_rect; + int16_t x_off; + int16_t y_off; + xcb_randr_crtc_t target_crtc; + xcb_sync_fence_t wait_fence; + xcb_sync_fence_t idle_fence; + uint32_t options; + uint8_t pad1[4]; + uint64_t target_msc; + uint64_t divisor; + uint64_t remainder; +} XCB_PACKED xcb_present_redirect_notify_event_t; + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_present_notify_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_present_notify_t) + */ +void +xcb_present_notify_next (xcb_present_notify_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_present_notify_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_present_notify_end (xcb_present_notify_iterator_t i); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_present_query_version_cookie_t +xcb_present_query_version (xcb_connection_t *c, + uint32_t major_version, + uint32_t minor_version); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_present_query_version_cookie_t +xcb_present_query_version_unchecked (xcb_connection_t *c, + uint32_t major_version, + uint32_t minor_version); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_present_query_version_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_present_query_version_reply_t * +xcb_present_query_version_reply (xcb_connection_t *c, + xcb_present_query_version_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_present_pixmap_sizeof (const void *_buffer, + uint32_t notifies_len); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_present_pixmap_checked (xcb_connection_t *c, + xcb_window_t window, + xcb_pixmap_t pixmap, + uint32_t serial, + xcb_xfixes_region_t valid, + xcb_xfixes_region_t update, + int16_t x_off, + int16_t y_off, + xcb_randr_crtc_t target_crtc, + xcb_sync_fence_t wait_fence, + xcb_sync_fence_t idle_fence, + uint32_t options, + uint64_t target_msc, + uint64_t divisor, + uint64_t remainder, + uint32_t notifies_len, + const xcb_present_notify_t *notifies); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_present_pixmap (xcb_connection_t *c, + xcb_window_t window, + xcb_pixmap_t pixmap, + uint32_t serial, + xcb_xfixes_region_t valid, + xcb_xfixes_region_t update, + int16_t x_off, + int16_t y_off, + xcb_randr_crtc_t target_crtc, + xcb_sync_fence_t wait_fence, + xcb_sync_fence_t idle_fence, + uint32_t options, + uint64_t target_msc, + uint64_t divisor, + uint64_t remainder, + uint32_t notifies_len, + const xcb_present_notify_t *notifies); + +xcb_present_notify_t * +xcb_present_pixmap_notifies (const xcb_present_pixmap_request_t *R); + +int +xcb_present_pixmap_notifies_length (const xcb_present_pixmap_request_t *R); + +xcb_present_notify_iterator_t +xcb_present_pixmap_notifies_iterator (const xcb_present_pixmap_request_t *R); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_present_notify_msc_checked (xcb_connection_t *c, + xcb_window_t window, + uint32_t serial, + uint64_t target_msc, + uint64_t divisor, + uint64_t remainder); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_present_notify_msc (xcb_connection_t *c, + xcb_window_t window, + uint32_t serial, + uint64_t target_msc, + uint64_t divisor, + uint64_t remainder); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_present_event_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_present_event_t) + */ +void +xcb_present_event_next (xcb_present_event_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_present_event_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_present_event_end (xcb_present_event_iterator_t i); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_present_select_input_checked (xcb_connection_t *c, + xcb_present_event_t eid, + xcb_window_t window, + uint32_t event_mask); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_present_select_input (xcb_connection_t *c, + xcb_present_event_t eid, + xcb_window_t window, + uint32_t event_mask); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_present_query_capabilities_cookie_t +xcb_present_query_capabilities (xcb_connection_t *c, + uint32_t target); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_present_query_capabilities_cookie_t +xcb_present_query_capabilities_unchecked (xcb_connection_t *c, + uint32_t target); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_present_query_capabilities_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_present_query_capabilities_reply_t * +xcb_present_query_capabilities_reply (xcb_connection_t *c, + xcb_present_query_capabilities_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_present_pixmap_synced_sizeof (const void *_buffer, + uint32_t notifies_len); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_present_pixmap_synced_checked (xcb_connection_t *c, + xcb_window_t window, + xcb_pixmap_t pixmap, + uint32_t serial, + xcb_xfixes_region_t valid, + xcb_xfixes_region_t update, + int16_t x_off, + int16_t y_off, + xcb_randr_crtc_t target_crtc, + xcb_dri3_syncobj_t acquire_syncobj, + xcb_dri3_syncobj_t release_syncobj, + uint64_t acquire_point, + uint64_t release_point, + uint32_t options, + uint64_t target_msc, + uint64_t divisor, + uint64_t remainder, + uint32_t notifies_len, + const xcb_present_notify_t *notifies); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_present_pixmap_synced (xcb_connection_t *c, + xcb_window_t window, + xcb_pixmap_t pixmap, + uint32_t serial, + xcb_xfixes_region_t valid, + xcb_xfixes_region_t update, + int16_t x_off, + int16_t y_off, + xcb_randr_crtc_t target_crtc, + xcb_dri3_syncobj_t acquire_syncobj, + xcb_dri3_syncobj_t release_syncobj, + uint64_t acquire_point, + uint64_t release_point, + uint32_t options, + uint64_t target_msc, + uint64_t divisor, + uint64_t remainder, + uint32_t notifies_len, + const xcb_present_notify_t *notifies); + +xcb_present_notify_t * +xcb_present_pixmap_synced_notifies (const xcb_present_pixmap_synced_request_t *R); + +int +xcb_present_pixmap_synced_notifies_length (const xcb_present_pixmap_synced_request_t *R); + +xcb_present_notify_iterator_t +xcb_present_pixmap_synced_notifies_iterator (const xcb_present_pixmap_synced_request_t *R); + +int +xcb_present_redirect_notify_sizeof (const void *_buffer, + uint32_t notifies_len); + +xcb_present_notify_t * +xcb_present_redirect_notify_notifies (const xcb_present_redirect_notify_event_t *R); + +int +xcb_present_redirect_notify_notifies_length (const xcb_present_redirect_notify_event_t *R); + +xcb_present_notify_iterator_t +xcb_present_redirect_notify_notifies_iterator (const xcb_present_redirect_notify_event_t *R); + + +#ifdef __cplusplus +} +#endif + +#endif + +/** + * @} + */ diff --git a/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/include/xcb/randr.h b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/include/xcb/randr.h new file mode 100644 index 0000000000000000000000000000000000000000..cc04c8eac3e34b148490dffd7457bcd471266a22 --- /dev/null +++ b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/include/xcb/randr.h @@ -0,0 +1,4588 @@ +/* + * This file generated automatically from randr.xml by c_client.py. + * Edit at your peril. + */ + +/** + * @defgroup XCB_RandR_API XCB RandR API + * @brief RandR XCB Protocol Implementation. + * @{ + **/ + +#ifndef __RANDR_H +#define __RANDR_H + +#include "xcb.h" +#include "xproto.h" +#include "render.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#define XCB_RANDR_MAJOR_VERSION 1 +#define XCB_RANDR_MINOR_VERSION 6 + +extern xcb_extension_t xcb_randr_id; + +typedef uint32_t xcb_randr_mode_t; + +/** + * @brief xcb_randr_mode_iterator_t + **/ +typedef struct xcb_randr_mode_iterator_t { + xcb_randr_mode_t *data; + int rem; + int index; +} xcb_randr_mode_iterator_t; + +typedef uint32_t xcb_randr_crtc_t; + +/** + * @brief xcb_randr_crtc_iterator_t + **/ +typedef struct xcb_randr_crtc_iterator_t { + xcb_randr_crtc_t *data; + int rem; + int index; +} xcb_randr_crtc_iterator_t; + +typedef uint32_t xcb_randr_output_t; + +/** + * @brief xcb_randr_output_iterator_t + **/ +typedef struct xcb_randr_output_iterator_t { + xcb_randr_output_t *data; + int rem; + int index; +} xcb_randr_output_iterator_t; + +typedef uint32_t xcb_randr_provider_t; + +/** + * @brief xcb_randr_provider_iterator_t + **/ +typedef struct xcb_randr_provider_iterator_t { + xcb_randr_provider_t *data; + int rem; + int index; +} xcb_randr_provider_iterator_t; + +typedef uint32_t xcb_randr_lease_t; + +/** + * @brief xcb_randr_lease_iterator_t + **/ +typedef struct xcb_randr_lease_iterator_t { + xcb_randr_lease_t *data; + int rem; + int index; +} xcb_randr_lease_iterator_t; + +/** Opcode for xcb_randr_bad_output. */ +#define XCB_RANDR_BAD_OUTPUT 0 + +/** + * @brief xcb_randr_bad_output_error_t + **/ +typedef struct xcb_randr_bad_output_error_t { + uint8_t response_type; + uint8_t error_code; + uint16_t sequence; + uint32_t bad_value; + uint16_t minor_opcode; + uint8_t major_opcode; +} xcb_randr_bad_output_error_t; + +/** Opcode for xcb_randr_bad_crtc. */ +#define XCB_RANDR_BAD_CRTC 1 + +/** + * @brief xcb_randr_bad_crtc_error_t + **/ +typedef struct xcb_randr_bad_crtc_error_t { + uint8_t response_type; + uint8_t error_code; + uint16_t sequence; + uint32_t bad_value; + uint16_t minor_opcode; + uint8_t major_opcode; +} xcb_randr_bad_crtc_error_t; + +/** Opcode for xcb_randr_bad_mode. */ +#define XCB_RANDR_BAD_MODE 2 + +/** + * @brief xcb_randr_bad_mode_error_t + **/ +typedef struct xcb_randr_bad_mode_error_t { + uint8_t response_type; + uint8_t error_code; + uint16_t sequence; + uint32_t bad_value; + uint16_t minor_opcode; + uint8_t major_opcode; +} xcb_randr_bad_mode_error_t; + +/** Opcode for xcb_randr_bad_provider. */ +#define XCB_RANDR_BAD_PROVIDER 3 + +/** + * @brief xcb_randr_bad_provider_error_t + **/ +typedef struct xcb_randr_bad_provider_error_t { + uint8_t response_type; + uint8_t error_code; + uint16_t sequence; + uint32_t bad_value; + uint16_t minor_opcode; + uint8_t major_opcode; +} xcb_randr_bad_provider_error_t; + +typedef enum xcb_randr_rotation_t { + XCB_RANDR_ROTATION_ROTATE_0 = 1, + XCB_RANDR_ROTATION_ROTATE_90 = 2, + XCB_RANDR_ROTATION_ROTATE_180 = 4, + XCB_RANDR_ROTATION_ROTATE_270 = 8, + XCB_RANDR_ROTATION_REFLECT_X = 16, + XCB_RANDR_ROTATION_REFLECT_Y = 32 +} xcb_randr_rotation_t; + +/** + * @brief xcb_randr_screen_size_t + **/ +typedef struct xcb_randr_screen_size_t { + uint16_t width; + uint16_t height; + uint16_t mwidth; + uint16_t mheight; +} xcb_randr_screen_size_t; + +/** + * @brief xcb_randr_screen_size_iterator_t + **/ +typedef struct xcb_randr_screen_size_iterator_t { + xcb_randr_screen_size_t *data; + int rem; + int index; +} xcb_randr_screen_size_iterator_t; + +/** + * @brief xcb_randr_refresh_rates_t + **/ +typedef struct xcb_randr_refresh_rates_t { + uint16_t nRates; +} xcb_randr_refresh_rates_t; + +/** + * @brief xcb_randr_refresh_rates_iterator_t + **/ +typedef struct xcb_randr_refresh_rates_iterator_t { + xcb_randr_refresh_rates_t *data; + int rem; + int index; +} xcb_randr_refresh_rates_iterator_t; + +/** + * @brief xcb_randr_query_version_cookie_t + **/ +typedef struct xcb_randr_query_version_cookie_t { + unsigned int sequence; +} xcb_randr_query_version_cookie_t; + +/** Opcode for xcb_randr_query_version. */ +#define XCB_RANDR_QUERY_VERSION 0 + +/** + * @brief xcb_randr_query_version_request_t + **/ +typedef struct xcb_randr_query_version_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + uint32_t major_version; + uint32_t minor_version; +} xcb_randr_query_version_request_t; + +/** + * @brief xcb_randr_query_version_reply_t + **/ +typedef struct xcb_randr_query_version_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint32_t major_version; + uint32_t minor_version; + uint8_t pad1[16]; +} xcb_randr_query_version_reply_t; + +typedef enum xcb_randr_set_config_t { + XCB_RANDR_SET_CONFIG_SUCCESS = 0, + XCB_RANDR_SET_CONFIG_INVALID_CONFIG_TIME = 1, + XCB_RANDR_SET_CONFIG_INVALID_TIME = 2, + XCB_RANDR_SET_CONFIG_FAILED = 3 +} xcb_randr_set_config_t; + +/** + * @brief xcb_randr_set_screen_config_cookie_t + **/ +typedef struct xcb_randr_set_screen_config_cookie_t { + unsigned int sequence; +} xcb_randr_set_screen_config_cookie_t; + +/** Opcode for xcb_randr_set_screen_config. */ +#define XCB_RANDR_SET_SCREEN_CONFIG 2 + +/** + * @brief xcb_randr_set_screen_config_request_t + **/ +typedef struct xcb_randr_set_screen_config_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_window_t window; + xcb_timestamp_t timestamp; + xcb_timestamp_t config_timestamp; + uint16_t sizeID; + uint16_t rotation; + uint16_t rate; + uint8_t pad0[2]; +} xcb_randr_set_screen_config_request_t; + +/** + * @brief xcb_randr_set_screen_config_reply_t + **/ +typedef struct xcb_randr_set_screen_config_reply_t { + uint8_t response_type; + uint8_t status; + uint16_t sequence; + uint32_t length; + xcb_timestamp_t new_timestamp; + xcb_timestamp_t config_timestamp; + xcb_window_t root; + uint16_t subpixel_order; + uint8_t pad0[10]; +} xcb_randr_set_screen_config_reply_t; + +typedef enum xcb_randr_notify_mask_t { + XCB_RANDR_NOTIFY_MASK_SCREEN_CHANGE = 1, + XCB_RANDR_NOTIFY_MASK_CRTC_CHANGE = 2, + XCB_RANDR_NOTIFY_MASK_OUTPUT_CHANGE = 4, + XCB_RANDR_NOTIFY_MASK_OUTPUT_PROPERTY = 8, + XCB_RANDR_NOTIFY_MASK_PROVIDER_CHANGE = 16, + XCB_RANDR_NOTIFY_MASK_PROVIDER_PROPERTY = 32, + XCB_RANDR_NOTIFY_MASK_RESOURCE_CHANGE = 64, + XCB_RANDR_NOTIFY_MASK_LEASE = 128 +} xcb_randr_notify_mask_t; + +/** Opcode for xcb_randr_select_input. */ +#define XCB_RANDR_SELECT_INPUT 4 + +/** + * @brief xcb_randr_select_input_request_t + **/ +typedef struct xcb_randr_select_input_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_window_t window; + uint16_t enable; + uint8_t pad0[2]; +} xcb_randr_select_input_request_t; + +/** + * @brief xcb_randr_get_screen_info_cookie_t + **/ +typedef struct xcb_randr_get_screen_info_cookie_t { + unsigned int sequence; +} xcb_randr_get_screen_info_cookie_t; + +/** Opcode for xcb_randr_get_screen_info. */ +#define XCB_RANDR_GET_SCREEN_INFO 5 + +/** + * @brief xcb_randr_get_screen_info_request_t + **/ +typedef struct xcb_randr_get_screen_info_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_window_t window; +} xcb_randr_get_screen_info_request_t; + +/** + * @brief xcb_randr_get_screen_info_reply_t + **/ +typedef struct xcb_randr_get_screen_info_reply_t { + uint8_t response_type; + uint8_t rotations; + uint16_t sequence; + uint32_t length; + xcb_window_t root; + xcb_timestamp_t timestamp; + xcb_timestamp_t config_timestamp; + uint16_t nSizes; + uint16_t sizeID; + uint16_t rotation; + uint16_t rate; + uint16_t nInfo; + uint8_t pad0[2]; +} xcb_randr_get_screen_info_reply_t; + +/** + * @brief xcb_randr_get_screen_size_range_cookie_t + **/ +typedef struct xcb_randr_get_screen_size_range_cookie_t { + unsigned int sequence; +} xcb_randr_get_screen_size_range_cookie_t; + +/** Opcode for xcb_randr_get_screen_size_range. */ +#define XCB_RANDR_GET_SCREEN_SIZE_RANGE 6 + +/** + * @brief xcb_randr_get_screen_size_range_request_t + **/ +typedef struct xcb_randr_get_screen_size_range_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_window_t window; +} xcb_randr_get_screen_size_range_request_t; + +/** + * @brief xcb_randr_get_screen_size_range_reply_t + **/ +typedef struct xcb_randr_get_screen_size_range_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint16_t min_width; + uint16_t min_height; + uint16_t max_width; + uint16_t max_height; + uint8_t pad1[16]; +} xcb_randr_get_screen_size_range_reply_t; + +/** Opcode for xcb_randr_set_screen_size. */ +#define XCB_RANDR_SET_SCREEN_SIZE 7 + +/** + * @brief xcb_randr_set_screen_size_request_t + **/ +typedef struct xcb_randr_set_screen_size_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_window_t window; + uint16_t width; + uint16_t height; + uint32_t mm_width; + uint32_t mm_height; +} xcb_randr_set_screen_size_request_t; + +typedef enum xcb_randr_mode_flag_t { + XCB_RANDR_MODE_FLAG_HSYNC_POSITIVE = 1, + XCB_RANDR_MODE_FLAG_HSYNC_NEGATIVE = 2, + XCB_RANDR_MODE_FLAG_VSYNC_POSITIVE = 4, + XCB_RANDR_MODE_FLAG_VSYNC_NEGATIVE = 8, + XCB_RANDR_MODE_FLAG_INTERLACE = 16, + XCB_RANDR_MODE_FLAG_DOUBLE_SCAN = 32, + XCB_RANDR_MODE_FLAG_CSYNC = 64, + XCB_RANDR_MODE_FLAG_CSYNC_POSITIVE = 128, + XCB_RANDR_MODE_FLAG_CSYNC_NEGATIVE = 256, + XCB_RANDR_MODE_FLAG_HSKEW_PRESENT = 512, + XCB_RANDR_MODE_FLAG_BCAST = 1024, + XCB_RANDR_MODE_FLAG_PIXEL_MULTIPLEX = 2048, + XCB_RANDR_MODE_FLAG_DOUBLE_CLOCK = 4096, + XCB_RANDR_MODE_FLAG_HALVE_CLOCK = 8192 +} xcb_randr_mode_flag_t; + +/** + * @brief xcb_randr_mode_info_t + **/ +typedef struct xcb_randr_mode_info_t { + uint32_t id; + uint16_t width; + uint16_t height; + uint32_t dot_clock; + uint16_t hsync_start; + uint16_t hsync_end; + uint16_t htotal; + uint16_t hskew; + uint16_t vsync_start; + uint16_t vsync_end; + uint16_t vtotal; + uint16_t name_len; + uint32_t mode_flags; +} xcb_randr_mode_info_t; + +/** + * @brief xcb_randr_mode_info_iterator_t + **/ +typedef struct xcb_randr_mode_info_iterator_t { + xcb_randr_mode_info_t *data; + int rem; + int index; +} xcb_randr_mode_info_iterator_t; + +/** + * @brief xcb_randr_get_screen_resources_cookie_t + **/ +typedef struct xcb_randr_get_screen_resources_cookie_t { + unsigned int sequence; +} xcb_randr_get_screen_resources_cookie_t; + +/** Opcode for xcb_randr_get_screen_resources. */ +#define XCB_RANDR_GET_SCREEN_RESOURCES 8 + +/** + * @brief xcb_randr_get_screen_resources_request_t + **/ +typedef struct xcb_randr_get_screen_resources_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_window_t window; +} xcb_randr_get_screen_resources_request_t; + +/** + * @brief xcb_randr_get_screen_resources_reply_t + **/ +typedef struct xcb_randr_get_screen_resources_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + xcb_timestamp_t timestamp; + xcb_timestamp_t config_timestamp; + uint16_t num_crtcs; + uint16_t num_outputs; + uint16_t num_modes; + uint16_t names_len; + uint8_t pad1[8]; +} xcb_randr_get_screen_resources_reply_t; + +typedef enum xcb_randr_connection_t { + XCB_RANDR_CONNECTION_CONNECTED = 0, + XCB_RANDR_CONNECTION_DISCONNECTED = 1, + XCB_RANDR_CONNECTION_UNKNOWN = 2 +} xcb_randr_connection_t; + +/** + * @brief xcb_randr_get_output_info_cookie_t + **/ +typedef struct xcb_randr_get_output_info_cookie_t { + unsigned int sequence; +} xcb_randr_get_output_info_cookie_t; + +/** Opcode for xcb_randr_get_output_info. */ +#define XCB_RANDR_GET_OUTPUT_INFO 9 + +/** + * @brief xcb_randr_get_output_info_request_t + **/ +typedef struct xcb_randr_get_output_info_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_randr_output_t output; + xcb_timestamp_t config_timestamp; +} xcb_randr_get_output_info_request_t; + +/** + * @brief xcb_randr_get_output_info_reply_t + **/ +typedef struct xcb_randr_get_output_info_reply_t { + uint8_t response_type; + uint8_t status; + uint16_t sequence; + uint32_t length; + xcb_timestamp_t timestamp; + xcb_randr_crtc_t crtc; + uint32_t mm_width; + uint32_t mm_height; + uint8_t connection; + uint8_t subpixel_order; + uint16_t num_crtcs; + uint16_t num_modes; + uint16_t num_preferred; + uint16_t num_clones; + uint16_t name_len; +} xcb_randr_get_output_info_reply_t; + +/** + * @brief xcb_randr_list_output_properties_cookie_t + **/ +typedef struct xcb_randr_list_output_properties_cookie_t { + unsigned int sequence; +} xcb_randr_list_output_properties_cookie_t; + +/** Opcode for xcb_randr_list_output_properties. */ +#define XCB_RANDR_LIST_OUTPUT_PROPERTIES 10 + +/** + * @brief xcb_randr_list_output_properties_request_t + **/ +typedef struct xcb_randr_list_output_properties_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_randr_output_t output; +} xcb_randr_list_output_properties_request_t; + +/** + * @brief xcb_randr_list_output_properties_reply_t + **/ +typedef struct xcb_randr_list_output_properties_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint16_t num_atoms; + uint8_t pad1[22]; +} xcb_randr_list_output_properties_reply_t; + +/** + * @brief xcb_randr_query_output_property_cookie_t + **/ +typedef struct xcb_randr_query_output_property_cookie_t { + unsigned int sequence; +} xcb_randr_query_output_property_cookie_t; + +/** Opcode for xcb_randr_query_output_property. */ +#define XCB_RANDR_QUERY_OUTPUT_PROPERTY 11 + +/** + * @brief xcb_randr_query_output_property_request_t + **/ +typedef struct xcb_randr_query_output_property_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_randr_output_t output; + xcb_atom_t property; +} xcb_randr_query_output_property_request_t; + +/** + * @brief xcb_randr_query_output_property_reply_t + **/ +typedef struct xcb_randr_query_output_property_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint8_t pending; + uint8_t range; + uint8_t immutable; + uint8_t pad1[21]; +} xcb_randr_query_output_property_reply_t; + +/** Opcode for xcb_randr_configure_output_property. */ +#define XCB_RANDR_CONFIGURE_OUTPUT_PROPERTY 12 + +/** + * @brief xcb_randr_configure_output_property_request_t + **/ +typedef struct xcb_randr_configure_output_property_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_randr_output_t output; + xcb_atom_t property; + uint8_t pending; + uint8_t range; + uint8_t pad0[2]; +} xcb_randr_configure_output_property_request_t; + +/** Opcode for xcb_randr_change_output_property. */ +#define XCB_RANDR_CHANGE_OUTPUT_PROPERTY 13 + +/** + * @brief xcb_randr_change_output_property_request_t + **/ +typedef struct xcb_randr_change_output_property_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_randr_output_t output; + xcb_atom_t property; + xcb_atom_t type; + uint8_t format; + uint8_t mode; + uint8_t pad0[2]; + uint32_t num_units; +} xcb_randr_change_output_property_request_t; + +/** Opcode for xcb_randr_delete_output_property. */ +#define XCB_RANDR_DELETE_OUTPUT_PROPERTY 14 + +/** + * @brief xcb_randr_delete_output_property_request_t + **/ +typedef struct xcb_randr_delete_output_property_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_randr_output_t output; + xcb_atom_t property; +} xcb_randr_delete_output_property_request_t; + +/** + * @brief xcb_randr_get_output_property_cookie_t + **/ +typedef struct xcb_randr_get_output_property_cookie_t { + unsigned int sequence; +} xcb_randr_get_output_property_cookie_t; + +/** Opcode for xcb_randr_get_output_property. */ +#define XCB_RANDR_GET_OUTPUT_PROPERTY 15 + +/** + * @brief xcb_randr_get_output_property_request_t + **/ +typedef struct xcb_randr_get_output_property_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_randr_output_t output; + xcb_atom_t property; + xcb_atom_t type; + uint32_t long_offset; + uint32_t long_length; + uint8_t _delete; + uint8_t pending; + uint8_t pad0[2]; +} xcb_randr_get_output_property_request_t; + +/** + * @brief xcb_randr_get_output_property_reply_t + **/ +typedef struct xcb_randr_get_output_property_reply_t { + uint8_t response_type; + uint8_t format; + uint16_t sequence; + uint32_t length; + xcb_atom_t type; + uint32_t bytes_after; + uint32_t num_items; + uint8_t pad0[12]; +} xcb_randr_get_output_property_reply_t; + +/** + * @brief xcb_randr_create_mode_cookie_t + **/ +typedef struct xcb_randr_create_mode_cookie_t { + unsigned int sequence; +} xcb_randr_create_mode_cookie_t; + +/** Opcode for xcb_randr_create_mode. */ +#define XCB_RANDR_CREATE_MODE 16 + +/** + * @brief xcb_randr_create_mode_request_t + **/ +typedef struct xcb_randr_create_mode_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_window_t window; + xcb_randr_mode_info_t mode_info; +} xcb_randr_create_mode_request_t; + +/** + * @brief xcb_randr_create_mode_reply_t + **/ +typedef struct xcb_randr_create_mode_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + xcb_randr_mode_t mode; + uint8_t pad1[20]; +} xcb_randr_create_mode_reply_t; + +/** Opcode for xcb_randr_destroy_mode. */ +#define XCB_RANDR_DESTROY_MODE 17 + +/** + * @brief xcb_randr_destroy_mode_request_t + **/ +typedef struct xcb_randr_destroy_mode_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_randr_mode_t mode; +} xcb_randr_destroy_mode_request_t; + +/** Opcode for xcb_randr_add_output_mode. */ +#define XCB_RANDR_ADD_OUTPUT_MODE 18 + +/** + * @brief xcb_randr_add_output_mode_request_t + **/ +typedef struct xcb_randr_add_output_mode_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_randr_output_t output; + xcb_randr_mode_t mode; +} xcb_randr_add_output_mode_request_t; + +/** Opcode for xcb_randr_delete_output_mode. */ +#define XCB_RANDR_DELETE_OUTPUT_MODE 19 + +/** + * @brief xcb_randr_delete_output_mode_request_t + **/ +typedef struct xcb_randr_delete_output_mode_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_randr_output_t output; + xcb_randr_mode_t mode; +} xcb_randr_delete_output_mode_request_t; + +/** + * @brief xcb_randr_get_crtc_info_cookie_t + **/ +typedef struct xcb_randr_get_crtc_info_cookie_t { + unsigned int sequence; +} xcb_randr_get_crtc_info_cookie_t; + +/** Opcode for xcb_randr_get_crtc_info. */ +#define XCB_RANDR_GET_CRTC_INFO 20 + +/** + * @brief xcb_randr_get_crtc_info_request_t + **/ +typedef struct xcb_randr_get_crtc_info_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_randr_crtc_t crtc; + xcb_timestamp_t config_timestamp; +} xcb_randr_get_crtc_info_request_t; + +/** + * @brief xcb_randr_get_crtc_info_reply_t + **/ +typedef struct xcb_randr_get_crtc_info_reply_t { + uint8_t response_type; + uint8_t status; + uint16_t sequence; + uint32_t length; + xcb_timestamp_t timestamp; + int16_t x; + int16_t y; + uint16_t width; + uint16_t height; + xcb_randr_mode_t mode; + uint16_t rotation; + uint16_t rotations; + uint16_t num_outputs; + uint16_t num_possible_outputs; +} xcb_randr_get_crtc_info_reply_t; + +/** + * @brief xcb_randr_set_crtc_config_cookie_t + **/ +typedef struct xcb_randr_set_crtc_config_cookie_t { + unsigned int sequence; +} xcb_randr_set_crtc_config_cookie_t; + +/** Opcode for xcb_randr_set_crtc_config. */ +#define XCB_RANDR_SET_CRTC_CONFIG 21 + +/** + * @brief xcb_randr_set_crtc_config_request_t + **/ +typedef struct xcb_randr_set_crtc_config_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_randr_crtc_t crtc; + xcb_timestamp_t timestamp; + xcb_timestamp_t config_timestamp; + int16_t x; + int16_t y; + xcb_randr_mode_t mode; + uint16_t rotation; + uint8_t pad0[2]; +} xcb_randr_set_crtc_config_request_t; + +/** + * @brief xcb_randr_set_crtc_config_reply_t + **/ +typedef struct xcb_randr_set_crtc_config_reply_t { + uint8_t response_type; + uint8_t status; + uint16_t sequence; + uint32_t length; + xcb_timestamp_t timestamp; + uint8_t pad0[20]; +} xcb_randr_set_crtc_config_reply_t; + +/** + * @brief xcb_randr_get_crtc_gamma_size_cookie_t + **/ +typedef struct xcb_randr_get_crtc_gamma_size_cookie_t { + unsigned int sequence; +} xcb_randr_get_crtc_gamma_size_cookie_t; + +/** Opcode for xcb_randr_get_crtc_gamma_size. */ +#define XCB_RANDR_GET_CRTC_GAMMA_SIZE 22 + +/** + * @brief xcb_randr_get_crtc_gamma_size_request_t + **/ +typedef struct xcb_randr_get_crtc_gamma_size_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_randr_crtc_t crtc; +} xcb_randr_get_crtc_gamma_size_request_t; + +/** + * @brief xcb_randr_get_crtc_gamma_size_reply_t + **/ +typedef struct xcb_randr_get_crtc_gamma_size_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint16_t size; + uint8_t pad1[22]; +} xcb_randr_get_crtc_gamma_size_reply_t; + +/** + * @brief xcb_randr_get_crtc_gamma_cookie_t + **/ +typedef struct xcb_randr_get_crtc_gamma_cookie_t { + unsigned int sequence; +} xcb_randr_get_crtc_gamma_cookie_t; + +/** Opcode for xcb_randr_get_crtc_gamma. */ +#define XCB_RANDR_GET_CRTC_GAMMA 23 + +/** + * @brief xcb_randr_get_crtc_gamma_request_t + **/ +typedef struct xcb_randr_get_crtc_gamma_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_randr_crtc_t crtc; +} xcb_randr_get_crtc_gamma_request_t; + +/** + * @brief xcb_randr_get_crtc_gamma_reply_t + **/ +typedef struct xcb_randr_get_crtc_gamma_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint16_t size; + uint8_t pad1[22]; +} xcb_randr_get_crtc_gamma_reply_t; + +/** Opcode for xcb_randr_set_crtc_gamma. */ +#define XCB_RANDR_SET_CRTC_GAMMA 24 + +/** + * @brief xcb_randr_set_crtc_gamma_request_t + **/ +typedef struct xcb_randr_set_crtc_gamma_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_randr_crtc_t crtc; + uint16_t size; + uint8_t pad0[2]; +} xcb_randr_set_crtc_gamma_request_t; + +/** + * @brief xcb_randr_get_screen_resources_current_cookie_t + **/ +typedef struct xcb_randr_get_screen_resources_current_cookie_t { + unsigned int sequence; +} xcb_randr_get_screen_resources_current_cookie_t; + +/** Opcode for xcb_randr_get_screen_resources_current. */ +#define XCB_RANDR_GET_SCREEN_RESOURCES_CURRENT 25 + +/** + * @brief xcb_randr_get_screen_resources_current_request_t + **/ +typedef struct xcb_randr_get_screen_resources_current_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_window_t window; +} xcb_randr_get_screen_resources_current_request_t; + +/** + * @brief xcb_randr_get_screen_resources_current_reply_t + **/ +typedef struct xcb_randr_get_screen_resources_current_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + xcb_timestamp_t timestamp; + xcb_timestamp_t config_timestamp; + uint16_t num_crtcs; + uint16_t num_outputs; + uint16_t num_modes; + uint16_t names_len; + uint8_t pad1[8]; +} xcb_randr_get_screen_resources_current_reply_t; + +typedef enum xcb_randr_transform_t { + XCB_RANDR_TRANSFORM_UNIT = 1, + XCB_RANDR_TRANSFORM_SCALE_UP = 2, + XCB_RANDR_TRANSFORM_SCALE_DOWN = 4, + XCB_RANDR_TRANSFORM_PROJECTIVE = 8 +} xcb_randr_transform_t; + +/** Opcode for xcb_randr_set_crtc_transform. */ +#define XCB_RANDR_SET_CRTC_TRANSFORM 26 + +/** + * @brief xcb_randr_set_crtc_transform_request_t + **/ +typedef struct xcb_randr_set_crtc_transform_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_randr_crtc_t crtc; + xcb_render_transform_t transform; + uint16_t filter_len; + uint8_t pad0[2]; +} xcb_randr_set_crtc_transform_request_t; + +/** + * @brief xcb_randr_get_crtc_transform_cookie_t + **/ +typedef struct xcb_randr_get_crtc_transform_cookie_t { + unsigned int sequence; +} xcb_randr_get_crtc_transform_cookie_t; + +/** Opcode for xcb_randr_get_crtc_transform. */ +#define XCB_RANDR_GET_CRTC_TRANSFORM 27 + +/** + * @brief xcb_randr_get_crtc_transform_request_t + **/ +typedef struct xcb_randr_get_crtc_transform_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_randr_crtc_t crtc; +} xcb_randr_get_crtc_transform_request_t; + +/** + * @brief xcb_randr_get_crtc_transform_reply_t + **/ +typedef struct xcb_randr_get_crtc_transform_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + xcb_render_transform_t pending_transform; + uint8_t has_transforms; + uint8_t pad1[3]; + xcb_render_transform_t current_transform; + uint8_t pad2[4]; + uint16_t pending_len; + uint16_t pending_nparams; + uint16_t current_len; + uint16_t current_nparams; +} xcb_randr_get_crtc_transform_reply_t; + +/** + * @brief xcb_randr_get_panning_cookie_t + **/ +typedef struct xcb_randr_get_panning_cookie_t { + unsigned int sequence; +} xcb_randr_get_panning_cookie_t; + +/** Opcode for xcb_randr_get_panning. */ +#define XCB_RANDR_GET_PANNING 28 + +/** + * @brief xcb_randr_get_panning_request_t + **/ +typedef struct xcb_randr_get_panning_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_randr_crtc_t crtc; +} xcb_randr_get_panning_request_t; + +/** + * @brief xcb_randr_get_panning_reply_t + **/ +typedef struct xcb_randr_get_panning_reply_t { + uint8_t response_type; + uint8_t status; + uint16_t sequence; + uint32_t length; + xcb_timestamp_t timestamp; + uint16_t left; + uint16_t top; + uint16_t width; + uint16_t height; + uint16_t track_left; + uint16_t track_top; + uint16_t track_width; + uint16_t track_height; + int16_t border_left; + int16_t border_top; + int16_t border_right; + int16_t border_bottom; +} xcb_randr_get_panning_reply_t; + +/** + * @brief xcb_randr_set_panning_cookie_t + **/ +typedef struct xcb_randr_set_panning_cookie_t { + unsigned int sequence; +} xcb_randr_set_panning_cookie_t; + +/** Opcode for xcb_randr_set_panning. */ +#define XCB_RANDR_SET_PANNING 29 + +/** + * @brief xcb_randr_set_panning_request_t + **/ +typedef struct xcb_randr_set_panning_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_randr_crtc_t crtc; + xcb_timestamp_t timestamp; + uint16_t left; + uint16_t top; + uint16_t width; + uint16_t height; + uint16_t track_left; + uint16_t track_top; + uint16_t track_width; + uint16_t track_height; + int16_t border_left; + int16_t border_top; + int16_t border_right; + int16_t border_bottom; +} xcb_randr_set_panning_request_t; + +/** + * @brief xcb_randr_set_panning_reply_t + **/ +typedef struct xcb_randr_set_panning_reply_t { + uint8_t response_type; + uint8_t status; + uint16_t sequence; + uint32_t length; + xcb_timestamp_t timestamp; +} xcb_randr_set_panning_reply_t; + +/** Opcode for xcb_randr_set_output_primary. */ +#define XCB_RANDR_SET_OUTPUT_PRIMARY 30 + +/** + * @brief xcb_randr_set_output_primary_request_t + **/ +typedef struct xcb_randr_set_output_primary_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_window_t window; + xcb_randr_output_t output; +} xcb_randr_set_output_primary_request_t; + +/** + * @brief xcb_randr_get_output_primary_cookie_t + **/ +typedef struct xcb_randr_get_output_primary_cookie_t { + unsigned int sequence; +} xcb_randr_get_output_primary_cookie_t; + +/** Opcode for xcb_randr_get_output_primary. */ +#define XCB_RANDR_GET_OUTPUT_PRIMARY 31 + +/** + * @brief xcb_randr_get_output_primary_request_t + **/ +typedef struct xcb_randr_get_output_primary_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_window_t window; +} xcb_randr_get_output_primary_request_t; + +/** + * @brief xcb_randr_get_output_primary_reply_t + **/ +typedef struct xcb_randr_get_output_primary_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + xcb_randr_output_t output; +} xcb_randr_get_output_primary_reply_t; + +/** + * @brief xcb_randr_get_providers_cookie_t + **/ +typedef struct xcb_randr_get_providers_cookie_t { + unsigned int sequence; +} xcb_randr_get_providers_cookie_t; + +/** Opcode for xcb_randr_get_providers. */ +#define XCB_RANDR_GET_PROVIDERS 32 + +/** + * @brief xcb_randr_get_providers_request_t + **/ +typedef struct xcb_randr_get_providers_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_window_t window; +} xcb_randr_get_providers_request_t; + +/** + * @brief xcb_randr_get_providers_reply_t + **/ +typedef struct xcb_randr_get_providers_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + xcb_timestamp_t timestamp; + uint16_t num_providers; + uint8_t pad1[18]; +} xcb_randr_get_providers_reply_t; + +typedef enum xcb_randr_provider_capability_t { + XCB_RANDR_PROVIDER_CAPABILITY_SOURCE_OUTPUT = 1, + XCB_RANDR_PROVIDER_CAPABILITY_SINK_OUTPUT = 2, + XCB_RANDR_PROVIDER_CAPABILITY_SOURCE_OFFLOAD = 4, + XCB_RANDR_PROVIDER_CAPABILITY_SINK_OFFLOAD = 8 +} xcb_randr_provider_capability_t; + +/** + * @brief xcb_randr_get_provider_info_cookie_t + **/ +typedef struct xcb_randr_get_provider_info_cookie_t { + unsigned int sequence; +} xcb_randr_get_provider_info_cookie_t; + +/** Opcode for xcb_randr_get_provider_info. */ +#define XCB_RANDR_GET_PROVIDER_INFO 33 + +/** + * @brief xcb_randr_get_provider_info_request_t + **/ +typedef struct xcb_randr_get_provider_info_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_randr_provider_t provider; + xcb_timestamp_t config_timestamp; +} xcb_randr_get_provider_info_request_t; + +/** + * @brief xcb_randr_get_provider_info_reply_t + **/ +typedef struct xcb_randr_get_provider_info_reply_t { + uint8_t response_type; + uint8_t status; + uint16_t sequence; + uint32_t length; + xcb_timestamp_t timestamp; + uint32_t capabilities; + uint16_t num_crtcs; + uint16_t num_outputs; + uint16_t num_associated_providers; + uint16_t name_len; + uint8_t pad0[8]; +} xcb_randr_get_provider_info_reply_t; + +/** Opcode for xcb_randr_set_provider_offload_sink. */ +#define XCB_RANDR_SET_PROVIDER_OFFLOAD_SINK 34 + +/** + * @brief xcb_randr_set_provider_offload_sink_request_t + **/ +typedef struct xcb_randr_set_provider_offload_sink_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_randr_provider_t provider; + xcb_randr_provider_t sink_provider; + xcb_timestamp_t config_timestamp; +} xcb_randr_set_provider_offload_sink_request_t; + +/** Opcode for xcb_randr_set_provider_output_source. */ +#define XCB_RANDR_SET_PROVIDER_OUTPUT_SOURCE 35 + +/** + * @brief xcb_randr_set_provider_output_source_request_t + **/ +typedef struct xcb_randr_set_provider_output_source_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_randr_provider_t provider; + xcb_randr_provider_t source_provider; + xcb_timestamp_t config_timestamp; +} xcb_randr_set_provider_output_source_request_t; + +/** + * @brief xcb_randr_list_provider_properties_cookie_t + **/ +typedef struct xcb_randr_list_provider_properties_cookie_t { + unsigned int sequence; +} xcb_randr_list_provider_properties_cookie_t; + +/** Opcode for xcb_randr_list_provider_properties. */ +#define XCB_RANDR_LIST_PROVIDER_PROPERTIES 36 + +/** + * @brief xcb_randr_list_provider_properties_request_t + **/ +typedef struct xcb_randr_list_provider_properties_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_randr_provider_t provider; +} xcb_randr_list_provider_properties_request_t; + +/** + * @brief xcb_randr_list_provider_properties_reply_t + **/ +typedef struct xcb_randr_list_provider_properties_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint16_t num_atoms; + uint8_t pad1[22]; +} xcb_randr_list_provider_properties_reply_t; + +/** + * @brief xcb_randr_query_provider_property_cookie_t + **/ +typedef struct xcb_randr_query_provider_property_cookie_t { + unsigned int sequence; +} xcb_randr_query_provider_property_cookie_t; + +/** Opcode for xcb_randr_query_provider_property. */ +#define XCB_RANDR_QUERY_PROVIDER_PROPERTY 37 + +/** + * @brief xcb_randr_query_provider_property_request_t + **/ +typedef struct xcb_randr_query_provider_property_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_randr_provider_t provider; + xcb_atom_t property; +} xcb_randr_query_provider_property_request_t; + +/** + * @brief xcb_randr_query_provider_property_reply_t + **/ +typedef struct xcb_randr_query_provider_property_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint8_t pending; + uint8_t range; + uint8_t immutable; + uint8_t pad1[21]; +} xcb_randr_query_provider_property_reply_t; + +/** Opcode for xcb_randr_configure_provider_property. */ +#define XCB_RANDR_CONFIGURE_PROVIDER_PROPERTY 38 + +/** + * @brief xcb_randr_configure_provider_property_request_t + **/ +typedef struct xcb_randr_configure_provider_property_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_randr_provider_t provider; + xcb_atom_t property; + uint8_t pending; + uint8_t range; + uint8_t pad0[2]; +} xcb_randr_configure_provider_property_request_t; + +/** Opcode for xcb_randr_change_provider_property. */ +#define XCB_RANDR_CHANGE_PROVIDER_PROPERTY 39 + +/** + * @brief xcb_randr_change_provider_property_request_t + **/ +typedef struct xcb_randr_change_provider_property_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_randr_provider_t provider; + xcb_atom_t property; + xcb_atom_t type; + uint8_t format; + uint8_t mode; + uint8_t pad0[2]; + uint32_t num_items; +} xcb_randr_change_provider_property_request_t; + +/** Opcode for xcb_randr_delete_provider_property. */ +#define XCB_RANDR_DELETE_PROVIDER_PROPERTY 40 + +/** + * @brief xcb_randr_delete_provider_property_request_t + **/ +typedef struct xcb_randr_delete_provider_property_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_randr_provider_t provider; + xcb_atom_t property; +} xcb_randr_delete_provider_property_request_t; + +/** + * @brief xcb_randr_get_provider_property_cookie_t + **/ +typedef struct xcb_randr_get_provider_property_cookie_t { + unsigned int sequence; +} xcb_randr_get_provider_property_cookie_t; + +/** Opcode for xcb_randr_get_provider_property. */ +#define XCB_RANDR_GET_PROVIDER_PROPERTY 41 + +/** + * @brief xcb_randr_get_provider_property_request_t + **/ +typedef struct xcb_randr_get_provider_property_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_randr_provider_t provider; + xcb_atom_t property; + xcb_atom_t type; + uint32_t long_offset; + uint32_t long_length; + uint8_t _delete; + uint8_t pending; + uint8_t pad0[2]; +} xcb_randr_get_provider_property_request_t; + +/** + * @brief xcb_randr_get_provider_property_reply_t + **/ +typedef struct xcb_randr_get_provider_property_reply_t { + uint8_t response_type; + uint8_t format; + uint16_t sequence; + uint32_t length; + xcb_atom_t type; + uint32_t bytes_after; + uint32_t num_items; + uint8_t pad0[12]; +} xcb_randr_get_provider_property_reply_t; + +/** Opcode for xcb_randr_screen_change_notify. */ +#define XCB_RANDR_SCREEN_CHANGE_NOTIFY 0 + +/** + * @brief xcb_randr_screen_change_notify_event_t + **/ +typedef struct xcb_randr_screen_change_notify_event_t { + uint8_t response_type; + uint8_t rotation; + uint16_t sequence; + xcb_timestamp_t timestamp; + xcb_timestamp_t config_timestamp; + xcb_window_t root; + xcb_window_t request_window; + uint16_t sizeID; + uint16_t subpixel_order; + uint16_t width; + uint16_t height; + uint16_t mwidth; + uint16_t mheight; +} xcb_randr_screen_change_notify_event_t; + +typedef enum xcb_randr_notify_t { + XCB_RANDR_NOTIFY_CRTC_CHANGE = 0, + XCB_RANDR_NOTIFY_OUTPUT_CHANGE = 1, + XCB_RANDR_NOTIFY_OUTPUT_PROPERTY = 2, + XCB_RANDR_NOTIFY_PROVIDER_CHANGE = 3, + XCB_RANDR_NOTIFY_PROVIDER_PROPERTY = 4, + XCB_RANDR_NOTIFY_RESOURCE_CHANGE = 5, + XCB_RANDR_NOTIFY_LEASE = 6 +} xcb_randr_notify_t; + +/** + * @brief xcb_randr_crtc_change_t + **/ +typedef struct xcb_randr_crtc_change_t { + xcb_timestamp_t timestamp; + xcb_window_t window; + xcb_randr_crtc_t crtc; + xcb_randr_mode_t mode; + uint16_t rotation; + uint8_t pad0[2]; + int16_t x; + int16_t y; + uint16_t width; + uint16_t height; +} xcb_randr_crtc_change_t; + +/** + * @brief xcb_randr_crtc_change_iterator_t + **/ +typedef struct xcb_randr_crtc_change_iterator_t { + xcb_randr_crtc_change_t *data; + int rem; + int index; +} xcb_randr_crtc_change_iterator_t; + +/** + * @brief xcb_randr_output_change_t + **/ +typedef struct xcb_randr_output_change_t { + xcb_timestamp_t timestamp; + xcb_timestamp_t config_timestamp; + xcb_window_t window; + xcb_randr_output_t output; + xcb_randr_crtc_t crtc; + xcb_randr_mode_t mode; + uint16_t rotation; + uint8_t connection; + uint8_t subpixel_order; +} xcb_randr_output_change_t; + +/** + * @brief xcb_randr_output_change_iterator_t + **/ +typedef struct xcb_randr_output_change_iterator_t { + xcb_randr_output_change_t *data; + int rem; + int index; +} xcb_randr_output_change_iterator_t; + +/** + * @brief xcb_randr_output_property_t + **/ +typedef struct xcb_randr_output_property_t { + xcb_window_t window; + xcb_randr_output_t output; + xcb_atom_t atom; + xcb_timestamp_t timestamp; + uint8_t status; + uint8_t pad0[11]; +} xcb_randr_output_property_t; + +/** + * @brief xcb_randr_output_property_iterator_t + **/ +typedef struct xcb_randr_output_property_iterator_t { + xcb_randr_output_property_t *data; + int rem; + int index; +} xcb_randr_output_property_iterator_t; + +/** + * @brief xcb_randr_provider_change_t + **/ +typedef struct xcb_randr_provider_change_t { + xcb_timestamp_t timestamp; + xcb_window_t window; + xcb_randr_provider_t provider; + uint8_t pad0[16]; +} xcb_randr_provider_change_t; + +/** + * @brief xcb_randr_provider_change_iterator_t + **/ +typedef struct xcb_randr_provider_change_iterator_t { + xcb_randr_provider_change_t *data; + int rem; + int index; +} xcb_randr_provider_change_iterator_t; + +/** + * @brief xcb_randr_provider_property_t + **/ +typedef struct xcb_randr_provider_property_t { + xcb_window_t window; + xcb_randr_provider_t provider; + xcb_atom_t atom; + xcb_timestamp_t timestamp; + uint8_t state; + uint8_t pad0[11]; +} xcb_randr_provider_property_t; + +/** + * @brief xcb_randr_provider_property_iterator_t + **/ +typedef struct xcb_randr_provider_property_iterator_t { + xcb_randr_provider_property_t *data; + int rem; + int index; +} xcb_randr_provider_property_iterator_t; + +/** + * @brief xcb_randr_resource_change_t + **/ +typedef struct xcb_randr_resource_change_t { + xcb_timestamp_t timestamp; + xcb_window_t window; + uint8_t pad0[20]; +} xcb_randr_resource_change_t; + +/** + * @brief xcb_randr_resource_change_iterator_t + **/ +typedef struct xcb_randr_resource_change_iterator_t { + xcb_randr_resource_change_t *data; + int rem; + int index; +} xcb_randr_resource_change_iterator_t; + +/** + * @brief xcb_randr_monitor_info_t + **/ +typedef struct xcb_randr_monitor_info_t { + xcb_atom_t name; + uint8_t primary; + uint8_t automatic; + uint16_t nOutput; + int16_t x; + int16_t y; + uint16_t width; + uint16_t height; + uint32_t width_in_millimeters; + uint32_t height_in_millimeters; +} xcb_randr_monitor_info_t; + +/** + * @brief xcb_randr_monitor_info_iterator_t + **/ +typedef struct xcb_randr_monitor_info_iterator_t { + xcb_randr_monitor_info_t *data; + int rem; + int index; +} xcb_randr_monitor_info_iterator_t; + +/** + * @brief xcb_randr_get_monitors_cookie_t + **/ +typedef struct xcb_randr_get_monitors_cookie_t { + unsigned int sequence; +} xcb_randr_get_monitors_cookie_t; + +/** Opcode for xcb_randr_get_monitors. */ +#define XCB_RANDR_GET_MONITORS 42 + +/** + * @brief xcb_randr_get_monitors_request_t + **/ +typedef struct xcb_randr_get_monitors_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_window_t window; + uint8_t get_active; +} xcb_randr_get_monitors_request_t; + +/** + * @brief xcb_randr_get_monitors_reply_t + **/ +typedef struct xcb_randr_get_monitors_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + xcb_timestamp_t timestamp; + uint32_t nMonitors; + uint32_t nOutputs; + uint8_t pad1[12]; +} xcb_randr_get_monitors_reply_t; + +/** Opcode for xcb_randr_set_monitor. */ +#define XCB_RANDR_SET_MONITOR 43 + +/** + * @brief xcb_randr_set_monitor_request_t + **/ +typedef struct xcb_randr_set_monitor_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_window_t window; +} xcb_randr_set_monitor_request_t; + +/** Opcode for xcb_randr_delete_monitor. */ +#define XCB_RANDR_DELETE_MONITOR 44 + +/** + * @brief xcb_randr_delete_monitor_request_t + **/ +typedef struct xcb_randr_delete_monitor_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_window_t window; + xcb_atom_t name; +} xcb_randr_delete_monitor_request_t; + +/** + * @brief xcb_randr_create_lease_cookie_t + **/ +typedef struct xcb_randr_create_lease_cookie_t { + unsigned int sequence; +} xcb_randr_create_lease_cookie_t; + +/** Opcode for xcb_randr_create_lease. */ +#define XCB_RANDR_CREATE_LEASE 45 + +/** + * @brief xcb_randr_create_lease_request_t + **/ +typedef struct xcb_randr_create_lease_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_window_t window; + xcb_randr_lease_t lid; + uint16_t num_crtcs; + uint16_t num_outputs; +} xcb_randr_create_lease_request_t; + +/** + * @brief xcb_randr_create_lease_reply_t + **/ +typedef struct xcb_randr_create_lease_reply_t { + uint8_t response_type; + uint8_t nfd; + uint16_t sequence; + uint32_t length; + uint8_t pad0[24]; +} xcb_randr_create_lease_reply_t; + +/** Opcode for xcb_randr_free_lease. */ +#define XCB_RANDR_FREE_LEASE 46 + +/** + * @brief xcb_randr_free_lease_request_t + **/ +typedef struct xcb_randr_free_lease_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_randr_lease_t lid; + uint8_t terminate; +} xcb_randr_free_lease_request_t; + +/** + * @brief xcb_randr_lease_notify_t + **/ +typedef struct xcb_randr_lease_notify_t { + xcb_timestamp_t timestamp; + xcb_window_t window; + xcb_randr_lease_t lease; + uint8_t created; + uint8_t pad0[15]; +} xcb_randr_lease_notify_t; + +/** + * @brief xcb_randr_lease_notify_iterator_t + **/ +typedef struct xcb_randr_lease_notify_iterator_t { + xcb_randr_lease_notify_t *data; + int rem; + int index; +} xcb_randr_lease_notify_iterator_t; + +/** + * @brief xcb_randr_notify_data_t + **/ +typedef union xcb_randr_notify_data_t { + xcb_randr_crtc_change_t cc; + xcb_randr_output_change_t oc; + xcb_randr_output_property_t op; + xcb_randr_provider_change_t pc; + xcb_randr_provider_property_t pp; + xcb_randr_resource_change_t rc; + xcb_randr_lease_notify_t lc; +} xcb_randr_notify_data_t; + +/** + * @brief xcb_randr_notify_data_iterator_t + **/ +typedef struct xcb_randr_notify_data_iterator_t { + xcb_randr_notify_data_t *data; + int rem; + int index; +} xcb_randr_notify_data_iterator_t; + +/** Opcode for xcb_randr_notify. */ +#define XCB_RANDR_NOTIFY 1 + +/** + * @brief xcb_randr_notify_event_t + **/ +typedef struct xcb_randr_notify_event_t { + uint8_t response_type; + uint8_t subCode; + uint16_t sequence; + xcb_randr_notify_data_t u; +} xcb_randr_notify_event_t; + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_randr_mode_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_randr_mode_t) + */ +void +xcb_randr_mode_next (xcb_randr_mode_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_randr_mode_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_randr_mode_end (xcb_randr_mode_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_randr_crtc_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_randr_crtc_t) + */ +void +xcb_randr_crtc_next (xcb_randr_crtc_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_randr_crtc_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_randr_crtc_end (xcb_randr_crtc_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_randr_output_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_randr_output_t) + */ +void +xcb_randr_output_next (xcb_randr_output_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_randr_output_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_randr_output_end (xcb_randr_output_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_randr_provider_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_randr_provider_t) + */ +void +xcb_randr_provider_next (xcb_randr_provider_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_randr_provider_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_randr_provider_end (xcb_randr_provider_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_randr_lease_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_randr_lease_t) + */ +void +xcb_randr_lease_next (xcb_randr_lease_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_randr_lease_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_randr_lease_end (xcb_randr_lease_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_randr_screen_size_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_randr_screen_size_t) + */ +void +xcb_randr_screen_size_next (xcb_randr_screen_size_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_randr_screen_size_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_randr_screen_size_end (xcb_randr_screen_size_iterator_t i); + +int +xcb_randr_refresh_rates_sizeof (const void *_buffer); + +uint16_t * +xcb_randr_refresh_rates_rates (const xcb_randr_refresh_rates_t *R); + +int +xcb_randr_refresh_rates_rates_length (const xcb_randr_refresh_rates_t *R); + +xcb_generic_iterator_t +xcb_randr_refresh_rates_rates_end (const xcb_randr_refresh_rates_t *R); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_randr_refresh_rates_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_randr_refresh_rates_t) + */ +void +xcb_randr_refresh_rates_next (xcb_randr_refresh_rates_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_randr_refresh_rates_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_randr_refresh_rates_end (xcb_randr_refresh_rates_iterator_t i); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_randr_query_version_cookie_t +xcb_randr_query_version (xcb_connection_t *c, + uint32_t major_version, + uint32_t minor_version); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_randr_query_version_cookie_t +xcb_randr_query_version_unchecked (xcb_connection_t *c, + uint32_t major_version, + uint32_t minor_version); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_randr_query_version_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_randr_query_version_reply_t * +xcb_randr_query_version_reply (xcb_connection_t *c, + xcb_randr_query_version_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_randr_set_screen_config_cookie_t +xcb_randr_set_screen_config (xcb_connection_t *c, + xcb_window_t window, + xcb_timestamp_t timestamp, + xcb_timestamp_t config_timestamp, + uint16_t sizeID, + uint16_t rotation, + uint16_t rate); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_randr_set_screen_config_cookie_t +xcb_randr_set_screen_config_unchecked (xcb_connection_t *c, + xcb_window_t window, + xcb_timestamp_t timestamp, + xcb_timestamp_t config_timestamp, + uint16_t sizeID, + uint16_t rotation, + uint16_t rate); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_randr_set_screen_config_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_randr_set_screen_config_reply_t * +xcb_randr_set_screen_config_reply (xcb_connection_t *c, + xcb_randr_set_screen_config_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_randr_select_input_checked (xcb_connection_t *c, + xcb_window_t window, + uint16_t enable); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_randr_select_input (xcb_connection_t *c, + xcb_window_t window, + uint16_t enable); + +int +xcb_randr_get_screen_info_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_randr_get_screen_info_cookie_t +xcb_randr_get_screen_info (xcb_connection_t *c, + xcb_window_t window); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_randr_get_screen_info_cookie_t +xcb_randr_get_screen_info_unchecked (xcb_connection_t *c, + xcb_window_t window); + +xcb_randr_screen_size_t * +xcb_randr_get_screen_info_sizes (const xcb_randr_get_screen_info_reply_t *R); + +int +xcb_randr_get_screen_info_sizes_length (const xcb_randr_get_screen_info_reply_t *R); + +xcb_randr_screen_size_iterator_t +xcb_randr_get_screen_info_sizes_iterator (const xcb_randr_get_screen_info_reply_t *R); + +int +xcb_randr_get_screen_info_rates_length (const xcb_randr_get_screen_info_reply_t *R); + +xcb_randr_refresh_rates_iterator_t +xcb_randr_get_screen_info_rates_iterator (const xcb_randr_get_screen_info_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_randr_get_screen_info_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_randr_get_screen_info_reply_t * +xcb_randr_get_screen_info_reply (xcb_connection_t *c, + xcb_randr_get_screen_info_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_randr_get_screen_size_range_cookie_t +xcb_randr_get_screen_size_range (xcb_connection_t *c, + xcb_window_t window); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_randr_get_screen_size_range_cookie_t +xcb_randr_get_screen_size_range_unchecked (xcb_connection_t *c, + xcb_window_t window); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_randr_get_screen_size_range_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_randr_get_screen_size_range_reply_t * +xcb_randr_get_screen_size_range_reply (xcb_connection_t *c, + xcb_randr_get_screen_size_range_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_randr_set_screen_size_checked (xcb_connection_t *c, + xcb_window_t window, + uint16_t width, + uint16_t height, + uint32_t mm_width, + uint32_t mm_height); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_randr_set_screen_size (xcb_connection_t *c, + xcb_window_t window, + uint16_t width, + uint16_t height, + uint32_t mm_width, + uint32_t mm_height); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_randr_mode_info_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_randr_mode_info_t) + */ +void +xcb_randr_mode_info_next (xcb_randr_mode_info_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_randr_mode_info_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_randr_mode_info_end (xcb_randr_mode_info_iterator_t i); + +int +xcb_randr_get_screen_resources_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_randr_get_screen_resources_cookie_t +xcb_randr_get_screen_resources (xcb_connection_t *c, + xcb_window_t window); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_randr_get_screen_resources_cookie_t +xcb_randr_get_screen_resources_unchecked (xcb_connection_t *c, + xcb_window_t window); + +xcb_randr_crtc_t * +xcb_randr_get_screen_resources_crtcs (const xcb_randr_get_screen_resources_reply_t *R); + +int +xcb_randr_get_screen_resources_crtcs_length (const xcb_randr_get_screen_resources_reply_t *R); + +xcb_generic_iterator_t +xcb_randr_get_screen_resources_crtcs_end (const xcb_randr_get_screen_resources_reply_t *R); + +xcb_randr_output_t * +xcb_randr_get_screen_resources_outputs (const xcb_randr_get_screen_resources_reply_t *R); + +int +xcb_randr_get_screen_resources_outputs_length (const xcb_randr_get_screen_resources_reply_t *R); + +xcb_generic_iterator_t +xcb_randr_get_screen_resources_outputs_end (const xcb_randr_get_screen_resources_reply_t *R); + +xcb_randr_mode_info_t * +xcb_randr_get_screen_resources_modes (const xcb_randr_get_screen_resources_reply_t *R); + +int +xcb_randr_get_screen_resources_modes_length (const xcb_randr_get_screen_resources_reply_t *R); + +xcb_randr_mode_info_iterator_t +xcb_randr_get_screen_resources_modes_iterator (const xcb_randr_get_screen_resources_reply_t *R); + +uint8_t * +xcb_randr_get_screen_resources_names (const xcb_randr_get_screen_resources_reply_t *R); + +int +xcb_randr_get_screen_resources_names_length (const xcb_randr_get_screen_resources_reply_t *R); + +xcb_generic_iterator_t +xcb_randr_get_screen_resources_names_end (const xcb_randr_get_screen_resources_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_randr_get_screen_resources_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_randr_get_screen_resources_reply_t * +xcb_randr_get_screen_resources_reply (xcb_connection_t *c, + xcb_randr_get_screen_resources_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_randr_get_output_info_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_randr_get_output_info_cookie_t +xcb_randr_get_output_info (xcb_connection_t *c, + xcb_randr_output_t output, + xcb_timestamp_t config_timestamp); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_randr_get_output_info_cookie_t +xcb_randr_get_output_info_unchecked (xcb_connection_t *c, + xcb_randr_output_t output, + xcb_timestamp_t config_timestamp); + +xcb_randr_crtc_t * +xcb_randr_get_output_info_crtcs (const xcb_randr_get_output_info_reply_t *R); + +int +xcb_randr_get_output_info_crtcs_length (const xcb_randr_get_output_info_reply_t *R); + +xcb_generic_iterator_t +xcb_randr_get_output_info_crtcs_end (const xcb_randr_get_output_info_reply_t *R); + +xcb_randr_mode_t * +xcb_randr_get_output_info_modes (const xcb_randr_get_output_info_reply_t *R); + +int +xcb_randr_get_output_info_modes_length (const xcb_randr_get_output_info_reply_t *R); + +xcb_generic_iterator_t +xcb_randr_get_output_info_modes_end (const xcb_randr_get_output_info_reply_t *R); + +xcb_randr_output_t * +xcb_randr_get_output_info_clones (const xcb_randr_get_output_info_reply_t *R); + +int +xcb_randr_get_output_info_clones_length (const xcb_randr_get_output_info_reply_t *R); + +xcb_generic_iterator_t +xcb_randr_get_output_info_clones_end (const xcb_randr_get_output_info_reply_t *R); + +uint8_t * +xcb_randr_get_output_info_name (const xcb_randr_get_output_info_reply_t *R); + +int +xcb_randr_get_output_info_name_length (const xcb_randr_get_output_info_reply_t *R); + +xcb_generic_iterator_t +xcb_randr_get_output_info_name_end (const xcb_randr_get_output_info_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_randr_get_output_info_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_randr_get_output_info_reply_t * +xcb_randr_get_output_info_reply (xcb_connection_t *c, + xcb_randr_get_output_info_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_randr_list_output_properties_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_randr_list_output_properties_cookie_t +xcb_randr_list_output_properties (xcb_connection_t *c, + xcb_randr_output_t output); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_randr_list_output_properties_cookie_t +xcb_randr_list_output_properties_unchecked (xcb_connection_t *c, + xcb_randr_output_t output); + +xcb_atom_t * +xcb_randr_list_output_properties_atoms (const xcb_randr_list_output_properties_reply_t *R); + +int +xcb_randr_list_output_properties_atoms_length (const xcb_randr_list_output_properties_reply_t *R); + +xcb_generic_iterator_t +xcb_randr_list_output_properties_atoms_end (const xcb_randr_list_output_properties_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_randr_list_output_properties_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_randr_list_output_properties_reply_t * +xcb_randr_list_output_properties_reply (xcb_connection_t *c, + xcb_randr_list_output_properties_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_randr_query_output_property_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_randr_query_output_property_cookie_t +xcb_randr_query_output_property (xcb_connection_t *c, + xcb_randr_output_t output, + xcb_atom_t property); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_randr_query_output_property_cookie_t +xcb_randr_query_output_property_unchecked (xcb_connection_t *c, + xcb_randr_output_t output, + xcb_atom_t property); + +int32_t * +xcb_randr_query_output_property_valid_values (const xcb_randr_query_output_property_reply_t *R); + +int +xcb_randr_query_output_property_valid_values_length (const xcb_randr_query_output_property_reply_t *R); + +xcb_generic_iterator_t +xcb_randr_query_output_property_valid_values_end (const xcb_randr_query_output_property_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_randr_query_output_property_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_randr_query_output_property_reply_t * +xcb_randr_query_output_property_reply (xcb_connection_t *c, + xcb_randr_query_output_property_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_randr_configure_output_property_sizeof (const void *_buffer, + uint32_t values_len); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_randr_configure_output_property_checked (xcb_connection_t *c, + xcb_randr_output_t output, + xcb_atom_t property, + uint8_t pending, + uint8_t range, + uint32_t values_len, + const int32_t *values); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_randr_configure_output_property (xcb_connection_t *c, + xcb_randr_output_t output, + xcb_atom_t property, + uint8_t pending, + uint8_t range, + uint32_t values_len, + const int32_t *values); + +int32_t * +xcb_randr_configure_output_property_values (const xcb_randr_configure_output_property_request_t *R); + +int +xcb_randr_configure_output_property_values_length (const xcb_randr_configure_output_property_request_t *R); + +xcb_generic_iterator_t +xcb_randr_configure_output_property_values_end (const xcb_randr_configure_output_property_request_t *R); + +int +xcb_randr_change_output_property_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_randr_change_output_property_checked (xcb_connection_t *c, + xcb_randr_output_t output, + xcb_atom_t property, + xcb_atom_t type, + uint8_t format, + uint8_t mode, + uint32_t num_units, + const void *data); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_randr_change_output_property (xcb_connection_t *c, + xcb_randr_output_t output, + xcb_atom_t property, + xcb_atom_t type, + uint8_t format, + uint8_t mode, + uint32_t num_units, + const void *data); + +void * +xcb_randr_change_output_property_data (const xcb_randr_change_output_property_request_t *R); + +int +xcb_randr_change_output_property_data_length (const xcb_randr_change_output_property_request_t *R); + +xcb_generic_iterator_t +xcb_randr_change_output_property_data_end (const xcb_randr_change_output_property_request_t *R); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_randr_delete_output_property_checked (xcb_connection_t *c, + xcb_randr_output_t output, + xcb_atom_t property); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_randr_delete_output_property (xcb_connection_t *c, + xcb_randr_output_t output, + xcb_atom_t property); + +int +xcb_randr_get_output_property_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_randr_get_output_property_cookie_t +xcb_randr_get_output_property (xcb_connection_t *c, + xcb_randr_output_t output, + xcb_atom_t property, + xcb_atom_t type, + uint32_t long_offset, + uint32_t long_length, + uint8_t _delete, + uint8_t pending); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_randr_get_output_property_cookie_t +xcb_randr_get_output_property_unchecked (xcb_connection_t *c, + xcb_randr_output_t output, + xcb_atom_t property, + xcb_atom_t type, + uint32_t long_offset, + uint32_t long_length, + uint8_t _delete, + uint8_t pending); + +uint8_t * +xcb_randr_get_output_property_data (const xcb_randr_get_output_property_reply_t *R); + +int +xcb_randr_get_output_property_data_length (const xcb_randr_get_output_property_reply_t *R); + +xcb_generic_iterator_t +xcb_randr_get_output_property_data_end (const xcb_randr_get_output_property_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_randr_get_output_property_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_randr_get_output_property_reply_t * +xcb_randr_get_output_property_reply (xcb_connection_t *c, + xcb_randr_get_output_property_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_randr_create_mode_sizeof (const void *_buffer, + uint32_t name_len); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_randr_create_mode_cookie_t +xcb_randr_create_mode (xcb_connection_t *c, + xcb_window_t window, + xcb_randr_mode_info_t mode_info, + uint32_t name_len, + const char *name); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_randr_create_mode_cookie_t +xcb_randr_create_mode_unchecked (xcb_connection_t *c, + xcb_window_t window, + xcb_randr_mode_info_t mode_info, + uint32_t name_len, + const char *name); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_randr_create_mode_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_randr_create_mode_reply_t * +xcb_randr_create_mode_reply (xcb_connection_t *c, + xcb_randr_create_mode_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_randr_destroy_mode_checked (xcb_connection_t *c, + xcb_randr_mode_t mode); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_randr_destroy_mode (xcb_connection_t *c, + xcb_randr_mode_t mode); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_randr_add_output_mode_checked (xcb_connection_t *c, + xcb_randr_output_t output, + xcb_randr_mode_t mode); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_randr_add_output_mode (xcb_connection_t *c, + xcb_randr_output_t output, + xcb_randr_mode_t mode); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_randr_delete_output_mode_checked (xcb_connection_t *c, + xcb_randr_output_t output, + xcb_randr_mode_t mode); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_randr_delete_output_mode (xcb_connection_t *c, + xcb_randr_output_t output, + xcb_randr_mode_t mode); + +int +xcb_randr_get_crtc_info_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_randr_get_crtc_info_cookie_t +xcb_randr_get_crtc_info (xcb_connection_t *c, + xcb_randr_crtc_t crtc, + xcb_timestamp_t config_timestamp); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_randr_get_crtc_info_cookie_t +xcb_randr_get_crtc_info_unchecked (xcb_connection_t *c, + xcb_randr_crtc_t crtc, + xcb_timestamp_t config_timestamp); + +xcb_randr_output_t * +xcb_randr_get_crtc_info_outputs (const xcb_randr_get_crtc_info_reply_t *R); + +int +xcb_randr_get_crtc_info_outputs_length (const xcb_randr_get_crtc_info_reply_t *R); + +xcb_generic_iterator_t +xcb_randr_get_crtc_info_outputs_end (const xcb_randr_get_crtc_info_reply_t *R); + +xcb_randr_output_t * +xcb_randr_get_crtc_info_possible (const xcb_randr_get_crtc_info_reply_t *R); + +int +xcb_randr_get_crtc_info_possible_length (const xcb_randr_get_crtc_info_reply_t *R); + +xcb_generic_iterator_t +xcb_randr_get_crtc_info_possible_end (const xcb_randr_get_crtc_info_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_randr_get_crtc_info_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_randr_get_crtc_info_reply_t * +xcb_randr_get_crtc_info_reply (xcb_connection_t *c, + xcb_randr_get_crtc_info_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_randr_set_crtc_config_sizeof (const void *_buffer, + uint32_t outputs_len); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_randr_set_crtc_config_cookie_t +xcb_randr_set_crtc_config (xcb_connection_t *c, + xcb_randr_crtc_t crtc, + xcb_timestamp_t timestamp, + xcb_timestamp_t config_timestamp, + int16_t x, + int16_t y, + xcb_randr_mode_t mode, + uint16_t rotation, + uint32_t outputs_len, + const xcb_randr_output_t *outputs); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_randr_set_crtc_config_cookie_t +xcb_randr_set_crtc_config_unchecked (xcb_connection_t *c, + xcb_randr_crtc_t crtc, + xcb_timestamp_t timestamp, + xcb_timestamp_t config_timestamp, + int16_t x, + int16_t y, + xcb_randr_mode_t mode, + uint16_t rotation, + uint32_t outputs_len, + const xcb_randr_output_t *outputs); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_randr_set_crtc_config_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_randr_set_crtc_config_reply_t * +xcb_randr_set_crtc_config_reply (xcb_connection_t *c, + xcb_randr_set_crtc_config_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_randr_get_crtc_gamma_size_cookie_t +xcb_randr_get_crtc_gamma_size (xcb_connection_t *c, + xcb_randr_crtc_t crtc); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_randr_get_crtc_gamma_size_cookie_t +xcb_randr_get_crtc_gamma_size_unchecked (xcb_connection_t *c, + xcb_randr_crtc_t crtc); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_randr_get_crtc_gamma_size_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_randr_get_crtc_gamma_size_reply_t * +xcb_randr_get_crtc_gamma_size_reply (xcb_connection_t *c, + xcb_randr_get_crtc_gamma_size_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_randr_get_crtc_gamma_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_randr_get_crtc_gamma_cookie_t +xcb_randr_get_crtc_gamma (xcb_connection_t *c, + xcb_randr_crtc_t crtc); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_randr_get_crtc_gamma_cookie_t +xcb_randr_get_crtc_gamma_unchecked (xcb_connection_t *c, + xcb_randr_crtc_t crtc); + +uint16_t * +xcb_randr_get_crtc_gamma_red (const xcb_randr_get_crtc_gamma_reply_t *R); + +int +xcb_randr_get_crtc_gamma_red_length (const xcb_randr_get_crtc_gamma_reply_t *R); + +xcb_generic_iterator_t +xcb_randr_get_crtc_gamma_red_end (const xcb_randr_get_crtc_gamma_reply_t *R); + +uint16_t * +xcb_randr_get_crtc_gamma_green (const xcb_randr_get_crtc_gamma_reply_t *R); + +int +xcb_randr_get_crtc_gamma_green_length (const xcb_randr_get_crtc_gamma_reply_t *R); + +xcb_generic_iterator_t +xcb_randr_get_crtc_gamma_green_end (const xcb_randr_get_crtc_gamma_reply_t *R); + +uint16_t * +xcb_randr_get_crtc_gamma_blue (const xcb_randr_get_crtc_gamma_reply_t *R); + +int +xcb_randr_get_crtc_gamma_blue_length (const xcb_randr_get_crtc_gamma_reply_t *R); + +xcb_generic_iterator_t +xcb_randr_get_crtc_gamma_blue_end (const xcb_randr_get_crtc_gamma_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_randr_get_crtc_gamma_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_randr_get_crtc_gamma_reply_t * +xcb_randr_get_crtc_gamma_reply (xcb_connection_t *c, + xcb_randr_get_crtc_gamma_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_randr_set_crtc_gamma_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_randr_set_crtc_gamma_checked (xcb_connection_t *c, + xcb_randr_crtc_t crtc, + uint16_t size, + const uint16_t *red, + const uint16_t *green, + const uint16_t *blue); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_randr_set_crtc_gamma (xcb_connection_t *c, + xcb_randr_crtc_t crtc, + uint16_t size, + const uint16_t *red, + const uint16_t *green, + const uint16_t *blue); + +uint16_t * +xcb_randr_set_crtc_gamma_red (const xcb_randr_set_crtc_gamma_request_t *R); + +int +xcb_randr_set_crtc_gamma_red_length (const xcb_randr_set_crtc_gamma_request_t *R); + +xcb_generic_iterator_t +xcb_randr_set_crtc_gamma_red_end (const xcb_randr_set_crtc_gamma_request_t *R); + +uint16_t * +xcb_randr_set_crtc_gamma_green (const xcb_randr_set_crtc_gamma_request_t *R); + +int +xcb_randr_set_crtc_gamma_green_length (const xcb_randr_set_crtc_gamma_request_t *R); + +xcb_generic_iterator_t +xcb_randr_set_crtc_gamma_green_end (const xcb_randr_set_crtc_gamma_request_t *R); + +uint16_t * +xcb_randr_set_crtc_gamma_blue (const xcb_randr_set_crtc_gamma_request_t *R); + +int +xcb_randr_set_crtc_gamma_blue_length (const xcb_randr_set_crtc_gamma_request_t *R); + +xcb_generic_iterator_t +xcb_randr_set_crtc_gamma_blue_end (const xcb_randr_set_crtc_gamma_request_t *R); + +int +xcb_randr_get_screen_resources_current_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_randr_get_screen_resources_current_cookie_t +xcb_randr_get_screen_resources_current (xcb_connection_t *c, + xcb_window_t window); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_randr_get_screen_resources_current_cookie_t +xcb_randr_get_screen_resources_current_unchecked (xcb_connection_t *c, + xcb_window_t window); + +xcb_randr_crtc_t * +xcb_randr_get_screen_resources_current_crtcs (const xcb_randr_get_screen_resources_current_reply_t *R); + +int +xcb_randr_get_screen_resources_current_crtcs_length (const xcb_randr_get_screen_resources_current_reply_t *R); + +xcb_generic_iterator_t +xcb_randr_get_screen_resources_current_crtcs_end (const xcb_randr_get_screen_resources_current_reply_t *R); + +xcb_randr_output_t * +xcb_randr_get_screen_resources_current_outputs (const xcb_randr_get_screen_resources_current_reply_t *R); + +int +xcb_randr_get_screen_resources_current_outputs_length (const xcb_randr_get_screen_resources_current_reply_t *R); + +xcb_generic_iterator_t +xcb_randr_get_screen_resources_current_outputs_end (const xcb_randr_get_screen_resources_current_reply_t *R); + +xcb_randr_mode_info_t * +xcb_randr_get_screen_resources_current_modes (const xcb_randr_get_screen_resources_current_reply_t *R); + +int +xcb_randr_get_screen_resources_current_modes_length (const xcb_randr_get_screen_resources_current_reply_t *R); + +xcb_randr_mode_info_iterator_t +xcb_randr_get_screen_resources_current_modes_iterator (const xcb_randr_get_screen_resources_current_reply_t *R); + +uint8_t * +xcb_randr_get_screen_resources_current_names (const xcb_randr_get_screen_resources_current_reply_t *R); + +int +xcb_randr_get_screen_resources_current_names_length (const xcb_randr_get_screen_resources_current_reply_t *R); + +xcb_generic_iterator_t +xcb_randr_get_screen_resources_current_names_end (const xcb_randr_get_screen_resources_current_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_randr_get_screen_resources_current_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_randr_get_screen_resources_current_reply_t * +xcb_randr_get_screen_resources_current_reply (xcb_connection_t *c, + xcb_randr_get_screen_resources_current_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_randr_set_crtc_transform_sizeof (const void *_buffer, + uint32_t filter_params_len); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_randr_set_crtc_transform_checked (xcb_connection_t *c, + xcb_randr_crtc_t crtc, + xcb_render_transform_t transform, + uint16_t filter_len, + const char *filter_name, + uint32_t filter_params_len, + const xcb_render_fixed_t *filter_params); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_randr_set_crtc_transform (xcb_connection_t *c, + xcb_randr_crtc_t crtc, + xcb_render_transform_t transform, + uint16_t filter_len, + const char *filter_name, + uint32_t filter_params_len, + const xcb_render_fixed_t *filter_params); + +char * +xcb_randr_set_crtc_transform_filter_name (const xcb_randr_set_crtc_transform_request_t *R); + +int +xcb_randr_set_crtc_transform_filter_name_length (const xcb_randr_set_crtc_transform_request_t *R); + +xcb_generic_iterator_t +xcb_randr_set_crtc_transform_filter_name_end (const xcb_randr_set_crtc_transform_request_t *R); + +xcb_render_fixed_t * +xcb_randr_set_crtc_transform_filter_params (const xcb_randr_set_crtc_transform_request_t *R); + +int +xcb_randr_set_crtc_transform_filter_params_length (const xcb_randr_set_crtc_transform_request_t *R); + +xcb_generic_iterator_t +xcb_randr_set_crtc_transform_filter_params_end (const xcb_randr_set_crtc_transform_request_t *R); + +int +xcb_randr_get_crtc_transform_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_randr_get_crtc_transform_cookie_t +xcb_randr_get_crtc_transform (xcb_connection_t *c, + xcb_randr_crtc_t crtc); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_randr_get_crtc_transform_cookie_t +xcb_randr_get_crtc_transform_unchecked (xcb_connection_t *c, + xcb_randr_crtc_t crtc); + +char * +xcb_randr_get_crtc_transform_pending_filter_name (const xcb_randr_get_crtc_transform_reply_t *R); + +int +xcb_randr_get_crtc_transform_pending_filter_name_length (const xcb_randr_get_crtc_transform_reply_t *R); + +xcb_generic_iterator_t +xcb_randr_get_crtc_transform_pending_filter_name_end (const xcb_randr_get_crtc_transform_reply_t *R); + +xcb_render_fixed_t * +xcb_randr_get_crtc_transform_pending_params (const xcb_randr_get_crtc_transform_reply_t *R); + +int +xcb_randr_get_crtc_transform_pending_params_length (const xcb_randr_get_crtc_transform_reply_t *R); + +xcb_generic_iterator_t +xcb_randr_get_crtc_transform_pending_params_end (const xcb_randr_get_crtc_transform_reply_t *R); + +char * +xcb_randr_get_crtc_transform_current_filter_name (const xcb_randr_get_crtc_transform_reply_t *R); + +int +xcb_randr_get_crtc_transform_current_filter_name_length (const xcb_randr_get_crtc_transform_reply_t *R); + +xcb_generic_iterator_t +xcb_randr_get_crtc_transform_current_filter_name_end (const xcb_randr_get_crtc_transform_reply_t *R); + +xcb_render_fixed_t * +xcb_randr_get_crtc_transform_current_params (const xcb_randr_get_crtc_transform_reply_t *R); + +int +xcb_randr_get_crtc_transform_current_params_length (const xcb_randr_get_crtc_transform_reply_t *R); + +xcb_generic_iterator_t +xcb_randr_get_crtc_transform_current_params_end (const xcb_randr_get_crtc_transform_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_randr_get_crtc_transform_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_randr_get_crtc_transform_reply_t * +xcb_randr_get_crtc_transform_reply (xcb_connection_t *c, + xcb_randr_get_crtc_transform_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_randr_get_panning_cookie_t +xcb_randr_get_panning (xcb_connection_t *c, + xcb_randr_crtc_t crtc); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_randr_get_panning_cookie_t +xcb_randr_get_panning_unchecked (xcb_connection_t *c, + xcb_randr_crtc_t crtc); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_randr_get_panning_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_randr_get_panning_reply_t * +xcb_randr_get_panning_reply (xcb_connection_t *c, + xcb_randr_get_panning_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_randr_set_panning_cookie_t +xcb_randr_set_panning (xcb_connection_t *c, + xcb_randr_crtc_t crtc, + xcb_timestamp_t timestamp, + uint16_t left, + uint16_t top, + uint16_t width, + uint16_t height, + uint16_t track_left, + uint16_t track_top, + uint16_t track_width, + uint16_t track_height, + int16_t border_left, + int16_t border_top, + int16_t border_right, + int16_t border_bottom); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_randr_set_panning_cookie_t +xcb_randr_set_panning_unchecked (xcb_connection_t *c, + xcb_randr_crtc_t crtc, + xcb_timestamp_t timestamp, + uint16_t left, + uint16_t top, + uint16_t width, + uint16_t height, + uint16_t track_left, + uint16_t track_top, + uint16_t track_width, + uint16_t track_height, + int16_t border_left, + int16_t border_top, + int16_t border_right, + int16_t border_bottom); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_randr_set_panning_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_randr_set_panning_reply_t * +xcb_randr_set_panning_reply (xcb_connection_t *c, + xcb_randr_set_panning_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_randr_set_output_primary_checked (xcb_connection_t *c, + xcb_window_t window, + xcb_randr_output_t output); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_randr_set_output_primary (xcb_connection_t *c, + xcb_window_t window, + xcb_randr_output_t output); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_randr_get_output_primary_cookie_t +xcb_randr_get_output_primary (xcb_connection_t *c, + xcb_window_t window); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_randr_get_output_primary_cookie_t +xcb_randr_get_output_primary_unchecked (xcb_connection_t *c, + xcb_window_t window); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_randr_get_output_primary_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_randr_get_output_primary_reply_t * +xcb_randr_get_output_primary_reply (xcb_connection_t *c, + xcb_randr_get_output_primary_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_randr_get_providers_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_randr_get_providers_cookie_t +xcb_randr_get_providers (xcb_connection_t *c, + xcb_window_t window); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_randr_get_providers_cookie_t +xcb_randr_get_providers_unchecked (xcb_connection_t *c, + xcb_window_t window); + +xcb_randr_provider_t * +xcb_randr_get_providers_providers (const xcb_randr_get_providers_reply_t *R); + +int +xcb_randr_get_providers_providers_length (const xcb_randr_get_providers_reply_t *R); + +xcb_generic_iterator_t +xcb_randr_get_providers_providers_end (const xcb_randr_get_providers_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_randr_get_providers_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_randr_get_providers_reply_t * +xcb_randr_get_providers_reply (xcb_connection_t *c, + xcb_randr_get_providers_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_randr_get_provider_info_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_randr_get_provider_info_cookie_t +xcb_randr_get_provider_info (xcb_connection_t *c, + xcb_randr_provider_t provider, + xcb_timestamp_t config_timestamp); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_randr_get_provider_info_cookie_t +xcb_randr_get_provider_info_unchecked (xcb_connection_t *c, + xcb_randr_provider_t provider, + xcb_timestamp_t config_timestamp); + +xcb_randr_crtc_t * +xcb_randr_get_provider_info_crtcs (const xcb_randr_get_provider_info_reply_t *R); + +int +xcb_randr_get_provider_info_crtcs_length (const xcb_randr_get_provider_info_reply_t *R); + +xcb_generic_iterator_t +xcb_randr_get_provider_info_crtcs_end (const xcb_randr_get_provider_info_reply_t *R); + +xcb_randr_output_t * +xcb_randr_get_provider_info_outputs (const xcb_randr_get_provider_info_reply_t *R); + +int +xcb_randr_get_provider_info_outputs_length (const xcb_randr_get_provider_info_reply_t *R); + +xcb_generic_iterator_t +xcb_randr_get_provider_info_outputs_end (const xcb_randr_get_provider_info_reply_t *R); + +xcb_randr_provider_t * +xcb_randr_get_provider_info_associated_providers (const xcb_randr_get_provider_info_reply_t *R); + +int +xcb_randr_get_provider_info_associated_providers_length (const xcb_randr_get_provider_info_reply_t *R); + +xcb_generic_iterator_t +xcb_randr_get_provider_info_associated_providers_end (const xcb_randr_get_provider_info_reply_t *R); + +uint32_t * +xcb_randr_get_provider_info_associated_capability (const xcb_randr_get_provider_info_reply_t *R); + +int +xcb_randr_get_provider_info_associated_capability_length (const xcb_randr_get_provider_info_reply_t *R); + +xcb_generic_iterator_t +xcb_randr_get_provider_info_associated_capability_end (const xcb_randr_get_provider_info_reply_t *R); + +char * +xcb_randr_get_provider_info_name (const xcb_randr_get_provider_info_reply_t *R); + +int +xcb_randr_get_provider_info_name_length (const xcb_randr_get_provider_info_reply_t *R); + +xcb_generic_iterator_t +xcb_randr_get_provider_info_name_end (const xcb_randr_get_provider_info_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_randr_get_provider_info_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_randr_get_provider_info_reply_t * +xcb_randr_get_provider_info_reply (xcb_connection_t *c, + xcb_randr_get_provider_info_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_randr_set_provider_offload_sink_checked (xcb_connection_t *c, + xcb_randr_provider_t provider, + xcb_randr_provider_t sink_provider, + xcb_timestamp_t config_timestamp); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_randr_set_provider_offload_sink (xcb_connection_t *c, + xcb_randr_provider_t provider, + xcb_randr_provider_t sink_provider, + xcb_timestamp_t config_timestamp); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_randr_set_provider_output_source_checked (xcb_connection_t *c, + xcb_randr_provider_t provider, + xcb_randr_provider_t source_provider, + xcb_timestamp_t config_timestamp); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_randr_set_provider_output_source (xcb_connection_t *c, + xcb_randr_provider_t provider, + xcb_randr_provider_t source_provider, + xcb_timestamp_t config_timestamp); + +int +xcb_randr_list_provider_properties_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_randr_list_provider_properties_cookie_t +xcb_randr_list_provider_properties (xcb_connection_t *c, + xcb_randr_provider_t provider); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_randr_list_provider_properties_cookie_t +xcb_randr_list_provider_properties_unchecked (xcb_connection_t *c, + xcb_randr_provider_t provider); + +xcb_atom_t * +xcb_randr_list_provider_properties_atoms (const xcb_randr_list_provider_properties_reply_t *R); + +int +xcb_randr_list_provider_properties_atoms_length (const xcb_randr_list_provider_properties_reply_t *R); + +xcb_generic_iterator_t +xcb_randr_list_provider_properties_atoms_end (const xcb_randr_list_provider_properties_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_randr_list_provider_properties_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_randr_list_provider_properties_reply_t * +xcb_randr_list_provider_properties_reply (xcb_connection_t *c, + xcb_randr_list_provider_properties_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_randr_query_provider_property_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_randr_query_provider_property_cookie_t +xcb_randr_query_provider_property (xcb_connection_t *c, + xcb_randr_provider_t provider, + xcb_atom_t property); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_randr_query_provider_property_cookie_t +xcb_randr_query_provider_property_unchecked (xcb_connection_t *c, + xcb_randr_provider_t provider, + xcb_atom_t property); + +int32_t * +xcb_randr_query_provider_property_valid_values (const xcb_randr_query_provider_property_reply_t *R); + +int +xcb_randr_query_provider_property_valid_values_length (const xcb_randr_query_provider_property_reply_t *R); + +xcb_generic_iterator_t +xcb_randr_query_provider_property_valid_values_end (const xcb_randr_query_provider_property_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_randr_query_provider_property_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_randr_query_provider_property_reply_t * +xcb_randr_query_provider_property_reply (xcb_connection_t *c, + xcb_randr_query_provider_property_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_randr_configure_provider_property_sizeof (const void *_buffer, + uint32_t values_len); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_randr_configure_provider_property_checked (xcb_connection_t *c, + xcb_randr_provider_t provider, + xcb_atom_t property, + uint8_t pending, + uint8_t range, + uint32_t values_len, + const int32_t *values); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_randr_configure_provider_property (xcb_connection_t *c, + xcb_randr_provider_t provider, + xcb_atom_t property, + uint8_t pending, + uint8_t range, + uint32_t values_len, + const int32_t *values); + +int32_t * +xcb_randr_configure_provider_property_values (const xcb_randr_configure_provider_property_request_t *R); + +int +xcb_randr_configure_provider_property_values_length (const xcb_randr_configure_provider_property_request_t *R); + +xcb_generic_iterator_t +xcb_randr_configure_provider_property_values_end (const xcb_randr_configure_provider_property_request_t *R); + +int +xcb_randr_change_provider_property_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_randr_change_provider_property_checked (xcb_connection_t *c, + xcb_randr_provider_t provider, + xcb_atom_t property, + xcb_atom_t type, + uint8_t format, + uint8_t mode, + uint32_t num_items, + const void *data); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_randr_change_provider_property (xcb_connection_t *c, + xcb_randr_provider_t provider, + xcb_atom_t property, + xcb_atom_t type, + uint8_t format, + uint8_t mode, + uint32_t num_items, + const void *data); + +void * +xcb_randr_change_provider_property_data (const xcb_randr_change_provider_property_request_t *R); + +int +xcb_randr_change_provider_property_data_length (const xcb_randr_change_provider_property_request_t *R); + +xcb_generic_iterator_t +xcb_randr_change_provider_property_data_end (const xcb_randr_change_provider_property_request_t *R); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_randr_delete_provider_property_checked (xcb_connection_t *c, + xcb_randr_provider_t provider, + xcb_atom_t property); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_randr_delete_provider_property (xcb_connection_t *c, + xcb_randr_provider_t provider, + xcb_atom_t property); + +int +xcb_randr_get_provider_property_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_randr_get_provider_property_cookie_t +xcb_randr_get_provider_property (xcb_connection_t *c, + xcb_randr_provider_t provider, + xcb_atom_t property, + xcb_atom_t type, + uint32_t long_offset, + uint32_t long_length, + uint8_t _delete, + uint8_t pending); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_randr_get_provider_property_cookie_t +xcb_randr_get_provider_property_unchecked (xcb_connection_t *c, + xcb_randr_provider_t provider, + xcb_atom_t property, + xcb_atom_t type, + uint32_t long_offset, + uint32_t long_length, + uint8_t _delete, + uint8_t pending); + +void * +xcb_randr_get_provider_property_data (const xcb_randr_get_provider_property_reply_t *R); + +int +xcb_randr_get_provider_property_data_length (const xcb_randr_get_provider_property_reply_t *R); + +xcb_generic_iterator_t +xcb_randr_get_provider_property_data_end (const xcb_randr_get_provider_property_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_randr_get_provider_property_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_randr_get_provider_property_reply_t * +xcb_randr_get_provider_property_reply (xcb_connection_t *c, + xcb_randr_get_provider_property_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_randr_crtc_change_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_randr_crtc_change_t) + */ +void +xcb_randr_crtc_change_next (xcb_randr_crtc_change_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_randr_crtc_change_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_randr_crtc_change_end (xcb_randr_crtc_change_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_randr_output_change_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_randr_output_change_t) + */ +void +xcb_randr_output_change_next (xcb_randr_output_change_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_randr_output_change_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_randr_output_change_end (xcb_randr_output_change_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_randr_output_property_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_randr_output_property_t) + */ +void +xcb_randr_output_property_next (xcb_randr_output_property_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_randr_output_property_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_randr_output_property_end (xcb_randr_output_property_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_randr_provider_change_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_randr_provider_change_t) + */ +void +xcb_randr_provider_change_next (xcb_randr_provider_change_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_randr_provider_change_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_randr_provider_change_end (xcb_randr_provider_change_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_randr_provider_property_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_randr_provider_property_t) + */ +void +xcb_randr_provider_property_next (xcb_randr_provider_property_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_randr_provider_property_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_randr_provider_property_end (xcb_randr_provider_property_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_randr_resource_change_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_randr_resource_change_t) + */ +void +xcb_randr_resource_change_next (xcb_randr_resource_change_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_randr_resource_change_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_randr_resource_change_end (xcb_randr_resource_change_iterator_t i); + +int +xcb_randr_monitor_info_sizeof (const void *_buffer); + +xcb_randr_output_t * +xcb_randr_monitor_info_outputs (const xcb_randr_monitor_info_t *R); + +int +xcb_randr_monitor_info_outputs_length (const xcb_randr_monitor_info_t *R); + +xcb_generic_iterator_t +xcb_randr_monitor_info_outputs_end (const xcb_randr_monitor_info_t *R); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_randr_monitor_info_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_randr_monitor_info_t) + */ +void +xcb_randr_monitor_info_next (xcb_randr_monitor_info_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_randr_monitor_info_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_randr_monitor_info_end (xcb_randr_monitor_info_iterator_t i); + +int +xcb_randr_get_monitors_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_randr_get_monitors_cookie_t +xcb_randr_get_monitors (xcb_connection_t *c, + xcb_window_t window, + uint8_t get_active); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_randr_get_monitors_cookie_t +xcb_randr_get_monitors_unchecked (xcb_connection_t *c, + xcb_window_t window, + uint8_t get_active); + +int +xcb_randr_get_monitors_monitors_length (const xcb_randr_get_monitors_reply_t *R); + +xcb_randr_monitor_info_iterator_t +xcb_randr_get_monitors_monitors_iterator (const xcb_randr_get_monitors_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_randr_get_monitors_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_randr_get_monitors_reply_t * +xcb_randr_get_monitors_reply (xcb_connection_t *c, + xcb_randr_get_monitors_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_randr_set_monitor_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_randr_set_monitor_checked (xcb_connection_t *c, + xcb_window_t window, + xcb_randr_monitor_info_t *monitorinfo); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_randr_set_monitor (xcb_connection_t *c, + xcb_window_t window, + xcb_randr_monitor_info_t *monitorinfo); + +xcb_randr_monitor_info_t * +xcb_randr_set_monitor_monitorinfo (const xcb_randr_set_monitor_request_t *R); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_randr_delete_monitor_checked (xcb_connection_t *c, + xcb_window_t window, + xcb_atom_t name); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_randr_delete_monitor (xcb_connection_t *c, + xcb_window_t window, + xcb_atom_t name); + +int +xcb_randr_create_lease_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_randr_create_lease_cookie_t +xcb_randr_create_lease (xcb_connection_t *c, + xcb_window_t window, + xcb_randr_lease_t lid, + uint16_t num_crtcs, + uint16_t num_outputs, + const xcb_randr_crtc_t *crtcs, + const xcb_randr_output_t *outputs); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_randr_create_lease_cookie_t +xcb_randr_create_lease_unchecked (xcb_connection_t *c, + xcb_window_t window, + xcb_randr_lease_t lid, + uint16_t num_crtcs, + uint16_t num_outputs, + const xcb_randr_crtc_t *crtcs, + const xcb_randr_output_t *outputs); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_randr_create_lease_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_randr_create_lease_reply_t * +xcb_randr_create_lease_reply (xcb_connection_t *c, + xcb_randr_create_lease_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +/** + * Return the reply fds + * @param c The connection + * @param reply The reply + * + * Returns a pointer to the array of reply fds of the reply. + * + * The returned value points into the reply and must not be free(). + * The fds are not managed by xcb. You must close() them before freeing the reply. + */ +int * +xcb_randr_create_lease_reply_fds (xcb_connection_t *c /**< */, + xcb_randr_create_lease_reply_t *reply); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_randr_free_lease_checked (xcb_connection_t *c, + xcb_randr_lease_t lid, + uint8_t terminate); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_randr_free_lease (xcb_connection_t *c, + xcb_randr_lease_t lid, + uint8_t terminate); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_randr_lease_notify_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_randr_lease_notify_t) + */ +void +xcb_randr_lease_notify_next (xcb_randr_lease_notify_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_randr_lease_notify_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_randr_lease_notify_end (xcb_randr_lease_notify_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_randr_notify_data_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_randr_notify_data_t) + */ +void +xcb_randr_notify_data_next (xcb_randr_notify_data_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_randr_notify_data_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_randr_notify_data_end (xcb_randr_notify_data_iterator_t i); + + +#ifdef __cplusplus +} +#endif + +#endif + +/** + * @} + */ diff --git a/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/include/xcb/record.h b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/include/xcb/record.h new file mode 100644 index 0000000000000000000000000000000000000000..cfd33f39286d2c29f60f7f3b4118ecf8692489b0 --- /dev/null +++ b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/include/xcb/record.h @@ -0,0 +1,935 @@ +/* + * This file generated automatically from record.xml by c_client.py. + * Edit at your peril. + */ + +/** + * @defgroup XCB_Record_API XCB Record API + * @brief Record XCB Protocol Implementation. + * @{ + **/ + +#ifndef __RECORD_H +#define __RECORD_H + +#include "xcb.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#define XCB_RECORD_MAJOR_VERSION 1 +#define XCB_RECORD_MINOR_VERSION 13 + +extern xcb_extension_t xcb_record_id; + +typedef uint32_t xcb_record_context_t; + +/** + * @brief xcb_record_context_iterator_t + **/ +typedef struct xcb_record_context_iterator_t { + xcb_record_context_t *data; + int rem; + int index; +} xcb_record_context_iterator_t; + +/** + * @brief xcb_record_range_8_t + **/ +typedef struct xcb_record_range_8_t { + uint8_t first; + uint8_t last; +} xcb_record_range_8_t; + +/** + * @brief xcb_record_range_8_iterator_t + **/ +typedef struct xcb_record_range_8_iterator_t { + xcb_record_range_8_t *data; + int rem; + int index; +} xcb_record_range_8_iterator_t; + +/** + * @brief xcb_record_range_16_t + **/ +typedef struct xcb_record_range_16_t { + uint16_t first; + uint16_t last; +} xcb_record_range_16_t; + +/** + * @brief xcb_record_range_16_iterator_t + **/ +typedef struct xcb_record_range_16_iterator_t { + xcb_record_range_16_t *data; + int rem; + int index; +} xcb_record_range_16_iterator_t; + +/** + * @brief xcb_record_ext_range_t + **/ +typedef struct xcb_record_ext_range_t { + xcb_record_range_8_t major; + xcb_record_range_16_t minor; +} xcb_record_ext_range_t; + +/** + * @brief xcb_record_ext_range_iterator_t + **/ +typedef struct xcb_record_ext_range_iterator_t { + xcb_record_ext_range_t *data; + int rem; + int index; +} xcb_record_ext_range_iterator_t; + +/** + * @brief xcb_record_range_t + **/ +typedef struct xcb_record_range_t { + xcb_record_range_8_t core_requests; + xcb_record_range_8_t core_replies; + xcb_record_ext_range_t ext_requests; + xcb_record_ext_range_t ext_replies; + xcb_record_range_8_t delivered_events; + xcb_record_range_8_t device_events; + xcb_record_range_8_t errors; + uint8_t client_started; + uint8_t client_died; +} xcb_record_range_t; + +/** + * @brief xcb_record_range_iterator_t + **/ +typedef struct xcb_record_range_iterator_t { + xcb_record_range_t *data; + int rem; + int index; +} xcb_record_range_iterator_t; + +typedef uint8_t xcb_record_element_header_t; + +/** + * @brief xcb_record_element_header_iterator_t + **/ +typedef struct xcb_record_element_header_iterator_t { + xcb_record_element_header_t *data; + int rem; + int index; +} xcb_record_element_header_iterator_t; + +typedef enum xcb_record_h_type_t { + XCB_RECORD_H_TYPE_FROM_SERVER_TIME = 1, + XCB_RECORD_H_TYPE_FROM_CLIENT_TIME = 2, + XCB_RECORD_H_TYPE_FROM_CLIENT_SEQUENCE = 4 +} xcb_record_h_type_t; + +typedef uint32_t xcb_record_client_spec_t; + +/** + * @brief xcb_record_client_spec_iterator_t + **/ +typedef struct xcb_record_client_spec_iterator_t { + xcb_record_client_spec_t *data; + int rem; + int index; +} xcb_record_client_spec_iterator_t; + +typedef enum xcb_record_cs_t { + XCB_RECORD_CS_CURRENT_CLIENTS = 1, + XCB_RECORD_CS_FUTURE_CLIENTS = 2, + XCB_RECORD_CS_ALL_CLIENTS = 3 +} xcb_record_cs_t; + +/** + * @brief xcb_record_client_info_t + **/ +typedef struct xcb_record_client_info_t { + xcb_record_client_spec_t client_resource; + uint32_t num_ranges; +} xcb_record_client_info_t; + +/** + * @brief xcb_record_client_info_iterator_t + **/ +typedef struct xcb_record_client_info_iterator_t { + xcb_record_client_info_t *data; + int rem; + int index; +} xcb_record_client_info_iterator_t; + +/** Opcode for xcb_record_bad_context. */ +#define XCB_RECORD_BAD_CONTEXT 0 + +/** + * @brief xcb_record_bad_context_error_t + **/ +typedef struct xcb_record_bad_context_error_t { + uint8_t response_type; + uint8_t error_code; + uint16_t sequence; + uint32_t invalid_record; + uint16_t minor_opcode; + uint8_t major_opcode; +} xcb_record_bad_context_error_t; + +/** + * @brief xcb_record_query_version_cookie_t + **/ +typedef struct xcb_record_query_version_cookie_t { + unsigned int sequence; +} xcb_record_query_version_cookie_t; + +/** Opcode for xcb_record_query_version. */ +#define XCB_RECORD_QUERY_VERSION 0 + +/** + * @brief xcb_record_query_version_request_t + **/ +typedef struct xcb_record_query_version_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + uint16_t major_version; + uint16_t minor_version; +} xcb_record_query_version_request_t; + +/** + * @brief xcb_record_query_version_reply_t + **/ +typedef struct xcb_record_query_version_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint16_t major_version; + uint16_t minor_version; +} xcb_record_query_version_reply_t; + +/** Opcode for xcb_record_create_context. */ +#define XCB_RECORD_CREATE_CONTEXT 1 + +/** + * @brief xcb_record_create_context_request_t + **/ +typedef struct xcb_record_create_context_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_record_context_t context; + xcb_record_element_header_t element_header; + uint8_t pad0[3]; + uint32_t num_client_specs; + uint32_t num_ranges; +} xcb_record_create_context_request_t; + +/** Opcode for xcb_record_register_clients. */ +#define XCB_RECORD_REGISTER_CLIENTS 2 + +/** + * @brief xcb_record_register_clients_request_t + **/ +typedef struct xcb_record_register_clients_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_record_context_t context; + xcb_record_element_header_t element_header; + uint8_t pad0[3]; + uint32_t num_client_specs; + uint32_t num_ranges; +} xcb_record_register_clients_request_t; + +/** Opcode for xcb_record_unregister_clients. */ +#define XCB_RECORD_UNREGISTER_CLIENTS 3 + +/** + * @brief xcb_record_unregister_clients_request_t + **/ +typedef struct xcb_record_unregister_clients_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_record_context_t context; + uint32_t num_client_specs; +} xcb_record_unregister_clients_request_t; + +/** + * @brief xcb_record_get_context_cookie_t + **/ +typedef struct xcb_record_get_context_cookie_t { + unsigned int sequence; +} xcb_record_get_context_cookie_t; + +/** Opcode for xcb_record_get_context. */ +#define XCB_RECORD_GET_CONTEXT 4 + +/** + * @brief xcb_record_get_context_request_t + **/ +typedef struct xcb_record_get_context_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_record_context_t context; +} xcb_record_get_context_request_t; + +/** + * @brief xcb_record_get_context_reply_t + **/ +typedef struct xcb_record_get_context_reply_t { + uint8_t response_type; + uint8_t enabled; + uint16_t sequence; + uint32_t length; + xcb_record_element_header_t element_header; + uint8_t pad0[3]; + uint32_t num_intercepted_clients; + uint8_t pad1[16]; +} xcb_record_get_context_reply_t; + +/** + * @brief xcb_record_enable_context_cookie_t + **/ +typedef struct xcb_record_enable_context_cookie_t { + unsigned int sequence; +} xcb_record_enable_context_cookie_t; + +/** Opcode for xcb_record_enable_context. */ +#define XCB_RECORD_ENABLE_CONTEXT 5 + +/** + * @brief xcb_record_enable_context_request_t + **/ +typedef struct xcb_record_enable_context_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_record_context_t context; +} xcb_record_enable_context_request_t; + +/** + * @brief xcb_record_enable_context_reply_t + **/ +typedef struct xcb_record_enable_context_reply_t { + uint8_t response_type; + uint8_t category; + uint16_t sequence; + uint32_t length; + xcb_record_element_header_t element_header; + uint8_t client_swapped; + uint8_t pad0[2]; + uint32_t xid_base; + uint32_t server_time; + uint32_t rec_sequence_num; + uint8_t pad1[8]; +} xcb_record_enable_context_reply_t; + +/** Opcode for xcb_record_disable_context. */ +#define XCB_RECORD_DISABLE_CONTEXT 6 + +/** + * @brief xcb_record_disable_context_request_t + **/ +typedef struct xcb_record_disable_context_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_record_context_t context; +} xcb_record_disable_context_request_t; + +/** Opcode for xcb_record_free_context. */ +#define XCB_RECORD_FREE_CONTEXT 7 + +/** + * @brief xcb_record_free_context_request_t + **/ +typedef struct xcb_record_free_context_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_record_context_t context; +} xcb_record_free_context_request_t; + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_record_context_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_record_context_t) + */ +void +xcb_record_context_next (xcb_record_context_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_record_context_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_record_context_end (xcb_record_context_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_record_range_8_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_record_range_8_t) + */ +void +xcb_record_range_8_next (xcb_record_range_8_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_record_range_8_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_record_range_8_end (xcb_record_range_8_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_record_range_16_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_record_range_16_t) + */ +void +xcb_record_range_16_next (xcb_record_range_16_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_record_range_16_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_record_range_16_end (xcb_record_range_16_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_record_ext_range_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_record_ext_range_t) + */ +void +xcb_record_ext_range_next (xcb_record_ext_range_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_record_ext_range_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_record_ext_range_end (xcb_record_ext_range_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_record_range_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_record_range_t) + */ +void +xcb_record_range_next (xcb_record_range_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_record_range_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_record_range_end (xcb_record_range_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_record_element_header_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_record_element_header_t) + */ +void +xcb_record_element_header_next (xcb_record_element_header_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_record_element_header_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_record_element_header_end (xcb_record_element_header_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_record_client_spec_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_record_client_spec_t) + */ +void +xcb_record_client_spec_next (xcb_record_client_spec_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_record_client_spec_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_record_client_spec_end (xcb_record_client_spec_iterator_t i); + +int +xcb_record_client_info_sizeof (const void *_buffer); + +xcb_record_range_t * +xcb_record_client_info_ranges (const xcb_record_client_info_t *R); + +int +xcb_record_client_info_ranges_length (const xcb_record_client_info_t *R); + +xcb_record_range_iterator_t +xcb_record_client_info_ranges_iterator (const xcb_record_client_info_t *R); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_record_client_info_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_record_client_info_t) + */ +void +xcb_record_client_info_next (xcb_record_client_info_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_record_client_info_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_record_client_info_end (xcb_record_client_info_iterator_t i); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_record_query_version_cookie_t +xcb_record_query_version (xcb_connection_t *c, + uint16_t major_version, + uint16_t minor_version); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_record_query_version_cookie_t +xcb_record_query_version_unchecked (xcb_connection_t *c, + uint16_t major_version, + uint16_t minor_version); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_record_query_version_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_record_query_version_reply_t * +xcb_record_query_version_reply (xcb_connection_t *c, + xcb_record_query_version_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_record_create_context_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_record_create_context_checked (xcb_connection_t *c, + xcb_record_context_t context, + xcb_record_element_header_t element_header, + uint32_t num_client_specs, + uint32_t num_ranges, + const xcb_record_client_spec_t *client_specs, + const xcb_record_range_t *ranges); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_record_create_context (xcb_connection_t *c, + xcb_record_context_t context, + xcb_record_element_header_t element_header, + uint32_t num_client_specs, + uint32_t num_ranges, + const xcb_record_client_spec_t *client_specs, + const xcb_record_range_t *ranges); + +xcb_record_client_spec_t * +xcb_record_create_context_client_specs (const xcb_record_create_context_request_t *R); + +int +xcb_record_create_context_client_specs_length (const xcb_record_create_context_request_t *R); + +xcb_generic_iterator_t +xcb_record_create_context_client_specs_end (const xcb_record_create_context_request_t *R); + +xcb_record_range_t * +xcb_record_create_context_ranges (const xcb_record_create_context_request_t *R); + +int +xcb_record_create_context_ranges_length (const xcb_record_create_context_request_t *R); + +xcb_record_range_iterator_t +xcb_record_create_context_ranges_iterator (const xcb_record_create_context_request_t *R); + +int +xcb_record_register_clients_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_record_register_clients_checked (xcb_connection_t *c, + xcb_record_context_t context, + xcb_record_element_header_t element_header, + uint32_t num_client_specs, + uint32_t num_ranges, + const xcb_record_client_spec_t *client_specs, + const xcb_record_range_t *ranges); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_record_register_clients (xcb_connection_t *c, + xcb_record_context_t context, + xcb_record_element_header_t element_header, + uint32_t num_client_specs, + uint32_t num_ranges, + const xcb_record_client_spec_t *client_specs, + const xcb_record_range_t *ranges); + +xcb_record_client_spec_t * +xcb_record_register_clients_client_specs (const xcb_record_register_clients_request_t *R); + +int +xcb_record_register_clients_client_specs_length (const xcb_record_register_clients_request_t *R); + +xcb_generic_iterator_t +xcb_record_register_clients_client_specs_end (const xcb_record_register_clients_request_t *R); + +xcb_record_range_t * +xcb_record_register_clients_ranges (const xcb_record_register_clients_request_t *R); + +int +xcb_record_register_clients_ranges_length (const xcb_record_register_clients_request_t *R); + +xcb_record_range_iterator_t +xcb_record_register_clients_ranges_iterator (const xcb_record_register_clients_request_t *R); + +int +xcb_record_unregister_clients_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_record_unregister_clients_checked (xcb_connection_t *c, + xcb_record_context_t context, + uint32_t num_client_specs, + const xcb_record_client_spec_t *client_specs); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_record_unregister_clients (xcb_connection_t *c, + xcb_record_context_t context, + uint32_t num_client_specs, + const xcb_record_client_spec_t *client_specs); + +xcb_record_client_spec_t * +xcb_record_unregister_clients_client_specs (const xcb_record_unregister_clients_request_t *R); + +int +xcb_record_unregister_clients_client_specs_length (const xcb_record_unregister_clients_request_t *R); + +xcb_generic_iterator_t +xcb_record_unregister_clients_client_specs_end (const xcb_record_unregister_clients_request_t *R); + +int +xcb_record_get_context_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_record_get_context_cookie_t +xcb_record_get_context (xcb_connection_t *c, + xcb_record_context_t context); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_record_get_context_cookie_t +xcb_record_get_context_unchecked (xcb_connection_t *c, + xcb_record_context_t context); + +int +xcb_record_get_context_intercepted_clients_length (const xcb_record_get_context_reply_t *R); + +xcb_record_client_info_iterator_t +xcb_record_get_context_intercepted_clients_iterator (const xcb_record_get_context_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_record_get_context_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_record_get_context_reply_t * +xcb_record_get_context_reply (xcb_connection_t *c, + xcb_record_get_context_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_record_enable_context_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_record_enable_context_cookie_t +xcb_record_enable_context (xcb_connection_t *c, + xcb_record_context_t context); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_record_enable_context_cookie_t +xcb_record_enable_context_unchecked (xcb_connection_t *c, + xcb_record_context_t context); + +uint8_t * +xcb_record_enable_context_data (const xcb_record_enable_context_reply_t *R); + +int +xcb_record_enable_context_data_length (const xcb_record_enable_context_reply_t *R); + +xcb_generic_iterator_t +xcb_record_enable_context_data_end (const xcb_record_enable_context_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_record_enable_context_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_record_enable_context_reply_t * +xcb_record_enable_context_reply (xcb_connection_t *c, + xcb_record_enable_context_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_record_disable_context_checked (xcb_connection_t *c, + xcb_record_context_t context); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_record_disable_context (xcb_connection_t *c, + xcb_record_context_t context); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_record_free_context_checked (xcb_connection_t *c, + xcb_record_context_t context); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_record_free_context (xcb_connection_t *c, + xcb_record_context_t context); + + +#ifdef __cplusplus +} +#endif + +#endif + +/** + * @} + */ diff --git a/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/include/xcb/render.h b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/include/xcb/render.h new file mode 100644 index 0000000000000000000000000000000000000000..d6f84d58702df04eb2612b80e1455d37143e3b4d --- /dev/null +++ b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/include/xcb/render.h @@ -0,0 +1,3277 @@ +/* + * This file generated automatically from render.xml by c_client.py. + * Edit at your peril. + */ + +/** + * @defgroup XCB_Render_API XCB Render API + * @brief Render XCB Protocol Implementation. + * @{ + **/ + +#ifndef __RENDER_H +#define __RENDER_H + +#include "xcb.h" +#include "xproto.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#define XCB_RENDER_MAJOR_VERSION 0 +#define XCB_RENDER_MINOR_VERSION 11 + +extern xcb_extension_t xcb_render_id; + +typedef enum xcb_render_pict_type_t { + XCB_RENDER_PICT_TYPE_INDEXED = 0, + XCB_RENDER_PICT_TYPE_DIRECT = 1 +} xcb_render_pict_type_t; + +typedef enum xcb_render_picture_enum_t { + XCB_RENDER_PICTURE_NONE = 0 +} xcb_render_picture_enum_t; + +typedef enum xcb_render_pict_op_t { + XCB_RENDER_PICT_OP_CLEAR = 0, + XCB_RENDER_PICT_OP_SRC = 1, + XCB_RENDER_PICT_OP_DST = 2, + XCB_RENDER_PICT_OP_OVER = 3, + XCB_RENDER_PICT_OP_OVER_REVERSE = 4, + XCB_RENDER_PICT_OP_IN = 5, + XCB_RENDER_PICT_OP_IN_REVERSE = 6, + XCB_RENDER_PICT_OP_OUT = 7, + XCB_RENDER_PICT_OP_OUT_REVERSE = 8, + XCB_RENDER_PICT_OP_ATOP = 9, + XCB_RENDER_PICT_OP_ATOP_REVERSE = 10, + XCB_RENDER_PICT_OP_XOR = 11, + XCB_RENDER_PICT_OP_ADD = 12, + XCB_RENDER_PICT_OP_SATURATE = 13, + XCB_RENDER_PICT_OP_DISJOINT_CLEAR = 16, + XCB_RENDER_PICT_OP_DISJOINT_SRC = 17, + XCB_RENDER_PICT_OP_DISJOINT_DST = 18, + XCB_RENDER_PICT_OP_DISJOINT_OVER = 19, + XCB_RENDER_PICT_OP_DISJOINT_OVER_REVERSE = 20, + XCB_RENDER_PICT_OP_DISJOINT_IN = 21, + XCB_RENDER_PICT_OP_DISJOINT_IN_REVERSE = 22, + XCB_RENDER_PICT_OP_DISJOINT_OUT = 23, + XCB_RENDER_PICT_OP_DISJOINT_OUT_REVERSE = 24, + XCB_RENDER_PICT_OP_DISJOINT_ATOP = 25, + XCB_RENDER_PICT_OP_DISJOINT_ATOP_REVERSE = 26, + XCB_RENDER_PICT_OP_DISJOINT_XOR = 27, + XCB_RENDER_PICT_OP_CONJOINT_CLEAR = 32, + XCB_RENDER_PICT_OP_CONJOINT_SRC = 33, + XCB_RENDER_PICT_OP_CONJOINT_DST = 34, + XCB_RENDER_PICT_OP_CONJOINT_OVER = 35, + XCB_RENDER_PICT_OP_CONJOINT_OVER_REVERSE = 36, + XCB_RENDER_PICT_OP_CONJOINT_IN = 37, + XCB_RENDER_PICT_OP_CONJOINT_IN_REVERSE = 38, + XCB_RENDER_PICT_OP_CONJOINT_OUT = 39, + XCB_RENDER_PICT_OP_CONJOINT_OUT_REVERSE = 40, + XCB_RENDER_PICT_OP_CONJOINT_ATOP = 41, + XCB_RENDER_PICT_OP_CONJOINT_ATOP_REVERSE = 42, + XCB_RENDER_PICT_OP_CONJOINT_XOR = 43, + XCB_RENDER_PICT_OP_MULTIPLY = 48, + XCB_RENDER_PICT_OP_SCREEN = 49, + XCB_RENDER_PICT_OP_OVERLAY = 50, + XCB_RENDER_PICT_OP_DARKEN = 51, + XCB_RENDER_PICT_OP_LIGHTEN = 52, + XCB_RENDER_PICT_OP_COLOR_DODGE = 53, + XCB_RENDER_PICT_OP_COLOR_BURN = 54, + XCB_RENDER_PICT_OP_HARD_LIGHT = 55, + XCB_RENDER_PICT_OP_SOFT_LIGHT = 56, + XCB_RENDER_PICT_OP_DIFFERENCE = 57, + XCB_RENDER_PICT_OP_EXCLUSION = 58, + XCB_RENDER_PICT_OP_HSL_HUE = 59, + XCB_RENDER_PICT_OP_HSL_SATURATION = 60, + XCB_RENDER_PICT_OP_HSL_COLOR = 61, + XCB_RENDER_PICT_OP_HSL_LUMINOSITY = 62 +} xcb_render_pict_op_t; + +typedef enum xcb_render_poly_edge_t { + XCB_RENDER_POLY_EDGE_SHARP = 0, + XCB_RENDER_POLY_EDGE_SMOOTH = 1 +} xcb_render_poly_edge_t; + +typedef enum xcb_render_poly_mode_t { + XCB_RENDER_POLY_MODE_PRECISE = 0, + XCB_RENDER_POLY_MODE_IMPRECISE = 1 +} xcb_render_poly_mode_t; + +typedef enum xcb_render_cp_t { + XCB_RENDER_CP_REPEAT = 1, + XCB_RENDER_CP_ALPHA_MAP = 2, + XCB_RENDER_CP_ALPHA_X_ORIGIN = 4, + XCB_RENDER_CP_ALPHA_Y_ORIGIN = 8, + XCB_RENDER_CP_CLIP_X_ORIGIN = 16, + XCB_RENDER_CP_CLIP_Y_ORIGIN = 32, + XCB_RENDER_CP_CLIP_MASK = 64, + XCB_RENDER_CP_GRAPHICS_EXPOSURE = 128, + XCB_RENDER_CP_SUBWINDOW_MODE = 256, + XCB_RENDER_CP_POLY_EDGE = 512, + XCB_RENDER_CP_POLY_MODE = 1024, + XCB_RENDER_CP_DITHER = 2048, + XCB_RENDER_CP_COMPONENT_ALPHA = 4096 +} xcb_render_cp_t; + +typedef enum xcb_render_sub_pixel_t { + XCB_RENDER_SUB_PIXEL_UNKNOWN = 0, + XCB_RENDER_SUB_PIXEL_HORIZONTAL_RGB = 1, + XCB_RENDER_SUB_PIXEL_HORIZONTAL_BGR = 2, + XCB_RENDER_SUB_PIXEL_VERTICAL_RGB = 3, + XCB_RENDER_SUB_PIXEL_VERTICAL_BGR = 4, + XCB_RENDER_SUB_PIXEL_NONE = 5 +} xcb_render_sub_pixel_t; + +typedef enum xcb_render_repeat_t { + XCB_RENDER_REPEAT_NONE = 0, + XCB_RENDER_REPEAT_NORMAL = 1, + XCB_RENDER_REPEAT_PAD = 2, + XCB_RENDER_REPEAT_REFLECT = 3 +} xcb_render_repeat_t; + +typedef uint32_t xcb_render_glyph_t; + +/** + * @brief xcb_render_glyph_iterator_t + **/ +typedef struct xcb_render_glyph_iterator_t { + xcb_render_glyph_t *data; + int rem; + int index; +} xcb_render_glyph_iterator_t; + +typedef uint32_t xcb_render_glyphset_t; + +/** + * @brief xcb_render_glyphset_iterator_t + **/ +typedef struct xcb_render_glyphset_iterator_t { + xcb_render_glyphset_t *data; + int rem; + int index; +} xcb_render_glyphset_iterator_t; + +typedef uint32_t xcb_render_picture_t; + +/** + * @brief xcb_render_picture_iterator_t + **/ +typedef struct xcb_render_picture_iterator_t { + xcb_render_picture_t *data; + int rem; + int index; +} xcb_render_picture_iterator_t; + +typedef uint32_t xcb_render_pictformat_t; + +/** + * @brief xcb_render_pictformat_iterator_t + **/ +typedef struct xcb_render_pictformat_iterator_t { + xcb_render_pictformat_t *data; + int rem; + int index; +} xcb_render_pictformat_iterator_t; + +typedef int32_t xcb_render_fixed_t; + +/** + * @brief xcb_render_fixed_iterator_t + **/ +typedef struct xcb_render_fixed_iterator_t { + xcb_render_fixed_t *data; + int rem; + int index; +} xcb_render_fixed_iterator_t; + +/** Opcode for xcb_render_pict_format. */ +#define XCB_RENDER_PICT_FORMAT 0 + +/** + * @brief xcb_render_pict_format_error_t + **/ +typedef struct xcb_render_pict_format_error_t { + uint8_t response_type; + uint8_t error_code; + uint16_t sequence; + uint32_t bad_value; + uint16_t minor_opcode; + uint8_t major_opcode; +} xcb_render_pict_format_error_t; + +/** Opcode for xcb_render_picture. */ +#define XCB_RENDER_PICTURE 1 + +/** + * @brief xcb_render_picture_error_t + **/ +typedef struct xcb_render_picture_error_t { + uint8_t response_type; + uint8_t error_code; + uint16_t sequence; + uint32_t bad_value; + uint16_t minor_opcode; + uint8_t major_opcode; +} xcb_render_picture_error_t; + +/** Opcode for xcb_render_pict_op. */ +#define XCB_RENDER_PICT_OP 2 + +/** + * @brief xcb_render_pict_op_error_t + **/ +typedef struct xcb_render_pict_op_error_t { + uint8_t response_type; + uint8_t error_code; + uint16_t sequence; + uint32_t bad_value; + uint16_t minor_opcode; + uint8_t major_opcode; +} xcb_render_pict_op_error_t; + +/** Opcode for xcb_render_glyph_set. */ +#define XCB_RENDER_GLYPH_SET 3 + +/** + * @brief xcb_render_glyph_set_error_t + **/ +typedef struct xcb_render_glyph_set_error_t { + uint8_t response_type; + uint8_t error_code; + uint16_t sequence; + uint32_t bad_value; + uint16_t minor_opcode; + uint8_t major_opcode; +} xcb_render_glyph_set_error_t; + +/** Opcode for xcb_render_glyph. */ +#define XCB_RENDER_GLYPH 4 + +/** + * @brief xcb_render_glyph_error_t + **/ +typedef struct xcb_render_glyph_error_t { + uint8_t response_type; + uint8_t error_code; + uint16_t sequence; + uint32_t bad_value; + uint16_t minor_opcode; + uint8_t major_opcode; +} xcb_render_glyph_error_t; + +/** + * @brief xcb_render_directformat_t + **/ +typedef struct xcb_render_directformat_t { + uint16_t red_shift; + uint16_t red_mask; + uint16_t green_shift; + uint16_t green_mask; + uint16_t blue_shift; + uint16_t blue_mask; + uint16_t alpha_shift; + uint16_t alpha_mask; +} xcb_render_directformat_t; + +/** + * @brief xcb_render_directformat_iterator_t + **/ +typedef struct xcb_render_directformat_iterator_t { + xcb_render_directformat_t *data; + int rem; + int index; +} xcb_render_directformat_iterator_t; + +/** + * @brief xcb_render_pictforminfo_t + **/ +typedef struct xcb_render_pictforminfo_t { + xcb_render_pictformat_t id; + uint8_t type; + uint8_t depth; + uint8_t pad0[2]; + xcb_render_directformat_t direct; + xcb_colormap_t colormap; +} xcb_render_pictforminfo_t; + +/** + * @brief xcb_render_pictforminfo_iterator_t + **/ +typedef struct xcb_render_pictforminfo_iterator_t { + xcb_render_pictforminfo_t *data; + int rem; + int index; +} xcb_render_pictforminfo_iterator_t; + +/** + * @brief xcb_render_pictvisual_t + **/ +typedef struct xcb_render_pictvisual_t { + xcb_visualid_t visual; + xcb_render_pictformat_t format; +} xcb_render_pictvisual_t; + +/** + * @brief xcb_render_pictvisual_iterator_t + **/ +typedef struct xcb_render_pictvisual_iterator_t { + xcb_render_pictvisual_t *data; + int rem; + int index; +} xcb_render_pictvisual_iterator_t; + +/** + * @brief xcb_render_pictdepth_t + **/ +typedef struct xcb_render_pictdepth_t { + uint8_t depth; + uint8_t pad0; + uint16_t num_visuals; + uint8_t pad1[4]; +} xcb_render_pictdepth_t; + +/** + * @brief xcb_render_pictdepth_iterator_t + **/ +typedef struct xcb_render_pictdepth_iterator_t { + xcb_render_pictdepth_t *data; + int rem; + int index; +} xcb_render_pictdepth_iterator_t; + +/** + * @brief xcb_render_pictscreen_t + **/ +typedef struct xcb_render_pictscreen_t { + uint32_t num_depths; + xcb_render_pictformat_t fallback; +} xcb_render_pictscreen_t; + +/** + * @brief xcb_render_pictscreen_iterator_t + **/ +typedef struct xcb_render_pictscreen_iterator_t { + xcb_render_pictscreen_t *data; + int rem; + int index; +} xcb_render_pictscreen_iterator_t; + +/** + * @brief xcb_render_indexvalue_t + **/ +typedef struct xcb_render_indexvalue_t { + uint32_t pixel; + uint16_t red; + uint16_t green; + uint16_t blue; + uint16_t alpha; +} xcb_render_indexvalue_t; + +/** + * @brief xcb_render_indexvalue_iterator_t + **/ +typedef struct xcb_render_indexvalue_iterator_t { + xcb_render_indexvalue_t *data; + int rem; + int index; +} xcb_render_indexvalue_iterator_t; + +/** + * @brief xcb_render_color_t + **/ +typedef struct xcb_render_color_t { + uint16_t red; + uint16_t green; + uint16_t blue; + uint16_t alpha; +} xcb_render_color_t; + +/** + * @brief xcb_render_color_iterator_t + **/ +typedef struct xcb_render_color_iterator_t { + xcb_render_color_t *data; + int rem; + int index; +} xcb_render_color_iterator_t; + +/** + * @brief xcb_render_pointfix_t + **/ +typedef struct xcb_render_pointfix_t { + xcb_render_fixed_t x; + xcb_render_fixed_t y; +} xcb_render_pointfix_t; + +/** + * @brief xcb_render_pointfix_iterator_t + **/ +typedef struct xcb_render_pointfix_iterator_t { + xcb_render_pointfix_t *data; + int rem; + int index; +} xcb_render_pointfix_iterator_t; + +/** + * @brief xcb_render_linefix_t + **/ +typedef struct xcb_render_linefix_t { + xcb_render_pointfix_t p1; + xcb_render_pointfix_t p2; +} xcb_render_linefix_t; + +/** + * @brief xcb_render_linefix_iterator_t + **/ +typedef struct xcb_render_linefix_iterator_t { + xcb_render_linefix_t *data; + int rem; + int index; +} xcb_render_linefix_iterator_t; + +/** + * @brief xcb_render_triangle_t + **/ +typedef struct xcb_render_triangle_t { + xcb_render_pointfix_t p1; + xcb_render_pointfix_t p2; + xcb_render_pointfix_t p3; +} xcb_render_triangle_t; + +/** + * @brief xcb_render_triangle_iterator_t + **/ +typedef struct xcb_render_triangle_iterator_t { + xcb_render_triangle_t *data; + int rem; + int index; +} xcb_render_triangle_iterator_t; + +/** + * @brief xcb_render_trapezoid_t + **/ +typedef struct xcb_render_trapezoid_t { + xcb_render_fixed_t top; + xcb_render_fixed_t bottom; + xcb_render_linefix_t left; + xcb_render_linefix_t right; +} xcb_render_trapezoid_t; + +/** + * @brief xcb_render_trapezoid_iterator_t + **/ +typedef struct xcb_render_trapezoid_iterator_t { + xcb_render_trapezoid_t *data; + int rem; + int index; +} xcb_render_trapezoid_iterator_t; + +/** + * @brief xcb_render_glyphinfo_t + **/ +typedef struct xcb_render_glyphinfo_t { + uint16_t width; + uint16_t height; + int16_t x; + int16_t y; + int16_t x_off; + int16_t y_off; +} xcb_render_glyphinfo_t; + +/** + * @brief xcb_render_glyphinfo_iterator_t + **/ +typedef struct xcb_render_glyphinfo_iterator_t { + xcb_render_glyphinfo_t *data; + int rem; + int index; +} xcb_render_glyphinfo_iterator_t; + +/** + * @brief xcb_render_query_version_cookie_t + **/ +typedef struct xcb_render_query_version_cookie_t { + unsigned int sequence; +} xcb_render_query_version_cookie_t; + +/** Opcode for xcb_render_query_version. */ +#define XCB_RENDER_QUERY_VERSION 0 + +/** + * @brief xcb_render_query_version_request_t + **/ +typedef struct xcb_render_query_version_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + uint32_t client_major_version; + uint32_t client_minor_version; +} xcb_render_query_version_request_t; + +/** + * @brief xcb_render_query_version_reply_t + **/ +typedef struct xcb_render_query_version_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint32_t major_version; + uint32_t minor_version; + uint8_t pad1[16]; +} xcb_render_query_version_reply_t; + +/** + * @brief xcb_render_query_pict_formats_cookie_t + **/ +typedef struct xcb_render_query_pict_formats_cookie_t { + unsigned int sequence; +} xcb_render_query_pict_formats_cookie_t; + +/** Opcode for xcb_render_query_pict_formats. */ +#define XCB_RENDER_QUERY_PICT_FORMATS 1 + +/** + * @brief xcb_render_query_pict_formats_request_t + **/ +typedef struct xcb_render_query_pict_formats_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; +} xcb_render_query_pict_formats_request_t; + +/** + * @brief xcb_render_query_pict_formats_reply_t + **/ +typedef struct xcb_render_query_pict_formats_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint32_t num_formats; + uint32_t num_screens; + uint32_t num_depths; + uint32_t num_visuals; + uint32_t num_subpixel; + uint8_t pad1[4]; +} xcb_render_query_pict_formats_reply_t; + +/** + * @brief xcb_render_query_pict_index_values_cookie_t + **/ +typedef struct xcb_render_query_pict_index_values_cookie_t { + unsigned int sequence; +} xcb_render_query_pict_index_values_cookie_t; + +/** Opcode for xcb_render_query_pict_index_values. */ +#define XCB_RENDER_QUERY_PICT_INDEX_VALUES 2 + +/** + * @brief xcb_render_query_pict_index_values_request_t + **/ +typedef struct xcb_render_query_pict_index_values_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_render_pictformat_t format; +} xcb_render_query_pict_index_values_request_t; + +/** + * @brief xcb_render_query_pict_index_values_reply_t + **/ +typedef struct xcb_render_query_pict_index_values_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint32_t num_values; + uint8_t pad1[20]; +} xcb_render_query_pict_index_values_reply_t; + +/** + * @brief xcb_render_create_picture_value_list_t + **/ +typedef struct xcb_render_create_picture_value_list_t { + uint32_t repeat; + xcb_render_picture_t alphamap; + int32_t alphaxorigin; + int32_t alphayorigin; + int32_t clipxorigin; + int32_t clipyorigin; + xcb_pixmap_t clipmask; + uint32_t graphicsexposure; + uint32_t subwindowmode; + uint32_t polyedge; + uint32_t polymode; + xcb_atom_t dither; + uint32_t componentalpha; +} xcb_render_create_picture_value_list_t; + +/** Opcode for xcb_render_create_picture. */ +#define XCB_RENDER_CREATE_PICTURE 4 + +/** + * @brief xcb_render_create_picture_request_t + **/ +typedef struct xcb_render_create_picture_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_render_picture_t pid; + xcb_drawable_t drawable; + xcb_render_pictformat_t format; + uint32_t value_mask; +} xcb_render_create_picture_request_t; + +/** + * @brief xcb_render_change_picture_value_list_t + **/ +typedef struct xcb_render_change_picture_value_list_t { + uint32_t repeat; + xcb_render_picture_t alphamap; + int32_t alphaxorigin; + int32_t alphayorigin; + int32_t clipxorigin; + int32_t clipyorigin; + xcb_pixmap_t clipmask; + uint32_t graphicsexposure; + uint32_t subwindowmode; + uint32_t polyedge; + uint32_t polymode; + xcb_atom_t dither; + uint32_t componentalpha; +} xcb_render_change_picture_value_list_t; + +/** Opcode for xcb_render_change_picture. */ +#define XCB_RENDER_CHANGE_PICTURE 5 + +/** + * @brief xcb_render_change_picture_request_t + **/ +typedef struct xcb_render_change_picture_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_render_picture_t picture; + uint32_t value_mask; +} xcb_render_change_picture_request_t; + +/** Opcode for xcb_render_set_picture_clip_rectangles. */ +#define XCB_RENDER_SET_PICTURE_CLIP_RECTANGLES 6 + +/** + * @brief xcb_render_set_picture_clip_rectangles_request_t + **/ +typedef struct xcb_render_set_picture_clip_rectangles_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_render_picture_t picture; + int16_t clip_x_origin; + int16_t clip_y_origin; +} xcb_render_set_picture_clip_rectangles_request_t; + +/** Opcode for xcb_render_free_picture. */ +#define XCB_RENDER_FREE_PICTURE 7 + +/** + * @brief xcb_render_free_picture_request_t + **/ +typedef struct xcb_render_free_picture_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_render_picture_t picture; +} xcb_render_free_picture_request_t; + +/** Opcode for xcb_render_composite. */ +#define XCB_RENDER_COMPOSITE 8 + +/** + * @brief xcb_render_composite_request_t + **/ +typedef struct xcb_render_composite_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + uint8_t op; + uint8_t pad0[3]; + xcb_render_picture_t src; + xcb_render_picture_t mask; + xcb_render_picture_t dst; + int16_t src_x; + int16_t src_y; + int16_t mask_x; + int16_t mask_y; + int16_t dst_x; + int16_t dst_y; + uint16_t width; + uint16_t height; +} xcb_render_composite_request_t; + +/** Opcode for xcb_render_trapezoids. */ +#define XCB_RENDER_TRAPEZOIDS 10 + +/** + * @brief xcb_render_trapezoids_request_t + **/ +typedef struct xcb_render_trapezoids_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + uint8_t op; + uint8_t pad0[3]; + xcb_render_picture_t src; + xcb_render_picture_t dst; + xcb_render_pictformat_t mask_format; + int16_t src_x; + int16_t src_y; +} xcb_render_trapezoids_request_t; + +/** Opcode for xcb_render_triangles. */ +#define XCB_RENDER_TRIANGLES 11 + +/** + * @brief xcb_render_triangles_request_t + **/ +typedef struct xcb_render_triangles_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + uint8_t op; + uint8_t pad0[3]; + xcb_render_picture_t src; + xcb_render_picture_t dst; + xcb_render_pictformat_t mask_format; + int16_t src_x; + int16_t src_y; +} xcb_render_triangles_request_t; + +/** Opcode for xcb_render_tri_strip. */ +#define XCB_RENDER_TRI_STRIP 12 + +/** + * @brief xcb_render_tri_strip_request_t + **/ +typedef struct xcb_render_tri_strip_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + uint8_t op; + uint8_t pad0[3]; + xcb_render_picture_t src; + xcb_render_picture_t dst; + xcb_render_pictformat_t mask_format; + int16_t src_x; + int16_t src_y; +} xcb_render_tri_strip_request_t; + +/** Opcode for xcb_render_tri_fan. */ +#define XCB_RENDER_TRI_FAN 13 + +/** + * @brief xcb_render_tri_fan_request_t + **/ +typedef struct xcb_render_tri_fan_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + uint8_t op; + uint8_t pad0[3]; + xcb_render_picture_t src; + xcb_render_picture_t dst; + xcb_render_pictformat_t mask_format; + int16_t src_x; + int16_t src_y; +} xcb_render_tri_fan_request_t; + +/** Opcode for xcb_render_create_glyph_set. */ +#define XCB_RENDER_CREATE_GLYPH_SET 17 + +/** + * @brief xcb_render_create_glyph_set_request_t + **/ +typedef struct xcb_render_create_glyph_set_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_render_glyphset_t gsid; + xcb_render_pictformat_t format; +} xcb_render_create_glyph_set_request_t; + +/** Opcode for xcb_render_reference_glyph_set. */ +#define XCB_RENDER_REFERENCE_GLYPH_SET 18 + +/** + * @brief xcb_render_reference_glyph_set_request_t + **/ +typedef struct xcb_render_reference_glyph_set_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_render_glyphset_t gsid; + xcb_render_glyphset_t existing; +} xcb_render_reference_glyph_set_request_t; + +/** Opcode for xcb_render_free_glyph_set. */ +#define XCB_RENDER_FREE_GLYPH_SET 19 + +/** + * @brief xcb_render_free_glyph_set_request_t + **/ +typedef struct xcb_render_free_glyph_set_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_render_glyphset_t glyphset; +} xcb_render_free_glyph_set_request_t; + +/** Opcode for xcb_render_add_glyphs. */ +#define XCB_RENDER_ADD_GLYPHS 20 + +/** + * @brief xcb_render_add_glyphs_request_t + **/ +typedef struct xcb_render_add_glyphs_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_render_glyphset_t glyphset; + uint32_t glyphs_len; +} xcb_render_add_glyphs_request_t; + +/** Opcode for xcb_render_free_glyphs. */ +#define XCB_RENDER_FREE_GLYPHS 22 + +/** + * @brief xcb_render_free_glyphs_request_t + **/ +typedef struct xcb_render_free_glyphs_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_render_glyphset_t glyphset; +} xcb_render_free_glyphs_request_t; + +/** Opcode for xcb_render_composite_glyphs_8. */ +#define XCB_RENDER_COMPOSITE_GLYPHS_8 23 + +/** + * @brief xcb_render_composite_glyphs_8_request_t + **/ +typedef struct xcb_render_composite_glyphs_8_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + uint8_t op; + uint8_t pad0[3]; + xcb_render_picture_t src; + xcb_render_picture_t dst; + xcb_render_pictformat_t mask_format; + xcb_render_glyphset_t glyphset; + int16_t src_x; + int16_t src_y; +} xcb_render_composite_glyphs_8_request_t; + +/** Opcode for xcb_render_composite_glyphs_16. */ +#define XCB_RENDER_COMPOSITE_GLYPHS_16 24 + +/** + * @brief xcb_render_composite_glyphs_16_request_t + **/ +typedef struct xcb_render_composite_glyphs_16_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + uint8_t op; + uint8_t pad0[3]; + xcb_render_picture_t src; + xcb_render_picture_t dst; + xcb_render_pictformat_t mask_format; + xcb_render_glyphset_t glyphset; + int16_t src_x; + int16_t src_y; +} xcb_render_composite_glyphs_16_request_t; + +/** Opcode for xcb_render_composite_glyphs_32. */ +#define XCB_RENDER_COMPOSITE_GLYPHS_32 25 + +/** + * @brief xcb_render_composite_glyphs_32_request_t + **/ +typedef struct xcb_render_composite_glyphs_32_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + uint8_t op; + uint8_t pad0[3]; + xcb_render_picture_t src; + xcb_render_picture_t dst; + xcb_render_pictformat_t mask_format; + xcb_render_glyphset_t glyphset; + int16_t src_x; + int16_t src_y; +} xcb_render_composite_glyphs_32_request_t; + +/** Opcode for xcb_render_fill_rectangles. */ +#define XCB_RENDER_FILL_RECTANGLES 26 + +/** + * @brief xcb_render_fill_rectangles_request_t + **/ +typedef struct xcb_render_fill_rectangles_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + uint8_t op; + uint8_t pad0[3]; + xcb_render_picture_t dst; + xcb_render_color_t color; +} xcb_render_fill_rectangles_request_t; + +/** Opcode for xcb_render_create_cursor. */ +#define XCB_RENDER_CREATE_CURSOR 27 + +/** + * @brief xcb_render_create_cursor_request_t + **/ +typedef struct xcb_render_create_cursor_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_cursor_t cid; + xcb_render_picture_t source; + uint16_t x; + uint16_t y; +} xcb_render_create_cursor_request_t; + +/** + * @brief xcb_render_transform_t + **/ +typedef struct xcb_render_transform_t { + xcb_render_fixed_t matrix11; + xcb_render_fixed_t matrix12; + xcb_render_fixed_t matrix13; + xcb_render_fixed_t matrix21; + xcb_render_fixed_t matrix22; + xcb_render_fixed_t matrix23; + xcb_render_fixed_t matrix31; + xcb_render_fixed_t matrix32; + xcb_render_fixed_t matrix33; +} xcb_render_transform_t; + +/** + * @brief xcb_render_transform_iterator_t + **/ +typedef struct xcb_render_transform_iterator_t { + xcb_render_transform_t *data; + int rem; + int index; +} xcb_render_transform_iterator_t; + +/** Opcode for xcb_render_set_picture_transform. */ +#define XCB_RENDER_SET_PICTURE_TRANSFORM 28 + +/** + * @brief xcb_render_set_picture_transform_request_t + **/ +typedef struct xcb_render_set_picture_transform_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_render_picture_t picture; + xcb_render_transform_t transform; +} xcb_render_set_picture_transform_request_t; + +/** + * @brief xcb_render_query_filters_cookie_t + **/ +typedef struct xcb_render_query_filters_cookie_t { + unsigned int sequence; +} xcb_render_query_filters_cookie_t; + +/** Opcode for xcb_render_query_filters. */ +#define XCB_RENDER_QUERY_FILTERS 29 + +/** + * @brief xcb_render_query_filters_request_t + **/ +typedef struct xcb_render_query_filters_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_drawable_t drawable; +} xcb_render_query_filters_request_t; + +/** + * @brief xcb_render_query_filters_reply_t + **/ +typedef struct xcb_render_query_filters_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint32_t num_aliases; + uint32_t num_filters; + uint8_t pad1[16]; +} xcb_render_query_filters_reply_t; + +/** Opcode for xcb_render_set_picture_filter. */ +#define XCB_RENDER_SET_PICTURE_FILTER 30 + +/** + * @brief xcb_render_set_picture_filter_request_t + **/ +typedef struct xcb_render_set_picture_filter_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_render_picture_t picture; + uint16_t filter_len; + uint8_t pad0[2]; +} xcb_render_set_picture_filter_request_t; + +/** + * @brief xcb_render_animcursorelt_t + **/ +typedef struct xcb_render_animcursorelt_t { + xcb_cursor_t cursor; + uint32_t delay; +} xcb_render_animcursorelt_t; + +/** + * @brief xcb_render_animcursorelt_iterator_t + **/ +typedef struct xcb_render_animcursorelt_iterator_t { + xcb_render_animcursorelt_t *data; + int rem; + int index; +} xcb_render_animcursorelt_iterator_t; + +/** Opcode for xcb_render_create_anim_cursor. */ +#define XCB_RENDER_CREATE_ANIM_CURSOR 31 + +/** + * @brief xcb_render_create_anim_cursor_request_t + **/ +typedef struct xcb_render_create_anim_cursor_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_cursor_t cid; +} xcb_render_create_anim_cursor_request_t; + +/** + * @brief xcb_render_spanfix_t + **/ +typedef struct xcb_render_spanfix_t { + xcb_render_fixed_t l; + xcb_render_fixed_t r; + xcb_render_fixed_t y; +} xcb_render_spanfix_t; + +/** + * @brief xcb_render_spanfix_iterator_t + **/ +typedef struct xcb_render_spanfix_iterator_t { + xcb_render_spanfix_t *data; + int rem; + int index; +} xcb_render_spanfix_iterator_t; + +/** + * @brief xcb_render_trap_t + **/ +typedef struct xcb_render_trap_t { + xcb_render_spanfix_t top; + xcb_render_spanfix_t bot; +} xcb_render_trap_t; + +/** + * @brief xcb_render_trap_iterator_t + **/ +typedef struct xcb_render_trap_iterator_t { + xcb_render_trap_t *data; + int rem; + int index; +} xcb_render_trap_iterator_t; + +/** Opcode for xcb_render_add_traps. */ +#define XCB_RENDER_ADD_TRAPS 32 + +/** + * @brief xcb_render_add_traps_request_t + **/ +typedef struct xcb_render_add_traps_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_render_picture_t picture; + int16_t x_off; + int16_t y_off; +} xcb_render_add_traps_request_t; + +/** Opcode for xcb_render_create_solid_fill. */ +#define XCB_RENDER_CREATE_SOLID_FILL 33 + +/** + * @brief xcb_render_create_solid_fill_request_t + **/ +typedef struct xcb_render_create_solid_fill_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_render_picture_t picture; + xcb_render_color_t color; +} xcb_render_create_solid_fill_request_t; + +/** Opcode for xcb_render_create_linear_gradient. */ +#define XCB_RENDER_CREATE_LINEAR_GRADIENT 34 + +/** + * @brief xcb_render_create_linear_gradient_request_t + **/ +typedef struct xcb_render_create_linear_gradient_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_render_picture_t picture; + xcb_render_pointfix_t p1; + xcb_render_pointfix_t p2; + uint32_t num_stops; +} xcb_render_create_linear_gradient_request_t; + +/** Opcode for xcb_render_create_radial_gradient. */ +#define XCB_RENDER_CREATE_RADIAL_GRADIENT 35 + +/** + * @brief xcb_render_create_radial_gradient_request_t + **/ +typedef struct xcb_render_create_radial_gradient_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_render_picture_t picture; + xcb_render_pointfix_t inner; + xcb_render_pointfix_t outer; + xcb_render_fixed_t inner_radius; + xcb_render_fixed_t outer_radius; + uint32_t num_stops; +} xcb_render_create_radial_gradient_request_t; + +/** Opcode for xcb_render_create_conical_gradient. */ +#define XCB_RENDER_CREATE_CONICAL_GRADIENT 36 + +/** + * @brief xcb_render_create_conical_gradient_request_t + **/ +typedef struct xcb_render_create_conical_gradient_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_render_picture_t picture; + xcb_render_pointfix_t center; + xcb_render_fixed_t angle; + uint32_t num_stops; +} xcb_render_create_conical_gradient_request_t; + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_render_glyph_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_render_glyph_t) + */ +void +xcb_render_glyph_next (xcb_render_glyph_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_render_glyph_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_render_glyph_end (xcb_render_glyph_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_render_glyphset_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_render_glyphset_t) + */ +void +xcb_render_glyphset_next (xcb_render_glyphset_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_render_glyphset_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_render_glyphset_end (xcb_render_glyphset_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_render_picture_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_render_picture_t) + */ +void +xcb_render_picture_next (xcb_render_picture_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_render_picture_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_render_picture_end (xcb_render_picture_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_render_pictformat_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_render_pictformat_t) + */ +void +xcb_render_pictformat_next (xcb_render_pictformat_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_render_pictformat_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_render_pictformat_end (xcb_render_pictformat_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_render_fixed_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_render_fixed_t) + */ +void +xcb_render_fixed_next (xcb_render_fixed_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_render_fixed_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_render_fixed_end (xcb_render_fixed_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_render_directformat_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_render_directformat_t) + */ +void +xcb_render_directformat_next (xcb_render_directformat_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_render_directformat_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_render_directformat_end (xcb_render_directformat_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_render_pictforminfo_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_render_pictforminfo_t) + */ +void +xcb_render_pictforminfo_next (xcb_render_pictforminfo_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_render_pictforminfo_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_render_pictforminfo_end (xcb_render_pictforminfo_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_render_pictvisual_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_render_pictvisual_t) + */ +void +xcb_render_pictvisual_next (xcb_render_pictvisual_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_render_pictvisual_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_render_pictvisual_end (xcb_render_pictvisual_iterator_t i); + +int +xcb_render_pictdepth_sizeof (const void *_buffer); + +xcb_render_pictvisual_t * +xcb_render_pictdepth_visuals (const xcb_render_pictdepth_t *R); + +int +xcb_render_pictdepth_visuals_length (const xcb_render_pictdepth_t *R); + +xcb_render_pictvisual_iterator_t +xcb_render_pictdepth_visuals_iterator (const xcb_render_pictdepth_t *R); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_render_pictdepth_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_render_pictdepth_t) + */ +void +xcb_render_pictdepth_next (xcb_render_pictdepth_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_render_pictdepth_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_render_pictdepth_end (xcb_render_pictdepth_iterator_t i); + +int +xcb_render_pictscreen_sizeof (const void *_buffer); + +int +xcb_render_pictscreen_depths_length (const xcb_render_pictscreen_t *R); + +xcb_render_pictdepth_iterator_t +xcb_render_pictscreen_depths_iterator (const xcb_render_pictscreen_t *R); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_render_pictscreen_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_render_pictscreen_t) + */ +void +xcb_render_pictscreen_next (xcb_render_pictscreen_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_render_pictscreen_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_render_pictscreen_end (xcb_render_pictscreen_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_render_indexvalue_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_render_indexvalue_t) + */ +void +xcb_render_indexvalue_next (xcb_render_indexvalue_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_render_indexvalue_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_render_indexvalue_end (xcb_render_indexvalue_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_render_color_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_render_color_t) + */ +void +xcb_render_color_next (xcb_render_color_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_render_color_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_render_color_end (xcb_render_color_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_render_pointfix_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_render_pointfix_t) + */ +void +xcb_render_pointfix_next (xcb_render_pointfix_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_render_pointfix_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_render_pointfix_end (xcb_render_pointfix_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_render_linefix_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_render_linefix_t) + */ +void +xcb_render_linefix_next (xcb_render_linefix_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_render_linefix_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_render_linefix_end (xcb_render_linefix_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_render_triangle_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_render_triangle_t) + */ +void +xcb_render_triangle_next (xcb_render_triangle_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_render_triangle_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_render_triangle_end (xcb_render_triangle_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_render_trapezoid_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_render_trapezoid_t) + */ +void +xcb_render_trapezoid_next (xcb_render_trapezoid_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_render_trapezoid_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_render_trapezoid_end (xcb_render_trapezoid_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_render_glyphinfo_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_render_glyphinfo_t) + */ +void +xcb_render_glyphinfo_next (xcb_render_glyphinfo_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_render_glyphinfo_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_render_glyphinfo_end (xcb_render_glyphinfo_iterator_t i); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_render_query_version_cookie_t +xcb_render_query_version (xcb_connection_t *c, + uint32_t client_major_version, + uint32_t client_minor_version); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_render_query_version_cookie_t +xcb_render_query_version_unchecked (xcb_connection_t *c, + uint32_t client_major_version, + uint32_t client_minor_version); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_render_query_version_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_render_query_version_reply_t * +xcb_render_query_version_reply (xcb_connection_t *c, + xcb_render_query_version_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_render_query_pict_formats_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_render_query_pict_formats_cookie_t +xcb_render_query_pict_formats (xcb_connection_t *c); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_render_query_pict_formats_cookie_t +xcb_render_query_pict_formats_unchecked (xcb_connection_t *c); + +xcb_render_pictforminfo_t * +xcb_render_query_pict_formats_formats (const xcb_render_query_pict_formats_reply_t *R); + +int +xcb_render_query_pict_formats_formats_length (const xcb_render_query_pict_formats_reply_t *R); + +xcb_render_pictforminfo_iterator_t +xcb_render_query_pict_formats_formats_iterator (const xcb_render_query_pict_formats_reply_t *R); + +int +xcb_render_query_pict_formats_screens_length (const xcb_render_query_pict_formats_reply_t *R); + +xcb_render_pictscreen_iterator_t +xcb_render_query_pict_formats_screens_iterator (const xcb_render_query_pict_formats_reply_t *R); + +uint32_t * +xcb_render_query_pict_formats_subpixels (const xcb_render_query_pict_formats_reply_t *R); + +int +xcb_render_query_pict_formats_subpixels_length (const xcb_render_query_pict_formats_reply_t *R); + +xcb_generic_iterator_t +xcb_render_query_pict_formats_subpixels_end (const xcb_render_query_pict_formats_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_render_query_pict_formats_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_render_query_pict_formats_reply_t * +xcb_render_query_pict_formats_reply (xcb_connection_t *c, + xcb_render_query_pict_formats_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_render_query_pict_index_values_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_render_query_pict_index_values_cookie_t +xcb_render_query_pict_index_values (xcb_connection_t *c, + xcb_render_pictformat_t format); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_render_query_pict_index_values_cookie_t +xcb_render_query_pict_index_values_unchecked (xcb_connection_t *c, + xcb_render_pictformat_t format); + +xcb_render_indexvalue_t * +xcb_render_query_pict_index_values_values (const xcb_render_query_pict_index_values_reply_t *R); + +int +xcb_render_query_pict_index_values_values_length (const xcb_render_query_pict_index_values_reply_t *R); + +xcb_render_indexvalue_iterator_t +xcb_render_query_pict_index_values_values_iterator (const xcb_render_query_pict_index_values_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_render_query_pict_index_values_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_render_query_pict_index_values_reply_t * +xcb_render_query_pict_index_values_reply (xcb_connection_t *c, + xcb_render_query_pict_index_values_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_render_create_picture_value_list_serialize (void **_buffer, + uint32_t value_mask, + const xcb_render_create_picture_value_list_t *_aux); + +int +xcb_render_create_picture_value_list_unpack (const void *_buffer, + uint32_t value_mask, + xcb_render_create_picture_value_list_t *_aux); + +int +xcb_render_create_picture_value_list_sizeof (const void *_buffer, + uint32_t value_mask); + +int +xcb_render_create_picture_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_render_create_picture_checked (xcb_connection_t *c, + xcb_render_picture_t pid, + xcb_drawable_t drawable, + xcb_render_pictformat_t format, + uint32_t value_mask, + const void *value_list); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_render_create_picture (xcb_connection_t *c, + xcb_render_picture_t pid, + xcb_drawable_t drawable, + xcb_render_pictformat_t format, + uint32_t value_mask, + const void *value_list); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_render_create_picture_aux_checked (xcb_connection_t *c, + xcb_render_picture_t pid, + xcb_drawable_t drawable, + xcb_render_pictformat_t format, + uint32_t value_mask, + const xcb_render_create_picture_value_list_t *value_list); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_render_create_picture_aux (xcb_connection_t *c, + xcb_render_picture_t pid, + xcb_drawable_t drawable, + xcb_render_pictformat_t format, + uint32_t value_mask, + const xcb_render_create_picture_value_list_t *value_list); + +void * +xcb_render_create_picture_value_list (const xcb_render_create_picture_request_t *R); + +int +xcb_render_change_picture_value_list_serialize (void **_buffer, + uint32_t value_mask, + const xcb_render_change_picture_value_list_t *_aux); + +int +xcb_render_change_picture_value_list_unpack (const void *_buffer, + uint32_t value_mask, + xcb_render_change_picture_value_list_t *_aux); + +int +xcb_render_change_picture_value_list_sizeof (const void *_buffer, + uint32_t value_mask); + +int +xcb_render_change_picture_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_render_change_picture_checked (xcb_connection_t *c, + xcb_render_picture_t picture, + uint32_t value_mask, + const void *value_list); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_render_change_picture (xcb_connection_t *c, + xcb_render_picture_t picture, + uint32_t value_mask, + const void *value_list); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_render_change_picture_aux_checked (xcb_connection_t *c, + xcb_render_picture_t picture, + uint32_t value_mask, + const xcb_render_change_picture_value_list_t *value_list); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_render_change_picture_aux (xcb_connection_t *c, + xcb_render_picture_t picture, + uint32_t value_mask, + const xcb_render_change_picture_value_list_t *value_list); + +void * +xcb_render_change_picture_value_list (const xcb_render_change_picture_request_t *R); + +int +xcb_render_set_picture_clip_rectangles_sizeof (const void *_buffer, + uint32_t rectangles_len); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_render_set_picture_clip_rectangles_checked (xcb_connection_t *c, + xcb_render_picture_t picture, + int16_t clip_x_origin, + int16_t clip_y_origin, + uint32_t rectangles_len, + const xcb_rectangle_t *rectangles); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_render_set_picture_clip_rectangles (xcb_connection_t *c, + xcb_render_picture_t picture, + int16_t clip_x_origin, + int16_t clip_y_origin, + uint32_t rectangles_len, + const xcb_rectangle_t *rectangles); + +xcb_rectangle_t * +xcb_render_set_picture_clip_rectangles_rectangles (const xcb_render_set_picture_clip_rectangles_request_t *R); + +int +xcb_render_set_picture_clip_rectangles_rectangles_length (const xcb_render_set_picture_clip_rectangles_request_t *R); + +xcb_rectangle_iterator_t +xcb_render_set_picture_clip_rectangles_rectangles_iterator (const xcb_render_set_picture_clip_rectangles_request_t *R); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_render_free_picture_checked (xcb_connection_t *c, + xcb_render_picture_t picture); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_render_free_picture (xcb_connection_t *c, + xcb_render_picture_t picture); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_render_composite_checked (xcb_connection_t *c, + uint8_t op, + xcb_render_picture_t src, + xcb_render_picture_t mask, + xcb_render_picture_t dst, + int16_t src_x, + int16_t src_y, + int16_t mask_x, + int16_t mask_y, + int16_t dst_x, + int16_t dst_y, + uint16_t width, + uint16_t height); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_render_composite (xcb_connection_t *c, + uint8_t op, + xcb_render_picture_t src, + xcb_render_picture_t mask, + xcb_render_picture_t dst, + int16_t src_x, + int16_t src_y, + int16_t mask_x, + int16_t mask_y, + int16_t dst_x, + int16_t dst_y, + uint16_t width, + uint16_t height); + +int +xcb_render_trapezoids_sizeof (const void *_buffer, + uint32_t traps_len); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_render_trapezoids_checked (xcb_connection_t *c, + uint8_t op, + xcb_render_picture_t src, + xcb_render_picture_t dst, + xcb_render_pictformat_t mask_format, + int16_t src_x, + int16_t src_y, + uint32_t traps_len, + const xcb_render_trapezoid_t *traps); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_render_trapezoids (xcb_connection_t *c, + uint8_t op, + xcb_render_picture_t src, + xcb_render_picture_t dst, + xcb_render_pictformat_t mask_format, + int16_t src_x, + int16_t src_y, + uint32_t traps_len, + const xcb_render_trapezoid_t *traps); + +xcb_render_trapezoid_t * +xcb_render_trapezoids_traps (const xcb_render_trapezoids_request_t *R); + +int +xcb_render_trapezoids_traps_length (const xcb_render_trapezoids_request_t *R); + +xcb_render_trapezoid_iterator_t +xcb_render_trapezoids_traps_iterator (const xcb_render_trapezoids_request_t *R); + +int +xcb_render_triangles_sizeof (const void *_buffer, + uint32_t triangles_len); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_render_triangles_checked (xcb_connection_t *c, + uint8_t op, + xcb_render_picture_t src, + xcb_render_picture_t dst, + xcb_render_pictformat_t mask_format, + int16_t src_x, + int16_t src_y, + uint32_t triangles_len, + const xcb_render_triangle_t *triangles); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_render_triangles (xcb_connection_t *c, + uint8_t op, + xcb_render_picture_t src, + xcb_render_picture_t dst, + xcb_render_pictformat_t mask_format, + int16_t src_x, + int16_t src_y, + uint32_t triangles_len, + const xcb_render_triangle_t *triangles); + +xcb_render_triangle_t * +xcb_render_triangles_triangles (const xcb_render_triangles_request_t *R); + +int +xcb_render_triangles_triangles_length (const xcb_render_triangles_request_t *R); + +xcb_render_triangle_iterator_t +xcb_render_triangles_triangles_iterator (const xcb_render_triangles_request_t *R); + +int +xcb_render_tri_strip_sizeof (const void *_buffer, + uint32_t points_len); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_render_tri_strip_checked (xcb_connection_t *c, + uint8_t op, + xcb_render_picture_t src, + xcb_render_picture_t dst, + xcb_render_pictformat_t mask_format, + int16_t src_x, + int16_t src_y, + uint32_t points_len, + const xcb_render_pointfix_t *points); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_render_tri_strip (xcb_connection_t *c, + uint8_t op, + xcb_render_picture_t src, + xcb_render_picture_t dst, + xcb_render_pictformat_t mask_format, + int16_t src_x, + int16_t src_y, + uint32_t points_len, + const xcb_render_pointfix_t *points); + +xcb_render_pointfix_t * +xcb_render_tri_strip_points (const xcb_render_tri_strip_request_t *R); + +int +xcb_render_tri_strip_points_length (const xcb_render_tri_strip_request_t *R); + +xcb_render_pointfix_iterator_t +xcb_render_tri_strip_points_iterator (const xcb_render_tri_strip_request_t *R); + +int +xcb_render_tri_fan_sizeof (const void *_buffer, + uint32_t points_len); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_render_tri_fan_checked (xcb_connection_t *c, + uint8_t op, + xcb_render_picture_t src, + xcb_render_picture_t dst, + xcb_render_pictformat_t mask_format, + int16_t src_x, + int16_t src_y, + uint32_t points_len, + const xcb_render_pointfix_t *points); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_render_tri_fan (xcb_connection_t *c, + uint8_t op, + xcb_render_picture_t src, + xcb_render_picture_t dst, + xcb_render_pictformat_t mask_format, + int16_t src_x, + int16_t src_y, + uint32_t points_len, + const xcb_render_pointfix_t *points); + +xcb_render_pointfix_t * +xcb_render_tri_fan_points (const xcb_render_tri_fan_request_t *R); + +int +xcb_render_tri_fan_points_length (const xcb_render_tri_fan_request_t *R); + +xcb_render_pointfix_iterator_t +xcb_render_tri_fan_points_iterator (const xcb_render_tri_fan_request_t *R); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_render_create_glyph_set_checked (xcb_connection_t *c, + xcb_render_glyphset_t gsid, + xcb_render_pictformat_t format); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_render_create_glyph_set (xcb_connection_t *c, + xcb_render_glyphset_t gsid, + xcb_render_pictformat_t format); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_render_reference_glyph_set_checked (xcb_connection_t *c, + xcb_render_glyphset_t gsid, + xcb_render_glyphset_t existing); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_render_reference_glyph_set (xcb_connection_t *c, + xcb_render_glyphset_t gsid, + xcb_render_glyphset_t existing); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_render_free_glyph_set_checked (xcb_connection_t *c, + xcb_render_glyphset_t glyphset); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_render_free_glyph_set (xcb_connection_t *c, + xcb_render_glyphset_t glyphset); + +int +xcb_render_add_glyphs_sizeof (const void *_buffer, + uint32_t data_len); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_render_add_glyphs_checked (xcb_connection_t *c, + xcb_render_glyphset_t glyphset, + uint32_t glyphs_len, + const uint32_t *glyphids, + const xcb_render_glyphinfo_t *glyphs, + uint32_t data_len, + const uint8_t *data); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_render_add_glyphs (xcb_connection_t *c, + xcb_render_glyphset_t glyphset, + uint32_t glyphs_len, + const uint32_t *glyphids, + const xcb_render_glyphinfo_t *glyphs, + uint32_t data_len, + const uint8_t *data); + +uint32_t * +xcb_render_add_glyphs_glyphids (const xcb_render_add_glyphs_request_t *R); + +int +xcb_render_add_glyphs_glyphids_length (const xcb_render_add_glyphs_request_t *R); + +xcb_generic_iterator_t +xcb_render_add_glyphs_glyphids_end (const xcb_render_add_glyphs_request_t *R); + +xcb_render_glyphinfo_t * +xcb_render_add_glyphs_glyphs (const xcb_render_add_glyphs_request_t *R); + +int +xcb_render_add_glyphs_glyphs_length (const xcb_render_add_glyphs_request_t *R); + +xcb_render_glyphinfo_iterator_t +xcb_render_add_glyphs_glyphs_iterator (const xcb_render_add_glyphs_request_t *R); + +uint8_t * +xcb_render_add_glyphs_data (const xcb_render_add_glyphs_request_t *R); + +int +xcb_render_add_glyphs_data_length (const xcb_render_add_glyphs_request_t *R); + +xcb_generic_iterator_t +xcb_render_add_glyphs_data_end (const xcb_render_add_glyphs_request_t *R); + +int +xcb_render_free_glyphs_sizeof (const void *_buffer, + uint32_t glyphs_len); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_render_free_glyphs_checked (xcb_connection_t *c, + xcb_render_glyphset_t glyphset, + uint32_t glyphs_len, + const xcb_render_glyph_t *glyphs); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_render_free_glyphs (xcb_connection_t *c, + xcb_render_glyphset_t glyphset, + uint32_t glyphs_len, + const xcb_render_glyph_t *glyphs); + +xcb_render_glyph_t * +xcb_render_free_glyphs_glyphs (const xcb_render_free_glyphs_request_t *R); + +int +xcb_render_free_glyphs_glyphs_length (const xcb_render_free_glyphs_request_t *R); + +xcb_generic_iterator_t +xcb_render_free_glyphs_glyphs_end (const xcb_render_free_glyphs_request_t *R); + +int +xcb_render_composite_glyphs_8_sizeof (const void *_buffer, + uint32_t glyphcmds_len); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_render_composite_glyphs_8_checked (xcb_connection_t *c, + uint8_t op, + xcb_render_picture_t src, + xcb_render_picture_t dst, + xcb_render_pictformat_t mask_format, + xcb_render_glyphset_t glyphset, + int16_t src_x, + int16_t src_y, + uint32_t glyphcmds_len, + const uint8_t *glyphcmds); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_render_composite_glyphs_8 (xcb_connection_t *c, + uint8_t op, + xcb_render_picture_t src, + xcb_render_picture_t dst, + xcb_render_pictformat_t mask_format, + xcb_render_glyphset_t glyphset, + int16_t src_x, + int16_t src_y, + uint32_t glyphcmds_len, + const uint8_t *glyphcmds); + +uint8_t * +xcb_render_composite_glyphs_8_glyphcmds (const xcb_render_composite_glyphs_8_request_t *R); + +int +xcb_render_composite_glyphs_8_glyphcmds_length (const xcb_render_composite_glyphs_8_request_t *R); + +xcb_generic_iterator_t +xcb_render_composite_glyphs_8_glyphcmds_end (const xcb_render_composite_glyphs_8_request_t *R); + +int +xcb_render_composite_glyphs_16_sizeof (const void *_buffer, + uint32_t glyphcmds_len); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_render_composite_glyphs_16_checked (xcb_connection_t *c, + uint8_t op, + xcb_render_picture_t src, + xcb_render_picture_t dst, + xcb_render_pictformat_t mask_format, + xcb_render_glyphset_t glyphset, + int16_t src_x, + int16_t src_y, + uint32_t glyphcmds_len, + const uint8_t *glyphcmds); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_render_composite_glyphs_16 (xcb_connection_t *c, + uint8_t op, + xcb_render_picture_t src, + xcb_render_picture_t dst, + xcb_render_pictformat_t mask_format, + xcb_render_glyphset_t glyphset, + int16_t src_x, + int16_t src_y, + uint32_t glyphcmds_len, + const uint8_t *glyphcmds); + +uint8_t * +xcb_render_composite_glyphs_16_glyphcmds (const xcb_render_composite_glyphs_16_request_t *R); + +int +xcb_render_composite_glyphs_16_glyphcmds_length (const xcb_render_composite_glyphs_16_request_t *R); + +xcb_generic_iterator_t +xcb_render_composite_glyphs_16_glyphcmds_end (const xcb_render_composite_glyphs_16_request_t *R); + +int +xcb_render_composite_glyphs_32_sizeof (const void *_buffer, + uint32_t glyphcmds_len); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_render_composite_glyphs_32_checked (xcb_connection_t *c, + uint8_t op, + xcb_render_picture_t src, + xcb_render_picture_t dst, + xcb_render_pictformat_t mask_format, + xcb_render_glyphset_t glyphset, + int16_t src_x, + int16_t src_y, + uint32_t glyphcmds_len, + const uint8_t *glyphcmds); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_render_composite_glyphs_32 (xcb_connection_t *c, + uint8_t op, + xcb_render_picture_t src, + xcb_render_picture_t dst, + xcb_render_pictformat_t mask_format, + xcb_render_glyphset_t glyphset, + int16_t src_x, + int16_t src_y, + uint32_t glyphcmds_len, + const uint8_t *glyphcmds); + +uint8_t * +xcb_render_composite_glyphs_32_glyphcmds (const xcb_render_composite_glyphs_32_request_t *R); + +int +xcb_render_composite_glyphs_32_glyphcmds_length (const xcb_render_composite_glyphs_32_request_t *R); + +xcb_generic_iterator_t +xcb_render_composite_glyphs_32_glyphcmds_end (const xcb_render_composite_glyphs_32_request_t *R); + +int +xcb_render_fill_rectangles_sizeof (const void *_buffer, + uint32_t rects_len); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_render_fill_rectangles_checked (xcb_connection_t *c, + uint8_t op, + xcb_render_picture_t dst, + xcb_render_color_t color, + uint32_t rects_len, + const xcb_rectangle_t *rects); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_render_fill_rectangles (xcb_connection_t *c, + uint8_t op, + xcb_render_picture_t dst, + xcb_render_color_t color, + uint32_t rects_len, + const xcb_rectangle_t *rects); + +xcb_rectangle_t * +xcb_render_fill_rectangles_rects (const xcb_render_fill_rectangles_request_t *R); + +int +xcb_render_fill_rectangles_rects_length (const xcb_render_fill_rectangles_request_t *R); + +xcb_rectangle_iterator_t +xcb_render_fill_rectangles_rects_iterator (const xcb_render_fill_rectangles_request_t *R); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_render_create_cursor_checked (xcb_connection_t *c, + xcb_cursor_t cid, + xcb_render_picture_t source, + uint16_t x, + uint16_t y); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_render_create_cursor (xcb_connection_t *c, + xcb_cursor_t cid, + xcb_render_picture_t source, + uint16_t x, + uint16_t y); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_render_transform_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_render_transform_t) + */ +void +xcb_render_transform_next (xcb_render_transform_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_render_transform_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_render_transform_end (xcb_render_transform_iterator_t i); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_render_set_picture_transform_checked (xcb_connection_t *c, + xcb_render_picture_t picture, + xcb_render_transform_t transform); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_render_set_picture_transform (xcb_connection_t *c, + xcb_render_picture_t picture, + xcb_render_transform_t transform); + +int +xcb_render_query_filters_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_render_query_filters_cookie_t +xcb_render_query_filters (xcb_connection_t *c, + xcb_drawable_t drawable); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_render_query_filters_cookie_t +xcb_render_query_filters_unchecked (xcb_connection_t *c, + xcb_drawable_t drawable); + +uint16_t * +xcb_render_query_filters_aliases (const xcb_render_query_filters_reply_t *R); + +int +xcb_render_query_filters_aliases_length (const xcb_render_query_filters_reply_t *R); + +xcb_generic_iterator_t +xcb_render_query_filters_aliases_end (const xcb_render_query_filters_reply_t *R); + +int +xcb_render_query_filters_filters_length (const xcb_render_query_filters_reply_t *R); + +xcb_str_iterator_t +xcb_render_query_filters_filters_iterator (const xcb_render_query_filters_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_render_query_filters_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_render_query_filters_reply_t * +xcb_render_query_filters_reply (xcb_connection_t *c, + xcb_render_query_filters_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_render_set_picture_filter_sizeof (const void *_buffer, + uint32_t values_len); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_render_set_picture_filter_checked (xcb_connection_t *c, + xcb_render_picture_t picture, + uint16_t filter_len, + const char *filter, + uint32_t values_len, + const xcb_render_fixed_t *values); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_render_set_picture_filter (xcb_connection_t *c, + xcb_render_picture_t picture, + uint16_t filter_len, + const char *filter, + uint32_t values_len, + const xcb_render_fixed_t *values); + +char * +xcb_render_set_picture_filter_filter (const xcb_render_set_picture_filter_request_t *R); + +int +xcb_render_set_picture_filter_filter_length (const xcb_render_set_picture_filter_request_t *R); + +xcb_generic_iterator_t +xcb_render_set_picture_filter_filter_end (const xcb_render_set_picture_filter_request_t *R); + +xcb_render_fixed_t * +xcb_render_set_picture_filter_values (const xcb_render_set_picture_filter_request_t *R); + +int +xcb_render_set_picture_filter_values_length (const xcb_render_set_picture_filter_request_t *R); + +xcb_generic_iterator_t +xcb_render_set_picture_filter_values_end (const xcb_render_set_picture_filter_request_t *R); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_render_animcursorelt_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_render_animcursorelt_t) + */ +void +xcb_render_animcursorelt_next (xcb_render_animcursorelt_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_render_animcursorelt_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_render_animcursorelt_end (xcb_render_animcursorelt_iterator_t i); + +int +xcb_render_create_anim_cursor_sizeof (const void *_buffer, + uint32_t cursors_len); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_render_create_anim_cursor_checked (xcb_connection_t *c, + xcb_cursor_t cid, + uint32_t cursors_len, + const xcb_render_animcursorelt_t *cursors); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_render_create_anim_cursor (xcb_connection_t *c, + xcb_cursor_t cid, + uint32_t cursors_len, + const xcb_render_animcursorelt_t *cursors); + +xcb_render_animcursorelt_t * +xcb_render_create_anim_cursor_cursors (const xcb_render_create_anim_cursor_request_t *R); + +int +xcb_render_create_anim_cursor_cursors_length (const xcb_render_create_anim_cursor_request_t *R); + +xcb_render_animcursorelt_iterator_t +xcb_render_create_anim_cursor_cursors_iterator (const xcb_render_create_anim_cursor_request_t *R); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_render_spanfix_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_render_spanfix_t) + */ +void +xcb_render_spanfix_next (xcb_render_spanfix_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_render_spanfix_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_render_spanfix_end (xcb_render_spanfix_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_render_trap_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_render_trap_t) + */ +void +xcb_render_trap_next (xcb_render_trap_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_render_trap_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_render_trap_end (xcb_render_trap_iterator_t i); + +int +xcb_render_add_traps_sizeof (const void *_buffer, + uint32_t traps_len); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_render_add_traps_checked (xcb_connection_t *c, + xcb_render_picture_t picture, + int16_t x_off, + int16_t y_off, + uint32_t traps_len, + const xcb_render_trap_t *traps); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_render_add_traps (xcb_connection_t *c, + xcb_render_picture_t picture, + int16_t x_off, + int16_t y_off, + uint32_t traps_len, + const xcb_render_trap_t *traps); + +xcb_render_trap_t * +xcb_render_add_traps_traps (const xcb_render_add_traps_request_t *R); + +int +xcb_render_add_traps_traps_length (const xcb_render_add_traps_request_t *R); + +xcb_render_trap_iterator_t +xcb_render_add_traps_traps_iterator (const xcb_render_add_traps_request_t *R); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_render_create_solid_fill_checked (xcb_connection_t *c, + xcb_render_picture_t picture, + xcb_render_color_t color); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_render_create_solid_fill (xcb_connection_t *c, + xcb_render_picture_t picture, + xcb_render_color_t color); + +int +xcb_render_create_linear_gradient_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_render_create_linear_gradient_checked (xcb_connection_t *c, + xcb_render_picture_t picture, + xcb_render_pointfix_t p1, + xcb_render_pointfix_t p2, + uint32_t num_stops, + const xcb_render_fixed_t *stops, + const xcb_render_color_t *colors); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_render_create_linear_gradient (xcb_connection_t *c, + xcb_render_picture_t picture, + xcb_render_pointfix_t p1, + xcb_render_pointfix_t p2, + uint32_t num_stops, + const xcb_render_fixed_t *stops, + const xcb_render_color_t *colors); + +xcb_render_fixed_t * +xcb_render_create_linear_gradient_stops (const xcb_render_create_linear_gradient_request_t *R); + +int +xcb_render_create_linear_gradient_stops_length (const xcb_render_create_linear_gradient_request_t *R); + +xcb_generic_iterator_t +xcb_render_create_linear_gradient_stops_end (const xcb_render_create_linear_gradient_request_t *R); + +xcb_render_color_t * +xcb_render_create_linear_gradient_colors (const xcb_render_create_linear_gradient_request_t *R); + +int +xcb_render_create_linear_gradient_colors_length (const xcb_render_create_linear_gradient_request_t *R); + +xcb_render_color_iterator_t +xcb_render_create_linear_gradient_colors_iterator (const xcb_render_create_linear_gradient_request_t *R); + +int +xcb_render_create_radial_gradient_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_render_create_radial_gradient_checked (xcb_connection_t *c, + xcb_render_picture_t picture, + xcb_render_pointfix_t inner, + xcb_render_pointfix_t outer, + xcb_render_fixed_t inner_radius, + xcb_render_fixed_t outer_radius, + uint32_t num_stops, + const xcb_render_fixed_t *stops, + const xcb_render_color_t *colors); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_render_create_radial_gradient (xcb_connection_t *c, + xcb_render_picture_t picture, + xcb_render_pointfix_t inner, + xcb_render_pointfix_t outer, + xcb_render_fixed_t inner_radius, + xcb_render_fixed_t outer_radius, + uint32_t num_stops, + const xcb_render_fixed_t *stops, + const xcb_render_color_t *colors); + +xcb_render_fixed_t * +xcb_render_create_radial_gradient_stops (const xcb_render_create_radial_gradient_request_t *R); + +int +xcb_render_create_radial_gradient_stops_length (const xcb_render_create_radial_gradient_request_t *R); + +xcb_generic_iterator_t +xcb_render_create_radial_gradient_stops_end (const xcb_render_create_radial_gradient_request_t *R); + +xcb_render_color_t * +xcb_render_create_radial_gradient_colors (const xcb_render_create_radial_gradient_request_t *R); + +int +xcb_render_create_radial_gradient_colors_length (const xcb_render_create_radial_gradient_request_t *R); + +xcb_render_color_iterator_t +xcb_render_create_radial_gradient_colors_iterator (const xcb_render_create_radial_gradient_request_t *R); + +int +xcb_render_create_conical_gradient_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_render_create_conical_gradient_checked (xcb_connection_t *c, + xcb_render_picture_t picture, + xcb_render_pointfix_t center, + xcb_render_fixed_t angle, + uint32_t num_stops, + const xcb_render_fixed_t *stops, + const xcb_render_color_t *colors); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_render_create_conical_gradient (xcb_connection_t *c, + xcb_render_picture_t picture, + xcb_render_pointfix_t center, + xcb_render_fixed_t angle, + uint32_t num_stops, + const xcb_render_fixed_t *stops, + const xcb_render_color_t *colors); + +xcb_render_fixed_t * +xcb_render_create_conical_gradient_stops (const xcb_render_create_conical_gradient_request_t *R); + +int +xcb_render_create_conical_gradient_stops_length (const xcb_render_create_conical_gradient_request_t *R); + +xcb_generic_iterator_t +xcb_render_create_conical_gradient_stops_end (const xcb_render_create_conical_gradient_request_t *R); + +xcb_render_color_t * +xcb_render_create_conical_gradient_colors (const xcb_render_create_conical_gradient_request_t *R); + +int +xcb_render_create_conical_gradient_colors_length (const xcb_render_create_conical_gradient_request_t *R); + +xcb_render_color_iterator_t +xcb_render_create_conical_gradient_colors_iterator (const xcb_render_create_conical_gradient_request_t *R); + + +#ifdef __cplusplus +} +#endif + +#endif + +/** + * @} + */ diff --git a/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/include/xcb/res.h b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/include/xcb/res.h new file mode 100644 index 0000000000000000000000000000000000000000..40afb63a1a97344e9cce77ef3c7c2599b786f181 --- /dev/null +++ b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/include/xcb/res.h @@ -0,0 +1,864 @@ +/* + * This file generated automatically from res.xml by c_client.py. + * Edit at your peril. + */ + +/** + * @defgroup XCB_Res_API XCB Res API + * @brief Res XCB Protocol Implementation. + * @{ + **/ + +#ifndef __RES_H +#define __RES_H + +#include "xcb.h" +#include "xproto.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#define XCB_RES_MAJOR_VERSION 1 +#define XCB_RES_MINOR_VERSION 2 + +extern xcb_extension_t xcb_res_id; + +/** + * @brief xcb_res_client_t + **/ +typedef struct xcb_res_client_t { + uint32_t resource_base; + uint32_t resource_mask; +} xcb_res_client_t; + +/** + * @brief xcb_res_client_iterator_t + **/ +typedef struct xcb_res_client_iterator_t { + xcb_res_client_t *data; + int rem; + int index; +} xcb_res_client_iterator_t; + +/** + * @brief xcb_res_type_t + **/ +typedef struct xcb_res_type_t { + xcb_atom_t resource_type; + uint32_t count; +} xcb_res_type_t; + +/** + * @brief xcb_res_type_iterator_t + **/ +typedef struct xcb_res_type_iterator_t { + xcb_res_type_t *data; + int rem; + int index; +} xcb_res_type_iterator_t; + +typedef enum xcb_res_client_id_mask_t { + XCB_RES_CLIENT_ID_MASK_CLIENT_XID = 1, + XCB_RES_CLIENT_ID_MASK_LOCAL_CLIENT_PID = 2 +} xcb_res_client_id_mask_t; + +/** + * @brief xcb_res_client_id_spec_t + **/ +typedef struct xcb_res_client_id_spec_t { + uint32_t client; + uint32_t mask; +} xcb_res_client_id_spec_t; + +/** + * @brief xcb_res_client_id_spec_iterator_t + **/ +typedef struct xcb_res_client_id_spec_iterator_t { + xcb_res_client_id_spec_t *data; + int rem; + int index; +} xcb_res_client_id_spec_iterator_t; + +/** + * @brief xcb_res_client_id_value_t + **/ +typedef struct xcb_res_client_id_value_t { + xcb_res_client_id_spec_t spec; + uint32_t length; +} xcb_res_client_id_value_t; + +/** + * @brief xcb_res_client_id_value_iterator_t + **/ +typedef struct xcb_res_client_id_value_iterator_t { + xcb_res_client_id_value_t *data; + int rem; + int index; +} xcb_res_client_id_value_iterator_t; + +/** + * @brief xcb_res_resource_id_spec_t + **/ +typedef struct xcb_res_resource_id_spec_t { + uint32_t resource; + uint32_t type; +} xcb_res_resource_id_spec_t; + +/** + * @brief xcb_res_resource_id_spec_iterator_t + **/ +typedef struct xcb_res_resource_id_spec_iterator_t { + xcb_res_resource_id_spec_t *data; + int rem; + int index; +} xcb_res_resource_id_spec_iterator_t; + +/** + * @brief xcb_res_resource_size_spec_t + **/ +typedef struct xcb_res_resource_size_spec_t { + xcb_res_resource_id_spec_t spec; + uint32_t bytes; + uint32_t ref_count; + uint32_t use_count; +} xcb_res_resource_size_spec_t; + +/** + * @brief xcb_res_resource_size_spec_iterator_t + **/ +typedef struct xcb_res_resource_size_spec_iterator_t { + xcb_res_resource_size_spec_t *data; + int rem; + int index; +} xcb_res_resource_size_spec_iterator_t; + +/** + * @brief xcb_res_resource_size_value_t + **/ +typedef struct xcb_res_resource_size_value_t { + xcb_res_resource_size_spec_t size; + uint32_t num_cross_references; +} xcb_res_resource_size_value_t; + +/** + * @brief xcb_res_resource_size_value_iterator_t + **/ +typedef struct xcb_res_resource_size_value_iterator_t { + xcb_res_resource_size_value_t *data; + int rem; + int index; +} xcb_res_resource_size_value_iterator_t; + +/** + * @brief xcb_res_query_version_cookie_t + **/ +typedef struct xcb_res_query_version_cookie_t { + unsigned int sequence; +} xcb_res_query_version_cookie_t; + +/** Opcode for xcb_res_query_version. */ +#define XCB_RES_QUERY_VERSION 0 + +/** + * @brief xcb_res_query_version_request_t + **/ +typedef struct xcb_res_query_version_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + uint8_t client_major; + uint8_t client_minor; +} xcb_res_query_version_request_t; + +/** + * @brief xcb_res_query_version_reply_t + **/ +typedef struct xcb_res_query_version_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint16_t server_major; + uint16_t server_minor; +} xcb_res_query_version_reply_t; + +/** + * @brief xcb_res_query_clients_cookie_t + **/ +typedef struct xcb_res_query_clients_cookie_t { + unsigned int sequence; +} xcb_res_query_clients_cookie_t; + +/** Opcode for xcb_res_query_clients. */ +#define XCB_RES_QUERY_CLIENTS 1 + +/** + * @brief xcb_res_query_clients_request_t + **/ +typedef struct xcb_res_query_clients_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; +} xcb_res_query_clients_request_t; + +/** + * @brief xcb_res_query_clients_reply_t + **/ +typedef struct xcb_res_query_clients_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint32_t num_clients; + uint8_t pad1[20]; +} xcb_res_query_clients_reply_t; + +/** + * @brief xcb_res_query_client_resources_cookie_t + **/ +typedef struct xcb_res_query_client_resources_cookie_t { + unsigned int sequence; +} xcb_res_query_client_resources_cookie_t; + +/** Opcode for xcb_res_query_client_resources. */ +#define XCB_RES_QUERY_CLIENT_RESOURCES 2 + +/** + * @brief xcb_res_query_client_resources_request_t + **/ +typedef struct xcb_res_query_client_resources_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + uint32_t xid; +} xcb_res_query_client_resources_request_t; + +/** + * @brief xcb_res_query_client_resources_reply_t + **/ +typedef struct xcb_res_query_client_resources_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint32_t num_types; + uint8_t pad1[20]; +} xcb_res_query_client_resources_reply_t; + +/** + * @brief xcb_res_query_client_pixmap_bytes_cookie_t + **/ +typedef struct xcb_res_query_client_pixmap_bytes_cookie_t { + unsigned int sequence; +} xcb_res_query_client_pixmap_bytes_cookie_t; + +/** Opcode for xcb_res_query_client_pixmap_bytes. */ +#define XCB_RES_QUERY_CLIENT_PIXMAP_BYTES 3 + +/** + * @brief xcb_res_query_client_pixmap_bytes_request_t + **/ +typedef struct xcb_res_query_client_pixmap_bytes_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + uint32_t xid; +} xcb_res_query_client_pixmap_bytes_request_t; + +/** + * @brief xcb_res_query_client_pixmap_bytes_reply_t + **/ +typedef struct xcb_res_query_client_pixmap_bytes_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint32_t bytes; + uint32_t bytes_overflow; +} xcb_res_query_client_pixmap_bytes_reply_t; + +/** + * @brief xcb_res_query_client_ids_cookie_t + **/ +typedef struct xcb_res_query_client_ids_cookie_t { + unsigned int sequence; +} xcb_res_query_client_ids_cookie_t; + +/** Opcode for xcb_res_query_client_ids. */ +#define XCB_RES_QUERY_CLIENT_IDS 4 + +/** + * @brief xcb_res_query_client_ids_request_t + **/ +typedef struct xcb_res_query_client_ids_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + uint32_t num_specs; +} xcb_res_query_client_ids_request_t; + +/** + * @brief xcb_res_query_client_ids_reply_t + **/ +typedef struct xcb_res_query_client_ids_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint32_t num_ids; + uint8_t pad1[20]; +} xcb_res_query_client_ids_reply_t; + +/** + * @brief xcb_res_query_resource_bytes_cookie_t + **/ +typedef struct xcb_res_query_resource_bytes_cookie_t { + unsigned int sequence; +} xcb_res_query_resource_bytes_cookie_t; + +/** Opcode for xcb_res_query_resource_bytes. */ +#define XCB_RES_QUERY_RESOURCE_BYTES 5 + +/** + * @brief xcb_res_query_resource_bytes_request_t + **/ +typedef struct xcb_res_query_resource_bytes_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + uint32_t client; + uint32_t num_specs; +} xcb_res_query_resource_bytes_request_t; + +/** + * @brief xcb_res_query_resource_bytes_reply_t + **/ +typedef struct xcb_res_query_resource_bytes_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint32_t num_sizes; + uint8_t pad1[20]; +} xcb_res_query_resource_bytes_reply_t; + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_res_client_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_res_client_t) + */ +void +xcb_res_client_next (xcb_res_client_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_res_client_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_res_client_end (xcb_res_client_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_res_type_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_res_type_t) + */ +void +xcb_res_type_next (xcb_res_type_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_res_type_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_res_type_end (xcb_res_type_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_res_client_id_spec_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_res_client_id_spec_t) + */ +void +xcb_res_client_id_spec_next (xcb_res_client_id_spec_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_res_client_id_spec_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_res_client_id_spec_end (xcb_res_client_id_spec_iterator_t i); + +int +xcb_res_client_id_value_sizeof (const void *_buffer); + +uint32_t * +xcb_res_client_id_value_value (const xcb_res_client_id_value_t *R); + +int +xcb_res_client_id_value_value_length (const xcb_res_client_id_value_t *R); + +xcb_generic_iterator_t +xcb_res_client_id_value_value_end (const xcb_res_client_id_value_t *R); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_res_client_id_value_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_res_client_id_value_t) + */ +void +xcb_res_client_id_value_next (xcb_res_client_id_value_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_res_client_id_value_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_res_client_id_value_end (xcb_res_client_id_value_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_res_resource_id_spec_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_res_resource_id_spec_t) + */ +void +xcb_res_resource_id_spec_next (xcb_res_resource_id_spec_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_res_resource_id_spec_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_res_resource_id_spec_end (xcb_res_resource_id_spec_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_res_resource_size_spec_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_res_resource_size_spec_t) + */ +void +xcb_res_resource_size_spec_next (xcb_res_resource_size_spec_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_res_resource_size_spec_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_res_resource_size_spec_end (xcb_res_resource_size_spec_iterator_t i); + +int +xcb_res_resource_size_value_sizeof (const void *_buffer); + +xcb_res_resource_size_spec_t * +xcb_res_resource_size_value_cross_references (const xcb_res_resource_size_value_t *R); + +int +xcb_res_resource_size_value_cross_references_length (const xcb_res_resource_size_value_t *R); + +xcb_res_resource_size_spec_iterator_t +xcb_res_resource_size_value_cross_references_iterator (const xcb_res_resource_size_value_t *R); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_res_resource_size_value_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_res_resource_size_value_t) + */ +void +xcb_res_resource_size_value_next (xcb_res_resource_size_value_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_res_resource_size_value_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_res_resource_size_value_end (xcb_res_resource_size_value_iterator_t i); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_res_query_version_cookie_t +xcb_res_query_version (xcb_connection_t *c, + uint8_t client_major, + uint8_t client_minor); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_res_query_version_cookie_t +xcb_res_query_version_unchecked (xcb_connection_t *c, + uint8_t client_major, + uint8_t client_minor); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_res_query_version_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_res_query_version_reply_t * +xcb_res_query_version_reply (xcb_connection_t *c, + xcb_res_query_version_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_res_query_clients_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_res_query_clients_cookie_t +xcb_res_query_clients (xcb_connection_t *c); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_res_query_clients_cookie_t +xcb_res_query_clients_unchecked (xcb_connection_t *c); + +xcb_res_client_t * +xcb_res_query_clients_clients (const xcb_res_query_clients_reply_t *R); + +int +xcb_res_query_clients_clients_length (const xcb_res_query_clients_reply_t *R); + +xcb_res_client_iterator_t +xcb_res_query_clients_clients_iterator (const xcb_res_query_clients_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_res_query_clients_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_res_query_clients_reply_t * +xcb_res_query_clients_reply (xcb_connection_t *c, + xcb_res_query_clients_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_res_query_client_resources_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_res_query_client_resources_cookie_t +xcb_res_query_client_resources (xcb_connection_t *c, + uint32_t xid); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_res_query_client_resources_cookie_t +xcb_res_query_client_resources_unchecked (xcb_connection_t *c, + uint32_t xid); + +xcb_res_type_t * +xcb_res_query_client_resources_types (const xcb_res_query_client_resources_reply_t *R); + +int +xcb_res_query_client_resources_types_length (const xcb_res_query_client_resources_reply_t *R); + +xcb_res_type_iterator_t +xcb_res_query_client_resources_types_iterator (const xcb_res_query_client_resources_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_res_query_client_resources_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_res_query_client_resources_reply_t * +xcb_res_query_client_resources_reply (xcb_connection_t *c, + xcb_res_query_client_resources_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_res_query_client_pixmap_bytes_cookie_t +xcb_res_query_client_pixmap_bytes (xcb_connection_t *c, + uint32_t xid); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_res_query_client_pixmap_bytes_cookie_t +xcb_res_query_client_pixmap_bytes_unchecked (xcb_connection_t *c, + uint32_t xid); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_res_query_client_pixmap_bytes_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_res_query_client_pixmap_bytes_reply_t * +xcb_res_query_client_pixmap_bytes_reply (xcb_connection_t *c, + xcb_res_query_client_pixmap_bytes_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_res_query_client_ids_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_res_query_client_ids_cookie_t +xcb_res_query_client_ids (xcb_connection_t *c, + uint32_t num_specs, + const xcb_res_client_id_spec_t *specs); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_res_query_client_ids_cookie_t +xcb_res_query_client_ids_unchecked (xcb_connection_t *c, + uint32_t num_specs, + const xcb_res_client_id_spec_t *specs); + +int +xcb_res_query_client_ids_ids_length (const xcb_res_query_client_ids_reply_t *R); + +xcb_res_client_id_value_iterator_t +xcb_res_query_client_ids_ids_iterator (const xcb_res_query_client_ids_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_res_query_client_ids_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_res_query_client_ids_reply_t * +xcb_res_query_client_ids_reply (xcb_connection_t *c, + xcb_res_query_client_ids_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_res_query_resource_bytes_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_res_query_resource_bytes_cookie_t +xcb_res_query_resource_bytes (xcb_connection_t *c, + uint32_t client, + uint32_t num_specs, + const xcb_res_resource_id_spec_t *specs); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_res_query_resource_bytes_cookie_t +xcb_res_query_resource_bytes_unchecked (xcb_connection_t *c, + uint32_t client, + uint32_t num_specs, + const xcb_res_resource_id_spec_t *specs); + +int +xcb_res_query_resource_bytes_sizes_length (const xcb_res_query_resource_bytes_reply_t *R); + +xcb_res_resource_size_value_iterator_t +xcb_res_query_resource_bytes_sizes_iterator (const xcb_res_query_resource_bytes_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_res_query_resource_bytes_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_res_query_resource_bytes_reply_t * +xcb_res_query_resource_bytes_reply (xcb_connection_t *c, + xcb_res_query_resource_bytes_cookie_t cookie /**< */, + xcb_generic_error_t **e); + + +#ifdef __cplusplus +} +#endif + +#endif + +/** + * @} + */ diff --git a/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/include/xcb/screensaver.h b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/include/xcb/screensaver.h new file mode 100644 index 0000000000000000000000000000000000000000..f6982ea009a193a14ecafdea66ab5cd1f9e9affd --- /dev/null +++ b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/include/xcb/screensaver.h @@ -0,0 +1,517 @@ +/* + * This file generated automatically from screensaver.xml by c_client.py. + * Edit at your peril. + */ + +/** + * @defgroup XCB_ScreenSaver_API XCB ScreenSaver API + * @brief ScreenSaver XCB Protocol Implementation. + * @{ + **/ + +#ifndef __SCREENSAVER_H +#define __SCREENSAVER_H + +#include "xcb.h" +#include "xproto.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#define XCB_SCREENSAVER_MAJOR_VERSION 1 +#define XCB_SCREENSAVER_MINOR_VERSION 1 + +extern xcb_extension_t xcb_screensaver_id; + +typedef enum xcb_screensaver_kind_t { + XCB_SCREENSAVER_KIND_BLANKED = 0, + XCB_SCREENSAVER_KIND_INTERNAL = 1, + XCB_SCREENSAVER_KIND_EXTERNAL = 2 +} xcb_screensaver_kind_t; + +typedef enum xcb_screensaver_event_t { + XCB_SCREENSAVER_EVENT_NOTIFY_MASK = 1, + XCB_SCREENSAVER_EVENT_CYCLE_MASK = 2 +} xcb_screensaver_event_t; + +typedef enum xcb_screensaver_state_t { + XCB_SCREENSAVER_STATE_OFF = 0, + XCB_SCREENSAVER_STATE_ON = 1, + XCB_SCREENSAVER_STATE_CYCLE = 2, + XCB_SCREENSAVER_STATE_DISABLED = 3 +} xcb_screensaver_state_t; + +/** + * @brief xcb_screensaver_query_version_cookie_t + **/ +typedef struct xcb_screensaver_query_version_cookie_t { + unsigned int sequence; +} xcb_screensaver_query_version_cookie_t; + +/** Opcode for xcb_screensaver_query_version. */ +#define XCB_SCREENSAVER_QUERY_VERSION 0 + +/** + * @brief xcb_screensaver_query_version_request_t + **/ +typedef struct xcb_screensaver_query_version_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + uint8_t client_major_version; + uint8_t client_minor_version; + uint8_t pad0[2]; +} xcb_screensaver_query_version_request_t; + +/** + * @brief xcb_screensaver_query_version_reply_t + **/ +typedef struct xcb_screensaver_query_version_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint16_t server_major_version; + uint16_t server_minor_version; + uint8_t pad1[20]; +} xcb_screensaver_query_version_reply_t; + +/** + * @brief xcb_screensaver_query_info_cookie_t + **/ +typedef struct xcb_screensaver_query_info_cookie_t { + unsigned int sequence; +} xcb_screensaver_query_info_cookie_t; + +/** Opcode for xcb_screensaver_query_info. */ +#define XCB_SCREENSAVER_QUERY_INFO 1 + +/** + * @brief xcb_screensaver_query_info_request_t + **/ +typedef struct xcb_screensaver_query_info_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_drawable_t drawable; +} xcb_screensaver_query_info_request_t; + +/** + * @brief xcb_screensaver_query_info_reply_t + **/ +typedef struct xcb_screensaver_query_info_reply_t { + uint8_t response_type; + uint8_t state; + uint16_t sequence; + uint32_t length; + xcb_window_t saver_window; + uint32_t ms_until_server; + uint32_t ms_since_user_input; + uint32_t event_mask; + uint8_t kind; + uint8_t pad0[7]; +} xcb_screensaver_query_info_reply_t; + +/** Opcode for xcb_screensaver_select_input. */ +#define XCB_SCREENSAVER_SELECT_INPUT 2 + +/** + * @brief xcb_screensaver_select_input_request_t + **/ +typedef struct xcb_screensaver_select_input_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_drawable_t drawable; + uint32_t event_mask; +} xcb_screensaver_select_input_request_t; + +/** + * @brief xcb_screensaver_set_attributes_value_list_t + **/ +typedef struct xcb_screensaver_set_attributes_value_list_t { + xcb_pixmap_t background_pixmap; + uint32_t background_pixel; + xcb_pixmap_t border_pixmap; + uint32_t border_pixel; + uint32_t bit_gravity; + uint32_t win_gravity; + uint32_t backing_store; + uint32_t backing_planes; + uint32_t backing_pixel; + xcb_bool32_t override_redirect; + xcb_bool32_t save_under; + uint32_t event_mask; + uint32_t do_not_propogate_mask; + xcb_colormap_t colormap; + xcb_cursor_t cursor; +} xcb_screensaver_set_attributes_value_list_t; + +/** Opcode for xcb_screensaver_set_attributes. */ +#define XCB_SCREENSAVER_SET_ATTRIBUTES 3 + +/** + * @brief xcb_screensaver_set_attributes_request_t + **/ +typedef struct xcb_screensaver_set_attributes_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_drawable_t drawable; + int16_t x; + int16_t y; + uint16_t width; + uint16_t height; + uint16_t border_width; + uint8_t _class; + uint8_t depth; + xcb_visualid_t visual; + uint32_t value_mask; +} xcb_screensaver_set_attributes_request_t; + +/** Opcode for xcb_screensaver_unset_attributes. */ +#define XCB_SCREENSAVER_UNSET_ATTRIBUTES 4 + +/** + * @brief xcb_screensaver_unset_attributes_request_t + **/ +typedef struct xcb_screensaver_unset_attributes_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_drawable_t drawable; +} xcb_screensaver_unset_attributes_request_t; + +/** Opcode for xcb_screensaver_suspend. */ +#define XCB_SCREENSAVER_SUSPEND 5 + +/** + * @brief xcb_screensaver_suspend_request_t + **/ +typedef struct xcb_screensaver_suspend_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + uint32_t suspend; +} xcb_screensaver_suspend_request_t; + +/** Opcode for xcb_screensaver_notify. */ +#define XCB_SCREENSAVER_NOTIFY 0 + +/** + * @brief xcb_screensaver_notify_event_t + **/ +typedef struct xcb_screensaver_notify_event_t { + uint8_t response_type; + uint8_t state; + uint16_t sequence; + xcb_timestamp_t time; + xcb_window_t root; + xcb_window_t window; + uint8_t kind; + uint8_t forced; + uint8_t pad0[14]; +} xcb_screensaver_notify_event_t; + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_screensaver_query_version_cookie_t +xcb_screensaver_query_version (xcb_connection_t *c, + uint8_t client_major_version, + uint8_t client_minor_version); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_screensaver_query_version_cookie_t +xcb_screensaver_query_version_unchecked (xcb_connection_t *c, + uint8_t client_major_version, + uint8_t client_minor_version); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_screensaver_query_version_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_screensaver_query_version_reply_t * +xcb_screensaver_query_version_reply (xcb_connection_t *c, + xcb_screensaver_query_version_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_screensaver_query_info_cookie_t +xcb_screensaver_query_info (xcb_connection_t *c, + xcb_drawable_t drawable); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_screensaver_query_info_cookie_t +xcb_screensaver_query_info_unchecked (xcb_connection_t *c, + xcb_drawable_t drawable); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_screensaver_query_info_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_screensaver_query_info_reply_t * +xcb_screensaver_query_info_reply (xcb_connection_t *c, + xcb_screensaver_query_info_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_screensaver_select_input_checked (xcb_connection_t *c, + xcb_drawable_t drawable, + uint32_t event_mask); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_screensaver_select_input (xcb_connection_t *c, + xcb_drawable_t drawable, + uint32_t event_mask); + +int +xcb_screensaver_set_attributes_value_list_serialize (void **_buffer, + uint32_t value_mask, + const xcb_screensaver_set_attributes_value_list_t *_aux); + +int +xcb_screensaver_set_attributes_value_list_unpack (const void *_buffer, + uint32_t value_mask, + xcb_screensaver_set_attributes_value_list_t *_aux); + +int +xcb_screensaver_set_attributes_value_list_sizeof (const void *_buffer, + uint32_t value_mask); + +int +xcb_screensaver_set_attributes_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_screensaver_set_attributes_checked (xcb_connection_t *c, + xcb_drawable_t drawable, + int16_t x, + int16_t y, + uint16_t width, + uint16_t height, + uint16_t border_width, + uint8_t _class, + uint8_t depth, + xcb_visualid_t visual, + uint32_t value_mask, + const void *value_list); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_screensaver_set_attributes (xcb_connection_t *c, + xcb_drawable_t drawable, + int16_t x, + int16_t y, + uint16_t width, + uint16_t height, + uint16_t border_width, + uint8_t _class, + uint8_t depth, + xcb_visualid_t visual, + uint32_t value_mask, + const void *value_list); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_screensaver_set_attributes_aux_checked (xcb_connection_t *c, + xcb_drawable_t drawable, + int16_t x, + int16_t y, + uint16_t width, + uint16_t height, + uint16_t border_width, + uint8_t _class, + uint8_t depth, + xcb_visualid_t visual, + uint32_t value_mask, + const xcb_screensaver_set_attributes_value_list_t *value_list); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_screensaver_set_attributes_aux (xcb_connection_t *c, + xcb_drawable_t drawable, + int16_t x, + int16_t y, + uint16_t width, + uint16_t height, + uint16_t border_width, + uint8_t _class, + uint8_t depth, + xcb_visualid_t visual, + uint32_t value_mask, + const xcb_screensaver_set_attributes_value_list_t *value_list); + +void * +xcb_screensaver_set_attributes_value_list (const xcb_screensaver_set_attributes_request_t *R); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_screensaver_unset_attributes_checked (xcb_connection_t *c, + xcb_drawable_t drawable); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_screensaver_unset_attributes (xcb_connection_t *c, + xcb_drawable_t drawable); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_screensaver_suspend_checked (xcb_connection_t *c, + uint32_t suspend); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_screensaver_suspend (xcb_connection_t *c, + uint32_t suspend); + + +#ifdef __cplusplus +} +#endif + +#endif + +/** + * @} + */ diff --git a/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/include/xcb/shape.h b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/include/xcb/shape.h new file mode 100644 index 0000000000000000000000000000000000000000..0b3b75967d1c238c35fdbc8ed25219dc4d56fccb --- /dev/null +++ b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/include/xcb/shape.h @@ -0,0 +1,752 @@ +/* + * This file generated automatically from shape.xml by c_client.py. + * Edit at your peril. + */ + +/** + * @defgroup XCB_Shape_API XCB Shape API + * @brief Shape XCB Protocol Implementation. + * @{ + **/ + +#ifndef __SHAPE_H +#define __SHAPE_H + +#include "xcb.h" +#include "xproto.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#define XCB_SHAPE_MAJOR_VERSION 1 +#define XCB_SHAPE_MINOR_VERSION 1 + +extern xcb_extension_t xcb_shape_id; + +typedef uint8_t xcb_shape_op_t; + +/** + * @brief xcb_shape_op_iterator_t + **/ +typedef struct xcb_shape_op_iterator_t { + xcb_shape_op_t *data; + int rem; + int index; +} xcb_shape_op_iterator_t; + +typedef uint8_t xcb_shape_kind_t; + +/** + * @brief xcb_shape_kind_iterator_t + **/ +typedef struct xcb_shape_kind_iterator_t { + xcb_shape_kind_t *data; + int rem; + int index; +} xcb_shape_kind_iterator_t; + +typedef enum xcb_shape_so_t { + XCB_SHAPE_SO_SET = 0, + XCB_SHAPE_SO_UNION = 1, + XCB_SHAPE_SO_INTERSECT = 2, + XCB_SHAPE_SO_SUBTRACT = 3, + XCB_SHAPE_SO_INVERT = 4 +} xcb_shape_so_t; + +typedef enum xcb_shape_sk_t { + XCB_SHAPE_SK_BOUNDING = 0, + XCB_SHAPE_SK_CLIP = 1, + XCB_SHAPE_SK_INPUT = 2 +} xcb_shape_sk_t; + +/** Opcode for xcb_shape_notify. */ +#define XCB_SHAPE_NOTIFY 0 + +/** + * @brief xcb_shape_notify_event_t + **/ +typedef struct xcb_shape_notify_event_t { + uint8_t response_type; + xcb_shape_kind_t shape_kind; + uint16_t sequence; + xcb_window_t affected_window; + int16_t extents_x; + int16_t extents_y; + uint16_t extents_width; + uint16_t extents_height; + xcb_timestamp_t server_time; + uint8_t shaped; + uint8_t pad0[11]; +} xcb_shape_notify_event_t; + +/** + * @brief xcb_shape_query_version_cookie_t + **/ +typedef struct xcb_shape_query_version_cookie_t { + unsigned int sequence; +} xcb_shape_query_version_cookie_t; + +/** Opcode for xcb_shape_query_version. */ +#define XCB_SHAPE_QUERY_VERSION 0 + +/** + * @brief xcb_shape_query_version_request_t + **/ +typedef struct xcb_shape_query_version_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; +} xcb_shape_query_version_request_t; + +/** + * @brief xcb_shape_query_version_reply_t + **/ +typedef struct xcb_shape_query_version_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint16_t major_version; + uint16_t minor_version; +} xcb_shape_query_version_reply_t; + +/** Opcode for xcb_shape_rectangles. */ +#define XCB_SHAPE_RECTANGLES 1 + +/** + * @brief xcb_shape_rectangles_request_t + **/ +typedef struct xcb_shape_rectangles_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_shape_op_t operation; + xcb_shape_kind_t destination_kind; + uint8_t ordering; + uint8_t pad0; + xcb_window_t destination_window; + int16_t x_offset; + int16_t y_offset; +} xcb_shape_rectangles_request_t; + +/** Opcode for xcb_shape_mask. */ +#define XCB_SHAPE_MASK 2 + +/** + * @brief xcb_shape_mask_request_t + **/ +typedef struct xcb_shape_mask_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_shape_op_t operation; + xcb_shape_kind_t destination_kind; + uint8_t pad0[2]; + xcb_window_t destination_window; + int16_t x_offset; + int16_t y_offset; + xcb_pixmap_t source_bitmap; +} xcb_shape_mask_request_t; + +/** Opcode for xcb_shape_combine. */ +#define XCB_SHAPE_COMBINE 3 + +/** + * @brief xcb_shape_combine_request_t + **/ +typedef struct xcb_shape_combine_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_shape_op_t operation; + xcb_shape_kind_t destination_kind; + xcb_shape_kind_t source_kind; + uint8_t pad0; + xcb_window_t destination_window; + int16_t x_offset; + int16_t y_offset; + xcb_window_t source_window; +} xcb_shape_combine_request_t; + +/** Opcode for xcb_shape_offset. */ +#define XCB_SHAPE_OFFSET 4 + +/** + * @brief xcb_shape_offset_request_t + **/ +typedef struct xcb_shape_offset_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_shape_kind_t destination_kind; + uint8_t pad0[3]; + xcb_window_t destination_window; + int16_t x_offset; + int16_t y_offset; +} xcb_shape_offset_request_t; + +/** + * @brief xcb_shape_query_extents_cookie_t + **/ +typedef struct xcb_shape_query_extents_cookie_t { + unsigned int sequence; +} xcb_shape_query_extents_cookie_t; + +/** Opcode for xcb_shape_query_extents. */ +#define XCB_SHAPE_QUERY_EXTENTS 5 + +/** + * @brief xcb_shape_query_extents_request_t + **/ +typedef struct xcb_shape_query_extents_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_window_t destination_window; +} xcb_shape_query_extents_request_t; + +/** + * @brief xcb_shape_query_extents_reply_t + **/ +typedef struct xcb_shape_query_extents_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint8_t bounding_shaped; + uint8_t clip_shaped; + uint8_t pad1[2]; + int16_t bounding_shape_extents_x; + int16_t bounding_shape_extents_y; + uint16_t bounding_shape_extents_width; + uint16_t bounding_shape_extents_height; + int16_t clip_shape_extents_x; + int16_t clip_shape_extents_y; + uint16_t clip_shape_extents_width; + uint16_t clip_shape_extents_height; +} xcb_shape_query_extents_reply_t; + +/** Opcode for xcb_shape_select_input. */ +#define XCB_SHAPE_SELECT_INPUT 6 + +/** + * @brief xcb_shape_select_input_request_t + **/ +typedef struct xcb_shape_select_input_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_window_t destination_window; + uint8_t enable; + uint8_t pad0[3]; +} xcb_shape_select_input_request_t; + +/** + * @brief xcb_shape_input_selected_cookie_t + **/ +typedef struct xcb_shape_input_selected_cookie_t { + unsigned int sequence; +} xcb_shape_input_selected_cookie_t; + +/** Opcode for xcb_shape_input_selected. */ +#define XCB_SHAPE_INPUT_SELECTED 7 + +/** + * @brief xcb_shape_input_selected_request_t + **/ +typedef struct xcb_shape_input_selected_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_window_t destination_window; +} xcb_shape_input_selected_request_t; + +/** + * @brief xcb_shape_input_selected_reply_t + **/ +typedef struct xcb_shape_input_selected_reply_t { + uint8_t response_type; + uint8_t enabled; + uint16_t sequence; + uint32_t length; +} xcb_shape_input_selected_reply_t; + +/** + * @brief xcb_shape_get_rectangles_cookie_t + **/ +typedef struct xcb_shape_get_rectangles_cookie_t { + unsigned int sequence; +} xcb_shape_get_rectangles_cookie_t; + +/** Opcode for xcb_shape_get_rectangles. */ +#define XCB_SHAPE_GET_RECTANGLES 8 + +/** + * @brief xcb_shape_get_rectangles_request_t + **/ +typedef struct xcb_shape_get_rectangles_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_window_t window; + xcb_shape_kind_t source_kind; + uint8_t pad0[3]; +} xcb_shape_get_rectangles_request_t; + +/** + * @brief xcb_shape_get_rectangles_reply_t + **/ +typedef struct xcb_shape_get_rectangles_reply_t { + uint8_t response_type; + uint8_t ordering; + uint16_t sequence; + uint32_t length; + uint32_t rectangles_len; + uint8_t pad0[20]; +} xcb_shape_get_rectangles_reply_t; + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_shape_op_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_shape_op_t) + */ +void +xcb_shape_op_next (xcb_shape_op_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_shape_op_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_shape_op_end (xcb_shape_op_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_shape_kind_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_shape_kind_t) + */ +void +xcb_shape_kind_next (xcb_shape_kind_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_shape_kind_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_shape_kind_end (xcb_shape_kind_iterator_t i); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_shape_query_version_cookie_t +xcb_shape_query_version (xcb_connection_t *c); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_shape_query_version_cookie_t +xcb_shape_query_version_unchecked (xcb_connection_t *c); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_shape_query_version_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_shape_query_version_reply_t * +xcb_shape_query_version_reply (xcb_connection_t *c, + xcb_shape_query_version_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_shape_rectangles_sizeof (const void *_buffer, + uint32_t rectangles_len); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_shape_rectangles_checked (xcb_connection_t *c, + xcb_shape_op_t operation, + xcb_shape_kind_t destination_kind, + uint8_t ordering, + xcb_window_t destination_window, + int16_t x_offset, + int16_t y_offset, + uint32_t rectangles_len, + const xcb_rectangle_t *rectangles); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_shape_rectangles (xcb_connection_t *c, + xcb_shape_op_t operation, + xcb_shape_kind_t destination_kind, + uint8_t ordering, + xcb_window_t destination_window, + int16_t x_offset, + int16_t y_offset, + uint32_t rectangles_len, + const xcb_rectangle_t *rectangles); + +xcb_rectangle_t * +xcb_shape_rectangles_rectangles (const xcb_shape_rectangles_request_t *R); + +int +xcb_shape_rectangles_rectangles_length (const xcb_shape_rectangles_request_t *R); + +xcb_rectangle_iterator_t +xcb_shape_rectangles_rectangles_iterator (const xcb_shape_rectangles_request_t *R); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_shape_mask_checked (xcb_connection_t *c, + xcb_shape_op_t operation, + xcb_shape_kind_t destination_kind, + xcb_window_t destination_window, + int16_t x_offset, + int16_t y_offset, + xcb_pixmap_t source_bitmap); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_shape_mask (xcb_connection_t *c, + xcb_shape_op_t operation, + xcb_shape_kind_t destination_kind, + xcb_window_t destination_window, + int16_t x_offset, + int16_t y_offset, + xcb_pixmap_t source_bitmap); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_shape_combine_checked (xcb_connection_t *c, + xcb_shape_op_t operation, + xcb_shape_kind_t destination_kind, + xcb_shape_kind_t source_kind, + xcb_window_t destination_window, + int16_t x_offset, + int16_t y_offset, + xcb_window_t source_window); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_shape_combine (xcb_connection_t *c, + xcb_shape_op_t operation, + xcb_shape_kind_t destination_kind, + xcb_shape_kind_t source_kind, + xcb_window_t destination_window, + int16_t x_offset, + int16_t y_offset, + xcb_window_t source_window); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_shape_offset_checked (xcb_connection_t *c, + xcb_shape_kind_t destination_kind, + xcb_window_t destination_window, + int16_t x_offset, + int16_t y_offset); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_shape_offset (xcb_connection_t *c, + xcb_shape_kind_t destination_kind, + xcb_window_t destination_window, + int16_t x_offset, + int16_t y_offset); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_shape_query_extents_cookie_t +xcb_shape_query_extents (xcb_connection_t *c, + xcb_window_t destination_window); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_shape_query_extents_cookie_t +xcb_shape_query_extents_unchecked (xcb_connection_t *c, + xcb_window_t destination_window); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_shape_query_extents_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_shape_query_extents_reply_t * +xcb_shape_query_extents_reply (xcb_connection_t *c, + xcb_shape_query_extents_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_shape_select_input_checked (xcb_connection_t *c, + xcb_window_t destination_window, + uint8_t enable); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_shape_select_input (xcb_connection_t *c, + xcb_window_t destination_window, + uint8_t enable); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_shape_input_selected_cookie_t +xcb_shape_input_selected (xcb_connection_t *c, + xcb_window_t destination_window); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_shape_input_selected_cookie_t +xcb_shape_input_selected_unchecked (xcb_connection_t *c, + xcb_window_t destination_window); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_shape_input_selected_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_shape_input_selected_reply_t * +xcb_shape_input_selected_reply (xcb_connection_t *c, + xcb_shape_input_selected_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_shape_get_rectangles_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_shape_get_rectangles_cookie_t +xcb_shape_get_rectangles (xcb_connection_t *c, + xcb_window_t window, + xcb_shape_kind_t source_kind); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_shape_get_rectangles_cookie_t +xcb_shape_get_rectangles_unchecked (xcb_connection_t *c, + xcb_window_t window, + xcb_shape_kind_t source_kind); + +xcb_rectangle_t * +xcb_shape_get_rectangles_rectangles (const xcb_shape_get_rectangles_reply_t *R); + +int +xcb_shape_get_rectangles_rectangles_length (const xcb_shape_get_rectangles_reply_t *R); + +xcb_rectangle_iterator_t +xcb_shape_get_rectangles_rectangles_iterator (const xcb_shape_get_rectangles_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_shape_get_rectangles_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_shape_get_rectangles_reply_t * +xcb_shape_get_rectangles_reply (xcb_connection_t *c, + xcb_shape_get_rectangles_cookie_t cookie /**< */, + xcb_generic_error_t **e); + + +#ifdef __cplusplus +} +#endif + +#endif + +/** + * @} + */ diff --git a/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/include/xcb/shm.h b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/include/xcb/shm.h new file mode 100644 index 0000000000000000000000000000000000000000..1d22d3bdb19f4317310206b6af542366b71c6391 --- /dev/null +++ b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/include/xcb/shm.h @@ -0,0 +1,792 @@ +/* + * This file generated automatically from shm.xml by c_client.py. + * Edit at your peril. + */ + +/** + * @defgroup XCB_Shm_API XCB Shm API + * @brief Shm XCB Protocol Implementation. + * @{ + **/ + +#ifndef __SHM_H +#define __SHM_H + +#include "xcb.h" +#include "xproto.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#define XCB_SHM_MAJOR_VERSION 1 +#define XCB_SHM_MINOR_VERSION 2 + +extern xcb_extension_t xcb_shm_id; + +typedef uint32_t xcb_shm_seg_t; + +/** + * @brief xcb_shm_seg_iterator_t + **/ +typedef struct xcb_shm_seg_iterator_t { + xcb_shm_seg_t *data; + int rem; + int index; +} xcb_shm_seg_iterator_t; + +/** Opcode for xcb_shm_completion. */ +#define XCB_SHM_COMPLETION 0 + +/** + * @brief xcb_shm_completion_event_t + **/ +typedef struct xcb_shm_completion_event_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + xcb_drawable_t drawable; + uint16_t minor_event; + uint8_t major_event; + uint8_t pad1; + xcb_shm_seg_t shmseg; + uint32_t offset; +} xcb_shm_completion_event_t; + +/** Opcode for xcb_shm_bad_seg. */ +#define XCB_SHM_BAD_SEG 0 + +typedef xcb_value_error_t xcb_shm_bad_seg_error_t; + +/** + * @brief xcb_shm_query_version_cookie_t + **/ +typedef struct xcb_shm_query_version_cookie_t { + unsigned int sequence; +} xcb_shm_query_version_cookie_t; + +/** Opcode for xcb_shm_query_version. */ +#define XCB_SHM_QUERY_VERSION 0 + +/** + * @brief xcb_shm_query_version_request_t + **/ +typedef struct xcb_shm_query_version_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; +} xcb_shm_query_version_request_t; + +/** + * @brief xcb_shm_query_version_reply_t + **/ +typedef struct xcb_shm_query_version_reply_t { + uint8_t response_type; + uint8_t shared_pixmaps; + uint16_t sequence; + uint32_t length; + uint16_t major_version; + uint16_t minor_version; + uint16_t uid; + uint16_t gid; + uint8_t pixmap_format; + uint8_t pad0[15]; +} xcb_shm_query_version_reply_t; + +/** Opcode for xcb_shm_attach. */ +#define XCB_SHM_ATTACH 1 + +/** + * @brief xcb_shm_attach_request_t + **/ +typedef struct xcb_shm_attach_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_shm_seg_t shmseg; + uint32_t shmid; + uint8_t read_only; + uint8_t pad0[3]; +} xcb_shm_attach_request_t; + +/** Opcode for xcb_shm_detach. */ +#define XCB_SHM_DETACH 2 + +/** + * @brief xcb_shm_detach_request_t + **/ +typedef struct xcb_shm_detach_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_shm_seg_t shmseg; +} xcb_shm_detach_request_t; + +/** Opcode for xcb_shm_put_image. */ +#define XCB_SHM_PUT_IMAGE 3 + +/** + * @brief xcb_shm_put_image_request_t + **/ +typedef struct xcb_shm_put_image_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_drawable_t drawable; + xcb_gcontext_t gc; + uint16_t total_width; + uint16_t total_height; + uint16_t src_x; + uint16_t src_y; + uint16_t src_width; + uint16_t src_height; + int16_t dst_x; + int16_t dst_y; + uint8_t depth; + uint8_t format; + uint8_t send_event; + uint8_t pad0; + xcb_shm_seg_t shmseg; + uint32_t offset; +} xcb_shm_put_image_request_t; + +/** + * @brief xcb_shm_get_image_cookie_t + **/ +typedef struct xcb_shm_get_image_cookie_t { + unsigned int sequence; +} xcb_shm_get_image_cookie_t; + +/** Opcode for xcb_shm_get_image. */ +#define XCB_SHM_GET_IMAGE 4 + +/** + * @brief xcb_shm_get_image_request_t + **/ +typedef struct xcb_shm_get_image_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_drawable_t drawable; + int16_t x; + int16_t y; + uint16_t width; + uint16_t height; + uint32_t plane_mask; + uint8_t format; + uint8_t pad0[3]; + xcb_shm_seg_t shmseg; + uint32_t offset; +} xcb_shm_get_image_request_t; + +/** + * @brief xcb_shm_get_image_reply_t + **/ +typedef struct xcb_shm_get_image_reply_t { + uint8_t response_type; + uint8_t depth; + uint16_t sequence; + uint32_t length; + xcb_visualid_t visual; + uint32_t size; +} xcb_shm_get_image_reply_t; + +/** Opcode for xcb_shm_create_pixmap. */ +#define XCB_SHM_CREATE_PIXMAP 5 + +/** + * @brief xcb_shm_create_pixmap_request_t + **/ +typedef struct xcb_shm_create_pixmap_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_pixmap_t pid; + xcb_drawable_t drawable; + uint16_t width; + uint16_t height; + uint8_t depth; + uint8_t pad0[3]; + xcb_shm_seg_t shmseg; + uint32_t offset; +} xcb_shm_create_pixmap_request_t; + +/** Opcode for xcb_shm_attach_fd. */ +#define XCB_SHM_ATTACH_FD 6 + +/** + * @brief xcb_shm_attach_fd_request_t + **/ +typedef struct xcb_shm_attach_fd_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_shm_seg_t shmseg; + uint8_t read_only; + uint8_t pad0[3]; +} xcb_shm_attach_fd_request_t; + +/** + * @brief xcb_shm_create_segment_cookie_t + **/ +typedef struct xcb_shm_create_segment_cookie_t { + unsigned int sequence; +} xcb_shm_create_segment_cookie_t; + +/** Opcode for xcb_shm_create_segment. */ +#define XCB_SHM_CREATE_SEGMENT 7 + +/** + * @brief xcb_shm_create_segment_request_t + **/ +typedef struct xcb_shm_create_segment_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_shm_seg_t shmseg; + uint32_t size; + uint8_t read_only; + uint8_t pad0[3]; +} xcb_shm_create_segment_request_t; + +/** + * @brief xcb_shm_create_segment_reply_t + **/ +typedef struct xcb_shm_create_segment_reply_t { + uint8_t response_type; + uint8_t nfd; + uint16_t sequence; + uint32_t length; + uint8_t pad0[24]; +} xcb_shm_create_segment_reply_t; + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_shm_seg_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_shm_seg_t) + */ +void +xcb_shm_seg_next (xcb_shm_seg_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_shm_seg_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_shm_seg_end (xcb_shm_seg_iterator_t i); + +/** + * @brief Query the version of the MIT-SHM extension. + * + * @param c The connection + * @return A cookie + * + * This is used to determine the version of the MIT-SHM extension supported by the + * X server. Clients MUST NOT make other requests in this extension until a reply + * to this requests indicates the X server supports them. + * + */ +xcb_shm_query_version_cookie_t +xcb_shm_query_version (xcb_connection_t *c); + +/** + * @brief Query the version of the MIT-SHM extension. + * + * @param c The connection + * @return A cookie + * + * This is used to determine the version of the MIT-SHM extension supported by the + * X server. Clients MUST NOT make other requests in this extension until a reply + * to this requests indicates the X server supports them. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_shm_query_version_cookie_t +xcb_shm_query_version_unchecked (xcb_connection_t *c); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_shm_query_version_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_shm_query_version_reply_t * +xcb_shm_query_version_reply (xcb_connection_t *c, + xcb_shm_query_version_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +/** + * @brief Attach a System V shared memory segment. + * + * @param c The connection + * @param shmseg A shared memory segment ID created with xcb_generate_id(). + * @param shmid The System V shared memory segment the server should map. + * @param read_only True if the segment shall be mapped read only by the X11 server, otherwise false. + * @return A cookie + * + * Attach a System V shared memory segment to the server. This will fail unless + * the server has permission to map the segment. The client may destroy the segment + * as soon as it receives a XCB_SHM_COMPLETION event with the shmseg value in this + * request and with the appropriate serial number. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_shm_attach_checked (xcb_connection_t *c, + xcb_shm_seg_t shmseg, + uint32_t shmid, + uint8_t read_only); + +/** + * @brief Attach a System V shared memory segment. + * + * @param c The connection + * @param shmseg A shared memory segment ID created with xcb_generate_id(). + * @param shmid The System V shared memory segment the server should map. + * @param read_only True if the segment shall be mapped read only by the X11 server, otherwise false. + * @return A cookie + * + * Attach a System V shared memory segment to the server. This will fail unless + * the server has permission to map the segment. The client may destroy the segment + * as soon as it receives a XCB_SHM_COMPLETION event with the shmseg value in this + * request and with the appropriate serial number. + * + */ +xcb_void_cookie_t +xcb_shm_attach (xcb_connection_t *c, + xcb_shm_seg_t shmseg, + uint32_t shmid, + uint8_t read_only); + +/** + * @brief Destroys the specified shared memory segment. + * + * @param c The connection + * @param shmseg The segment to be destroyed. + * @return A cookie + * + * Destroys the specified shared memory segment. This will never fail unless the + * segment number is incorrect. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_shm_detach_checked (xcb_connection_t *c, + xcb_shm_seg_t shmseg); + +/** + * @brief Destroys the specified shared memory segment. + * + * @param c The connection + * @param shmseg The segment to be destroyed. + * @return A cookie + * + * Destroys the specified shared memory segment. This will never fail unless the + * segment number is incorrect. + * + */ +xcb_void_cookie_t +xcb_shm_detach (xcb_connection_t *c, + xcb_shm_seg_t shmseg); + +/** + * @brief Copy data from the shared memory to the specified drawable. + * + * @param c The connection + * @param drawable The drawable to draw to. + * @param gc The graphics context to use. + * @param total_width The total width of the source image. + * @param total_height The total height of the source image. + * @param src_x The source X coordinate of the sub-image to copy. + * @param src_y The source Y coordinate of the sub-image to copy. + * @param src_width The width, in source image coordinates, of the data to copy from the source. + * The X server will use this to determine the amount of data to copy. The amount + * of the destination image that is overwritten is determined automatically. + * @param src_height The height, in source image coordinates, of the data to copy from the source. + * The X server will use this to determine the amount of data to copy. The amount + * of the destination image that is overwritten is determined automatically. + * @param dst_x The X coordinate on the destination drawable to copy to. + * @param dst_y The Y coordinate on the destination drawable to copy to. + * @param depth The depth to use. + * @param format The format of the image being drawn. If it is XYBitmap, depth must be 1, or a + * "BadMatch" error results. The foreground pixel in the GC determines the source + * for the one bits in the image, and the background pixel determines the source + * for the zero bits. For XYPixmap and ZPixmap, the depth must match the depth of + * the drawable, or a "BadMatch" error results. + * @param send_event True if the server should send an XCB_SHM_COMPLETION event when the blit + * completes. + * @param offset The offset that the source image starts at. + * @return A cookie + * + * Copy data from the shared memory to the specified drawable. The amount of bytes + * written to the destination image is always equal to the number of bytes read + * from the shared memory segment. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_shm_put_image_checked (xcb_connection_t *c, + xcb_drawable_t drawable, + xcb_gcontext_t gc, + uint16_t total_width, + uint16_t total_height, + uint16_t src_x, + uint16_t src_y, + uint16_t src_width, + uint16_t src_height, + int16_t dst_x, + int16_t dst_y, + uint8_t depth, + uint8_t format, + uint8_t send_event, + xcb_shm_seg_t shmseg, + uint32_t offset); + +/** + * @brief Copy data from the shared memory to the specified drawable. + * + * @param c The connection + * @param drawable The drawable to draw to. + * @param gc The graphics context to use. + * @param total_width The total width of the source image. + * @param total_height The total height of the source image. + * @param src_x The source X coordinate of the sub-image to copy. + * @param src_y The source Y coordinate of the sub-image to copy. + * @param src_width The width, in source image coordinates, of the data to copy from the source. + * The X server will use this to determine the amount of data to copy. The amount + * of the destination image that is overwritten is determined automatically. + * @param src_height The height, in source image coordinates, of the data to copy from the source. + * The X server will use this to determine the amount of data to copy. The amount + * of the destination image that is overwritten is determined automatically. + * @param dst_x The X coordinate on the destination drawable to copy to. + * @param dst_y The Y coordinate on the destination drawable to copy to. + * @param depth The depth to use. + * @param format The format of the image being drawn. If it is XYBitmap, depth must be 1, or a + * "BadMatch" error results. The foreground pixel in the GC determines the source + * for the one bits in the image, and the background pixel determines the source + * for the zero bits. For XYPixmap and ZPixmap, the depth must match the depth of + * the drawable, or a "BadMatch" error results. + * @param send_event True if the server should send an XCB_SHM_COMPLETION event when the blit + * completes. + * @param offset The offset that the source image starts at. + * @return A cookie + * + * Copy data from the shared memory to the specified drawable. The amount of bytes + * written to the destination image is always equal to the number of bytes read + * from the shared memory segment. + * + */ +xcb_void_cookie_t +xcb_shm_put_image (xcb_connection_t *c, + xcb_drawable_t drawable, + xcb_gcontext_t gc, + uint16_t total_width, + uint16_t total_height, + uint16_t src_x, + uint16_t src_y, + uint16_t src_width, + uint16_t src_height, + int16_t dst_x, + int16_t dst_y, + uint8_t depth, + uint8_t format, + uint8_t send_event, + xcb_shm_seg_t shmseg, + uint32_t offset); + +/** + * @brief Copies data from the specified drawable to the shared memory segment. + * + * @param c The connection + * @param drawable The drawable to copy the image out of. + * @param x The X coordinate in the drawable to begin copying at. + * @param y The Y coordinate in the drawable to begin copying at. + * @param width The width of the image to copy. + * @param height The height of the image to copy. + * @param plane_mask A mask that determines which planes are used. + * @param format The format to use for the copy (???). + * @param shmseg The destination shared memory segment. + * @param offset The offset in the shared memory segment to copy data to. + * @return A cookie + * + * Copy data from the specified drawable to the shared memory segment. The amount + * of bytes written to the destination image is always equal to the number of bytes + * read from the shared memory segment. + * + */ +xcb_shm_get_image_cookie_t +xcb_shm_get_image (xcb_connection_t *c, + xcb_drawable_t drawable, + int16_t x, + int16_t y, + uint16_t width, + uint16_t height, + uint32_t plane_mask, + uint8_t format, + xcb_shm_seg_t shmseg, + uint32_t offset); + +/** + * @brief Copies data from the specified drawable to the shared memory segment. + * + * @param c The connection + * @param drawable The drawable to copy the image out of. + * @param x The X coordinate in the drawable to begin copying at. + * @param y The Y coordinate in the drawable to begin copying at. + * @param width The width of the image to copy. + * @param height The height of the image to copy. + * @param plane_mask A mask that determines which planes are used. + * @param format The format to use for the copy (???). + * @param shmseg The destination shared memory segment. + * @param offset The offset in the shared memory segment to copy data to. + * @return A cookie + * + * Copy data from the specified drawable to the shared memory segment. The amount + * of bytes written to the destination image is always equal to the number of bytes + * read from the shared memory segment. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_shm_get_image_cookie_t +xcb_shm_get_image_unchecked (xcb_connection_t *c, + xcb_drawable_t drawable, + int16_t x, + int16_t y, + uint16_t width, + uint16_t height, + uint32_t plane_mask, + uint8_t format, + xcb_shm_seg_t shmseg, + uint32_t offset); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_shm_get_image_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_shm_get_image_reply_t * +xcb_shm_get_image_reply (xcb_connection_t *c, + xcb_shm_get_image_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +/** + * @brief Create a pixmap backed by shared memory. + * + * @param c The connection + * @param pid A pixmap ID created with xcb_generate_id(). + * @param drawable The drawable to create the pixmap in. + * @param width The width of the pixmap to create. Must be nonzero, or a Value error results. + * @param height The height of the pixmap to create. Must be nonzero, or a Value error results. + * @param depth The depth of the pixmap to create. Must be nonzero, or a Value error results. + * @param shmseg The shared memory segment to use to create the pixmap. + * @param offset The offset in the segment to create the pixmap at. + * @return A cookie + * + * Create a pixmap backed by shared memory. Writes to the shared memory will be + * reflected in the contents of the pixmap, and writes to the pixmap will be + * reflected in the contents of the shared memory. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_shm_create_pixmap_checked (xcb_connection_t *c, + xcb_pixmap_t pid, + xcb_drawable_t drawable, + uint16_t width, + uint16_t height, + uint8_t depth, + xcb_shm_seg_t shmseg, + uint32_t offset); + +/** + * @brief Create a pixmap backed by shared memory. + * + * @param c The connection + * @param pid A pixmap ID created with xcb_generate_id(). + * @param drawable The drawable to create the pixmap in. + * @param width The width of the pixmap to create. Must be nonzero, or a Value error results. + * @param height The height of the pixmap to create. Must be nonzero, or a Value error results. + * @param depth The depth of the pixmap to create. Must be nonzero, or a Value error results. + * @param shmseg The shared memory segment to use to create the pixmap. + * @param offset The offset in the segment to create the pixmap at. + * @return A cookie + * + * Create a pixmap backed by shared memory. Writes to the shared memory will be + * reflected in the contents of the pixmap, and writes to the pixmap will be + * reflected in the contents of the shared memory. + * + */ +xcb_void_cookie_t +xcb_shm_create_pixmap (xcb_connection_t *c, + xcb_pixmap_t pid, + xcb_drawable_t drawable, + uint16_t width, + uint16_t height, + uint8_t depth, + xcb_shm_seg_t shmseg, + uint32_t offset); + +/** + * @brief Create a shared memory segment + * + * @param c The connection + * @param shmseg A shared memory segment ID created with xcb_generate_id(). + * @param shm_fd The file descriptor the server should mmap(). + * @param read_only True if the segment shall be mapped read only by the X11 server, otherwise false. + * @return A cookie + * + * Create a shared memory segment. The file descriptor will be mapped at offset + * zero, and the size will be obtained using fstat(). A zero size will result in a + * Value error. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_shm_attach_fd_checked (xcb_connection_t *c, + xcb_shm_seg_t shmseg, + int32_t shm_fd, + uint8_t read_only); + +/** + * @brief Create a shared memory segment + * + * @param c The connection + * @param shmseg A shared memory segment ID created with xcb_generate_id(). + * @param shm_fd The file descriptor the server should mmap(). + * @param read_only True if the segment shall be mapped read only by the X11 server, otherwise false. + * @return A cookie + * + * Create a shared memory segment. The file descriptor will be mapped at offset + * zero, and the size will be obtained using fstat(). A zero size will result in a + * Value error. + * + */ +xcb_void_cookie_t +xcb_shm_attach_fd (xcb_connection_t *c, + xcb_shm_seg_t shmseg, + int32_t shm_fd, + uint8_t read_only); + +/** + * @brief Asks the server to allocate a shared memory segment. + * + * @param c The connection + * @param shmseg A shared memory segment ID created with xcb_generate_id(). + * @param size The size of the segment to create. + * @param read_only True if the server should map the segment read-only; otherwise false. + * @return A cookie + * + * Asks the server to allocate a shared memory segment. The server’s reply will + * include a file descriptor for the client to pass to mmap(). + * + */ +xcb_shm_create_segment_cookie_t +xcb_shm_create_segment (xcb_connection_t *c, + xcb_shm_seg_t shmseg, + uint32_t size, + uint8_t read_only); + +/** + * @brief Asks the server to allocate a shared memory segment. + * + * @param c The connection + * @param shmseg A shared memory segment ID created with xcb_generate_id(). + * @param size The size of the segment to create. + * @param read_only True if the server should map the segment read-only; otherwise false. + * @return A cookie + * + * Asks the server to allocate a shared memory segment. The server’s reply will + * include a file descriptor for the client to pass to mmap(). + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_shm_create_segment_cookie_t +xcb_shm_create_segment_unchecked (xcb_connection_t *c, + xcb_shm_seg_t shmseg, + uint32_t size, + uint8_t read_only); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_shm_create_segment_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_shm_create_segment_reply_t * +xcb_shm_create_segment_reply (xcb_connection_t *c, + xcb_shm_create_segment_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +/** + * Return the reply fds + * @param c The connection + * @param reply The reply + * + * Returns a pointer to the array of reply fds of the reply. + * + * The returned value points into the reply and must not be free(). + * The fds are not managed by xcb. You must close() them before freeing the reply. + */ +int * +xcb_shm_create_segment_reply_fds (xcb_connection_t *c /**< */, + xcb_shm_create_segment_reply_t *reply); + + +#ifdef __cplusplus +} +#endif + +#endif + +/** + * @} + */ diff --git a/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/include/xcb/sync.h b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/include/xcb/sync.h new file mode 100644 index 0000000000000000000000000000000000000000..47796e94c8e5fa5977fc6b2b5b0b755e678b1e95 --- /dev/null +++ b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/include/xcb/sync.h @@ -0,0 +1,1628 @@ +/* + * This file generated automatically from sync.xml by c_client.py. + * Edit at your peril. + */ + +/** + * @defgroup XCB_Sync_API XCB Sync API + * @brief Sync XCB Protocol Implementation. + * @{ + **/ + +#ifndef __SYNC_H +#define __SYNC_H + +#include "xcb.h" +#include "xproto.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#define XCB_SYNC_MAJOR_VERSION 3 +#define XCB_SYNC_MINOR_VERSION 1 + +extern xcb_extension_t xcb_sync_id; + +typedef uint32_t xcb_sync_alarm_t; + +/** + * @brief xcb_sync_alarm_iterator_t + **/ +typedef struct xcb_sync_alarm_iterator_t { + xcb_sync_alarm_t *data; + int rem; + int index; +} xcb_sync_alarm_iterator_t; + +typedef enum xcb_sync_alarmstate_t { + XCB_SYNC_ALARMSTATE_ACTIVE = 0, + XCB_SYNC_ALARMSTATE_INACTIVE = 1, + XCB_SYNC_ALARMSTATE_DESTROYED = 2 +} xcb_sync_alarmstate_t; + +typedef uint32_t xcb_sync_counter_t; + +/** + * @brief xcb_sync_counter_iterator_t + **/ +typedef struct xcb_sync_counter_iterator_t { + xcb_sync_counter_t *data; + int rem; + int index; +} xcb_sync_counter_iterator_t; + +typedef uint32_t xcb_sync_fence_t; + +/** + * @brief xcb_sync_fence_iterator_t + **/ +typedef struct xcb_sync_fence_iterator_t { + xcb_sync_fence_t *data; + int rem; + int index; +} xcb_sync_fence_iterator_t; + +typedef enum xcb_sync_testtype_t { + XCB_SYNC_TESTTYPE_POSITIVE_TRANSITION = 0, + XCB_SYNC_TESTTYPE_NEGATIVE_TRANSITION = 1, + XCB_SYNC_TESTTYPE_POSITIVE_COMPARISON = 2, + XCB_SYNC_TESTTYPE_NEGATIVE_COMPARISON = 3 +} xcb_sync_testtype_t; + +typedef enum xcb_sync_valuetype_t { + XCB_SYNC_VALUETYPE_ABSOLUTE = 0, + XCB_SYNC_VALUETYPE_RELATIVE = 1 +} xcb_sync_valuetype_t; + +typedef enum xcb_sync_ca_t { + XCB_SYNC_CA_COUNTER = 1, + XCB_SYNC_CA_VALUE_TYPE = 2, + XCB_SYNC_CA_VALUE = 4, + XCB_SYNC_CA_TEST_TYPE = 8, + XCB_SYNC_CA_DELTA = 16, + XCB_SYNC_CA_EVENTS = 32 +} xcb_sync_ca_t; + +/** + * @brief xcb_sync_int64_t + **/ +typedef struct xcb_sync_int64_t { + int32_t hi; + uint32_t lo; +} xcb_sync_int64_t; + +/** + * @brief xcb_sync_int64_iterator_t + **/ +typedef struct xcb_sync_int64_iterator_t { + xcb_sync_int64_t *data; + int rem; + int index; +} xcb_sync_int64_iterator_t; + +/** + * @brief xcb_sync_systemcounter_t + **/ +typedef struct xcb_sync_systemcounter_t { + xcb_sync_counter_t counter; + xcb_sync_int64_t resolution; + uint16_t name_len; +} xcb_sync_systemcounter_t; + +/** + * @brief xcb_sync_systemcounter_iterator_t + **/ +typedef struct xcb_sync_systemcounter_iterator_t { + xcb_sync_systemcounter_t *data; + int rem; + int index; +} xcb_sync_systemcounter_iterator_t; + +/** + * @brief xcb_sync_trigger_t + **/ +typedef struct xcb_sync_trigger_t { + xcb_sync_counter_t counter; + uint32_t wait_type; + xcb_sync_int64_t wait_value; + uint32_t test_type; +} xcb_sync_trigger_t; + +/** + * @brief xcb_sync_trigger_iterator_t + **/ +typedef struct xcb_sync_trigger_iterator_t { + xcb_sync_trigger_t *data; + int rem; + int index; +} xcb_sync_trigger_iterator_t; + +/** + * @brief xcb_sync_waitcondition_t + **/ +typedef struct xcb_sync_waitcondition_t { + xcb_sync_trigger_t trigger; + xcb_sync_int64_t event_threshold; +} xcb_sync_waitcondition_t; + +/** + * @brief xcb_sync_waitcondition_iterator_t + **/ +typedef struct xcb_sync_waitcondition_iterator_t { + xcb_sync_waitcondition_t *data; + int rem; + int index; +} xcb_sync_waitcondition_iterator_t; + +/** Opcode for xcb_sync_counter. */ +#define XCB_SYNC_COUNTER 0 + +/** + * @brief xcb_sync_counter_error_t + **/ +typedef struct xcb_sync_counter_error_t { + uint8_t response_type; + uint8_t error_code; + uint16_t sequence; + uint32_t bad_counter; + uint16_t minor_opcode; + uint8_t major_opcode; +} xcb_sync_counter_error_t; + +/** Opcode for xcb_sync_alarm. */ +#define XCB_SYNC_ALARM 1 + +/** + * @brief xcb_sync_alarm_error_t + **/ +typedef struct xcb_sync_alarm_error_t { + uint8_t response_type; + uint8_t error_code; + uint16_t sequence; + uint32_t bad_alarm; + uint16_t minor_opcode; + uint8_t major_opcode; +} xcb_sync_alarm_error_t; + +/** + * @brief xcb_sync_initialize_cookie_t + **/ +typedef struct xcb_sync_initialize_cookie_t { + unsigned int sequence; +} xcb_sync_initialize_cookie_t; + +/** Opcode for xcb_sync_initialize. */ +#define XCB_SYNC_INITIALIZE 0 + +/** + * @brief xcb_sync_initialize_request_t + **/ +typedef struct xcb_sync_initialize_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + uint8_t desired_major_version; + uint8_t desired_minor_version; +} xcb_sync_initialize_request_t; + +/** + * @brief xcb_sync_initialize_reply_t + **/ +typedef struct xcb_sync_initialize_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint8_t major_version; + uint8_t minor_version; + uint8_t pad1[22]; +} xcb_sync_initialize_reply_t; + +/** + * @brief xcb_sync_list_system_counters_cookie_t + **/ +typedef struct xcb_sync_list_system_counters_cookie_t { + unsigned int sequence; +} xcb_sync_list_system_counters_cookie_t; + +/** Opcode for xcb_sync_list_system_counters. */ +#define XCB_SYNC_LIST_SYSTEM_COUNTERS 1 + +/** + * @brief xcb_sync_list_system_counters_request_t + **/ +typedef struct xcb_sync_list_system_counters_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; +} xcb_sync_list_system_counters_request_t; + +/** + * @brief xcb_sync_list_system_counters_reply_t + **/ +typedef struct xcb_sync_list_system_counters_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint32_t counters_len; + uint8_t pad1[20]; +} xcb_sync_list_system_counters_reply_t; + +/** Opcode for xcb_sync_create_counter. */ +#define XCB_SYNC_CREATE_COUNTER 2 + +/** + * @brief xcb_sync_create_counter_request_t + **/ +typedef struct xcb_sync_create_counter_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_sync_counter_t id; + xcb_sync_int64_t initial_value; +} xcb_sync_create_counter_request_t; + +/** Opcode for xcb_sync_destroy_counter. */ +#define XCB_SYNC_DESTROY_COUNTER 6 + +/** + * @brief xcb_sync_destroy_counter_request_t + **/ +typedef struct xcb_sync_destroy_counter_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_sync_counter_t counter; +} xcb_sync_destroy_counter_request_t; + +/** + * @brief xcb_sync_query_counter_cookie_t + **/ +typedef struct xcb_sync_query_counter_cookie_t { + unsigned int sequence; +} xcb_sync_query_counter_cookie_t; + +/** Opcode for xcb_sync_query_counter. */ +#define XCB_SYNC_QUERY_COUNTER 5 + +/** + * @brief xcb_sync_query_counter_request_t + **/ +typedef struct xcb_sync_query_counter_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_sync_counter_t counter; +} xcb_sync_query_counter_request_t; + +/** + * @brief xcb_sync_query_counter_reply_t + **/ +typedef struct xcb_sync_query_counter_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + xcb_sync_int64_t counter_value; +} xcb_sync_query_counter_reply_t; + +/** Opcode for xcb_sync_await. */ +#define XCB_SYNC_AWAIT 7 + +/** + * @brief xcb_sync_await_request_t + **/ +typedef struct xcb_sync_await_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; +} xcb_sync_await_request_t; + +/** Opcode for xcb_sync_change_counter. */ +#define XCB_SYNC_CHANGE_COUNTER 4 + +/** + * @brief xcb_sync_change_counter_request_t + **/ +typedef struct xcb_sync_change_counter_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_sync_counter_t counter; + xcb_sync_int64_t amount; +} xcb_sync_change_counter_request_t; + +/** Opcode for xcb_sync_set_counter. */ +#define XCB_SYNC_SET_COUNTER 3 + +/** + * @brief xcb_sync_set_counter_request_t + **/ +typedef struct xcb_sync_set_counter_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_sync_counter_t counter; + xcb_sync_int64_t value; +} xcb_sync_set_counter_request_t; + +/** + * @brief xcb_sync_create_alarm_value_list_t + **/ +typedef struct xcb_sync_create_alarm_value_list_t { + xcb_sync_counter_t counter; + uint32_t valueType; + xcb_sync_int64_t value; + uint32_t testType; + xcb_sync_int64_t delta; + uint32_t events; +} xcb_sync_create_alarm_value_list_t; + +/** Opcode for xcb_sync_create_alarm. */ +#define XCB_SYNC_CREATE_ALARM 8 + +/** + * @brief xcb_sync_create_alarm_request_t + **/ +typedef struct xcb_sync_create_alarm_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_sync_alarm_t id; + uint32_t value_mask; +} xcb_sync_create_alarm_request_t; + +/** + * @brief xcb_sync_change_alarm_value_list_t + **/ +typedef struct xcb_sync_change_alarm_value_list_t { + xcb_sync_counter_t counter; + uint32_t valueType; + xcb_sync_int64_t value; + uint32_t testType; + xcb_sync_int64_t delta; + uint32_t events; +} xcb_sync_change_alarm_value_list_t; + +/** Opcode for xcb_sync_change_alarm. */ +#define XCB_SYNC_CHANGE_ALARM 9 + +/** + * @brief xcb_sync_change_alarm_request_t + **/ +typedef struct xcb_sync_change_alarm_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_sync_alarm_t id; + uint32_t value_mask; +} xcb_sync_change_alarm_request_t; + +/** Opcode for xcb_sync_destroy_alarm. */ +#define XCB_SYNC_DESTROY_ALARM 11 + +/** + * @brief xcb_sync_destroy_alarm_request_t + **/ +typedef struct xcb_sync_destroy_alarm_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_sync_alarm_t alarm; +} xcb_sync_destroy_alarm_request_t; + +/** + * @brief xcb_sync_query_alarm_cookie_t + **/ +typedef struct xcb_sync_query_alarm_cookie_t { + unsigned int sequence; +} xcb_sync_query_alarm_cookie_t; + +/** Opcode for xcb_sync_query_alarm. */ +#define XCB_SYNC_QUERY_ALARM 10 + +/** + * @brief xcb_sync_query_alarm_request_t + **/ +typedef struct xcb_sync_query_alarm_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_sync_alarm_t alarm; +} xcb_sync_query_alarm_request_t; + +/** + * @brief xcb_sync_query_alarm_reply_t + **/ +typedef struct xcb_sync_query_alarm_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + xcb_sync_trigger_t trigger; + xcb_sync_int64_t delta; + uint8_t events; + uint8_t state; + uint8_t pad1[2]; +} xcb_sync_query_alarm_reply_t; + +/** Opcode for xcb_sync_set_priority. */ +#define XCB_SYNC_SET_PRIORITY 12 + +/** + * @brief xcb_sync_set_priority_request_t + **/ +typedef struct xcb_sync_set_priority_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + uint32_t id; + int32_t priority; +} xcb_sync_set_priority_request_t; + +/** + * @brief xcb_sync_get_priority_cookie_t + **/ +typedef struct xcb_sync_get_priority_cookie_t { + unsigned int sequence; +} xcb_sync_get_priority_cookie_t; + +/** Opcode for xcb_sync_get_priority. */ +#define XCB_SYNC_GET_PRIORITY 13 + +/** + * @brief xcb_sync_get_priority_request_t + **/ +typedef struct xcb_sync_get_priority_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + uint32_t id; +} xcb_sync_get_priority_request_t; + +/** + * @brief xcb_sync_get_priority_reply_t + **/ +typedef struct xcb_sync_get_priority_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + int32_t priority; +} xcb_sync_get_priority_reply_t; + +/** Opcode for xcb_sync_create_fence. */ +#define XCB_SYNC_CREATE_FENCE 14 + +/** + * @brief xcb_sync_create_fence_request_t + **/ +typedef struct xcb_sync_create_fence_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_drawable_t drawable; + xcb_sync_fence_t fence; + uint8_t initially_triggered; +} xcb_sync_create_fence_request_t; + +/** Opcode for xcb_sync_trigger_fence. */ +#define XCB_SYNC_TRIGGER_FENCE 15 + +/** + * @brief xcb_sync_trigger_fence_request_t + **/ +typedef struct xcb_sync_trigger_fence_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_sync_fence_t fence; +} xcb_sync_trigger_fence_request_t; + +/** Opcode for xcb_sync_reset_fence. */ +#define XCB_SYNC_RESET_FENCE 16 + +/** + * @brief xcb_sync_reset_fence_request_t + **/ +typedef struct xcb_sync_reset_fence_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_sync_fence_t fence; +} xcb_sync_reset_fence_request_t; + +/** Opcode for xcb_sync_destroy_fence. */ +#define XCB_SYNC_DESTROY_FENCE 17 + +/** + * @brief xcb_sync_destroy_fence_request_t + **/ +typedef struct xcb_sync_destroy_fence_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_sync_fence_t fence; +} xcb_sync_destroy_fence_request_t; + +/** + * @brief xcb_sync_query_fence_cookie_t + **/ +typedef struct xcb_sync_query_fence_cookie_t { + unsigned int sequence; +} xcb_sync_query_fence_cookie_t; + +/** Opcode for xcb_sync_query_fence. */ +#define XCB_SYNC_QUERY_FENCE 18 + +/** + * @brief xcb_sync_query_fence_request_t + **/ +typedef struct xcb_sync_query_fence_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_sync_fence_t fence; +} xcb_sync_query_fence_request_t; + +/** + * @brief xcb_sync_query_fence_reply_t + **/ +typedef struct xcb_sync_query_fence_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint8_t triggered; + uint8_t pad1[23]; +} xcb_sync_query_fence_reply_t; + +/** Opcode for xcb_sync_await_fence. */ +#define XCB_SYNC_AWAIT_FENCE 19 + +/** + * @brief xcb_sync_await_fence_request_t + **/ +typedef struct xcb_sync_await_fence_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; +} xcb_sync_await_fence_request_t; + +/** Opcode for xcb_sync_counter_notify. */ +#define XCB_SYNC_COUNTER_NOTIFY 0 + +/** + * @brief xcb_sync_counter_notify_event_t + **/ +typedef struct xcb_sync_counter_notify_event_t { + uint8_t response_type; + uint8_t kind; + uint16_t sequence; + xcb_sync_counter_t counter; + xcb_sync_int64_t wait_value; + xcb_sync_int64_t counter_value; + xcb_timestamp_t timestamp; + uint16_t count; + uint8_t destroyed; + uint8_t pad0; +} xcb_sync_counter_notify_event_t; + +/** Opcode for xcb_sync_alarm_notify. */ +#define XCB_SYNC_ALARM_NOTIFY 1 + +/** + * @brief xcb_sync_alarm_notify_event_t + **/ +typedef struct xcb_sync_alarm_notify_event_t { + uint8_t response_type; + uint8_t kind; + uint16_t sequence; + xcb_sync_alarm_t alarm; + xcb_sync_int64_t counter_value; + xcb_sync_int64_t alarm_value; + xcb_timestamp_t timestamp; + uint8_t state; + uint8_t pad0[3]; +} xcb_sync_alarm_notify_event_t; + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_sync_alarm_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_sync_alarm_t) + */ +void +xcb_sync_alarm_next (xcb_sync_alarm_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_sync_alarm_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_sync_alarm_end (xcb_sync_alarm_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_sync_counter_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_sync_counter_t) + */ +void +xcb_sync_counter_next (xcb_sync_counter_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_sync_counter_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_sync_counter_end (xcb_sync_counter_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_sync_fence_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_sync_fence_t) + */ +void +xcb_sync_fence_next (xcb_sync_fence_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_sync_fence_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_sync_fence_end (xcb_sync_fence_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_sync_int64_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_sync_int64_t) + */ +void +xcb_sync_int64_next (xcb_sync_int64_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_sync_int64_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_sync_int64_end (xcb_sync_int64_iterator_t i); + +int +xcb_sync_systemcounter_sizeof (const void *_buffer); + +char * +xcb_sync_systemcounter_name (const xcb_sync_systemcounter_t *R); + +int +xcb_sync_systemcounter_name_length (const xcb_sync_systemcounter_t *R); + +xcb_generic_iterator_t +xcb_sync_systemcounter_name_end (const xcb_sync_systemcounter_t *R); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_sync_systemcounter_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_sync_systemcounter_t) + */ +void +xcb_sync_systemcounter_next (xcb_sync_systemcounter_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_sync_systemcounter_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_sync_systemcounter_end (xcb_sync_systemcounter_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_sync_trigger_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_sync_trigger_t) + */ +void +xcb_sync_trigger_next (xcb_sync_trigger_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_sync_trigger_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_sync_trigger_end (xcb_sync_trigger_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_sync_waitcondition_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_sync_waitcondition_t) + */ +void +xcb_sync_waitcondition_next (xcb_sync_waitcondition_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_sync_waitcondition_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_sync_waitcondition_end (xcb_sync_waitcondition_iterator_t i); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_sync_initialize_cookie_t +xcb_sync_initialize (xcb_connection_t *c, + uint8_t desired_major_version, + uint8_t desired_minor_version); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_sync_initialize_cookie_t +xcb_sync_initialize_unchecked (xcb_connection_t *c, + uint8_t desired_major_version, + uint8_t desired_minor_version); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_sync_initialize_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_sync_initialize_reply_t * +xcb_sync_initialize_reply (xcb_connection_t *c, + xcb_sync_initialize_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_sync_list_system_counters_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_sync_list_system_counters_cookie_t +xcb_sync_list_system_counters (xcb_connection_t *c); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_sync_list_system_counters_cookie_t +xcb_sync_list_system_counters_unchecked (xcb_connection_t *c); + +int +xcb_sync_list_system_counters_counters_length (const xcb_sync_list_system_counters_reply_t *R); + +xcb_sync_systemcounter_iterator_t +xcb_sync_list_system_counters_counters_iterator (const xcb_sync_list_system_counters_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_sync_list_system_counters_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_sync_list_system_counters_reply_t * +xcb_sync_list_system_counters_reply (xcb_connection_t *c, + xcb_sync_list_system_counters_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_sync_create_counter_checked (xcb_connection_t *c, + xcb_sync_counter_t id, + xcb_sync_int64_t initial_value); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_sync_create_counter (xcb_connection_t *c, + xcb_sync_counter_t id, + xcb_sync_int64_t initial_value); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_sync_destroy_counter_checked (xcb_connection_t *c, + xcb_sync_counter_t counter); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_sync_destroy_counter (xcb_connection_t *c, + xcb_sync_counter_t counter); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_sync_query_counter_cookie_t +xcb_sync_query_counter (xcb_connection_t *c, + xcb_sync_counter_t counter); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_sync_query_counter_cookie_t +xcb_sync_query_counter_unchecked (xcb_connection_t *c, + xcb_sync_counter_t counter); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_sync_query_counter_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_sync_query_counter_reply_t * +xcb_sync_query_counter_reply (xcb_connection_t *c, + xcb_sync_query_counter_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_sync_await_sizeof (const void *_buffer, + uint32_t wait_list_len); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_sync_await_checked (xcb_connection_t *c, + uint32_t wait_list_len, + const xcb_sync_waitcondition_t *wait_list); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_sync_await (xcb_connection_t *c, + uint32_t wait_list_len, + const xcb_sync_waitcondition_t *wait_list); + +xcb_sync_waitcondition_t * +xcb_sync_await_wait_list (const xcb_sync_await_request_t *R); + +int +xcb_sync_await_wait_list_length (const xcb_sync_await_request_t *R); + +xcb_sync_waitcondition_iterator_t +xcb_sync_await_wait_list_iterator (const xcb_sync_await_request_t *R); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_sync_change_counter_checked (xcb_connection_t *c, + xcb_sync_counter_t counter, + xcb_sync_int64_t amount); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_sync_change_counter (xcb_connection_t *c, + xcb_sync_counter_t counter, + xcb_sync_int64_t amount); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_sync_set_counter_checked (xcb_connection_t *c, + xcb_sync_counter_t counter, + xcb_sync_int64_t value); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_sync_set_counter (xcb_connection_t *c, + xcb_sync_counter_t counter, + xcb_sync_int64_t value); + +int +xcb_sync_create_alarm_value_list_serialize (void **_buffer, + uint32_t value_mask, + const xcb_sync_create_alarm_value_list_t *_aux); + +int +xcb_sync_create_alarm_value_list_unpack (const void *_buffer, + uint32_t value_mask, + xcb_sync_create_alarm_value_list_t *_aux); + +int +xcb_sync_create_alarm_value_list_sizeof (const void *_buffer, + uint32_t value_mask); + +int +xcb_sync_create_alarm_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_sync_create_alarm_checked (xcb_connection_t *c, + xcb_sync_alarm_t id, + uint32_t value_mask, + const void *value_list); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_sync_create_alarm (xcb_connection_t *c, + xcb_sync_alarm_t id, + uint32_t value_mask, + const void *value_list); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_sync_create_alarm_aux_checked (xcb_connection_t *c, + xcb_sync_alarm_t id, + uint32_t value_mask, + const xcb_sync_create_alarm_value_list_t *value_list); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_sync_create_alarm_aux (xcb_connection_t *c, + xcb_sync_alarm_t id, + uint32_t value_mask, + const xcb_sync_create_alarm_value_list_t *value_list); + +void * +xcb_sync_create_alarm_value_list (const xcb_sync_create_alarm_request_t *R); + +int +xcb_sync_change_alarm_value_list_serialize (void **_buffer, + uint32_t value_mask, + const xcb_sync_change_alarm_value_list_t *_aux); + +int +xcb_sync_change_alarm_value_list_unpack (const void *_buffer, + uint32_t value_mask, + xcb_sync_change_alarm_value_list_t *_aux); + +int +xcb_sync_change_alarm_value_list_sizeof (const void *_buffer, + uint32_t value_mask); + +int +xcb_sync_change_alarm_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_sync_change_alarm_checked (xcb_connection_t *c, + xcb_sync_alarm_t id, + uint32_t value_mask, + const void *value_list); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_sync_change_alarm (xcb_connection_t *c, + xcb_sync_alarm_t id, + uint32_t value_mask, + const void *value_list); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_sync_change_alarm_aux_checked (xcb_connection_t *c, + xcb_sync_alarm_t id, + uint32_t value_mask, + const xcb_sync_change_alarm_value_list_t *value_list); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_sync_change_alarm_aux (xcb_connection_t *c, + xcb_sync_alarm_t id, + uint32_t value_mask, + const xcb_sync_change_alarm_value_list_t *value_list); + +void * +xcb_sync_change_alarm_value_list (const xcb_sync_change_alarm_request_t *R); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_sync_destroy_alarm_checked (xcb_connection_t *c, + xcb_sync_alarm_t alarm); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_sync_destroy_alarm (xcb_connection_t *c, + xcb_sync_alarm_t alarm); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_sync_query_alarm_cookie_t +xcb_sync_query_alarm (xcb_connection_t *c, + xcb_sync_alarm_t alarm); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_sync_query_alarm_cookie_t +xcb_sync_query_alarm_unchecked (xcb_connection_t *c, + xcb_sync_alarm_t alarm); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_sync_query_alarm_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_sync_query_alarm_reply_t * +xcb_sync_query_alarm_reply (xcb_connection_t *c, + xcb_sync_query_alarm_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_sync_set_priority_checked (xcb_connection_t *c, + uint32_t id, + int32_t priority); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_sync_set_priority (xcb_connection_t *c, + uint32_t id, + int32_t priority); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_sync_get_priority_cookie_t +xcb_sync_get_priority (xcb_connection_t *c, + uint32_t id); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_sync_get_priority_cookie_t +xcb_sync_get_priority_unchecked (xcb_connection_t *c, + uint32_t id); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_sync_get_priority_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_sync_get_priority_reply_t * +xcb_sync_get_priority_reply (xcb_connection_t *c, + xcb_sync_get_priority_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_sync_create_fence_checked (xcb_connection_t *c, + xcb_drawable_t drawable, + xcb_sync_fence_t fence, + uint8_t initially_triggered); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_sync_create_fence (xcb_connection_t *c, + xcb_drawable_t drawable, + xcb_sync_fence_t fence, + uint8_t initially_triggered); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_sync_trigger_fence_checked (xcb_connection_t *c, + xcb_sync_fence_t fence); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_sync_trigger_fence (xcb_connection_t *c, + xcb_sync_fence_t fence); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_sync_reset_fence_checked (xcb_connection_t *c, + xcb_sync_fence_t fence); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_sync_reset_fence (xcb_connection_t *c, + xcb_sync_fence_t fence); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_sync_destroy_fence_checked (xcb_connection_t *c, + xcb_sync_fence_t fence); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_sync_destroy_fence (xcb_connection_t *c, + xcb_sync_fence_t fence); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_sync_query_fence_cookie_t +xcb_sync_query_fence (xcb_connection_t *c, + xcb_sync_fence_t fence); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_sync_query_fence_cookie_t +xcb_sync_query_fence_unchecked (xcb_connection_t *c, + xcb_sync_fence_t fence); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_sync_query_fence_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_sync_query_fence_reply_t * +xcb_sync_query_fence_reply (xcb_connection_t *c, + xcb_sync_query_fence_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_sync_await_fence_sizeof (const void *_buffer, + uint32_t fence_list_len); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_sync_await_fence_checked (xcb_connection_t *c, + uint32_t fence_list_len, + const xcb_sync_fence_t *fence_list); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_sync_await_fence (xcb_connection_t *c, + uint32_t fence_list_len, + const xcb_sync_fence_t *fence_list); + +xcb_sync_fence_t * +xcb_sync_await_fence_fence_list (const xcb_sync_await_fence_request_t *R); + +int +xcb_sync_await_fence_fence_list_length (const xcb_sync_await_fence_request_t *R); + +xcb_generic_iterator_t +xcb_sync_await_fence_fence_list_end (const xcb_sync_await_fence_request_t *R); + + +#ifdef __cplusplus +} +#endif + +#endif + +/** + * @} + */ diff --git a/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/include/xcb/xc_misc.h b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/include/xcb/xc_misc.h new file mode 100644 index 0000000000000000000000000000000000000000..866c87977eb37c5d61fd28ae16d7cc589165b645 --- /dev/null +++ b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/include/xcb/xc_misc.h @@ -0,0 +1,281 @@ +/* + * This file generated automatically from xc_misc.xml by c_client.py. + * Edit at your peril. + */ + +/** + * @defgroup XCB_XCMisc_API XCB XCMisc API + * @brief XCMisc XCB Protocol Implementation. + * @{ + **/ + +#ifndef __XC_MISC_H +#define __XC_MISC_H + +#include "xcb.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#define XCB_XCMISC_MAJOR_VERSION 1 +#define XCB_XCMISC_MINOR_VERSION 1 + +extern xcb_extension_t xcb_xc_misc_id; + +/** + * @brief xcb_xc_misc_get_version_cookie_t + **/ +typedef struct xcb_xc_misc_get_version_cookie_t { + unsigned int sequence; +} xcb_xc_misc_get_version_cookie_t; + +/** Opcode for xcb_xc_misc_get_version. */ +#define XCB_XC_MISC_GET_VERSION 0 + +/** + * @brief xcb_xc_misc_get_version_request_t + **/ +typedef struct xcb_xc_misc_get_version_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + uint16_t client_major_version; + uint16_t client_minor_version; +} xcb_xc_misc_get_version_request_t; + +/** + * @brief xcb_xc_misc_get_version_reply_t + **/ +typedef struct xcb_xc_misc_get_version_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint16_t server_major_version; + uint16_t server_minor_version; +} xcb_xc_misc_get_version_reply_t; + +/** + * @brief xcb_xc_misc_get_xid_range_cookie_t + **/ +typedef struct xcb_xc_misc_get_xid_range_cookie_t { + unsigned int sequence; +} xcb_xc_misc_get_xid_range_cookie_t; + +/** Opcode for xcb_xc_misc_get_xid_range. */ +#define XCB_XC_MISC_GET_XID_RANGE 1 + +/** + * @brief xcb_xc_misc_get_xid_range_request_t + **/ +typedef struct xcb_xc_misc_get_xid_range_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; +} xcb_xc_misc_get_xid_range_request_t; + +/** + * @brief xcb_xc_misc_get_xid_range_reply_t + **/ +typedef struct xcb_xc_misc_get_xid_range_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint32_t start_id; + uint32_t count; +} xcb_xc_misc_get_xid_range_reply_t; + +/** + * @brief xcb_xc_misc_get_xid_list_cookie_t + **/ +typedef struct xcb_xc_misc_get_xid_list_cookie_t { + unsigned int sequence; +} xcb_xc_misc_get_xid_list_cookie_t; + +/** Opcode for xcb_xc_misc_get_xid_list. */ +#define XCB_XC_MISC_GET_XID_LIST 2 + +/** + * @brief xcb_xc_misc_get_xid_list_request_t + **/ +typedef struct xcb_xc_misc_get_xid_list_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + uint32_t count; +} xcb_xc_misc_get_xid_list_request_t; + +/** + * @brief xcb_xc_misc_get_xid_list_reply_t + **/ +typedef struct xcb_xc_misc_get_xid_list_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint32_t ids_len; + uint8_t pad1[20]; +} xcb_xc_misc_get_xid_list_reply_t; + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_xc_misc_get_version_cookie_t +xcb_xc_misc_get_version (xcb_connection_t *c, + uint16_t client_major_version, + uint16_t client_minor_version); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_xc_misc_get_version_cookie_t +xcb_xc_misc_get_version_unchecked (xcb_connection_t *c, + uint16_t client_major_version, + uint16_t client_minor_version); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_xc_misc_get_version_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_xc_misc_get_version_reply_t * +xcb_xc_misc_get_version_reply (xcb_connection_t *c, + xcb_xc_misc_get_version_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_xc_misc_get_xid_range_cookie_t +xcb_xc_misc_get_xid_range (xcb_connection_t *c); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_xc_misc_get_xid_range_cookie_t +xcb_xc_misc_get_xid_range_unchecked (xcb_connection_t *c); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_xc_misc_get_xid_range_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_xc_misc_get_xid_range_reply_t * +xcb_xc_misc_get_xid_range_reply (xcb_connection_t *c, + xcb_xc_misc_get_xid_range_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_xc_misc_get_xid_list_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_xc_misc_get_xid_list_cookie_t +xcb_xc_misc_get_xid_list (xcb_connection_t *c, + uint32_t count); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_xc_misc_get_xid_list_cookie_t +xcb_xc_misc_get_xid_list_unchecked (xcb_connection_t *c, + uint32_t count); + +uint32_t * +xcb_xc_misc_get_xid_list_ids (const xcb_xc_misc_get_xid_list_reply_t *R); + +int +xcb_xc_misc_get_xid_list_ids_length (const xcb_xc_misc_get_xid_list_reply_t *R); + +xcb_generic_iterator_t +xcb_xc_misc_get_xid_list_ids_end (const xcb_xc_misc_get_xid_list_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_xc_misc_get_xid_list_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_xc_misc_get_xid_list_reply_t * +xcb_xc_misc_get_xid_list_reply (xcb_connection_t *c, + xcb_xc_misc_get_xid_list_cookie_t cookie /**< */, + xcb_generic_error_t **e); + + +#ifdef __cplusplus +} +#endif + +#endif + +/** + * @} + */ diff --git a/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/include/xcb/xcb.h b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/include/xcb/xcb.h new file mode 100644 index 0000000000000000000000000000000000000000..3f39bb4abca723424f9d852c761ea2413bad6b3b --- /dev/null +++ b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/include/xcb/xcb.h @@ -0,0 +1,644 @@ +/* + * Copyright (C) 2001-2006 Bart Massey, Jamey Sharp, and Josh Triplett. + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + * Except as contained in this notice, the names of the authors or their + * institutions shall not be used in advertising or otherwise to promote the + * sale, use or other dealings in this Software without prior written + * authorization from the authors. + */ + +#ifndef __XCB_H__ +#define __XCB_H__ +#include + +#if defined(__solaris__) +#include +#else +#include +#endif + +#ifndef _WIN32 +#include +#else +#include "xcb_windefs.h" +#endif +#include + + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @file xcb.h + */ + +#ifdef __GNUC__ +#define XCB_PACKED __attribute__((__packed__)) +#else +#define XCB_PACKED +#endif + +/** + * @defgroup XCB_Core_API XCB Core API + * @brief Core API of the XCB library. + * + * @{ + */ + +/* Pre-defined constants */ + +/** Current protocol version */ +#define X_PROTOCOL 11 + +/** Current minor version */ +#define X_PROTOCOL_REVISION 0 + +/** X_TCP_PORT + display number = server port for TCP transport */ +#define X_TCP_PORT 6000 + +/** xcb connection errors because of socket, pipe and other stream errors. */ +#define XCB_CONN_ERROR 1 + +/** xcb connection shutdown because of extension not supported */ +#define XCB_CONN_CLOSED_EXT_NOTSUPPORTED 2 + +/** malloc(), calloc() and realloc() error upon failure, for eg ENOMEM */ +#define XCB_CONN_CLOSED_MEM_INSUFFICIENT 3 + +/** Connection closed, exceeding request length that server accepts. */ +#define XCB_CONN_CLOSED_REQ_LEN_EXCEED 4 + +/** Connection closed, error during parsing display string. */ +#define XCB_CONN_CLOSED_PARSE_ERR 5 + +/** Connection closed because the server does not have a screen matching the display. */ +#define XCB_CONN_CLOSED_INVALID_SCREEN 6 + +/** Connection closed because some FD passing operation failed */ +#define XCB_CONN_CLOSED_FDPASSING_FAILED 7 + +#define XCB_TYPE_PAD(T,I) (-(I) & (sizeof(T) > 4 ? 3 : sizeof(T) - 1)) + +/* Opaque structures */ + +/** + * @brief XCB Connection structure. + * + * A structure that contain all data that XCB needs to communicate with an X server. + */ +typedef struct xcb_connection_t xcb_connection_t; /**< Opaque structure containing all data that XCB needs to communicate with an X server. */ + + +/* Other types */ + +/** + * @brief Generic iterator. + * + * A generic iterator structure. + */ +typedef struct { + void *data; /**< Data of the current iterator */ + int rem; /**< remaining elements */ + int index; /**< index of the current iterator */ +} xcb_generic_iterator_t; + +/** + * @brief Generic reply. + * + * A generic reply structure. + */ +typedef struct { + uint8_t response_type; /**< Type of the response */ + uint8_t pad0; /**< Padding */ + uint16_t sequence; /**< Sequence number */ + uint32_t length; /**< Length of the response */ +} xcb_generic_reply_t; + +/** + * @brief Generic event. + * + * A generic event structure. + */ +typedef struct { + uint8_t response_type; /**< Type of the response */ + uint8_t pad0; /**< Padding */ + uint16_t sequence; /**< Sequence number */ + uint32_t pad[7]; /**< Padding */ + uint32_t full_sequence; /**< full sequence */ +} xcb_generic_event_t; + +/** + * @brief Raw Generic event. + * + * A generic event structure as used on the wire, i.e., without the full_sequence field + */ +typedef struct { + uint8_t response_type; /**< Type of the response */ + uint8_t pad0; /**< Padding */ + uint16_t sequence; /**< Sequence number */ + uint32_t pad[7]; /**< Padding */ +} xcb_raw_generic_event_t; + +/** + * @brief GE event + * + * An event as sent by the XGE extension. The length field specifies the + * number of 4-byte blocks trailing the struct. + * + * @deprecated Since some fields in this struct have unfortunate names, it is + * recommended to use xcb_ge_generic_event_t instead. + */ +typedef struct { + uint8_t response_type; /**< Type of the response */ + uint8_t pad0; /**< Padding */ + uint16_t sequence; /**< Sequence number */ + uint32_t length; + uint16_t event_type; + uint16_t pad1; + uint32_t pad[5]; /**< Padding */ + uint32_t full_sequence; /**< full sequence */ +} xcb_ge_event_t; + +/** + * @brief Generic error. + * + * A generic error structure. + */ +typedef struct { + uint8_t response_type; /**< Type of the response */ + uint8_t error_code; /**< Error code */ + uint16_t sequence; /**< Sequence number */ + uint32_t resource_id; /** < Resource ID for requests with side effects only */ + uint16_t minor_code; /** < Minor opcode of the failed request */ + uint8_t major_code; /** < Major opcode of the failed request */ + uint8_t pad0; + uint32_t pad[5]; /**< Padding */ + uint32_t full_sequence; /**< full sequence */ +} xcb_generic_error_t; + +/** + * @brief Generic cookie. + * + * A generic cookie structure. + */ +typedef struct { + unsigned int sequence; /**< Sequence number */ +} xcb_void_cookie_t; + + +/* Include the generated xproto header. */ +#include "xproto.h" + + +/** XCB_NONE is the universal null resource or null atom parameter value for many core X requests */ +#define XCB_NONE 0L + +/** XCB_COPY_FROM_PARENT can be used for many xcb_create_window parameters */ +#define XCB_COPY_FROM_PARENT 0L + +/** XCB_CURRENT_TIME can be used in most requests that take an xcb_timestamp_t */ +#define XCB_CURRENT_TIME 0L + +/** XCB_NO_SYMBOL fills in unused entries in xcb_keysym_t tables */ +#define XCB_NO_SYMBOL 0L + + +/* xcb_auth.c */ + +/** + * @brief Container for authorization information. + * + * A container for authorization information to be sent to the X server. + */ +typedef struct xcb_auth_info_t { + int namelen; /**< Length of the string name (as returned by strlen). */ + char *name; /**< String containing the authentication protocol name, such as "MIT-MAGIC-COOKIE-1" or "XDM-AUTHORIZATION-1". */ + int datalen; /**< Length of the data member. */ + char *data; /**< Data interpreted in a protocol-specific manner. */ +} xcb_auth_info_t; + + +/* xcb_out.c */ + +/** + * @brief Forces any buffered output to be written to the server. + * @param c The connection to the X server. + * @return > @c 0 on success, <= @c 0 otherwise. + * + * Forces any buffered output to be written to the server. Blocks + * until the write is complete. + */ +int xcb_flush(xcb_connection_t *c); + +/** + * @brief Returns the maximum request length that this server accepts. + * @param c The connection to the X server. + * @return The maximum request length field. + * + * In the absence of the BIG-REQUESTS extension, returns the + * maximum request length field from the connection setup data, which + * may be as much as 65535. If the server supports BIG-REQUESTS, then + * the maximum request length field from the reply to the + * BigRequestsEnable request will be returned instead. + * + * Note that this length is measured in four-byte units, making the + * theoretical maximum lengths roughly 256kB without BIG-REQUESTS and + * 16GB with. + */ +uint32_t xcb_get_maximum_request_length(xcb_connection_t *c); + +/** + * @brief Prefetch the maximum request length without blocking. + * @param c The connection to the X server. + * + * Without blocking, does as much work as possible toward computing + * the maximum request length accepted by the X server. + * + * Invoking this function may cause a call to xcb_big_requests_enable, + * but will not block waiting for the reply. + * xcb_get_maximum_request_length will return the prefetched data + * after possibly blocking while the reply is retrieved. + * + * Note that in order for this function to be fully non-blocking, the + * application must previously have called + * xcb_prefetch_extension_data(c, &xcb_big_requests_id) and the reply + * must have already arrived. + */ +void xcb_prefetch_maximum_request_length(xcb_connection_t *c); + + +/* xcb_in.c */ + +/** + * @brief Returns the next event or error from the server. + * @param c The connection to the X server. + * @return The next event from the server. + * + * Returns the next event or error from the server, or returns null in + * the event of an I/O error. Blocks until either an event or error + * arrive, or an I/O error occurs. + */ +xcb_generic_event_t *xcb_wait_for_event(xcb_connection_t *c); + +/** + * @brief Returns the next event or error from the server. + * @param c The connection to the X server. + * @return The next event from the server. + * + * Returns the next event or error from the server, if one is + * available, or returns @c NULL otherwise. If no event is available, that + * might be because an I/O error like connection close occurred while + * attempting to read the next event, in which case the connection is + * shut down when this function returns. + */ +xcb_generic_event_t *xcb_poll_for_event(xcb_connection_t *c); + +/** + * @brief Returns the next event without reading from the connection. + * @param c The connection to the X server. + * @return The next already queued event from the server. + * + * This is a version of xcb_poll_for_event that only examines the + * event queue for new events. The function doesn't try to read new + * events from the connection if no queued events are found. + * + * This function is useful for callers that know in advance that all + * interesting events have already been read from the connection. For + * example, callers might use xcb_wait_for_reply and be interested + * only of events that preceded a specific reply. + */ +xcb_generic_event_t *xcb_poll_for_queued_event(xcb_connection_t *c); + +typedef struct xcb_special_event xcb_special_event_t; + +/** + * @brief Returns the next event from a special queue + */ +xcb_generic_event_t *xcb_poll_for_special_event(xcb_connection_t *c, + xcb_special_event_t *se); + +/** + * @brief Returns the next event from a special queue, blocking until one arrives + */ +xcb_generic_event_t *xcb_wait_for_special_event(xcb_connection_t *c, + xcb_special_event_t *se); +/** + * @typedef typedef struct xcb_extension_t xcb_extension_t + */ +typedef struct xcb_extension_t xcb_extension_t; /**< Opaque structure used as key for xcb_get_extension_data_t. */ + +/** + * @brief Listen for a special event + */ +xcb_special_event_t *xcb_register_for_special_xge(xcb_connection_t *c, + xcb_extension_t *ext, + uint32_t eid, + uint32_t *stamp); + +/** + * @brief Stop listening for a special event + */ +void xcb_unregister_for_special_event(xcb_connection_t *c, + xcb_special_event_t *se); + +/** + * @brief Return the error for a request, or NULL if none can ever arrive. + * @param c The connection to the X server. + * @param cookie The request cookie. + * @return The error for the request, or NULL if none can ever arrive. + * + * The xcb_void_cookie_t cookie supplied to this function must have resulted + * from a call to xcb_[request_name]_checked(). This function will block + * until one of two conditions happens. If an error is received, it will be + * returned. If a reply to a subsequent request has already arrived, no error + * can arrive for this request, so this function will return NULL. + * + * Note that this function will perform a sync if needed to ensure that the + * sequence number will advance beyond that provided in cookie; this is a + * convenience to avoid races in determining whether the sync is needed. + */ +xcb_generic_error_t *xcb_request_check(xcb_connection_t *c, xcb_void_cookie_t cookie); + +/** + * @brief Discards the reply for a request. + * @param c The connection to the X server. + * @param sequence The request sequence number from a cookie. + * + * Discards the reply for a request. Additionally, any error generated + * by the request is also discarded (unless it was an _unchecked request + * and the error has already arrived). + * + * This function will not block even if the reply is not yet available. + * + * Note that the sequence really does have to come from an xcb cookie; + * this function is not designed to operate on socket-handoff replies. + */ +void xcb_discard_reply(xcb_connection_t *c, unsigned int sequence); + +/** + * @brief Discards the reply for a request, given by a 64bit sequence number + * @param c The connection to the X server. + * @param sequence 64-bit sequence number as returned by xcb_send_request64(). + * + * Discards the reply for a request. Additionally, any error generated + * by the request is also discarded (unless it was an _unchecked request + * and the error has already arrived). + * + * This function will not block even if the reply is not yet available. + * + * Note that the sequence really does have to come from xcb_send_request64(); + * the cookie sequence number is defined as "unsigned" int and therefore + * not 64-bit on all platforms. + * This function is not designed to operate on socket-handoff replies. + * + * Unlike its xcb_discard_reply() counterpart, the given sequence number is not + * automatically "widened" to 64-bit. + */ +void xcb_discard_reply64(xcb_connection_t *c, uint64_t sequence); + +/* xcb_ext.c */ + +/** + * @brief Caches reply information from QueryExtension requests. + * @param c The connection. + * @param ext The extension data. + * @return A pointer to the xcb_query_extension_reply_t for the extension. + * + * This function is the primary interface to the "extension cache", + * which caches reply information from QueryExtension + * requests. Invoking this function may cause a call to + * xcb_query_extension to retrieve extension information from the + * server, and may block until extension data is received from the + * server. + * + * The result must not be freed. This storage is managed by the cache + * itself. + */ +const struct xcb_query_extension_reply_t *xcb_get_extension_data(xcb_connection_t *c, xcb_extension_t *ext); + +/** + * @brief Prefetch of extension data into the extension cache + * @param c The connection. + * @param ext The extension data. + * + * This function allows a "prefetch" of extension data into the + * extension cache. Invoking the function may cause a call to + * xcb_query_extension, but will not block waiting for the + * reply. xcb_get_extension_data will return the prefetched data after + * possibly blocking while it is retrieved. + */ +void xcb_prefetch_extension_data(xcb_connection_t *c, xcb_extension_t *ext); + + +/* xcb_conn.c */ + +/** + * @brief Access the data returned by the server. + * @param c The connection. + * @return A pointer to an xcb_setup_t structure. + * + * Accessor for the data returned by the server when the xcb_connection_t + * was initialized. This data includes + * - the server's required format for images, + * - a list of available visuals, + * - a list of available screens, + * - the server's maximum request length (in the absence of the + * BIG-REQUESTS extension), + * - and other assorted information. + * + * See the X protocol specification for more details. + * + * The result must not be freed. + */ +const struct xcb_setup_t *xcb_get_setup(xcb_connection_t *c); + +/** + * @brief Access the file descriptor of the connection. + * @param c The connection. + * @return The file descriptor. + * + * Accessor for the file descriptor that was passed to the + * xcb_connect_to_fd call that returned @p c. + */ +int xcb_get_file_descriptor(xcb_connection_t *c); + +/** + * @brief Test whether the connection has shut down due to a fatal error. + * @param c The connection. + * @return > 0 if the connection is in an error state; 0 otherwise. + * + * Some errors that occur in the context of an xcb_connection_t + * are unrecoverable. When such an error occurs, the + * connection is shut down and further operations on the + * xcb_connection_t have no effect, but memory will not be freed until + * xcb_disconnect() is called on the xcb_connection_t. + * + * @return XCB_CONN_ERROR, because of socket errors, pipe errors or other stream errors. + * @return XCB_CONN_CLOSED_EXT_NOTSUPPORTED, when extension not supported. + * @return XCB_CONN_CLOSED_MEM_INSUFFICIENT, when memory not available. + * @return XCB_CONN_CLOSED_REQ_LEN_EXCEED, exceeding request length that server accepts. + * @return XCB_CONN_CLOSED_PARSE_ERR, error during parsing display string. + * @return XCB_CONN_CLOSED_INVALID_SCREEN, because the server does not have a screen matching the display. + */ +int xcb_connection_has_error(xcb_connection_t *c); + +/** + * @brief Connects to the X server. + * @param fd The file descriptor. + * @param auth_info Authentication data. + * @return A newly allocated xcb_connection_t structure. + * + * Connects to an X server, given the open socket @p fd and the + * xcb_auth_info_t @p auth_info. The file descriptor @p fd is + * bidirectionally connected to an X server. If the connection + * should be unauthenticated, @p auth_info must be @c + * NULL. + * + * Always returns a non-NULL pointer to a xcb_connection_t, even on failure. + * Callers need to use xcb_connection_has_error() to check for failure. + * When finished, use xcb_disconnect() to close the connection and free + * the structure. + */ +xcb_connection_t *xcb_connect_to_fd(int fd, xcb_auth_info_t *auth_info); + +/** + * @brief Closes the connection. + * @param c The connection. + * + * Closes the file descriptor and frees all memory associated with the + * connection @c c. If @p c is @c NULL, nothing is done. + */ +void xcb_disconnect(xcb_connection_t *c); + + +/* xcb_util.c */ + +/** + * @brief Parses a display string name in the form documented by X(7x). + * @param name The name of the display. + * @param host A pointer to a malloc'd copy of the hostname. + * @param display A pointer to the display number. + * @param screen A pointer to the screen number. + * @return 0 on failure, non 0 otherwise. + * + * Parses the display string name @p display_name in the form + * documented by X(7x). Has no side effects on failure. If + * @p displayname is @c NULL or empty, it uses the environment + * variable DISPLAY. @p hostp is a pointer to a newly allocated string + * that contain the host name. @p displayp is set to the display + * number and @p screenp to the preferred screen number. @p screenp + * can be @c NULL. If @p displayname does not contain a screen number, + * it is set to @c 0. + */ +int xcb_parse_display(const char *name, char **host, int *display, int *screen); + +/** + * @brief Connects to the X server. + * @param displayname The name of the display. + * @param screenp A pointer to a preferred screen number. + * @return A newly allocated xcb_connection_t structure. + * + * Connects to the X server specified by @p displayname. If @p + * displayname is @c NULL, uses the value of the DISPLAY environment + * variable. If a particular screen on that server is preferred, the + * int pointed to by @p screenp (if not @c NULL) will be set to that + * screen; otherwise the screen will be set to 0. + * + * Always returns a non-NULL pointer to a xcb_connection_t, even on failure. + * Callers need to use xcb_connection_has_error() to check for failure. + * When finished, use xcb_disconnect() to close the connection and free + * the structure. + */ +xcb_connection_t *xcb_connect(const char *displayname, int *screenp); + +/** + * @brief Connects to the X server, using an authorization information. + * @param display The name of the display. + * @param auth The authorization information. + * @param screen A pointer to a preferred screen number. + * @return A newly allocated xcb_connection_t structure. + * + * Connects to the X server specified by @p displayname, using the + * authorization @p auth. If a particular screen on that server is + * preferred, the int pointed to by @p screenp (if not @c NULL) will + * be set to that screen; otherwise @p screenp will be set to 0. + * + * Always returns a non-NULL pointer to a xcb_connection_t, even on failure. + * Callers need to use xcb_connection_has_error() to check for failure. + * When finished, use xcb_disconnect() to close the connection and free + * the structure. + */ +xcb_connection_t *xcb_connect_to_display_with_auth_info(const char *display, xcb_auth_info_t *auth, int *screen); + + +/* xcb_xid.c */ + +/** + * @brief Allocates an XID for a new object. + * @param c The connection. + * @return A newly allocated XID, or -1 on failure. + * + * Allocates an XID for a new object. Typically used just prior to + * various object creation functions, such as xcb_create_window. + */ +uint32_t xcb_generate_id(xcb_connection_t *c); + + +/** + * @brief Obtain number of bytes read from the connection. + * @param c The connection + * @return Number of bytes read from the server. + * + * Returns cumulative number of bytes received from the connection. + * + * This retrieves the total number of bytes read from this connection, + * to be used for diagnostic/monitoring/informative purposes. + */ + +uint64_t +xcb_total_read(xcb_connection_t *c); + +/** + * + * @brief Obtain number of bytes written to the connection. + * @param c The connection + * @return Number of bytes written to the server. + * + * Returns cumulative number of bytes sent to the connection. + * + * This retrieves the total number of bytes written to this connection, + * to be used for diagnostic/monitoring/informative purposes. + */ + +uint64_t +xcb_total_written(xcb_connection_t *c); + +/** + * @} + */ + +#ifdef __cplusplus +} +#endif + + +#endif /* __XCB_H__ */ diff --git a/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/include/xcb/xcbext.h b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/include/xcb/xcbext.h new file mode 100644 index 0000000000000000000000000000000000000000..90f9d58b884559548e88bbef2328a8226a7dee95 --- /dev/null +++ b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/include/xcb/xcbext.h @@ -0,0 +1,322 @@ +/* + * Copyright (C) 2001-2004 Bart Massey and Jamey Sharp. + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + * Except as contained in this notice, the names of the authors or their + * institutions shall not be used in advertising or otherwise to promote the + * sale, use or other dealings in this Software without prior written + * authorization from the authors. + */ + +#ifndef __XCBEXT_H +#define __XCBEXT_H + +#include "xcb.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* xcb_ext.c */ + +struct xcb_extension_t { + const char *name; + int global_id; +}; + + +/* xcb_out.c */ + +typedef struct { + size_t count; + xcb_extension_t *ext; + uint8_t opcode; + uint8_t isvoid; +} xcb_protocol_request_t; + +enum xcb_send_request_flags_t { + XCB_REQUEST_CHECKED = 1 << 0, + XCB_REQUEST_RAW = 1 << 1, + XCB_REQUEST_DISCARD_REPLY = 1 << 2, + XCB_REQUEST_REPLY_FDS = 1 << 3 +}; + +/** + * @brief Send a request to the server. + * @param c The connection to the X server. + * @param flags A combination of flags from the xcb_send_request_flags_t enumeration. + * @param vector Data to send; must have two iovecs before start for internal use. + * @param request Information about the request to be sent. + * @return The request's sequence number on success, 0 otherwise. + * + * This function sends a new request to the X server. The data of the request is + * given as an array of @c iovecs in the @p vector argument. The length of that + * array and the necessary management information are given in the @p request + * argument. + * + * When this function returns, the request might or might not be sent already. + * Use xcb_flush() to make sure that it really was sent. + * + * Please note that this function is not the preferred way for sending requests. + * It's better to use the generated wrapper functions. + * + * Please note that xcb might use index -1 and -2 of the @p vector array internally, + * so they must be valid! + */ +unsigned int xcb_send_request(xcb_connection_t *c, int flags, struct iovec *vector, const xcb_protocol_request_t *request); + +/** + * @brief Send a request to the server. + * @param c The connection to the X server. + * @param flags A combination of flags from the xcb_send_request_flags_t enumeration. + * @param vector Data to send; must have two iovecs before start for internal use. + * @param request Information about the request to be sent. + * @param num_fds Number of additional file descriptors to send to the server + * @param fds Additional file descriptors that should be send to the server. + * @return The request's sequence number on success, 0 otherwise. + * + * This function sends a new request to the X server. The data of the request is + * given as an array of @c iovecs in the @p vector argument. The length of that + * array and the necessary management information are given in the @p request + * argument. + * + * If @p num_fds is non-zero, @p fds points to an array of file descriptors that + * will be sent to the X server along with this request. After this function + * returns, all file descriptors sent are owned by xcb and will be closed + * eventually. + * + * When this function returns, the request might or might not be sent already. + * Use xcb_flush() to make sure that it really was sent. + * + * Please note that this function is not the preferred way for sending requests. + * + * Please note that xcb might use index -1 and -2 of the @p vector array internally, + * so they must be valid! + */ +unsigned int xcb_send_request_with_fds(xcb_connection_t *c, int flags, struct iovec *vector, + const xcb_protocol_request_t *request, unsigned int num_fds, int *fds); + +/** + * @brief Send a request to the server, with 64-bit sequence number returned. + * @param c The connection to the X server. + * @param flags A combination of flags from the xcb_send_request_flags_t enumeration. + * @param vector Data to send; must have two iovecs before start for internal use. + * @param request Information about the request to be sent. + * @return The request's sequence number on success, 0 otherwise. + * + * This function sends a new request to the X server. The data of the request is + * given as an array of @c iovecs in the @p vector argument. The length of that + * array and the necessary management information are given in the @p request + * argument. + * + * When this function returns, the request might or might not be sent already. + * Use xcb_flush() to make sure that it really was sent. + * + * Please note that this function is not the preferred way for sending requests. + * It's better to use the generated wrapper functions. + * + * Please note that xcb might use index -1 and -2 of the @p vector array internally, + * so they must be valid! + */ +uint64_t xcb_send_request64(xcb_connection_t *c, int flags, struct iovec *vector, const xcb_protocol_request_t *request); + +/** + * @brief Send a request to the server, with 64-bit sequence number returned. + * @param c The connection to the X server. + * @param flags A combination of flags from the xcb_send_request_flags_t enumeration. + * @param vector Data to send; must have two iovecs before start for internal use. + * @param request Information about the request to be sent. + * @param num_fds Number of additional file descriptors to send to the server + * @param fds Additional file descriptors that should be send to the server. + * @return The request's sequence number on success, 0 otherwise. + * + * This function sends a new request to the X server. The data of the request is + * given as an array of @c iovecs in the @p vector argument. The length of that + * array and the necessary management information are given in the @p request + * argument. + * + * If @p num_fds is non-zero, @p fds points to an array of file descriptors that + * will be sent to the X server along with this request. After this function + * returns, all file descriptors sent are owned by xcb and will be closed + * eventually. + * + * When this function returns, the request might or might not be sent already. + * Use xcb_flush() to make sure that it really was sent. + * + * Please note that this function is not the preferred way for sending requests. + * It's better to use the generated wrapper functions. + * + * Please note that xcb might use index -1 and -2 of the @p vector array internally, + * so they must be valid! + */ +uint64_t xcb_send_request_with_fds64(xcb_connection_t *c, int flags, struct iovec *vector, + const xcb_protocol_request_t *request, unsigned int num_fds, int *fds); + +/** + * @brief Send a file descriptor to the server in the next call to xcb_send_request. + * @param c The connection to the X server. + * @param fd The file descriptor to send. + * + * After this function returns, the file descriptor given is owned by xcb and + * will be closed eventually. + * + * @deprecated This function cannot be used in a thread-safe way. Two threads + * that run xcb_send_fd(); xcb_send_request(); could mix up their file + * descriptors. Instead, xcb_send_request_with_fds() should be used. + */ +void xcb_send_fd(xcb_connection_t *c, int fd); + +/** + * @brief Take over the write side of the socket + * @param c The connection to the X server. + * @param return_socket Callback function that will be called when xcb wants + * to use the socket again. + * @param closure Argument to the callback function. + * @param flags A combination of flags from the xcb_send_request_flags_t enumeration. + * @param sent Location to the sequence number of the last sequence request. + * Must not be NULL. + * @return 1 on success, else 0. + * + * xcb_take_socket allows external code to ask XCB for permission to + * take over the write side of the socket and send raw data with + * xcb_writev. xcb_take_socket provides the sequence number of the last + * request XCB sent. The caller of xcb_take_socket must supply a + * callback which XCB can call when it wants the write side of the + * socket back to make a request. This callback synchronizes with the + * external socket owner and flushes any output queues if appropriate. + * If you are sending requests which won't cause a reply, please note the + * comment for xcb_writev which explains some sequence number wrap issues. + * + * All replies that are generated while the socket is owned externally have + * @p flags applied to them. For example, use XCB_REQUEST_CHECK if you don't + * want errors to go to xcb's normal error handling, but instead having to be + * picked up via xcb_wait_for_reply(), xcb_poll_for_reply() or + * xcb_request_check(). + */ +int xcb_take_socket(xcb_connection_t *c, void (*return_socket)(void *closure), void *closure, int flags, uint64_t *sent); + +/** + * @brief Send raw data to the X server. + * @param c The connection to the X server. + * @param vector Array of data to be sent. + * @param count Number of entries in @p vector. + * @param requests Number of requests that are being sent. + * @return 1 on success, else 0. + * + * You must own the write-side of the socket (you've called + * xcb_take_socket, and haven't returned from return_socket yet) to call + * xcb_writev. Also, the iovec must have at least 1 byte of data in it. + * You have to make sure that xcb can detect sequence number wraps correctly. + * This means that the first request you send after xcb_take_socket must cause a + * reply (e.g. just insert a GetInputFocus request). After every (1 << 16) - 1 + * requests without a reply, you have to insert a request which will cause a + * reply. You can again use GetInputFocus for this. You do not have to wait for + * any of the GetInputFocus replies, but can instead handle them via + * xcb_discard_reply(). + */ +int xcb_writev(xcb_connection_t *c, struct iovec *vector, int count, uint64_t requests); + + +/* xcb_in.c */ + +/** + * @brief Wait for the reply of a given request. + * @param c The connection to the X server. + * @param request Sequence number of the request as returned by xcb_send_request(). + * @param e Location to store errors in, or NULL. Ignored for unchecked requests. + * + * Returns the reply to the given request or returns null in the event of + * errors. Blocks until the reply or error for the request arrives, or an I/O + * error occurs. + */ +void *xcb_wait_for_reply(xcb_connection_t *c, unsigned int request, xcb_generic_error_t **e); + +/** + * @brief Wait for the reply of a given request, with 64-bit sequence number + * @param c The connection to the X server. + * @param request 64-bit sequence number of the request as returned by xcb_send_request64(). + * @param e Location to store errors in, or NULL. Ignored for unchecked requests. + * + * Returns the reply to the given request or returns null in the event of + * errors. Blocks until the reply or error for the request arrives, or an I/O + * error occurs. + * + * Unlike its xcb_wait_for_reply() counterpart, the given sequence number is not + * automatically "widened" to 64-bit. + */ +void *xcb_wait_for_reply64(xcb_connection_t *c, uint64_t request, xcb_generic_error_t **e); + +/** + * @brief Poll for the reply of a given request. + * @param c The connection to the X server. + * @param request Sequence number of the request as returned by xcb_send_request(). + * @param reply Location to store the reply in, must not be NULL. + * @param error Location to store errors in, or NULL. Ignored for unchecked requests. + * @return 1 when the reply to the request was returned, else 0. + * + * Checks if the reply to the given request already received. Does not block. + */ +int xcb_poll_for_reply(xcb_connection_t *c, unsigned int request, void **reply, xcb_generic_error_t **error); + +/** + * @brief Poll for the reply of a given request, with 64-bit sequence number. + * @param c The connection to the X server. + * @param request 64-bit sequence number of the request as returned by xcb_send_request(). + * @param reply Location to store the reply in, must not be NULL. + * @param error Location to store errors in, or NULL. Ignored for unchecked requests. + * @return 1 when the reply to the request was returned, else 0. + * + * Checks if the reply to the given request already received. Does not block. + * + * Unlike its xcb_poll_for_reply() counterpart, the given sequence number is not + * automatically "widened" to 64-bit. + */ +int xcb_poll_for_reply64(xcb_connection_t *c, uint64_t request, void **reply, xcb_generic_error_t **error); + +/** + * @brief Don't use this, only needed by the generated code. + * @param c The connection to the X server. + * @param reply A reply that was received from the server + * @param replylen The size of the reply. + * @return Pointer to the location where received file descriptors are stored. + */ +int *xcb_get_reply_fds(xcb_connection_t *c, void *reply, size_t replylen); + + +/* xcb_util.c */ + +/** + * @param mask The mask to check + * @return The number of set bits in the mask + */ +int xcb_popcount(uint32_t mask); + +/** + * @param list The base of an array + * @param len The length of the array + * @return The sum of all entries in the array. + */ +int xcb_sumof(uint8_t *list, int len); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/include/xcb/xevie.h b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/include/xcb/xevie.h new file mode 100644 index 0000000000000000000000000000000000000000..d6b78253c02517a49780d80df0c456d000f17490 --- /dev/null +++ b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/include/xcb/xevie.h @@ -0,0 +1,473 @@ +/* + * This file generated automatically from xevie.xml by c_client.py. + * Edit at your peril. + */ + +/** + * @defgroup XCB_Xevie_API XCB Xevie API + * @brief Xevie XCB Protocol Implementation. + * @{ + **/ + +#ifndef __XEVIE_H +#define __XEVIE_H + +#include "xcb.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#define XCB_XEVIE_MAJOR_VERSION 1 +#define XCB_XEVIE_MINOR_VERSION 0 + +extern xcb_extension_t xcb_xevie_id; + +/** + * @brief xcb_xevie_query_version_cookie_t + **/ +typedef struct xcb_xevie_query_version_cookie_t { + unsigned int sequence; +} xcb_xevie_query_version_cookie_t; + +/** Opcode for xcb_xevie_query_version. */ +#define XCB_XEVIE_QUERY_VERSION 0 + +/** + * @brief xcb_xevie_query_version_request_t + **/ +typedef struct xcb_xevie_query_version_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + uint16_t client_major_version; + uint16_t client_minor_version; +} xcb_xevie_query_version_request_t; + +/** + * @brief xcb_xevie_query_version_reply_t + **/ +typedef struct xcb_xevie_query_version_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint16_t server_major_version; + uint16_t server_minor_version; + uint8_t pad1[20]; +} xcb_xevie_query_version_reply_t; + +/** + * @brief xcb_xevie_start_cookie_t + **/ +typedef struct xcb_xevie_start_cookie_t { + unsigned int sequence; +} xcb_xevie_start_cookie_t; + +/** Opcode for xcb_xevie_start. */ +#define XCB_XEVIE_START 1 + +/** + * @brief xcb_xevie_start_request_t + **/ +typedef struct xcb_xevie_start_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + uint32_t screen; +} xcb_xevie_start_request_t; + +/** + * @brief xcb_xevie_start_reply_t + **/ +typedef struct xcb_xevie_start_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint8_t pad1[24]; +} xcb_xevie_start_reply_t; + +/** + * @brief xcb_xevie_end_cookie_t + **/ +typedef struct xcb_xevie_end_cookie_t { + unsigned int sequence; +} xcb_xevie_end_cookie_t; + +/** Opcode for xcb_xevie_end. */ +#define XCB_XEVIE_END 2 + +/** + * @brief xcb_xevie_end_request_t + **/ +typedef struct xcb_xevie_end_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + uint32_t cmap; +} xcb_xevie_end_request_t; + +/** + * @brief xcb_xevie_end_reply_t + **/ +typedef struct xcb_xevie_end_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint8_t pad1[24]; +} xcb_xevie_end_reply_t; + +typedef enum xcb_xevie_datatype_t { + XCB_XEVIE_DATATYPE_UNMODIFIED = 0, + XCB_XEVIE_DATATYPE_MODIFIED = 1 +} xcb_xevie_datatype_t; + +/** + * @brief xcb_xevie_event_t + **/ +typedef struct xcb_xevie_event_t { + uint8_t pad0[32]; +} xcb_xevie_event_t; + +/** + * @brief xcb_xevie_event_iterator_t + **/ +typedef struct xcb_xevie_event_iterator_t { + xcb_xevie_event_t *data; + int rem; + int index; +} xcb_xevie_event_iterator_t; + +/** + * @brief xcb_xevie_send_cookie_t + **/ +typedef struct xcb_xevie_send_cookie_t { + unsigned int sequence; +} xcb_xevie_send_cookie_t; + +/** Opcode for xcb_xevie_send. */ +#define XCB_XEVIE_SEND 3 + +/** + * @brief xcb_xevie_send_request_t + **/ +typedef struct xcb_xevie_send_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_xevie_event_t event; + uint32_t data_type; + uint8_t pad0[64]; +} xcb_xevie_send_request_t; + +/** + * @brief xcb_xevie_send_reply_t + **/ +typedef struct xcb_xevie_send_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint8_t pad1[24]; +} xcb_xevie_send_reply_t; + +/** + * @brief xcb_xevie_select_input_cookie_t + **/ +typedef struct xcb_xevie_select_input_cookie_t { + unsigned int sequence; +} xcb_xevie_select_input_cookie_t; + +/** Opcode for xcb_xevie_select_input. */ +#define XCB_XEVIE_SELECT_INPUT 4 + +/** + * @brief xcb_xevie_select_input_request_t + **/ +typedef struct xcb_xevie_select_input_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + uint32_t event_mask; +} xcb_xevie_select_input_request_t; + +/** + * @brief xcb_xevie_select_input_reply_t + **/ +typedef struct xcb_xevie_select_input_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint8_t pad1[24]; +} xcb_xevie_select_input_reply_t; + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_xevie_query_version_cookie_t +xcb_xevie_query_version (xcb_connection_t *c, + uint16_t client_major_version, + uint16_t client_minor_version); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_xevie_query_version_cookie_t +xcb_xevie_query_version_unchecked (xcb_connection_t *c, + uint16_t client_major_version, + uint16_t client_minor_version); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_xevie_query_version_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_xevie_query_version_reply_t * +xcb_xevie_query_version_reply (xcb_connection_t *c, + xcb_xevie_query_version_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_xevie_start_cookie_t +xcb_xevie_start (xcb_connection_t *c, + uint32_t screen); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_xevie_start_cookie_t +xcb_xevie_start_unchecked (xcb_connection_t *c, + uint32_t screen); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_xevie_start_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_xevie_start_reply_t * +xcb_xevie_start_reply (xcb_connection_t *c, + xcb_xevie_start_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_xevie_end_cookie_t +xcb_xevie_end (xcb_connection_t *c, + uint32_t cmap); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_xevie_end_cookie_t +xcb_xevie_end_unchecked (xcb_connection_t *c, + uint32_t cmap); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_xevie_end_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_xevie_end_reply_t * +xcb_xevie_end_reply (xcb_connection_t *c, + xcb_xevie_end_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_xevie_event_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_xevie_event_t) + */ +void +xcb_xevie_event_next (xcb_xevie_event_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_xevie_event_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_xevie_event_end (xcb_xevie_event_iterator_t i); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_xevie_send_cookie_t +xcb_xevie_send (xcb_connection_t *c, + xcb_xevie_event_t event, + uint32_t data_type); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_xevie_send_cookie_t +xcb_xevie_send_unchecked (xcb_connection_t *c, + xcb_xevie_event_t event, + uint32_t data_type); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_xevie_send_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_xevie_send_reply_t * +xcb_xevie_send_reply (xcb_connection_t *c, + xcb_xevie_send_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_xevie_select_input_cookie_t +xcb_xevie_select_input (xcb_connection_t *c, + uint32_t event_mask); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_xevie_select_input_cookie_t +xcb_xevie_select_input_unchecked (xcb_connection_t *c, + uint32_t event_mask); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_xevie_select_input_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_xevie_select_input_reply_t * +xcb_xevie_select_input_reply (xcb_connection_t *c, + xcb_xevie_select_input_cookie_t cookie /**< */, + xcb_generic_error_t **e); + + +#ifdef __cplusplus +} +#endif + +#endif + +/** + * @} + */ diff --git a/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/include/xcb/xf86dri.h b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/include/xcb/xf86dri.h new file mode 100644 index 0000000000000000000000000000000000000000..fbe1b0e1b0dce43d55437ea69223918fcea46a2a --- /dev/null +++ b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/include/xcb/xf86dri.h @@ -0,0 +1,988 @@ +/* + * This file generated automatically from xf86dri.xml by c_client.py. + * Edit at your peril. + */ + +/** + * @defgroup XCB_XF86Dri_API XCB XF86Dri API + * @brief XF86Dri XCB Protocol Implementation. + * @{ + **/ + +#ifndef __XF86DRI_H +#define __XF86DRI_H + +#include "xcb.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#define XCB_XF86DRI_MAJOR_VERSION 4 +#define XCB_XF86DRI_MINOR_VERSION 1 + +extern xcb_extension_t xcb_xf86dri_id; + +/** + * @brief xcb_xf86dri_drm_clip_rect_t + **/ +typedef struct xcb_xf86dri_drm_clip_rect_t { + int16_t x1; + int16_t y1; + int16_t x2; + int16_t x3; +} xcb_xf86dri_drm_clip_rect_t; + +/** + * @brief xcb_xf86dri_drm_clip_rect_iterator_t + **/ +typedef struct xcb_xf86dri_drm_clip_rect_iterator_t { + xcb_xf86dri_drm_clip_rect_t *data; + int rem; + int index; +} xcb_xf86dri_drm_clip_rect_iterator_t; + +/** + * @brief xcb_xf86dri_query_version_cookie_t + **/ +typedef struct xcb_xf86dri_query_version_cookie_t { + unsigned int sequence; +} xcb_xf86dri_query_version_cookie_t; + +/** Opcode for xcb_xf86dri_query_version. */ +#define XCB_XF86DRI_QUERY_VERSION 0 + +/** + * @brief xcb_xf86dri_query_version_request_t + **/ +typedef struct xcb_xf86dri_query_version_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; +} xcb_xf86dri_query_version_request_t; + +/** + * @brief xcb_xf86dri_query_version_reply_t + **/ +typedef struct xcb_xf86dri_query_version_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint16_t dri_major_version; + uint16_t dri_minor_version; + uint32_t dri_minor_patch; +} xcb_xf86dri_query_version_reply_t; + +/** + * @brief xcb_xf86dri_query_direct_rendering_capable_cookie_t + **/ +typedef struct xcb_xf86dri_query_direct_rendering_capable_cookie_t { + unsigned int sequence; +} xcb_xf86dri_query_direct_rendering_capable_cookie_t; + +/** Opcode for xcb_xf86dri_query_direct_rendering_capable. */ +#define XCB_XF86DRI_QUERY_DIRECT_RENDERING_CAPABLE 1 + +/** + * @brief xcb_xf86dri_query_direct_rendering_capable_request_t + **/ +typedef struct xcb_xf86dri_query_direct_rendering_capable_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + uint32_t screen; +} xcb_xf86dri_query_direct_rendering_capable_request_t; + +/** + * @brief xcb_xf86dri_query_direct_rendering_capable_reply_t + **/ +typedef struct xcb_xf86dri_query_direct_rendering_capable_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint8_t is_capable; +} xcb_xf86dri_query_direct_rendering_capable_reply_t; + +/** + * @brief xcb_xf86dri_open_connection_cookie_t + **/ +typedef struct xcb_xf86dri_open_connection_cookie_t { + unsigned int sequence; +} xcb_xf86dri_open_connection_cookie_t; + +/** Opcode for xcb_xf86dri_open_connection. */ +#define XCB_XF86DRI_OPEN_CONNECTION 2 + +/** + * @brief xcb_xf86dri_open_connection_request_t + **/ +typedef struct xcb_xf86dri_open_connection_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + uint32_t screen; +} xcb_xf86dri_open_connection_request_t; + +/** + * @brief xcb_xf86dri_open_connection_reply_t + **/ +typedef struct xcb_xf86dri_open_connection_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint32_t sarea_handle_low; + uint32_t sarea_handle_high; + uint32_t bus_id_len; + uint8_t pad1[12]; +} xcb_xf86dri_open_connection_reply_t; + +/** Opcode for xcb_xf86dri_close_connection. */ +#define XCB_XF86DRI_CLOSE_CONNECTION 3 + +/** + * @brief xcb_xf86dri_close_connection_request_t + **/ +typedef struct xcb_xf86dri_close_connection_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + uint32_t screen; +} xcb_xf86dri_close_connection_request_t; + +/** + * @brief xcb_xf86dri_get_client_driver_name_cookie_t + **/ +typedef struct xcb_xf86dri_get_client_driver_name_cookie_t { + unsigned int sequence; +} xcb_xf86dri_get_client_driver_name_cookie_t; + +/** Opcode for xcb_xf86dri_get_client_driver_name. */ +#define XCB_XF86DRI_GET_CLIENT_DRIVER_NAME 4 + +/** + * @brief xcb_xf86dri_get_client_driver_name_request_t + **/ +typedef struct xcb_xf86dri_get_client_driver_name_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + uint32_t screen; +} xcb_xf86dri_get_client_driver_name_request_t; + +/** + * @brief xcb_xf86dri_get_client_driver_name_reply_t + **/ +typedef struct xcb_xf86dri_get_client_driver_name_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint32_t client_driver_major_version; + uint32_t client_driver_minor_version; + uint32_t client_driver_patch_version; + uint32_t client_driver_name_len; + uint8_t pad1[8]; +} xcb_xf86dri_get_client_driver_name_reply_t; + +/** + * @brief xcb_xf86dri_create_context_cookie_t + **/ +typedef struct xcb_xf86dri_create_context_cookie_t { + unsigned int sequence; +} xcb_xf86dri_create_context_cookie_t; + +/** Opcode for xcb_xf86dri_create_context. */ +#define XCB_XF86DRI_CREATE_CONTEXT 5 + +/** + * @brief xcb_xf86dri_create_context_request_t + **/ +typedef struct xcb_xf86dri_create_context_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + uint32_t screen; + uint32_t visual; + uint32_t context; +} xcb_xf86dri_create_context_request_t; + +/** + * @brief xcb_xf86dri_create_context_reply_t + **/ +typedef struct xcb_xf86dri_create_context_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint32_t hw_context; +} xcb_xf86dri_create_context_reply_t; + +/** Opcode for xcb_xf86dri_destroy_context. */ +#define XCB_XF86DRI_DESTROY_CONTEXT 6 + +/** + * @brief xcb_xf86dri_destroy_context_request_t + **/ +typedef struct xcb_xf86dri_destroy_context_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + uint32_t screen; + uint32_t context; +} xcb_xf86dri_destroy_context_request_t; + +/** + * @brief xcb_xf86dri_create_drawable_cookie_t + **/ +typedef struct xcb_xf86dri_create_drawable_cookie_t { + unsigned int sequence; +} xcb_xf86dri_create_drawable_cookie_t; + +/** Opcode for xcb_xf86dri_create_drawable. */ +#define XCB_XF86DRI_CREATE_DRAWABLE 7 + +/** + * @brief xcb_xf86dri_create_drawable_request_t + **/ +typedef struct xcb_xf86dri_create_drawable_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + uint32_t screen; + uint32_t drawable; +} xcb_xf86dri_create_drawable_request_t; + +/** + * @brief xcb_xf86dri_create_drawable_reply_t + **/ +typedef struct xcb_xf86dri_create_drawable_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint32_t hw_drawable_handle; +} xcb_xf86dri_create_drawable_reply_t; + +/** Opcode for xcb_xf86dri_destroy_drawable. */ +#define XCB_XF86DRI_DESTROY_DRAWABLE 8 + +/** + * @brief xcb_xf86dri_destroy_drawable_request_t + **/ +typedef struct xcb_xf86dri_destroy_drawable_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + uint32_t screen; + uint32_t drawable; +} xcb_xf86dri_destroy_drawable_request_t; + +/** + * @brief xcb_xf86dri_get_drawable_info_cookie_t + **/ +typedef struct xcb_xf86dri_get_drawable_info_cookie_t { + unsigned int sequence; +} xcb_xf86dri_get_drawable_info_cookie_t; + +/** Opcode for xcb_xf86dri_get_drawable_info. */ +#define XCB_XF86DRI_GET_DRAWABLE_INFO 9 + +/** + * @brief xcb_xf86dri_get_drawable_info_request_t + **/ +typedef struct xcb_xf86dri_get_drawable_info_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + uint32_t screen; + uint32_t drawable; +} xcb_xf86dri_get_drawable_info_request_t; + +/** + * @brief xcb_xf86dri_get_drawable_info_reply_t + **/ +typedef struct xcb_xf86dri_get_drawable_info_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint32_t drawable_table_index; + uint32_t drawable_table_stamp; + int16_t drawable_origin_X; + int16_t drawable_origin_Y; + int16_t drawable_size_W; + int16_t drawable_size_H; + uint32_t num_clip_rects; + int16_t back_x; + int16_t back_y; + uint32_t num_back_clip_rects; +} xcb_xf86dri_get_drawable_info_reply_t; + +/** + * @brief xcb_xf86dri_get_device_info_cookie_t + **/ +typedef struct xcb_xf86dri_get_device_info_cookie_t { + unsigned int sequence; +} xcb_xf86dri_get_device_info_cookie_t; + +/** Opcode for xcb_xf86dri_get_device_info. */ +#define XCB_XF86DRI_GET_DEVICE_INFO 10 + +/** + * @brief xcb_xf86dri_get_device_info_request_t + **/ +typedef struct xcb_xf86dri_get_device_info_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + uint32_t screen; +} xcb_xf86dri_get_device_info_request_t; + +/** + * @brief xcb_xf86dri_get_device_info_reply_t + **/ +typedef struct xcb_xf86dri_get_device_info_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint32_t framebuffer_handle_low; + uint32_t framebuffer_handle_high; + uint32_t framebuffer_origin_offset; + uint32_t framebuffer_size; + uint32_t framebuffer_stride; + uint32_t device_private_size; +} xcb_xf86dri_get_device_info_reply_t; + +/** + * @brief xcb_xf86dri_auth_connection_cookie_t + **/ +typedef struct xcb_xf86dri_auth_connection_cookie_t { + unsigned int sequence; +} xcb_xf86dri_auth_connection_cookie_t; + +/** Opcode for xcb_xf86dri_auth_connection. */ +#define XCB_XF86DRI_AUTH_CONNECTION 11 + +/** + * @brief xcb_xf86dri_auth_connection_request_t + **/ +typedef struct xcb_xf86dri_auth_connection_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + uint32_t screen; + uint32_t magic; +} xcb_xf86dri_auth_connection_request_t; + +/** + * @brief xcb_xf86dri_auth_connection_reply_t + **/ +typedef struct xcb_xf86dri_auth_connection_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint32_t authenticated; +} xcb_xf86dri_auth_connection_reply_t; + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_xf86dri_drm_clip_rect_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_xf86dri_drm_clip_rect_t) + */ +void +xcb_xf86dri_drm_clip_rect_next (xcb_xf86dri_drm_clip_rect_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_xf86dri_drm_clip_rect_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_xf86dri_drm_clip_rect_end (xcb_xf86dri_drm_clip_rect_iterator_t i); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_xf86dri_query_version_cookie_t +xcb_xf86dri_query_version (xcb_connection_t *c); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_xf86dri_query_version_cookie_t +xcb_xf86dri_query_version_unchecked (xcb_connection_t *c); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_xf86dri_query_version_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_xf86dri_query_version_reply_t * +xcb_xf86dri_query_version_reply (xcb_connection_t *c, + xcb_xf86dri_query_version_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_xf86dri_query_direct_rendering_capable_cookie_t +xcb_xf86dri_query_direct_rendering_capable (xcb_connection_t *c, + uint32_t screen); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_xf86dri_query_direct_rendering_capable_cookie_t +xcb_xf86dri_query_direct_rendering_capable_unchecked (xcb_connection_t *c, + uint32_t screen); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_xf86dri_query_direct_rendering_capable_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_xf86dri_query_direct_rendering_capable_reply_t * +xcb_xf86dri_query_direct_rendering_capable_reply (xcb_connection_t *c, + xcb_xf86dri_query_direct_rendering_capable_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_xf86dri_open_connection_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_xf86dri_open_connection_cookie_t +xcb_xf86dri_open_connection (xcb_connection_t *c, + uint32_t screen); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_xf86dri_open_connection_cookie_t +xcb_xf86dri_open_connection_unchecked (xcb_connection_t *c, + uint32_t screen); + +char * +xcb_xf86dri_open_connection_bus_id (const xcb_xf86dri_open_connection_reply_t *R); + +int +xcb_xf86dri_open_connection_bus_id_length (const xcb_xf86dri_open_connection_reply_t *R); + +xcb_generic_iterator_t +xcb_xf86dri_open_connection_bus_id_end (const xcb_xf86dri_open_connection_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_xf86dri_open_connection_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_xf86dri_open_connection_reply_t * +xcb_xf86dri_open_connection_reply (xcb_connection_t *c, + xcb_xf86dri_open_connection_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_xf86dri_close_connection_checked (xcb_connection_t *c, + uint32_t screen); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_xf86dri_close_connection (xcb_connection_t *c, + uint32_t screen); + +int +xcb_xf86dri_get_client_driver_name_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_xf86dri_get_client_driver_name_cookie_t +xcb_xf86dri_get_client_driver_name (xcb_connection_t *c, + uint32_t screen); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_xf86dri_get_client_driver_name_cookie_t +xcb_xf86dri_get_client_driver_name_unchecked (xcb_connection_t *c, + uint32_t screen); + +char * +xcb_xf86dri_get_client_driver_name_client_driver_name (const xcb_xf86dri_get_client_driver_name_reply_t *R); + +int +xcb_xf86dri_get_client_driver_name_client_driver_name_length (const xcb_xf86dri_get_client_driver_name_reply_t *R); + +xcb_generic_iterator_t +xcb_xf86dri_get_client_driver_name_client_driver_name_end (const xcb_xf86dri_get_client_driver_name_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_xf86dri_get_client_driver_name_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_xf86dri_get_client_driver_name_reply_t * +xcb_xf86dri_get_client_driver_name_reply (xcb_connection_t *c, + xcb_xf86dri_get_client_driver_name_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_xf86dri_create_context_cookie_t +xcb_xf86dri_create_context (xcb_connection_t *c, + uint32_t screen, + uint32_t visual, + uint32_t context); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_xf86dri_create_context_cookie_t +xcb_xf86dri_create_context_unchecked (xcb_connection_t *c, + uint32_t screen, + uint32_t visual, + uint32_t context); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_xf86dri_create_context_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_xf86dri_create_context_reply_t * +xcb_xf86dri_create_context_reply (xcb_connection_t *c, + xcb_xf86dri_create_context_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_xf86dri_destroy_context_checked (xcb_connection_t *c, + uint32_t screen, + uint32_t context); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_xf86dri_destroy_context (xcb_connection_t *c, + uint32_t screen, + uint32_t context); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_xf86dri_create_drawable_cookie_t +xcb_xf86dri_create_drawable (xcb_connection_t *c, + uint32_t screen, + uint32_t drawable); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_xf86dri_create_drawable_cookie_t +xcb_xf86dri_create_drawable_unchecked (xcb_connection_t *c, + uint32_t screen, + uint32_t drawable); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_xf86dri_create_drawable_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_xf86dri_create_drawable_reply_t * +xcb_xf86dri_create_drawable_reply (xcb_connection_t *c, + xcb_xf86dri_create_drawable_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_xf86dri_destroy_drawable_checked (xcb_connection_t *c, + uint32_t screen, + uint32_t drawable); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_xf86dri_destroy_drawable (xcb_connection_t *c, + uint32_t screen, + uint32_t drawable); + +int +xcb_xf86dri_get_drawable_info_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_xf86dri_get_drawable_info_cookie_t +xcb_xf86dri_get_drawable_info (xcb_connection_t *c, + uint32_t screen, + uint32_t drawable); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_xf86dri_get_drawable_info_cookie_t +xcb_xf86dri_get_drawable_info_unchecked (xcb_connection_t *c, + uint32_t screen, + uint32_t drawable); + +xcb_xf86dri_drm_clip_rect_t * +xcb_xf86dri_get_drawable_info_clip_rects (const xcb_xf86dri_get_drawable_info_reply_t *R); + +int +xcb_xf86dri_get_drawable_info_clip_rects_length (const xcb_xf86dri_get_drawable_info_reply_t *R); + +xcb_xf86dri_drm_clip_rect_iterator_t +xcb_xf86dri_get_drawable_info_clip_rects_iterator (const xcb_xf86dri_get_drawable_info_reply_t *R); + +xcb_xf86dri_drm_clip_rect_t * +xcb_xf86dri_get_drawable_info_back_clip_rects (const xcb_xf86dri_get_drawable_info_reply_t *R); + +int +xcb_xf86dri_get_drawable_info_back_clip_rects_length (const xcb_xf86dri_get_drawable_info_reply_t *R); + +xcb_xf86dri_drm_clip_rect_iterator_t +xcb_xf86dri_get_drawable_info_back_clip_rects_iterator (const xcb_xf86dri_get_drawable_info_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_xf86dri_get_drawable_info_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_xf86dri_get_drawable_info_reply_t * +xcb_xf86dri_get_drawable_info_reply (xcb_connection_t *c, + xcb_xf86dri_get_drawable_info_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_xf86dri_get_device_info_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_xf86dri_get_device_info_cookie_t +xcb_xf86dri_get_device_info (xcb_connection_t *c, + uint32_t screen); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_xf86dri_get_device_info_cookie_t +xcb_xf86dri_get_device_info_unchecked (xcb_connection_t *c, + uint32_t screen); + +uint32_t * +xcb_xf86dri_get_device_info_device_private (const xcb_xf86dri_get_device_info_reply_t *R); + +int +xcb_xf86dri_get_device_info_device_private_length (const xcb_xf86dri_get_device_info_reply_t *R); + +xcb_generic_iterator_t +xcb_xf86dri_get_device_info_device_private_end (const xcb_xf86dri_get_device_info_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_xf86dri_get_device_info_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_xf86dri_get_device_info_reply_t * +xcb_xf86dri_get_device_info_reply (xcb_connection_t *c, + xcb_xf86dri_get_device_info_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_xf86dri_auth_connection_cookie_t +xcb_xf86dri_auth_connection (xcb_connection_t *c, + uint32_t screen, + uint32_t magic); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_xf86dri_auth_connection_cookie_t +xcb_xf86dri_auth_connection_unchecked (xcb_connection_t *c, + uint32_t screen, + uint32_t magic); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_xf86dri_auth_connection_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_xf86dri_auth_connection_reply_t * +xcb_xf86dri_auth_connection_reply (xcb_connection_t *c, + xcb_xf86dri_auth_connection_cookie_t cookie /**< */, + xcb_generic_error_t **e); + + +#ifdef __cplusplus +} +#endif + +#endif + +/** + * @} + */ diff --git a/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/include/xcb/xfixes.h b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/include/xcb/xfixes.h new file mode 100644 index 0000000000000000000000000000000000000000..574b15def8b4c5d4289d703c80c6810063949eb4 --- /dev/null +++ b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/include/xcb/xfixes.h @@ -0,0 +1,2140 @@ +/* + * This file generated automatically from xfixes.xml by c_client.py. + * Edit at your peril. + */ + +/** + * @defgroup XCB_XFixes_API XCB XFixes API + * @brief XFixes XCB Protocol Implementation. + * @{ + **/ + +#ifndef __XFIXES_H +#define __XFIXES_H + +#include "xcb.h" +#include "xproto.h" +#include "render.h" +#include "shape.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#define XCB_XFIXES_MAJOR_VERSION 6 +#define XCB_XFIXES_MINOR_VERSION 0 + +extern xcb_extension_t xcb_xfixes_id; + +/** + * @brief xcb_xfixes_query_version_cookie_t + **/ +typedef struct xcb_xfixes_query_version_cookie_t { + unsigned int sequence; +} xcb_xfixes_query_version_cookie_t; + +/** Opcode for xcb_xfixes_query_version. */ +#define XCB_XFIXES_QUERY_VERSION 0 + +/** + * @brief xcb_xfixes_query_version_request_t + **/ +typedef struct xcb_xfixes_query_version_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + uint32_t client_major_version; + uint32_t client_minor_version; +} xcb_xfixes_query_version_request_t; + +/** + * @brief xcb_xfixes_query_version_reply_t + **/ +typedef struct xcb_xfixes_query_version_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint32_t major_version; + uint32_t minor_version; + uint8_t pad1[16]; +} xcb_xfixes_query_version_reply_t; + +typedef enum xcb_xfixes_save_set_mode_t { + XCB_XFIXES_SAVE_SET_MODE_INSERT = 0, + XCB_XFIXES_SAVE_SET_MODE_DELETE = 1 +} xcb_xfixes_save_set_mode_t; + +typedef enum xcb_xfixes_save_set_target_t { + XCB_XFIXES_SAVE_SET_TARGET_NEAREST = 0, + XCB_XFIXES_SAVE_SET_TARGET_ROOT = 1 +} xcb_xfixes_save_set_target_t; + +typedef enum xcb_xfixes_save_set_mapping_t { + XCB_XFIXES_SAVE_SET_MAPPING_MAP = 0, + XCB_XFIXES_SAVE_SET_MAPPING_UNMAP = 1 +} xcb_xfixes_save_set_mapping_t; + +/** Opcode for xcb_xfixes_change_save_set. */ +#define XCB_XFIXES_CHANGE_SAVE_SET 1 + +/** + * @brief xcb_xfixes_change_save_set_request_t + **/ +typedef struct xcb_xfixes_change_save_set_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + uint8_t mode; + uint8_t target; + uint8_t map; + uint8_t pad0; + xcb_window_t window; +} xcb_xfixes_change_save_set_request_t; + +typedef enum xcb_xfixes_selection_event_t { + XCB_XFIXES_SELECTION_EVENT_SET_SELECTION_OWNER = 0, + XCB_XFIXES_SELECTION_EVENT_SELECTION_WINDOW_DESTROY = 1, + XCB_XFIXES_SELECTION_EVENT_SELECTION_CLIENT_CLOSE = 2 +} xcb_xfixes_selection_event_t; + +typedef enum xcb_xfixes_selection_event_mask_t { + XCB_XFIXES_SELECTION_EVENT_MASK_SET_SELECTION_OWNER = 1, + XCB_XFIXES_SELECTION_EVENT_MASK_SELECTION_WINDOW_DESTROY = 2, + XCB_XFIXES_SELECTION_EVENT_MASK_SELECTION_CLIENT_CLOSE = 4 +} xcb_xfixes_selection_event_mask_t; + +/** Opcode for xcb_xfixes_selection_notify. */ +#define XCB_XFIXES_SELECTION_NOTIFY 0 + +/** + * @brief xcb_xfixes_selection_notify_event_t + **/ +typedef struct xcb_xfixes_selection_notify_event_t { + uint8_t response_type; + uint8_t subtype; + uint16_t sequence; + xcb_window_t window; + xcb_window_t owner; + xcb_atom_t selection; + xcb_timestamp_t timestamp; + xcb_timestamp_t selection_timestamp; + uint8_t pad0[8]; +} xcb_xfixes_selection_notify_event_t; + +/** Opcode for xcb_xfixes_select_selection_input. */ +#define XCB_XFIXES_SELECT_SELECTION_INPUT 2 + +/** + * @brief xcb_xfixes_select_selection_input_request_t + **/ +typedef struct xcb_xfixes_select_selection_input_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_window_t window; + xcb_atom_t selection; + uint32_t event_mask; +} xcb_xfixes_select_selection_input_request_t; + +typedef enum xcb_xfixes_cursor_notify_t { + XCB_XFIXES_CURSOR_NOTIFY_DISPLAY_CURSOR = 0 +} xcb_xfixes_cursor_notify_t; + +typedef enum xcb_xfixes_cursor_notify_mask_t { + XCB_XFIXES_CURSOR_NOTIFY_MASK_DISPLAY_CURSOR = 1 +} xcb_xfixes_cursor_notify_mask_t; + +/** Opcode for xcb_xfixes_cursor_notify. */ +#define XCB_XFIXES_CURSOR_NOTIFY 1 + +/** + * @brief xcb_xfixes_cursor_notify_event_t + **/ +typedef struct xcb_xfixes_cursor_notify_event_t { + uint8_t response_type; + uint8_t subtype; + uint16_t sequence; + xcb_window_t window; + uint32_t cursor_serial; + xcb_timestamp_t timestamp; + xcb_atom_t name; + uint8_t pad0[12]; +} xcb_xfixes_cursor_notify_event_t; + +/** Opcode for xcb_xfixes_select_cursor_input. */ +#define XCB_XFIXES_SELECT_CURSOR_INPUT 3 + +/** + * @brief xcb_xfixes_select_cursor_input_request_t + **/ +typedef struct xcb_xfixes_select_cursor_input_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_window_t window; + uint32_t event_mask; +} xcb_xfixes_select_cursor_input_request_t; + +/** + * @brief xcb_xfixes_get_cursor_image_cookie_t + **/ +typedef struct xcb_xfixes_get_cursor_image_cookie_t { + unsigned int sequence; +} xcb_xfixes_get_cursor_image_cookie_t; + +/** Opcode for xcb_xfixes_get_cursor_image. */ +#define XCB_XFIXES_GET_CURSOR_IMAGE 4 + +/** + * @brief xcb_xfixes_get_cursor_image_request_t + **/ +typedef struct xcb_xfixes_get_cursor_image_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; +} xcb_xfixes_get_cursor_image_request_t; + +/** + * @brief xcb_xfixes_get_cursor_image_reply_t + **/ +typedef struct xcb_xfixes_get_cursor_image_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + int16_t x; + int16_t y; + uint16_t width; + uint16_t height; + uint16_t xhot; + uint16_t yhot; + uint32_t cursor_serial; + uint8_t pad1[8]; +} xcb_xfixes_get_cursor_image_reply_t; + +typedef uint32_t xcb_xfixes_region_t; + +/** + * @brief xcb_xfixes_region_iterator_t + **/ +typedef struct xcb_xfixes_region_iterator_t { + xcb_xfixes_region_t *data; + int rem; + int index; +} xcb_xfixes_region_iterator_t; + +/** Opcode for xcb_xfixes_bad_region. */ +#define XCB_XFIXES_BAD_REGION 0 + +/** + * @brief xcb_xfixes_bad_region_error_t + **/ +typedef struct xcb_xfixes_bad_region_error_t { + uint8_t response_type; + uint8_t error_code; + uint16_t sequence; + uint32_t bad_value; + uint16_t minor_opcode; + uint8_t major_opcode; +} xcb_xfixes_bad_region_error_t; + +typedef enum xcb_xfixes_region_enum_t { + XCB_XFIXES_REGION_NONE = 0 +} xcb_xfixes_region_enum_t; + +/** Opcode for xcb_xfixes_create_region. */ +#define XCB_XFIXES_CREATE_REGION 5 + +/** + * @brief xcb_xfixes_create_region_request_t + **/ +typedef struct xcb_xfixes_create_region_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_xfixes_region_t region; +} xcb_xfixes_create_region_request_t; + +/** Opcode for xcb_xfixes_create_region_from_bitmap. */ +#define XCB_XFIXES_CREATE_REGION_FROM_BITMAP 6 + +/** + * @brief xcb_xfixes_create_region_from_bitmap_request_t + **/ +typedef struct xcb_xfixes_create_region_from_bitmap_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_xfixes_region_t region; + xcb_pixmap_t bitmap; +} xcb_xfixes_create_region_from_bitmap_request_t; + +/** Opcode for xcb_xfixes_create_region_from_window. */ +#define XCB_XFIXES_CREATE_REGION_FROM_WINDOW 7 + +/** + * @brief xcb_xfixes_create_region_from_window_request_t + **/ +typedef struct xcb_xfixes_create_region_from_window_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_xfixes_region_t region; + xcb_window_t window; + xcb_shape_kind_t kind; + uint8_t pad0[3]; +} xcb_xfixes_create_region_from_window_request_t; + +/** Opcode for xcb_xfixes_create_region_from_gc. */ +#define XCB_XFIXES_CREATE_REGION_FROM_GC 8 + +/** + * @brief xcb_xfixes_create_region_from_gc_request_t + **/ +typedef struct xcb_xfixes_create_region_from_gc_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_xfixes_region_t region; + xcb_gcontext_t gc; +} xcb_xfixes_create_region_from_gc_request_t; + +/** Opcode for xcb_xfixes_create_region_from_picture. */ +#define XCB_XFIXES_CREATE_REGION_FROM_PICTURE 9 + +/** + * @brief xcb_xfixes_create_region_from_picture_request_t + **/ +typedef struct xcb_xfixes_create_region_from_picture_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_xfixes_region_t region; + xcb_render_picture_t picture; +} xcb_xfixes_create_region_from_picture_request_t; + +/** Opcode for xcb_xfixes_destroy_region. */ +#define XCB_XFIXES_DESTROY_REGION 10 + +/** + * @brief xcb_xfixes_destroy_region_request_t + **/ +typedef struct xcb_xfixes_destroy_region_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_xfixes_region_t region; +} xcb_xfixes_destroy_region_request_t; + +/** Opcode for xcb_xfixes_set_region. */ +#define XCB_XFIXES_SET_REGION 11 + +/** + * @brief xcb_xfixes_set_region_request_t + **/ +typedef struct xcb_xfixes_set_region_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_xfixes_region_t region; +} xcb_xfixes_set_region_request_t; + +/** Opcode for xcb_xfixes_copy_region. */ +#define XCB_XFIXES_COPY_REGION 12 + +/** + * @brief xcb_xfixes_copy_region_request_t + **/ +typedef struct xcb_xfixes_copy_region_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_xfixes_region_t source; + xcb_xfixes_region_t destination; +} xcb_xfixes_copy_region_request_t; + +/** Opcode for xcb_xfixes_union_region. */ +#define XCB_XFIXES_UNION_REGION 13 + +/** + * @brief xcb_xfixes_union_region_request_t + **/ +typedef struct xcb_xfixes_union_region_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_xfixes_region_t source1; + xcb_xfixes_region_t source2; + xcb_xfixes_region_t destination; +} xcb_xfixes_union_region_request_t; + +/** Opcode for xcb_xfixes_intersect_region. */ +#define XCB_XFIXES_INTERSECT_REGION 14 + +/** + * @brief xcb_xfixes_intersect_region_request_t + **/ +typedef struct xcb_xfixes_intersect_region_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_xfixes_region_t source1; + xcb_xfixes_region_t source2; + xcb_xfixes_region_t destination; +} xcb_xfixes_intersect_region_request_t; + +/** Opcode for xcb_xfixes_subtract_region. */ +#define XCB_XFIXES_SUBTRACT_REGION 15 + +/** + * @brief xcb_xfixes_subtract_region_request_t + **/ +typedef struct xcb_xfixes_subtract_region_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_xfixes_region_t source1; + xcb_xfixes_region_t source2; + xcb_xfixes_region_t destination; +} xcb_xfixes_subtract_region_request_t; + +/** Opcode for xcb_xfixes_invert_region. */ +#define XCB_XFIXES_INVERT_REGION 16 + +/** + * @brief xcb_xfixes_invert_region_request_t + **/ +typedef struct xcb_xfixes_invert_region_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_xfixes_region_t source; + xcb_rectangle_t bounds; + xcb_xfixes_region_t destination; +} xcb_xfixes_invert_region_request_t; + +/** Opcode for xcb_xfixes_translate_region. */ +#define XCB_XFIXES_TRANSLATE_REGION 17 + +/** + * @brief xcb_xfixes_translate_region_request_t + **/ +typedef struct xcb_xfixes_translate_region_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_xfixes_region_t region; + int16_t dx; + int16_t dy; +} xcb_xfixes_translate_region_request_t; + +/** Opcode for xcb_xfixes_region_extents. */ +#define XCB_XFIXES_REGION_EXTENTS 18 + +/** + * @brief xcb_xfixes_region_extents_request_t + **/ +typedef struct xcb_xfixes_region_extents_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_xfixes_region_t source; + xcb_xfixes_region_t destination; +} xcb_xfixes_region_extents_request_t; + +/** + * @brief xcb_xfixes_fetch_region_cookie_t + **/ +typedef struct xcb_xfixes_fetch_region_cookie_t { + unsigned int sequence; +} xcb_xfixes_fetch_region_cookie_t; + +/** Opcode for xcb_xfixes_fetch_region. */ +#define XCB_XFIXES_FETCH_REGION 19 + +/** + * @brief xcb_xfixes_fetch_region_request_t + **/ +typedef struct xcb_xfixes_fetch_region_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_xfixes_region_t region; +} xcb_xfixes_fetch_region_request_t; + +/** + * @brief xcb_xfixes_fetch_region_reply_t + **/ +typedef struct xcb_xfixes_fetch_region_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + xcb_rectangle_t extents; + uint8_t pad1[16]; +} xcb_xfixes_fetch_region_reply_t; + +/** Opcode for xcb_xfixes_set_gc_clip_region. */ +#define XCB_XFIXES_SET_GC_CLIP_REGION 20 + +/** + * @brief xcb_xfixes_set_gc_clip_region_request_t + **/ +typedef struct xcb_xfixes_set_gc_clip_region_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_gcontext_t gc; + xcb_xfixes_region_t region; + int16_t x_origin; + int16_t y_origin; +} xcb_xfixes_set_gc_clip_region_request_t; + +/** Opcode for xcb_xfixes_set_window_shape_region. */ +#define XCB_XFIXES_SET_WINDOW_SHAPE_REGION 21 + +/** + * @brief xcb_xfixes_set_window_shape_region_request_t + **/ +typedef struct xcb_xfixes_set_window_shape_region_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_window_t dest; + xcb_shape_kind_t dest_kind; + uint8_t pad0[3]; + int16_t x_offset; + int16_t y_offset; + xcb_xfixes_region_t region; +} xcb_xfixes_set_window_shape_region_request_t; + +/** Opcode for xcb_xfixes_set_picture_clip_region. */ +#define XCB_XFIXES_SET_PICTURE_CLIP_REGION 22 + +/** + * @brief xcb_xfixes_set_picture_clip_region_request_t + **/ +typedef struct xcb_xfixes_set_picture_clip_region_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_render_picture_t picture; + xcb_xfixes_region_t region; + int16_t x_origin; + int16_t y_origin; +} xcb_xfixes_set_picture_clip_region_request_t; + +/** Opcode for xcb_xfixes_set_cursor_name. */ +#define XCB_XFIXES_SET_CURSOR_NAME 23 + +/** + * @brief xcb_xfixes_set_cursor_name_request_t + **/ +typedef struct xcb_xfixes_set_cursor_name_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_cursor_t cursor; + uint16_t nbytes; + uint8_t pad0[2]; +} xcb_xfixes_set_cursor_name_request_t; + +/** + * @brief xcb_xfixes_get_cursor_name_cookie_t + **/ +typedef struct xcb_xfixes_get_cursor_name_cookie_t { + unsigned int sequence; +} xcb_xfixes_get_cursor_name_cookie_t; + +/** Opcode for xcb_xfixes_get_cursor_name. */ +#define XCB_XFIXES_GET_CURSOR_NAME 24 + +/** + * @brief xcb_xfixes_get_cursor_name_request_t + **/ +typedef struct xcb_xfixes_get_cursor_name_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_cursor_t cursor; +} xcb_xfixes_get_cursor_name_request_t; + +/** + * @brief xcb_xfixes_get_cursor_name_reply_t + **/ +typedef struct xcb_xfixes_get_cursor_name_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + xcb_atom_t atom; + uint16_t nbytes; + uint8_t pad1[18]; +} xcb_xfixes_get_cursor_name_reply_t; + +/** + * @brief xcb_xfixes_get_cursor_image_and_name_cookie_t + **/ +typedef struct xcb_xfixes_get_cursor_image_and_name_cookie_t { + unsigned int sequence; +} xcb_xfixes_get_cursor_image_and_name_cookie_t; + +/** Opcode for xcb_xfixes_get_cursor_image_and_name. */ +#define XCB_XFIXES_GET_CURSOR_IMAGE_AND_NAME 25 + +/** + * @brief xcb_xfixes_get_cursor_image_and_name_request_t + **/ +typedef struct xcb_xfixes_get_cursor_image_and_name_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; +} xcb_xfixes_get_cursor_image_and_name_request_t; + +/** + * @brief xcb_xfixes_get_cursor_image_and_name_reply_t + **/ +typedef struct xcb_xfixes_get_cursor_image_and_name_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + int16_t x; + int16_t y; + uint16_t width; + uint16_t height; + uint16_t xhot; + uint16_t yhot; + uint32_t cursor_serial; + xcb_atom_t cursor_atom; + uint16_t nbytes; + uint8_t pad1[2]; +} xcb_xfixes_get_cursor_image_and_name_reply_t; + +/** Opcode for xcb_xfixes_change_cursor. */ +#define XCB_XFIXES_CHANGE_CURSOR 26 + +/** + * @brief xcb_xfixes_change_cursor_request_t + **/ +typedef struct xcb_xfixes_change_cursor_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_cursor_t source; + xcb_cursor_t destination; +} xcb_xfixes_change_cursor_request_t; + +/** Opcode for xcb_xfixes_change_cursor_by_name. */ +#define XCB_XFIXES_CHANGE_CURSOR_BY_NAME 27 + +/** + * @brief xcb_xfixes_change_cursor_by_name_request_t + **/ +typedef struct xcb_xfixes_change_cursor_by_name_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_cursor_t src; + uint16_t nbytes; + uint8_t pad0[2]; +} xcb_xfixes_change_cursor_by_name_request_t; + +/** Opcode for xcb_xfixes_expand_region. */ +#define XCB_XFIXES_EXPAND_REGION 28 + +/** + * @brief xcb_xfixes_expand_region_request_t + **/ +typedef struct xcb_xfixes_expand_region_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_xfixes_region_t source; + xcb_xfixes_region_t destination; + uint16_t left; + uint16_t right; + uint16_t top; + uint16_t bottom; +} xcb_xfixes_expand_region_request_t; + +/** Opcode for xcb_xfixes_hide_cursor. */ +#define XCB_XFIXES_HIDE_CURSOR 29 + +/** + * @brief xcb_xfixes_hide_cursor_request_t + **/ +typedef struct xcb_xfixes_hide_cursor_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_window_t window; +} xcb_xfixes_hide_cursor_request_t; + +/** Opcode for xcb_xfixes_show_cursor. */ +#define XCB_XFIXES_SHOW_CURSOR 30 + +/** + * @brief xcb_xfixes_show_cursor_request_t + **/ +typedef struct xcb_xfixes_show_cursor_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_window_t window; +} xcb_xfixes_show_cursor_request_t; + +typedef uint32_t xcb_xfixes_barrier_t; + +/** + * @brief xcb_xfixes_barrier_iterator_t + **/ +typedef struct xcb_xfixes_barrier_iterator_t { + xcb_xfixes_barrier_t *data; + int rem; + int index; +} xcb_xfixes_barrier_iterator_t; + +typedef enum xcb_xfixes_barrier_directions_t { + XCB_XFIXES_BARRIER_DIRECTIONS_POSITIVE_X = 1, + XCB_XFIXES_BARRIER_DIRECTIONS_POSITIVE_Y = 2, + XCB_XFIXES_BARRIER_DIRECTIONS_NEGATIVE_X = 4, + XCB_XFIXES_BARRIER_DIRECTIONS_NEGATIVE_Y = 8 +} xcb_xfixes_barrier_directions_t; + +/** Opcode for xcb_xfixes_create_pointer_barrier. */ +#define XCB_XFIXES_CREATE_POINTER_BARRIER 31 + +/** + * @brief xcb_xfixes_create_pointer_barrier_request_t + **/ +typedef struct xcb_xfixes_create_pointer_barrier_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_xfixes_barrier_t barrier; + xcb_window_t window; + uint16_t x1; + uint16_t y1; + uint16_t x2; + uint16_t y2; + uint32_t directions; + uint8_t pad0[2]; + uint16_t num_devices; +} xcb_xfixes_create_pointer_barrier_request_t; + +/** Opcode for xcb_xfixes_delete_pointer_barrier. */ +#define XCB_XFIXES_DELETE_POINTER_BARRIER 32 + +/** + * @brief xcb_xfixes_delete_pointer_barrier_request_t + **/ +typedef struct xcb_xfixes_delete_pointer_barrier_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_xfixes_barrier_t barrier; +} xcb_xfixes_delete_pointer_barrier_request_t; + +typedef enum xcb_xfixes_client_disconnect_flags_t { + XCB_XFIXES_CLIENT_DISCONNECT_FLAGS_DEFAULT = 0, +/**< The default behavior for regular clients: the X11 server won't terminate as long +as such clients are still connected, and should this client disconnect, the +server will continue running so long as other clients (that have not set +XFixesClientDisconnectFlagTerminate) are connected. */ + + XCB_XFIXES_CLIENT_DISCONNECT_FLAGS_TERMINATE = 1 +/**< Indicates to the X11 server that it can ignore the client and terminate itself +even though the client is still connected to the X11 server. */ + +} xcb_xfixes_client_disconnect_flags_t; + +/** Opcode for xcb_xfixes_set_client_disconnect_mode. */ +#define XCB_XFIXES_SET_CLIENT_DISCONNECT_MODE 33 + +/** + * @brief xcb_xfixes_set_client_disconnect_mode_request_t + **/ +typedef struct xcb_xfixes_set_client_disconnect_mode_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + uint32_t disconnect_mode; +} xcb_xfixes_set_client_disconnect_mode_request_t; + +/** + * @brief xcb_xfixes_get_client_disconnect_mode_cookie_t + **/ +typedef struct xcb_xfixes_get_client_disconnect_mode_cookie_t { + unsigned int sequence; +} xcb_xfixes_get_client_disconnect_mode_cookie_t; + +/** Opcode for xcb_xfixes_get_client_disconnect_mode. */ +#define XCB_XFIXES_GET_CLIENT_DISCONNECT_MODE 34 + +/** + * @brief xcb_xfixes_get_client_disconnect_mode_request_t + **/ +typedef struct xcb_xfixes_get_client_disconnect_mode_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; +} xcb_xfixes_get_client_disconnect_mode_request_t; + +/** + * @brief xcb_xfixes_get_client_disconnect_mode_reply_t + **/ +typedef struct xcb_xfixes_get_client_disconnect_mode_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint32_t disconnect_mode; + uint8_t pad1[20]; +} xcb_xfixes_get_client_disconnect_mode_reply_t; + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_xfixes_query_version_cookie_t +xcb_xfixes_query_version (xcb_connection_t *c, + uint32_t client_major_version, + uint32_t client_minor_version); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_xfixes_query_version_cookie_t +xcb_xfixes_query_version_unchecked (xcb_connection_t *c, + uint32_t client_major_version, + uint32_t client_minor_version); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_xfixes_query_version_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_xfixes_query_version_reply_t * +xcb_xfixes_query_version_reply (xcb_connection_t *c, + xcb_xfixes_query_version_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_xfixes_change_save_set_checked (xcb_connection_t *c, + uint8_t mode, + uint8_t target, + uint8_t map, + xcb_window_t window); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_xfixes_change_save_set (xcb_connection_t *c, + uint8_t mode, + uint8_t target, + uint8_t map, + xcb_window_t window); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_xfixes_select_selection_input_checked (xcb_connection_t *c, + xcb_window_t window, + xcb_atom_t selection, + uint32_t event_mask); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_xfixes_select_selection_input (xcb_connection_t *c, + xcb_window_t window, + xcb_atom_t selection, + uint32_t event_mask); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_xfixes_select_cursor_input_checked (xcb_connection_t *c, + xcb_window_t window, + uint32_t event_mask); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_xfixes_select_cursor_input (xcb_connection_t *c, + xcb_window_t window, + uint32_t event_mask); + +int +xcb_xfixes_get_cursor_image_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_xfixes_get_cursor_image_cookie_t +xcb_xfixes_get_cursor_image (xcb_connection_t *c); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_xfixes_get_cursor_image_cookie_t +xcb_xfixes_get_cursor_image_unchecked (xcb_connection_t *c); + +uint32_t * +xcb_xfixes_get_cursor_image_cursor_image (const xcb_xfixes_get_cursor_image_reply_t *R); + +int +xcb_xfixes_get_cursor_image_cursor_image_length (const xcb_xfixes_get_cursor_image_reply_t *R); + +xcb_generic_iterator_t +xcb_xfixes_get_cursor_image_cursor_image_end (const xcb_xfixes_get_cursor_image_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_xfixes_get_cursor_image_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_xfixes_get_cursor_image_reply_t * +xcb_xfixes_get_cursor_image_reply (xcb_connection_t *c, + xcb_xfixes_get_cursor_image_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_xfixes_region_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_xfixes_region_t) + */ +void +xcb_xfixes_region_next (xcb_xfixes_region_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_xfixes_region_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_xfixes_region_end (xcb_xfixes_region_iterator_t i); + +int +xcb_xfixes_create_region_sizeof (const void *_buffer, + uint32_t rectangles_len); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_xfixes_create_region_checked (xcb_connection_t *c, + xcb_xfixes_region_t region, + uint32_t rectangles_len, + const xcb_rectangle_t *rectangles); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_xfixes_create_region (xcb_connection_t *c, + xcb_xfixes_region_t region, + uint32_t rectangles_len, + const xcb_rectangle_t *rectangles); + +xcb_rectangle_t * +xcb_xfixes_create_region_rectangles (const xcb_xfixes_create_region_request_t *R); + +int +xcb_xfixes_create_region_rectangles_length (const xcb_xfixes_create_region_request_t *R); + +xcb_rectangle_iterator_t +xcb_xfixes_create_region_rectangles_iterator (const xcb_xfixes_create_region_request_t *R); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_xfixes_create_region_from_bitmap_checked (xcb_connection_t *c, + xcb_xfixes_region_t region, + xcb_pixmap_t bitmap); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_xfixes_create_region_from_bitmap (xcb_connection_t *c, + xcb_xfixes_region_t region, + xcb_pixmap_t bitmap); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_xfixes_create_region_from_window_checked (xcb_connection_t *c, + xcb_xfixes_region_t region, + xcb_window_t window, + xcb_shape_kind_t kind); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_xfixes_create_region_from_window (xcb_connection_t *c, + xcb_xfixes_region_t region, + xcb_window_t window, + xcb_shape_kind_t kind); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_xfixes_create_region_from_gc_checked (xcb_connection_t *c, + xcb_xfixes_region_t region, + xcb_gcontext_t gc); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_xfixes_create_region_from_gc (xcb_connection_t *c, + xcb_xfixes_region_t region, + xcb_gcontext_t gc); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_xfixes_create_region_from_picture_checked (xcb_connection_t *c, + xcb_xfixes_region_t region, + xcb_render_picture_t picture); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_xfixes_create_region_from_picture (xcb_connection_t *c, + xcb_xfixes_region_t region, + xcb_render_picture_t picture); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_xfixes_destroy_region_checked (xcb_connection_t *c, + xcb_xfixes_region_t region); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_xfixes_destroy_region (xcb_connection_t *c, + xcb_xfixes_region_t region); + +int +xcb_xfixes_set_region_sizeof (const void *_buffer, + uint32_t rectangles_len); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_xfixes_set_region_checked (xcb_connection_t *c, + xcb_xfixes_region_t region, + uint32_t rectangles_len, + const xcb_rectangle_t *rectangles); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_xfixes_set_region (xcb_connection_t *c, + xcb_xfixes_region_t region, + uint32_t rectangles_len, + const xcb_rectangle_t *rectangles); + +xcb_rectangle_t * +xcb_xfixes_set_region_rectangles (const xcb_xfixes_set_region_request_t *R); + +int +xcb_xfixes_set_region_rectangles_length (const xcb_xfixes_set_region_request_t *R); + +xcb_rectangle_iterator_t +xcb_xfixes_set_region_rectangles_iterator (const xcb_xfixes_set_region_request_t *R); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_xfixes_copy_region_checked (xcb_connection_t *c, + xcb_xfixes_region_t source, + xcb_xfixes_region_t destination); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_xfixes_copy_region (xcb_connection_t *c, + xcb_xfixes_region_t source, + xcb_xfixes_region_t destination); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_xfixes_union_region_checked (xcb_connection_t *c, + xcb_xfixes_region_t source1, + xcb_xfixes_region_t source2, + xcb_xfixes_region_t destination); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_xfixes_union_region (xcb_connection_t *c, + xcb_xfixes_region_t source1, + xcb_xfixes_region_t source2, + xcb_xfixes_region_t destination); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_xfixes_intersect_region_checked (xcb_connection_t *c, + xcb_xfixes_region_t source1, + xcb_xfixes_region_t source2, + xcb_xfixes_region_t destination); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_xfixes_intersect_region (xcb_connection_t *c, + xcb_xfixes_region_t source1, + xcb_xfixes_region_t source2, + xcb_xfixes_region_t destination); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_xfixes_subtract_region_checked (xcb_connection_t *c, + xcb_xfixes_region_t source1, + xcb_xfixes_region_t source2, + xcb_xfixes_region_t destination); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_xfixes_subtract_region (xcb_connection_t *c, + xcb_xfixes_region_t source1, + xcb_xfixes_region_t source2, + xcb_xfixes_region_t destination); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_xfixes_invert_region_checked (xcb_connection_t *c, + xcb_xfixes_region_t source, + xcb_rectangle_t bounds, + xcb_xfixes_region_t destination); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_xfixes_invert_region (xcb_connection_t *c, + xcb_xfixes_region_t source, + xcb_rectangle_t bounds, + xcb_xfixes_region_t destination); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_xfixes_translate_region_checked (xcb_connection_t *c, + xcb_xfixes_region_t region, + int16_t dx, + int16_t dy); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_xfixes_translate_region (xcb_connection_t *c, + xcb_xfixes_region_t region, + int16_t dx, + int16_t dy); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_xfixes_region_extents_checked (xcb_connection_t *c, + xcb_xfixes_region_t source, + xcb_xfixes_region_t destination); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_xfixes_region_extents (xcb_connection_t *c, + xcb_xfixes_region_t source, + xcb_xfixes_region_t destination); + +int +xcb_xfixes_fetch_region_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_xfixes_fetch_region_cookie_t +xcb_xfixes_fetch_region (xcb_connection_t *c, + xcb_xfixes_region_t region); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_xfixes_fetch_region_cookie_t +xcb_xfixes_fetch_region_unchecked (xcb_connection_t *c, + xcb_xfixes_region_t region); + +xcb_rectangle_t * +xcb_xfixes_fetch_region_rectangles (const xcb_xfixes_fetch_region_reply_t *R); + +int +xcb_xfixes_fetch_region_rectangles_length (const xcb_xfixes_fetch_region_reply_t *R); + +xcb_rectangle_iterator_t +xcb_xfixes_fetch_region_rectangles_iterator (const xcb_xfixes_fetch_region_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_xfixes_fetch_region_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_xfixes_fetch_region_reply_t * +xcb_xfixes_fetch_region_reply (xcb_connection_t *c, + xcb_xfixes_fetch_region_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_xfixes_set_gc_clip_region_checked (xcb_connection_t *c, + xcb_gcontext_t gc, + xcb_xfixes_region_t region, + int16_t x_origin, + int16_t y_origin); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_xfixes_set_gc_clip_region (xcb_connection_t *c, + xcb_gcontext_t gc, + xcb_xfixes_region_t region, + int16_t x_origin, + int16_t y_origin); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_xfixes_set_window_shape_region_checked (xcb_connection_t *c, + xcb_window_t dest, + xcb_shape_kind_t dest_kind, + int16_t x_offset, + int16_t y_offset, + xcb_xfixes_region_t region); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_xfixes_set_window_shape_region (xcb_connection_t *c, + xcb_window_t dest, + xcb_shape_kind_t dest_kind, + int16_t x_offset, + int16_t y_offset, + xcb_xfixes_region_t region); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_xfixes_set_picture_clip_region_checked (xcb_connection_t *c, + xcb_render_picture_t picture, + xcb_xfixes_region_t region, + int16_t x_origin, + int16_t y_origin); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_xfixes_set_picture_clip_region (xcb_connection_t *c, + xcb_render_picture_t picture, + xcb_xfixes_region_t region, + int16_t x_origin, + int16_t y_origin); + +int +xcb_xfixes_set_cursor_name_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_xfixes_set_cursor_name_checked (xcb_connection_t *c, + xcb_cursor_t cursor, + uint16_t nbytes, + const char *name); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_xfixes_set_cursor_name (xcb_connection_t *c, + xcb_cursor_t cursor, + uint16_t nbytes, + const char *name); + +char * +xcb_xfixes_set_cursor_name_name (const xcb_xfixes_set_cursor_name_request_t *R); + +int +xcb_xfixes_set_cursor_name_name_length (const xcb_xfixes_set_cursor_name_request_t *R); + +xcb_generic_iterator_t +xcb_xfixes_set_cursor_name_name_end (const xcb_xfixes_set_cursor_name_request_t *R); + +int +xcb_xfixes_get_cursor_name_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_xfixes_get_cursor_name_cookie_t +xcb_xfixes_get_cursor_name (xcb_connection_t *c, + xcb_cursor_t cursor); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_xfixes_get_cursor_name_cookie_t +xcb_xfixes_get_cursor_name_unchecked (xcb_connection_t *c, + xcb_cursor_t cursor); + +char * +xcb_xfixes_get_cursor_name_name (const xcb_xfixes_get_cursor_name_reply_t *R); + +int +xcb_xfixes_get_cursor_name_name_length (const xcb_xfixes_get_cursor_name_reply_t *R); + +xcb_generic_iterator_t +xcb_xfixes_get_cursor_name_name_end (const xcb_xfixes_get_cursor_name_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_xfixes_get_cursor_name_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_xfixes_get_cursor_name_reply_t * +xcb_xfixes_get_cursor_name_reply (xcb_connection_t *c, + xcb_xfixes_get_cursor_name_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_xfixes_get_cursor_image_and_name_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_xfixes_get_cursor_image_and_name_cookie_t +xcb_xfixes_get_cursor_image_and_name (xcb_connection_t *c); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_xfixes_get_cursor_image_and_name_cookie_t +xcb_xfixes_get_cursor_image_and_name_unchecked (xcb_connection_t *c); + +uint32_t * +xcb_xfixes_get_cursor_image_and_name_cursor_image (const xcb_xfixes_get_cursor_image_and_name_reply_t *R); + +int +xcb_xfixes_get_cursor_image_and_name_cursor_image_length (const xcb_xfixes_get_cursor_image_and_name_reply_t *R); + +xcb_generic_iterator_t +xcb_xfixes_get_cursor_image_and_name_cursor_image_end (const xcb_xfixes_get_cursor_image_and_name_reply_t *R); + +char * +xcb_xfixes_get_cursor_image_and_name_name (const xcb_xfixes_get_cursor_image_and_name_reply_t *R); + +int +xcb_xfixes_get_cursor_image_and_name_name_length (const xcb_xfixes_get_cursor_image_and_name_reply_t *R); + +xcb_generic_iterator_t +xcb_xfixes_get_cursor_image_and_name_name_end (const xcb_xfixes_get_cursor_image_and_name_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_xfixes_get_cursor_image_and_name_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_xfixes_get_cursor_image_and_name_reply_t * +xcb_xfixes_get_cursor_image_and_name_reply (xcb_connection_t *c, + xcb_xfixes_get_cursor_image_and_name_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_xfixes_change_cursor_checked (xcb_connection_t *c, + xcb_cursor_t source, + xcb_cursor_t destination); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_xfixes_change_cursor (xcb_connection_t *c, + xcb_cursor_t source, + xcb_cursor_t destination); + +int +xcb_xfixes_change_cursor_by_name_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_xfixes_change_cursor_by_name_checked (xcb_connection_t *c, + xcb_cursor_t src, + uint16_t nbytes, + const char *name); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_xfixes_change_cursor_by_name (xcb_connection_t *c, + xcb_cursor_t src, + uint16_t nbytes, + const char *name); + +char * +xcb_xfixes_change_cursor_by_name_name (const xcb_xfixes_change_cursor_by_name_request_t *R); + +int +xcb_xfixes_change_cursor_by_name_name_length (const xcb_xfixes_change_cursor_by_name_request_t *R); + +xcb_generic_iterator_t +xcb_xfixes_change_cursor_by_name_name_end (const xcb_xfixes_change_cursor_by_name_request_t *R); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_xfixes_expand_region_checked (xcb_connection_t *c, + xcb_xfixes_region_t source, + xcb_xfixes_region_t destination, + uint16_t left, + uint16_t right, + uint16_t top, + uint16_t bottom); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_xfixes_expand_region (xcb_connection_t *c, + xcb_xfixes_region_t source, + xcb_xfixes_region_t destination, + uint16_t left, + uint16_t right, + uint16_t top, + uint16_t bottom); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_xfixes_hide_cursor_checked (xcb_connection_t *c, + xcb_window_t window); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_xfixes_hide_cursor (xcb_connection_t *c, + xcb_window_t window); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_xfixes_show_cursor_checked (xcb_connection_t *c, + xcb_window_t window); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_xfixes_show_cursor (xcb_connection_t *c, + xcb_window_t window); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_xfixes_barrier_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_xfixes_barrier_t) + */ +void +xcb_xfixes_barrier_next (xcb_xfixes_barrier_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_xfixes_barrier_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_xfixes_barrier_end (xcb_xfixes_barrier_iterator_t i); + +int +xcb_xfixes_create_pointer_barrier_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_xfixes_create_pointer_barrier_checked (xcb_connection_t *c, + xcb_xfixes_barrier_t barrier, + xcb_window_t window, + uint16_t x1, + uint16_t y1, + uint16_t x2, + uint16_t y2, + uint32_t directions, + uint16_t num_devices, + const uint16_t *devices); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_xfixes_create_pointer_barrier (xcb_connection_t *c, + xcb_xfixes_barrier_t barrier, + xcb_window_t window, + uint16_t x1, + uint16_t y1, + uint16_t x2, + uint16_t y2, + uint32_t directions, + uint16_t num_devices, + const uint16_t *devices); + +uint16_t * +xcb_xfixes_create_pointer_barrier_devices (const xcb_xfixes_create_pointer_barrier_request_t *R); + +int +xcb_xfixes_create_pointer_barrier_devices_length (const xcb_xfixes_create_pointer_barrier_request_t *R); + +xcb_generic_iterator_t +xcb_xfixes_create_pointer_barrier_devices_end (const xcb_xfixes_create_pointer_barrier_request_t *R); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_xfixes_delete_pointer_barrier_checked (xcb_connection_t *c, + xcb_xfixes_barrier_t barrier); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_xfixes_delete_pointer_barrier (xcb_connection_t *c, + xcb_xfixes_barrier_t barrier); + +/** + * @brief Sets the disconnect mode for the client. + * + * @param c The connection + * @param disconnect_mode The new disconnect mode. + * @return A cookie + * + * No description yet + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_xfixes_set_client_disconnect_mode_checked (xcb_connection_t *c, + uint32_t disconnect_mode); + +/** + * @brief Sets the disconnect mode for the client. + * + * @param c The connection + * @param disconnect_mode The new disconnect mode. + * @return A cookie + * + * No description yet + * + */ +xcb_void_cookie_t +xcb_xfixes_set_client_disconnect_mode (xcb_connection_t *c, + uint32_t disconnect_mode); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_xfixes_get_client_disconnect_mode_cookie_t +xcb_xfixes_get_client_disconnect_mode (xcb_connection_t *c); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_xfixes_get_client_disconnect_mode_cookie_t +xcb_xfixes_get_client_disconnect_mode_unchecked (xcb_connection_t *c); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_xfixes_get_client_disconnect_mode_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_xfixes_get_client_disconnect_mode_reply_t * +xcb_xfixes_get_client_disconnect_mode_reply (xcb_connection_t *c, + xcb_xfixes_get_client_disconnect_mode_cookie_t cookie /**< */, + xcb_generic_error_t **e); + + +#ifdef __cplusplus +} +#endif + +#endif + +/** + * @} + */ diff --git a/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/include/xcb/xinerama.h b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/include/xcb/xinerama.h new file mode 100644 index 0000000000000000000000000000000000000000..17a82128c1fc4d51c9c3b1e56c4081ae3f86536f --- /dev/null +++ b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/include/xcb/xinerama.h @@ -0,0 +1,557 @@ +/* + * This file generated automatically from xinerama.xml by c_client.py. + * Edit at your peril. + */ + +/** + * @defgroup XCB_Xinerama_API XCB Xinerama API + * @brief Xinerama XCB Protocol Implementation. + * @{ + **/ + +#ifndef __XINERAMA_H +#define __XINERAMA_H + +#include "xcb.h" +#include "xproto.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#define XCB_XINERAMA_MAJOR_VERSION 1 +#define XCB_XINERAMA_MINOR_VERSION 1 + +extern xcb_extension_t xcb_xinerama_id; + +/** + * @brief xcb_xinerama_screen_info_t + **/ +typedef struct xcb_xinerama_screen_info_t { + int16_t x_org; + int16_t y_org; + uint16_t width; + uint16_t height; +} xcb_xinerama_screen_info_t; + +/** + * @brief xcb_xinerama_screen_info_iterator_t + **/ +typedef struct xcb_xinerama_screen_info_iterator_t { + xcb_xinerama_screen_info_t *data; + int rem; + int index; +} xcb_xinerama_screen_info_iterator_t; + +/** + * @brief xcb_xinerama_query_version_cookie_t + **/ +typedef struct xcb_xinerama_query_version_cookie_t { + unsigned int sequence; +} xcb_xinerama_query_version_cookie_t; + +/** Opcode for xcb_xinerama_query_version. */ +#define XCB_XINERAMA_QUERY_VERSION 0 + +/** + * @brief xcb_xinerama_query_version_request_t + **/ +typedef struct xcb_xinerama_query_version_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + uint8_t major; + uint8_t minor; +} xcb_xinerama_query_version_request_t; + +/** + * @brief xcb_xinerama_query_version_reply_t + **/ +typedef struct xcb_xinerama_query_version_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint16_t major; + uint16_t minor; +} xcb_xinerama_query_version_reply_t; + +/** + * @brief xcb_xinerama_get_state_cookie_t + **/ +typedef struct xcb_xinerama_get_state_cookie_t { + unsigned int sequence; +} xcb_xinerama_get_state_cookie_t; + +/** Opcode for xcb_xinerama_get_state. */ +#define XCB_XINERAMA_GET_STATE 1 + +/** + * @brief xcb_xinerama_get_state_request_t + **/ +typedef struct xcb_xinerama_get_state_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_window_t window; +} xcb_xinerama_get_state_request_t; + +/** + * @brief xcb_xinerama_get_state_reply_t + **/ +typedef struct xcb_xinerama_get_state_reply_t { + uint8_t response_type; + uint8_t state; + uint16_t sequence; + uint32_t length; + xcb_window_t window; +} xcb_xinerama_get_state_reply_t; + +/** + * @brief xcb_xinerama_get_screen_count_cookie_t + **/ +typedef struct xcb_xinerama_get_screen_count_cookie_t { + unsigned int sequence; +} xcb_xinerama_get_screen_count_cookie_t; + +/** Opcode for xcb_xinerama_get_screen_count. */ +#define XCB_XINERAMA_GET_SCREEN_COUNT 2 + +/** + * @brief xcb_xinerama_get_screen_count_request_t + **/ +typedef struct xcb_xinerama_get_screen_count_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_window_t window; +} xcb_xinerama_get_screen_count_request_t; + +/** + * @brief xcb_xinerama_get_screen_count_reply_t + **/ +typedef struct xcb_xinerama_get_screen_count_reply_t { + uint8_t response_type; + uint8_t screen_count; + uint16_t sequence; + uint32_t length; + xcb_window_t window; +} xcb_xinerama_get_screen_count_reply_t; + +/** + * @brief xcb_xinerama_get_screen_size_cookie_t + **/ +typedef struct xcb_xinerama_get_screen_size_cookie_t { + unsigned int sequence; +} xcb_xinerama_get_screen_size_cookie_t; + +/** Opcode for xcb_xinerama_get_screen_size. */ +#define XCB_XINERAMA_GET_SCREEN_SIZE 3 + +/** + * @brief xcb_xinerama_get_screen_size_request_t + **/ +typedef struct xcb_xinerama_get_screen_size_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_window_t window; + uint32_t screen; +} xcb_xinerama_get_screen_size_request_t; + +/** + * @brief xcb_xinerama_get_screen_size_reply_t + **/ +typedef struct xcb_xinerama_get_screen_size_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint32_t width; + uint32_t height; + xcb_window_t window; + uint32_t screen; +} xcb_xinerama_get_screen_size_reply_t; + +/** + * @brief xcb_xinerama_is_active_cookie_t + **/ +typedef struct xcb_xinerama_is_active_cookie_t { + unsigned int sequence; +} xcb_xinerama_is_active_cookie_t; + +/** Opcode for xcb_xinerama_is_active. */ +#define XCB_XINERAMA_IS_ACTIVE 4 + +/** + * @brief xcb_xinerama_is_active_request_t + **/ +typedef struct xcb_xinerama_is_active_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; +} xcb_xinerama_is_active_request_t; + +/** + * @brief xcb_xinerama_is_active_reply_t + **/ +typedef struct xcb_xinerama_is_active_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint32_t state; +} xcb_xinerama_is_active_reply_t; + +/** + * @brief xcb_xinerama_query_screens_cookie_t + **/ +typedef struct xcb_xinerama_query_screens_cookie_t { + unsigned int sequence; +} xcb_xinerama_query_screens_cookie_t; + +/** Opcode for xcb_xinerama_query_screens. */ +#define XCB_XINERAMA_QUERY_SCREENS 5 + +/** + * @brief xcb_xinerama_query_screens_request_t + **/ +typedef struct xcb_xinerama_query_screens_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; +} xcb_xinerama_query_screens_request_t; + +/** + * @brief xcb_xinerama_query_screens_reply_t + **/ +typedef struct xcb_xinerama_query_screens_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint32_t number; + uint8_t pad1[20]; +} xcb_xinerama_query_screens_reply_t; + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_xinerama_screen_info_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_xinerama_screen_info_t) + */ +void +xcb_xinerama_screen_info_next (xcb_xinerama_screen_info_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_xinerama_screen_info_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_xinerama_screen_info_end (xcb_xinerama_screen_info_iterator_t i); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_xinerama_query_version_cookie_t +xcb_xinerama_query_version (xcb_connection_t *c, + uint8_t major, + uint8_t minor); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_xinerama_query_version_cookie_t +xcb_xinerama_query_version_unchecked (xcb_connection_t *c, + uint8_t major, + uint8_t minor); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_xinerama_query_version_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_xinerama_query_version_reply_t * +xcb_xinerama_query_version_reply (xcb_connection_t *c, + xcb_xinerama_query_version_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_xinerama_get_state_cookie_t +xcb_xinerama_get_state (xcb_connection_t *c, + xcb_window_t window); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_xinerama_get_state_cookie_t +xcb_xinerama_get_state_unchecked (xcb_connection_t *c, + xcb_window_t window); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_xinerama_get_state_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_xinerama_get_state_reply_t * +xcb_xinerama_get_state_reply (xcb_connection_t *c, + xcb_xinerama_get_state_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_xinerama_get_screen_count_cookie_t +xcb_xinerama_get_screen_count (xcb_connection_t *c, + xcb_window_t window); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_xinerama_get_screen_count_cookie_t +xcb_xinerama_get_screen_count_unchecked (xcb_connection_t *c, + xcb_window_t window); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_xinerama_get_screen_count_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_xinerama_get_screen_count_reply_t * +xcb_xinerama_get_screen_count_reply (xcb_connection_t *c, + xcb_xinerama_get_screen_count_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_xinerama_get_screen_size_cookie_t +xcb_xinerama_get_screen_size (xcb_connection_t *c, + xcb_window_t window, + uint32_t screen); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_xinerama_get_screen_size_cookie_t +xcb_xinerama_get_screen_size_unchecked (xcb_connection_t *c, + xcb_window_t window, + uint32_t screen); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_xinerama_get_screen_size_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_xinerama_get_screen_size_reply_t * +xcb_xinerama_get_screen_size_reply (xcb_connection_t *c, + xcb_xinerama_get_screen_size_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_xinerama_is_active_cookie_t +xcb_xinerama_is_active (xcb_connection_t *c); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_xinerama_is_active_cookie_t +xcb_xinerama_is_active_unchecked (xcb_connection_t *c); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_xinerama_is_active_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_xinerama_is_active_reply_t * +xcb_xinerama_is_active_reply (xcb_connection_t *c, + xcb_xinerama_is_active_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_xinerama_query_screens_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_xinerama_query_screens_cookie_t +xcb_xinerama_query_screens (xcb_connection_t *c); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_xinerama_query_screens_cookie_t +xcb_xinerama_query_screens_unchecked (xcb_connection_t *c); + +xcb_xinerama_screen_info_t * +xcb_xinerama_query_screens_screen_info (const xcb_xinerama_query_screens_reply_t *R); + +int +xcb_xinerama_query_screens_screen_info_length (const xcb_xinerama_query_screens_reply_t *R); + +xcb_xinerama_screen_info_iterator_t +xcb_xinerama_query_screens_screen_info_iterator (const xcb_xinerama_query_screens_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_xinerama_query_screens_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_xinerama_query_screens_reply_t * +xcb_xinerama_query_screens_reply (xcb_connection_t *c, + xcb_xinerama_query_screens_cookie_t cookie /**< */, + xcb_generic_error_t **e); + + +#ifdef __cplusplus +} +#endif + +#endif + +/** + * @} + */ diff --git a/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/include/xcb/xinput.h b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/include/xcb/xinput.h new file mode 100644 index 0000000000000000000000000000000000000000..2e40be1cc8e5fa0a718bf1f644c44a6a26439092 --- /dev/null +++ b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/include/xcb/xinput.h @@ -0,0 +1,9732 @@ +/* + * This file generated automatically from xinput.xml by c_client.py. + * Edit at your peril. + */ + +/** + * @defgroup XCB_Input_API XCB Input API + * @brief Input XCB Protocol Implementation. + * @{ + **/ + +#ifndef __XINPUT_H +#define __XINPUT_H + +#include "xcb.h" +#include "xfixes.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#define XCB_INPUT_MAJOR_VERSION 2 +#define XCB_INPUT_MINOR_VERSION 4 + +extern xcb_extension_t xcb_input_id; + +typedef uint32_t xcb_input_event_class_t; + +/** + * @brief xcb_input_event_class_iterator_t + **/ +typedef struct xcb_input_event_class_iterator_t { + xcb_input_event_class_t *data; + int rem; + int index; +} xcb_input_event_class_iterator_t; + +typedef uint8_t xcb_input_key_code_t; + +/** + * @brief xcb_input_key_code_iterator_t + **/ +typedef struct xcb_input_key_code_iterator_t { + xcb_input_key_code_t *data; + int rem; + int index; +} xcb_input_key_code_iterator_t; + +typedef uint16_t xcb_input_device_id_t; + +/** + * @brief xcb_input_device_id_iterator_t + **/ +typedef struct xcb_input_device_id_iterator_t { + xcb_input_device_id_t *data; + int rem; + int index; +} xcb_input_device_id_iterator_t; + +typedef int32_t xcb_input_fp1616_t; + +/** + * @brief xcb_input_fp1616_iterator_t + **/ +typedef struct xcb_input_fp1616_iterator_t { + xcb_input_fp1616_t *data; + int rem; + int index; +} xcb_input_fp1616_iterator_t; + +/** + * @brief xcb_input_fp3232_t + **/ +typedef struct xcb_input_fp3232_t { + int32_t integral; + uint32_t frac; +} xcb_input_fp3232_t; + +/** + * @brief xcb_input_fp3232_iterator_t + **/ +typedef struct xcb_input_fp3232_iterator_t { + xcb_input_fp3232_t *data; + int rem; + int index; +} xcb_input_fp3232_iterator_t; + +/** + * @brief xcb_input_get_extension_version_cookie_t + **/ +typedef struct xcb_input_get_extension_version_cookie_t { + unsigned int sequence; +} xcb_input_get_extension_version_cookie_t; + +/** Opcode for xcb_input_get_extension_version. */ +#define XCB_INPUT_GET_EXTENSION_VERSION 1 + +/** + * @brief xcb_input_get_extension_version_request_t + **/ +typedef struct xcb_input_get_extension_version_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + uint16_t name_len; + uint8_t pad0[2]; +} xcb_input_get_extension_version_request_t; + +/** + * @brief xcb_input_get_extension_version_reply_t + **/ +typedef struct xcb_input_get_extension_version_reply_t { + uint8_t response_type; + uint8_t xi_reply_type; + uint16_t sequence; + uint32_t length; + uint16_t server_major; + uint16_t server_minor; + uint8_t present; + uint8_t pad0[19]; +} xcb_input_get_extension_version_reply_t; + +typedef enum xcb_input_device_use_t { + XCB_INPUT_DEVICE_USE_IS_X_POINTER = 0, + XCB_INPUT_DEVICE_USE_IS_X_KEYBOARD = 1, + XCB_INPUT_DEVICE_USE_IS_X_EXTENSION_DEVICE = 2, + XCB_INPUT_DEVICE_USE_IS_X_EXTENSION_KEYBOARD = 3, + XCB_INPUT_DEVICE_USE_IS_X_EXTENSION_POINTER = 4 +} xcb_input_device_use_t; + +typedef enum xcb_input_input_class_t { + XCB_INPUT_INPUT_CLASS_KEY = 0, + XCB_INPUT_INPUT_CLASS_BUTTON = 1, + XCB_INPUT_INPUT_CLASS_VALUATOR = 2, + XCB_INPUT_INPUT_CLASS_FEEDBACK = 3, + XCB_INPUT_INPUT_CLASS_PROXIMITY = 4, + XCB_INPUT_INPUT_CLASS_FOCUS = 5, + XCB_INPUT_INPUT_CLASS_OTHER = 6 +} xcb_input_input_class_t; + +typedef enum xcb_input_valuator_mode_t { + XCB_INPUT_VALUATOR_MODE_RELATIVE = 0, + XCB_INPUT_VALUATOR_MODE_ABSOLUTE = 1 +} xcb_input_valuator_mode_t; + +/** + * @brief xcb_input_device_info_t + **/ +typedef struct xcb_input_device_info_t { + xcb_atom_t device_type; + uint8_t device_id; + uint8_t num_class_info; + uint8_t device_use; + uint8_t pad0; +} xcb_input_device_info_t; + +/** + * @brief xcb_input_device_info_iterator_t + **/ +typedef struct xcb_input_device_info_iterator_t { + xcb_input_device_info_t *data; + int rem; + int index; +} xcb_input_device_info_iterator_t; + +/** + * @brief xcb_input_key_info_t + **/ +typedef struct xcb_input_key_info_t { + uint8_t class_id; + uint8_t len; + xcb_input_key_code_t min_keycode; + xcb_input_key_code_t max_keycode; + uint16_t num_keys; + uint8_t pad0[2]; +} xcb_input_key_info_t; + +/** + * @brief xcb_input_key_info_iterator_t + **/ +typedef struct xcb_input_key_info_iterator_t { + xcb_input_key_info_t *data; + int rem; + int index; +} xcb_input_key_info_iterator_t; + +/** + * @brief xcb_input_button_info_t + **/ +typedef struct xcb_input_button_info_t { + uint8_t class_id; + uint8_t len; + uint16_t num_buttons; +} xcb_input_button_info_t; + +/** + * @brief xcb_input_button_info_iterator_t + **/ +typedef struct xcb_input_button_info_iterator_t { + xcb_input_button_info_t *data; + int rem; + int index; +} xcb_input_button_info_iterator_t; + +/** + * @brief xcb_input_axis_info_t + **/ +typedef struct xcb_input_axis_info_t { + uint32_t resolution; + int32_t minimum; + int32_t maximum; +} xcb_input_axis_info_t; + +/** + * @brief xcb_input_axis_info_iterator_t + **/ +typedef struct xcb_input_axis_info_iterator_t { + xcb_input_axis_info_t *data; + int rem; + int index; +} xcb_input_axis_info_iterator_t; + +/** + * @brief xcb_input_valuator_info_t + **/ +typedef struct xcb_input_valuator_info_t { + uint8_t class_id; + uint8_t len; + uint8_t axes_len; + uint8_t mode; + uint32_t motion_size; +} xcb_input_valuator_info_t; + +/** + * @brief xcb_input_valuator_info_iterator_t + **/ +typedef struct xcb_input_valuator_info_iterator_t { + xcb_input_valuator_info_t *data; + int rem; + int index; +} xcb_input_valuator_info_iterator_t; + +/** + * @brief xcb_input_input_info_info_t + **/ +typedef struct xcb_input_input_info_info_t { + struct { + xcb_input_key_code_t min_keycode; + xcb_input_key_code_t max_keycode; + uint16_t num_keys; + uint8_t pad0[2]; + } key; + struct { + uint16_t num_buttons; + } button; + struct { + uint8_t axes_len; + uint8_t mode; + uint32_t motion_size; + xcb_input_axis_info_t *axes; + } valuator; +} xcb_input_input_info_info_t; + +/** + * @brief xcb_input_input_info_t + **/ +typedef struct xcb_input_input_info_t { + uint8_t class_id; + uint8_t len; +} xcb_input_input_info_t; + +void * +xcb_input_input_info_info (const xcb_input_input_info_t *R); + +/** + * @brief xcb_input_input_info_iterator_t + **/ +typedef struct xcb_input_input_info_iterator_t { + xcb_input_input_info_t *data; + int rem; + int index; +} xcb_input_input_info_iterator_t; + +/** + * @brief xcb_input_device_name_t + **/ +typedef struct xcb_input_device_name_t { + uint8_t len; +} xcb_input_device_name_t; + +/** + * @brief xcb_input_device_name_iterator_t + **/ +typedef struct xcb_input_device_name_iterator_t { + xcb_input_device_name_t *data; + int rem; + int index; +} xcb_input_device_name_iterator_t; + +/** + * @brief xcb_input_list_input_devices_cookie_t + **/ +typedef struct xcb_input_list_input_devices_cookie_t { + unsigned int sequence; +} xcb_input_list_input_devices_cookie_t; + +/** Opcode for xcb_input_list_input_devices. */ +#define XCB_INPUT_LIST_INPUT_DEVICES 2 + +/** + * @brief xcb_input_list_input_devices_request_t + **/ +typedef struct xcb_input_list_input_devices_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; +} xcb_input_list_input_devices_request_t; + +/** + * @brief xcb_input_list_input_devices_reply_t + **/ +typedef struct xcb_input_list_input_devices_reply_t { + uint8_t response_type; + uint8_t xi_reply_type; + uint16_t sequence; + uint32_t length; + uint8_t devices_len; + uint8_t pad0[23]; +} xcb_input_list_input_devices_reply_t; + +typedef uint8_t xcb_input_event_type_base_t; + +/** + * @brief xcb_input_event_type_base_iterator_t + **/ +typedef struct xcb_input_event_type_base_iterator_t { + xcb_input_event_type_base_t *data; + int rem; + int index; +} xcb_input_event_type_base_iterator_t; + +/** + * @brief xcb_input_input_class_info_t + **/ +typedef struct xcb_input_input_class_info_t { + uint8_t class_id; + xcb_input_event_type_base_t event_type_base; +} xcb_input_input_class_info_t; + +/** + * @brief xcb_input_input_class_info_iterator_t + **/ +typedef struct xcb_input_input_class_info_iterator_t { + xcb_input_input_class_info_t *data; + int rem; + int index; +} xcb_input_input_class_info_iterator_t; + +/** + * @brief xcb_input_open_device_cookie_t + **/ +typedef struct xcb_input_open_device_cookie_t { + unsigned int sequence; +} xcb_input_open_device_cookie_t; + +/** Opcode for xcb_input_open_device. */ +#define XCB_INPUT_OPEN_DEVICE 3 + +/** + * @brief xcb_input_open_device_request_t + **/ +typedef struct xcb_input_open_device_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + uint8_t device_id; + uint8_t pad0[3]; +} xcb_input_open_device_request_t; + +/** + * @brief xcb_input_open_device_reply_t + **/ +typedef struct xcb_input_open_device_reply_t { + uint8_t response_type; + uint8_t xi_reply_type; + uint16_t sequence; + uint32_t length; + uint8_t num_classes; + uint8_t pad0[23]; +} xcb_input_open_device_reply_t; + +/** Opcode for xcb_input_close_device. */ +#define XCB_INPUT_CLOSE_DEVICE 4 + +/** + * @brief xcb_input_close_device_request_t + **/ +typedef struct xcb_input_close_device_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + uint8_t device_id; + uint8_t pad0[3]; +} xcb_input_close_device_request_t; + +/** + * @brief xcb_input_set_device_mode_cookie_t + **/ +typedef struct xcb_input_set_device_mode_cookie_t { + unsigned int sequence; +} xcb_input_set_device_mode_cookie_t; + +/** Opcode for xcb_input_set_device_mode. */ +#define XCB_INPUT_SET_DEVICE_MODE 5 + +/** + * @brief xcb_input_set_device_mode_request_t + **/ +typedef struct xcb_input_set_device_mode_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + uint8_t device_id; + uint8_t mode; + uint8_t pad0[2]; +} xcb_input_set_device_mode_request_t; + +/** + * @brief xcb_input_set_device_mode_reply_t + **/ +typedef struct xcb_input_set_device_mode_reply_t { + uint8_t response_type; + uint8_t xi_reply_type; + uint16_t sequence; + uint32_t length; + uint8_t status; + uint8_t pad0[23]; +} xcb_input_set_device_mode_reply_t; + +/** Opcode for xcb_input_select_extension_event. */ +#define XCB_INPUT_SELECT_EXTENSION_EVENT 6 + +/** + * @brief xcb_input_select_extension_event_request_t + **/ +typedef struct xcb_input_select_extension_event_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_window_t window; + uint16_t num_classes; + uint8_t pad0[2]; +} xcb_input_select_extension_event_request_t; + +/** + * @brief xcb_input_get_selected_extension_events_cookie_t + **/ +typedef struct xcb_input_get_selected_extension_events_cookie_t { + unsigned int sequence; +} xcb_input_get_selected_extension_events_cookie_t; + +/** Opcode for xcb_input_get_selected_extension_events. */ +#define XCB_INPUT_GET_SELECTED_EXTENSION_EVENTS 7 + +/** + * @brief xcb_input_get_selected_extension_events_request_t + **/ +typedef struct xcb_input_get_selected_extension_events_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_window_t window; +} xcb_input_get_selected_extension_events_request_t; + +/** + * @brief xcb_input_get_selected_extension_events_reply_t + **/ +typedef struct xcb_input_get_selected_extension_events_reply_t { + uint8_t response_type; + uint8_t xi_reply_type; + uint16_t sequence; + uint32_t length; + uint16_t num_this_classes; + uint16_t num_all_classes; + uint8_t pad0[20]; +} xcb_input_get_selected_extension_events_reply_t; + +typedef enum xcb_input_propagate_mode_t { + XCB_INPUT_PROPAGATE_MODE_ADD_TO_LIST = 0, + XCB_INPUT_PROPAGATE_MODE_DELETE_FROM_LIST = 1 +} xcb_input_propagate_mode_t; + +/** Opcode for xcb_input_change_device_dont_propagate_list. */ +#define XCB_INPUT_CHANGE_DEVICE_DONT_PROPAGATE_LIST 8 + +/** + * @brief xcb_input_change_device_dont_propagate_list_request_t + **/ +typedef struct xcb_input_change_device_dont_propagate_list_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_window_t window; + uint16_t num_classes; + uint8_t mode; + uint8_t pad0; +} xcb_input_change_device_dont_propagate_list_request_t; + +/** + * @brief xcb_input_get_device_dont_propagate_list_cookie_t + **/ +typedef struct xcb_input_get_device_dont_propagate_list_cookie_t { + unsigned int sequence; +} xcb_input_get_device_dont_propagate_list_cookie_t; + +/** Opcode for xcb_input_get_device_dont_propagate_list. */ +#define XCB_INPUT_GET_DEVICE_DONT_PROPAGATE_LIST 9 + +/** + * @brief xcb_input_get_device_dont_propagate_list_request_t + **/ +typedef struct xcb_input_get_device_dont_propagate_list_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_window_t window; +} xcb_input_get_device_dont_propagate_list_request_t; + +/** + * @brief xcb_input_get_device_dont_propagate_list_reply_t + **/ +typedef struct xcb_input_get_device_dont_propagate_list_reply_t { + uint8_t response_type; + uint8_t xi_reply_type; + uint16_t sequence; + uint32_t length; + uint16_t num_classes; + uint8_t pad0[22]; +} xcb_input_get_device_dont_propagate_list_reply_t; + +/** + * @brief xcb_input_device_time_coord_t + **/ +typedef struct xcb_input_device_time_coord_t { + xcb_timestamp_t time; +} xcb_input_device_time_coord_t; + +/** + * @brief xcb_input_device_time_coord_iterator_t + **/ +typedef struct xcb_input_device_time_coord_iterator_t { + xcb_input_device_time_coord_t *data; + int rem; + int index; + uint8_t num_axes; /**< */ +} xcb_input_device_time_coord_iterator_t; + +/** + * @brief xcb_input_get_device_motion_events_cookie_t + **/ +typedef struct xcb_input_get_device_motion_events_cookie_t { + unsigned int sequence; +} xcb_input_get_device_motion_events_cookie_t; + +/** Opcode for xcb_input_get_device_motion_events. */ +#define XCB_INPUT_GET_DEVICE_MOTION_EVENTS 10 + +/** + * @brief xcb_input_get_device_motion_events_request_t + **/ +typedef struct xcb_input_get_device_motion_events_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_timestamp_t start; + xcb_timestamp_t stop; + uint8_t device_id; + uint8_t pad0[3]; +} xcb_input_get_device_motion_events_request_t; + +/** + * @brief xcb_input_get_device_motion_events_reply_t + **/ +typedef struct xcb_input_get_device_motion_events_reply_t { + uint8_t response_type; + uint8_t xi_reply_type; + uint16_t sequence; + uint32_t length; + uint32_t num_events; + uint8_t num_axes; + uint8_t device_mode; + uint8_t pad0[18]; +} xcb_input_get_device_motion_events_reply_t; + +/** + * @brief xcb_input_change_keyboard_device_cookie_t + **/ +typedef struct xcb_input_change_keyboard_device_cookie_t { + unsigned int sequence; +} xcb_input_change_keyboard_device_cookie_t; + +/** Opcode for xcb_input_change_keyboard_device. */ +#define XCB_INPUT_CHANGE_KEYBOARD_DEVICE 11 + +/** + * @brief xcb_input_change_keyboard_device_request_t + **/ +typedef struct xcb_input_change_keyboard_device_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + uint8_t device_id; + uint8_t pad0[3]; +} xcb_input_change_keyboard_device_request_t; + +/** + * @brief xcb_input_change_keyboard_device_reply_t + **/ +typedef struct xcb_input_change_keyboard_device_reply_t { + uint8_t response_type; + uint8_t xi_reply_type; + uint16_t sequence; + uint32_t length; + uint8_t status; + uint8_t pad0[23]; +} xcb_input_change_keyboard_device_reply_t; + +/** + * @brief xcb_input_change_pointer_device_cookie_t + **/ +typedef struct xcb_input_change_pointer_device_cookie_t { + unsigned int sequence; +} xcb_input_change_pointer_device_cookie_t; + +/** Opcode for xcb_input_change_pointer_device. */ +#define XCB_INPUT_CHANGE_POINTER_DEVICE 12 + +/** + * @brief xcb_input_change_pointer_device_request_t + **/ +typedef struct xcb_input_change_pointer_device_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + uint8_t x_axis; + uint8_t y_axis; + uint8_t device_id; + uint8_t pad0; +} xcb_input_change_pointer_device_request_t; + +/** + * @brief xcb_input_change_pointer_device_reply_t + **/ +typedef struct xcb_input_change_pointer_device_reply_t { + uint8_t response_type; + uint8_t xi_reply_type; + uint16_t sequence; + uint32_t length; + uint8_t status; + uint8_t pad0[23]; +} xcb_input_change_pointer_device_reply_t; + +/** + * @brief xcb_input_grab_device_cookie_t + **/ +typedef struct xcb_input_grab_device_cookie_t { + unsigned int sequence; +} xcb_input_grab_device_cookie_t; + +/** Opcode for xcb_input_grab_device. */ +#define XCB_INPUT_GRAB_DEVICE 13 + +/** + * @brief xcb_input_grab_device_request_t + **/ +typedef struct xcb_input_grab_device_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_window_t grab_window; + xcb_timestamp_t time; + uint16_t num_classes; + uint8_t this_device_mode; + uint8_t other_device_mode; + uint8_t owner_events; + uint8_t device_id; + uint8_t pad0[2]; +} xcb_input_grab_device_request_t; + +/** + * @brief xcb_input_grab_device_reply_t + **/ +typedef struct xcb_input_grab_device_reply_t { + uint8_t response_type; + uint8_t xi_reply_type; + uint16_t sequence; + uint32_t length; + uint8_t status; + uint8_t pad0[23]; +} xcb_input_grab_device_reply_t; + +/** Opcode for xcb_input_ungrab_device. */ +#define XCB_INPUT_UNGRAB_DEVICE 14 + +/** + * @brief xcb_input_ungrab_device_request_t + **/ +typedef struct xcb_input_ungrab_device_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_timestamp_t time; + uint8_t device_id; + uint8_t pad0[3]; +} xcb_input_ungrab_device_request_t; + +typedef enum xcb_input_modifier_device_t { + XCB_INPUT_MODIFIER_DEVICE_USE_X_KEYBOARD = 255 +} xcb_input_modifier_device_t; + +/** Opcode for xcb_input_grab_device_key. */ +#define XCB_INPUT_GRAB_DEVICE_KEY 15 + +/** + * @brief xcb_input_grab_device_key_request_t + **/ +typedef struct xcb_input_grab_device_key_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_window_t grab_window; + uint16_t num_classes; + uint16_t modifiers; + uint8_t modifier_device; + uint8_t grabbed_device; + uint8_t key; + uint8_t this_device_mode; + uint8_t other_device_mode; + uint8_t owner_events; + uint8_t pad0[2]; +} xcb_input_grab_device_key_request_t; + +/** Opcode for xcb_input_ungrab_device_key. */ +#define XCB_INPUT_UNGRAB_DEVICE_KEY 16 + +/** + * @brief xcb_input_ungrab_device_key_request_t + **/ +typedef struct xcb_input_ungrab_device_key_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_window_t grabWindow; + uint16_t modifiers; + uint8_t modifier_device; + uint8_t key; + uint8_t grabbed_device; +} xcb_input_ungrab_device_key_request_t; + +/** Opcode for xcb_input_grab_device_button. */ +#define XCB_INPUT_GRAB_DEVICE_BUTTON 17 + +/** + * @brief xcb_input_grab_device_button_request_t + **/ +typedef struct xcb_input_grab_device_button_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_window_t grab_window; + uint8_t grabbed_device; + uint8_t modifier_device; + uint16_t num_classes; + uint16_t modifiers; + uint8_t this_device_mode; + uint8_t other_device_mode; + uint8_t button; + uint8_t owner_events; + uint8_t pad0[2]; +} xcb_input_grab_device_button_request_t; + +/** Opcode for xcb_input_ungrab_device_button. */ +#define XCB_INPUT_UNGRAB_DEVICE_BUTTON 18 + +/** + * @brief xcb_input_ungrab_device_button_request_t + **/ +typedef struct xcb_input_ungrab_device_button_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_window_t grab_window; + uint16_t modifiers; + uint8_t modifier_device; + uint8_t button; + uint8_t grabbed_device; + uint8_t pad0[3]; +} xcb_input_ungrab_device_button_request_t; + +typedef enum xcb_input_device_input_mode_t { + XCB_INPUT_DEVICE_INPUT_MODE_ASYNC_THIS_DEVICE = 0, + XCB_INPUT_DEVICE_INPUT_MODE_SYNC_THIS_DEVICE = 1, + XCB_INPUT_DEVICE_INPUT_MODE_REPLAY_THIS_DEVICE = 2, + XCB_INPUT_DEVICE_INPUT_MODE_ASYNC_OTHER_DEVICES = 3, + XCB_INPUT_DEVICE_INPUT_MODE_ASYNC_ALL = 4, + XCB_INPUT_DEVICE_INPUT_MODE_SYNC_ALL = 5 +} xcb_input_device_input_mode_t; + +/** Opcode for xcb_input_allow_device_events. */ +#define XCB_INPUT_ALLOW_DEVICE_EVENTS 19 + +/** + * @brief xcb_input_allow_device_events_request_t + **/ +typedef struct xcb_input_allow_device_events_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_timestamp_t time; + uint8_t mode; + uint8_t device_id; + uint8_t pad0[2]; +} xcb_input_allow_device_events_request_t; + +/** + * @brief xcb_input_get_device_focus_cookie_t + **/ +typedef struct xcb_input_get_device_focus_cookie_t { + unsigned int sequence; +} xcb_input_get_device_focus_cookie_t; + +/** Opcode for xcb_input_get_device_focus. */ +#define XCB_INPUT_GET_DEVICE_FOCUS 20 + +/** + * @brief xcb_input_get_device_focus_request_t + **/ +typedef struct xcb_input_get_device_focus_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + uint8_t device_id; + uint8_t pad0[3]; +} xcb_input_get_device_focus_request_t; + +/** + * @brief xcb_input_get_device_focus_reply_t + **/ +typedef struct xcb_input_get_device_focus_reply_t { + uint8_t response_type; + uint8_t xi_reply_type; + uint16_t sequence; + uint32_t length; + xcb_window_t focus; + xcb_timestamp_t time; + uint8_t revert_to; + uint8_t pad0[15]; +} xcb_input_get_device_focus_reply_t; + +/** Opcode for xcb_input_set_device_focus. */ +#define XCB_INPUT_SET_DEVICE_FOCUS 21 + +/** + * @brief xcb_input_set_device_focus_request_t + **/ +typedef struct xcb_input_set_device_focus_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_window_t focus; + xcb_timestamp_t time; + uint8_t revert_to; + uint8_t device_id; + uint8_t pad0[2]; +} xcb_input_set_device_focus_request_t; + +typedef enum xcb_input_feedback_class_t { + XCB_INPUT_FEEDBACK_CLASS_KEYBOARD = 0, + XCB_INPUT_FEEDBACK_CLASS_POINTER = 1, + XCB_INPUT_FEEDBACK_CLASS_STRING = 2, + XCB_INPUT_FEEDBACK_CLASS_INTEGER = 3, + XCB_INPUT_FEEDBACK_CLASS_LED = 4, + XCB_INPUT_FEEDBACK_CLASS_BELL = 5 +} xcb_input_feedback_class_t; + +/** + * @brief xcb_input_kbd_feedback_state_t + **/ +typedef struct xcb_input_kbd_feedback_state_t { + uint8_t class_id; + uint8_t feedback_id; + uint16_t len; + uint16_t pitch; + uint16_t duration; + uint32_t led_mask; + uint32_t led_values; + uint8_t global_auto_repeat; + uint8_t click; + uint8_t percent; + uint8_t pad0; + uint8_t auto_repeats[32]; +} xcb_input_kbd_feedback_state_t; + +/** + * @brief xcb_input_kbd_feedback_state_iterator_t + **/ +typedef struct xcb_input_kbd_feedback_state_iterator_t { + xcb_input_kbd_feedback_state_t *data; + int rem; + int index; +} xcb_input_kbd_feedback_state_iterator_t; + +/** + * @brief xcb_input_ptr_feedback_state_t + **/ +typedef struct xcb_input_ptr_feedback_state_t { + uint8_t class_id; + uint8_t feedback_id; + uint16_t len; + uint8_t pad0[2]; + uint16_t accel_num; + uint16_t accel_denom; + uint16_t threshold; +} xcb_input_ptr_feedback_state_t; + +/** + * @brief xcb_input_ptr_feedback_state_iterator_t + **/ +typedef struct xcb_input_ptr_feedback_state_iterator_t { + xcb_input_ptr_feedback_state_t *data; + int rem; + int index; +} xcb_input_ptr_feedback_state_iterator_t; + +/** + * @brief xcb_input_integer_feedback_state_t + **/ +typedef struct xcb_input_integer_feedback_state_t { + uint8_t class_id; + uint8_t feedback_id; + uint16_t len; + uint32_t resolution; + int32_t min_value; + int32_t max_value; +} xcb_input_integer_feedback_state_t; + +/** + * @brief xcb_input_integer_feedback_state_iterator_t + **/ +typedef struct xcb_input_integer_feedback_state_iterator_t { + xcb_input_integer_feedback_state_t *data; + int rem; + int index; +} xcb_input_integer_feedback_state_iterator_t; + +/** + * @brief xcb_input_string_feedback_state_t + **/ +typedef struct xcb_input_string_feedback_state_t { + uint8_t class_id; + uint8_t feedback_id; + uint16_t len; + uint16_t max_symbols; + uint16_t num_keysyms; +} xcb_input_string_feedback_state_t; + +/** + * @brief xcb_input_string_feedback_state_iterator_t + **/ +typedef struct xcb_input_string_feedback_state_iterator_t { + xcb_input_string_feedback_state_t *data; + int rem; + int index; +} xcb_input_string_feedback_state_iterator_t; + +/** + * @brief xcb_input_bell_feedback_state_t + **/ +typedef struct xcb_input_bell_feedback_state_t { + uint8_t class_id; + uint8_t feedback_id; + uint16_t len; + uint8_t percent; + uint8_t pad0[3]; + uint16_t pitch; + uint16_t duration; +} xcb_input_bell_feedback_state_t; + +/** + * @brief xcb_input_bell_feedback_state_iterator_t + **/ +typedef struct xcb_input_bell_feedback_state_iterator_t { + xcb_input_bell_feedback_state_t *data; + int rem; + int index; +} xcb_input_bell_feedback_state_iterator_t; + +/** + * @brief xcb_input_led_feedback_state_t + **/ +typedef struct xcb_input_led_feedback_state_t { + uint8_t class_id; + uint8_t feedback_id; + uint16_t len; + uint32_t led_mask; + uint32_t led_values; +} xcb_input_led_feedback_state_t; + +/** + * @brief xcb_input_led_feedback_state_iterator_t + **/ +typedef struct xcb_input_led_feedback_state_iterator_t { + xcb_input_led_feedback_state_t *data; + int rem; + int index; +} xcb_input_led_feedback_state_iterator_t; + +/** + * @brief xcb_input_feedback_state_data_t + **/ +typedef struct xcb_input_feedback_state_data_t { + struct { + uint16_t pitch; + uint16_t duration; + uint32_t led_mask; + uint32_t led_values; + uint8_t global_auto_repeat; + uint8_t click; + uint8_t percent; + uint8_t pad0; + uint8_t auto_repeats[32]; + } keyboard; + struct { + uint8_t pad1[2]; + uint16_t accel_num; + uint16_t accel_denom; + uint16_t threshold; + } pointer; + struct { + uint16_t max_symbols; + uint16_t num_keysyms; + xcb_keysym_t *keysyms; + } string; + struct { + uint32_t resolution; + int32_t min_value; + int32_t max_value; + } integer; + struct { + uint32_t led_mask; + uint32_t led_values; + } led; + struct { + uint8_t percent; + uint8_t pad2[3]; + uint16_t pitch; + uint16_t duration; + } bell; +} xcb_input_feedback_state_data_t; + +/** + * @brief xcb_input_feedback_state_t + **/ +typedef struct xcb_input_feedback_state_t { + uint8_t class_id; + uint8_t feedback_id; + uint16_t len; +} xcb_input_feedback_state_t; + +void * +xcb_input_feedback_state_data (const xcb_input_feedback_state_t *R); + +/** + * @brief xcb_input_feedback_state_iterator_t + **/ +typedef struct xcb_input_feedback_state_iterator_t { + xcb_input_feedback_state_t *data; + int rem; + int index; +} xcb_input_feedback_state_iterator_t; + +/** + * @brief xcb_input_get_feedback_control_cookie_t + **/ +typedef struct xcb_input_get_feedback_control_cookie_t { + unsigned int sequence; +} xcb_input_get_feedback_control_cookie_t; + +/** Opcode for xcb_input_get_feedback_control. */ +#define XCB_INPUT_GET_FEEDBACK_CONTROL 22 + +/** + * @brief xcb_input_get_feedback_control_request_t + **/ +typedef struct xcb_input_get_feedback_control_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + uint8_t device_id; + uint8_t pad0[3]; +} xcb_input_get_feedback_control_request_t; + +/** + * @brief xcb_input_get_feedback_control_reply_t + **/ +typedef struct xcb_input_get_feedback_control_reply_t { + uint8_t response_type; + uint8_t xi_reply_type; + uint16_t sequence; + uint32_t length; + uint16_t num_feedbacks; + uint8_t pad0[22]; +} xcb_input_get_feedback_control_reply_t; + +/** + * @brief xcb_input_kbd_feedback_ctl_t + **/ +typedef struct xcb_input_kbd_feedback_ctl_t { + uint8_t class_id; + uint8_t feedback_id; + uint16_t len; + xcb_input_key_code_t key; + uint8_t auto_repeat_mode; + int8_t key_click_percent; + int8_t bell_percent; + int16_t bell_pitch; + int16_t bell_duration; + uint32_t led_mask; + uint32_t led_values; +} xcb_input_kbd_feedback_ctl_t; + +/** + * @brief xcb_input_kbd_feedback_ctl_iterator_t + **/ +typedef struct xcb_input_kbd_feedback_ctl_iterator_t { + xcb_input_kbd_feedback_ctl_t *data; + int rem; + int index; +} xcb_input_kbd_feedback_ctl_iterator_t; + +/** + * @brief xcb_input_ptr_feedback_ctl_t + **/ +typedef struct xcb_input_ptr_feedback_ctl_t { + uint8_t class_id; + uint8_t feedback_id; + uint16_t len; + uint8_t pad0[2]; + int16_t num; + int16_t denom; + int16_t threshold; +} xcb_input_ptr_feedback_ctl_t; + +/** + * @brief xcb_input_ptr_feedback_ctl_iterator_t + **/ +typedef struct xcb_input_ptr_feedback_ctl_iterator_t { + xcb_input_ptr_feedback_ctl_t *data; + int rem; + int index; +} xcb_input_ptr_feedback_ctl_iterator_t; + +/** + * @brief xcb_input_integer_feedback_ctl_t + **/ +typedef struct xcb_input_integer_feedback_ctl_t { + uint8_t class_id; + uint8_t feedback_id; + uint16_t len; + int32_t int_to_display; +} xcb_input_integer_feedback_ctl_t; + +/** + * @brief xcb_input_integer_feedback_ctl_iterator_t + **/ +typedef struct xcb_input_integer_feedback_ctl_iterator_t { + xcb_input_integer_feedback_ctl_t *data; + int rem; + int index; +} xcb_input_integer_feedback_ctl_iterator_t; + +/** + * @brief xcb_input_string_feedback_ctl_t + **/ +typedef struct xcb_input_string_feedback_ctl_t { + uint8_t class_id; + uint8_t feedback_id; + uint16_t len; + uint8_t pad0[2]; + uint16_t num_keysyms; +} xcb_input_string_feedback_ctl_t; + +/** + * @brief xcb_input_string_feedback_ctl_iterator_t + **/ +typedef struct xcb_input_string_feedback_ctl_iterator_t { + xcb_input_string_feedback_ctl_t *data; + int rem; + int index; +} xcb_input_string_feedback_ctl_iterator_t; + +/** + * @brief xcb_input_bell_feedback_ctl_t + **/ +typedef struct xcb_input_bell_feedback_ctl_t { + uint8_t class_id; + uint8_t feedback_id; + uint16_t len; + int8_t percent; + uint8_t pad0[3]; + int16_t pitch; + int16_t duration; +} xcb_input_bell_feedback_ctl_t; + +/** + * @brief xcb_input_bell_feedback_ctl_iterator_t + **/ +typedef struct xcb_input_bell_feedback_ctl_iterator_t { + xcb_input_bell_feedback_ctl_t *data; + int rem; + int index; +} xcb_input_bell_feedback_ctl_iterator_t; + +/** + * @brief xcb_input_led_feedback_ctl_t + **/ +typedef struct xcb_input_led_feedback_ctl_t { + uint8_t class_id; + uint8_t feedback_id; + uint16_t len; + uint32_t led_mask; + uint32_t led_values; +} xcb_input_led_feedback_ctl_t; + +/** + * @brief xcb_input_led_feedback_ctl_iterator_t + **/ +typedef struct xcb_input_led_feedback_ctl_iterator_t { + xcb_input_led_feedback_ctl_t *data; + int rem; + int index; +} xcb_input_led_feedback_ctl_iterator_t; + +/** + * @brief xcb_input_feedback_ctl_data_t + **/ +typedef struct xcb_input_feedback_ctl_data_t { + struct { + xcb_input_key_code_t key; + uint8_t auto_repeat_mode; + int8_t key_click_percent; + int8_t bell_percent; + int16_t bell_pitch; + int16_t bell_duration; + uint32_t led_mask; + uint32_t led_values; + } keyboard; + struct { + uint8_t pad0[2]; + int16_t num; + int16_t denom; + int16_t threshold; + } pointer; + struct { + uint8_t pad1[2]; + uint16_t num_keysyms; + xcb_keysym_t *keysyms; + } string; + struct { + int32_t int_to_display; + } integer; + struct { + uint32_t led_mask; + uint32_t led_values; + } led; + struct { + int8_t percent; + uint8_t pad2[3]; + int16_t pitch; + int16_t duration; + } bell; +} xcb_input_feedback_ctl_data_t; + +/** + * @brief xcb_input_feedback_ctl_t + **/ +typedef struct xcb_input_feedback_ctl_t { + uint8_t class_id; + uint8_t feedback_id; + uint16_t len; +} xcb_input_feedback_ctl_t; + +void * +xcb_input_feedback_ctl_data (const xcb_input_feedback_ctl_t *R); + +/** + * @brief xcb_input_feedback_ctl_iterator_t + **/ +typedef struct xcb_input_feedback_ctl_iterator_t { + xcb_input_feedback_ctl_t *data; + int rem; + int index; +} xcb_input_feedback_ctl_iterator_t; + +typedef enum xcb_input_change_feedback_control_mask_t { + XCB_INPUT_CHANGE_FEEDBACK_CONTROL_MASK_KEY_CLICK_PERCENT = 1, + XCB_INPUT_CHANGE_FEEDBACK_CONTROL_MASK_PERCENT = 2, + XCB_INPUT_CHANGE_FEEDBACK_CONTROL_MASK_PITCH = 4, + XCB_INPUT_CHANGE_FEEDBACK_CONTROL_MASK_DURATION = 8, + XCB_INPUT_CHANGE_FEEDBACK_CONTROL_MASK_LED = 16, + XCB_INPUT_CHANGE_FEEDBACK_CONTROL_MASK_LED_MODE = 32, + XCB_INPUT_CHANGE_FEEDBACK_CONTROL_MASK_KEY = 64, + XCB_INPUT_CHANGE_FEEDBACK_CONTROL_MASK_AUTO_REPEAT_MODE = 128, + XCB_INPUT_CHANGE_FEEDBACK_CONTROL_MASK_STRING = 1, + XCB_INPUT_CHANGE_FEEDBACK_CONTROL_MASK_INTEGER = 1, + XCB_INPUT_CHANGE_FEEDBACK_CONTROL_MASK_ACCEL_NUM = 1, + XCB_INPUT_CHANGE_FEEDBACK_CONTROL_MASK_ACCEL_DENOM = 2, + XCB_INPUT_CHANGE_FEEDBACK_CONTROL_MASK_THRESHOLD = 4 +} xcb_input_change_feedback_control_mask_t; + +/** Opcode for xcb_input_change_feedback_control. */ +#define XCB_INPUT_CHANGE_FEEDBACK_CONTROL 23 + +/** + * @brief xcb_input_change_feedback_control_request_t + **/ +typedef struct xcb_input_change_feedback_control_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + uint32_t mask; + uint8_t device_id; + uint8_t feedback_id; + uint8_t pad0[2]; +} xcb_input_change_feedback_control_request_t; + +/** + * @brief xcb_input_get_device_key_mapping_cookie_t + **/ +typedef struct xcb_input_get_device_key_mapping_cookie_t { + unsigned int sequence; +} xcb_input_get_device_key_mapping_cookie_t; + +/** Opcode for xcb_input_get_device_key_mapping. */ +#define XCB_INPUT_GET_DEVICE_KEY_MAPPING 24 + +/** + * @brief xcb_input_get_device_key_mapping_request_t + **/ +typedef struct xcb_input_get_device_key_mapping_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + uint8_t device_id; + xcb_input_key_code_t first_keycode; + uint8_t count; + uint8_t pad0; +} xcb_input_get_device_key_mapping_request_t; + +/** + * @brief xcb_input_get_device_key_mapping_reply_t + **/ +typedef struct xcb_input_get_device_key_mapping_reply_t { + uint8_t response_type; + uint8_t xi_reply_type; + uint16_t sequence; + uint32_t length; + uint8_t keysyms_per_keycode; + uint8_t pad0[23]; +} xcb_input_get_device_key_mapping_reply_t; + +/** Opcode for xcb_input_change_device_key_mapping. */ +#define XCB_INPUT_CHANGE_DEVICE_KEY_MAPPING 25 + +/** + * @brief xcb_input_change_device_key_mapping_request_t + **/ +typedef struct xcb_input_change_device_key_mapping_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + uint8_t device_id; + xcb_input_key_code_t first_keycode; + uint8_t keysyms_per_keycode; + uint8_t keycode_count; +} xcb_input_change_device_key_mapping_request_t; + +/** + * @brief xcb_input_get_device_modifier_mapping_cookie_t + **/ +typedef struct xcb_input_get_device_modifier_mapping_cookie_t { + unsigned int sequence; +} xcb_input_get_device_modifier_mapping_cookie_t; + +/** Opcode for xcb_input_get_device_modifier_mapping. */ +#define XCB_INPUT_GET_DEVICE_MODIFIER_MAPPING 26 + +/** + * @brief xcb_input_get_device_modifier_mapping_request_t + **/ +typedef struct xcb_input_get_device_modifier_mapping_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + uint8_t device_id; + uint8_t pad0[3]; +} xcb_input_get_device_modifier_mapping_request_t; + +/** + * @brief xcb_input_get_device_modifier_mapping_reply_t + **/ +typedef struct xcb_input_get_device_modifier_mapping_reply_t { + uint8_t response_type; + uint8_t xi_reply_type; + uint16_t sequence; + uint32_t length; + uint8_t keycodes_per_modifier; + uint8_t pad0[23]; +} xcb_input_get_device_modifier_mapping_reply_t; + +/** + * @brief xcb_input_set_device_modifier_mapping_cookie_t + **/ +typedef struct xcb_input_set_device_modifier_mapping_cookie_t { + unsigned int sequence; +} xcb_input_set_device_modifier_mapping_cookie_t; + +/** Opcode for xcb_input_set_device_modifier_mapping. */ +#define XCB_INPUT_SET_DEVICE_MODIFIER_MAPPING 27 + +/** + * @brief xcb_input_set_device_modifier_mapping_request_t + **/ +typedef struct xcb_input_set_device_modifier_mapping_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + uint8_t device_id; + uint8_t keycodes_per_modifier; + uint8_t pad0[2]; +} xcb_input_set_device_modifier_mapping_request_t; + +/** + * @brief xcb_input_set_device_modifier_mapping_reply_t + **/ +typedef struct xcb_input_set_device_modifier_mapping_reply_t { + uint8_t response_type; + uint8_t xi_reply_type; + uint16_t sequence; + uint32_t length; + uint8_t status; + uint8_t pad0[23]; +} xcb_input_set_device_modifier_mapping_reply_t; + +/** + * @brief xcb_input_get_device_button_mapping_cookie_t + **/ +typedef struct xcb_input_get_device_button_mapping_cookie_t { + unsigned int sequence; +} xcb_input_get_device_button_mapping_cookie_t; + +/** Opcode for xcb_input_get_device_button_mapping. */ +#define XCB_INPUT_GET_DEVICE_BUTTON_MAPPING 28 + +/** + * @brief xcb_input_get_device_button_mapping_request_t + **/ +typedef struct xcb_input_get_device_button_mapping_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + uint8_t device_id; + uint8_t pad0[3]; +} xcb_input_get_device_button_mapping_request_t; + +/** + * @brief xcb_input_get_device_button_mapping_reply_t + **/ +typedef struct xcb_input_get_device_button_mapping_reply_t { + uint8_t response_type; + uint8_t xi_reply_type; + uint16_t sequence; + uint32_t length; + uint8_t map_size; + uint8_t pad0[23]; +} xcb_input_get_device_button_mapping_reply_t; + +/** + * @brief xcb_input_set_device_button_mapping_cookie_t + **/ +typedef struct xcb_input_set_device_button_mapping_cookie_t { + unsigned int sequence; +} xcb_input_set_device_button_mapping_cookie_t; + +/** Opcode for xcb_input_set_device_button_mapping. */ +#define XCB_INPUT_SET_DEVICE_BUTTON_MAPPING 29 + +/** + * @brief xcb_input_set_device_button_mapping_request_t + **/ +typedef struct xcb_input_set_device_button_mapping_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + uint8_t device_id; + uint8_t map_size; + uint8_t pad0[2]; +} xcb_input_set_device_button_mapping_request_t; + +/** + * @brief xcb_input_set_device_button_mapping_reply_t + **/ +typedef struct xcb_input_set_device_button_mapping_reply_t { + uint8_t response_type; + uint8_t xi_reply_type; + uint16_t sequence; + uint32_t length; + uint8_t status; + uint8_t pad0[23]; +} xcb_input_set_device_button_mapping_reply_t; + +/** + * @brief xcb_input_key_state_t + **/ +typedef struct xcb_input_key_state_t { + uint8_t class_id; + uint8_t len; + uint8_t num_keys; + uint8_t pad0; + uint8_t keys[32]; +} xcb_input_key_state_t; + +/** + * @brief xcb_input_key_state_iterator_t + **/ +typedef struct xcb_input_key_state_iterator_t { + xcb_input_key_state_t *data; + int rem; + int index; +} xcb_input_key_state_iterator_t; + +/** + * @brief xcb_input_button_state_t + **/ +typedef struct xcb_input_button_state_t { + uint8_t class_id; + uint8_t len; + uint8_t num_buttons; + uint8_t pad0; + uint8_t buttons[32]; +} xcb_input_button_state_t; + +/** + * @brief xcb_input_button_state_iterator_t + **/ +typedef struct xcb_input_button_state_iterator_t { + xcb_input_button_state_t *data; + int rem; + int index; +} xcb_input_button_state_iterator_t; + +typedef enum xcb_input_valuator_state_mode_mask_t { + XCB_INPUT_VALUATOR_STATE_MODE_MASK_DEVICE_MODE_ABSOLUTE = 1, + XCB_INPUT_VALUATOR_STATE_MODE_MASK_OUT_OF_PROXIMITY = 2 +} xcb_input_valuator_state_mode_mask_t; + +/** + * @brief xcb_input_valuator_state_t + **/ +typedef struct xcb_input_valuator_state_t { + uint8_t class_id; + uint8_t len; + uint8_t num_valuators; + uint8_t mode; +} xcb_input_valuator_state_t; + +/** + * @brief xcb_input_valuator_state_iterator_t + **/ +typedef struct xcb_input_valuator_state_iterator_t { + xcb_input_valuator_state_t *data; + int rem; + int index; +} xcb_input_valuator_state_iterator_t; + +/** + * @brief xcb_input_input_state_data_t + **/ +typedef struct xcb_input_input_state_data_t { + struct { + uint8_t num_keys; + uint8_t pad0; + uint8_t keys[32]; + } key; + struct { + uint8_t num_buttons; + uint8_t pad1; + uint8_t buttons[32]; + } button; + struct { + uint8_t num_valuators; + uint8_t mode; + int32_t *valuators; + } valuator; +} xcb_input_input_state_data_t; + +/** + * @brief xcb_input_input_state_t + **/ +typedef struct xcb_input_input_state_t { + uint8_t class_id; + uint8_t len; +} xcb_input_input_state_t; + +void * +xcb_input_input_state_data (const xcb_input_input_state_t *R); + +/** + * @brief xcb_input_input_state_iterator_t + **/ +typedef struct xcb_input_input_state_iterator_t { + xcb_input_input_state_t *data; + int rem; + int index; +} xcb_input_input_state_iterator_t; + +/** + * @brief xcb_input_query_device_state_cookie_t + **/ +typedef struct xcb_input_query_device_state_cookie_t { + unsigned int sequence; +} xcb_input_query_device_state_cookie_t; + +/** Opcode for xcb_input_query_device_state. */ +#define XCB_INPUT_QUERY_DEVICE_STATE 30 + +/** + * @brief xcb_input_query_device_state_request_t + **/ +typedef struct xcb_input_query_device_state_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + uint8_t device_id; + uint8_t pad0[3]; +} xcb_input_query_device_state_request_t; + +/** + * @brief xcb_input_query_device_state_reply_t + **/ +typedef struct xcb_input_query_device_state_reply_t { + uint8_t response_type; + uint8_t xi_reply_type; + uint16_t sequence; + uint32_t length; + uint8_t num_classes; + uint8_t pad0[23]; +} xcb_input_query_device_state_reply_t; + +/** Opcode for xcb_input_device_bell. */ +#define XCB_INPUT_DEVICE_BELL 32 + +/** + * @brief xcb_input_device_bell_request_t + **/ +typedef struct xcb_input_device_bell_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + uint8_t device_id; + uint8_t feedback_id; + uint8_t feedback_class; + int8_t percent; +} xcb_input_device_bell_request_t; + +/** + * @brief xcb_input_set_device_valuators_cookie_t + **/ +typedef struct xcb_input_set_device_valuators_cookie_t { + unsigned int sequence; +} xcb_input_set_device_valuators_cookie_t; + +/** Opcode for xcb_input_set_device_valuators. */ +#define XCB_INPUT_SET_DEVICE_VALUATORS 33 + +/** + * @brief xcb_input_set_device_valuators_request_t + **/ +typedef struct xcb_input_set_device_valuators_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + uint8_t device_id; + uint8_t first_valuator; + uint8_t num_valuators; + uint8_t pad0; +} xcb_input_set_device_valuators_request_t; + +/** + * @brief xcb_input_set_device_valuators_reply_t + **/ +typedef struct xcb_input_set_device_valuators_reply_t { + uint8_t response_type; + uint8_t xi_reply_type; + uint16_t sequence; + uint32_t length; + uint8_t status; + uint8_t pad0[23]; +} xcb_input_set_device_valuators_reply_t; + +typedef enum xcb_input_device_control_t { + XCB_INPUT_DEVICE_CONTROL_RESOLUTION = 1, + XCB_INPUT_DEVICE_CONTROL_ABS_CALIB = 2, + XCB_INPUT_DEVICE_CONTROL_CORE = 3, + XCB_INPUT_DEVICE_CONTROL_ENABLE = 4, + XCB_INPUT_DEVICE_CONTROL_ABS_AREA = 5 +} xcb_input_device_control_t; + +/** + * @brief xcb_input_device_resolution_state_t + **/ +typedef struct xcb_input_device_resolution_state_t { + uint16_t control_id; + uint16_t len; + uint32_t num_valuators; +} xcb_input_device_resolution_state_t; + +/** + * @brief xcb_input_device_resolution_state_iterator_t + **/ +typedef struct xcb_input_device_resolution_state_iterator_t { + xcb_input_device_resolution_state_t *data; + int rem; + int index; +} xcb_input_device_resolution_state_iterator_t; + +/** + * @brief xcb_input_device_abs_calib_state_t + **/ +typedef struct xcb_input_device_abs_calib_state_t { + uint16_t control_id; + uint16_t len; + int32_t min_x; + int32_t max_x; + int32_t min_y; + int32_t max_y; + uint32_t flip_x; + uint32_t flip_y; + uint32_t rotation; + uint32_t button_threshold; +} xcb_input_device_abs_calib_state_t; + +/** + * @brief xcb_input_device_abs_calib_state_iterator_t + **/ +typedef struct xcb_input_device_abs_calib_state_iterator_t { + xcb_input_device_abs_calib_state_t *data; + int rem; + int index; +} xcb_input_device_abs_calib_state_iterator_t; + +/** + * @brief xcb_input_device_abs_area_state_t + **/ +typedef struct xcb_input_device_abs_area_state_t { + uint16_t control_id; + uint16_t len; + uint32_t offset_x; + uint32_t offset_y; + uint32_t width; + uint32_t height; + uint32_t screen; + uint32_t following; +} xcb_input_device_abs_area_state_t; + +/** + * @brief xcb_input_device_abs_area_state_iterator_t + **/ +typedef struct xcb_input_device_abs_area_state_iterator_t { + xcb_input_device_abs_area_state_t *data; + int rem; + int index; +} xcb_input_device_abs_area_state_iterator_t; + +/** + * @brief xcb_input_device_core_state_t + **/ +typedef struct xcb_input_device_core_state_t { + uint16_t control_id; + uint16_t len; + uint8_t status; + uint8_t iscore; + uint8_t pad0[2]; +} xcb_input_device_core_state_t; + +/** + * @brief xcb_input_device_core_state_iterator_t + **/ +typedef struct xcb_input_device_core_state_iterator_t { + xcb_input_device_core_state_t *data; + int rem; + int index; +} xcb_input_device_core_state_iterator_t; + +/** + * @brief xcb_input_device_enable_state_t + **/ +typedef struct xcb_input_device_enable_state_t { + uint16_t control_id; + uint16_t len; + uint8_t enable; + uint8_t pad0[3]; +} xcb_input_device_enable_state_t; + +/** + * @brief xcb_input_device_enable_state_iterator_t + **/ +typedef struct xcb_input_device_enable_state_iterator_t { + xcb_input_device_enable_state_t *data; + int rem; + int index; +} xcb_input_device_enable_state_iterator_t; + +/** + * @brief xcb_input_device_state_data_t + **/ +typedef struct xcb_input_device_state_data_t { + struct { + uint32_t num_valuators; + uint32_t *resolution_values; + uint32_t *resolution_min; + uint32_t *resolution_max; + } resolution; + struct { + int32_t min_x; + int32_t max_x; + int32_t min_y; + int32_t max_y; + uint32_t flip_x; + uint32_t flip_y; + uint32_t rotation; + uint32_t button_threshold; + } abs_calib; + struct { + uint8_t status; + uint8_t iscore; + uint8_t pad0[2]; + } core; + struct { + uint8_t enable; + uint8_t pad1[3]; + } enable; + struct { + uint32_t offset_x; + uint32_t offset_y; + uint32_t width; + uint32_t height; + uint32_t screen; + uint32_t following; + } abs_area; +} xcb_input_device_state_data_t; + +/** + * @brief xcb_input_device_state_t + **/ +typedef struct xcb_input_device_state_t { + uint16_t control_id; + uint16_t len; +} xcb_input_device_state_t; + +void * +xcb_input_device_state_data (const xcb_input_device_state_t *R); + +/** + * @brief xcb_input_device_state_iterator_t + **/ +typedef struct xcb_input_device_state_iterator_t { + xcb_input_device_state_t *data; + int rem; + int index; +} xcb_input_device_state_iterator_t; + +/** + * @brief xcb_input_get_device_control_cookie_t + **/ +typedef struct xcb_input_get_device_control_cookie_t { + unsigned int sequence; +} xcb_input_get_device_control_cookie_t; + +/** Opcode for xcb_input_get_device_control. */ +#define XCB_INPUT_GET_DEVICE_CONTROL 34 + +/** + * @brief xcb_input_get_device_control_request_t + **/ +typedef struct xcb_input_get_device_control_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + uint16_t control_id; + uint8_t device_id; + uint8_t pad0; +} xcb_input_get_device_control_request_t; + +/** + * @brief xcb_input_get_device_control_reply_t + **/ +typedef struct xcb_input_get_device_control_reply_t { + uint8_t response_type; + uint8_t xi_reply_type; + uint16_t sequence; + uint32_t length; + uint8_t status; + uint8_t pad0[23]; +} xcb_input_get_device_control_reply_t; + +/** + * @brief xcb_input_device_resolution_ctl_t + **/ +typedef struct xcb_input_device_resolution_ctl_t { + uint16_t control_id; + uint16_t len; + uint8_t first_valuator; + uint8_t num_valuators; + uint8_t pad0[2]; +} xcb_input_device_resolution_ctl_t; + +/** + * @brief xcb_input_device_resolution_ctl_iterator_t + **/ +typedef struct xcb_input_device_resolution_ctl_iterator_t { + xcb_input_device_resolution_ctl_t *data; + int rem; + int index; +} xcb_input_device_resolution_ctl_iterator_t; + +/** + * @brief xcb_input_device_abs_calib_ctl_t + **/ +typedef struct xcb_input_device_abs_calib_ctl_t { + uint16_t control_id; + uint16_t len; + int32_t min_x; + int32_t max_x; + int32_t min_y; + int32_t max_y; + uint32_t flip_x; + uint32_t flip_y; + uint32_t rotation; + uint32_t button_threshold; +} xcb_input_device_abs_calib_ctl_t; + +/** + * @brief xcb_input_device_abs_calib_ctl_iterator_t + **/ +typedef struct xcb_input_device_abs_calib_ctl_iterator_t { + xcb_input_device_abs_calib_ctl_t *data; + int rem; + int index; +} xcb_input_device_abs_calib_ctl_iterator_t; + +/** + * @brief xcb_input_device_abs_area_ctrl_t + **/ +typedef struct xcb_input_device_abs_area_ctrl_t { + uint16_t control_id; + uint16_t len; + uint32_t offset_x; + uint32_t offset_y; + int32_t width; + int32_t height; + int32_t screen; + uint32_t following; +} xcb_input_device_abs_area_ctrl_t; + +/** + * @brief xcb_input_device_abs_area_ctrl_iterator_t + **/ +typedef struct xcb_input_device_abs_area_ctrl_iterator_t { + xcb_input_device_abs_area_ctrl_t *data; + int rem; + int index; +} xcb_input_device_abs_area_ctrl_iterator_t; + +/** + * @brief xcb_input_device_core_ctrl_t + **/ +typedef struct xcb_input_device_core_ctrl_t { + uint16_t control_id; + uint16_t len; + uint8_t status; + uint8_t pad0[3]; +} xcb_input_device_core_ctrl_t; + +/** + * @brief xcb_input_device_core_ctrl_iterator_t + **/ +typedef struct xcb_input_device_core_ctrl_iterator_t { + xcb_input_device_core_ctrl_t *data; + int rem; + int index; +} xcb_input_device_core_ctrl_iterator_t; + +/** + * @brief xcb_input_device_enable_ctrl_t + **/ +typedef struct xcb_input_device_enable_ctrl_t { + uint16_t control_id; + uint16_t len; + uint8_t enable; + uint8_t pad0[3]; +} xcb_input_device_enable_ctrl_t; + +/** + * @brief xcb_input_device_enable_ctrl_iterator_t + **/ +typedef struct xcb_input_device_enable_ctrl_iterator_t { + xcb_input_device_enable_ctrl_t *data; + int rem; + int index; +} xcb_input_device_enable_ctrl_iterator_t; + +/** + * @brief xcb_input_device_ctl_data_t + **/ +typedef struct xcb_input_device_ctl_data_t { + struct { + uint8_t first_valuator; + uint8_t num_valuators; + uint8_t pad0[2]; + uint32_t *resolution_values; + } resolution; + struct { + int32_t min_x; + int32_t max_x; + int32_t min_y; + int32_t max_y; + uint32_t flip_x; + uint32_t flip_y; + uint32_t rotation; + uint32_t button_threshold; + } abs_calib; + struct { + uint8_t status; + uint8_t pad1[3]; + } core; + struct { + uint8_t enable; + uint8_t pad2[3]; + } enable; + struct { + uint32_t offset_x; + uint32_t offset_y; + int32_t width; + int32_t height; + int32_t screen; + uint32_t following; + } abs_area; +} xcb_input_device_ctl_data_t; + +/** + * @brief xcb_input_device_ctl_t + **/ +typedef struct xcb_input_device_ctl_t { + uint16_t control_id; + uint16_t len; +} xcb_input_device_ctl_t; + +void * +xcb_input_device_ctl_data (const xcb_input_device_ctl_t *R); + +/** + * @brief xcb_input_device_ctl_iterator_t + **/ +typedef struct xcb_input_device_ctl_iterator_t { + xcb_input_device_ctl_t *data; + int rem; + int index; +} xcb_input_device_ctl_iterator_t; + +/** + * @brief xcb_input_change_device_control_cookie_t + **/ +typedef struct xcb_input_change_device_control_cookie_t { + unsigned int sequence; +} xcb_input_change_device_control_cookie_t; + +/** Opcode for xcb_input_change_device_control. */ +#define XCB_INPUT_CHANGE_DEVICE_CONTROL 35 + +/** + * @brief xcb_input_change_device_control_request_t + **/ +typedef struct xcb_input_change_device_control_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + uint16_t control_id; + uint8_t device_id; + uint8_t pad0; +} xcb_input_change_device_control_request_t; + +/** + * @brief xcb_input_change_device_control_reply_t + **/ +typedef struct xcb_input_change_device_control_reply_t { + uint8_t response_type; + uint8_t xi_reply_type; + uint16_t sequence; + uint32_t length; + uint8_t status; + uint8_t pad0[23]; +} xcb_input_change_device_control_reply_t; + +/** + * @brief xcb_input_list_device_properties_cookie_t + **/ +typedef struct xcb_input_list_device_properties_cookie_t { + unsigned int sequence; +} xcb_input_list_device_properties_cookie_t; + +/** Opcode for xcb_input_list_device_properties. */ +#define XCB_INPUT_LIST_DEVICE_PROPERTIES 36 + +/** + * @brief xcb_input_list_device_properties_request_t + **/ +typedef struct xcb_input_list_device_properties_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + uint8_t device_id; + uint8_t pad0[3]; +} xcb_input_list_device_properties_request_t; + +/** + * @brief xcb_input_list_device_properties_reply_t + **/ +typedef struct xcb_input_list_device_properties_reply_t { + uint8_t response_type; + uint8_t xi_reply_type; + uint16_t sequence; + uint32_t length; + uint16_t num_atoms; + uint8_t pad0[22]; +} xcb_input_list_device_properties_reply_t; + +typedef enum xcb_input_property_format_t { + XCB_INPUT_PROPERTY_FORMAT_8_BITS = 8, + XCB_INPUT_PROPERTY_FORMAT_16_BITS = 16, + XCB_INPUT_PROPERTY_FORMAT_32_BITS = 32 +} xcb_input_property_format_t; + +/** + * @brief xcb_input_change_device_property_items_t + **/ +typedef struct xcb_input_change_device_property_items_t { + uint8_t *data8; + uint16_t *data16; + uint32_t *data32; +} xcb_input_change_device_property_items_t; + +/** Opcode for xcb_input_change_device_property. */ +#define XCB_INPUT_CHANGE_DEVICE_PROPERTY 37 + +/** + * @brief xcb_input_change_device_property_request_t + **/ +typedef struct xcb_input_change_device_property_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_atom_t property; + xcb_atom_t type; + uint8_t device_id; + uint8_t format; + uint8_t mode; + uint8_t pad0; + uint32_t num_items; +} xcb_input_change_device_property_request_t; + +/** Opcode for xcb_input_delete_device_property. */ +#define XCB_INPUT_DELETE_DEVICE_PROPERTY 38 + +/** + * @brief xcb_input_delete_device_property_request_t + **/ +typedef struct xcb_input_delete_device_property_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_atom_t property; + uint8_t device_id; + uint8_t pad0[3]; +} xcb_input_delete_device_property_request_t; + +/** + * @brief xcb_input_get_device_property_cookie_t + **/ +typedef struct xcb_input_get_device_property_cookie_t { + unsigned int sequence; +} xcb_input_get_device_property_cookie_t; + +/** Opcode for xcb_input_get_device_property. */ +#define XCB_INPUT_GET_DEVICE_PROPERTY 39 + +/** + * @brief xcb_input_get_device_property_request_t + **/ +typedef struct xcb_input_get_device_property_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_atom_t property; + xcb_atom_t type; + uint32_t offset; + uint32_t len; + uint8_t device_id; + uint8_t _delete; + uint8_t pad0[2]; +} xcb_input_get_device_property_request_t; + +/** + * @brief xcb_input_get_device_property_items_t + **/ +typedef struct xcb_input_get_device_property_items_t { + uint8_t *data8; + uint16_t *data16; + uint32_t *data32; +} xcb_input_get_device_property_items_t; + +/** + * @brief xcb_input_get_device_property_reply_t + **/ +typedef struct xcb_input_get_device_property_reply_t { + uint8_t response_type; + uint8_t xi_reply_type; + uint16_t sequence; + uint32_t length; + xcb_atom_t type; + uint32_t bytes_after; + uint32_t num_items; + uint8_t format; + uint8_t device_id; + uint8_t pad0[10]; +} xcb_input_get_device_property_reply_t; + +typedef enum xcb_input_device_t { + XCB_INPUT_DEVICE_ALL = 0, + XCB_INPUT_DEVICE_ALL_MASTER = 1 +} xcb_input_device_t; + +/** + * @brief xcb_input_group_info_t + **/ +typedef struct xcb_input_group_info_t { + uint8_t base; + uint8_t latched; + uint8_t locked; + uint8_t effective; +} xcb_input_group_info_t; + +/** + * @brief xcb_input_group_info_iterator_t + **/ +typedef struct xcb_input_group_info_iterator_t { + xcb_input_group_info_t *data; + int rem; + int index; +} xcb_input_group_info_iterator_t; + +/** + * @brief xcb_input_modifier_info_t + **/ +typedef struct xcb_input_modifier_info_t { + uint32_t base; + uint32_t latched; + uint32_t locked; + uint32_t effective; +} xcb_input_modifier_info_t; + +/** + * @brief xcb_input_modifier_info_iterator_t + **/ +typedef struct xcb_input_modifier_info_iterator_t { + xcb_input_modifier_info_t *data; + int rem; + int index; +} xcb_input_modifier_info_iterator_t; + +/** + * @brief xcb_input_xi_query_pointer_cookie_t + **/ +typedef struct xcb_input_xi_query_pointer_cookie_t { + unsigned int sequence; +} xcb_input_xi_query_pointer_cookie_t; + +/** Opcode for xcb_input_xi_query_pointer. */ +#define XCB_INPUT_XI_QUERY_POINTER 40 + +/** + * @brief xcb_input_xi_query_pointer_request_t + **/ +typedef struct xcb_input_xi_query_pointer_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_window_t window; + xcb_input_device_id_t deviceid; + uint8_t pad0[2]; +} xcb_input_xi_query_pointer_request_t; + +/** + * @brief xcb_input_xi_query_pointer_reply_t + **/ +typedef struct xcb_input_xi_query_pointer_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + xcb_window_t root; + xcb_window_t child; + xcb_input_fp1616_t root_x; + xcb_input_fp1616_t root_y; + xcb_input_fp1616_t win_x; + xcb_input_fp1616_t win_y; + uint8_t same_screen; + uint8_t pad1; + uint16_t buttons_len; + xcb_input_modifier_info_t mods; + xcb_input_group_info_t group; +} xcb_input_xi_query_pointer_reply_t; + +/** Opcode for xcb_input_xi_warp_pointer. */ +#define XCB_INPUT_XI_WARP_POINTER 41 + +/** + * @brief xcb_input_xi_warp_pointer_request_t + **/ +typedef struct xcb_input_xi_warp_pointer_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_window_t src_win; + xcb_window_t dst_win; + xcb_input_fp1616_t src_x; + xcb_input_fp1616_t src_y; + uint16_t src_width; + uint16_t src_height; + xcb_input_fp1616_t dst_x; + xcb_input_fp1616_t dst_y; + xcb_input_device_id_t deviceid; + uint8_t pad0[2]; +} xcb_input_xi_warp_pointer_request_t; + +/** Opcode for xcb_input_xi_change_cursor. */ +#define XCB_INPUT_XI_CHANGE_CURSOR 42 + +/** + * @brief xcb_input_xi_change_cursor_request_t + **/ +typedef struct xcb_input_xi_change_cursor_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_window_t window; + xcb_cursor_t cursor; + xcb_input_device_id_t deviceid; + uint8_t pad0[2]; +} xcb_input_xi_change_cursor_request_t; + +typedef enum xcb_input_hierarchy_change_type_t { + XCB_INPUT_HIERARCHY_CHANGE_TYPE_ADD_MASTER = 1, + XCB_INPUT_HIERARCHY_CHANGE_TYPE_REMOVE_MASTER = 2, + XCB_INPUT_HIERARCHY_CHANGE_TYPE_ATTACH_SLAVE = 3, + XCB_INPUT_HIERARCHY_CHANGE_TYPE_DETACH_SLAVE = 4 +} xcb_input_hierarchy_change_type_t; + +typedef enum xcb_input_change_mode_t { + XCB_INPUT_CHANGE_MODE_ATTACH = 1, + XCB_INPUT_CHANGE_MODE_FLOAT = 2 +} xcb_input_change_mode_t; + +/** + * @brief xcb_input_add_master_t + **/ +typedef struct xcb_input_add_master_t { + uint16_t type; + uint16_t len; + uint16_t name_len; + uint8_t send_core; + uint8_t enable; +} xcb_input_add_master_t; + +/** + * @brief xcb_input_add_master_iterator_t + **/ +typedef struct xcb_input_add_master_iterator_t { + xcb_input_add_master_t *data; + int rem; + int index; +} xcb_input_add_master_iterator_t; + +/** + * @brief xcb_input_remove_master_t + **/ +typedef struct xcb_input_remove_master_t { + uint16_t type; + uint16_t len; + xcb_input_device_id_t deviceid; + uint8_t return_mode; + uint8_t pad0; + xcb_input_device_id_t return_pointer; + xcb_input_device_id_t return_keyboard; +} xcb_input_remove_master_t; + +/** + * @brief xcb_input_remove_master_iterator_t + **/ +typedef struct xcb_input_remove_master_iterator_t { + xcb_input_remove_master_t *data; + int rem; + int index; +} xcb_input_remove_master_iterator_t; + +/** + * @brief xcb_input_attach_slave_t + **/ +typedef struct xcb_input_attach_slave_t { + uint16_t type; + uint16_t len; + xcb_input_device_id_t deviceid; + xcb_input_device_id_t master; +} xcb_input_attach_slave_t; + +/** + * @brief xcb_input_attach_slave_iterator_t + **/ +typedef struct xcb_input_attach_slave_iterator_t { + xcb_input_attach_slave_t *data; + int rem; + int index; +} xcb_input_attach_slave_iterator_t; + +/** + * @brief xcb_input_detach_slave_t + **/ +typedef struct xcb_input_detach_slave_t { + uint16_t type; + uint16_t len; + xcb_input_device_id_t deviceid; + uint8_t pad0[2]; +} xcb_input_detach_slave_t; + +/** + * @brief xcb_input_detach_slave_iterator_t + **/ +typedef struct xcb_input_detach_slave_iterator_t { + xcb_input_detach_slave_t *data; + int rem; + int index; +} xcb_input_detach_slave_iterator_t; + +/** + * @brief xcb_input_hierarchy_change_data_t + **/ +typedef struct xcb_input_hierarchy_change_data_t { + struct { + uint16_t name_len; + uint8_t send_core; + uint8_t enable; + char *name; + } add_master; + struct { + xcb_input_device_id_t deviceid; + uint8_t return_mode; + uint8_t pad1; + xcb_input_device_id_t return_pointer; + xcb_input_device_id_t return_keyboard; + } remove_master; + struct { + xcb_input_device_id_t deviceid; + xcb_input_device_id_t master; + } attach_slave; + struct { + xcb_input_device_id_t deviceid; + uint8_t pad2[2]; + } detach_slave; +} xcb_input_hierarchy_change_data_t; + +/** + * @brief xcb_input_hierarchy_change_t + **/ +typedef struct xcb_input_hierarchy_change_t { + uint16_t type; + uint16_t len; +} xcb_input_hierarchy_change_t; + +void * +xcb_input_hierarchy_change_data (const xcb_input_hierarchy_change_t *R); + +/** + * @brief xcb_input_hierarchy_change_iterator_t + **/ +typedef struct xcb_input_hierarchy_change_iterator_t { + xcb_input_hierarchy_change_t *data; + int rem; + int index; +} xcb_input_hierarchy_change_iterator_t; + +/** Opcode for xcb_input_xi_change_hierarchy. */ +#define XCB_INPUT_XI_CHANGE_HIERARCHY 43 + +/** + * @brief xcb_input_xi_change_hierarchy_request_t + **/ +typedef struct xcb_input_xi_change_hierarchy_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + uint8_t num_changes; + uint8_t pad0[3]; +} xcb_input_xi_change_hierarchy_request_t; + +/** Opcode for xcb_input_xi_set_client_pointer. */ +#define XCB_INPUT_XI_SET_CLIENT_POINTER 44 + +/** + * @brief xcb_input_xi_set_client_pointer_request_t + **/ +typedef struct xcb_input_xi_set_client_pointer_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_window_t window; + xcb_input_device_id_t deviceid; + uint8_t pad0[2]; +} xcb_input_xi_set_client_pointer_request_t; + +/** + * @brief xcb_input_xi_get_client_pointer_cookie_t + **/ +typedef struct xcb_input_xi_get_client_pointer_cookie_t { + unsigned int sequence; +} xcb_input_xi_get_client_pointer_cookie_t; + +/** Opcode for xcb_input_xi_get_client_pointer. */ +#define XCB_INPUT_XI_GET_CLIENT_POINTER 45 + +/** + * @brief xcb_input_xi_get_client_pointer_request_t + **/ +typedef struct xcb_input_xi_get_client_pointer_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_window_t window; +} xcb_input_xi_get_client_pointer_request_t; + +/** + * @brief xcb_input_xi_get_client_pointer_reply_t + **/ +typedef struct xcb_input_xi_get_client_pointer_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint8_t set; + uint8_t pad1; + xcb_input_device_id_t deviceid; + uint8_t pad2[20]; +} xcb_input_xi_get_client_pointer_reply_t; + +typedef enum xcb_input_xi_event_mask_t { + XCB_INPUT_XI_EVENT_MASK_DEVICE_CHANGED = 2, + XCB_INPUT_XI_EVENT_MASK_KEY_PRESS = 4, + XCB_INPUT_XI_EVENT_MASK_KEY_RELEASE = 8, + XCB_INPUT_XI_EVENT_MASK_BUTTON_PRESS = 16, + XCB_INPUT_XI_EVENT_MASK_BUTTON_RELEASE = 32, + XCB_INPUT_XI_EVENT_MASK_MOTION = 64, + XCB_INPUT_XI_EVENT_MASK_ENTER = 128, + XCB_INPUT_XI_EVENT_MASK_LEAVE = 256, + XCB_INPUT_XI_EVENT_MASK_FOCUS_IN = 512, + XCB_INPUT_XI_EVENT_MASK_FOCUS_OUT = 1024, + XCB_INPUT_XI_EVENT_MASK_HIERARCHY = 2048, + XCB_INPUT_XI_EVENT_MASK_PROPERTY = 4096, + XCB_INPUT_XI_EVENT_MASK_RAW_KEY_PRESS = 8192, + XCB_INPUT_XI_EVENT_MASK_RAW_KEY_RELEASE = 16384, + XCB_INPUT_XI_EVENT_MASK_RAW_BUTTON_PRESS = 32768, + XCB_INPUT_XI_EVENT_MASK_RAW_BUTTON_RELEASE = 65536, + XCB_INPUT_XI_EVENT_MASK_RAW_MOTION = 131072, + XCB_INPUT_XI_EVENT_MASK_TOUCH_BEGIN = 262144, + XCB_INPUT_XI_EVENT_MASK_TOUCH_UPDATE = 524288, + XCB_INPUT_XI_EVENT_MASK_TOUCH_END = 1048576, + XCB_INPUT_XI_EVENT_MASK_TOUCH_OWNERSHIP = 2097152, + XCB_INPUT_XI_EVENT_MASK_RAW_TOUCH_BEGIN = 4194304, + XCB_INPUT_XI_EVENT_MASK_RAW_TOUCH_UPDATE = 8388608, + XCB_INPUT_XI_EVENT_MASK_RAW_TOUCH_END = 16777216, + XCB_INPUT_XI_EVENT_MASK_BARRIER_HIT = 33554432, + XCB_INPUT_XI_EVENT_MASK_BARRIER_LEAVE = 67108864 +} xcb_input_xi_event_mask_t; + +/** + * @brief xcb_input_event_mask_t + **/ +typedef struct xcb_input_event_mask_t { + xcb_input_device_id_t deviceid; + uint16_t mask_len; +} xcb_input_event_mask_t; + +/** + * @brief xcb_input_event_mask_iterator_t + **/ +typedef struct xcb_input_event_mask_iterator_t { + xcb_input_event_mask_t *data; + int rem; + int index; +} xcb_input_event_mask_iterator_t; + +/** Opcode for xcb_input_xi_select_events. */ +#define XCB_INPUT_XI_SELECT_EVENTS 46 + +/** + * @brief xcb_input_xi_select_events_request_t + **/ +typedef struct xcb_input_xi_select_events_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_window_t window; + uint16_t num_mask; + uint8_t pad0[2]; +} xcb_input_xi_select_events_request_t; + +/** + * @brief xcb_input_xi_query_version_cookie_t + **/ +typedef struct xcb_input_xi_query_version_cookie_t { + unsigned int sequence; +} xcb_input_xi_query_version_cookie_t; + +/** Opcode for xcb_input_xi_query_version. */ +#define XCB_INPUT_XI_QUERY_VERSION 47 + +/** + * @brief xcb_input_xi_query_version_request_t + **/ +typedef struct xcb_input_xi_query_version_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + uint16_t major_version; + uint16_t minor_version; +} xcb_input_xi_query_version_request_t; + +/** + * @brief xcb_input_xi_query_version_reply_t + **/ +typedef struct xcb_input_xi_query_version_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint16_t major_version; + uint16_t minor_version; + uint8_t pad1[20]; +} xcb_input_xi_query_version_reply_t; + +typedef enum xcb_input_device_class_type_t { + XCB_INPUT_DEVICE_CLASS_TYPE_KEY = 0, + XCB_INPUT_DEVICE_CLASS_TYPE_BUTTON = 1, + XCB_INPUT_DEVICE_CLASS_TYPE_VALUATOR = 2, + XCB_INPUT_DEVICE_CLASS_TYPE_SCROLL = 3, + XCB_INPUT_DEVICE_CLASS_TYPE_TOUCH = 8, + XCB_INPUT_DEVICE_CLASS_TYPE_GESTURE = 9 +} xcb_input_device_class_type_t; + +typedef enum xcb_input_device_type_t { + XCB_INPUT_DEVICE_TYPE_MASTER_POINTER = 1, + XCB_INPUT_DEVICE_TYPE_MASTER_KEYBOARD = 2, + XCB_INPUT_DEVICE_TYPE_SLAVE_POINTER = 3, + XCB_INPUT_DEVICE_TYPE_SLAVE_KEYBOARD = 4, + XCB_INPUT_DEVICE_TYPE_FLOATING_SLAVE = 5 +} xcb_input_device_type_t; + +typedef enum xcb_input_scroll_flags_t { + XCB_INPUT_SCROLL_FLAGS_NO_EMULATION = 1, + XCB_INPUT_SCROLL_FLAGS_PREFERRED = 2 +} xcb_input_scroll_flags_t; + +typedef enum xcb_input_scroll_type_t { + XCB_INPUT_SCROLL_TYPE_VERTICAL = 1, + XCB_INPUT_SCROLL_TYPE_HORIZONTAL = 2 +} xcb_input_scroll_type_t; + +typedef enum xcb_input_touch_mode_t { + XCB_INPUT_TOUCH_MODE_DIRECT = 1, + XCB_INPUT_TOUCH_MODE_DEPENDENT = 2 +} xcb_input_touch_mode_t; + +/** + * @brief xcb_input_button_class_t + **/ +typedef struct xcb_input_button_class_t { + uint16_t type; + uint16_t len; + xcb_input_device_id_t sourceid; + uint16_t num_buttons; +} xcb_input_button_class_t; + +/** + * @brief xcb_input_button_class_iterator_t + **/ +typedef struct xcb_input_button_class_iterator_t { + xcb_input_button_class_t *data; + int rem; + int index; +} xcb_input_button_class_iterator_t; + +/** + * @brief xcb_input_key_class_t + **/ +typedef struct xcb_input_key_class_t { + uint16_t type; + uint16_t len; + xcb_input_device_id_t sourceid; + uint16_t num_keys; +} xcb_input_key_class_t; + +/** + * @brief xcb_input_key_class_iterator_t + **/ +typedef struct xcb_input_key_class_iterator_t { + xcb_input_key_class_t *data; + int rem; + int index; +} xcb_input_key_class_iterator_t; + +/** + * @brief xcb_input_scroll_class_t + **/ +typedef struct xcb_input_scroll_class_t { + uint16_t type; + uint16_t len; + xcb_input_device_id_t sourceid; + uint16_t number; + uint16_t scroll_type; + uint8_t pad0[2]; + uint32_t flags; + xcb_input_fp3232_t increment; +} xcb_input_scroll_class_t; + +/** + * @brief xcb_input_scroll_class_iterator_t + **/ +typedef struct xcb_input_scroll_class_iterator_t { + xcb_input_scroll_class_t *data; + int rem; + int index; +} xcb_input_scroll_class_iterator_t; + +/** + * @brief xcb_input_touch_class_t + **/ +typedef struct xcb_input_touch_class_t { + uint16_t type; + uint16_t len; + xcb_input_device_id_t sourceid; + uint8_t mode; + uint8_t num_touches; +} xcb_input_touch_class_t; + +/** + * @brief xcb_input_touch_class_iterator_t + **/ +typedef struct xcb_input_touch_class_iterator_t { + xcb_input_touch_class_t *data; + int rem; + int index; +} xcb_input_touch_class_iterator_t; + +/** + * @brief xcb_input_gesture_class_t + **/ +typedef struct xcb_input_gesture_class_t { + uint16_t type; + uint16_t len; + xcb_input_device_id_t sourceid; + uint8_t num_touches; + uint8_t pad0; +} xcb_input_gesture_class_t; + +/** + * @brief xcb_input_gesture_class_iterator_t + **/ +typedef struct xcb_input_gesture_class_iterator_t { + xcb_input_gesture_class_t *data; + int rem; + int index; +} xcb_input_gesture_class_iterator_t; + +/** + * @brief xcb_input_valuator_class_t + **/ +typedef struct xcb_input_valuator_class_t { + uint16_t type; + uint16_t len; + xcb_input_device_id_t sourceid; + uint16_t number; + xcb_atom_t label; + xcb_input_fp3232_t min; + xcb_input_fp3232_t max; + xcb_input_fp3232_t value; + uint32_t resolution; + uint8_t mode; + uint8_t pad0[3]; +} xcb_input_valuator_class_t; + +/** + * @brief xcb_input_valuator_class_iterator_t + **/ +typedef struct xcb_input_valuator_class_iterator_t { + xcb_input_valuator_class_t *data; + int rem; + int index; +} xcb_input_valuator_class_iterator_t; + +/** + * @brief xcb_input_device_class_data_t + **/ +typedef struct xcb_input_device_class_data_t { + struct { + uint16_t num_keys; + uint32_t *keys; + } key; + struct { + uint16_t num_buttons; + uint32_t *state; + xcb_atom_t *labels; + } button; + struct { + uint16_t number; + xcb_atom_t label; + xcb_input_fp3232_t min; + xcb_input_fp3232_t max; + xcb_input_fp3232_t value; + uint32_t resolution; + uint8_t mode; + uint8_t pad0[3]; + } valuator; + struct { + uint16_t number; + uint16_t scroll_type; + uint8_t pad1[2]; + uint32_t flags; + xcb_input_fp3232_t increment; + } scroll; + struct { + uint8_t mode; + uint8_t num_touches; + } touch; + struct { + uint8_t num_touches; + uint8_t pad2; + } gesture; +} xcb_input_device_class_data_t; + +/** + * @brief xcb_input_device_class_t + **/ +typedef struct xcb_input_device_class_t { + uint16_t type; + uint16_t len; + xcb_input_device_id_t sourceid; +} xcb_input_device_class_t; + +void * +xcb_input_device_class_data (const xcb_input_device_class_t *R); + +/** + * @brief xcb_input_device_class_iterator_t + **/ +typedef struct xcb_input_device_class_iterator_t { + xcb_input_device_class_t *data; + int rem; + int index; +} xcb_input_device_class_iterator_t; + +/** + * @brief xcb_input_xi_device_info_t + **/ +typedef struct xcb_input_xi_device_info_t { + xcb_input_device_id_t deviceid; + uint16_t type; + xcb_input_device_id_t attachment; + uint16_t num_classes; + uint16_t name_len; + uint8_t enabled; + uint8_t pad0; +} xcb_input_xi_device_info_t; + +/** + * @brief xcb_input_xi_device_info_iterator_t + **/ +typedef struct xcb_input_xi_device_info_iterator_t { + xcb_input_xi_device_info_t *data; + int rem; + int index; +} xcb_input_xi_device_info_iterator_t; + +/** + * @brief xcb_input_xi_query_device_cookie_t + **/ +typedef struct xcb_input_xi_query_device_cookie_t { + unsigned int sequence; +} xcb_input_xi_query_device_cookie_t; + +/** Opcode for xcb_input_xi_query_device. */ +#define XCB_INPUT_XI_QUERY_DEVICE 48 + +/** + * @brief xcb_input_xi_query_device_request_t + **/ +typedef struct xcb_input_xi_query_device_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_input_device_id_t deviceid; + uint8_t pad0[2]; +} xcb_input_xi_query_device_request_t; + +/** + * @brief xcb_input_xi_query_device_reply_t + **/ +typedef struct xcb_input_xi_query_device_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint16_t num_infos; + uint8_t pad1[22]; +} xcb_input_xi_query_device_reply_t; + +/** Opcode for xcb_input_xi_set_focus. */ +#define XCB_INPUT_XI_SET_FOCUS 49 + +/** + * @brief xcb_input_xi_set_focus_request_t + **/ +typedef struct xcb_input_xi_set_focus_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_window_t window; + xcb_timestamp_t time; + xcb_input_device_id_t deviceid; + uint8_t pad0[2]; +} xcb_input_xi_set_focus_request_t; + +/** + * @brief xcb_input_xi_get_focus_cookie_t + **/ +typedef struct xcb_input_xi_get_focus_cookie_t { + unsigned int sequence; +} xcb_input_xi_get_focus_cookie_t; + +/** Opcode for xcb_input_xi_get_focus. */ +#define XCB_INPUT_XI_GET_FOCUS 50 + +/** + * @brief xcb_input_xi_get_focus_request_t + **/ +typedef struct xcb_input_xi_get_focus_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_input_device_id_t deviceid; + uint8_t pad0[2]; +} xcb_input_xi_get_focus_request_t; + +/** + * @brief xcb_input_xi_get_focus_reply_t + **/ +typedef struct xcb_input_xi_get_focus_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + xcb_window_t focus; + uint8_t pad1[20]; +} xcb_input_xi_get_focus_reply_t; + +typedef enum xcb_input_grab_owner_t { + XCB_INPUT_GRAB_OWNER_NO_OWNER = 0, + XCB_INPUT_GRAB_OWNER_OWNER = 1 +} xcb_input_grab_owner_t; + +/** + * @brief xcb_input_xi_grab_device_cookie_t + **/ +typedef struct xcb_input_xi_grab_device_cookie_t { + unsigned int sequence; +} xcb_input_xi_grab_device_cookie_t; + +/** Opcode for xcb_input_xi_grab_device. */ +#define XCB_INPUT_XI_GRAB_DEVICE 51 + +/** + * @brief xcb_input_xi_grab_device_request_t + **/ +typedef struct xcb_input_xi_grab_device_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_window_t window; + xcb_timestamp_t time; + xcb_cursor_t cursor; + xcb_input_device_id_t deviceid; + uint8_t mode; + uint8_t paired_device_mode; + uint8_t owner_events; + uint8_t pad0; + uint16_t mask_len; +} xcb_input_xi_grab_device_request_t; + +/** + * @brief xcb_input_xi_grab_device_reply_t + **/ +typedef struct xcb_input_xi_grab_device_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint8_t status; + uint8_t pad1[23]; +} xcb_input_xi_grab_device_reply_t; + +/** Opcode for xcb_input_xi_ungrab_device. */ +#define XCB_INPUT_XI_UNGRAB_DEVICE 52 + +/** + * @brief xcb_input_xi_ungrab_device_request_t + **/ +typedef struct xcb_input_xi_ungrab_device_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_timestamp_t time; + xcb_input_device_id_t deviceid; + uint8_t pad0[2]; +} xcb_input_xi_ungrab_device_request_t; + +typedef enum xcb_input_event_mode_t { + XCB_INPUT_EVENT_MODE_ASYNC_DEVICE = 0, + XCB_INPUT_EVENT_MODE_SYNC_DEVICE = 1, + XCB_INPUT_EVENT_MODE_REPLAY_DEVICE = 2, + XCB_INPUT_EVENT_MODE_ASYNC_PAIRED_DEVICE = 3, + XCB_INPUT_EVENT_MODE_ASYNC_PAIR = 4, + XCB_INPUT_EVENT_MODE_SYNC_PAIR = 5, + XCB_INPUT_EVENT_MODE_ACCEPT_TOUCH = 6, + XCB_INPUT_EVENT_MODE_REJECT_TOUCH = 7 +} xcb_input_event_mode_t; + +/** Opcode for xcb_input_xi_allow_events. */ +#define XCB_INPUT_XI_ALLOW_EVENTS 53 + +/** + * @brief xcb_input_xi_allow_events_request_t + **/ +typedef struct xcb_input_xi_allow_events_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_timestamp_t time; + xcb_input_device_id_t deviceid; + uint8_t event_mode; + uint8_t pad0; + uint32_t touchid; + xcb_window_t grab_window; +} xcb_input_xi_allow_events_request_t; + +typedef enum xcb_input_grab_mode_22_t { + XCB_INPUT_GRAB_MODE_22_SYNC = 0, + XCB_INPUT_GRAB_MODE_22_ASYNC = 1, + XCB_INPUT_GRAB_MODE_22_TOUCH = 2 +} xcb_input_grab_mode_22_t; + +typedef enum xcb_input_grab_type_t { + XCB_INPUT_GRAB_TYPE_BUTTON = 0, + XCB_INPUT_GRAB_TYPE_KEYCODE = 1, + XCB_INPUT_GRAB_TYPE_ENTER = 2, + XCB_INPUT_GRAB_TYPE_FOCUS_IN = 3, + XCB_INPUT_GRAB_TYPE_TOUCH_BEGIN = 4, + XCB_INPUT_GRAB_TYPE_GESTURE_PINCH_BEGIN = 5, + XCB_INPUT_GRAB_TYPE_GESTURE_SWIPE_BEGIN = 6 +} xcb_input_grab_type_t; + +typedef enum xcb_input_modifier_mask_t { + XCB_INPUT_MODIFIER_MASK_ANY = 2147483648 +} xcb_input_modifier_mask_t; + +/** + * @brief xcb_input_grab_modifier_info_t + **/ +typedef struct xcb_input_grab_modifier_info_t { + uint32_t modifiers; + uint8_t status; + uint8_t pad0[3]; +} xcb_input_grab_modifier_info_t; + +/** + * @brief xcb_input_grab_modifier_info_iterator_t + **/ +typedef struct xcb_input_grab_modifier_info_iterator_t { + xcb_input_grab_modifier_info_t *data; + int rem; + int index; +} xcb_input_grab_modifier_info_iterator_t; + +/** + * @brief xcb_input_xi_passive_grab_device_cookie_t + **/ +typedef struct xcb_input_xi_passive_grab_device_cookie_t { + unsigned int sequence; +} xcb_input_xi_passive_grab_device_cookie_t; + +/** Opcode for xcb_input_xi_passive_grab_device. */ +#define XCB_INPUT_XI_PASSIVE_GRAB_DEVICE 54 + +/** + * @brief xcb_input_xi_passive_grab_device_request_t + **/ +typedef struct xcb_input_xi_passive_grab_device_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_timestamp_t time; + xcb_window_t grab_window; + xcb_cursor_t cursor; + uint32_t detail; + xcb_input_device_id_t deviceid; + uint16_t num_modifiers; + uint16_t mask_len; + uint8_t grab_type; + uint8_t grab_mode; + uint8_t paired_device_mode; + uint8_t owner_events; + uint8_t pad0[2]; +} xcb_input_xi_passive_grab_device_request_t; + +/** + * @brief xcb_input_xi_passive_grab_device_reply_t + **/ +typedef struct xcb_input_xi_passive_grab_device_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint16_t num_modifiers; + uint8_t pad1[22]; +} xcb_input_xi_passive_grab_device_reply_t; + +/** Opcode for xcb_input_xi_passive_ungrab_device. */ +#define XCB_INPUT_XI_PASSIVE_UNGRAB_DEVICE 55 + +/** + * @brief xcb_input_xi_passive_ungrab_device_request_t + **/ +typedef struct xcb_input_xi_passive_ungrab_device_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_window_t grab_window; + uint32_t detail; + xcb_input_device_id_t deviceid; + uint16_t num_modifiers; + uint8_t grab_type; + uint8_t pad0[3]; +} xcb_input_xi_passive_ungrab_device_request_t; + +/** + * @brief xcb_input_xi_list_properties_cookie_t + **/ +typedef struct xcb_input_xi_list_properties_cookie_t { + unsigned int sequence; +} xcb_input_xi_list_properties_cookie_t; + +/** Opcode for xcb_input_xi_list_properties. */ +#define XCB_INPUT_XI_LIST_PROPERTIES 56 + +/** + * @brief xcb_input_xi_list_properties_request_t + **/ +typedef struct xcb_input_xi_list_properties_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_input_device_id_t deviceid; + uint8_t pad0[2]; +} xcb_input_xi_list_properties_request_t; + +/** + * @brief xcb_input_xi_list_properties_reply_t + **/ +typedef struct xcb_input_xi_list_properties_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint16_t num_properties; + uint8_t pad1[22]; +} xcb_input_xi_list_properties_reply_t; + +/** + * @brief xcb_input_xi_change_property_items_t + **/ +typedef struct xcb_input_xi_change_property_items_t { + uint8_t *data8; + uint16_t *data16; + uint32_t *data32; +} xcb_input_xi_change_property_items_t; + +/** Opcode for xcb_input_xi_change_property. */ +#define XCB_INPUT_XI_CHANGE_PROPERTY 57 + +/** + * @brief xcb_input_xi_change_property_request_t + **/ +typedef struct xcb_input_xi_change_property_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_input_device_id_t deviceid; + uint8_t mode; + uint8_t format; + xcb_atom_t property; + xcb_atom_t type; + uint32_t num_items; +} xcb_input_xi_change_property_request_t; + +/** Opcode for xcb_input_xi_delete_property. */ +#define XCB_INPUT_XI_DELETE_PROPERTY 58 + +/** + * @brief xcb_input_xi_delete_property_request_t + **/ +typedef struct xcb_input_xi_delete_property_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_input_device_id_t deviceid; + uint8_t pad0[2]; + xcb_atom_t property; +} xcb_input_xi_delete_property_request_t; + +/** + * @brief xcb_input_xi_get_property_cookie_t + **/ +typedef struct xcb_input_xi_get_property_cookie_t { + unsigned int sequence; +} xcb_input_xi_get_property_cookie_t; + +/** Opcode for xcb_input_xi_get_property. */ +#define XCB_INPUT_XI_GET_PROPERTY 59 + +/** + * @brief xcb_input_xi_get_property_request_t + **/ +typedef struct xcb_input_xi_get_property_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_input_device_id_t deviceid; + uint8_t _delete; + uint8_t pad0; + xcb_atom_t property; + xcb_atom_t type; + uint32_t offset; + uint32_t len; +} xcb_input_xi_get_property_request_t; + +/** + * @brief xcb_input_xi_get_property_items_t + **/ +typedef struct xcb_input_xi_get_property_items_t { + uint8_t *data8; + uint16_t *data16; + uint32_t *data32; +} xcb_input_xi_get_property_items_t; + +/** + * @brief xcb_input_xi_get_property_reply_t + **/ +typedef struct xcb_input_xi_get_property_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + xcb_atom_t type; + uint32_t bytes_after; + uint32_t num_items; + uint8_t format; + uint8_t pad1[11]; +} xcb_input_xi_get_property_reply_t; + +/** + * @brief xcb_input_xi_get_selected_events_cookie_t + **/ +typedef struct xcb_input_xi_get_selected_events_cookie_t { + unsigned int sequence; +} xcb_input_xi_get_selected_events_cookie_t; + +/** Opcode for xcb_input_xi_get_selected_events. */ +#define XCB_INPUT_XI_GET_SELECTED_EVENTS 60 + +/** + * @brief xcb_input_xi_get_selected_events_request_t + **/ +typedef struct xcb_input_xi_get_selected_events_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_window_t window; +} xcb_input_xi_get_selected_events_request_t; + +/** + * @brief xcb_input_xi_get_selected_events_reply_t + **/ +typedef struct xcb_input_xi_get_selected_events_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint16_t num_masks; + uint8_t pad1[22]; +} xcb_input_xi_get_selected_events_reply_t; + +/** + * @brief xcb_input_barrier_release_pointer_info_t + **/ +typedef struct xcb_input_barrier_release_pointer_info_t { + xcb_input_device_id_t deviceid; + uint8_t pad0[2]; + xcb_xfixes_barrier_t barrier; + uint32_t eventid; +} xcb_input_barrier_release_pointer_info_t; + +/** + * @brief xcb_input_barrier_release_pointer_info_iterator_t + **/ +typedef struct xcb_input_barrier_release_pointer_info_iterator_t { + xcb_input_barrier_release_pointer_info_t *data; + int rem; + int index; +} xcb_input_barrier_release_pointer_info_iterator_t; + +/** Opcode for xcb_input_xi_barrier_release_pointer. */ +#define XCB_INPUT_XI_BARRIER_RELEASE_POINTER 61 + +/** + * @brief xcb_input_xi_barrier_release_pointer_request_t + **/ +typedef struct xcb_input_xi_barrier_release_pointer_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + uint32_t num_barriers; +} xcb_input_xi_barrier_release_pointer_request_t; + +/** Opcode for xcb_input_device_valuator. */ +#define XCB_INPUT_DEVICE_VALUATOR 0 + +/** + * @brief xcb_input_device_valuator_event_t + **/ +typedef struct xcb_input_device_valuator_event_t { + uint8_t response_type; + uint8_t device_id; + uint16_t sequence; + uint16_t device_state; + uint8_t num_valuators; + uint8_t first_valuator; + int32_t valuators[6]; +} xcb_input_device_valuator_event_t; + +typedef enum xcb_input_more_events_mask_t { + XCB_INPUT_MORE_EVENTS_MASK_MORE_EVENTS = 128 +} xcb_input_more_events_mask_t; + +/** Opcode for xcb_input_device_key_press. */ +#define XCB_INPUT_DEVICE_KEY_PRESS 1 + +/** + * @brief xcb_input_device_key_press_event_t + **/ +typedef struct xcb_input_device_key_press_event_t { + uint8_t response_type; + uint8_t detail; + uint16_t sequence; + xcb_timestamp_t time; + xcb_window_t root; + xcb_window_t event; + xcb_window_t child; + int16_t root_x; + int16_t root_y; + int16_t event_x; + int16_t event_y; + uint16_t state; + uint8_t same_screen; + uint8_t device_id; +} xcb_input_device_key_press_event_t; + +/** Opcode for xcb_input_device_key_release. */ +#define XCB_INPUT_DEVICE_KEY_RELEASE 2 + +typedef xcb_input_device_key_press_event_t xcb_input_device_key_release_event_t; + +/** Opcode for xcb_input_device_button_press. */ +#define XCB_INPUT_DEVICE_BUTTON_PRESS 3 + +typedef xcb_input_device_key_press_event_t xcb_input_device_button_press_event_t; + +/** Opcode for xcb_input_device_button_release. */ +#define XCB_INPUT_DEVICE_BUTTON_RELEASE 4 + +typedef xcb_input_device_key_press_event_t xcb_input_device_button_release_event_t; + +/** Opcode for xcb_input_device_motion_notify. */ +#define XCB_INPUT_DEVICE_MOTION_NOTIFY 5 + +typedef xcb_input_device_key_press_event_t xcb_input_device_motion_notify_event_t; + +/** Opcode for xcb_input_device_focus_in. */ +#define XCB_INPUT_DEVICE_FOCUS_IN 6 + +/** + * @brief xcb_input_device_focus_in_event_t + **/ +typedef struct xcb_input_device_focus_in_event_t { + uint8_t response_type; + uint8_t detail; + uint16_t sequence; + xcb_timestamp_t time; + xcb_window_t window; + uint8_t mode; + uint8_t device_id; + uint8_t pad0[18]; +} xcb_input_device_focus_in_event_t; + +/** Opcode for xcb_input_device_focus_out. */ +#define XCB_INPUT_DEVICE_FOCUS_OUT 7 + +typedef xcb_input_device_focus_in_event_t xcb_input_device_focus_out_event_t; + +/** Opcode for xcb_input_proximity_in. */ +#define XCB_INPUT_PROXIMITY_IN 8 + +typedef xcb_input_device_key_press_event_t xcb_input_proximity_in_event_t; + +/** Opcode for xcb_input_proximity_out. */ +#define XCB_INPUT_PROXIMITY_OUT 9 + +typedef xcb_input_device_key_press_event_t xcb_input_proximity_out_event_t; + +typedef enum xcb_input_classes_reported_mask_t { + XCB_INPUT_CLASSES_REPORTED_MASK_OUT_OF_PROXIMITY = 128, + XCB_INPUT_CLASSES_REPORTED_MASK_DEVICE_MODE_ABSOLUTE = 64, + XCB_INPUT_CLASSES_REPORTED_MASK_REPORTING_VALUATORS = 4, + XCB_INPUT_CLASSES_REPORTED_MASK_REPORTING_BUTTONS = 2, + XCB_INPUT_CLASSES_REPORTED_MASK_REPORTING_KEYS = 1 +} xcb_input_classes_reported_mask_t; + +/** Opcode for xcb_input_device_state_notify. */ +#define XCB_INPUT_DEVICE_STATE_NOTIFY 10 + +/** + * @brief xcb_input_device_state_notify_event_t + **/ +typedef struct xcb_input_device_state_notify_event_t { + uint8_t response_type; + uint8_t device_id; + uint16_t sequence; + xcb_timestamp_t time; + uint8_t num_keys; + uint8_t num_buttons; + uint8_t num_valuators; + uint8_t classes_reported; + uint8_t buttons[4]; + uint8_t keys[4]; + uint32_t valuators[3]; +} xcb_input_device_state_notify_event_t; + +/** Opcode for xcb_input_device_mapping_notify. */ +#define XCB_INPUT_DEVICE_MAPPING_NOTIFY 11 + +/** + * @brief xcb_input_device_mapping_notify_event_t + **/ +typedef struct xcb_input_device_mapping_notify_event_t { + uint8_t response_type; + uint8_t device_id; + uint16_t sequence; + uint8_t request; + xcb_input_key_code_t first_keycode; + uint8_t count; + uint8_t pad0; + xcb_timestamp_t time; + uint8_t pad1[20]; +} xcb_input_device_mapping_notify_event_t; + +typedef enum xcb_input_change_device_t { + XCB_INPUT_CHANGE_DEVICE_NEW_POINTER = 0, + XCB_INPUT_CHANGE_DEVICE_NEW_KEYBOARD = 1 +} xcb_input_change_device_t; + +/** Opcode for xcb_input_change_device_notify. */ +#define XCB_INPUT_CHANGE_DEVICE_NOTIFY 12 + +/** + * @brief xcb_input_change_device_notify_event_t + **/ +typedef struct xcb_input_change_device_notify_event_t { + uint8_t response_type; + uint8_t device_id; + uint16_t sequence; + xcb_timestamp_t time; + uint8_t request; + uint8_t pad0[23]; +} xcb_input_change_device_notify_event_t; + +/** Opcode for xcb_input_device_key_state_notify. */ +#define XCB_INPUT_DEVICE_KEY_STATE_NOTIFY 13 + +/** + * @brief xcb_input_device_key_state_notify_event_t + **/ +typedef struct xcb_input_device_key_state_notify_event_t { + uint8_t response_type; + uint8_t device_id; + uint16_t sequence; + uint8_t keys[28]; +} xcb_input_device_key_state_notify_event_t; + +/** Opcode for xcb_input_device_button_state_notify. */ +#define XCB_INPUT_DEVICE_BUTTON_STATE_NOTIFY 14 + +/** + * @brief xcb_input_device_button_state_notify_event_t + **/ +typedef struct xcb_input_device_button_state_notify_event_t { + uint8_t response_type; + uint8_t device_id; + uint16_t sequence; + uint8_t buttons[28]; +} xcb_input_device_button_state_notify_event_t; + +typedef enum xcb_input_device_change_t { + XCB_INPUT_DEVICE_CHANGE_ADDED = 0, + XCB_INPUT_DEVICE_CHANGE_REMOVED = 1, + XCB_INPUT_DEVICE_CHANGE_ENABLED = 2, + XCB_INPUT_DEVICE_CHANGE_DISABLED = 3, + XCB_INPUT_DEVICE_CHANGE_UNRECOVERABLE = 4, + XCB_INPUT_DEVICE_CHANGE_CONTROL_CHANGED = 5 +} xcb_input_device_change_t; + +/** Opcode for xcb_input_device_presence_notify. */ +#define XCB_INPUT_DEVICE_PRESENCE_NOTIFY 15 + +/** + * @brief xcb_input_device_presence_notify_event_t + **/ +typedef struct xcb_input_device_presence_notify_event_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + xcb_timestamp_t time; + uint8_t devchange; + uint8_t device_id; + uint16_t control; + uint8_t pad1[20]; +} xcb_input_device_presence_notify_event_t; + +/** Opcode for xcb_input_device_property_notify. */ +#define XCB_INPUT_DEVICE_PROPERTY_NOTIFY 16 + +/** + * @brief xcb_input_device_property_notify_event_t + **/ +typedef struct xcb_input_device_property_notify_event_t { + uint8_t response_type; + uint8_t state; + uint16_t sequence; + xcb_timestamp_t time; + xcb_atom_t property; + uint8_t pad0[19]; + uint8_t device_id; +} xcb_input_device_property_notify_event_t; + +typedef enum xcb_input_change_reason_t { + XCB_INPUT_CHANGE_REASON_SLAVE_SWITCH = 1, + XCB_INPUT_CHANGE_REASON_DEVICE_CHANGE = 2 +} xcb_input_change_reason_t; + +/** Opcode for xcb_input_device_changed. */ +#define XCB_INPUT_DEVICE_CHANGED 1 + +/** + * @brief xcb_input_device_changed_event_t + **/ +typedef struct xcb_input_device_changed_event_t { + uint8_t response_type; + uint8_t extension; + uint16_t sequence; + uint32_t length; + uint16_t event_type; + xcb_input_device_id_t deviceid; + xcb_timestamp_t time; + uint16_t num_classes; + xcb_input_device_id_t sourceid; + uint8_t reason; + uint8_t pad0[11]; + uint32_t full_sequence; +} xcb_input_device_changed_event_t; + +typedef enum xcb_input_key_event_flags_t { + XCB_INPUT_KEY_EVENT_FLAGS_KEY_REPEAT = 65536 +} xcb_input_key_event_flags_t; + +/** Opcode for xcb_input_key_press. */ +#define XCB_INPUT_KEY_PRESS 2 + +/** + * @brief xcb_input_key_press_event_t + **/ +typedef struct xcb_input_key_press_event_t { + uint8_t response_type; + uint8_t extension; + uint16_t sequence; + uint32_t length; + uint16_t event_type; + xcb_input_device_id_t deviceid; + xcb_timestamp_t time; + uint32_t detail; + xcb_window_t root; + xcb_window_t event; + xcb_window_t child; + uint32_t full_sequence; + xcb_input_fp1616_t root_x; + xcb_input_fp1616_t root_y; + xcb_input_fp1616_t event_x; + xcb_input_fp1616_t event_y; + uint16_t buttons_len; + uint16_t valuators_len; + xcb_input_device_id_t sourceid; + uint8_t pad0[2]; + uint32_t flags; + xcb_input_modifier_info_t mods; + xcb_input_group_info_t group; +} xcb_input_key_press_event_t; + +/** Opcode for xcb_input_key_release. */ +#define XCB_INPUT_KEY_RELEASE 3 + +typedef xcb_input_key_press_event_t xcb_input_key_release_event_t; + +typedef enum xcb_input_pointer_event_flags_t { + XCB_INPUT_POINTER_EVENT_FLAGS_POINTER_EMULATED = 65536 +} xcb_input_pointer_event_flags_t; + +/** Opcode for xcb_input_button_press. */ +#define XCB_INPUT_BUTTON_PRESS 4 + +/** + * @brief xcb_input_button_press_event_t + **/ +typedef struct xcb_input_button_press_event_t { + uint8_t response_type; + uint8_t extension; + uint16_t sequence; + uint32_t length; + uint16_t event_type; + xcb_input_device_id_t deviceid; + xcb_timestamp_t time; + uint32_t detail; + xcb_window_t root; + xcb_window_t event; + xcb_window_t child; + uint32_t full_sequence; + xcb_input_fp1616_t root_x; + xcb_input_fp1616_t root_y; + xcb_input_fp1616_t event_x; + xcb_input_fp1616_t event_y; + uint16_t buttons_len; + uint16_t valuators_len; + xcb_input_device_id_t sourceid; + uint8_t pad0[2]; + uint32_t flags; + xcb_input_modifier_info_t mods; + xcb_input_group_info_t group; +} xcb_input_button_press_event_t; + +/** Opcode for xcb_input_button_release. */ +#define XCB_INPUT_BUTTON_RELEASE 5 + +typedef xcb_input_button_press_event_t xcb_input_button_release_event_t; + +/** Opcode for xcb_input_motion. */ +#define XCB_INPUT_MOTION 6 + +typedef xcb_input_button_press_event_t xcb_input_motion_event_t; + +typedef enum xcb_input_notify_mode_t { + XCB_INPUT_NOTIFY_MODE_NORMAL = 0, + XCB_INPUT_NOTIFY_MODE_GRAB = 1, + XCB_INPUT_NOTIFY_MODE_UNGRAB = 2, + XCB_INPUT_NOTIFY_MODE_WHILE_GRABBED = 3, + XCB_INPUT_NOTIFY_MODE_PASSIVE_GRAB = 4, + XCB_INPUT_NOTIFY_MODE_PASSIVE_UNGRAB = 5 +} xcb_input_notify_mode_t; + +typedef enum xcb_input_notify_detail_t { + XCB_INPUT_NOTIFY_DETAIL_ANCESTOR = 0, + XCB_INPUT_NOTIFY_DETAIL_VIRTUAL = 1, + XCB_INPUT_NOTIFY_DETAIL_INFERIOR = 2, + XCB_INPUT_NOTIFY_DETAIL_NONLINEAR = 3, + XCB_INPUT_NOTIFY_DETAIL_NONLINEAR_VIRTUAL = 4, + XCB_INPUT_NOTIFY_DETAIL_POINTER = 5, + XCB_INPUT_NOTIFY_DETAIL_POINTER_ROOT = 6, + XCB_INPUT_NOTIFY_DETAIL_NONE = 7 +} xcb_input_notify_detail_t; + +/** Opcode for xcb_input_enter. */ +#define XCB_INPUT_ENTER 7 + +/** + * @brief xcb_input_enter_event_t + **/ +typedef struct xcb_input_enter_event_t { + uint8_t response_type; + uint8_t extension; + uint16_t sequence; + uint32_t length; + uint16_t event_type; + xcb_input_device_id_t deviceid; + xcb_timestamp_t time; + xcb_input_device_id_t sourceid; + uint8_t mode; + uint8_t detail; + xcb_window_t root; + xcb_window_t event; + xcb_window_t child; + uint32_t full_sequence; + xcb_input_fp1616_t root_x; + xcb_input_fp1616_t root_y; + xcb_input_fp1616_t event_x; + xcb_input_fp1616_t event_y; + uint8_t same_screen; + uint8_t focus; + uint16_t buttons_len; + xcb_input_modifier_info_t mods; + xcb_input_group_info_t group; +} xcb_input_enter_event_t; + +/** Opcode for xcb_input_leave. */ +#define XCB_INPUT_LEAVE 8 + +typedef xcb_input_enter_event_t xcb_input_leave_event_t; + +/** Opcode for xcb_input_focus_in. */ +#define XCB_INPUT_FOCUS_IN 9 + +typedef xcb_input_enter_event_t xcb_input_focus_in_event_t; + +/** Opcode for xcb_input_focus_out. */ +#define XCB_INPUT_FOCUS_OUT 10 + +typedef xcb_input_enter_event_t xcb_input_focus_out_event_t; + +typedef enum xcb_input_hierarchy_mask_t { + XCB_INPUT_HIERARCHY_MASK_MASTER_ADDED = 1, + XCB_INPUT_HIERARCHY_MASK_MASTER_REMOVED = 2, + XCB_INPUT_HIERARCHY_MASK_SLAVE_ADDED = 4, + XCB_INPUT_HIERARCHY_MASK_SLAVE_REMOVED = 8, + XCB_INPUT_HIERARCHY_MASK_SLAVE_ATTACHED = 16, + XCB_INPUT_HIERARCHY_MASK_SLAVE_DETACHED = 32, + XCB_INPUT_HIERARCHY_MASK_DEVICE_ENABLED = 64, + XCB_INPUT_HIERARCHY_MASK_DEVICE_DISABLED = 128 +} xcb_input_hierarchy_mask_t; + +/** + * @brief xcb_input_hierarchy_info_t + **/ +typedef struct xcb_input_hierarchy_info_t { + xcb_input_device_id_t deviceid; + xcb_input_device_id_t attachment; + uint8_t type; + uint8_t enabled; + uint8_t pad0[2]; + uint32_t flags; +} xcb_input_hierarchy_info_t; + +/** + * @brief xcb_input_hierarchy_info_iterator_t + **/ +typedef struct xcb_input_hierarchy_info_iterator_t { + xcb_input_hierarchy_info_t *data; + int rem; + int index; +} xcb_input_hierarchy_info_iterator_t; + +/** Opcode for xcb_input_hierarchy. */ +#define XCB_INPUT_HIERARCHY 11 + +/** + * @brief xcb_input_hierarchy_event_t + **/ +typedef struct xcb_input_hierarchy_event_t { + uint8_t response_type; + uint8_t extension; + uint16_t sequence; + uint32_t length; + uint16_t event_type; + xcb_input_device_id_t deviceid; + xcb_timestamp_t time; + uint32_t flags; + uint16_t num_infos; + uint8_t pad0[10]; + uint32_t full_sequence; +} xcb_input_hierarchy_event_t; + +typedef enum xcb_input_property_flag_t { + XCB_INPUT_PROPERTY_FLAG_DELETED = 0, + XCB_INPUT_PROPERTY_FLAG_CREATED = 1, + XCB_INPUT_PROPERTY_FLAG_MODIFIED = 2 +} xcb_input_property_flag_t; + +/** Opcode for xcb_input_property. */ +#define XCB_INPUT_PROPERTY 12 + +/** + * @brief xcb_input_property_event_t + **/ +typedef struct xcb_input_property_event_t { + uint8_t response_type; + uint8_t extension; + uint16_t sequence; + uint32_t length; + uint16_t event_type; + xcb_input_device_id_t deviceid; + xcb_timestamp_t time; + xcb_atom_t property; + uint8_t what; + uint8_t pad0[11]; + uint32_t full_sequence; +} xcb_input_property_event_t; + +/** Opcode for xcb_input_raw_key_press. */ +#define XCB_INPUT_RAW_KEY_PRESS 13 + +/** + * @brief xcb_input_raw_key_press_event_t + **/ +typedef struct xcb_input_raw_key_press_event_t { + uint8_t response_type; + uint8_t extension; + uint16_t sequence; + uint32_t length; + uint16_t event_type; + xcb_input_device_id_t deviceid; + xcb_timestamp_t time; + uint32_t detail; + xcb_input_device_id_t sourceid; + uint16_t valuators_len; + uint32_t flags; + uint8_t pad0[4]; + uint32_t full_sequence; +} xcb_input_raw_key_press_event_t; + +/** Opcode for xcb_input_raw_key_release. */ +#define XCB_INPUT_RAW_KEY_RELEASE 14 + +typedef xcb_input_raw_key_press_event_t xcb_input_raw_key_release_event_t; + +/** Opcode for xcb_input_raw_button_press. */ +#define XCB_INPUT_RAW_BUTTON_PRESS 15 + +/** + * @brief xcb_input_raw_button_press_event_t + **/ +typedef struct xcb_input_raw_button_press_event_t { + uint8_t response_type; + uint8_t extension; + uint16_t sequence; + uint32_t length; + uint16_t event_type; + xcb_input_device_id_t deviceid; + xcb_timestamp_t time; + uint32_t detail; + xcb_input_device_id_t sourceid; + uint16_t valuators_len; + uint32_t flags; + uint8_t pad0[4]; + uint32_t full_sequence; +} xcb_input_raw_button_press_event_t; + +/** Opcode for xcb_input_raw_button_release. */ +#define XCB_INPUT_RAW_BUTTON_RELEASE 16 + +typedef xcb_input_raw_button_press_event_t xcb_input_raw_button_release_event_t; + +/** Opcode for xcb_input_raw_motion. */ +#define XCB_INPUT_RAW_MOTION 17 + +typedef xcb_input_raw_button_press_event_t xcb_input_raw_motion_event_t; + +typedef enum xcb_input_touch_event_flags_t { + XCB_INPUT_TOUCH_EVENT_FLAGS_TOUCH_PENDING_END = 65536, + XCB_INPUT_TOUCH_EVENT_FLAGS_TOUCH_EMULATING_POINTER = 131072 +} xcb_input_touch_event_flags_t; + +/** Opcode for xcb_input_touch_begin. */ +#define XCB_INPUT_TOUCH_BEGIN 18 + +/** + * @brief xcb_input_touch_begin_event_t + **/ +typedef struct xcb_input_touch_begin_event_t { + uint8_t response_type; + uint8_t extension; + uint16_t sequence; + uint32_t length; + uint16_t event_type; + xcb_input_device_id_t deviceid; + xcb_timestamp_t time; + uint32_t detail; + xcb_window_t root; + xcb_window_t event; + xcb_window_t child; + uint32_t full_sequence; + xcb_input_fp1616_t root_x; + xcb_input_fp1616_t root_y; + xcb_input_fp1616_t event_x; + xcb_input_fp1616_t event_y; + uint16_t buttons_len; + uint16_t valuators_len; + xcb_input_device_id_t sourceid; + uint8_t pad0[2]; + uint32_t flags; + xcb_input_modifier_info_t mods; + xcb_input_group_info_t group; +} xcb_input_touch_begin_event_t; + +/** Opcode for xcb_input_touch_update. */ +#define XCB_INPUT_TOUCH_UPDATE 19 + +typedef xcb_input_touch_begin_event_t xcb_input_touch_update_event_t; + +/** Opcode for xcb_input_touch_end. */ +#define XCB_INPUT_TOUCH_END 20 + +typedef xcb_input_touch_begin_event_t xcb_input_touch_end_event_t; + +typedef enum xcb_input_touch_ownership_flags_t { + XCB_INPUT_TOUCH_OWNERSHIP_FLAGS_NONE = 0 +} xcb_input_touch_ownership_flags_t; + +/** Opcode for xcb_input_touch_ownership. */ +#define XCB_INPUT_TOUCH_OWNERSHIP 21 + +/** + * @brief xcb_input_touch_ownership_event_t + **/ +typedef struct xcb_input_touch_ownership_event_t { + uint8_t response_type; + uint8_t extension; + uint16_t sequence; + uint32_t length; + uint16_t event_type; + xcb_input_device_id_t deviceid; + xcb_timestamp_t time; + uint32_t touchid; + xcb_window_t root; + xcb_window_t event; + xcb_window_t child; + uint32_t full_sequence; + xcb_input_device_id_t sourceid; + uint8_t pad0[2]; + uint32_t flags; + uint8_t pad1[8]; +} xcb_input_touch_ownership_event_t; + +/** Opcode for xcb_input_raw_touch_begin. */ +#define XCB_INPUT_RAW_TOUCH_BEGIN 22 + +/** + * @brief xcb_input_raw_touch_begin_event_t + **/ +typedef struct xcb_input_raw_touch_begin_event_t { + uint8_t response_type; + uint8_t extension; + uint16_t sequence; + uint32_t length; + uint16_t event_type; + xcb_input_device_id_t deviceid; + xcb_timestamp_t time; + uint32_t detail; + xcb_input_device_id_t sourceid; + uint16_t valuators_len; + uint32_t flags; + uint8_t pad0[4]; + uint32_t full_sequence; +} xcb_input_raw_touch_begin_event_t; + +/** Opcode for xcb_input_raw_touch_update. */ +#define XCB_INPUT_RAW_TOUCH_UPDATE 23 + +typedef xcb_input_raw_touch_begin_event_t xcb_input_raw_touch_update_event_t; + +/** Opcode for xcb_input_raw_touch_end. */ +#define XCB_INPUT_RAW_TOUCH_END 24 + +typedef xcb_input_raw_touch_begin_event_t xcb_input_raw_touch_end_event_t; + +typedef enum xcb_input_barrier_flags_t { + XCB_INPUT_BARRIER_FLAGS_POINTER_RELEASED = 1, + XCB_INPUT_BARRIER_FLAGS_DEVICE_IS_GRABBED = 2 +} xcb_input_barrier_flags_t; + +/** Opcode for xcb_input_barrier_hit. */ +#define XCB_INPUT_BARRIER_HIT 25 + +/** + * @brief xcb_input_barrier_hit_event_t + **/ +typedef struct xcb_input_barrier_hit_event_t { + uint8_t response_type; + uint8_t extension; + uint16_t sequence; + uint32_t length; + uint16_t event_type; + xcb_input_device_id_t deviceid; + xcb_timestamp_t time; + uint32_t eventid; + xcb_window_t root; + xcb_window_t event; + xcb_xfixes_barrier_t barrier; + uint32_t full_sequence; + uint32_t dtime; + uint32_t flags; + xcb_input_device_id_t sourceid; + uint8_t pad0[2]; + xcb_input_fp1616_t root_x; + xcb_input_fp1616_t root_y; + xcb_input_fp3232_t dx; + xcb_input_fp3232_t dy; +} xcb_input_barrier_hit_event_t; + +/** Opcode for xcb_input_barrier_leave. */ +#define XCB_INPUT_BARRIER_LEAVE 26 + +typedef xcb_input_barrier_hit_event_t xcb_input_barrier_leave_event_t; + +typedef enum xcb_input_gesture_pinch_event_flags_t { + XCB_INPUT_GESTURE_PINCH_EVENT_FLAGS_GESTURE_PINCH_CANCELLED = 1 +} xcb_input_gesture_pinch_event_flags_t; + +/** Opcode for xcb_input_gesture_pinch_begin. */ +#define XCB_INPUT_GESTURE_PINCH_BEGIN 27 + +/** + * @brief xcb_input_gesture_pinch_begin_event_t + **/ +typedef struct xcb_input_gesture_pinch_begin_event_t { + uint8_t response_type; + uint8_t extension; + uint16_t sequence; + uint32_t length; + uint16_t event_type; + xcb_input_device_id_t deviceid; + xcb_timestamp_t time; + uint32_t detail; + xcb_window_t root; + xcb_window_t event; + xcb_window_t child; + uint32_t full_sequence; + xcb_input_fp1616_t root_x; + xcb_input_fp1616_t root_y; + xcb_input_fp1616_t event_x; + xcb_input_fp1616_t event_y; + xcb_input_fp1616_t delta_x; + xcb_input_fp1616_t delta_y; + xcb_input_fp1616_t delta_unaccel_x; + xcb_input_fp1616_t delta_unaccel_y; + xcb_input_fp1616_t scale; + xcb_input_fp1616_t delta_angle; + xcb_input_device_id_t sourceid; + uint8_t pad0[2]; + xcb_input_modifier_info_t mods; + xcb_input_group_info_t group; + uint32_t flags; +} xcb_input_gesture_pinch_begin_event_t; + +/** Opcode for xcb_input_gesture_pinch_update. */ +#define XCB_INPUT_GESTURE_PINCH_UPDATE 28 + +typedef xcb_input_gesture_pinch_begin_event_t xcb_input_gesture_pinch_update_event_t; + +/** Opcode for xcb_input_gesture_pinch_end. */ +#define XCB_INPUT_GESTURE_PINCH_END 29 + +typedef xcb_input_gesture_pinch_begin_event_t xcb_input_gesture_pinch_end_event_t; + +typedef enum xcb_input_gesture_swipe_event_flags_t { + XCB_INPUT_GESTURE_SWIPE_EVENT_FLAGS_GESTURE_SWIPE_CANCELLED = 1 +} xcb_input_gesture_swipe_event_flags_t; + +/** Opcode for xcb_input_gesture_swipe_begin. */ +#define XCB_INPUT_GESTURE_SWIPE_BEGIN 30 + +/** + * @brief xcb_input_gesture_swipe_begin_event_t + **/ +typedef struct xcb_input_gesture_swipe_begin_event_t { + uint8_t response_type; + uint8_t extension; + uint16_t sequence; + uint32_t length; + uint16_t event_type; + xcb_input_device_id_t deviceid; + xcb_timestamp_t time; + uint32_t detail; + xcb_window_t root; + xcb_window_t event; + xcb_window_t child; + uint32_t full_sequence; + xcb_input_fp1616_t root_x; + xcb_input_fp1616_t root_y; + xcb_input_fp1616_t event_x; + xcb_input_fp1616_t event_y; + xcb_input_fp1616_t delta_x; + xcb_input_fp1616_t delta_y; + xcb_input_fp1616_t delta_unaccel_x; + xcb_input_fp1616_t delta_unaccel_y; + xcb_input_device_id_t sourceid; + uint8_t pad0[2]; + xcb_input_modifier_info_t mods; + xcb_input_group_info_t group; + uint32_t flags; +} xcb_input_gesture_swipe_begin_event_t; + +/** Opcode for xcb_input_gesture_swipe_update. */ +#define XCB_INPUT_GESTURE_SWIPE_UPDATE 31 + +typedef xcb_input_gesture_swipe_begin_event_t xcb_input_gesture_swipe_update_event_t; + +/** Opcode for xcb_input_gesture_swipe_end. */ +#define XCB_INPUT_GESTURE_SWIPE_END 32 + +typedef xcb_input_gesture_swipe_begin_event_t xcb_input_gesture_swipe_end_event_t; + +/** + * @brief xcb_input_event_for_send_t + **/ +typedef union xcb_input_event_for_send_t { + xcb_input_device_valuator_event_t device_valuator; + xcb_input_device_key_press_event_t device_key_press; + xcb_input_device_key_release_event_t device_key_release; + xcb_input_device_button_press_event_t device_button_press; + xcb_input_device_button_release_event_t device_button_release; + xcb_input_device_motion_notify_event_t device_motion_notify; + xcb_input_device_focus_in_event_t device_focus_in; + xcb_input_device_focus_out_event_t device_focus_out; + xcb_input_proximity_in_event_t proximity_in; + xcb_input_proximity_out_event_t proximity_out; + xcb_input_device_state_notify_event_t device_state_notify; + xcb_input_device_mapping_notify_event_t device_mapping_notify; + xcb_input_change_device_notify_event_t change_device_notify; + xcb_input_device_key_state_notify_event_t device_key_state_notify; + xcb_input_device_button_state_notify_event_t device_button_state_notify; + xcb_input_device_presence_notify_event_t device_presence_notify; + xcb_raw_generic_event_t event_header; +} xcb_input_event_for_send_t; + +/** + * @brief xcb_input_event_for_send_iterator_t + **/ +typedef struct xcb_input_event_for_send_iterator_t { + xcb_input_event_for_send_t *data; + int rem; + int index; +} xcb_input_event_for_send_iterator_t; + +/** Opcode for xcb_input_send_extension_event. */ +#define XCB_INPUT_SEND_EXTENSION_EVENT 31 + +/** + * @brief xcb_input_send_extension_event_request_t + **/ +typedef struct xcb_input_send_extension_event_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_window_t destination; + uint8_t device_id; + uint8_t propagate; + uint16_t num_classes; + uint8_t num_events; + uint8_t pad0[3]; +} xcb_input_send_extension_event_request_t; + +/** Opcode for xcb_input_device. */ +#define XCB_INPUT_DEVICE 0 + +/** + * @brief xcb_input_device_error_t + **/ +typedef struct xcb_input_device_error_t { + uint8_t response_type; + uint8_t error_code; + uint16_t sequence; + uint32_t bad_value; + uint16_t minor_opcode; + uint8_t major_opcode; +} xcb_input_device_error_t; + +/** Opcode for xcb_input_event. */ +#define XCB_INPUT_EVENT 1 + +/** + * @brief xcb_input_event_error_t + **/ +typedef struct xcb_input_event_error_t { + uint8_t response_type; + uint8_t error_code; + uint16_t sequence; + uint32_t bad_value; + uint16_t minor_opcode; + uint8_t major_opcode; +} xcb_input_event_error_t; + +/** Opcode for xcb_input_mode. */ +#define XCB_INPUT_MODE 2 + +/** + * @brief xcb_input_mode_error_t + **/ +typedef struct xcb_input_mode_error_t { + uint8_t response_type; + uint8_t error_code; + uint16_t sequence; + uint32_t bad_value; + uint16_t minor_opcode; + uint8_t major_opcode; +} xcb_input_mode_error_t; + +/** Opcode for xcb_input_device_busy. */ +#define XCB_INPUT_DEVICE_BUSY 3 + +/** + * @brief xcb_input_device_busy_error_t + **/ +typedef struct xcb_input_device_busy_error_t { + uint8_t response_type; + uint8_t error_code; + uint16_t sequence; + uint32_t bad_value; + uint16_t minor_opcode; + uint8_t major_opcode; +} xcb_input_device_busy_error_t; + +/** Opcode for xcb_input_class. */ +#define XCB_INPUT_CLASS 4 + +/** + * @brief xcb_input_class_error_t + **/ +typedef struct xcb_input_class_error_t { + uint8_t response_type; + uint8_t error_code; + uint16_t sequence; + uint32_t bad_value; + uint16_t minor_opcode; + uint8_t major_opcode; +} xcb_input_class_error_t; + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_input_event_class_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_input_event_class_t) + */ +void +xcb_input_event_class_next (xcb_input_event_class_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_input_event_class_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_input_event_class_end (xcb_input_event_class_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_input_key_code_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_input_key_code_t) + */ +void +xcb_input_key_code_next (xcb_input_key_code_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_input_key_code_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_input_key_code_end (xcb_input_key_code_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_input_device_id_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_input_device_id_t) + */ +void +xcb_input_device_id_next (xcb_input_device_id_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_input_device_id_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_input_device_id_end (xcb_input_device_id_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_input_fp1616_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_input_fp1616_t) + */ +void +xcb_input_fp1616_next (xcb_input_fp1616_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_input_fp1616_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_input_fp1616_end (xcb_input_fp1616_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_input_fp3232_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_input_fp3232_t) + */ +void +xcb_input_fp3232_next (xcb_input_fp3232_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_input_fp3232_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_input_fp3232_end (xcb_input_fp3232_iterator_t i); + +int +xcb_input_get_extension_version_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_input_get_extension_version_cookie_t +xcb_input_get_extension_version (xcb_connection_t *c, + uint16_t name_len, + const char *name); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_input_get_extension_version_cookie_t +xcb_input_get_extension_version_unchecked (xcb_connection_t *c, + uint16_t name_len, + const char *name); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_input_get_extension_version_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_input_get_extension_version_reply_t * +xcb_input_get_extension_version_reply (xcb_connection_t *c, + xcb_input_get_extension_version_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_input_device_info_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_input_device_info_t) + */ +void +xcb_input_device_info_next (xcb_input_device_info_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_input_device_info_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_input_device_info_end (xcb_input_device_info_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_input_key_info_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_input_key_info_t) + */ +void +xcb_input_key_info_next (xcb_input_key_info_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_input_key_info_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_input_key_info_end (xcb_input_key_info_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_input_button_info_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_input_button_info_t) + */ +void +xcb_input_button_info_next (xcb_input_button_info_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_input_button_info_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_input_button_info_end (xcb_input_button_info_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_input_axis_info_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_input_axis_info_t) + */ +void +xcb_input_axis_info_next (xcb_input_axis_info_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_input_axis_info_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_input_axis_info_end (xcb_input_axis_info_iterator_t i); + +int +xcb_input_valuator_info_sizeof (const void *_buffer); + +xcb_input_axis_info_t * +xcb_input_valuator_info_axes (const xcb_input_valuator_info_t *R); + +int +xcb_input_valuator_info_axes_length (const xcb_input_valuator_info_t *R); + +xcb_input_axis_info_iterator_t +xcb_input_valuator_info_axes_iterator (const xcb_input_valuator_info_t *R); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_input_valuator_info_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_input_valuator_info_t) + */ +void +xcb_input_valuator_info_next (xcb_input_valuator_info_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_input_valuator_info_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_input_valuator_info_end (xcb_input_valuator_info_iterator_t i); + +xcb_input_axis_info_t * +xcb_input_input_info_info_valuator_axes (const xcb_input_input_info_info_t *S); + +int +xcb_input_input_info_info_valuator_axes_length (const xcb_input_input_info_t *R, + const xcb_input_input_info_info_t *S); + +xcb_input_axis_info_iterator_t +xcb_input_input_info_info_valuator_axes_iterator (const xcb_input_input_info_t *R, + const xcb_input_input_info_info_t *S); + +int +xcb_input_input_info_info_serialize (void **_buffer, + uint8_t class_id, + const xcb_input_input_info_info_t *_aux); + +int +xcb_input_input_info_info_unpack (const void *_buffer, + uint8_t class_id, + xcb_input_input_info_info_t *_aux); + +int +xcb_input_input_info_info_sizeof (const void *_buffer, + uint8_t class_id); + +int +xcb_input_input_info_sizeof (const void *_buffer); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_input_input_info_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_input_input_info_t) + */ +void +xcb_input_input_info_next (xcb_input_input_info_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_input_input_info_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_input_input_info_end (xcb_input_input_info_iterator_t i); + +int +xcb_input_device_name_sizeof (const void *_buffer); + +char * +xcb_input_device_name_string (const xcb_input_device_name_t *R); + +int +xcb_input_device_name_string_length (const xcb_input_device_name_t *R); + +xcb_generic_iterator_t +xcb_input_device_name_string_end (const xcb_input_device_name_t *R); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_input_device_name_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_input_device_name_t) + */ +void +xcb_input_device_name_next (xcb_input_device_name_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_input_device_name_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_input_device_name_end (xcb_input_device_name_iterator_t i); + +int +xcb_input_list_input_devices_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_input_list_input_devices_cookie_t +xcb_input_list_input_devices (xcb_connection_t *c); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_input_list_input_devices_cookie_t +xcb_input_list_input_devices_unchecked (xcb_connection_t *c); + +xcb_input_device_info_t * +xcb_input_list_input_devices_devices (const xcb_input_list_input_devices_reply_t *R); + +int +xcb_input_list_input_devices_devices_length (const xcb_input_list_input_devices_reply_t *R); + +xcb_input_device_info_iterator_t +xcb_input_list_input_devices_devices_iterator (const xcb_input_list_input_devices_reply_t *R); + +int +xcb_input_list_input_devices_infos_length (const xcb_input_list_input_devices_reply_t *R); + +xcb_input_input_info_iterator_t +xcb_input_list_input_devices_infos_iterator (const xcb_input_list_input_devices_reply_t *R); + +int +xcb_input_list_input_devices_names_length (const xcb_input_list_input_devices_reply_t *R); + +xcb_str_iterator_t +xcb_input_list_input_devices_names_iterator (const xcb_input_list_input_devices_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_input_list_input_devices_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_input_list_input_devices_reply_t * +xcb_input_list_input_devices_reply (xcb_connection_t *c, + xcb_input_list_input_devices_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_input_event_type_base_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_input_event_type_base_t) + */ +void +xcb_input_event_type_base_next (xcb_input_event_type_base_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_input_event_type_base_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_input_event_type_base_end (xcb_input_event_type_base_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_input_input_class_info_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_input_input_class_info_t) + */ +void +xcb_input_input_class_info_next (xcb_input_input_class_info_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_input_input_class_info_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_input_input_class_info_end (xcb_input_input_class_info_iterator_t i); + +int +xcb_input_open_device_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_input_open_device_cookie_t +xcb_input_open_device (xcb_connection_t *c, + uint8_t device_id); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_input_open_device_cookie_t +xcb_input_open_device_unchecked (xcb_connection_t *c, + uint8_t device_id); + +xcb_input_input_class_info_t * +xcb_input_open_device_class_info (const xcb_input_open_device_reply_t *R); + +int +xcb_input_open_device_class_info_length (const xcb_input_open_device_reply_t *R); + +xcb_input_input_class_info_iterator_t +xcb_input_open_device_class_info_iterator (const xcb_input_open_device_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_input_open_device_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_input_open_device_reply_t * +xcb_input_open_device_reply (xcb_connection_t *c, + xcb_input_open_device_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_input_close_device_checked (xcb_connection_t *c, + uint8_t device_id); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_input_close_device (xcb_connection_t *c, + uint8_t device_id); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_input_set_device_mode_cookie_t +xcb_input_set_device_mode (xcb_connection_t *c, + uint8_t device_id, + uint8_t mode); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_input_set_device_mode_cookie_t +xcb_input_set_device_mode_unchecked (xcb_connection_t *c, + uint8_t device_id, + uint8_t mode); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_input_set_device_mode_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_input_set_device_mode_reply_t * +xcb_input_set_device_mode_reply (xcb_connection_t *c, + xcb_input_set_device_mode_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_input_select_extension_event_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_input_select_extension_event_checked (xcb_connection_t *c, + xcb_window_t window, + uint16_t num_classes, + const xcb_input_event_class_t *classes); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_input_select_extension_event (xcb_connection_t *c, + xcb_window_t window, + uint16_t num_classes, + const xcb_input_event_class_t *classes); + +xcb_input_event_class_t * +xcb_input_select_extension_event_classes (const xcb_input_select_extension_event_request_t *R); + +int +xcb_input_select_extension_event_classes_length (const xcb_input_select_extension_event_request_t *R); + +xcb_generic_iterator_t +xcb_input_select_extension_event_classes_end (const xcb_input_select_extension_event_request_t *R); + +int +xcb_input_get_selected_extension_events_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_input_get_selected_extension_events_cookie_t +xcb_input_get_selected_extension_events (xcb_connection_t *c, + xcb_window_t window); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_input_get_selected_extension_events_cookie_t +xcb_input_get_selected_extension_events_unchecked (xcb_connection_t *c, + xcb_window_t window); + +xcb_input_event_class_t * +xcb_input_get_selected_extension_events_this_classes (const xcb_input_get_selected_extension_events_reply_t *R); + +int +xcb_input_get_selected_extension_events_this_classes_length (const xcb_input_get_selected_extension_events_reply_t *R); + +xcb_generic_iterator_t +xcb_input_get_selected_extension_events_this_classes_end (const xcb_input_get_selected_extension_events_reply_t *R); + +xcb_input_event_class_t * +xcb_input_get_selected_extension_events_all_classes (const xcb_input_get_selected_extension_events_reply_t *R); + +int +xcb_input_get_selected_extension_events_all_classes_length (const xcb_input_get_selected_extension_events_reply_t *R); + +xcb_generic_iterator_t +xcb_input_get_selected_extension_events_all_classes_end (const xcb_input_get_selected_extension_events_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_input_get_selected_extension_events_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_input_get_selected_extension_events_reply_t * +xcb_input_get_selected_extension_events_reply (xcb_connection_t *c, + xcb_input_get_selected_extension_events_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_input_change_device_dont_propagate_list_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_input_change_device_dont_propagate_list_checked (xcb_connection_t *c, + xcb_window_t window, + uint16_t num_classes, + uint8_t mode, + const xcb_input_event_class_t *classes); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_input_change_device_dont_propagate_list (xcb_connection_t *c, + xcb_window_t window, + uint16_t num_classes, + uint8_t mode, + const xcb_input_event_class_t *classes); + +xcb_input_event_class_t * +xcb_input_change_device_dont_propagate_list_classes (const xcb_input_change_device_dont_propagate_list_request_t *R); + +int +xcb_input_change_device_dont_propagate_list_classes_length (const xcb_input_change_device_dont_propagate_list_request_t *R); + +xcb_generic_iterator_t +xcb_input_change_device_dont_propagate_list_classes_end (const xcb_input_change_device_dont_propagate_list_request_t *R); + +int +xcb_input_get_device_dont_propagate_list_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_input_get_device_dont_propagate_list_cookie_t +xcb_input_get_device_dont_propagate_list (xcb_connection_t *c, + xcb_window_t window); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_input_get_device_dont_propagate_list_cookie_t +xcb_input_get_device_dont_propagate_list_unchecked (xcb_connection_t *c, + xcb_window_t window); + +xcb_input_event_class_t * +xcb_input_get_device_dont_propagate_list_classes (const xcb_input_get_device_dont_propagate_list_reply_t *R); + +int +xcb_input_get_device_dont_propagate_list_classes_length (const xcb_input_get_device_dont_propagate_list_reply_t *R); + +xcb_generic_iterator_t +xcb_input_get_device_dont_propagate_list_classes_end (const xcb_input_get_device_dont_propagate_list_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_input_get_device_dont_propagate_list_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_input_get_device_dont_propagate_list_reply_t * +xcb_input_get_device_dont_propagate_list_reply (xcb_connection_t *c, + xcb_input_get_device_dont_propagate_list_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_input_device_time_coord_sizeof (const void *_buffer, + uint8_t num_axes); + +int32_t * +xcb_input_device_time_coord_axisvalues (const xcb_input_device_time_coord_t *R); + +int +xcb_input_device_time_coord_axisvalues_length (const xcb_input_device_time_coord_t *R, + uint8_t num_axes); + +xcb_generic_iterator_t +xcb_input_device_time_coord_axisvalues_end (const xcb_input_device_time_coord_t *R, + uint8_t num_axes); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_input_device_time_coord_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_input_device_time_coord_t) + */ +void +xcb_input_device_time_coord_next (xcb_input_device_time_coord_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_input_device_time_coord_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_input_device_time_coord_end (xcb_input_device_time_coord_iterator_t i); + +int +xcb_input_get_device_motion_events_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_input_get_device_motion_events_cookie_t +xcb_input_get_device_motion_events (xcb_connection_t *c, + xcb_timestamp_t start, + xcb_timestamp_t stop, + uint8_t device_id); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_input_get_device_motion_events_cookie_t +xcb_input_get_device_motion_events_unchecked (xcb_connection_t *c, + xcb_timestamp_t start, + xcb_timestamp_t stop, + uint8_t device_id); + +int +xcb_input_get_device_motion_events_events_length (const xcb_input_get_device_motion_events_reply_t *R); + +xcb_input_device_time_coord_iterator_t +xcb_input_get_device_motion_events_events_iterator (const xcb_input_get_device_motion_events_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_input_get_device_motion_events_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_input_get_device_motion_events_reply_t * +xcb_input_get_device_motion_events_reply (xcb_connection_t *c, + xcb_input_get_device_motion_events_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_input_change_keyboard_device_cookie_t +xcb_input_change_keyboard_device (xcb_connection_t *c, + uint8_t device_id); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_input_change_keyboard_device_cookie_t +xcb_input_change_keyboard_device_unchecked (xcb_connection_t *c, + uint8_t device_id); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_input_change_keyboard_device_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_input_change_keyboard_device_reply_t * +xcb_input_change_keyboard_device_reply (xcb_connection_t *c, + xcb_input_change_keyboard_device_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_input_change_pointer_device_cookie_t +xcb_input_change_pointer_device (xcb_connection_t *c, + uint8_t x_axis, + uint8_t y_axis, + uint8_t device_id); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_input_change_pointer_device_cookie_t +xcb_input_change_pointer_device_unchecked (xcb_connection_t *c, + uint8_t x_axis, + uint8_t y_axis, + uint8_t device_id); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_input_change_pointer_device_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_input_change_pointer_device_reply_t * +xcb_input_change_pointer_device_reply (xcb_connection_t *c, + xcb_input_change_pointer_device_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_input_grab_device_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_input_grab_device_cookie_t +xcb_input_grab_device (xcb_connection_t *c, + xcb_window_t grab_window, + xcb_timestamp_t time, + uint16_t num_classes, + uint8_t this_device_mode, + uint8_t other_device_mode, + uint8_t owner_events, + uint8_t device_id, + const xcb_input_event_class_t *classes); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_input_grab_device_cookie_t +xcb_input_grab_device_unchecked (xcb_connection_t *c, + xcb_window_t grab_window, + xcb_timestamp_t time, + uint16_t num_classes, + uint8_t this_device_mode, + uint8_t other_device_mode, + uint8_t owner_events, + uint8_t device_id, + const xcb_input_event_class_t *classes); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_input_grab_device_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_input_grab_device_reply_t * +xcb_input_grab_device_reply (xcb_connection_t *c, + xcb_input_grab_device_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_input_ungrab_device_checked (xcb_connection_t *c, + xcb_timestamp_t time, + uint8_t device_id); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_input_ungrab_device (xcb_connection_t *c, + xcb_timestamp_t time, + uint8_t device_id); + +int +xcb_input_grab_device_key_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_input_grab_device_key_checked (xcb_connection_t *c, + xcb_window_t grab_window, + uint16_t num_classes, + uint16_t modifiers, + uint8_t modifier_device, + uint8_t grabbed_device, + uint8_t key, + uint8_t this_device_mode, + uint8_t other_device_mode, + uint8_t owner_events, + const xcb_input_event_class_t *classes); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_input_grab_device_key (xcb_connection_t *c, + xcb_window_t grab_window, + uint16_t num_classes, + uint16_t modifiers, + uint8_t modifier_device, + uint8_t grabbed_device, + uint8_t key, + uint8_t this_device_mode, + uint8_t other_device_mode, + uint8_t owner_events, + const xcb_input_event_class_t *classes); + +xcb_input_event_class_t * +xcb_input_grab_device_key_classes (const xcb_input_grab_device_key_request_t *R); + +int +xcb_input_grab_device_key_classes_length (const xcb_input_grab_device_key_request_t *R); + +xcb_generic_iterator_t +xcb_input_grab_device_key_classes_end (const xcb_input_grab_device_key_request_t *R); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_input_ungrab_device_key_checked (xcb_connection_t *c, + xcb_window_t grabWindow, + uint16_t modifiers, + uint8_t modifier_device, + uint8_t key, + uint8_t grabbed_device); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_input_ungrab_device_key (xcb_connection_t *c, + xcb_window_t grabWindow, + uint16_t modifiers, + uint8_t modifier_device, + uint8_t key, + uint8_t grabbed_device); + +int +xcb_input_grab_device_button_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_input_grab_device_button_checked (xcb_connection_t *c, + xcb_window_t grab_window, + uint8_t grabbed_device, + uint8_t modifier_device, + uint16_t num_classes, + uint16_t modifiers, + uint8_t this_device_mode, + uint8_t other_device_mode, + uint8_t button, + uint8_t owner_events, + const xcb_input_event_class_t *classes); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_input_grab_device_button (xcb_connection_t *c, + xcb_window_t grab_window, + uint8_t grabbed_device, + uint8_t modifier_device, + uint16_t num_classes, + uint16_t modifiers, + uint8_t this_device_mode, + uint8_t other_device_mode, + uint8_t button, + uint8_t owner_events, + const xcb_input_event_class_t *classes); + +xcb_input_event_class_t * +xcb_input_grab_device_button_classes (const xcb_input_grab_device_button_request_t *R); + +int +xcb_input_grab_device_button_classes_length (const xcb_input_grab_device_button_request_t *R); + +xcb_generic_iterator_t +xcb_input_grab_device_button_classes_end (const xcb_input_grab_device_button_request_t *R); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_input_ungrab_device_button_checked (xcb_connection_t *c, + xcb_window_t grab_window, + uint16_t modifiers, + uint8_t modifier_device, + uint8_t button, + uint8_t grabbed_device); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_input_ungrab_device_button (xcb_connection_t *c, + xcb_window_t grab_window, + uint16_t modifiers, + uint8_t modifier_device, + uint8_t button, + uint8_t grabbed_device); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_input_allow_device_events_checked (xcb_connection_t *c, + xcb_timestamp_t time, + uint8_t mode, + uint8_t device_id); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_input_allow_device_events (xcb_connection_t *c, + xcb_timestamp_t time, + uint8_t mode, + uint8_t device_id); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_input_get_device_focus_cookie_t +xcb_input_get_device_focus (xcb_connection_t *c, + uint8_t device_id); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_input_get_device_focus_cookie_t +xcb_input_get_device_focus_unchecked (xcb_connection_t *c, + uint8_t device_id); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_input_get_device_focus_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_input_get_device_focus_reply_t * +xcb_input_get_device_focus_reply (xcb_connection_t *c, + xcb_input_get_device_focus_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_input_set_device_focus_checked (xcb_connection_t *c, + xcb_window_t focus, + xcb_timestamp_t time, + uint8_t revert_to, + uint8_t device_id); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_input_set_device_focus (xcb_connection_t *c, + xcb_window_t focus, + xcb_timestamp_t time, + uint8_t revert_to, + uint8_t device_id); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_input_kbd_feedback_state_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_input_kbd_feedback_state_t) + */ +void +xcb_input_kbd_feedback_state_next (xcb_input_kbd_feedback_state_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_input_kbd_feedback_state_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_input_kbd_feedback_state_end (xcb_input_kbd_feedback_state_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_input_ptr_feedback_state_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_input_ptr_feedback_state_t) + */ +void +xcb_input_ptr_feedback_state_next (xcb_input_ptr_feedback_state_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_input_ptr_feedback_state_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_input_ptr_feedback_state_end (xcb_input_ptr_feedback_state_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_input_integer_feedback_state_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_input_integer_feedback_state_t) + */ +void +xcb_input_integer_feedback_state_next (xcb_input_integer_feedback_state_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_input_integer_feedback_state_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_input_integer_feedback_state_end (xcb_input_integer_feedback_state_iterator_t i); + +int +xcb_input_string_feedback_state_sizeof (const void *_buffer); + +xcb_keysym_t * +xcb_input_string_feedback_state_keysyms (const xcb_input_string_feedback_state_t *R); + +int +xcb_input_string_feedback_state_keysyms_length (const xcb_input_string_feedback_state_t *R); + +xcb_generic_iterator_t +xcb_input_string_feedback_state_keysyms_end (const xcb_input_string_feedback_state_t *R); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_input_string_feedback_state_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_input_string_feedback_state_t) + */ +void +xcb_input_string_feedback_state_next (xcb_input_string_feedback_state_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_input_string_feedback_state_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_input_string_feedback_state_end (xcb_input_string_feedback_state_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_input_bell_feedback_state_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_input_bell_feedback_state_t) + */ +void +xcb_input_bell_feedback_state_next (xcb_input_bell_feedback_state_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_input_bell_feedback_state_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_input_bell_feedback_state_end (xcb_input_bell_feedback_state_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_input_led_feedback_state_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_input_led_feedback_state_t) + */ +void +xcb_input_led_feedback_state_next (xcb_input_led_feedback_state_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_input_led_feedback_state_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_input_led_feedback_state_end (xcb_input_led_feedback_state_iterator_t i); + +xcb_keysym_t * +xcb_input_feedback_state_data_string_keysyms (const xcb_input_feedback_state_data_t *S); + +int +xcb_input_feedback_state_data_string_keysyms_length (const xcb_input_feedback_state_t *R, + const xcb_input_feedback_state_data_t *S); + +xcb_generic_iterator_t +xcb_input_feedback_state_data_string_keysyms_end (const xcb_input_feedback_state_t *R, + const xcb_input_feedback_state_data_t *S); + +int +xcb_input_feedback_state_data_serialize (void **_buffer, + uint8_t class_id, + const xcb_input_feedback_state_data_t *_aux); + +int +xcb_input_feedback_state_data_unpack (const void *_buffer, + uint8_t class_id, + xcb_input_feedback_state_data_t *_aux); + +int +xcb_input_feedback_state_data_sizeof (const void *_buffer, + uint8_t class_id); + +int +xcb_input_feedback_state_sizeof (const void *_buffer); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_input_feedback_state_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_input_feedback_state_t) + */ +void +xcb_input_feedback_state_next (xcb_input_feedback_state_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_input_feedback_state_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_input_feedback_state_end (xcb_input_feedback_state_iterator_t i); + +int +xcb_input_get_feedback_control_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_input_get_feedback_control_cookie_t +xcb_input_get_feedback_control (xcb_connection_t *c, + uint8_t device_id); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_input_get_feedback_control_cookie_t +xcb_input_get_feedback_control_unchecked (xcb_connection_t *c, + uint8_t device_id); + +int +xcb_input_get_feedback_control_feedbacks_length (const xcb_input_get_feedback_control_reply_t *R); + +xcb_input_feedback_state_iterator_t +xcb_input_get_feedback_control_feedbacks_iterator (const xcb_input_get_feedback_control_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_input_get_feedback_control_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_input_get_feedback_control_reply_t * +xcb_input_get_feedback_control_reply (xcb_connection_t *c, + xcb_input_get_feedback_control_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_input_kbd_feedback_ctl_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_input_kbd_feedback_ctl_t) + */ +void +xcb_input_kbd_feedback_ctl_next (xcb_input_kbd_feedback_ctl_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_input_kbd_feedback_ctl_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_input_kbd_feedback_ctl_end (xcb_input_kbd_feedback_ctl_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_input_ptr_feedback_ctl_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_input_ptr_feedback_ctl_t) + */ +void +xcb_input_ptr_feedback_ctl_next (xcb_input_ptr_feedback_ctl_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_input_ptr_feedback_ctl_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_input_ptr_feedback_ctl_end (xcb_input_ptr_feedback_ctl_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_input_integer_feedback_ctl_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_input_integer_feedback_ctl_t) + */ +void +xcb_input_integer_feedback_ctl_next (xcb_input_integer_feedback_ctl_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_input_integer_feedback_ctl_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_input_integer_feedback_ctl_end (xcb_input_integer_feedback_ctl_iterator_t i); + +int +xcb_input_string_feedback_ctl_sizeof (const void *_buffer); + +xcb_keysym_t * +xcb_input_string_feedback_ctl_keysyms (const xcb_input_string_feedback_ctl_t *R); + +int +xcb_input_string_feedback_ctl_keysyms_length (const xcb_input_string_feedback_ctl_t *R); + +xcb_generic_iterator_t +xcb_input_string_feedback_ctl_keysyms_end (const xcb_input_string_feedback_ctl_t *R); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_input_string_feedback_ctl_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_input_string_feedback_ctl_t) + */ +void +xcb_input_string_feedback_ctl_next (xcb_input_string_feedback_ctl_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_input_string_feedback_ctl_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_input_string_feedback_ctl_end (xcb_input_string_feedback_ctl_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_input_bell_feedback_ctl_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_input_bell_feedback_ctl_t) + */ +void +xcb_input_bell_feedback_ctl_next (xcb_input_bell_feedback_ctl_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_input_bell_feedback_ctl_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_input_bell_feedback_ctl_end (xcb_input_bell_feedback_ctl_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_input_led_feedback_ctl_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_input_led_feedback_ctl_t) + */ +void +xcb_input_led_feedback_ctl_next (xcb_input_led_feedback_ctl_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_input_led_feedback_ctl_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_input_led_feedback_ctl_end (xcb_input_led_feedback_ctl_iterator_t i); + +xcb_keysym_t * +xcb_input_feedback_ctl_data_string_keysyms (const xcb_input_feedback_ctl_data_t *S); + +int +xcb_input_feedback_ctl_data_string_keysyms_length (const xcb_input_feedback_ctl_t *R, + const xcb_input_feedback_ctl_data_t *S); + +xcb_generic_iterator_t +xcb_input_feedback_ctl_data_string_keysyms_end (const xcb_input_feedback_ctl_t *R, + const xcb_input_feedback_ctl_data_t *S); + +int +xcb_input_feedback_ctl_data_serialize (void **_buffer, + uint8_t class_id, + const xcb_input_feedback_ctl_data_t *_aux); + +int +xcb_input_feedback_ctl_data_unpack (const void *_buffer, + uint8_t class_id, + xcb_input_feedback_ctl_data_t *_aux); + +int +xcb_input_feedback_ctl_data_sizeof (const void *_buffer, + uint8_t class_id); + +int +xcb_input_feedback_ctl_sizeof (const void *_buffer); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_input_feedback_ctl_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_input_feedback_ctl_t) + */ +void +xcb_input_feedback_ctl_next (xcb_input_feedback_ctl_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_input_feedback_ctl_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_input_feedback_ctl_end (xcb_input_feedback_ctl_iterator_t i); + +int +xcb_input_change_feedback_control_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_input_change_feedback_control_checked (xcb_connection_t *c, + uint32_t mask, + uint8_t device_id, + uint8_t feedback_id, + xcb_input_feedback_ctl_t *feedback); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_input_change_feedback_control (xcb_connection_t *c, + uint32_t mask, + uint8_t device_id, + uint8_t feedback_id, + xcb_input_feedback_ctl_t *feedback); + +xcb_input_feedback_ctl_t * +xcb_input_change_feedback_control_feedback (const xcb_input_change_feedback_control_request_t *R); + +int +xcb_input_get_device_key_mapping_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_input_get_device_key_mapping_cookie_t +xcb_input_get_device_key_mapping (xcb_connection_t *c, + uint8_t device_id, + xcb_input_key_code_t first_keycode, + uint8_t count); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_input_get_device_key_mapping_cookie_t +xcb_input_get_device_key_mapping_unchecked (xcb_connection_t *c, + uint8_t device_id, + xcb_input_key_code_t first_keycode, + uint8_t count); + +xcb_keysym_t * +xcb_input_get_device_key_mapping_keysyms (const xcb_input_get_device_key_mapping_reply_t *R); + +int +xcb_input_get_device_key_mapping_keysyms_length (const xcb_input_get_device_key_mapping_reply_t *R); + +xcb_generic_iterator_t +xcb_input_get_device_key_mapping_keysyms_end (const xcb_input_get_device_key_mapping_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_input_get_device_key_mapping_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_input_get_device_key_mapping_reply_t * +xcb_input_get_device_key_mapping_reply (xcb_connection_t *c, + xcb_input_get_device_key_mapping_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_input_change_device_key_mapping_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_input_change_device_key_mapping_checked (xcb_connection_t *c, + uint8_t device_id, + xcb_input_key_code_t first_keycode, + uint8_t keysyms_per_keycode, + uint8_t keycode_count, + const xcb_keysym_t *keysyms); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_input_change_device_key_mapping (xcb_connection_t *c, + uint8_t device_id, + xcb_input_key_code_t first_keycode, + uint8_t keysyms_per_keycode, + uint8_t keycode_count, + const xcb_keysym_t *keysyms); + +xcb_keysym_t * +xcb_input_change_device_key_mapping_keysyms (const xcb_input_change_device_key_mapping_request_t *R); + +int +xcb_input_change_device_key_mapping_keysyms_length (const xcb_input_change_device_key_mapping_request_t *R); + +xcb_generic_iterator_t +xcb_input_change_device_key_mapping_keysyms_end (const xcb_input_change_device_key_mapping_request_t *R); + +int +xcb_input_get_device_modifier_mapping_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_input_get_device_modifier_mapping_cookie_t +xcb_input_get_device_modifier_mapping (xcb_connection_t *c, + uint8_t device_id); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_input_get_device_modifier_mapping_cookie_t +xcb_input_get_device_modifier_mapping_unchecked (xcb_connection_t *c, + uint8_t device_id); + +uint8_t * +xcb_input_get_device_modifier_mapping_keymaps (const xcb_input_get_device_modifier_mapping_reply_t *R); + +int +xcb_input_get_device_modifier_mapping_keymaps_length (const xcb_input_get_device_modifier_mapping_reply_t *R); + +xcb_generic_iterator_t +xcb_input_get_device_modifier_mapping_keymaps_end (const xcb_input_get_device_modifier_mapping_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_input_get_device_modifier_mapping_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_input_get_device_modifier_mapping_reply_t * +xcb_input_get_device_modifier_mapping_reply (xcb_connection_t *c, + xcb_input_get_device_modifier_mapping_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_input_set_device_modifier_mapping_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_input_set_device_modifier_mapping_cookie_t +xcb_input_set_device_modifier_mapping (xcb_connection_t *c, + uint8_t device_id, + uint8_t keycodes_per_modifier, + const uint8_t *keymaps); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_input_set_device_modifier_mapping_cookie_t +xcb_input_set_device_modifier_mapping_unchecked (xcb_connection_t *c, + uint8_t device_id, + uint8_t keycodes_per_modifier, + const uint8_t *keymaps); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_input_set_device_modifier_mapping_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_input_set_device_modifier_mapping_reply_t * +xcb_input_set_device_modifier_mapping_reply (xcb_connection_t *c, + xcb_input_set_device_modifier_mapping_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_input_get_device_button_mapping_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_input_get_device_button_mapping_cookie_t +xcb_input_get_device_button_mapping (xcb_connection_t *c, + uint8_t device_id); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_input_get_device_button_mapping_cookie_t +xcb_input_get_device_button_mapping_unchecked (xcb_connection_t *c, + uint8_t device_id); + +uint8_t * +xcb_input_get_device_button_mapping_map (const xcb_input_get_device_button_mapping_reply_t *R); + +int +xcb_input_get_device_button_mapping_map_length (const xcb_input_get_device_button_mapping_reply_t *R); + +xcb_generic_iterator_t +xcb_input_get_device_button_mapping_map_end (const xcb_input_get_device_button_mapping_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_input_get_device_button_mapping_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_input_get_device_button_mapping_reply_t * +xcb_input_get_device_button_mapping_reply (xcb_connection_t *c, + xcb_input_get_device_button_mapping_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_input_set_device_button_mapping_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_input_set_device_button_mapping_cookie_t +xcb_input_set_device_button_mapping (xcb_connection_t *c, + uint8_t device_id, + uint8_t map_size, + const uint8_t *map); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_input_set_device_button_mapping_cookie_t +xcb_input_set_device_button_mapping_unchecked (xcb_connection_t *c, + uint8_t device_id, + uint8_t map_size, + const uint8_t *map); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_input_set_device_button_mapping_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_input_set_device_button_mapping_reply_t * +xcb_input_set_device_button_mapping_reply (xcb_connection_t *c, + xcb_input_set_device_button_mapping_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_input_key_state_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_input_key_state_t) + */ +void +xcb_input_key_state_next (xcb_input_key_state_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_input_key_state_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_input_key_state_end (xcb_input_key_state_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_input_button_state_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_input_button_state_t) + */ +void +xcb_input_button_state_next (xcb_input_button_state_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_input_button_state_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_input_button_state_end (xcb_input_button_state_iterator_t i); + +int +xcb_input_valuator_state_sizeof (const void *_buffer); + +int32_t * +xcb_input_valuator_state_valuators (const xcb_input_valuator_state_t *R); + +int +xcb_input_valuator_state_valuators_length (const xcb_input_valuator_state_t *R); + +xcb_generic_iterator_t +xcb_input_valuator_state_valuators_end (const xcb_input_valuator_state_t *R); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_input_valuator_state_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_input_valuator_state_t) + */ +void +xcb_input_valuator_state_next (xcb_input_valuator_state_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_input_valuator_state_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_input_valuator_state_end (xcb_input_valuator_state_iterator_t i); + +int32_t * +xcb_input_input_state_data_valuator_valuators (const xcb_input_input_state_data_t *S); + +int +xcb_input_input_state_data_valuator_valuators_length (const xcb_input_input_state_t *R, + const xcb_input_input_state_data_t *S); + +xcb_generic_iterator_t +xcb_input_input_state_data_valuator_valuators_end (const xcb_input_input_state_t *R, + const xcb_input_input_state_data_t *S); + +int +xcb_input_input_state_data_serialize (void **_buffer, + uint8_t class_id, + const xcb_input_input_state_data_t *_aux); + +int +xcb_input_input_state_data_unpack (const void *_buffer, + uint8_t class_id, + xcb_input_input_state_data_t *_aux); + +int +xcb_input_input_state_data_sizeof (const void *_buffer, + uint8_t class_id); + +int +xcb_input_input_state_sizeof (const void *_buffer); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_input_input_state_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_input_input_state_t) + */ +void +xcb_input_input_state_next (xcb_input_input_state_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_input_input_state_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_input_input_state_end (xcb_input_input_state_iterator_t i); + +int +xcb_input_query_device_state_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_input_query_device_state_cookie_t +xcb_input_query_device_state (xcb_connection_t *c, + uint8_t device_id); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_input_query_device_state_cookie_t +xcb_input_query_device_state_unchecked (xcb_connection_t *c, + uint8_t device_id); + +int +xcb_input_query_device_state_classes_length (const xcb_input_query_device_state_reply_t *R); + +xcb_input_input_state_iterator_t +xcb_input_query_device_state_classes_iterator (const xcb_input_query_device_state_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_input_query_device_state_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_input_query_device_state_reply_t * +xcb_input_query_device_state_reply (xcb_connection_t *c, + xcb_input_query_device_state_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_input_device_bell_checked (xcb_connection_t *c, + uint8_t device_id, + uint8_t feedback_id, + uint8_t feedback_class, + int8_t percent); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_input_device_bell (xcb_connection_t *c, + uint8_t device_id, + uint8_t feedback_id, + uint8_t feedback_class, + int8_t percent); + +int +xcb_input_set_device_valuators_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_input_set_device_valuators_cookie_t +xcb_input_set_device_valuators (xcb_connection_t *c, + uint8_t device_id, + uint8_t first_valuator, + uint8_t num_valuators, + const int32_t *valuators); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_input_set_device_valuators_cookie_t +xcb_input_set_device_valuators_unchecked (xcb_connection_t *c, + uint8_t device_id, + uint8_t first_valuator, + uint8_t num_valuators, + const int32_t *valuators); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_input_set_device_valuators_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_input_set_device_valuators_reply_t * +xcb_input_set_device_valuators_reply (xcb_connection_t *c, + xcb_input_set_device_valuators_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_input_device_resolution_state_sizeof (const void *_buffer); + +uint32_t * +xcb_input_device_resolution_state_resolution_values (const xcb_input_device_resolution_state_t *R); + +int +xcb_input_device_resolution_state_resolution_values_length (const xcb_input_device_resolution_state_t *R); + +xcb_generic_iterator_t +xcb_input_device_resolution_state_resolution_values_end (const xcb_input_device_resolution_state_t *R); + +uint32_t * +xcb_input_device_resolution_state_resolution_min (const xcb_input_device_resolution_state_t *R); + +int +xcb_input_device_resolution_state_resolution_min_length (const xcb_input_device_resolution_state_t *R); + +xcb_generic_iterator_t +xcb_input_device_resolution_state_resolution_min_end (const xcb_input_device_resolution_state_t *R); + +uint32_t * +xcb_input_device_resolution_state_resolution_max (const xcb_input_device_resolution_state_t *R); + +int +xcb_input_device_resolution_state_resolution_max_length (const xcb_input_device_resolution_state_t *R); + +xcb_generic_iterator_t +xcb_input_device_resolution_state_resolution_max_end (const xcb_input_device_resolution_state_t *R); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_input_device_resolution_state_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_input_device_resolution_state_t) + */ +void +xcb_input_device_resolution_state_next (xcb_input_device_resolution_state_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_input_device_resolution_state_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_input_device_resolution_state_end (xcb_input_device_resolution_state_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_input_device_abs_calib_state_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_input_device_abs_calib_state_t) + */ +void +xcb_input_device_abs_calib_state_next (xcb_input_device_abs_calib_state_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_input_device_abs_calib_state_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_input_device_abs_calib_state_end (xcb_input_device_abs_calib_state_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_input_device_abs_area_state_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_input_device_abs_area_state_t) + */ +void +xcb_input_device_abs_area_state_next (xcb_input_device_abs_area_state_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_input_device_abs_area_state_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_input_device_abs_area_state_end (xcb_input_device_abs_area_state_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_input_device_core_state_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_input_device_core_state_t) + */ +void +xcb_input_device_core_state_next (xcb_input_device_core_state_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_input_device_core_state_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_input_device_core_state_end (xcb_input_device_core_state_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_input_device_enable_state_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_input_device_enable_state_t) + */ +void +xcb_input_device_enable_state_next (xcb_input_device_enable_state_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_input_device_enable_state_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_input_device_enable_state_end (xcb_input_device_enable_state_iterator_t i); + +uint32_t * +xcb_input_device_state_data_resolution_resolution_values (const xcb_input_device_state_data_t *S); + +int +xcb_input_device_state_data_resolution_resolution_values_length (const xcb_input_device_state_t *R, + const xcb_input_device_state_data_t *S); + +xcb_generic_iterator_t +xcb_input_device_state_data_resolution_resolution_values_end (const xcb_input_device_state_t *R, + const xcb_input_device_state_data_t *S); + +uint32_t * +xcb_input_device_state_data_resolution_resolution_min (const xcb_input_device_state_data_t *S); + +int +xcb_input_device_state_data_resolution_resolution_min_length (const xcb_input_device_state_t *R, + const xcb_input_device_state_data_t *S); + +xcb_generic_iterator_t +xcb_input_device_state_data_resolution_resolution_min_end (const xcb_input_device_state_t *R, + const xcb_input_device_state_data_t *S); + +uint32_t * +xcb_input_device_state_data_resolution_resolution_max (const xcb_input_device_state_data_t *S); + +int +xcb_input_device_state_data_resolution_resolution_max_length (const xcb_input_device_state_t *R, + const xcb_input_device_state_data_t *S); + +xcb_generic_iterator_t +xcb_input_device_state_data_resolution_resolution_max_end (const xcb_input_device_state_t *R, + const xcb_input_device_state_data_t *S); + +int +xcb_input_device_state_data_serialize (void **_buffer, + uint16_t control_id, + const xcb_input_device_state_data_t *_aux); + +int +xcb_input_device_state_data_unpack (const void *_buffer, + uint16_t control_id, + xcb_input_device_state_data_t *_aux); + +int +xcb_input_device_state_data_sizeof (const void *_buffer, + uint16_t control_id); + +int +xcb_input_device_state_sizeof (const void *_buffer); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_input_device_state_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_input_device_state_t) + */ +void +xcb_input_device_state_next (xcb_input_device_state_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_input_device_state_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_input_device_state_end (xcb_input_device_state_iterator_t i); + +int +xcb_input_get_device_control_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_input_get_device_control_cookie_t +xcb_input_get_device_control (xcb_connection_t *c, + uint16_t control_id, + uint8_t device_id); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_input_get_device_control_cookie_t +xcb_input_get_device_control_unchecked (xcb_connection_t *c, + uint16_t control_id, + uint8_t device_id); + +xcb_input_device_state_t * +xcb_input_get_device_control_control (const xcb_input_get_device_control_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_input_get_device_control_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_input_get_device_control_reply_t * +xcb_input_get_device_control_reply (xcb_connection_t *c, + xcb_input_get_device_control_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_input_device_resolution_ctl_sizeof (const void *_buffer); + +uint32_t * +xcb_input_device_resolution_ctl_resolution_values (const xcb_input_device_resolution_ctl_t *R); + +int +xcb_input_device_resolution_ctl_resolution_values_length (const xcb_input_device_resolution_ctl_t *R); + +xcb_generic_iterator_t +xcb_input_device_resolution_ctl_resolution_values_end (const xcb_input_device_resolution_ctl_t *R); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_input_device_resolution_ctl_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_input_device_resolution_ctl_t) + */ +void +xcb_input_device_resolution_ctl_next (xcb_input_device_resolution_ctl_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_input_device_resolution_ctl_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_input_device_resolution_ctl_end (xcb_input_device_resolution_ctl_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_input_device_abs_calib_ctl_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_input_device_abs_calib_ctl_t) + */ +void +xcb_input_device_abs_calib_ctl_next (xcb_input_device_abs_calib_ctl_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_input_device_abs_calib_ctl_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_input_device_abs_calib_ctl_end (xcb_input_device_abs_calib_ctl_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_input_device_abs_area_ctrl_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_input_device_abs_area_ctrl_t) + */ +void +xcb_input_device_abs_area_ctrl_next (xcb_input_device_abs_area_ctrl_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_input_device_abs_area_ctrl_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_input_device_abs_area_ctrl_end (xcb_input_device_abs_area_ctrl_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_input_device_core_ctrl_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_input_device_core_ctrl_t) + */ +void +xcb_input_device_core_ctrl_next (xcb_input_device_core_ctrl_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_input_device_core_ctrl_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_input_device_core_ctrl_end (xcb_input_device_core_ctrl_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_input_device_enable_ctrl_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_input_device_enable_ctrl_t) + */ +void +xcb_input_device_enable_ctrl_next (xcb_input_device_enable_ctrl_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_input_device_enable_ctrl_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_input_device_enable_ctrl_end (xcb_input_device_enable_ctrl_iterator_t i); + +uint32_t * +xcb_input_device_ctl_data_resolution_resolution_values (const xcb_input_device_ctl_data_t *S); + +int +xcb_input_device_ctl_data_resolution_resolution_values_length (const xcb_input_device_ctl_t *R, + const xcb_input_device_ctl_data_t *S); + +xcb_generic_iterator_t +xcb_input_device_ctl_data_resolution_resolution_values_end (const xcb_input_device_ctl_t *R, + const xcb_input_device_ctl_data_t *S); + +int +xcb_input_device_ctl_data_serialize (void **_buffer, + uint16_t control_id, + const xcb_input_device_ctl_data_t *_aux); + +int +xcb_input_device_ctl_data_unpack (const void *_buffer, + uint16_t control_id, + xcb_input_device_ctl_data_t *_aux); + +int +xcb_input_device_ctl_data_sizeof (const void *_buffer, + uint16_t control_id); + +int +xcb_input_device_ctl_sizeof (const void *_buffer); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_input_device_ctl_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_input_device_ctl_t) + */ +void +xcb_input_device_ctl_next (xcb_input_device_ctl_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_input_device_ctl_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_input_device_ctl_end (xcb_input_device_ctl_iterator_t i); + +int +xcb_input_change_device_control_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_input_change_device_control_cookie_t +xcb_input_change_device_control (xcb_connection_t *c, + uint16_t control_id, + uint8_t device_id, + xcb_input_device_ctl_t *control); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_input_change_device_control_cookie_t +xcb_input_change_device_control_unchecked (xcb_connection_t *c, + uint16_t control_id, + uint8_t device_id, + xcb_input_device_ctl_t *control); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_input_change_device_control_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_input_change_device_control_reply_t * +xcb_input_change_device_control_reply (xcb_connection_t *c, + xcb_input_change_device_control_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_input_list_device_properties_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_input_list_device_properties_cookie_t +xcb_input_list_device_properties (xcb_connection_t *c, + uint8_t device_id); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_input_list_device_properties_cookie_t +xcb_input_list_device_properties_unchecked (xcb_connection_t *c, + uint8_t device_id); + +xcb_atom_t * +xcb_input_list_device_properties_atoms (const xcb_input_list_device_properties_reply_t *R); + +int +xcb_input_list_device_properties_atoms_length (const xcb_input_list_device_properties_reply_t *R); + +xcb_generic_iterator_t +xcb_input_list_device_properties_atoms_end (const xcb_input_list_device_properties_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_input_list_device_properties_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_input_list_device_properties_reply_t * +xcb_input_list_device_properties_reply (xcb_connection_t *c, + xcb_input_list_device_properties_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +uint8_t * +xcb_input_change_device_property_items_data_8 (const xcb_input_change_device_property_items_t *S); + +int +xcb_input_change_device_property_items_data_8_length (const xcb_input_change_device_property_request_t *R, + const xcb_input_change_device_property_items_t *S); + +xcb_generic_iterator_t +xcb_input_change_device_property_items_data_8_end (const xcb_input_change_device_property_request_t *R, + const xcb_input_change_device_property_items_t *S); + +uint16_t * +xcb_input_change_device_property_items_data_16 (const xcb_input_change_device_property_items_t *S); + +int +xcb_input_change_device_property_items_data_16_length (const xcb_input_change_device_property_request_t *R, + const xcb_input_change_device_property_items_t *S); + +xcb_generic_iterator_t +xcb_input_change_device_property_items_data_16_end (const xcb_input_change_device_property_request_t *R, + const xcb_input_change_device_property_items_t *S); + +uint32_t * +xcb_input_change_device_property_items_data_32 (const xcb_input_change_device_property_items_t *S); + +int +xcb_input_change_device_property_items_data_32_length (const xcb_input_change_device_property_request_t *R, + const xcb_input_change_device_property_items_t *S); + +xcb_generic_iterator_t +xcb_input_change_device_property_items_data_32_end (const xcb_input_change_device_property_request_t *R, + const xcb_input_change_device_property_items_t *S); + +int +xcb_input_change_device_property_items_serialize (void **_buffer, + uint32_t num_items, + uint8_t format, + const xcb_input_change_device_property_items_t *_aux); + +int +xcb_input_change_device_property_items_unpack (const void *_buffer, + uint32_t num_items, + uint8_t format, + xcb_input_change_device_property_items_t *_aux); + +int +xcb_input_change_device_property_items_sizeof (const void *_buffer, + uint32_t num_items, + uint8_t format); + +int +xcb_input_change_device_property_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_input_change_device_property_checked (xcb_connection_t *c, + xcb_atom_t property, + xcb_atom_t type, + uint8_t device_id, + uint8_t format, + uint8_t mode, + uint32_t num_items, + const void *items); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_input_change_device_property (xcb_connection_t *c, + xcb_atom_t property, + xcb_atom_t type, + uint8_t device_id, + uint8_t format, + uint8_t mode, + uint32_t num_items, + const void *items); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_input_change_device_property_aux_checked (xcb_connection_t *c, + xcb_atom_t property, + xcb_atom_t type, + uint8_t device_id, + uint8_t format, + uint8_t mode, + uint32_t num_items, + const xcb_input_change_device_property_items_t *items); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_input_change_device_property_aux (xcb_connection_t *c, + xcb_atom_t property, + xcb_atom_t type, + uint8_t device_id, + uint8_t format, + uint8_t mode, + uint32_t num_items, + const xcb_input_change_device_property_items_t *items); + +void * +xcb_input_change_device_property_items (const xcb_input_change_device_property_request_t *R); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_input_delete_device_property_checked (xcb_connection_t *c, + xcb_atom_t property, + uint8_t device_id); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_input_delete_device_property (xcb_connection_t *c, + xcb_atom_t property, + uint8_t device_id); + +uint8_t * +xcb_input_get_device_property_items_data_8 (const xcb_input_get_device_property_items_t *S); + +int +xcb_input_get_device_property_items_data_8_length (const xcb_input_get_device_property_reply_t *R, + const xcb_input_get_device_property_items_t *S); + +xcb_generic_iterator_t +xcb_input_get_device_property_items_data_8_end (const xcb_input_get_device_property_reply_t *R, + const xcb_input_get_device_property_items_t *S); + +uint16_t * +xcb_input_get_device_property_items_data_16 (const xcb_input_get_device_property_items_t *S); + +int +xcb_input_get_device_property_items_data_16_length (const xcb_input_get_device_property_reply_t *R, + const xcb_input_get_device_property_items_t *S); + +xcb_generic_iterator_t +xcb_input_get_device_property_items_data_16_end (const xcb_input_get_device_property_reply_t *R, + const xcb_input_get_device_property_items_t *S); + +uint32_t * +xcb_input_get_device_property_items_data_32 (const xcb_input_get_device_property_items_t *S); + +int +xcb_input_get_device_property_items_data_32_length (const xcb_input_get_device_property_reply_t *R, + const xcb_input_get_device_property_items_t *S); + +xcb_generic_iterator_t +xcb_input_get_device_property_items_data_32_end (const xcb_input_get_device_property_reply_t *R, + const xcb_input_get_device_property_items_t *S); + +int +xcb_input_get_device_property_items_serialize (void **_buffer, + uint32_t num_items, + uint8_t format, + const xcb_input_get_device_property_items_t *_aux); + +int +xcb_input_get_device_property_items_unpack (const void *_buffer, + uint32_t num_items, + uint8_t format, + xcb_input_get_device_property_items_t *_aux); + +int +xcb_input_get_device_property_items_sizeof (const void *_buffer, + uint32_t num_items, + uint8_t format); + +int +xcb_input_get_device_property_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_input_get_device_property_cookie_t +xcb_input_get_device_property (xcb_connection_t *c, + xcb_atom_t property, + xcb_atom_t type, + uint32_t offset, + uint32_t len, + uint8_t device_id, + uint8_t _delete); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_input_get_device_property_cookie_t +xcb_input_get_device_property_unchecked (xcb_connection_t *c, + xcb_atom_t property, + xcb_atom_t type, + uint32_t offset, + uint32_t len, + uint8_t device_id, + uint8_t _delete); + +void * +xcb_input_get_device_property_items (const xcb_input_get_device_property_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_input_get_device_property_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_input_get_device_property_reply_t * +xcb_input_get_device_property_reply (xcb_connection_t *c, + xcb_input_get_device_property_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_input_group_info_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_input_group_info_t) + */ +void +xcb_input_group_info_next (xcb_input_group_info_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_input_group_info_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_input_group_info_end (xcb_input_group_info_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_input_modifier_info_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_input_modifier_info_t) + */ +void +xcb_input_modifier_info_next (xcb_input_modifier_info_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_input_modifier_info_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_input_modifier_info_end (xcb_input_modifier_info_iterator_t i); + +int +xcb_input_xi_query_pointer_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_input_xi_query_pointer_cookie_t +xcb_input_xi_query_pointer (xcb_connection_t *c, + xcb_window_t window, + xcb_input_device_id_t deviceid); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_input_xi_query_pointer_cookie_t +xcb_input_xi_query_pointer_unchecked (xcb_connection_t *c, + xcb_window_t window, + xcb_input_device_id_t deviceid); + +uint32_t * +xcb_input_xi_query_pointer_buttons (const xcb_input_xi_query_pointer_reply_t *R); + +int +xcb_input_xi_query_pointer_buttons_length (const xcb_input_xi_query_pointer_reply_t *R); + +xcb_generic_iterator_t +xcb_input_xi_query_pointer_buttons_end (const xcb_input_xi_query_pointer_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_input_xi_query_pointer_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_input_xi_query_pointer_reply_t * +xcb_input_xi_query_pointer_reply (xcb_connection_t *c, + xcb_input_xi_query_pointer_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_input_xi_warp_pointer_checked (xcb_connection_t *c, + xcb_window_t src_win, + xcb_window_t dst_win, + xcb_input_fp1616_t src_x, + xcb_input_fp1616_t src_y, + uint16_t src_width, + uint16_t src_height, + xcb_input_fp1616_t dst_x, + xcb_input_fp1616_t dst_y, + xcb_input_device_id_t deviceid); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_input_xi_warp_pointer (xcb_connection_t *c, + xcb_window_t src_win, + xcb_window_t dst_win, + xcb_input_fp1616_t src_x, + xcb_input_fp1616_t src_y, + uint16_t src_width, + uint16_t src_height, + xcb_input_fp1616_t dst_x, + xcb_input_fp1616_t dst_y, + xcb_input_device_id_t deviceid); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_input_xi_change_cursor_checked (xcb_connection_t *c, + xcb_window_t window, + xcb_cursor_t cursor, + xcb_input_device_id_t deviceid); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_input_xi_change_cursor (xcb_connection_t *c, + xcb_window_t window, + xcb_cursor_t cursor, + xcb_input_device_id_t deviceid); + +int +xcb_input_add_master_sizeof (const void *_buffer); + +char * +xcb_input_add_master_name (const xcb_input_add_master_t *R); + +int +xcb_input_add_master_name_length (const xcb_input_add_master_t *R); + +xcb_generic_iterator_t +xcb_input_add_master_name_end (const xcb_input_add_master_t *R); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_input_add_master_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_input_add_master_t) + */ +void +xcb_input_add_master_next (xcb_input_add_master_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_input_add_master_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_input_add_master_end (xcb_input_add_master_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_input_remove_master_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_input_remove_master_t) + */ +void +xcb_input_remove_master_next (xcb_input_remove_master_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_input_remove_master_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_input_remove_master_end (xcb_input_remove_master_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_input_attach_slave_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_input_attach_slave_t) + */ +void +xcb_input_attach_slave_next (xcb_input_attach_slave_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_input_attach_slave_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_input_attach_slave_end (xcb_input_attach_slave_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_input_detach_slave_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_input_detach_slave_t) + */ +void +xcb_input_detach_slave_next (xcb_input_detach_slave_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_input_detach_slave_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_input_detach_slave_end (xcb_input_detach_slave_iterator_t i); + +char * +xcb_input_hierarchy_change_data_add_master_name (const xcb_input_hierarchy_change_data_t *S); + +int +xcb_input_hierarchy_change_data_add_master_name_length (const xcb_input_hierarchy_change_t *R, + const xcb_input_hierarchy_change_data_t *S); + +xcb_generic_iterator_t +xcb_input_hierarchy_change_data_add_master_name_end (const xcb_input_hierarchy_change_t *R, + const xcb_input_hierarchy_change_data_t *S); + +int +xcb_input_hierarchy_change_data_serialize (void **_buffer, + uint16_t type, + const xcb_input_hierarchy_change_data_t *_aux); + +int +xcb_input_hierarchy_change_data_unpack (const void *_buffer, + uint16_t type, + xcb_input_hierarchy_change_data_t *_aux); + +int +xcb_input_hierarchy_change_data_sizeof (const void *_buffer, + uint16_t type); + +int +xcb_input_hierarchy_change_sizeof (const void *_buffer); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_input_hierarchy_change_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_input_hierarchy_change_t) + */ +void +xcb_input_hierarchy_change_next (xcb_input_hierarchy_change_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_input_hierarchy_change_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_input_hierarchy_change_end (xcb_input_hierarchy_change_iterator_t i); + +int +xcb_input_xi_change_hierarchy_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_input_xi_change_hierarchy_checked (xcb_connection_t *c, + uint8_t num_changes, + const xcb_input_hierarchy_change_t *changes); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_input_xi_change_hierarchy (xcb_connection_t *c, + uint8_t num_changes, + const xcb_input_hierarchy_change_t *changes); + +int +xcb_input_xi_change_hierarchy_changes_length (const xcb_input_xi_change_hierarchy_request_t *R); + +xcb_input_hierarchy_change_iterator_t +xcb_input_xi_change_hierarchy_changes_iterator (const xcb_input_xi_change_hierarchy_request_t *R); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_input_xi_set_client_pointer_checked (xcb_connection_t *c, + xcb_window_t window, + xcb_input_device_id_t deviceid); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_input_xi_set_client_pointer (xcb_connection_t *c, + xcb_window_t window, + xcb_input_device_id_t deviceid); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_input_xi_get_client_pointer_cookie_t +xcb_input_xi_get_client_pointer (xcb_connection_t *c, + xcb_window_t window); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_input_xi_get_client_pointer_cookie_t +xcb_input_xi_get_client_pointer_unchecked (xcb_connection_t *c, + xcb_window_t window); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_input_xi_get_client_pointer_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_input_xi_get_client_pointer_reply_t * +xcb_input_xi_get_client_pointer_reply (xcb_connection_t *c, + xcb_input_xi_get_client_pointer_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_input_event_mask_sizeof (const void *_buffer); + +uint32_t * +xcb_input_event_mask_mask (const xcb_input_event_mask_t *R); + +int +xcb_input_event_mask_mask_length (const xcb_input_event_mask_t *R); + +xcb_generic_iterator_t +xcb_input_event_mask_mask_end (const xcb_input_event_mask_t *R); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_input_event_mask_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_input_event_mask_t) + */ +void +xcb_input_event_mask_next (xcb_input_event_mask_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_input_event_mask_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_input_event_mask_end (xcb_input_event_mask_iterator_t i); + +int +xcb_input_xi_select_events_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_input_xi_select_events_checked (xcb_connection_t *c, + xcb_window_t window, + uint16_t num_mask, + const xcb_input_event_mask_t *masks); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_input_xi_select_events (xcb_connection_t *c, + xcb_window_t window, + uint16_t num_mask, + const xcb_input_event_mask_t *masks); + +int +xcb_input_xi_select_events_masks_length (const xcb_input_xi_select_events_request_t *R); + +xcb_input_event_mask_iterator_t +xcb_input_xi_select_events_masks_iterator (const xcb_input_xi_select_events_request_t *R); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_input_xi_query_version_cookie_t +xcb_input_xi_query_version (xcb_connection_t *c, + uint16_t major_version, + uint16_t minor_version); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_input_xi_query_version_cookie_t +xcb_input_xi_query_version_unchecked (xcb_connection_t *c, + uint16_t major_version, + uint16_t minor_version); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_input_xi_query_version_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_input_xi_query_version_reply_t * +xcb_input_xi_query_version_reply (xcb_connection_t *c, + xcb_input_xi_query_version_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_input_button_class_sizeof (const void *_buffer); + +uint32_t * +xcb_input_button_class_state (const xcb_input_button_class_t *R); + +int +xcb_input_button_class_state_length (const xcb_input_button_class_t *R); + +xcb_generic_iterator_t +xcb_input_button_class_state_end (const xcb_input_button_class_t *R); + +xcb_atom_t * +xcb_input_button_class_labels (const xcb_input_button_class_t *R); + +int +xcb_input_button_class_labels_length (const xcb_input_button_class_t *R); + +xcb_generic_iterator_t +xcb_input_button_class_labels_end (const xcb_input_button_class_t *R); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_input_button_class_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_input_button_class_t) + */ +void +xcb_input_button_class_next (xcb_input_button_class_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_input_button_class_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_input_button_class_end (xcb_input_button_class_iterator_t i); + +int +xcb_input_key_class_sizeof (const void *_buffer); + +uint32_t * +xcb_input_key_class_keys (const xcb_input_key_class_t *R); + +int +xcb_input_key_class_keys_length (const xcb_input_key_class_t *R); + +xcb_generic_iterator_t +xcb_input_key_class_keys_end (const xcb_input_key_class_t *R); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_input_key_class_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_input_key_class_t) + */ +void +xcb_input_key_class_next (xcb_input_key_class_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_input_key_class_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_input_key_class_end (xcb_input_key_class_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_input_scroll_class_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_input_scroll_class_t) + */ +void +xcb_input_scroll_class_next (xcb_input_scroll_class_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_input_scroll_class_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_input_scroll_class_end (xcb_input_scroll_class_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_input_touch_class_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_input_touch_class_t) + */ +void +xcb_input_touch_class_next (xcb_input_touch_class_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_input_touch_class_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_input_touch_class_end (xcb_input_touch_class_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_input_gesture_class_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_input_gesture_class_t) + */ +void +xcb_input_gesture_class_next (xcb_input_gesture_class_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_input_gesture_class_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_input_gesture_class_end (xcb_input_gesture_class_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_input_valuator_class_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_input_valuator_class_t) + */ +void +xcb_input_valuator_class_next (xcb_input_valuator_class_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_input_valuator_class_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_input_valuator_class_end (xcb_input_valuator_class_iterator_t i); + +uint32_t * +xcb_input_device_class_data_key_keys (const xcb_input_device_class_data_t *S); + +int +xcb_input_device_class_data_key_keys_length (const xcb_input_device_class_t *R, + const xcb_input_device_class_data_t *S); + +xcb_generic_iterator_t +xcb_input_device_class_data_key_keys_end (const xcb_input_device_class_t *R, + const xcb_input_device_class_data_t *S); + +uint32_t * +xcb_input_device_class_data_button_state (const xcb_input_device_class_data_t *S); + +int +xcb_input_device_class_data_button_state_length (const xcb_input_device_class_t *R, + const xcb_input_device_class_data_t *S); + +xcb_generic_iterator_t +xcb_input_device_class_data_button_state_end (const xcb_input_device_class_t *R, + const xcb_input_device_class_data_t *S); + +xcb_atom_t * +xcb_input_device_class_data_button_labels (const xcb_input_device_class_data_t *S); + +int +xcb_input_device_class_data_button_labels_length (const xcb_input_device_class_t *R, + const xcb_input_device_class_data_t *S); + +xcb_generic_iterator_t +xcb_input_device_class_data_button_labels_end (const xcb_input_device_class_t *R, + const xcb_input_device_class_data_t *S); + +int +xcb_input_device_class_data_serialize (void **_buffer, + uint16_t type, + const xcb_input_device_class_data_t *_aux); + +int +xcb_input_device_class_data_unpack (const void *_buffer, + uint16_t type, + xcb_input_device_class_data_t *_aux); + +int +xcb_input_device_class_data_sizeof (const void *_buffer, + uint16_t type); + +int +xcb_input_device_class_sizeof (const void *_buffer); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_input_device_class_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_input_device_class_t) + */ +void +xcb_input_device_class_next (xcb_input_device_class_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_input_device_class_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_input_device_class_end (xcb_input_device_class_iterator_t i); + +int +xcb_input_xi_device_info_sizeof (const void *_buffer); + +char * +xcb_input_xi_device_info_name (const xcb_input_xi_device_info_t *R); + +int +xcb_input_xi_device_info_name_length (const xcb_input_xi_device_info_t *R); + +xcb_generic_iterator_t +xcb_input_xi_device_info_name_end (const xcb_input_xi_device_info_t *R); + +int +xcb_input_xi_device_info_classes_length (const xcb_input_xi_device_info_t *R); + +xcb_input_device_class_iterator_t +xcb_input_xi_device_info_classes_iterator (const xcb_input_xi_device_info_t *R); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_input_xi_device_info_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_input_xi_device_info_t) + */ +void +xcb_input_xi_device_info_next (xcb_input_xi_device_info_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_input_xi_device_info_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_input_xi_device_info_end (xcb_input_xi_device_info_iterator_t i); + +int +xcb_input_xi_query_device_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_input_xi_query_device_cookie_t +xcb_input_xi_query_device (xcb_connection_t *c, + xcb_input_device_id_t deviceid); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_input_xi_query_device_cookie_t +xcb_input_xi_query_device_unchecked (xcb_connection_t *c, + xcb_input_device_id_t deviceid); + +int +xcb_input_xi_query_device_infos_length (const xcb_input_xi_query_device_reply_t *R); + +xcb_input_xi_device_info_iterator_t +xcb_input_xi_query_device_infos_iterator (const xcb_input_xi_query_device_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_input_xi_query_device_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_input_xi_query_device_reply_t * +xcb_input_xi_query_device_reply (xcb_connection_t *c, + xcb_input_xi_query_device_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_input_xi_set_focus_checked (xcb_connection_t *c, + xcb_window_t window, + xcb_timestamp_t time, + xcb_input_device_id_t deviceid); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_input_xi_set_focus (xcb_connection_t *c, + xcb_window_t window, + xcb_timestamp_t time, + xcb_input_device_id_t deviceid); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_input_xi_get_focus_cookie_t +xcb_input_xi_get_focus (xcb_connection_t *c, + xcb_input_device_id_t deviceid); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_input_xi_get_focus_cookie_t +xcb_input_xi_get_focus_unchecked (xcb_connection_t *c, + xcb_input_device_id_t deviceid); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_input_xi_get_focus_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_input_xi_get_focus_reply_t * +xcb_input_xi_get_focus_reply (xcb_connection_t *c, + xcb_input_xi_get_focus_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_input_xi_grab_device_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_input_xi_grab_device_cookie_t +xcb_input_xi_grab_device (xcb_connection_t *c, + xcb_window_t window, + xcb_timestamp_t time, + xcb_cursor_t cursor, + xcb_input_device_id_t deviceid, + uint8_t mode, + uint8_t paired_device_mode, + uint8_t owner_events, + uint16_t mask_len, + const uint32_t *mask); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_input_xi_grab_device_cookie_t +xcb_input_xi_grab_device_unchecked (xcb_connection_t *c, + xcb_window_t window, + xcb_timestamp_t time, + xcb_cursor_t cursor, + xcb_input_device_id_t deviceid, + uint8_t mode, + uint8_t paired_device_mode, + uint8_t owner_events, + uint16_t mask_len, + const uint32_t *mask); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_input_xi_grab_device_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_input_xi_grab_device_reply_t * +xcb_input_xi_grab_device_reply (xcb_connection_t *c, + xcb_input_xi_grab_device_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_input_xi_ungrab_device_checked (xcb_connection_t *c, + xcb_timestamp_t time, + xcb_input_device_id_t deviceid); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_input_xi_ungrab_device (xcb_connection_t *c, + xcb_timestamp_t time, + xcb_input_device_id_t deviceid); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_input_xi_allow_events_checked (xcb_connection_t *c, + xcb_timestamp_t time, + xcb_input_device_id_t deviceid, + uint8_t event_mode, + uint32_t touchid, + xcb_window_t grab_window); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_input_xi_allow_events (xcb_connection_t *c, + xcb_timestamp_t time, + xcb_input_device_id_t deviceid, + uint8_t event_mode, + uint32_t touchid, + xcb_window_t grab_window); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_input_grab_modifier_info_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_input_grab_modifier_info_t) + */ +void +xcb_input_grab_modifier_info_next (xcb_input_grab_modifier_info_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_input_grab_modifier_info_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_input_grab_modifier_info_end (xcb_input_grab_modifier_info_iterator_t i); + +int +xcb_input_xi_passive_grab_device_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_input_xi_passive_grab_device_cookie_t +xcb_input_xi_passive_grab_device (xcb_connection_t *c, + xcb_timestamp_t time, + xcb_window_t grab_window, + xcb_cursor_t cursor, + uint32_t detail, + xcb_input_device_id_t deviceid, + uint16_t num_modifiers, + uint16_t mask_len, + uint8_t grab_type, + uint8_t grab_mode, + uint8_t paired_device_mode, + uint8_t owner_events, + const uint32_t *mask, + const uint32_t *modifiers); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_input_xi_passive_grab_device_cookie_t +xcb_input_xi_passive_grab_device_unchecked (xcb_connection_t *c, + xcb_timestamp_t time, + xcb_window_t grab_window, + xcb_cursor_t cursor, + uint32_t detail, + xcb_input_device_id_t deviceid, + uint16_t num_modifiers, + uint16_t mask_len, + uint8_t grab_type, + uint8_t grab_mode, + uint8_t paired_device_mode, + uint8_t owner_events, + const uint32_t *mask, + const uint32_t *modifiers); + +xcb_input_grab_modifier_info_t * +xcb_input_xi_passive_grab_device_modifiers (const xcb_input_xi_passive_grab_device_reply_t *R); + +int +xcb_input_xi_passive_grab_device_modifiers_length (const xcb_input_xi_passive_grab_device_reply_t *R); + +xcb_input_grab_modifier_info_iterator_t +xcb_input_xi_passive_grab_device_modifiers_iterator (const xcb_input_xi_passive_grab_device_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_input_xi_passive_grab_device_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_input_xi_passive_grab_device_reply_t * +xcb_input_xi_passive_grab_device_reply (xcb_connection_t *c, + xcb_input_xi_passive_grab_device_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_input_xi_passive_ungrab_device_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_input_xi_passive_ungrab_device_checked (xcb_connection_t *c, + xcb_window_t grab_window, + uint32_t detail, + xcb_input_device_id_t deviceid, + uint16_t num_modifiers, + uint8_t grab_type, + const uint32_t *modifiers); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_input_xi_passive_ungrab_device (xcb_connection_t *c, + xcb_window_t grab_window, + uint32_t detail, + xcb_input_device_id_t deviceid, + uint16_t num_modifiers, + uint8_t grab_type, + const uint32_t *modifiers); + +uint32_t * +xcb_input_xi_passive_ungrab_device_modifiers (const xcb_input_xi_passive_ungrab_device_request_t *R); + +int +xcb_input_xi_passive_ungrab_device_modifiers_length (const xcb_input_xi_passive_ungrab_device_request_t *R); + +xcb_generic_iterator_t +xcb_input_xi_passive_ungrab_device_modifiers_end (const xcb_input_xi_passive_ungrab_device_request_t *R); + +int +xcb_input_xi_list_properties_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_input_xi_list_properties_cookie_t +xcb_input_xi_list_properties (xcb_connection_t *c, + xcb_input_device_id_t deviceid); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_input_xi_list_properties_cookie_t +xcb_input_xi_list_properties_unchecked (xcb_connection_t *c, + xcb_input_device_id_t deviceid); + +xcb_atom_t * +xcb_input_xi_list_properties_properties (const xcb_input_xi_list_properties_reply_t *R); + +int +xcb_input_xi_list_properties_properties_length (const xcb_input_xi_list_properties_reply_t *R); + +xcb_generic_iterator_t +xcb_input_xi_list_properties_properties_end (const xcb_input_xi_list_properties_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_input_xi_list_properties_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_input_xi_list_properties_reply_t * +xcb_input_xi_list_properties_reply (xcb_connection_t *c, + xcb_input_xi_list_properties_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +uint8_t * +xcb_input_xi_change_property_items_data_8 (const xcb_input_xi_change_property_items_t *S); + +int +xcb_input_xi_change_property_items_data_8_length (const xcb_input_xi_change_property_request_t *R, + const xcb_input_xi_change_property_items_t *S); + +xcb_generic_iterator_t +xcb_input_xi_change_property_items_data_8_end (const xcb_input_xi_change_property_request_t *R, + const xcb_input_xi_change_property_items_t *S); + +uint16_t * +xcb_input_xi_change_property_items_data_16 (const xcb_input_xi_change_property_items_t *S); + +int +xcb_input_xi_change_property_items_data_16_length (const xcb_input_xi_change_property_request_t *R, + const xcb_input_xi_change_property_items_t *S); + +xcb_generic_iterator_t +xcb_input_xi_change_property_items_data_16_end (const xcb_input_xi_change_property_request_t *R, + const xcb_input_xi_change_property_items_t *S); + +uint32_t * +xcb_input_xi_change_property_items_data_32 (const xcb_input_xi_change_property_items_t *S); + +int +xcb_input_xi_change_property_items_data_32_length (const xcb_input_xi_change_property_request_t *R, + const xcb_input_xi_change_property_items_t *S); + +xcb_generic_iterator_t +xcb_input_xi_change_property_items_data_32_end (const xcb_input_xi_change_property_request_t *R, + const xcb_input_xi_change_property_items_t *S); + +int +xcb_input_xi_change_property_items_serialize (void **_buffer, + uint32_t num_items, + uint8_t format, + const xcb_input_xi_change_property_items_t *_aux); + +int +xcb_input_xi_change_property_items_unpack (const void *_buffer, + uint32_t num_items, + uint8_t format, + xcb_input_xi_change_property_items_t *_aux); + +int +xcb_input_xi_change_property_items_sizeof (const void *_buffer, + uint32_t num_items, + uint8_t format); + +int +xcb_input_xi_change_property_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_input_xi_change_property_checked (xcb_connection_t *c, + xcb_input_device_id_t deviceid, + uint8_t mode, + uint8_t format, + xcb_atom_t property, + xcb_atom_t type, + uint32_t num_items, + const void *items); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_input_xi_change_property (xcb_connection_t *c, + xcb_input_device_id_t deviceid, + uint8_t mode, + uint8_t format, + xcb_atom_t property, + xcb_atom_t type, + uint32_t num_items, + const void *items); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_input_xi_change_property_aux_checked (xcb_connection_t *c, + xcb_input_device_id_t deviceid, + uint8_t mode, + uint8_t format, + xcb_atom_t property, + xcb_atom_t type, + uint32_t num_items, + const xcb_input_xi_change_property_items_t *items); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_input_xi_change_property_aux (xcb_connection_t *c, + xcb_input_device_id_t deviceid, + uint8_t mode, + uint8_t format, + xcb_atom_t property, + xcb_atom_t type, + uint32_t num_items, + const xcb_input_xi_change_property_items_t *items); + +void * +xcb_input_xi_change_property_items (const xcb_input_xi_change_property_request_t *R); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_input_xi_delete_property_checked (xcb_connection_t *c, + xcb_input_device_id_t deviceid, + xcb_atom_t property); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_input_xi_delete_property (xcb_connection_t *c, + xcb_input_device_id_t deviceid, + xcb_atom_t property); + +uint8_t * +xcb_input_xi_get_property_items_data_8 (const xcb_input_xi_get_property_items_t *S); + +int +xcb_input_xi_get_property_items_data_8_length (const xcb_input_xi_get_property_reply_t *R, + const xcb_input_xi_get_property_items_t *S); + +xcb_generic_iterator_t +xcb_input_xi_get_property_items_data_8_end (const xcb_input_xi_get_property_reply_t *R, + const xcb_input_xi_get_property_items_t *S); + +uint16_t * +xcb_input_xi_get_property_items_data_16 (const xcb_input_xi_get_property_items_t *S); + +int +xcb_input_xi_get_property_items_data_16_length (const xcb_input_xi_get_property_reply_t *R, + const xcb_input_xi_get_property_items_t *S); + +xcb_generic_iterator_t +xcb_input_xi_get_property_items_data_16_end (const xcb_input_xi_get_property_reply_t *R, + const xcb_input_xi_get_property_items_t *S); + +uint32_t * +xcb_input_xi_get_property_items_data_32 (const xcb_input_xi_get_property_items_t *S); + +int +xcb_input_xi_get_property_items_data_32_length (const xcb_input_xi_get_property_reply_t *R, + const xcb_input_xi_get_property_items_t *S); + +xcb_generic_iterator_t +xcb_input_xi_get_property_items_data_32_end (const xcb_input_xi_get_property_reply_t *R, + const xcb_input_xi_get_property_items_t *S); + +int +xcb_input_xi_get_property_items_serialize (void **_buffer, + uint32_t num_items, + uint8_t format, + const xcb_input_xi_get_property_items_t *_aux); + +int +xcb_input_xi_get_property_items_unpack (const void *_buffer, + uint32_t num_items, + uint8_t format, + xcb_input_xi_get_property_items_t *_aux); + +int +xcb_input_xi_get_property_items_sizeof (const void *_buffer, + uint32_t num_items, + uint8_t format); + +int +xcb_input_xi_get_property_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_input_xi_get_property_cookie_t +xcb_input_xi_get_property (xcb_connection_t *c, + xcb_input_device_id_t deviceid, + uint8_t _delete, + xcb_atom_t property, + xcb_atom_t type, + uint32_t offset, + uint32_t len); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_input_xi_get_property_cookie_t +xcb_input_xi_get_property_unchecked (xcb_connection_t *c, + xcb_input_device_id_t deviceid, + uint8_t _delete, + xcb_atom_t property, + xcb_atom_t type, + uint32_t offset, + uint32_t len); + +void * +xcb_input_xi_get_property_items (const xcb_input_xi_get_property_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_input_xi_get_property_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_input_xi_get_property_reply_t * +xcb_input_xi_get_property_reply (xcb_connection_t *c, + xcb_input_xi_get_property_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_input_xi_get_selected_events_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_input_xi_get_selected_events_cookie_t +xcb_input_xi_get_selected_events (xcb_connection_t *c, + xcb_window_t window); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_input_xi_get_selected_events_cookie_t +xcb_input_xi_get_selected_events_unchecked (xcb_connection_t *c, + xcb_window_t window); + +int +xcb_input_xi_get_selected_events_masks_length (const xcb_input_xi_get_selected_events_reply_t *R); + +xcb_input_event_mask_iterator_t +xcb_input_xi_get_selected_events_masks_iterator (const xcb_input_xi_get_selected_events_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_input_xi_get_selected_events_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_input_xi_get_selected_events_reply_t * +xcb_input_xi_get_selected_events_reply (xcb_connection_t *c, + xcb_input_xi_get_selected_events_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_input_barrier_release_pointer_info_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_input_barrier_release_pointer_info_t) + */ +void +xcb_input_barrier_release_pointer_info_next (xcb_input_barrier_release_pointer_info_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_input_barrier_release_pointer_info_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_input_barrier_release_pointer_info_end (xcb_input_barrier_release_pointer_info_iterator_t i); + +int +xcb_input_xi_barrier_release_pointer_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_input_xi_barrier_release_pointer_checked (xcb_connection_t *c, + uint32_t num_barriers, + const xcb_input_barrier_release_pointer_info_t *barriers); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_input_xi_barrier_release_pointer (xcb_connection_t *c, + uint32_t num_barriers, + const xcb_input_barrier_release_pointer_info_t *barriers); + +xcb_input_barrier_release_pointer_info_t * +xcb_input_xi_barrier_release_pointer_barriers (const xcb_input_xi_barrier_release_pointer_request_t *R); + +int +xcb_input_xi_barrier_release_pointer_barriers_length (const xcb_input_xi_barrier_release_pointer_request_t *R); + +xcb_input_barrier_release_pointer_info_iterator_t +xcb_input_xi_barrier_release_pointer_barriers_iterator (const xcb_input_xi_barrier_release_pointer_request_t *R); + +int +xcb_input_device_changed_sizeof (const void *_buffer); + +int +xcb_input_device_changed_classes_length (const xcb_input_device_changed_event_t *R); + +xcb_input_device_class_iterator_t +xcb_input_device_changed_classes_iterator (const xcb_input_device_changed_event_t *R); + +int +xcb_input_key_press_sizeof (const void *_buffer); + +uint32_t * +xcb_input_key_press_button_mask (const xcb_input_key_press_event_t *R); + +int +xcb_input_key_press_button_mask_length (const xcb_input_key_press_event_t *R); + +xcb_generic_iterator_t +xcb_input_key_press_button_mask_end (const xcb_input_key_press_event_t *R); + +uint32_t * +xcb_input_key_press_valuator_mask (const xcb_input_key_press_event_t *R); + +int +xcb_input_key_press_valuator_mask_length (const xcb_input_key_press_event_t *R); + +xcb_generic_iterator_t +xcb_input_key_press_valuator_mask_end (const xcb_input_key_press_event_t *R); + +xcb_input_fp3232_t * +xcb_input_key_press_axisvalues (const xcb_input_key_press_event_t *R); + +int +xcb_input_key_press_axisvalues_length (const xcb_input_key_press_event_t *R); + +xcb_input_fp3232_iterator_t +xcb_input_key_press_axisvalues_iterator (const xcb_input_key_press_event_t *R); + +int +xcb_input_key_release_sizeof (const void *_buffer /**< */); + +int +xcb_input_button_press_sizeof (const void *_buffer); + +uint32_t * +xcb_input_button_press_button_mask (const xcb_input_button_press_event_t *R); + +int +xcb_input_button_press_button_mask_length (const xcb_input_button_press_event_t *R); + +xcb_generic_iterator_t +xcb_input_button_press_button_mask_end (const xcb_input_button_press_event_t *R); + +uint32_t * +xcb_input_button_press_valuator_mask (const xcb_input_button_press_event_t *R); + +int +xcb_input_button_press_valuator_mask_length (const xcb_input_button_press_event_t *R); + +xcb_generic_iterator_t +xcb_input_button_press_valuator_mask_end (const xcb_input_button_press_event_t *R); + +xcb_input_fp3232_t * +xcb_input_button_press_axisvalues (const xcb_input_button_press_event_t *R); + +int +xcb_input_button_press_axisvalues_length (const xcb_input_button_press_event_t *R); + +xcb_input_fp3232_iterator_t +xcb_input_button_press_axisvalues_iterator (const xcb_input_button_press_event_t *R); + +int +xcb_input_button_release_sizeof (const void *_buffer /**< */); + +int +xcb_input_motion_sizeof (const void *_buffer /**< */); + +int +xcb_input_enter_sizeof (const void *_buffer); + +uint32_t * +xcb_input_enter_buttons (const xcb_input_enter_event_t *R); + +int +xcb_input_enter_buttons_length (const xcb_input_enter_event_t *R); + +xcb_generic_iterator_t +xcb_input_enter_buttons_end (const xcb_input_enter_event_t *R); + +int +xcb_input_leave_sizeof (const void *_buffer /**< */); + +int +xcb_input_focus_in_sizeof (const void *_buffer /**< */); + +int +xcb_input_focus_out_sizeof (const void *_buffer /**< */); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_input_hierarchy_info_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_input_hierarchy_info_t) + */ +void +xcb_input_hierarchy_info_next (xcb_input_hierarchy_info_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_input_hierarchy_info_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_input_hierarchy_info_end (xcb_input_hierarchy_info_iterator_t i); + +int +xcb_input_hierarchy_sizeof (const void *_buffer); + +xcb_input_hierarchy_info_t * +xcb_input_hierarchy_infos (const xcb_input_hierarchy_event_t *R); + +int +xcb_input_hierarchy_infos_length (const xcb_input_hierarchy_event_t *R); + +xcb_input_hierarchy_info_iterator_t +xcb_input_hierarchy_infos_iterator (const xcb_input_hierarchy_event_t *R); + +int +xcb_input_raw_key_press_sizeof (const void *_buffer); + +uint32_t * +xcb_input_raw_key_press_valuator_mask (const xcb_input_raw_key_press_event_t *R); + +int +xcb_input_raw_key_press_valuator_mask_length (const xcb_input_raw_key_press_event_t *R); + +xcb_generic_iterator_t +xcb_input_raw_key_press_valuator_mask_end (const xcb_input_raw_key_press_event_t *R); + +xcb_input_fp3232_t * +xcb_input_raw_key_press_axisvalues (const xcb_input_raw_key_press_event_t *R); + +int +xcb_input_raw_key_press_axisvalues_length (const xcb_input_raw_key_press_event_t *R); + +xcb_input_fp3232_iterator_t +xcb_input_raw_key_press_axisvalues_iterator (const xcb_input_raw_key_press_event_t *R); + +xcb_input_fp3232_t * +xcb_input_raw_key_press_axisvalues_raw (const xcb_input_raw_key_press_event_t *R); + +int +xcb_input_raw_key_press_axisvalues_raw_length (const xcb_input_raw_key_press_event_t *R); + +xcb_input_fp3232_iterator_t +xcb_input_raw_key_press_axisvalues_raw_iterator (const xcb_input_raw_key_press_event_t *R); + +int +xcb_input_raw_key_release_sizeof (const void *_buffer /**< */); + +int +xcb_input_raw_button_press_sizeof (const void *_buffer); + +uint32_t * +xcb_input_raw_button_press_valuator_mask (const xcb_input_raw_button_press_event_t *R); + +int +xcb_input_raw_button_press_valuator_mask_length (const xcb_input_raw_button_press_event_t *R); + +xcb_generic_iterator_t +xcb_input_raw_button_press_valuator_mask_end (const xcb_input_raw_button_press_event_t *R); + +xcb_input_fp3232_t * +xcb_input_raw_button_press_axisvalues (const xcb_input_raw_button_press_event_t *R); + +int +xcb_input_raw_button_press_axisvalues_length (const xcb_input_raw_button_press_event_t *R); + +xcb_input_fp3232_iterator_t +xcb_input_raw_button_press_axisvalues_iterator (const xcb_input_raw_button_press_event_t *R); + +xcb_input_fp3232_t * +xcb_input_raw_button_press_axisvalues_raw (const xcb_input_raw_button_press_event_t *R); + +int +xcb_input_raw_button_press_axisvalues_raw_length (const xcb_input_raw_button_press_event_t *R); + +xcb_input_fp3232_iterator_t +xcb_input_raw_button_press_axisvalues_raw_iterator (const xcb_input_raw_button_press_event_t *R); + +int +xcb_input_raw_button_release_sizeof (const void *_buffer /**< */); + +int +xcb_input_raw_motion_sizeof (const void *_buffer /**< */); + +int +xcb_input_touch_begin_sizeof (const void *_buffer); + +uint32_t * +xcb_input_touch_begin_button_mask (const xcb_input_touch_begin_event_t *R); + +int +xcb_input_touch_begin_button_mask_length (const xcb_input_touch_begin_event_t *R); + +xcb_generic_iterator_t +xcb_input_touch_begin_button_mask_end (const xcb_input_touch_begin_event_t *R); + +uint32_t * +xcb_input_touch_begin_valuator_mask (const xcb_input_touch_begin_event_t *R); + +int +xcb_input_touch_begin_valuator_mask_length (const xcb_input_touch_begin_event_t *R); + +xcb_generic_iterator_t +xcb_input_touch_begin_valuator_mask_end (const xcb_input_touch_begin_event_t *R); + +xcb_input_fp3232_t * +xcb_input_touch_begin_axisvalues (const xcb_input_touch_begin_event_t *R); + +int +xcb_input_touch_begin_axisvalues_length (const xcb_input_touch_begin_event_t *R); + +xcb_input_fp3232_iterator_t +xcb_input_touch_begin_axisvalues_iterator (const xcb_input_touch_begin_event_t *R); + +int +xcb_input_touch_update_sizeof (const void *_buffer /**< */); + +int +xcb_input_touch_end_sizeof (const void *_buffer /**< */); + +int +xcb_input_raw_touch_begin_sizeof (const void *_buffer); + +uint32_t * +xcb_input_raw_touch_begin_valuator_mask (const xcb_input_raw_touch_begin_event_t *R); + +int +xcb_input_raw_touch_begin_valuator_mask_length (const xcb_input_raw_touch_begin_event_t *R); + +xcb_generic_iterator_t +xcb_input_raw_touch_begin_valuator_mask_end (const xcb_input_raw_touch_begin_event_t *R); + +xcb_input_fp3232_t * +xcb_input_raw_touch_begin_axisvalues (const xcb_input_raw_touch_begin_event_t *R); + +int +xcb_input_raw_touch_begin_axisvalues_length (const xcb_input_raw_touch_begin_event_t *R); + +xcb_input_fp3232_iterator_t +xcb_input_raw_touch_begin_axisvalues_iterator (const xcb_input_raw_touch_begin_event_t *R); + +xcb_input_fp3232_t * +xcb_input_raw_touch_begin_axisvalues_raw (const xcb_input_raw_touch_begin_event_t *R); + +int +xcb_input_raw_touch_begin_axisvalues_raw_length (const xcb_input_raw_touch_begin_event_t *R); + +xcb_input_fp3232_iterator_t +xcb_input_raw_touch_begin_axisvalues_raw_iterator (const xcb_input_raw_touch_begin_event_t *R); + +int +xcb_input_raw_touch_update_sizeof (const void *_buffer /**< */); + +int +xcb_input_raw_touch_end_sizeof (const void *_buffer /**< */); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_input_event_for_send_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_input_event_for_send_t) + */ +void +xcb_input_event_for_send_next (xcb_input_event_for_send_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_input_event_for_send_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_input_event_for_send_end (xcb_input_event_for_send_iterator_t i); + +int +xcb_input_send_extension_event_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_input_send_extension_event_checked (xcb_connection_t *c, + xcb_window_t destination, + uint8_t device_id, + uint8_t propagate, + uint16_t num_classes, + uint8_t num_events, + const xcb_input_event_for_send_t *events, + const xcb_input_event_class_t *classes); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_input_send_extension_event (xcb_connection_t *c, + xcb_window_t destination, + uint8_t device_id, + uint8_t propagate, + uint16_t num_classes, + uint8_t num_events, + const xcb_input_event_for_send_t *events, + const xcb_input_event_class_t *classes); + +xcb_input_event_for_send_t * +xcb_input_send_extension_event_events (const xcb_input_send_extension_event_request_t *R); + +int +xcb_input_send_extension_event_events_length (const xcb_input_send_extension_event_request_t *R); + +xcb_input_event_for_send_iterator_t +xcb_input_send_extension_event_events_iterator (const xcb_input_send_extension_event_request_t *R); + +xcb_input_event_class_t * +xcb_input_send_extension_event_classes (const xcb_input_send_extension_event_request_t *R); + +int +xcb_input_send_extension_event_classes_length (const xcb_input_send_extension_event_request_t *R); + +xcb_generic_iterator_t +xcb_input_send_extension_event_classes_end (const xcb_input_send_extension_event_request_t *R); + + +#ifdef __cplusplus +} +#endif + +#endif + +/** + * @} + */ diff --git a/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/include/xcb/xkb.h b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/include/xcb/xkb.h new file mode 100644 index 0000000000000000000000000000000000000000..056585b210a01a60aa1e3082cb88f5f52e46d489 --- /dev/null +++ b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/include/xcb/xkb.h @@ -0,0 +1,7106 @@ +/* + * This file generated automatically from xkb.xml by c_client.py. + * Edit at your peril. + */ + +/** + * @defgroup XCB_xkb_API XCB xkb API + * @brief xkb XCB Protocol Implementation. + * @{ + **/ + +#ifndef __XKB_H +#define __XKB_H + +#include "xcb.h" +#include "xproto.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#define XCB_XKB_MAJOR_VERSION 1 +#define XCB_XKB_MINOR_VERSION 0 + +extern xcb_extension_t xcb_xkb_id; + +typedef enum xcb_xkb_const_t { + XCB_XKB_CONST_MAX_LEGAL_KEY_CODE = 255, + XCB_XKB_CONST_PER_KEY_BIT_ARRAY_SIZE = 32, + XCB_XKB_CONST_KEY_NAME_LENGTH = 4 +} xcb_xkb_const_t; + +typedef enum xcb_xkb_event_type_t { + XCB_XKB_EVENT_TYPE_NEW_KEYBOARD_NOTIFY = 1, + XCB_XKB_EVENT_TYPE_MAP_NOTIFY = 2, + XCB_XKB_EVENT_TYPE_STATE_NOTIFY = 4, + XCB_XKB_EVENT_TYPE_CONTROLS_NOTIFY = 8, + XCB_XKB_EVENT_TYPE_INDICATOR_STATE_NOTIFY = 16, + XCB_XKB_EVENT_TYPE_INDICATOR_MAP_NOTIFY = 32, + XCB_XKB_EVENT_TYPE_NAMES_NOTIFY = 64, + XCB_XKB_EVENT_TYPE_COMPAT_MAP_NOTIFY = 128, + XCB_XKB_EVENT_TYPE_BELL_NOTIFY = 256, + XCB_XKB_EVENT_TYPE_ACTION_MESSAGE = 512, + XCB_XKB_EVENT_TYPE_ACCESS_X_NOTIFY = 1024, + XCB_XKB_EVENT_TYPE_EXTENSION_DEVICE_NOTIFY = 2048 +} xcb_xkb_event_type_t; + +typedef enum xcb_xkb_nkn_detail_t { + XCB_XKB_NKN_DETAIL_KEYCODES = 1, + XCB_XKB_NKN_DETAIL_GEOMETRY = 2, + XCB_XKB_NKN_DETAIL_DEVICE_ID = 4 +} xcb_xkb_nkn_detail_t; + +typedef enum xcb_xkb_axn_detail_t { + XCB_XKB_AXN_DETAIL_SK_PRESS = 1, + XCB_XKB_AXN_DETAIL_SK_ACCEPT = 2, + XCB_XKB_AXN_DETAIL_SK_REJECT = 4, + XCB_XKB_AXN_DETAIL_SK_RELEASE = 8, + XCB_XKB_AXN_DETAIL_BK_ACCEPT = 16, + XCB_XKB_AXN_DETAIL_BK_REJECT = 32, + XCB_XKB_AXN_DETAIL_AXK_WARNING = 64 +} xcb_xkb_axn_detail_t; + +typedef enum xcb_xkb_map_part_t { + XCB_XKB_MAP_PART_KEY_TYPES = 1, + XCB_XKB_MAP_PART_KEY_SYMS = 2, + XCB_XKB_MAP_PART_MODIFIER_MAP = 4, + XCB_XKB_MAP_PART_EXPLICIT_COMPONENTS = 8, + XCB_XKB_MAP_PART_KEY_ACTIONS = 16, + XCB_XKB_MAP_PART_KEY_BEHAVIORS = 32, + XCB_XKB_MAP_PART_VIRTUAL_MODS = 64, + XCB_XKB_MAP_PART_VIRTUAL_MOD_MAP = 128 +} xcb_xkb_map_part_t; + +typedef enum xcb_xkb_set_map_flags_t { + XCB_XKB_SET_MAP_FLAGS_RESIZE_TYPES = 1, + XCB_XKB_SET_MAP_FLAGS_RECOMPUTE_ACTIONS = 2 +} xcb_xkb_set_map_flags_t; + +typedef enum xcb_xkb_state_part_t { + XCB_XKB_STATE_PART_MODIFIER_STATE = 1, + XCB_XKB_STATE_PART_MODIFIER_BASE = 2, + XCB_XKB_STATE_PART_MODIFIER_LATCH = 4, + XCB_XKB_STATE_PART_MODIFIER_LOCK = 8, + XCB_XKB_STATE_PART_GROUP_STATE = 16, + XCB_XKB_STATE_PART_GROUP_BASE = 32, + XCB_XKB_STATE_PART_GROUP_LATCH = 64, + XCB_XKB_STATE_PART_GROUP_LOCK = 128, + XCB_XKB_STATE_PART_COMPAT_STATE = 256, + XCB_XKB_STATE_PART_GRAB_MODS = 512, + XCB_XKB_STATE_PART_COMPAT_GRAB_MODS = 1024, + XCB_XKB_STATE_PART_LOOKUP_MODS = 2048, + XCB_XKB_STATE_PART_COMPAT_LOOKUP_MODS = 4096, + XCB_XKB_STATE_PART_POINTER_BUTTONS = 8192 +} xcb_xkb_state_part_t; + +typedef enum xcb_xkb_bool_ctrl_t { + XCB_XKB_BOOL_CTRL_REPEAT_KEYS = 1, + XCB_XKB_BOOL_CTRL_SLOW_KEYS = 2, + XCB_XKB_BOOL_CTRL_BOUNCE_KEYS = 4, + XCB_XKB_BOOL_CTRL_STICKY_KEYS = 8, + XCB_XKB_BOOL_CTRL_MOUSE_KEYS = 16, + XCB_XKB_BOOL_CTRL_MOUSE_KEYS_ACCEL = 32, + XCB_XKB_BOOL_CTRL_ACCESS_X_KEYS = 64, + XCB_XKB_BOOL_CTRL_ACCESS_X_TIMEOUT_MASK = 128, + XCB_XKB_BOOL_CTRL_ACCESS_X_FEEDBACK_MASK = 256, + XCB_XKB_BOOL_CTRL_AUDIBLE_BELL_MASK = 512, + XCB_XKB_BOOL_CTRL_OVERLAY_1_MASK = 1024, + XCB_XKB_BOOL_CTRL_OVERLAY_2_MASK = 2048, + XCB_XKB_BOOL_CTRL_IGNORE_GROUP_LOCK_MASK = 4096 +} xcb_xkb_bool_ctrl_t; + +typedef enum xcb_xkb_control_t { + XCB_XKB_CONTROL_GROUPS_WRAP = 134217728, + XCB_XKB_CONTROL_INTERNAL_MODS = 268435456, + XCB_XKB_CONTROL_IGNORE_LOCK_MODS = 536870912, + XCB_XKB_CONTROL_PER_KEY_REPEAT = 1073741824, + XCB_XKB_CONTROL_CONTROLS_ENABLED = 2147483648 +} xcb_xkb_control_t; + +typedef enum xcb_xkb_ax_option_t { + XCB_XKB_AX_OPTION_SK_PRESS_FB = 1, + XCB_XKB_AX_OPTION_SK_ACCEPT_FB = 2, + XCB_XKB_AX_OPTION_FEATURE_FB = 4, + XCB_XKB_AX_OPTION_SLOW_WARN_FB = 8, + XCB_XKB_AX_OPTION_INDICATOR_FB = 16, + XCB_XKB_AX_OPTION_STICKY_KEYS_FB = 32, + XCB_XKB_AX_OPTION_TWO_KEYS = 64, + XCB_XKB_AX_OPTION_LATCH_TO_LOCK = 128, + XCB_XKB_AX_OPTION_SK_RELEASE_FB = 256, + XCB_XKB_AX_OPTION_SK_REJECT_FB = 512, + XCB_XKB_AX_OPTION_BK_REJECT_FB = 1024, + XCB_XKB_AX_OPTION_DUMB_BELL = 2048 +} xcb_xkb_ax_option_t; + +typedef uint16_t xcb_xkb_device_spec_t; + +/** + * @brief xcb_xkb_device_spec_iterator_t + **/ +typedef struct xcb_xkb_device_spec_iterator_t { + xcb_xkb_device_spec_t *data; + int rem; + int index; +} xcb_xkb_device_spec_iterator_t; + +typedef enum xcb_xkb_led_class_result_t { + XCB_XKB_LED_CLASS_RESULT_KBD_FEEDBACK_CLASS = 0, + XCB_XKB_LED_CLASS_RESULT_LED_FEEDBACK_CLASS = 4 +} xcb_xkb_led_class_result_t; + +typedef enum xcb_xkb_led_class_t { + XCB_XKB_LED_CLASS_KBD_FEEDBACK_CLASS = 0, + XCB_XKB_LED_CLASS_LED_FEEDBACK_CLASS = 4, + XCB_XKB_LED_CLASS_DFLT_XI_CLASS = 768, + XCB_XKB_LED_CLASS_ALL_XI_CLASSES = 1280 +} xcb_xkb_led_class_t; + +typedef uint16_t xcb_xkb_led_class_spec_t; + +/** + * @brief xcb_xkb_led_class_spec_iterator_t + **/ +typedef struct xcb_xkb_led_class_spec_iterator_t { + xcb_xkb_led_class_spec_t *data; + int rem; + int index; +} xcb_xkb_led_class_spec_iterator_t; + +typedef enum xcb_xkb_bell_class_result_t { + XCB_XKB_BELL_CLASS_RESULT_KBD_FEEDBACK_CLASS = 0, + XCB_XKB_BELL_CLASS_RESULT_BELL_FEEDBACK_CLASS = 5 +} xcb_xkb_bell_class_result_t; + +typedef enum xcb_xkb_bell_class_t { + XCB_XKB_BELL_CLASS_KBD_FEEDBACK_CLASS = 0, + XCB_XKB_BELL_CLASS_BELL_FEEDBACK_CLASS = 5, + XCB_XKB_BELL_CLASS_DFLT_XI_CLASS = 768 +} xcb_xkb_bell_class_t; + +typedef uint16_t xcb_xkb_bell_class_spec_t; + +/** + * @brief xcb_xkb_bell_class_spec_iterator_t + **/ +typedef struct xcb_xkb_bell_class_spec_iterator_t { + xcb_xkb_bell_class_spec_t *data; + int rem; + int index; +} xcb_xkb_bell_class_spec_iterator_t; + +typedef enum xcb_xkb_id_t { + XCB_XKB_ID_USE_CORE_KBD = 256, + XCB_XKB_ID_USE_CORE_PTR = 512, + XCB_XKB_ID_DFLT_XI_CLASS = 768, + XCB_XKB_ID_DFLT_XI_ID = 1024, + XCB_XKB_ID_ALL_XI_CLASS = 1280, + XCB_XKB_ID_ALL_XI_ID = 1536, + XCB_XKB_ID_XI_NONE = 65280 +} xcb_xkb_id_t; + +typedef uint16_t xcb_xkb_id_spec_t; + +/** + * @brief xcb_xkb_id_spec_iterator_t + **/ +typedef struct xcb_xkb_id_spec_iterator_t { + xcb_xkb_id_spec_t *data; + int rem; + int index; +} xcb_xkb_id_spec_iterator_t; + +typedef enum xcb_xkb_group_t { + XCB_XKB_GROUP_1 = 0, + XCB_XKB_GROUP_2 = 1, + XCB_XKB_GROUP_3 = 2, + XCB_XKB_GROUP_4 = 3 +} xcb_xkb_group_t; + +typedef enum xcb_xkb_groups_t { + XCB_XKB_GROUPS_ANY = 254, + XCB_XKB_GROUPS_ALL = 255 +} xcb_xkb_groups_t; + +typedef enum xcb_xkb_set_of_group_t { + XCB_XKB_SET_OF_GROUP_GROUP_1 = 1, + XCB_XKB_SET_OF_GROUP_GROUP_2 = 2, + XCB_XKB_SET_OF_GROUP_GROUP_3 = 4, + XCB_XKB_SET_OF_GROUP_GROUP_4 = 8 +} xcb_xkb_set_of_group_t; + +typedef enum xcb_xkb_set_of_groups_t { + XCB_XKB_SET_OF_GROUPS_ANY = 128 +} xcb_xkb_set_of_groups_t; + +typedef enum xcb_xkb_groups_wrap_t { + XCB_XKB_GROUPS_WRAP_WRAP_INTO_RANGE = 0, + XCB_XKB_GROUPS_WRAP_CLAMP_INTO_RANGE = 64, + XCB_XKB_GROUPS_WRAP_REDIRECT_INTO_RANGE = 128 +} xcb_xkb_groups_wrap_t; + +typedef enum xcb_xkb_v_mods_high_t { + XCB_XKB_V_MODS_HIGH_15 = 128, + XCB_XKB_V_MODS_HIGH_14 = 64, + XCB_XKB_V_MODS_HIGH_13 = 32, + XCB_XKB_V_MODS_HIGH_12 = 16, + XCB_XKB_V_MODS_HIGH_11 = 8, + XCB_XKB_V_MODS_HIGH_10 = 4, + XCB_XKB_V_MODS_HIGH_9 = 2, + XCB_XKB_V_MODS_HIGH_8 = 1 +} xcb_xkb_v_mods_high_t; + +typedef enum xcb_xkb_v_mods_low_t { + XCB_XKB_V_MODS_LOW_7 = 128, + XCB_XKB_V_MODS_LOW_6 = 64, + XCB_XKB_V_MODS_LOW_5 = 32, + XCB_XKB_V_MODS_LOW_4 = 16, + XCB_XKB_V_MODS_LOW_3 = 8, + XCB_XKB_V_MODS_LOW_2 = 4, + XCB_XKB_V_MODS_LOW_1 = 2, + XCB_XKB_V_MODS_LOW_0 = 1 +} xcb_xkb_v_mods_low_t; + +typedef enum xcb_xkb_v_mod_t { + XCB_XKB_V_MOD_15 = 32768, + XCB_XKB_V_MOD_14 = 16384, + XCB_XKB_V_MOD_13 = 8192, + XCB_XKB_V_MOD_12 = 4096, + XCB_XKB_V_MOD_11 = 2048, + XCB_XKB_V_MOD_10 = 1024, + XCB_XKB_V_MOD_9 = 512, + XCB_XKB_V_MOD_8 = 256, + XCB_XKB_V_MOD_7 = 128, + XCB_XKB_V_MOD_6 = 64, + XCB_XKB_V_MOD_5 = 32, + XCB_XKB_V_MOD_4 = 16, + XCB_XKB_V_MOD_3 = 8, + XCB_XKB_V_MOD_2 = 4, + XCB_XKB_V_MOD_1 = 2, + XCB_XKB_V_MOD_0 = 1 +} xcb_xkb_v_mod_t; + +typedef enum xcb_xkb_explicit_t { + XCB_XKB_EXPLICIT_V_MOD_MAP = 128, + XCB_XKB_EXPLICIT_BEHAVIOR = 64, + XCB_XKB_EXPLICIT_AUTO_REPEAT = 32, + XCB_XKB_EXPLICIT_INTERPRET = 16, + XCB_XKB_EXPLICIT_KEY_TYPE_4 = 8, + XCB_XKB_EXPLICIT_KEY_TYPE_3 = 4, + XCB_XKB_EXPLICIT_KEY_TYPE_2 = 2, + XCB_XKB_EXPLICIT_KEY_TYPE_1 = 1 +} xcb_xkb_explicit_t; + +typedef enum xcb_xkb_sym_interpret_match_t { + XCB_XKB_SYM_INTERPRET_MATCH_NONE_OF = 0, + XCB_XKB_SYM_INTERPRET_MATCH_ANY_OF_OR_NONE = 1, + XCB_XKB_SYM_INTERPRET_MATCH_ANY_OF = 2, + XCB_XKB_SYM_INTERPRET_MATCH_ALL_OF = 3, + XCB_XKB_SYM_INTERPRET_MATCH_EXACTLY = 4 +} xcb_xkb_sym_interpret_match_t; + +typedef enum xcb_xkb_sym_interp_match_t { + XCB_XKB_SYM_INTERP_MATCH_LEVEL_ONE_ONLY = 128, + XCB_XKB_SYM_INTERP_MATCH_OP_MASK = 127 +} xcb_xkb_sym_interp_match_t; + +typedef enum xcb_xkb_im_flag_t { + XCB_XKB_IM_FLAG_NO_EXPLICIT = 128, + XCB_XKB_IM_FLAG_NO_AUTOMATIC = 64, + XCB_XKB_IM_FLAG_LED_DRIVES_KB = 32 +} xcb_xkb_im_flag_t; + +typedef enum xcb_xkb_im_mods_which_t { + XCB_XKB_IM_MODS_WHICH_USE_COMPAT = 16, + XCB_XKB_IM_MODS_WHICH_USE_EFFECTIVE = 8, + XCB_XKB_IM_MODS_WHICH_USE_LOCKED = 4, + XCB_XKB_IM_MODS_WHICH_USE_LATCHED = 2, + XCB_XKB_IM_MODS_WHICH_USE_BASE = 1 +} xcb_xkb_im_mods_which_t; + +typedef enum xcb_xkb_im_groups_which_t { + XCB_XKB_IM_GROUPS_WHICH_USE_COMPAT = 16, + XCB_XKB_IM_GROUPS_WHICH_USE_EFFECTIVE = 8, + XCB_XKB_IM_GROUPS_WHICH_USE_LOCKED = 4, + XCB_XKB_IM_GROUPS_WHICH_USE_LATCHED = 2, + XCB_XKB_IM_GROUPS_WHICH_USE_BASE = 1 +} xcb_xkb_im_groups_which_t; + +/** + * @brief xcb_xkb_indicator_map_t + **/ +typedef struct xcb_xkb_indicator_map_t { + uint8_t flags; + uint8_t whichGroups; + uint8_t groups; + uint8_t whichMods; + uint8_t mods; + uint8_t realMods; + uint16_t vmods; + uint32_t ctrls; +} xcb_xkb_indicator_map_t; + +/** + * @brief xcb_xkb_indicator_map_iterator_t + **/ +typedef struct xcb_xkb_indicator_map_iterator_t { + xcb_xkb_indicator_map_t *data; + int rem; + int index; +} xcb_xkb_indicator_map_iterator_t; + +typedef enum xcb_xkb_cm_detail_t { + XCB_XKB_CM_DETAIL_SYM_INTERP = 1, + XCB_XKB_CM_DETAIL_GROUP_COMPAT = 2 +} xcb_xkb_cm_detail_t; + +typedef enum xcb_xkb_name_detail_t { + XCB_XKB_NAME_DETAIL_KEYCODES = 1, + XCB_XKB_NAME_DETAIL_GEOMETRY = 2, + XCB_XKB_NAME_DETAIL_SYMBOLS = 4, + XCB_XKB_NAME_DETAIL_PHYS_SYMBOLS = 8, + XCB_XKB_NAME_DETAIL_TYPES = 16, + XCB_XKB_NAME_DETAIL_COMPAT = 32, + XCB_XKB_NAME_DETAIL_KEY_TYPE_NAMES = 64, + XCB_XKB_NAME_DETAIL_KT_LEVEL_NAMES = 128, + XCB_XKB_NAME_DETAIL_INDICATOR_NAMES = 256, + XCB_XKB_NAME_DETAIL_KEY_NAMES = 512, + XCB_XKB_NAME_DETAIL_KEY_ALIASES = 1024, + XCB_XKB_NAME_DETAIL_VIRTUAL_MOD_NAMES = 2048, + XCB_XKB_NAME_DETAIL_GROUP_NAMES = 4096, + XCB_XKB_NAME_DETAIL_RG_NAMES = 8192 +} xcb_xkb_name_detail_t; + +typedef enum xcb_xkb_gbn_detail_t { + XCB_XKB_GBN_DETAIL_TYPES = 1, + XCB_XKB_GBN_DETAIL_COMPAT_MAP = 2, + XCB_XKB_GBN_DETAIL_CLIENT_SYMBOLS = 4, + XCB_XKB_GBN_DETAIL_SERVER_SYMBOLS = 8, + XCB_XKB_GBN_DETAIL_INDICATOR_MAPS = 16, + XCB_XKB_GBN_DETAIL_KEY_NAMES = 32, + XCB_XKB_GBN_DETAIL_GEOMETRY = 64, + XCB_XKB_GBN_DETAIL_OTHER_NAMES = 128 +} xcb_xkb_gbn_detail_t; + +typedef enum xcb_xkb_xi_feature_t { + XCB_XKB_XI_FEATURE_KEYBOARDS = 1, + XCB_XKB_XI_FEATURE_BUTTON_ACTIONS = 2, + XCB_XKB_XI_FEATURE_INDICATOR_NAMES = 4, + XCB_XKB_XI_FEATURE_INDICATOR_MAPS = 8, + XCB_XKB_XI_FEATURE_INDICATOR_STATE = 16 +} xcb_xkb_xi_feature_t; + +typedef enum xcb_xkb_per_client_flag_t { + XCB_XKB_PER_CLIENT_FLAG_DETECTABLE_AUTO_REPEAT = 1, + XCB_XKB_PER_CLIENT_FLAG_GRABS_USE_XKB_STATE = 2, + XCB_XKB_PER_CLIENT_FLAG_AUTO_RESET_CONTROLS = 4, + XCB_XKB_PER_CLIENT_FLAG_LOOKUP_STATE_WHEN_GRABBED = 8, + XCB_XKB_PER_CLIENT_FLAG_SEND_EVENT_USES_XKB_STATE = 16 +} xcb_xkb_per_client_flag_t; + +/** + * @brief xcb_xkb_mod_def_t + **/ +typedef struct xcb_xkb_mod_def_t { + uint8_t mask; + uint8_t realMods; + uint16_t vmods; +} xcb_xkb_mod_def_t; + +/** + * @brief xcb_xkb_mod_def_iterator_t + **/ +typedef struct xcb_xkb_mod_def_iterator_t { + xcb_xkb_mod_def_t *data; + int rem; + int index; +} xcb_xkb_mod_def_iterator_t; + +/** + * @brief xcb_xkb_key_name_t + **/ +typedef struct xcb_xkb_key_name_t { + char name[4]; +} xcb_xkb_key_name_t; + +/** + * @brief xcb_xkb_key_name_iterator_t + **/ +typedef struct xcb_xkb_key_name_iterator_t { + xcb_xkb_key_name_t *data; + int rem; + int index; +} xcb_xkb_key_name_iterator_t; + +/** + * @brief xcb_xkb_key_alias_t + **/ +typedef struct xcb_xkb_key_alias_t { + char real[4]; + char alias[4]; +} xcb_xkb_key_alias_t; + +/** + * @brief xcb_xkb_key_alias_iterator_t + **/ +typedef struct xcb_xkb_key_alias_iterator_t { + xcb_xkb_key_alias_t *data; + int rem; + int index; +} xcb_xkb_key_alias_iterator_t; + +/** + * @brief xcb_xkb_counted_string_16_t + **/ +typedef struct xcb_xkb_counted_string_16_t { + uint16_t length; +} xcb_xkb_counted_string_16_t; + +/** + * @brief xcb_xkb_counted_string_16_iterator_t + **/ +typedef struct xcb_xkb_counted_string_16_iterator_t { + xcb_xkb_counted_string_16_t *data; + int rem; + int index; +} xcb_xkb_counted_string_16_iterator_t; + +/** + * @brief xcb_xkb_kt_map_entry_t + **/ +typedef struct xcb_xkb_kt_map_entry_t { + uint8_t active; + uint8_t mods_mask; + uint8_t level; + uint8_t mods_mods; + uint16_t mods_vmods; + uint8_t pad0[2]; +} xcb_xkb_kt_map_entry_t; + +/** + * @brief xcb_xkb_kt_map_entry_iterator_t + **/ +typedef struct xcb_xkb_kt_map_entry_iterator_t { + xcb_xkb_kt_map_entry_t *data; + int rem; + int index; +} xcb_xkb_kt_map_entry_iterator_t; + +/** + * @brief xcb_xkb_key_type_t + **/ +typedef struct xcb_xkb_key_type_t { + uint8_t mods_mask; + uint8_t mods_mods; + uint16_t mods_vmods; + uint8_t numLevels; + uint8_t nMapEntries; + uint8_t hasPreserve; + uint8_t pad0; +} xcb_xkb_key_type_t; + +/** + * @brief xcb_xkb_key_type_iterator_t + **/ +typedef struct xcb_xkb_key_type_iterator_t { + xcb_xkb_key_type_t *data; + int rem; + int index; +} xcb_xkb_key_type_iterator_t; + +/** + * @brief xcb_xkb_key_sym_map_t + **/ +typedef struct xcb_xkb_key_sym_map_t { + uint8_t kt_index[4]; + uint8_t groupInfo; + uint8_t width; + uint16_t nSyms; +} xcb_xkb_key_sym_map_t; + +/** + * @brief xcb_xkb_key_sym_map_iterator_t + **/ +typedef struct xcb_xkb_key_sym_map_iterator_t { + xcb_xkb_key_sym_map_t *data; + int rem; + int index; +} xcb_xkb_key_sym_map_iterator_t; + +/** + * @brief xcb_xkb_common_behavior_t + **/ +typedef struct xcb_xkb_common_behavior_t { + uint8_t type; + uint8_t data; +} xcb_xkb_common_behavior_t; + +/** + * @brief xcb_xkb_common_behavior_iterator_t + **/ +typedef struct xcb_xkb_common_behavior_iterator_t { + xcb_xkb_common_behavior_t *data; + int rem; + int index; +} xcb_xkb_common_behavior_iterator_t; + +/** + * @brief xcb_xkb_default_behavior_t + **/ +typedef struct xcb_xkb_default_behavior_t { + uint8_t type; + uint8_t pad0; +} xcb_xkb_default_behavior_t; + +/** + * @brief xcb_xkb_default_behavior_iterator_t + **/ +typedef struct xcb_xkb_default_behavior_iterator_t { + xcb_xkb_default_behavior_t *data; + int rem; + int index; +} xcb_xkb_default_behavior_iterator_t; + +/** + * @brief xcb_xkb_lock_behavior_t + **/ +typedef struct xcb_xkb_lock_behavior_t { + uint8_t type; + uint8_t pad0; +} xcb_xkb_lock_behavior_t; + +/** + * @brief xcb_xkb_lock_behavior_iterator_t + **/ +typedef struct xcb_xkb_lock_behavior_iterator_t { + xcb_xkb_lock_behavior_t *data; + int rem; + int index; +} xcb_xkb_lock_behavior_iterator_t; + +/** + * @brief xcb_xkb_radio_group_behavior_t + **/ +typedef struct xcb_xkb_radio_group_behavior_t { + uint8_t type; + uint8_t group; +} xcb_xkb_radio_group_behavior_t; + +/** + * @brief xcb_xkb_radio_group_behavior_iterator_t + **/ +typedef struct xcb_xkb_radio_group_behavior_iterator_t { + xcb_xkb_radio_group_behavior_t *data; + int rem; + int index; +} xcb_xkb_radio_group_behavior_iterator_t; + +/** + * @brief xcb_xkb_overlay_behavior_t + **/ +typedef struct xcb_xkb_overlay_behavior_t { + uint8_t type; + xcb_keycode_t key; +} xcb_xkb_overlay_behavior_t; + +/** + * @brief xcb_xkb_overlay_behavior_iterator_t + **/ +typedef struct xcb_xkb_overlay_behavior_iterator_t { + xcb_xkb_overlay_behavior_t *data; + int rem; + int index; +} xcb_xkb_overlay_behavior_iterator_t; + +/** + * @brief xcb_xkb_permament_lock_behavior_t + **/ +typedef struct xcb_xkb_permament_lock_behavior_t { + uint8_t type; + uint8_t pad0; +} xcb_xkb_permament_lock_behavior_t; + +/** + * @brief xcb_xkb_permament_lock_behavior_iterator_t + **/ +typedef struct xcb_xkb_permament_lock_behavior_iterator_t { + xcb_xkb_permament_lock_behavior_t *data; + int rem; + int index; +} xcb_xkb_permament_lock_behavior_iterator_t; + +/** + * @brief xcb_xkb_permament_radio_group_behavior_t + **/ +typedef struct xcb_xkb_permament_radio_group_behavior_t { + uint8_t type; + uint8_t group; +} xcb_xkb_permament_radio_group_behavior_t; + +/** + * @brief xcb_xkb_permament_radio_group_behavior_iterator_t + **/ +typedef struct xcb_xkb_permament_radio_group_behavior_iterator_t { + xcb_xkb_permament_radio_group_behavior_t *data; + int rem; + int index; +} xcb_xkb_permament_radio_group_behavior_iterator_t; + +/** + * @brief xcb_xkb_permament_overlay_behavior_t + **/ +typedef struct xcb_xkb_permament_overlay_behavior_t { + uint8_t type; + xcb_keycode_t key; +} xcb_xkb_permament_overlay_behavior_t; + +/** + * @brief xcb_xkb_permament_overlay_behavior_iterator_t + **/ +typedef struct xcb_xkb_permament_overlay_behavior_iterator_t { + xcb_xkb_permament_overlay_behavior_t *data; + int rem; + int index; +} xcb_xkb_permament_overlay_behavior_iterator_t; + +/** + * @brief xcb_xkb_behavior_t + **/ +typedef union xcb_xkb_behavior_t { + xcb_xkb_common_behavior_t common; + xcb_xkb_default_behavior_t _default; + xcb_xkb_lock_behavior_t lock; + xcb_xkb_radio_group_behavior_t radioGroup; + xcb_xkb_overlay_behavior_t overlay1; + xcb_xkb_overlay_behavior_t overlay2; + xcb_xkb_permament_lock_behavior_t permamentLock; + xcb_xkb_permament_radio_group_behavior_t permamentRadioGroup; + xcb_xkb_permament_overlay_behavior_t permamentOverlay1; + xcb_xkb_permament_overlay_behavior_t permamentOverlay2; + uint8_t type; +} xcb_xkb_behavior_t; + +/** + * @brief xcb_xkb_behavior_iterator_t + **/ +typedef struct xcb_xkb_behavior_iterator_t { + xcb_xkb_behavior_t *data; + int rem; + int index; +} xcb_xkb_behavior_iterator_t; + +typedef enum xcb_xkb_behavior_type_t { + XCB_XKB_BEHAVIOR_TYPE_DEFAULT = 0, + XCB_XKB_BEHAVIOR_TYPE_LOCK = 1, + XCB_XKB_BEHAVIOR_TYPE_RADIO_GROUP = 2, + XCB_XKB_BEHAVIOR_TYPE_OVERLAY_1 = 3, + XCB_XKB_BEHAVIOR_TYPE_OVERLAY_2 = 4, + XCB_XKB_BEHAVIOR_TYPE_PERMAMENT_LOCK = 129, + XCB_XKB_BEHAVIOR_TYPE_PERMAMENT_RADIO_GROUP = 130, + XCB_XKB_BEHAVIOR_TYPE_PERMAMENT_OVERLAY_1 = 131, + XCB_XKB_BEHAVIOR_TYPE_PERMAMENT_OVERLAY_2 = 132 +} xcb_xkb_behavior_type_t; + +/** + * @brief xcb_xkb_set_behavior_t + **/ +typedef struct xcb_xkb_set_behavior_t { + xcb_keycode_t keycode; + xcb_xkb_behavior_t behavior; + uint8_t pad0; +} xcb_xkb_set_behavior_t; + +/** + * @brief xcb_xkb_set_behavior_iterator_t + **/ +typedef struct xcb_xkb_set_behavior_iterator_t { + xcb_xkb_set_behavior_t *data; + int rem; + int index; +} xcb_xkb_set_behavior_iterator_t; + +/** + * @brief xcb_xkb_set_explicit_t + **/ +typedef struct xcb_xkb_set_explicit_t { + xcb_keycode_t keycode; + uint8_t explicit; +} xcb_xkb_set_explicit_t; + +/** + * @brief xcb_xkb_set_explicit_iterator_t + **/ +typedef struct xcb_xkb_set_explicit_iterator_t { + xcb_xkb_set_explicit_t *data; + int rem; + int index; +} xcb_xkb_set_explicit_iterator_t; + +/** + * @brief xcb_xkb_key_mod_map_t + **/ +typedef struct xcb_xkb_key_mod_map_t { + xcb_keycode_t keycode; + uint8_t mods; +} xcb_xkb_key_mod_map_t; + +/** + * @brief xcb_xkb_key_mod_map_iterator_t + **/ +typedef struct xcb_xkb_key_mod_map_iterator_t { + xcb_xkb_key_mod_map_t *data; + int rem; + int index; +} xcb_xkb_key_mod_map_iterator_t; + +/** + * @brief xcb_xkb_key_v_mod_map_t + **/ +typedef struct xcb_xkb_key_v_mod_map_t { + xcb_keycode_t keycode; + uint8_t pad0; + uint16_t vmods; +} xcb_xkb_key_v_mod_map_t; + +/** + * @brief xcb_xkb_key_v_mod_map_iterator_t + **/ +typedef struct xcb_xkb_key_v_mod_map_iterator_t { + xcb_xkb_key_v_mod_map_t *data; + int rem; + int index; +} xcb_xkb_key_v_mod_map_iterator_t; + +/** + * @brief xcb_xkb_kt_set_map_entry_t + **/ +typedef struct xcb_xkb_kt_set_map_entry_t { + uint8_t level; + uint8_t realMods; + uint16_t virtualMods; +} xcb_xkb_kt_set_map_entry_t; + +/** + * @brief xcb_xkb_kt_set_map_entry_iterator_t + **/ +typedef struct xcb_xkb_kt_set_map_entry_iterator_t { + xcb_xkb_kt_set_map_entry_t *data; + int rem; + int index; +} xcb_xkb_kt_set_map_entry_iterator_t; + +/** + * @brief xcb_xkb_set_key_type_t + **/ +typedef struct xcb_xkb_set_key_type_t { + uint8_t mask; + uint8_t realMods; + uint16_t virtualMods; + uint8_t numLevels; + uint8_t nMapEntries; + uint8_t preserve; + uint8_t pad0; +} xcb_xkb_set_key_type_t; + +/** + * @brief xcb_xkb_set_key_type_iterator_t + **/ +typedef struct xcb_xkb_set_key_type_iterator_t { + xcb_xkb_set_key_type_t *data; + int rem; + int index; +} xcb_xkb_set_key_type_iterator_t; + +typedef char xcb_xkb_string8_t; + +/** + * @brief xcb_xkb_string8_iterator_t + **/ +typedef struct xcb_xkb_string8_iterator_t { + xcb_xkb_string8_t *data; + int rem; + int index; +} xcb_xkb_string8_iterator_t; + +/** + * @brief xcb_xkb_outline_t + **/ +typedef struct xcb_xkb_outline_t { + uint8_t nPoints; + uint8_t cornerRadius; + uint8_t pad0[2]; +} xcb_xkb_outline_t; + +/** + * @brief xcb_xkb_outline_iterator_t + **/ +typedef struct xcb_xkb_outline_iterator_t { + xcb_xkb_outline_t *data; + int rem; + int index; +} xcb_xkb_outline_iterator_t; + +/** + * @brief xcb_xkb_shape_t + **/ +typedef struct xcb_xkb_shape_t { + xcb_atom_t name; + uint8_t nOutlines; + uint8_t primaryNdx; + uint8_t approxNdx; + uint8_t pad0; +} xcb_xkb_shape_t; + +/** + * @brief xcb_xkb_shape_iterator_t + **/ +typedef struct xcb_xkb_shape_iterator_t { + xcb_xkb_shape_t *data; + int rem; + int index; +} xcb_xkb_shape_iterator_t; + +/** + * @brief xcb_xkb_key_t + **/ +typedef struct xcb_xkb_key_t { + xcb_xkb_string8_t name[4]; + int16_t gap; + uint8_t shapeNdx; + uint8_t colorNdx; +} xcb_xkb_key_t; + +/** + * @brief xcb_xkb_key_iterator_t + **/ +typedef struct xcb_xkb_key_iterator_t { + xcb_xkb_key_t *data; + int rem; + int index; +} xcb_xkb_key_iterator_t; + +/** + * @brief xcb_xkb_overlay_key_t + **/ +typedef struct xcb_xkb_overlay_key_t { + xcb_xkb_string8_t over[4]; + xcb_xkb_string8_t under[4]; +} xcb_xkb_overlay_key_t; + +/** + * @brief xcb_xkb_overlay_key_iterator_t + **/ +typedef struct xcb_xkb_overlay_key_iterator_t { + xcb_xkb_overlay_key_t *data; + int rem; + int index; +} xcb_xkb_overlay_key_iterator_t; + +/** + * @brief xcb_xkb_overlay_row_t + **/ +typedef struct xcb_xkb_overlay_row_t { + uint8_t rowUnder; + uint8_t nKeys; + uint8_t pad0[2]; +} xcb_xkb_overlay_row_t; + +/** + * @brief xcb_xkb_overlay_row_iterator_t + **/ +typedef struct xcb_xkb_overlay_row_iterator_t { + xcb_xkb_overlay_row_t *data; + int rem; + int index; +} xcb_xkb_overlay_row_iterator_t; + +/** + * @brief xcb_xkb_overlay_t + **/ +typedef struct xcb_xkb_overlay_t { + xcb_atom_t name; + uint8_t nRows; + uint8_t pad0[3]; +} xcb_xkb_overlay_t; + +/** + * @brief xcb_xkb_overlay_iterator_t + **/ +typedef struct xcb_xkb_overlay_iterator_t { + xcb_xkb_overlay_t *data; + int rem; + int index; +} xcb_xkb_overlay_iterator_t; + +/** + * @brief xcb_xkb_row_t + **/ +typedef struct xcb_xkb_row_t { + int16_t top; + int16_t left; + uint8_t nKeys; + uint8_t vertical; + uint8_t pad0[2]; +} xcb_xkb_row_t; + +/** + * @brief xcb_xkb_row_iterator_t + **/ +typedef struct xcb_xkb_row_iterator_t { + xcb_xkb_row_t *data; + int rem; + int index; +} xcb_xkb_row_iterator_t; + +typedef enum xcb_xkb_doodad_type_t { + XCB_XKB_DOODAD_TYPE_OUTLINE = 1, + XCB_XKB_DOODAD_TYPE_SOLID = 2, + XCB_XKB_DOODAD_TYPE_TEXT = 3, + XCB_XKB_DOODAD_TYPE_INDICATOR = 4, + XCB_XKB_DOODAD_TYPE_LOGO = 5 +} xcb_xkb_doodad_type_t; + +/** + * @brief xcb_xkb_listing_t + **/ +typedef struct xcb_xkb_listing_t { + uint16_t flags; + uint16_t length; +} xcb_xkb_listing_t; + +/** + * @brief xcb_xkb_listing_iterator_t + **/ +typedef struct xcb_xkb_listing_iterator_t { + xcb_xkb_listing_t *data; + int rem; + int index; +} xcb_xkb_listing_iterator_t; + +/** + * @brief xcb_xkb_device_led_info_t + **/ +typedef struct xcb_xkb_device_led_info_t { + xcb_xkb_led_class_spec_t ledClass; + xcb_xkb_id_spec_t ledID; + uint32_t namesPresent; + uint32_t mapsPresent; + uint32_t physIndicators; + uint32_t state; +} xcb_xkb_device_led_info_t; + +/** + * @brief xcb_xkb_device_led_info_iterator_t + **/ +typedef struct xcb_xkb_device_led_info_iterator_t { + xcb_xkb_device_led_info_t *data; + int rem; + int index; +} xcb_xkb_device_led_info_iterator_t; + +typedef enum xcb_xkb_error_t { + XCB_XKB_ERROR_BAD_DEVICE = 255, + XCB_XKB_ERROR_BAD_CLASS = 254, + XCB_XKB_ERROR_BAD_ID = 253 +} xcb_xkb_error_t; + +/** Opcode for xcb_xkb_keyboard. */ +#define XCB_XKB_KEYBOARD 0 + +/** + * @brief xcb_xkb_keyboard_error_t + **/ +typedef struct xcb_xkb_keyboard_error_t { + uint8_t response_type; + uint8_t error_code; + uint16_t sequence; + uint32_t value; + uint16_t minorOpcode; + uint8_t majorOpcode; + uint8_t pad0[21]; +} xcb_xkb_keyboard_error_t; + +typedef enum xcb_xkb_sa_t { + XCB_XKB_SA_CLEAR_LOCKS = 1, + XCB_XKB_SA_LATCH_TO_LOCK = 2, + XCB_XKB_SA_USE_MOD_MAP_MODS = 4, + XCB_XKB_SA_GROUP_ABSOLUTE = 4 +} xcb_xkb_sa_t; + +typedef enum xcb_xkb_sa_type_t { + XCB_XKB_SA_TYPE_NO_ACTION = 0, + XCB_XKB_SA_TYPE_SET_MODS = 1, + XCB_XKB_SA_TYPE_LATCH_MODS = 2, + XCB_XKB_SA_TYPE_LOCK_MODS = 3, + XCB_XKB_SA_TYPE_SET_GROUP = 4, + XCB_XKB_SA_TYPE_LATCH_GROUP = 5, + XCB_XKB_SA_TYPE_LOCK_GROUP = 6, + XCB_XKB_SA_TYPE_MOVE_PTR = 7, + XCB_XKB_SA_TYPE_PTR_BTN = 8, + XCB_XKB_SA_TYPE_LOCK_PTR_BTN = 9, + XCB_XKB_SA_TYPE_SET_PTR_DFLT = 10, + XCB_XKB_SA_TYPE_ISO_LOCK = 11, + XCB_XKB_SA_TYPE_TERMINATE = 12, + XCB_XKB_SA_TYPE_SWITCH_SCREEN = 13, + XCB_XKB_SA_TYPE_SET_CONTROLS = 14, + XCB_XKB_SA_TYPE_LOCK_CONTROLS = 15, + XCB_XKB_SA_TYPE_ACTION_MESSAGE = 16, + XCB_XKB_SA_TYPE_REDIRECT_KEY = 17, + XCB_XKB_SA_TYPE_DEVICE_BTN = 18, + XCB_XKB_SA_TYPE_LOCK_DEVICE_BTN = 19, + XCB_XKB_SA_TYPE_DEVICE_VALUATOR = 20 +} xcb_xkb_sa_type_t; + +/** + * @brief xcb_xkb_sa_no_action_t + **/ +typedef struct xcb_xkb_sa_no_action_t { + uint8_t type; + uint8_t pad0[7]; +} xcb_xkb_sa_no_action_t; + +/** + * @brief xcb_xkb_sa_no_action_iterator_t + **/ +typedef struct xcb_xkb_sa_no_action_iterator_t { + xcb_xkb_sa_no_action_t *data; + int rem; + int index; +} xcb_xkb_sa_no_action_iterator_t; + +/** + * @brief xcb_xkb_sa_set_mods_t + **/ +typedef struct xcb_xkb_sa_set_mods_t { + uint8_t type; + uint8_t flags; + uint8_t mask; + uint8_t realMods; + uint8_t vmodsHigh; + uint8_t vmodsLow; + uint8_t pad0[2]; +} xcb_xkb_sa_set_mods_t; + +/** + * @brief xcb_xkb_sa_set_mods_iterator_t + **/ +typedef struct xcb_xkb_sa_set_mods_iterator_t { + xcb_xkb_sa_set_mods_t *data; + int rem; + int index; +} xcb_xkb_sa_set_mods_iterator_t; + +/** + * @brief xcb_xkb_sa_latch_mods_t + **/ +typedef struct xcb_xkb_sa_latch_mods_t { + uint8_t type; + uint8_t flags; + uint8_t mask; + uint8_t realMods; + uint8_t vmodsHigh; + uint8_t vmodsLow; + uint8_t pad0[2]; +} xcb_xkb_sa_latch_mods_t; + +/** + * @brief xcb_xkb_sa_latch_mods_iterator_t + **/ +typedef struct xcb_xkb_sa_latch_mods_iterator_t { + xcb_xkb_sa_latch_mods_t *data; + int rem; + int index; +} xcb_xkb_sa_latch_mods_iterator_t; + +/** + * @brief xcb_xkb_sa_lock_mods_t + **/ +typedef struct xcb_xkb_sa_lock_mods_t { + uint8_t type; + uint8_t flags; + uint8_t mask; + uint8_t realMods; + uint8_t vmodsHigh; + uint8_t vmodsLow; + uint8_t pad0[2]; +} xcb_xkb_sa_lock_mods_t; + +/** + * @brief xcb_xkb_sa_lock_mods_iterator_t + **/ +typedef struct xcb_xkb_sa_lock_mods_iterator_t { + xcb_xkb_sa_lock_mods_t *data; + int rem; + int index; +} xcb_xkb_sa_lock_mods_iterator_t; + +/** + * @brief xcb_xkb_sa_set_group_t + **/ +typedef struct xcb_xkb_sa_set_group_t { + uint8_t type; + uint8_t flags; + int8_t group; + uint8_t pad0[5]; +} xcb_xkb_sa_set_group_t; + +/** + * @brief xcb_xkb_sa_set_group_iterator_t + **/ +typedef struct xcb_xkb_sa_set_group_iterator_t { + xcb_xkb_sa_set_group_t *data; + int rem; + int index; +} xcb_xkb_sa_set_group_iterator_t; + +/** + * @brief xcb_xkb_sa_latch_group_t + **/ +typedef struct xcb_xkb_sa_latch_group_t { + uint8_t type; + uint8_t flags; + int8_t group; + uint8_t pad0[5]; +} xcb_xkb_sa_latch_group_t; + +/** + * @brief xcb_xkb_sa_latch_group_iterator_t + **/ +typedef struct xcb_xkb_sa_latch_group_iterator_t { + xcb_xkb_sa_latch_group_t *data; + int rem; + int index; +} xcb_xkb_sa_latch_group_iterator_t; + +/** + * @brief xcb_xkb_sa_lock_group_t + **/ +typedef struct xcb_xkb_sa_lock_group_t { + uint8_t type; + uint8_t flags; + int8_t group; + uint8_t pad0[5]; +} xcb_xkb_sa_lock_group_t; + +/** + * @brief xcb_xkb_sa_lock_group_iterator_t + **/ +typedef struct xcb_xkb_sa_lock_group_iterator_t { + xcb_xkb_sa_lock_group_t *data; + int rem; + int index; +} xcb_xkb_sa_lock_group_iterator_t; + +typedef enum xcb_xkb_sa_move_ptr_flag_t { + XCB_XKB_SA_MOVE_PTR_FLAG_NO_ACCELERATION = 1, + XCB_XKB_SA_MOVE_PTR_FLAG_MOVE_ABSOLUTE_X = 2, + XCB_XKB_SA_MOVE_PTR_FLAG_MOVE_ABSOLUTE_Y = 4 +} xcb_xkb_sa_move_ptr_flag_t; + +/** + * @brief xcb_xkb_sa_move_ptr_t + **/ +typedef struct xcb_xkb_sa_move_ptr_t { + uint8_t type; + uint8_t flags; + int8_t xHigh; + uint8_t xLow; + int8_t yHigh; + uint8_t yLow; + uint8_t pad0[2]; +} xcb_xkb_sa_move_ptr_t; + +/** + * @brief xcb_xkb_sa_move_ptr_iterator_t + **/ +typedef struct xcb_xkb_sa_move_ptr_iterator_t { + xcb_xkb_sa_move_ptr_t *data; + int rem; + int index; +} xcb_xkb_sa_move_ptr_iterator_t; + +/** + * @brief xcb_xkb_sa_ptr_btn_t + **/ +typedef struct xcb_xkb_sa_ptr_btn_t { + uint8_t type; + uint8_t flags; + uint8_t count; + uint8_t button; + uint8_t pad0[4]; +} xcb_xkb_sa_ptr_btn_t; + +/** + * @brief xcb_xkb_sa_ptr_btn_iterator_t + **/ +typedef struct xcb_xkb_sa_ptr_btn_iterator_t { + xcb_xkb_sa_ptr_btn_t *data; + int rem; + int index; +} xcb_xkb_sa_ptr_btn_iterator_t; + +/** + * @brief xcb_xkb_sa_lock_ptr_btn_t + **/ +typedef struct xcb_xkb_sa_lock_ptr_btn_t { + uint8_t type; + uint8_t flags; + uint8_t pad0; + uint8_t button; + uint8_t pad1[4]; +} xcb_xkb_sa_lock_ptr_btn_t; + +/** + * @brief xcb_xkb_sa_lock_ptr_btn_iterator_t + **/ +typedef struct xcb_xkb_sa_lock_ptr_btn_iterator_t { + xcb_xkb_sa_lock_ptr_btn_t *data; + int rem; + int index; +} xcb_xkb_sa_lock_ptr_btn_iterator_t; + +typedef enum xcb_xkb_sa_set_ptr_dflt_flag_t { + XCB_XKB_SA_SET_PTR_DFLT_FLAG_DFLT_BTN_ABSOLUTE = 4, + XCB_XKB_SA_SET_PTR_DFLT_FLAG_AFFECT_DFLT_BUTTON = 1 +} xcb_xkb_sa_set_ptr_dflt_flag_t; + +/** + * @brief xcb_xkb_sa_set_ptr_dflt_t + **/ +typedef struct xcb_xkb_sa_set_ptr_dflt_t { + uint8_t type; + uint8_t flags; + uint8_t affect; + int8_t value; + uint8_t pad0[4]; +} xcb_xkb_sa_set_ptr_dflt_t; + +/** + * @brief xcb_xkb_sa_set_ptr_dflt_iterator_t + **/ +typedef struct xcb_xkb_sa_set_ptr_dflt_iterator_t { + xcb_xkb_sa_set_ptr_dflt_t *data; + int rem; + int index; +} xcb_xkb_sa_set_ptr_dflt_iterator_t; + +typedef enum xcb_xkb_sa_iso_lock_flag_t { + XCB_XKB_SA_ISO_LOCK_FLAG_NO_LOCK = 1, + XCB_XKB_SA_ISO_LOCK_FLAG_NO_UNLOCK = 2, + XCB_XKB_SA_ISO_LOCK_FLAG_USE_MOD_MAP_MODS = 4, + XCB_XKB_SA_ISO_LOCK_FLAG_GROUP_ABSOLUTE = 4, + XCB_XKB_SA_ISO_LOCK_FLAG_ISO_DFLT_IS_GROUP = 8 +} xcb_xkb_sa_iso_lock_flag_t; + +typedef enum xcb_xkb_sa_iso_lock_no_affect_t { + XCB_XKB_SA_ISO_LOCK_NO_AFFECT_CTRLS = 8, + XCB_XKB_SA_ISO_LOCK_NO_AFFECT_PTR = 16, + XCB_XKB_SA_ISO_LOCK_NO_AFFECT_GROUP = 32, + XCB_XKB_SA_ISO_LOCK_NO_AFFECT_MODS = 64 +} xcb_xkb_sa_iso_lock_no_affect_t; + +/** + * @brief xcb_xkb_sa_iso_lock_t + **/ +typedef struct xcb_xkb_sa_iso_lock_t { + uint8_t type; + uint8_t flags; + uint8_t mask; + uint8_t realMods; + int8_t group; + uint8_t affect; + uint8_t vmodsHigh; + uint8_t vmodsLow; +} xcb_xkb_sa_iso_lock_t; + +/** + * @brief xcb_xkb_sa_iso_lock_iterator_t + **/ +typedef struct xcb_xkb_sa_iso_lock_iterator_t { + xcb_xkb_sa_iso_lock_t *data; + int rem; + int index; +} xcb_xkb_sa_iso_lock_iterator_t; + +/** + * @brief xcb_xkb_sa_terminate_t + **/ +typedef struct xcb_xkb_sa_terminate_t { + uint8_t type; + uint8_t pad0[7]; +} xcb_xkb_sa_terminate_t; + +/** + * @brief xcb_xkb_sa_terminate_iterator_t + **/ +typedef struct xcb_xkb_sa_terminate_iterator_t { + xcb_xkb_sa_terminate_t *data; + int rem; + int index; +} xcb_xkb_sa_terminate_iterator_t; + +typedef enum xcb_xkb_switch_screen_flag_t { + XCB_XKB_SWITCH_SCREEN_FLAG_APPLICATION = 1, + XCB_XKB_SWITCH_SCREEN_FLAG_ABSOLUTE = 4 +} xcb_xkb_switch_screen_flag_t; + +/** + * @brief xcb_xkb_sa_switch_screen_t + **/ +typedef struct xcb_xkb_sa_switch_screen_t { + uint8_t type; + uint8_t flags; + int8_t newScreen; + uint8_t pad0[5]; +} xcb_xkb_sa_switch_screen_t; + +/** + * @brief xcb_xkb_sa_switch_screen_iterator_t + **/ +typedef struct xcb_xkb_sa_switch_screen_iterator_t { + xcb_xkb_sa_switch_screen_t *data; + int rem; + int index; +} xcb_xkb_sa_switch_screen_iterator_t; + +typedef enum xcb_xkb_bool_ctrls_high_t { + XCB_XKB_BOOL_CTRLS_HIGH_ACCESS_X_FEEDBACK = 1, + XCB_XKB_BOOL_CTRLS_HIGH_AUDIBLE_BELL = 2, + XCB_XKB_BOOL_CTRLS_HIGH_OVERLAY_1 = 4, + XCB_XKB_BOOL_CTRLS_HIGH_OVERLAY_2 = 8, + XCB_XKB_BOOL_CTRLS_HIGH_IGNORE_GROUP_LOCK = 16 +} xcb_xkb_bool_ctrls_high_t; + +typedef enum xcb_xkb_bool_ctrls_low_t { + XCB_XKB_BOOL_CTRLS_LOW_REPEAT_KEYS = 1, + XCB_XKB_BOOL_CTRLS_LOW_SLOW_KEYS = 2, + XCB_XKB_BOOL_CTRLS_LOW_BOUNCE_KEYS = 4, + XCB_XKB_BOOL_CTRLS_LOW_STICKY_KEYS = 8, + XCB_XKB_BOOL_CTRLS_LOW_MOUSE_KEYS = 16, + XCB_XKB_BOOL_CTRLS_LOW_MOUSE_KEYS_ACCEL = 32, + XCB_XKB_BOOL_CTRLS_LOW_ACCESS_X_KEYS = 64, + XCB_XKB_BOOL_CTRLS_LOW_ACCESS_X_TIMEOUT = 128 +} xcb_xkb_bool_ctrls_low_t; + +/** + * @brief xcb_xkb_sa_set_controls_t + **/ +typedef struct xcb_xkb_sa_set_controls_t { + uint8_t type; + uint8_t pad0[3]; + uint8_t boolCtrlsHigh; + uint8_t boolCtrlsLow; + uint8_t pad1[2]; +} xcb_xkb_sa_set_controls_t; + +/** + * @brief xcb_xkb_sa_set_controls_iterator_t + **/ +typedef struct xcb_xkb_sa_set_controls_iterator_t { + xcb_xkb_sa_set_controls_t *data; + int rem; + int index; +} xcb_xkb_sa_set_controls_iterator_t; + +/** + * @brief xcb_xkb_sa_lock_controls_t + **/ +typedef struct xcb_xkb_sa_lock_controls_t { + uint8_t type; + uint8_t pad0[3]; + uint8_t boolCtrlsHigh; + uint8_t boolCtrlsLow; + uint8_t pad1[2]; +} xcb_xkb_sa_lock_controls_t; + +/** + * @brief xcb_xkb_sa_lock_controls_iterator_t + **/ +typedef struct xcb_xkb_sa_lock_controls_iterator_t { + xcb_xkb_sa_lock_controls_t *data; + int rem; + int index; +} xcb_xkb_sa_lock_controls_iterator_t; + +typedef enum xcb_xkb_action_message_flag_t { + XCB_XKB_ACTION_MESSAGE_FLAG_ON_PRESS = 1, + XCB_XKB_ACTION_MESSAGE_FLAG_ON_RELEASE = 2, + XCB_XKB_ACTION_MESSAGE_FLAG_GEN_KEY_EVENT = 4 +} xcb_xkb_action_message_flag_t; + +/** + * @brief xcb_xkb_sa_action_message_t + **/ +typedef struct xcb_xkb_sa_action_message_t { + uint8_t type; + uint8_t flags; + uint8_t message[6]; +} xcb_xkb_sa_action_message_t; + +/** + * @brief xcb_xkb_sa_action_message_iterator_t + **/ +typedef struct xcb_xkb_sa_action_message_iterator_t { + xcb_xkb_sa_action_message_t *data; + int rem; + int index; +} xcb_xkb_sa_action_message_iterator_t; + +/** + * @brief xcb_xkb_sa_redirect_key_t + **/ +typedef struct xcb_xkb_sa_redirect_key_t { + uint8_t type; + xcb_keycode_t newkey; + uint8_t mask; + uint8_t realModifiers; + uint8_t vmodsMaskHigh; + uint8_t vmodsMaskLow; + uint8_t vmodsHigh; + uint8_t vmodsLow; +} xcb_xkb_sa_redirect_key_t; + +/** + * @brief xcb_xkb_sa_redirect_key_iterator_t + **/ +typedef struct xcb_xkb_sa_redirect_key_iterator_t { + xcb_xkb_sa_redirect_key_t *data; + int rem; + int index; +} xcb_xkb_sa_redirect_key_iterator_t; + +/** + * @brief xcb_xkb_sa_device_btn_t + **/ +typedef struct xcb_xkb_sa_device_btn_t { + uint8_t type; + uint8_t flags; + uint8_t count; + uint8_t button; + uint8_t device; + uint8_t pad0[3]; +} xcb_xkb_sa_device_btn_t; + +/** + * @brief xcb_xkb_sa_device_btn_iterator_t + **/ +typedef struct xcb_xkb_sa_device_btn_iterator_t { + xcb_xkb_sa_device_btn_t *data; + int rem; + int index; +} xcb_xkb_sa_device_btn_iterator_t; + +typedef enum xcb_xkb_lock_device_flags_t { + XCB_XKB_LOCK_DEVICE_FLAGS_NO_LOCK = 1, + XCB_XKB_LOCK_DEVICE_FLAGS_NO_UNLOCK = 2 +} xcb_xkb_lock_device_flags_t; + +/** + * @brief xcb_xkb_sa_lock_device_btn_t + **/ +typedef struct xcb_xkb_sa_lock_device_btn_t { + uint8_t type; + uint8_t flags; + uint8_t pad0; + uint8_t button; + uint8_t device; + uint8_t pad1[3]; +} xcb_xkb_sa_lock_device_btn_t; + +/** + * @brief xcb_xkb_sa_lock_device_btn_iterator_t + **/ +typedef struct xcb_xkb_sa_lock_device_btn_iterator_t { + xcb_xkb_sa_lock_device_btn_t *data; + int rem; + int index; +} xcb_xkb_sa_lock_device_btn_iterator_t; + +typedef enum xcb_xkb_sa_val_what_t { + XCB_XKB_SA_VAL_WHAT_IGNORE_VAL = 0, + XCB_XKB_SA_VAL_WHAT_SET_VAL_MIN = 1, + XCB_XKB_SA_VAL_WHAT_SET_VAL_CENTER = 2, + XCB_XKB_SA_VAL_WHAT_SET_VAL_MAX = 3, + XCB_XKB_SA_VAL_WHAT_SET_VAL_RELATIVE = 4, + XCB_XKB_SA_VAL_WHAT_SET_VAL_ABSOLUTE = 5 +} xcb_xkb_sa_val_what_t; + +/** + * @brief xcb_xkb_sa_device_valuator_t + **/ +typedef struct xcb_xkb_sa_device_valuator_t { + uint8_t type; + uint8_t device; + uint8_t val1what; + uint8_t val1index; + uint8_t val1value; + uint8_t val2what; + uint8_t val2index; + uint8_t val2value; +} xcb_xkb_sa_device_valuator_t; + +/** + * @brief xcb_xkb_sa_device_valuator_iterator_t + **/ +typedef struct xcb_xkb_sa_device_valuator_iterator_t { + xcb_xkb_sa_device_valuator_t *data; + int rem; + int index; +} xcb_xkb_sa_device_valuator_iterator_t; + +/** + * @brief xcb_xkb_si_action_t + **/ +typedef struct xcb_xkb_si_action_t { + uint8_t type; + uint8_t data[7]; +} xcb_xkb_si_action_t; + +/** + * @brief xcb_xkb_si_action_iterator_t + **/ +typedef struct xcb_xkb_si_action_iterator_t { + xcb_xkb_si_action_t *data; + int rem; + int index; +} xcb_xkb_si_action_iterator_t; + +/** + * @brief xcb_xkb_sym_interpret_t + **/ +typedef struct xcb_xkb_sym_interpret_t { + xcb_keysym_t sym; + uint8_t mods; + uint8_t match; + uint8_t virtualMod; + uint8_t flags; + xcb_xkb_si_action_t action; +} xcb_xkb_sym_interpret_t; + +/** + * @brief xcb_xkb_sym_interpret_iterator_t + **/ +typedef struct xcb_xkb_sym_interpret_iterator_t { + xcb_xkb_sym_interpret_t *data; + int rem; + int index; +} xcb_xkb_sym_interpret_iterator_t; + +/** + * @brief xcb_xkb_action_t + **/ +typedef union xcb_xkb_action_t { + xcb_xkb_sa_no_action_t noaction; + xcb_xkb_sa_set_mods_t setmods; + xcb_xkb_sa_latch_mods_t latchmods; + xcb_xkb_sa_lock_mods_t lockmods; + xcb_xkb_sa_set_group_t setgroup; + xcb_xkb_sa_latch_group_t latchgroup; + xcb_xkb_sa_lock_group_t lockgroup; + xcb_xkb_sa_move_ptr_t moveptr; + xcb_xkb_sa_ptr_btn_t ptrbtn; + xcb_xkb_sa_lock_ptr_btn_t lockptrbtn; + xcb_xkb_sa_set_ptr_dflt_t setptrdflt; + xcb_xkb_sa_iso_lock_t isolock; + xcb_xkb_sa_terminate_t terminate; + xcb_xkb_sa_switch_screen_t switchscreen; + xcb_xkb_sa_set_controls_t setcontrols; + xcb_xkb_sa_lock_controls_t lockcontrols; + xcb_xkb_sa_action_message_t message; + xcb_xkb_sa_redirect_key_t redirect; + xcb_xkb_sa_device_btn_t devbtn; + xcb_xkb_sa_lock_device_btn_t lockdevbtn; + xcb_xkb_sa_device_valuator_t devval; + uint8_t type; +} xcb_xkb_action_t; + +/** + * @brief xcb_xkb_action_iterator_t + **/ +typedef struct xcb_xkb_action_iterator_t { + xcb_xkb_action_t *data; + int rem; + int index; +} xcb_xkb_action_iterator_t; + +/** + * @brief xcb_xkb_use_extension_cookie_t + **/ +typedef struct xcb_xkb_use_extension_cookie_t { + unsigned int sequence; +} xcb_xkb_use_extension_cookie_t; + +/** Opcode for xcb_xkb_use_extension. */ +#define XCB_XKB_USE_EXTENSION 0 + +/** + * @brief xcb_xkb_use_extension_request_t + **/ +typedef struct xcb_xkb_use_extension_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + uint16_t wantedMajor; + uint16_t wantedMinor; +} xcb_xkb_use_extension_request_t; + +/** + * @brief xcb_xkb_use_extension_reply_t + **/ +typedef struct xcb_xkb_use_extension_reply_t { + uint8_t response_type; + uint8_t supported; + uint16_t sequence; + uint32_t length; + uint16_t serverMajor; + uint16_t serverMinor; + uint8_t pad0[20]; +} xcb_xkb_use_extension_reply_t; + +/** + * @brief xcb_xkb_select_events_details_t + **/ +typedef struct xcb_xkb_select_events_details_t { + uint16_t affectNewKeyboard; + uint16_t newKeyboardDetails; + uint16_t affectState; + uint16_t stateDetails; + uint32_t affectCtrls; + uint32_t ctrlDetails; + uint32_t affectIndicatorState; + uint32_t indicatorStateDetails; + uint32_t affectIndicatorMap; + uint32_t indicatorMapDetails; + uint16_t affectNames; + uint16_t namesDetails; + uint8_t affectCompat; + uint8_t compatDetails; + uint8_t affectBell; + uint8_t bellDetails; + uint8_t affectMsgDetails; + uint8_t msgDetails; + uint16_t affectAccessX; + uint16_t accessXDetails; + uint16_t affectExtDev; + uint16_t extdevDetails; +} xcb_xkb_select_events_details_t; + +/** Opcode for xcb_xkb_select_events. */ +#define XCB_XKB_SELECT_EVENTS 1 + +/** + * @brief xcb_xkb_select_events_request_t + **/ +typedef struct xcb_xkb_select_events_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_xkb_device_spec_t deviceSpec; + uint16_t affectWhich; + uint16_t clear; + uint16_t selectAll; + uint16_t affectMap; + uint16_t map; +} xcb_xkb_select_events_request_t; + +/** Opcode for xcb_xkb_bell. */ +#define XCB_XKB_BELL 3 + +/** + * @brief xcb_xkb_bell_request_t + **/ +typedef struct xcb_xkb_bell_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_xkb_device_spec_t deviceSpec; + xcb_xkb_bell_class_spec_t bellClass; + xcb_xkb_id_spec_t bellID; + int8_t percent; + uint8_t forceSound; + uint8_t eventOnly; + uint8_t pad0; + int16_t pitch; + int16_t duration; + uint8_t pad1[2]; + xcb_atom_t name; + xcb_window_t window; +} xcb_xkb_bell_request_t; + +/** + * @brief xcb_xkb_get_state_cookie_t + **/ +typedef struct xcb_xkb_get_state_cookie_t { + unsigned int sequence; +} xcb_xkb_get_state_cookie_t; + +/** Opcode for xcb_xkb_get_state. */ +#define XCB_XKB_GET_STATE 4 + +/** + * @brief xcb_xkb_get_state_request_t + **/ +typedef struct xcb_xkb_get_state_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_xkb_device_spec_t deviceSpec; + uint8_t pad0[2]; +} xcb_xkb_get_state_request_t; + +/** + * @brief xcb_xkb_get_state_reply_t + **/ +typedef struct xcb_xkb_get_state_reply_t { + uint8_t response_type; + uint8_t deviceID; + uint16_t sequence; + uint32_t length; + uint8_t mods; + uint8_t baseMods; + uint8_t latchedMods; + uint8_t lockedMods; + uint8_t group; + uint8_t lockedGroup; + int16_t baseGroup; + int16_t latchedGroup; + uint8_t compatState; + uint8_t grabMods; + uint8_t compatGrabMods; + uint8_t lookupMods; + uint8_t compatLookupMods; + uint8_t pad0; + uint16_t ptrBtnState; + uint8_t pad1[6]; +} xcb_xkb_get_state_reply_t; + +/** Opcode for xcb_xkb_latch_lock_state. */ +#define XCB_XKB_LATCH_LOCK_STATE 5 + +/** + * @brief xcb_xkb_latch_lock_state_request_t + **/ +typedef struct xcb_xkb_latch_lock_state_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_xkb_device_spec_t deviceSpec; + uint8_t affectModLocks; + uint8_t modLocks; + uint8_t lockGroup; + uint8_t groupLock; + uint8_t affectModLatches; + uint8_t pad0; + uint8_t pad1; + uint8_t latchGroup; + uint16_t groupLatch; +} xcb_xkb_latch_lock_state_request_t; + +/** + * @brief xcb_xkb_get_controls_cookie_t + **/ +typedef struct xcb_xkb_get_controls_cookie_t { + unsigned int sequence; +} xcb_xkb_get_controls_cookie_t; + +/** Opcode for xcb_xkb_get_controls. */ +#define XCB_XKB_GET_CONTROLS 6 + +/** + * @brief xcb_xkb_get_controls_request_t + **/ +typedef struct xcb_xkb_get_controls_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_xkb_device_spec_t deviceSpec; + uint8_t pad0[2]; +} xcb_xkb_get_controls_request_t; + +/** + * @brief xcb_xkb_get_controls_reply_t + **/ +typedef struct xcb_xkb_get_controls_reply_t { + uint8_t response_type; + uint8_t deviceID; + uint16_t sequence; + uint32_t length; + uint8_t mouseKeysDfltBtn; + uint8_t numGroups; + uint8_t groupsWrap; + uint8_t internalModsMask; + uint8_t ignoreLockModsMask; + uint8_t internalModsRealMods; + uint8_t ignoreLockModsRealMods; + uint8_t pad0; + uint16_t internalModsVmods; + uint16_t ignoreLockModsVmods; + uint16_t repeatDelay; + uint16_t repeatInterval; + uint16_t slowKeysDelay; + uint16_t debounceDelay; + uint16_t mouseKeysDelay; + uint16_t mouseKeysInterval; + uint16_t mouseKeysTimeToMax; + uint16_t mouseKeysMaxSpeed; + int16_t mouseKeysCurve; + uint16_t accessXOption; + uint16_t accessXTimeout; + uint16_t accessXTimeoutOptionsMask; + uint16_t accessXTimeoutOptionsValues; + uint8_t pad1[2]; + uint32_t accessXTimeoutMask; + uint32_t accessXTimeoutValues; + uint32_t enabledControls; + uint8_t perKeyRepeat[32]; +} xcb_xkb_get_controls_reply_t; + +/** Opcode for xcb_xkb_set_controls. */ +#define XCB_XKB_SET_CONTROLS 7 + +/** + * @brief xcb_xkb_set_controls_request_t + **/ +typedef struct xcb_xkb_set_controls_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_xkb_device_spec_t deviceSpec; + uint8_t affectInternalRealMods; + uint8_t internalRealMods; + uint8_t affectIgnoreLockRealMods; + uint8_t ignoreLockRealMods; + uint16_t affectInternalVirtualMods; + uint16_t internalVirtualMods; + uint16_t affectIgnoreLockVirtualMods; + uint16_t ignoreLockVirtualMods; + uint8_t mouseKeysDfltBtn; + uint8_t groupsWrap; + uint16_t accessXOptions; + uint8_t pad0[2]; + uint32_t affectEnabledControls; + uint32_t enabledControls; + uint32_t changeControls; + uint16_t repeatDelay; + uint16_t repeatInterval; + uint16_t slowKeysDelay; + uint16_t debounceDelay; + uint16_t mouseKeysDelay; + uint16_t mouseKeysInterval; + uint16_t mouseKeysTimeToMax; + uint16_t mouseKeysMaxSpeed; + int16_t mouseKeysCurve; + uint16_t accessXTimeout; + uint32_t accessXTimeoutMask; + uint32_t accessXTimeoutValues; + uint16_t accessXTimeoutOptionsMask; + uint16_t accessXTimeoutOptionsValues; + uint8_t perKeyRepeat[32]; +} xcb_xkb_set_controls_request_t; + +/** + * @brief xcb_xkb_get_map_cookie_t + **/ +typedef struct xcb_xkb_get_map_cookie_t { + unsigned int sequence; +} xcb_xkb_get_map_cookie_t; + +/** Opcode for xcb_xkb_get_map. */ +#define XCB_XKB_GET_MAP 8 + +/** + * @brief xcb_xkb_get_map_request_t + **/ +typedef struct xcb_xkb_get_map_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_xkb_device_spec_t deviceSpec; + uint16_t full; + uint16_t partial; + uint8_t firstType; + uint8_t nTypes; + xcb_keycode_t firstKeySym; + uint8_t nKeySyms; + xcb_keycode_t firstKeyAction; + uint8_t nKeyActions; + xcb_keycode_t firstKeyBehavior; + uint8_t nKeyBehaviors; + uint16_t virtualMods; + xcb_keycode_t firstKeyExplicit; + uint8_t nKeyExplicit; + xcb_keycode_t firstModMapKey; + uint8_t nModMapKeys; + xcb_keycode_t firstVModMapKey; + uint8_t nVModMapKeys; + uint8_t pad0[2]; +} xcb_xkb_get_map_request_t; + +/** + * @brief xcb_xkb_get_map_map_t + **/ +typedef struct xcb_xkb_get_map_map_t { + xcb_xkb_key_type_t *types_rtrn; + xcb_xkb_key_sym_map_t *syms_rtrn; + uint8_t *acts_rtrn_count; + uint8_t *pad2; + xcb_xkb_action_t *acts_rtrn_acts; + xcb_xkb_set_behavior_t *behaviors_rtrn; + uint8_t *vmods_rtrn; + uint8_t *pad3; + xcb_xkb_set_explicit_t *explicit_rtrn; + uint8_t *pad4; + xcb_xkb_key_mod_map_t *modmap_rtrn; + uint8_t *pad5; + xcb_xkb_key_v_mod_map_t *vmodmap_rtrn; +} xcb_xkb_get_map_map_t; + +/** + * @brief xcb_xkb_get_map_reply_t + **/ +typedef struct xcb_xkb_get_map_reply_t { + uint8_t response_type; + uint8_t deviceID; + uint16_t sequence; + uint32_t length; + uint8_t pad0[2]; + xcb_keycode_t minKeyCode; + xcb_keycode_t maxKeyCode; + uint16_t present; + uint8_t firstType; + uint8_t nTypes; + uint8_t totalTypes; + xcb_keycode_t firstKeySym; + uint16_t totalSyms; + uint8_t nKeySyms; + xcb_keycode_t firstKeyAction; + uint16_t totalActions; + uint8_t nKeyActions; + xcb_keycode_t firstKeyBehavior; + uint8_t nKeyBehaviors; + uint8_t totalKeyBehaviors; + xcb_keycode_t firstKeyExplicit; + uint8_t nKeyExplicit; + uint8_t totalKeyExplicit; + xcb_keycode_t firstModMapKey; + uint8_t nModMapKeys; + uint8_t totalModMapKeys; + xcb_keycode_t firstVModMapKey; + uint8_t nVModMapKeys; + uint8_t totalVModMapKeys; + uint8_t pad1; + uint16_t virtualMods; +} xcb_xkb_get_map_reply_t; + +/** + * @brief xcb_xkb_set_map_values_t + **/ +typedef struct xcb_xkb_set_map_values_t { + xcb_xkb_set_key_type_t *types; + xcb_xkb_key_sym_map_t *syms; + uint8_t *actionsCount; + xcb_xkb_action_t *actions; + xcb_xkb_set_behavior_t *behaviors; + uint8_t *vmods; + xcb_xkb_set_explicit_t *explicit; + xcb_xkb_key_mod_map_t *modmap; + xcb_xkb_key_v_mod_map_t *vmodmap; +} xcb_xkb_set_map_values_t; + +/** Opcode for xcb_xkb_set_map. */ +#define XCB_XKB_SET_MAP 9 + +/** + * @brief xcb_xkb_set_map_request_t + **/ +typedef struct xcb_xkb_set_map_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_xkb_device_spec_t deviceSpec; + uint16_t present; + uint16_t flags; + xcb_keycode_t minKeyCode; + xcb_keycode_t maxKeyCode; + uint8_t firstType; + uint8_t nTypes; + xcb_keycode_t firstKeySym; + uint8_t nKeySyms; + uint16_t totalSyms; + xcb_keycode_t firstKeyAction; + uint8_t nKeyActions; + uint16_t totalActions; + xcb_keycode_t firstKeyBehavior; + uint8_t nKeyBehaviors; + uint8_t totalKeyBehaviors; + xcb_keycode_t firstKeyExplicit; + uint8_t nKeyExplicit; + uint8_t totalKeyExplicit; + xcb_keycode_t firstModMapKey; + uint8_t nModMapKeys; + uint8_t totalModMapKeys; + xcb_keycode_t firstVModMapKey; + uint8_t nVModMapKeys; + uint8_t totalVModMapKeys; + uint16_t virtualMods; +} xcb_xkb_set_map_request_t; + +/** + * @brief xcb_xkb_get_compat_map_cookie_t + **/ +typedef struct xcb_xkb_get_compat_map_cookie_t { + unsigned int sequence; +} xcb_xkb_get_compat_map_cookie_t; + +/** Opcode for xcb_xkb_get_compat_map. */ +#define XCB_XKB_GET_COMPAT_MAP 10 + +/** + * @brief xcb_xkb_get_compat_map_request_t + **/ +typedef struct xcb_xkb_get_compat_map_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_xkb_device_spec_t deviceSpec; + uint8_t groups; + uint8_t getAllSI; + uint16_t firstSI; + uint16_t nSI; +} xcb_xkb_get_compat_map_request_t; + +/** + * @brief xcb_xkb_get_compat_map_reply_t + **/ +typedef struct xcb_xkb_get_compat_map_reply_t { + uint8_t response_type; + uint8_t deviceID; + uint16_t sequence; + uint32_t length; + uint8_t groupsRtrn; + uint8_t pad0; + uint16_t firstSIRtrn; + uint16_t nSIRtrn; + uint16_t nTotalSI; + uint8_t pad1[16]; +} xcb_xkb_get_compat_map_reply_t; + +/** Opcode for xcb_xkb_set_compat_map. */ +#define XCB_XKB_SET_COMPAT_MAP 11 + +/** + * @brief xcb_xkb_set_compat_map_request_t + **/ +typedef struct xcb_xkb_set_compat_map_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_xkb_device_spec_t deviceSpec; + uint8_t pad0; + uint8_t recomputeActions; + uint8_t truncateSI; + uint8_t groups; + uint16_t firstSI; + uint16_t nSI; + uint8_t pad1[2]; +} xcb_xkb_set_compat_map_request_t; + +/** + * @brief xcb_xkb_get_indicator_state_cookie_t + **/ +typedef struct xcb_xkb_get_indicator_state_cookie_t { + unsigned int sequence; +} xcb_xkb_get_indicator_state_cookie_t; + +/** Opcode for xcb_xkb_get_indicator_state. */ +#define XCB_XKB_GET_INDICATOR_STATE 12 + +/** + * @brief xcb_xkb_get_indicator_state_request_t + **/ +typedef struct xcb_xkb_get_indicator_state_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_xkb_device_spec_t deviceSpec; + uint8_t pad0[2]; +} xcb_xkb_get_indicator_state_request_t; + +/** + * @brief xcb_xkb_get_indicator_state_reply_t + **/ +typedef struct xcb_xkb_get_indicator_state_reply_t { + uint8_t response_type; + uint8_t deviceID; + uint16_t sequence; + uint32_t length; + uint32_t state; + uint8_t pad0[20]; +} xcb_xkb_get_indicator_state_reply_t; + +/** + * @brief xcb_xkb_get_indicator_map_cookie_t + **/ +typedef struct xcb_xkb_get_indicator_map_cookie_t { + unsigned int sequence; +} xcb_xkb_get_indicator_map_cookie_t; + +/** Opcode for xcb_xkb_get_indicator_map. */ +#define XCB_XKB_GET_INDICATOR_MAP 13 + +/** + * @brief xcb_xkb_get_indicator_map_request_t + **/ +typedef struct xcb_xkb_get_indicator_map_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_xkb_device_spec_t deviceSpec; + uint8_t pad0[2]; + uint32_t which; +} xcb_xkb_get_indicator_map_request_t; + +/** + * @brief xcb_xkb_get_indicator_map_reply_t + **/ +typedef struct xcb_xkb_get_indicator_map_reply_t { + uint8_t response_type; + uint8_t deviceID; + uint16_t sequence; + uint32_t length; + uint32_t which; + uint32_t realIndicators; + uint8_t nIndicators; + uint8_t pad0[15]; +} xcb_xkb_get_indicator_map_reply_t; + +/** Opcode for xcb_xkb_set_indicator_map. */ +#define XCB_XKB_SET_INDICATOR_MAP 14 + +/** + * @brief xcb_xkb_set_indicator_map_request_t + **/ +typedef struct xcb_xkb_set_indicator_map_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_xkb_device_spec_t deviceSpec; + uint8_t pad0[2]; + uint32_t which; +} xcb_xkb_set_indicator_map_request_t; + +/** + * @brief xcb_xkb_get_named_indicator_cookie_t + **/ +typedef struct xcb_xkb_get_named_indicator_cookie_t { + unsigned int sequence; +} xcb_xkb_get_named_indicator_cookie_t; + +/** Opcode for xcb_xkb_get_named_indicator. */ +#define XCB_XKB_GET_NAMED_INDICATOR 15 + +/** + * @brief xcb_xkb_get_named_indicator_request_t + **/ +typedef struct xcb_xkb_get_named_indicator_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_xkb_device_spec_t deviceSpec; + xcb_xkb_led_class_spec_t ledClass; + xcb_xkb_id_spec_t ledID; + uint8_t pad0[2]; + xcb_atom_t indicator; +} xcb_xkb_get_named_indicator_request_t; + +/** + * @brief xcb_xkb_get_named_indicator_reply_t + **/ +typedef struct xcb_xkb_get_named_indicator_reply_t { + uint8_t response_type; + uint8_t deviceID; + uint16_t sequence; + uint32_t length; + xcb_atom_t indicator; + uint8_t found; + uint8_t on; + uint8_t realIndicator; + uint8_t ndx; + uint8_t map_flags; + uint8_t map_whichGroups; + uint8_t map_groups; + uint8_t map_whichMods; + uint8_t map_mods; + uint8_t map_realMods; + uint16_t map_vmod; + uint32_t map_ctrls; + uint8_t supported; + uint8_t pad0[3]; +} xcb_xkb_get_named_indicator_reply_t; + +/** Opcode for xcb_xkb_set_named_indicator. */ +#define XCB_XKB_SET_NAMED_INDICATOR 16 + +/** + * @brief xcb_xkb_set_named_indicator_request_t + **/ +typedef struct xcb_xkb_set_named_indicator_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_xkb_device_spec_t deviceSpec; + xcb_xkb_led_class_spec_t ledClass; + xcb_xkb_id_spec_t ledID; + uint8_t pad0[2]; + xcb_atom_t indicator; + uint8_t setState; + uint8_t on; + uint8_t setMap; + uint8_t createMap; + uint8_t pad1; + uint8_t map_flags; + uint8_t map_whichGroups; + uint8_t map_groups; + uint8_t map_whichMods; + uint8_t map_realMods; + uint16_t map_vmods; + uint32_t map_ctrls; +} xcb_xkb_set_named_indicator_request_t; + +/** + * @brief xcb_xkb_get_names_cookie_t + **/ +typedef struct xcb_xkb_get_names_cookie_t { + unsigned int sequence; +} xcb_xkb_get_names_cookie_t; + +/** Opcode for xcb_xkb_get_names. */ +#define XCB_XKB_GET_NAMES 17 + +/** + * @brief xcb_xkb_get_names_request_t + **/ +typedef struct xcb_xkb_get_names_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_xkb_device_spec_t deviceSpec; + uint8_t pad0[2]; + uint32_t which; +} xcb_xkb_get_names_request_t; + +/** + * @brief xcb_xkb_get_names_value_list_t + **/ +typedef struct xcb_xkb_get_names_value_list_t { + xcb_atom_t keycodesName; + xcb_atom_t geometryName; + xcb_atom_t symbolsName; + xcb_atom_t physSymbolsName; + xcb_atom_t typesName; + xcb_atom_t compatName; + xcb_atom_t *typeNames; + uint8_t *nLevelsPerType; + uint8_t *pad1; + xcb_atom_t *ktLevelNames; + xcb_atom_t *indicatorNames; + xcb_atom_t *virtualModNames; + xcb_atom_t *groups; + xcb_xkb_key_name_t *keyNames; + xcb_xkb_key_alias_t *keyAliases; + xcb_atom_t *radioGroupNames; +} xcb_xkb_get_names_value_list_t; + +/** + * @brief xcb_xkb_get_names_reply_t + **/ +typedef struct xcb_xkb_get_names_reply_t { + uint8_t response_type; + uint8_t deviceID; + uint16_t sequence; + uint32_t length; + uint32_t which; + xcb_keycode_t minKeyCode; + xcb_keycode_t maxKeyCode; + uint8_t nTypes; + uint8_t groupNames; + uint16_t virtualMods; + xcb_keycode_t firstKey; + uint8_t nKeys; + uint32_t indicators; + uint8_t nRadioGroups; + uint8_t nKeyAliases; + uint16_t nKTLevels; + uint8_t pad0[4]; +} xcb_xkb_get_names_reply_t; + +/** + * @brief xcb_xkb_set_names_values_t + **/ +typedef struct xcb_xkb_set_names_values_t { + xcb_atom_t keycodesName; + xcb_atom_t geometryName; + xcb_atom_t symbolsName; + xcb_atom_t physSymbolsName; + xcb_atom_t typesName; + xcb_atom_t compatName; + xcb_atom_t *typeNames; + uint8_t *nLevelsPerType; + xcb_atom_t *ktLevelNames; + xcb_atom_t *indicatorNames; + xcb_atom_t *virtualModNames; + xcb_atom_t *groups; + xcb_xkb_key_name_t *keyNames; + xcb_xkb_key_alias_t *keyAliases; + xcb_atom_t *radioGroupNames; +} xcb_xkb_set_names_values_t; + +/** Opcode for xcb_xkb_set_names. */ +#define XCB_XKB_SET_NAMES 18 + +/** + * @brief xcb_xkb_set_names_request_t + **/ +typedef struct xcb_xkb_set_names_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_xkb_device_spec_t deviceSpec; + uint16_t virtualMods; + uint32_t which; + uint8_t firstType; + uint8_t nTypes; + uint8_t firstKTLevelt; + uint8_t nKTLevels; + uint32_t indicators; + uint8_t groupNames; + uint8_t nRadioGroups; + xcb_keycode_t firstKey; + uint8_t nKeys; + uint8_t nKeyAliases; + uint8_t pad0; + uint16_t totalKTLevelNames; +} xcb_xkb_set_names_request_t; + +/** + * @brief xcb_xkb_per_client_flags_cookie_t + **/ +typedef struct xcb_xkb_per_client_flags_cookie_t { + unsigned int sequence; +} xcb_xkb_per_client_flags_cookie_t; + +/** Opcode for xcb_xkb_per_client_flags. */ +#define XCB_XKB_PER_CLIENT_FLAGS 21 + +/** + * @brief xcb_xkb_per_client_flags_request_t + **/ +typedef struct xcb_xkb_per_client_flags_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_xkb_device_spec_t deviceSpec; + uint8_t pad0[2]; + uint32_t change; + uint32_t value; + uint32_t ctrlsToChange; + uint32_t autoCtrls; + uint32_t autoCtrlsValues; +} xcb_xkb_per_client_flags_request_t; + +/** + * @brief xcb_xkb_per_client_flags_reply_t + **/ +typedef struct xcb_xkb_per_client_flags_reply_t { + uint8_t response_type; + uint8_t deviceID; + uint16_t sequence; + uint32_t length; + uint32_t supported; + uint32_t value; + uint32_t autoCtrls; + uint32_t autoCtrlsValues; + uint8_t pad0[8]; +} xcb_xkb_per_client_flags_reply_t; + +/** + * @brief xcb_xkb_list_components_cookie_t + **/ +typedef struct xcb_xkb_list_components_cookie_t { + unsigned int sequence; +} xcb_xkb_list_components_cookie_t; + +/** Opcode for xcb_xkb_list_components. */ +#define XCB_XKB_LIST_COMPONENTS 22 + +/** + * @brief xcb_xkb_list_components_request_t + **/ +typedef struct xcb_xkb_list_components_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_xkb_device_spec_t deviceSpec; + uint16_t maxNames; +} xcb_xkb_list_components_request_t; + +/** + * @brief xcb_xkb_list_components_reply_t + **/ +typedef struct xcb_xkb_list_components_reply_t { + uint8_t response_type; + uint8_t deviceID; + uint16_t sequence; + uint32_t length; + uint16_t nKeymaps; + uint16_t nKeycodes; + uint16_t nTypes; + uint16_t nCompatMaps; + uint16_t nSymbols; + uint16_t nGeometries; + uint16_t extra; + uint8_t pad0[10]; +} xcb_xkb_list_components_reply_t; + +/** + * @brief xcb_xkb_get_kbd_by_name_cookie_t + **/ +typedef struct xcb_xkb_get_kbd_by_name_cookie_t { + unsigned int sequence; +} xcb_xkb_get_kbd_by_name_cookie_t; + +/** Opcode for xcb_xkb_get_kbd_by_name. */ +#define XCB_XKB_GET_KBD_BY_NAME 23 + +/** + * @brief xcb_xkb_get_kbd_by_name_request_t + **/ +typedef struct xcb_xkb_get_kbd_by_name_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_xkb_device_spec_t deviceSpec; + uint16_t need; + uint16_t want; + uint8_t load; + uint8_t pad0; +} xcb_xkb_get_kbd_by_name_request_t; + +/** + * @brief xcb_xkb_get_kbd_by_name_replies_types_map_t + **/ +typedef struct xcb_xkb_get_kbd_by_name_replies_types_map_t { + xcb_xkb_key_type_t *types_rtrn; + xcb_xkb_key_sym_map_t *syms_rtrn; + uint8_t *acts_rtrn_count; + xcb_xkb_action_t *acts_rtrn_acts; + xcb_xkb_set_behavior_t *behaviors_rtrn; + uint8_t *vmods_rtrn; + xcb_xkb_set_explicit_t *explicit_rtrn; + xcb_xkb_key_mod_map_t *modmap_rtrn; + xcb_xkb_key_v_mod_map_t *vmodmap_rtrn; +} xcb_xkb_get_kbd_by_name_replies_types_map_t; + +/** + * @brief xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t + **/ +typedef struct xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t { + xcb_atom_t keycodesName; + xcb_atom_t geometryName; + xcb_atom_t symbolsName; + xcb_atom_t physSymbolsName; + xcb_atom_t typesName; + xcb_atom_t compatName; + xcb_atom_t *typeNames; + uint8_t *nLevelsPerType; + xcb_atom_t *ktLevelNames; + xcb_atom_t *indicatorNames; + xcb_atom_t *virtualModNames; + xcb_atom_t *groups; + xcb_xkb_key_name_t *keyNames; + xcb_xkb_key_alias_t *keyAliases; + xcb_atom_t *radioGroupNames; +} xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t; + +/** + * @brief xcb_xkb_get_kbd_by_name_replies_t + **/ +typedef struct xcb_xkb_get_kbd_by_name_replies_t { + struct { + uint8_t getmap_type; + uint8_t typeDeviceID; + uint16_t getmap_sequence; + uint32_t getmap_length; + uint8_t pad1[2]; + xcb_keycode_t typeMinKeyCode; + xcb_keycode_t typeMaxKeyCode; + uint16_t present; + uint8_t firstType; + uint8_t nTypes; + uint8_t totalTypes; + xcb_keycode_t firstKeySym; + uint16_t totalSyms; + uint8_t nKeySyms; + xcb_keycode_t firstKeyAction; + uint16_t totalActions; + uint8_t nKeyActions; + xcb_keycode_t firstKeyBehavior; + uint8_t nKeyBehaviors; + uint8_t totalKeyBehaviors; + xcb_keycode_t firstKeyExplicit; + uint8_t nKeyExplicit; + uint8_t totalKeyExplicit; + xcb_keycode_t firstModMapKey; + uint8_t nModMapKeys; + uint8_t totalModMapKeys; + xcb_keycode_t firstVModMapKey; + uint8_t nVModMapKeys; + uint8_t totalVModMapKeys; + uint8_t pad2; + uint16_t virtualMods; + xcb_xkb_get_kbd_by_name_replies_types_map_t map; + } types; + struct { + uint8_t compatmap_type; + uint8_t compatDeviceID; + uint16_t compatmap_sequence; + uint32_t compatmap_length; + uint8_t groupsRtrn; + uint8_t pad7; + uint16_t firstSIRtrn; + uint16_t nSIRtrn; + uint16_t nTotalSI; + uint8_t pad8[16]; + xcb_xkb_sym_interpret_t *si_rtrn; + xcb_xkb_mod_def_t *group_rtrn; + } compat_map; + struct { + uint8_t indicatormap_type; + uint8_t indicatorDeviceID; + uint16_t indicatormap_sequence; + uint32_t indicatormap_length; + uint32_t which; + uint32_t realIndicators; + uint8_t nIndicators; + uint8_t pad9[15]; + xcb_xkb_indicator_map_t *maps; + } indicator_maps; + struct { + uint8_t keyname_type; + uint8_t keyDeviceID; + uint16_t keyname_sequence; + uint32_t keyname_length; + uint32_t which; + xcb_keycode_t keyMinKeyCode; + xcb_keycode_t keyMaxKeyCode; + uint8_t nTypes; + uint8_t groupNames; + uint16_t virtualMods; + xcb_keycode_t firstKey; + uint8_t nKeys; + uint32_t indicators; + uint8_t nRadioGroups; + uint8_t nKeyAliases; + uint16_t nKTLevels; + uint8_t pad10[4]; + xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t valueList; + } key_names; + struct { + uint8_t geometry_type; + uint8_t geometryDeviceID; + uint16_t geometry_sequence; + uint32_t geometry_length; + xcb_atom_t name; + uint8_t geometryFound; + uint8_t pad12; + uint16_t widthMM; + uint16_t heightMM; + uint16_t nProperties; + uint16_t nColors; + uint16_t nShapes; + uint16_t nSections; + uint16_t nDoodads; + uint16_t nKeyAliases; + uint8_t baseColorNdx; + uint8_t labelColorNdx; + xcb_xkb_counted_string_16_t *labelFont; + } geometry; +} xcb_xkb_get_kbd_by_name_replies_t; + +xcb_xkb_get_kbd_by_name_replies_types_map_t * +xcb_xkb_get_kbd_by_name_replies_types_map (const xcb_xkb_get_kbd_by_name_replies_t *R); + +/** + * @brief xcb_xkb_get_kbd_by_name_reply_t + **/ +typedef struct xcb_xkb_get_kbd_by_name_reply_t { + uint8_t response_type; + uint8_t deviceID; + uint16_t sequence; + uint32_t length; + xcb_keycode_t minKeyCode; + xcb_keycode_t maxKeyCode; + uint8_t loaded; + uint8_t newKeyboard; + uint16_t found; + uint16_t reported; + uint8_t pad0[16]; +} xcb_xkb_get_kbd_by_name_reply_t; + +/** + * @brief xcb_xkb_get_device_info_cookie_t + **/ +typedef struct xcb_xkb_get_device_info_cookie_t { + unsigned int sequence; +} xcb_xkb_get_device_info_cookie_t; + +/** Opcode for xcb_xkb_get_device_info. */ +#define XCB_XKB_GET_DEVICE_INFO 24 + +/** + * @brief xcb_xkb_get_device_info_request_t + **/ +typedef struct xcb_xkb_get_device_info_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_xkb_device_spec_t deviceSpec; + uint16_t wanted; + uint8_t allButtons; + uint8_t firstButton; + uint8_t nButtons; + uint8_t pad0; + xcb_xkb_led_class_spec_t ledClass; + xcb_xkb_id_spec_t ledID; +} xcb_xkb_get_device_info_request_t; + +/** + * @brief xcb_xkb_get_device_info_reply_t + **/ +typedef struct xcb_xkb_get_device_info_reply_t { + uint8_t response_type; + uint8_t deviceID; + uint16_t sequence; + uint32_t length; + uint16_t present; + uint16_t supported; + uint16_t unsupported; + uint16_t nDeviceLedFBs; + uint8_t firstBtnWanted; + uint8_t nBtnsWanted; + uint8_t firstBtnRtrn; + uint8_t nBtnsRtrn; + uint8_t totalBtns; + uint8_t hasOwnState; + uint16_t dfltKbdFB; + uint16_t dfltLedFB; + uint8_t pad0[2]; + xcb_atom_t devType; + uint16_t nameLen; +} xcb_xkb_get_device_info_reply_t; + +/** Opcode for xcb_xkb_set_device_info. */ +#define XCB_XKB_SET_DEVICE_INFO 25 + +/** + * @brief xcb_xkb_set_device_info_request_t + **/ +typedef struct xcb_xkb_set_device_info_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_xkb_device_spec_t deviceSpec; + uint8_t firstBtn; + uint8_t nBtns; + uint16_t change; + uint16_t nDeviceLedFBs; +} xcb_xkb_set_device_info_request_t; + +/** + * @brief xcb_xkb_set_debugging_flags_cookie_t + **/ +typedef struct xcb_xkb_set_debugging_flags_cookie_t { + unsigned int sequence; +} xcb_xkb_set_debugging_flags_cookie_t; + +/** Opcode for xcb_xkb_set_debugging_flags. */ +#define XCB_XKB_SET_DEBUGGING_FLAGS 101 + +/** + * @brief xcb_xkb_set_debugging_flags_request_t + **/ +typedef struct xcb_xkb_set_debugging_flags_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + uint16_t msgLength; + uint8_t pad0[2]; + uint32_t affectFlags; + uint32_t flags; + uint32_t affectCtrls; + uint32_t ctrls; +} xcb_xkb_set_debugging_flags_request_t; + +/** + * @brief xcb_xkb_set_debugging_flags_reply_t + **/ +typedef struct xcb_xkb_set_debugging_flags_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint32_t currentFlags; + uint32_t currentCtrls; + uint32_t supportedFlags; + uint32_t supportedCtrls; + uint8_t pad1[8]; +} xcb_xkb_set_debugging_flags_reply_t; + +/** Opcode for xcb_xkb_new_keyboard_notify. */ +#define XCB_XKB_NEW_KEYBOARD_NOTIFY 0 + +/** + * @brief xcb_xkb_new_keyboard_notify_event_t + **/ +typedef struct xcb_xkb_new_keyboard_notify_event_t { + uint8_t response_type; + uint8_t xkbType; + uint16_t sequence; + xcb_timestamp_t time; + uint8_t deviceID; + uint8_t oldDeviceID; + xcb_keycode_t minKeyCode; + xcb_keycode_t maxKeyCode; + xcb_keycode_t oldMinKeyCode; + xcb_keycode_t oldMaxKeyCode; + uint8_t requestMajor; + uint8_t requestMinor; + uint16_t changed; + uint8_t pad0[14]; +} xcb_xkb_new_keyboard_notify_event_t; + +/** Opcode for xcb_xkb_map_notify. */ +#define XCB_XKB_MAP_NOTIFY 1 + +/** + * @brief xcb_xkb_map_notify_event_t + **/ +typedef struct xcb_xkb_map_notify_event_t { + uint8_t response_type; + uint8_t xkbType; + uint16_t sequence; + xcb_timestamp_t time; + uint8_t deviceID; + uint8_t ptrBtnActions; + uint16_t changed; + xcb_keycode_t minKeyCode; + xcb_keycode_t maxKeyCode; + uint8_t firstType; + uint8_t nTypes; + xcb_keycode_t firstKeySym; + uint8_t nKeySyms; + xcb_keycode_t firstKeyAct; + uint8_t nKeyActs; + xcb_keycode_t firstKeyBehavior; + uint8_t nKeyBehavior; + xcb_keycode_t firstKeyExplicit; + uint8_t nKeyExplicit; + xcb_keycode_t firstModMapKey; + uint8_t nModMapKeys; + xcb_keycode_t firstVModMapKey; + uint8_t nVModMapKeys; + uint16_t virtualMods; + uint8_t pad0[2]; +} xcb_xkb_map_notify_event_t; + +/** Opcode for xcb_xkb_state_notify. */ +#define XCB_XKB_STATE_NOTIFY 2 + +/** + * @brief xcb_xkb_state_notify_event_t + **/ +typedef struct xcb_xkb_state_notify_event_t { + uint8_t response_type; + uint8_t xkbType; + uint16_t sequence; + xcb_timestamp_t time; + uint8_t deviceID; + uint8_t mods; + uint8_t baseMods; + uint8_t latchedMods; + uint8_t lockedMods; + uint8_t group; + int16_t baseGroup; + int16_t latchedGroup; + uint8_t lockedGroup; + uint8_t compatState; + uint8_t grabMods; + uint8_t compatGrabMods; + uint8_t lookupMods; + uint8_t compatLoockupMods; + uint16_t ptrBtnState; + uint16_t changed; + xcb_keycode_t keycode; + uint8_t eventType; + uint8_t requestMajor; + uint8_t requestMinor; +} xcb_xkb_state_notify_event_t; + +/** Opcode for xcb_xkb_controls_notify. */ +#define XCB_XKB_CONTROLS_NOTIFY 3 + +/** + * @brief xcb_xkb_controls_notify_event_t + **/ +typedef struct xcb_xkb_controls_notify_event_t { + uint8_t response_type; + uint8_t xkbType; + uint16_t sequence; + xcb_timestamp_t time; + uint8_t deviceID; + uint8_t numGroups; + uint8_t pad0[2]; + uint32_t changedControls; + uint32_t enabledControls; + uint32_t enabledControlChanges; + xcb_keycode_t keycode; + uint8_t eventType; + uint8_t requestMajor; + uint8_t requestMinor; + uint8_t pad1[4]; +} xcb_xkb_controls_notify_event_t; + +/** Opcode for xcb_xkb_indicator_state_notify. */ +#define XCB_XKB_INDICATOR_STATE_NOTIFY 4 + +/** + * @brief xcb_xkb_indicator_state_notify_event_t + **/ +typedef struct xcb_xkb_indicator_state_notify_event_t { + uint8_t response_type; + uint8_t xkbType; + uint16_t sequence; + xcb_timestamp_t time; + uint8_t deviceID; + uint8_t pad0[3]; + uint32_t state; + uint32_t stateChanged; + uint8_t pad1[12]; +} xcb_xkb_indicator_state_notify_event_t; + +/** Opcode for xcb_xkb_indicator_map_notify. */ +#define XCB_XKB_INDICATOR_MAP_NOTIFY 5 + +/** + * @brief xcb_xkb_indicator_map_notify_event_t + **/ +typedef struct xcb_xkb_indicator_map_notify_event_t { + uint8_t response_type; + uint8_t xkbType; + uint16_t sequence; + xcb_timestamp_t time; + uint8_t deviceID; + uint8_t pad0[3]; + uint32_t state; + uint32_t mapChanged; + uint8_t pad1[12]; +} xcb_xkb_indicator_map_notify_event_t; + +/** Opcode for xcb_xkb_names_notify. */ +#define XCB_XKB_NAMES_NOTIFY 6 + +/** + * @brief xcb_xkb_names_notify_event_t + **/ +typedef struct xcb_xkb_names_notify_event_t { + uint8_t response_type; + uint8_t xkbType; + uint16_t sequence; + xcb_timestamp_t time; + uint8_t deviceID; + uint8_t pad0; + uint16_t changed; + uint8_t firstType; + uint8_t nTypes; + uint8_t firstLevelName; + uint8_t nLevelNames; + uint8_t pad1; + uint8_t nRadioGroups; + uint8_t nKeyAliases; + uint8_t changedGroupNames; + uint16_t changedVirtualMods; + xcb_keycode_t firstKey; + uint8_t nKeys; + uint32_t changedIndicators; + uint8_t pad2[4]; +} xcb_xkb_names_notify_event_t; + +/** Opcode for xcb_xkb_compat_map_notify. */ +#define XCB_XKB_COMPAT_MAP_NOTIFY 7 + +/** + * @brief xcb_xkb_compat_map_notify_event_t + **/ +typedef struct xcb_xkb_compat_map_notify_event_t { + uint8_t response_type; + uint8_t xkbType; + uint16_t sequence; + xcb_timestamp_t time; + uint8_t deviceID; + uint8_t changedGroups; + uint16_t firstSI; + uint16_t nSI; + uint16_t nTotalSI; + uint8_t pad0[16]; +} xcb_xkb_compat_map_notify_event_t; + +/** Opcode for xcb_xkb_bell_notify. */ +#define XCB_XKB_BELL_NOTIFY 8 + +/** + * @brief xcb_xkb_bell_notify_event_t + **/ +typedef struct xcb_xkb_bell_notify_event_t { + uint8_t response_type; + uint8_t xkbType; + uint16_t sequence; + xcb_timestamp_t time; + uint8_t deviceID; + uint8_t bellClass; + uint8_t bellID; + uint8_t percent; + uint16_t pitch; + uint16_t duration; + xcb_atom_t name; + xcb_window_t window; + uint8_t eventOnly; + uint8_t pad0[7]; +} xcb_xkb_bell_notify_event_t; + +/** Opcode for xcb_xkb_action_message. */ +#define XCB_XKB_ACTION_MESSAGE 9 + +/** + * @brief xcb_xkb_action_message_event_t + **/ +typedef struct xcb_xkb_action_message_event_t { + uint8_t response_type; + uint8_t xkbType; + uint16_t sequence; + xcb_timestamp_t time; + uint8_t deviceID; + xcb_keycode_t keycode; + uint8_t press; + uint8_t keyEventFollows; + uint8_t mods; + uint8_t group; + xcb_xkb_string8_t message[8]; + uint8_t pad0[10]; +} xcb_xkb_action_message_event_t; + +/** Opcode for xcb_xkb_access_x_notify. */ +#define XCB_XKB_ACCESS_X_NOTIFY 10 + +/** + * @brief xcb_xkb_access_x_notify_event_t + **/ +typedef struct xcb_xkb_access_x_notify_event_t { + uint8_t response_type; + uint8_t xkbType; + uint16_t sequence; + xcb_timestamp_t time; + uint8_t deviceID; + xcb_keycode_t keycode; + uint16_t detailt; + uint16_t slowKeysDelay; + uint16_t debounceDelay; + uint8_t pad0[16]; +} xcb_xkb_access_x_notify_event_t; + +/** Opcode for xcb_xkb_extension_device_notify. */ +#define XCB_XKB_EXTENSION_DEVICE_NOTIFY 11 + +/** + * @brief xcb_xkb_extension_device_notify_event_t + **/ +typedef struct xcb_xkb_extension_device_notify_event_t { + uint8_t response_type; + uint8_t xkbType; + uint16_t sequence; + xcb_timestamp_t time; + uint8_t deviceID; + uint8_t pad0; + uint16_t reason; + uint16_t ledClass; + uint16_t ledID; + uint32_t ledsDefined; + uint32_t ledState; + uint8_t firstButton; + uint8_t nButtons; + uint16_t supported; + uint16_t unsupported; + uint8_t pad1[2]; +} xcb_xkb_extension_device_notify_event_t; + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_xkb_device_spec_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_xkb_device_spec_t) + */ +void +xcb_xkb_device_spec_next (xcb_xkb_device_spec_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_xkb_device_spec_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_xkb_device_spec_end (xcb_xkb_device_spec_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_xkb_led_class_spec_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_xkb_led_class_spec_t) + */ +void +xcb_xkb_led_class_spec_next (xcb_xkb_led_class_spec_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_xkb_led_class_spec_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_xkb_led_class_spec_end (xcb_xkb_led_class_spec_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_xkb_bell_class_spec_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_xkb_bell_class_spec_t) + */ +void +xcb_xkb_bell_class_spec_next (xcb_xkb_bell_class_spec_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_xkb_bell_class_spec_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_xkb_bell_class_spec_end (xcb_xkb_bell_class_spec_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_xkb_id_spec_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_xkb_id_spec_t) + */ +void +xcb_xkb_id_spec_next (xcb_xkb_id_spec_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_xkb_id_spec_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_xkb_id_spec_end (xcb_xkb_id_spec_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_xkb_indicator_map_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_xkb_indicator_map_t) + */ +void +xcb_xkb_indicator_map_next (xcb_xkb_indicator_map_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_xkb_indicator_map_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_xkb_indicator_map_end (xcb_xkb_indicator_map_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_xkb_mod_def_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_xkb_mod_def_t) + */ +void +xcb_xkb_mod_def_next (xcb_xkb_mod_def_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_xkb_mod_def_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_xkb_mod_def_end (xcb_xkb_mod_def_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_xkb_key_name_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_xkb_key_name_t) + */ +void +xcb_xkb_key_name_next (xcb_xkb_key_name_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_xkb_key_name_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_xkb_key_name_end (xcb_xkb_key_name_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_xkb_key_alias_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_xkb_key_alias_t) + */ +void +xcb_xkb_key_alias_next (xcb_xkb_key_alias_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_xkb_key_alias_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_xkb_key_alias_end (xcb_xkb_key_alias_iterator_t i); + +int +xcb_xkb_counted_string_16_sizeof (const void *_buffer); + +char * +xcb_xkb_counted_string_16_string (const xcb_xkb_counted_string_16_t *R); + +int +xcb_xkb_counted_string_16_string_length (const xcb_xkb_counted_string_16_t *R); + +xcb_generic_iterator_t +xcb_xkb_counted_string_16_string_end (const xcb_xkb_counted_string_16_t *R); + +void * +xcb_xkb_counted_string_16_alignment_pad (const xcb_xkb_counted_string_16_t *R); + +int +xcb_xkb_counted_string_16_alignment_pad_length (const xcb_xkb_counted_string_16_t *R); + +xcb_generic_iterator_t +xcb_xkb_counted_string_16_alignment_pad_end (const xcb_xkb_counted_string_16_t *R); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_xkb_counted_string_16_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_xkb_counted_string_16_t) + */ +void +xcb_xkb_counted_string_16_next (xcb_xkb_counted_string_16_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_xkb_counted_string_16_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_xkb_counted_string_16_end (xcb_xkb_counted_string_16_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_xkb_kt_map_entry_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_xkb_kt_map_entry_t) + */ +void +xcb_xkb_kt_map_entry_next (xcb_xkb_kt_map_entry_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_xkb_kt_map_entry_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_xkb_kt_map_entry_end (xcb_xkb_kt_map_entry_iterator_t i); + +int +xcb_xkb_key_type_sizeof (const void *_buffer); + +xcb_xkb_kt_map_entry_t * +xcb_xkb_key_type_map (const xcb_xkb_key_type_t *R); + +int +xcb_xkb_key_type_map_length (const xcb_xkb_key_type_t *R); + +xcb_xkb_kt_map_entry_iterator_t +xcb_xkb_key_type_map_iterator (const xcb_xkb_key_type_t *R); + +xcb_xkb_mod_def_t * +xcb_xkb_key_type_preserve (const xcb_xkb_key_type_t *R); + +int +xcb_xkb_key_type_preserve_length (const xcb_xkb_key_type_t *R); + +xcb_xkb_mod_def_iterator_t +xcb_xkb_key_type_preserve_iterator (const xcb_xkb_key_type_t *R); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_xkb_key_type_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_xkb_key_type_t) + */ +void +xcb_xkb_key_type_next (xcb_xkb_key_type_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_xkb_key_type_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_xkb_key_type_end (xcb_xkb_key_type_iterator_t i); + +int +xcb_xkb_key_sym_map_sizeof (const void *_buffer); + +xcb_keysym_t * +xcb_xkb_key_sym_map_syms (const xcb_xkb_key_sym_map_t *R); + +int +xcb_xkb_key_sym_map_syms_length (const xcb_xkb_key_sym_map_t *R); + +xcb_generic_iterator_t +xcb_xkb_key_sym_map_syms_end (const xcb_xkb_key_sym_map_t *R); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_xkb_key_sym_map_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_xkb_key_sym_map_t) + */ +void +xcb_xkb_key_sym_map_next (xcb_xkb_key_sym_map_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_xkb_key_sym_map_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_xkb_key_sym_map_end (xcb_xkb_key_sym_map_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_xkb_common_behavior_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_xkb_common_behavior_t) + */ +void +xcb_xkb_common_behavior_next (xcb_xkb_common_behavior_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_xkb_common_behavior_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_xkb_common_behavior_end (xcb_xkb_common_behavior_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_xkb_default_behavior_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_xkb_default_behavior_t) + */ +void +xcb_xkb_default_behavior_next (xcb_xkb_default_behavior_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_xkb_default_behavior_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_xkb_default_behavior_end (xcb_xkb_default_behavior_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_xkb_lock_behavior_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_xkb_lock_behavior_t) + */ +void +xcb_xkb_lock_behavior_next (xcb_xkb_lock_behavior_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_xkb_lock_behavior_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_xkb_lock_behavior_end (xcb_xkb_lock_behavior_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_xkb_radio_group_behavior_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_xkb_radio_group_behavior_t) + */ +void +xcb_xkb_radio_group_behavior_next (xcb_xkb_radio_group_behavior_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_xkb_radio_group_behavior_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_xkb_radio_group_behavior_end (xcb_xkb_radio_group_behavior_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_xkb_overlay_behavior_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_xkb_overlay_behavior_t) + */ +void +xcb_xkb_overlay_behavior_next (xcb_xkb_overlay_behavior_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_xkb_overlay_behavior_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_xkb_overlay_behavior_end (xcb_xkb_overlay_behavior_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_xkb_permament_lock_behavior_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_xkb_permament_lock_behavior_t) + */ +void +xcb_xkb_permament_lock_behavior_next (xcb_xkb_permament_lock_behavior_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_xkb_permament_lock_behavior_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_xkb_permament_lock_behavior_end (xcb_xkb_permament_lock_behavior_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_xkb_permament_radio_group_behavior_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_xkb_permament_radio_group_behavior_t) + */ +void +xcb_xkb_permament_radio_group_behavior_next (xcb_xkb_permament_radio_group_behavior_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_xkb_permament_radio_group_behavior_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_xkb_permament_radio_group_behavior_end (xcb_xkb_permament_radio_group_behavior_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_xkb_permament_overlay_behavior_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_xkb_permament_overlay_behavior_t) + */ +void +xcb_xkb_permament_overlay_behavior_next (xcb_xkb_permament_overlay_behavior_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_xkb_permament_overlay_behavior_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_xkb_permament_overlay_behavior_end (xcb_xkb_permament_overlay_behavior_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_xkb_behavior_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_xkb_behavior_t) + */ +void +xcb_xkb_behavior_next (xcb_xkb_behavior_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_xkb_behavior_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_xkb_behavior_end (xcb_xkb_behavior_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_xkb_set_behavior_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_xkb_set_behavior_t) + */ +void +xcb_xkb_set_behavior_next (xcb_xkb_set_behavior_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_xkb_set_behavior_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_xkb_set_behavior_end (xcb_xkb_set_behavior_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_xkb_set_explicit_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_xkb_set_explicit_t) + */ +void +xcb_xkb_set_explicit_next (xcb_xkb_set_explicit_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_xkb_set_explicit_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_xkb_set_explicit_end (xcb_xkb_set_explicit_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_xkb_key_mod_map_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_xkb_key_mod_map_t) + */ +void +xcb_xkb_key_mod_map_next (xcb_xkb_key_mod_map_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_xkb_key_mod_map_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_xkb_key_mod_map_end (xcb_xkb_key_mod_map_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_xkb_key_v_mod_map_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_xkb_key_v_mod_map_t) + */ +void +xcb_xkb_key_v_mod_map_next (xcb_xkb_key_v_mod_map_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_xkb_key_v_mod_map_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_xkb_key_v_mod_map_end (xcb_xkb_key_v_mod_map_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_xkb_kt_set_map_entry_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_xkb_kt_set_map_entry_t) + */ +void +xcb_xkb_kt_set_map_entry_next (xcb_xkb_kt_set_map_entry_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_xkb_kt_set_map_entry_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_xkb_kt_set_map_entry_end (xcb_xkb_kt_set_map_entry_iterator_t i); + +int +xcb_xkb_set_key_type_sizeof (const void *_buffer); + +xcb_xkb_kt_set_map_entry_t * +xcb_xkb_set_key_type_entries (const xcb_xkb_set_key_type_t *R); + +int +xcb_xkb_set_key_type_entries_length (const xcb_xkb_set_key_type_t *R); + +xcb_xkb_kt_set_map_entry_iterator_t +xcb_xkb_set_key_type_entries_iterator (const xcb_xkb_set_key_type_t *R); + +xcb_xkb_kt_set_map_entry_t * +xcb_xkb_set_key_type_preserve_entries (const xcb_xkb_set_key_type_t *R); + +int +xcb_xkb_set_key_type_preserve_entries_length (const xcb_xkb_set_key_type_t *R); + +xcb_xkb_kt_set_map_entry_iterator_t +xcb_xkb_set_key_type_preserve_entries_iterator (const xcb_xkb_set_key_type_t *R); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_xkb_set_key_type_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_xkb_set_key_type_t) + */ +void +xcb_xkb_set_key_type_next (xcb_xkb_set_key_type_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_xkb_set_key_type_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_xkb_set_key_type_end (xcb_xkb_set_key_type_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_xkb_string8_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_xkb_string8_t) + */ +void +xcb_xkb_string8_next (xcb_xkb_string8_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_xkb_string8_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_xkb_string8_end (xcb_xkb_string8_iterator_t i); + +int +xcb_xkb_outline_sizeof (const void *_buffer); + +xcb_point_t * +xcb_xkb_outline_points (const xcb_xkb_outline_t *R); + +int +xcb_xkb_outline_points_length (const xcb_xkb_outline_t *R); + +xcb_point_iterator_t +xcb_xkb_outline_points_iterator (const xcb_xkb_outline_t *R); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_xkb_outline_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_xkb_outline_t) + */ +void +xcb_xkb_outline_next (xcb_xkb_outline_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_xkb_outline_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_xkb_outline_end (xcb_xkb_outline_iterator_t i); + +int +xcb_xkb_shape_sizeof (const void *_buffer); + +int +xcb_xkb_shape_outlines_length (const xcb_xkb_shape_t *R); + +xcb_xkb_outline_iterator_t +xcb_xkb_shape_outlines_iterator (const xcb_xkb_shape_t *R); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_xkb_shape_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_xkb_shape_t) + */ +void +xcb_xkb_shape_next (xcb_xkb_shape_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_xkb_shape_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_xkb_shape_end (xcb_xkb_shape_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_xkb_key_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_xkb_key_t) + */ +void +xcb_xkb_key_next (xcb_xkb_key_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_xkb_key_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_xkb_key_end (xcb_xkb_key_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_xkb_overlay_key_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_xkb_overlay_key_t) + */ +void +xcb_xkb_overlay_key_next (xcb_xkb_overlay_key_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_xkb_overlay_key_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_xkb_overlay_key_end (xcb_xkb_overlay_key_iterator_t i); + +int +xcb_xkb_overlay_row_sizeof (const void *_buffer); + +xcb_xkb_overlay_key_t * +xcb_xkb_overlay_row_keys (const xcb_xkb_overlay_row_t *R); + +int +xcb_xkb_overlay_row_keys_length (const xcb_xkb_overlay_row_t *R); + +xcb_xkb_overlay_key_iterator_t +xcb_xkb_overlay_row_keys_iterator (const xcb_xkb_overlay_row_t *R); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_xkb_overlay_row_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_xkb_overlay_row_t) + */ +void +xcb_xkb_overlay_row_next (xcb_xkb_overlay_row_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_xkb_overlay_row_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_xkb_overlay_row_end (xcb_xkb_overlay_row_iterator_t i); + +int +xcb_xkb_overlay_sizeof (const void *_buffer); + +int +xcb_xkb_overlay_rows_length (const xcb_xkb_overlay_t *R); + +xcb_xkb_overlay_row_iterator_t +xcb_xkb_overlay_rows_iterator (const xcb_xkb_overlay_t *R); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_xkb_overlay_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_xkb_overlay_t) + */ +void +xcb_xkb_overlay_next (xcb_xkb_overlay_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_xkb_overlay_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_xkb_overlay_end (xcb_xkb_overlay_iterator_t i); + +int +xcb_xkb_row_sizeof (const void *_buffer); + +xcb_xkb_key_t * +xcb_xkb_row_keys (const xcb_xkb_row_t *R); + +int +xcb_xkb_row_keys_length (const xcb_xkb_row_t *R); + +xcb_xkb_key_iterator_t +xcb_xkb_row_keys_iterator (const xcb_xkb_row_t *R); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_xkb_row_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_xkb_row_t) + */ +void +xcb_xkb_row_next (xcb_xkb_row_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_xkb_row_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_xkb_row_end (xcb_xkb_row_iterator_t i); + +int +xcb_xkb_listing_sizeof (const void *_buffer); + +xcb_xkb_string8_t * +xcb_xkb_listing_string (const xcb_xkb_listing_t *R); + +int +xcb_xkb_listing_string_length (const xcb_xkb_listing_t *R); + +xcb_generic_iterator_t +xcb_xkb_listing_string_end (const xcb_xkb_listing_t *R); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_xkb_listing_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_xkb_listing_t) + */ +void +xcb_xkb_listing_next (xcb_xkb_listing_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_xkb_listing_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_xkb_listing_end (xcb_xkb_listing_iterator_t i); + +int +xcb_xkb_device_led_info_sizeof (const void *_buffer); + +xcb_atom_t * +xcb_xkb_device_led_info_names (const xcb_xkb_device_led_info_t *R); + +int +xcb_xkb_device_led_info_names_length (const xcb_xkb_device_led_info_t *R); + +xcb_generic_iterator_t +xcb_xkb_device_led_info_names_end (const xcb_xkb_device_led_info_t *R); + +xcb_xkb_indicator_map_t * +xcb_xkb_device_led_info_maps (const xcb_xkb_device_led_info_t *R); + +int +xcb_xkb_device_led_info_maps_length (const xcb_xkb_device_led_info_t *R); + +xcb_xkb_indicator_map_iterator_t +xcb_xkb_device_led_info_maps_iterator (const xcb_xkb_device_led_info_t *R); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_xkb_device_led_info_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_xkb_device_led_info_t) + */ +void +xcb_xkb_device_led_info_next (xcb_xkb_device_led_info_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_xkb_device_led_info_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_xkb_device_led_info_end (xcb_xkb_device_led_info_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_xkb_sa_no_action_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_xkb_sa_no_action_t) + */ +void +xcb_xkb_sa_no_action_next (xcb_xkb_sa_no_action_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_xkb_sa_no_action_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_xkb_sa_no_action_end (xcb_xkb_sa_no_action_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_xkb_sa_set_mods_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_xkb_sa_set_mods_t) + */ +void +xcb_xkb_sa_set_mods_next (xcb_xkb_sa_set_mods_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_xkb_sa_set_mods_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_xkb_sa_set_mods_end (xcb_xkb_sa_set_mods_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_xkb_sa_latch_mods_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_xkb_sa_latch_mods_t) + */ +void +xcb_xkb_sa_latch_mods_next (xcb_xkb_sa_latch_mods_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_xkb_sa_latch_mods_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_xkb_sa_latch_mods_end (xcb_xkb_sa_latch_mods_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_xkb_sa_lock_mods_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_xkb_sa_lock_mods_t) + */ +void +xcb_xkb_sa_lock_mods_next (xcb_xkb_sa_lock_mods_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_xkb_sa_lock_mods_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_xkb_sa_lock_mods_end (xcb_xkb_sa_lock_mods_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_xkb_sa_set_group_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_xkb_sa_set_group_t) + */ +void +xcb_xkb_sa_set_group_next (xcb_xkb_sa_set_group_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_xkb_sa_set_group_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_xkb_sa_set_group_end (xcb_xkb_sa_set_group_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_xkb_sa_latch_group_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_xkb_sa_latch_group_t) + */ +void +xcb_xkb_sa_latch_group_next (xcb_xkb_sa_latch_group_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_xkb_sa_latch_group_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_xkb_sa_latch_group_end (xcb_xkb_sa_latch_group_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_xkb_sa_lock_group_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_xkb_sa_lock_group_t) + */ +void +xcb_xkb_sa_lock_group_next (xcb_xkb_sa_lock_group_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_xkb_sa_lock_group_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_xkb_sa_lock_group_end (xcb_xkb_sa_lock_group_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_xkb_sa_move_ptr_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_xkb_sa_move_ptr_t) + */ +void +xcb_xkb_sa_move_ptr_next (xcb_xkb_sa_move_ptr_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_xkb_sa_move_ptr_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_xkb_sa_move_ptr_end (xcb_xkb_sa_move_ptr_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_xkb_sa_ptr_btn_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_xkb_sa_ptr_btn_t) + */ +void +xcb_xkb_sa_ptr_btn_next (xcb_xkb_sa_ptr_btn_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_xkb_sa_ptr_btn_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_xkb_sa_ptr_btn_end (xcb_xkb_sa_ptr_btn_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_xkb_sa_lock_ptr_btn_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_xkb_sa_lock_ptr_btn_t) + */ +void +xcb_xkb_sa_lock_ptr_btn_next (xcb_xkb_sa_lock_ptr_btn_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_xkb_sa_lock_ptr_btn_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_xkb_sa_lock_ptr_btn_end (xcb_xkb_sa_lock_ptr_btn_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_xkb_sa_set_ptr_dflt_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_xkb_sa_set_ptr_dflt_t) + */ +void +xcb_xkb_sa_set_ptr_dflt_next (xcb_xkb_sa_set_ptr_dflt_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_xkb_sa_set_ptr_dflt_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_xkb_sa_set_ptr_dflt_end (xcb_xkb_sa_set_ptr_dflt_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_xkb_sa_iso_lock_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_xkb_sa_iso_lock_t) + */ +void +xcb_xkb_sa_iso_lock_next (xcb_xkb_sa_iso_lock_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_xkb_sa_iso_lock_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_xkb_sa_iso_lock_end (xcb_xkb_sa_iso_lock_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_xkb_sa_terminate_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_xkb_sa_terminate_t) + */ +void +xcb_xkb_sa_terminate_next (xcb_xkb_sa_terminate_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_xkb_sa_terminate_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_xkb_sa_terminate_end (xcb_xkb_sa_terminate_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_xkb_sa_switch_screen_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_xkb_sa_switch_screen_t) + */ +void +xcb_xkb_sa_switch_screen_next (xcb_xkb_sa_switch_screen_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_xkb_sa_switch_screen_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_xkb_sa_switch_screen_end (xcb_xkb_sa_switch_screen_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_xkb_sa_set_controls_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_xkb_sa_set_controls_t) + */ +void +xcb_xkb_sa_set_controls_next (xcb_xkb_sa_set_controls_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_xkb_sa_set_controls_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_xkb_sa_set_controls_end (xcb_xkb_sa_set_controls_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_xkb_sa_lock_controls_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_xkb_sa_lock_controls_t) + */ +void +xcb_xkb_sa_lock_controls_next (xcb_xkb_sa_lock_controls_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_xkb_sa_lock_controls_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_xkb_sa_lock_controls_end (xcb_xkb_sa_lock_controls_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_xkb_sa_action_message_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_xkb_sa_action_message_t) + */ +void +xcb_xkb_sa_action_message_next (xcb_xkb_sa_action_message_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_xkb_sa_action_message_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_xkb_sa_action_message_end (xcb_xkb_sa_action_message_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_xkb_sa_redirect_key_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_xkb_sa_redirect_key_t) + */ +void +xcb_xkb_sa_redirect_key_next (xcb_xkb_sa_redirect_key_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_xkb_sa_redirect_key_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_xkb_sa_redirect_key_end (xcb_xkb_sa_redirect_key_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_xkb_sa_device_btn_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_xkb_sa_device_btn_t) + */ +void +xcb_xkb_sa_device_btn_next (xcb_xkb_sa_device_btn_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_xkb_sa_device_btn_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_xkb_sa_device_btn_end (xcb_xkb_sa_device_btn_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_xkb_sa_lock_device_btn_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_xkb_sa_lock_device_btn_t) + */ +void +xcb_xkb_sa_lock_device_btn_next (xcb_xkb_sa_lock_device_btn_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_xkb_sa_lock_device_btn_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_xkb_sa_lock_device_btn_end (xcb_xkb_sa_lock_device_btn_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_xkb_sa_device_valuator_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_xkb_sa_device_valuator_t) + */ +void +xcb_xkb_sa_device_valuator_next (xcb_xkb_sa_device_valuator_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_xkb_sa_device_valuator_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_xkb_sa_device_valuator_end (xcb_xkb_sa_device_valuator_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_xkb_si_action_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_xkb_si_action_t) + */ +void +xcb_xkb_si_action_next (xcb_xkb_si_action_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_xkb_si_action_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_xkb_si_action_end (xcb_xkb_si_action_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_xkb_sym_interpret_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_xkb_sym_interpret_t) + */ +void +xcb_xkb_sym_interpret_next (xcb_xkb_sym_interpret_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_xkb_sym_interpret_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_xkb_sym_interpret_end (xcb_xkb_sym_interpret_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_xkb_action_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_xkb_action_t) + */ +void +xcb_xkb_action_next (xcb_xkb_action_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_xkb_action_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_xkb_action_end (xcb_xkb_action_iterator_t i); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_xkb_use_extension_cookie_t +xcb_xkb_use_extension (xcb_connection_t *c, + uint16_t wantedMajor, + uint16_t wantedMinor); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_xkb_use_extension_cookie_t +xcb_xkb_use_extension_unchecked (xcb_connection_t *c, + uint16_t wantedMajor, + uint16_t wantedMinor); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_xkb_use_extension_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_xkb_use_extension_reply_t * +xcb_xkb_use_extension_reply (xcb_connection_t *c, + xcb_xkb_use_extension_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_xkb_select_events_details_serialize (void **_buffer, + uint16_t affectWhich, + uint16_t clear, + uint16_t selectAll, + const xcb_xkb_select_events_details_t *_aux); + +int +xcb_xkb_select_events_details_unpack (const void *_buffer, + uint16_t affectWhich, + uint16_t clear, + uint16_t selectAll, + xcb_xkb_select_events_details_t *_aux); + +int +xcb_xkb_select_events_details_sizeof (const void *_buffer, + uint16_t affectWhich, + uint16_t clear, + uint16_t selectAll); + +int +xcb_xkb_select_events_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_xkb_select_events_checked (xcb_connection_t *c, + xcb_xkb_device_spec_t deviceSpec, + uint16_t affectWhich, + uint16_t clear, + uint16_t selectAll, + uint16_t affectMap, + uint16_t map, + const void *details); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_xkb_select_events (xcb_connection_t *c, + xcb_xkb_device_spec_t deviceSpec, + uint16_t affectWhich, + uint16_t clear, + uint16_t selectAll, + uint16_t affectMap, + uint16_t map, + const void *details); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_xkb_select_events_aux_checked (xcb_connection_t *c, + xcb_xkb_device_spec_t deviceSpec, + uint16_t affectWhich, + uint16_t clear, + uint16_t selectAll, + uint16_t affectMap, + uint16_t map, + const xcb_xkb_select_events_details_t *details); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_xkb_select_events_aux (xcb_connection_t *c, + xcb_xkb_device_spec_t deviceSpec, + uint16_t affectWhich, + uint16_t clear, + uint16_t selectAll, + uint16_t affectMap, + uint16_t map, + const xcb_xkb_select_events_details_t *details); + +void * +xcb_xkb_select_events_details (const xcb_xkb_select_events_request_t *R); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_xkb_bell_checked (xcb_connection_t *c, + xcb_xkb_device_spec_t deviceSpec, + xcb_xkb_bell_class_spec_t bellClass, + xcb_xkb_id_spec_t bellID, + int8_t percent, + uint8_t forceSound, + uint8_t eventOnly, + int16_t pitch, + int16_t duration, + xcb_atom_t name, + xcb_window_t window); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_xkb_bell (xcb_connection_t *c, + xcb_xkb_device_spec_t deviceSpec, + xcb_xkb_bell_class_spec_t bellClass, + xcb_xkb_id_spec_t bellID, + int8_t percent, + uint8_t forceSound, + uint8_t eventOnly, + int16_t pitch, + int16_t duration, + xcb_atom_t name, + xcb_window_t window); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_xkb_get_state_cookie_t +xcb_xkb_get_state (xcb_connection_t *c, + xcb_xkb_device_spec_t deviceSpec); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_xkb_get_state_cookie_t +xcb_xkb_get_state_unchecked (xcb_connection_t *c, + xcb_xkb_device_spec_t deviceSpec); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_xkb_get_state_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_xkb_get_state_reply_t * +xcb_xkb_get_state_reply (xcb_connection_t *c, + xcb_xkb_get_state_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_xkb_latch_lock_state_checked (xcb_connection_t *c, + xcb_xkb_device_spec_t deviceSpec, + uint8_t affectModLocks, + uint8_t modLocks, + uint8_t lockGroup, + uint8_t groupLock, + uint8_t affectModLatches, + uint8_t latchGroup, + uint16_t groupLatch); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_xkb_latch_lock_state (xcb_connection_t *c, + xcb_xkb_device_spec_t deviceSpec, + uint8_t affectModLocks, + uint8_t modLocks, + uint8_t lockGroup, + uint8_t groupLock, + uint8_t affectModLatches, + uint8_t latchGroup, + uint16_t groupLatch); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_xkb_get_controls_cookie_t +xcb_xkb_get_controls (xcb_connection_t *c, + xcb_xkb_device_spec_t deviceSpec); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_xkb_get_controls_cookie_t +xcb_xkb_get_controls_unchecked (xcb_connection_t *c, + xcb_xkb_device_spec_t deviceSpec); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_xkb_get_controls_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_xkb_get_controls_reply_t * +xcb_xkb_get_controls_reply (xcb_connection_t *c, + xcb_xkb_get_controls_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_xkb_set_controls_checked (xcb_connection_t *c, + xcb_xkb_device_spec_t deviceSpec, + uint8_t affectInternalRealMods, + uint8_t internalRealMods, + uint8_t affectIgnoreLockRealMods, + uint8_t ignoreLockRealMods, + uint16_t affectInternalVirtualMods, + uint16_t internalVirtualMods, + uint16_t affectIgnoreLockVirtualMods, + uint16_t ignoreLockVirtualMods, + uint8_t mouseKeysDfltBtn, + uint8_t groupsWrap, + uint16_t accessXOptions, + uint32_t affectEnabledControls, + uint32_t enabledControls, + uint32_t changeControls, + uint16_t repeatDelay, + uint16_t repeatInterval, + uint16_t slowKeysDelay, + uint16_t debounceDelay, + uint16_t mouseKeysDelay, + uint16_t mouseKeysInterval, + uint16_t mouseKeysTimeToMax, + uint16_t mouseKeysMaxSpeed, + int16_t mouseKeysCurve, + uint16_t accessXTimeout, + uint32_t accessXTimeoutMask, + uint32_t accessXTimeoutValues, + uint16_t accessXTimeoutOptionsMask, + uint16_t accessXTimeoutOptionsValues, + const uint8_t *perKeyRepeat); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_xkb_set_controls (xcb_connection_t *c, + xcb_xkb_device_spec_t deviceSpec, + uint8_t affectInternalRealMods, + uint8_t internalRealMods, + uint8_t affectIgnoreLockRealMods, + uint8_t ignoreLockRealMods, + uint16_t affectInternalVirtualMods, + uint16_t internalVirtualMods, + uint16_t affectIgnoreLockVirtualMods, + uint16_t ignoreLockVirtualMods, + uint8_t mouseKeysDfltBtn, + uint8_t groupsWrap, + uint16_t accessXOptions, + uint32_t affectEnabledControls, + uint32_t enabledControls, + uint32_t changeControls, + uint16_t repeatDelay, + uint16_t repeatInterval, + uint16_t slowKeysDelay, + uint16_t debounceDelay, + uint16_t mouseKeysDelay, + uint16_t mouseKeysInterval, + uint16_t mouseKeysTimeToMax, + uint16_t mouseKeysMaxSpeed, + int16_t mouseKeysCurve, + uint16_t accessXTimeout, + uint32_t accessXTimeoutMask, + uint32_t accessXTimeoutValues, + uint16_t accessXTimeoutOptionsMask, + uint16_t accessXTimeoutOptionsValues, + const uint8_t *perKeyRepeat); + +int +xcb_xkb_get_map_map_types_rtrn_length (const xcb_xkb_get_map_reply_t *R, + const xcb_xkb_get_map_map_t *S); + +xcb_xkb_key_type_iterator_t +xcb_xkb_get_map_map_types_rtrn_iterator (const xcb_xkb_get_map_reply_t *R, + const xcb_xkb_get_map_map_t *S); + +int +xcb_xkb_get_map_map_syms_rtrn_length (const xcb_xkb_get_map_reply_t *R, + const xcb_xkb_get_map_map_t *S); + +xcb_xkb_key_sym_map_iterator_t +xcb_xkb_get_map_map_syms_rtrn_iterator (const xcb_xkb_get_map_reply_t *R, + const xcb_xkb_get_map_map_t *S); + +uint8_t * +xcb_xkb_get_map_map_acts_rtrn_count (const xcb_xkb_get_map_map_t *S); + +int +xcb_xkb_get_map_map_acts_rtrn_count_length (const xcb_xkb_get_map_reply_t *R, + const xcb_xkb_get_map_map_t *S); + +xcb_generic_iterator_t +xcb_xkb_get_map_map_acts_rtrn_count_end (const xcb_xkb_get_map_reply_t *R, + const xcb_xkb_get_map_map_t *S); + +xcb_xkb_action_t * +xcb_xkb_get_map_map_acts_rtrn_acts (const xcb_xkb_get_map_map_t *S); + +int +xcb_xkb_get_map_map_acts_rtrn_acts_length (const xcb_xkb_get_map_reply_t *R, + const xcb_xkb_get_map_map_t *S); + +xcb_xkb_action_iterator_t +xcb_xkb_get_map_map_acts_rtrn_acts_iterator (const xcb_xkb_get_map_reply_t *R, + const xcb_xkb_get_map_map_t *S); + +xcb_xkb_set_behavior_t * +xcb_xkb_get_map_map_behaviors_rtrn (const xcb_xkb_get_map_map_t *S); + +int +xcb_xkb_get_map_map_behaviors_rtrn_length (const xcb_xkb_get_map_reply_t *R, + const xcb_xkb_get_map_map_t *S); + +xcb_xkb_set_behavior_iterator_t +xcb_xkb_get_map_map_behaviors_rtrn_iterator (const xcb_xkb_get_map_reply_t *R, + const xcb_xkb_get_map_map_t *S); + +uint8_t * +xcb_xkb_get_map_map_vmods_rtrn (const xcb_xkb_get_map_map_t *S); + +int +xcb_xkb_get_map_map_vmods_rtrn_length (const xcb_xkb_get_map_reply_t *R, + const xcb_xkb_get_map_map_t *S); + +xcb_generic_iterator_t +xcb_xkb_get_map_map_vmods_rtrn_end (const xcb_xkb_get_map_reply_t *R, + const xcb_xkb_get_map_map_t *S); + +xcb_xkb_set_explicit_t * +xcb_xkb_get_map_map_explicit_rtrn (const xcb_xkb_get_map_map_t *S); + +int +xcb_xkb_get_map_map_explicit_rtrn_length (const xcb_xkb_get_map_reply_t *R, + const xcb_xkb_get_map_map_t *S); + +xcb_xkb_set_explicit_iterator_t +xcb_xkb_get_map_map_explicit_rtrn_iterator (const xcb_xkb_get_map_reply_t *R, + const xcb_xkb_get_map_map_t *S); + +xcb_xkb_key_mod_map_t * +xcb_xkb_get_map_map_modmap_rtrn (const xcb_xkb_get_map_map_t *S); + +int +xcb_xkb_get_map_map_modmap_rtrn_length (const xcb_xkb_get_map_reply_t *R, + const xcb_xkb_get_map_map_t *S); + +xcb_xkb_key_mod_map_iterator_t +xcb_xkb_get_map_map_modmap_rtrn_iterator (const xcb_xkb_get_map_reply_t *R, + const xcb_xkb_get_map_map_t *S); + +xcb_xkb_key_v_mod_map_t * +xcb_xkb_get_map_map_vmodmap_rtrn (const xcb_xkb_get_map_map_t *S); + +int +xcb_xkb_get_map_map_vmodmap_rtrn_length (const xcb_xkb_get_map_reply_t *R, + const xcb_xkb_get_map_map_t *S); + +xcb_xkb_key_v_mod_map_iterator_t +xcb_xkb_get_map_map_vmodmap_rtrn_iterator (const xcb_xkb_get_map_reply_t *R, + const xcb_xkb_get_map_map_t *S); + +int +xcb_xkb_get_map_map_serialize (void **_buffer, + uint8_t nTypes, + uint8_t nKeySyms, + uint8_t nKeyActions, + uint16_t totalActions, + uint8_t totalKeyBehaviors, + uint16_t virtualMods, + uint8_t totalKeyExplicit, + uint8_t totalModMapKeys, + uint8_t totalVModMapKeys, + uint16_t present, + const xcb_xkb_get_map_map_t *_aux); + +int +xcb_xkb_get_map_map_unpack (const void *_buffer, + uint8_t nTypes, + uint8_t nKeySyms, + uint8_t nKeyActions, + uint16_t totalActions, + uint8_t totalKeyBehaviors, + uint16_t virtualMods, + uint8_t totalKeyExplicit, + uint8_t totalModMapKeys, + uint8_t totalVModMapKeys, + uint16_t present, + xcb_xkb_get_map_map_t *_aux); + +int +xcb_xkb_get_map_map_sizeof (const void *_buffer, + uint8_t nTypes, + uint8_t nKeySyms, + uint8_t nKeyActions, + uint16_t totalActions, + uint8_t totalKeyBehaviors, + uint16_t virtualMods, + uint8_t totalKeyExplicit, + uint8_t totalModMapKeys, + uint8_t totalVModMapKeys, + uint16_t present); + +int +xcb_xkb_get_map_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_xkb_get_map_cookie_t +xcb_xkb_get_map (xcb_connection_t *c, + xcb_xkb_device_spec_t deviceSpec, + uint16_t full, + uint16_t partial, + uint8_t firstType, + uint8_t nTypes, + xcb_keycode_t firstKeySym, + uint8_t nKeySyms, + xcb_keycode_t firstKeyAction, + uint8_t nKeyActions, + xcb_keycode_t firstKeyBehavior, + uint8_t nKeyBehaviors, + uint16_t virtualMods, + xcb_keycode_t firstKeyExplicit, + uint8_t nKeyExplicit, + xcb_keycode_t firstModMapKey, + uint8_t nModMapKeys, + xcb_keycode_t firstVModMapKey, + uint8_t nVModMapKeys); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_xkb_get_map_cookie_t +xcb_xkb_get_map_unchecked (xcb_connection_t *c, + xcb_xkb_device_spec_t deviceSpec, + uint16_t full, + uint16_t partial, + uint8_t firstType, + uint8_t nTypes, + xcb_keycode_t firstKeySym, + uint8_t nKeySyms, + xcb_keycode_t firstKeyAction, + uint8_t nKeyActions, + xcb_keycode_t firstKeyBehavior, + uint8_t nKeyBehaviors, + uint16_t virtualMods, + xcb_keycode_t firstKeyExplicit, + uint8_t nKeyExplicit, + xcb_keycode_t firstModMapKey, + uint8_t nModMapKeys, + xcb_keycode_t firstVModMapKey, + uint8_t nVModMapKeys); + +void * +xcb_xkb_get_map_map (const xcb_xkb_get_map_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_xkb_get_map_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_xkb_get_map_reply_t * +xcb_xkb_get_map_reply (xcb_connection_t *c, + xcb_xkb_get_map_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_xkb_set_map_values_types_length (const xcb_xkb_set_map_request_t *R, + const xcb_xkb_set_map_values_t *S); + +xcb_xkb_set_key_type_iterator_t +xcb_xkb_set_map_values_types_iterator (const xcb_xkb_set_map_request_t *R, + const xcb_xkb_set_map_values_t *S); + +int +xcb_xkb_set_map_values_syms_length (const xcb_xkb_set_map_request_t *R, + const xcb_xkb_set_map_values_t *S); + +xcb_xkb_key_sym_map_iterator_t +xcb_xkb_set_map_values_syms_iterator (const xcb_xkb_set_map_request_t *R, + const xcb_xkb_set_map_values_t *S); + +uint8_t * +xcb_xkb_set_map_values_actions_count (const xcb_xkb_set_map_values_t *S); + +int +xcb_xkb_set_map_values_actions_count_length (const xcb_xkb_set_map_request_t *R, + const xcb_xkb_set_map_values_t *S); + +xcb_generic_iterator_t +xcb_xkb_set_map_values_actions_count_end (const xcb_xkb_set_map_request_t *R, + const xcb_xkb_set_map_values_t *S); + +xcb_xkb_action_t * +xcb_xkb_set_map_values_actions (const xcb_xkb_set_map_values_t *S); + +int +xcb_xkb_set_map_values_actions_length (const xcb_xkb_set_map_request_t *R, + const xcb_xkb_set_map_values_t *S); + +xcb_xkb_action_iterator_t +xcb_xkb_set_map_values_actions_iterator (const xcb_xkb_set_map_request_t *R, + const xcb_xkb_set_map_values_t *S); + +xcb_xkb_set_behavior_t * +xcb_xkb_set_map_values_behaviors (const xcb_xkb_set_map_values_t *S); + +int +xcb_xkb_set_map_values_behaviors_length (const xcb_xkb_set_map_request_t *R, + const xcb_xkb_set_map_values_t *S); + +xcb_xkb_set_behavior_iterator_t +xcb_xkb_set_map_values_behaviors_iterator (const xcb_xkb_set_map_request_t *R, + const xcb_xkb_set_map_values_t *S); + +uint8_t * +xcb_xkb_set_map_values_vmods (const xcb_xkb_set_map_values_t *S); + +int +xcb_xkb_set_map_values_vmods_length (const xcb_xkb_set_map_request_t *R, + const xcb_xkb_set_map_values_t *S); + +xcb_generic_iterator_t +xcb_xkb_set_map_values_vmods_end (const xcb_xkb_set_map_request_t *R, + const xcb_xkb_set_map_values_t *S); + +xcb_xkb_set_explicit_t * +xcb_xkb_set_map_values_explicit (const xcb_xkb_set_map_values_t *S); + +int +xcb_xkb_set_map_values_explicit_length (const xcb_xkb_set_map_request_t *R, + const xcb_xkb_set_map_values_t *S); + +xcb_xkb_set_explicit_iterator_t +xcb_xkb_set_map_values_explicit_iterator (const xcb_xkb_set_map_request_t *R, + const xcb_xkb_set_map_values_t *S); + +xcb_xkb_key_mod_map_t * +xcb_xkb_set_map_values_modmap (const xcb_xkb_set_map_values_t *S); + +int +xcb_xkb_set_map_values_modmap_length (const xcb_xkb_set_map_request_t *R, + const xcb_xkb_set_map_values_t *S); + +xcb_xkb_key_mod_map_iterator_t +xcb_xkb_set_map_values_modmap_iterator (const xcb_xkb_set_map_request_t *R, + const xcb_xkb_set_map_values_t *S); + +xcb_xkb_key_v_mod_map_t * +xcb_xkb_set_map_values_vmodmap (const xcb_xkb_set_map_values_t *S); + +int +xcb_xkb_set_map_values_vmodmap_length (const xcb_xkb_set_map_request_t *R, + const xcb_xkb_set_map_values_t *S); + +xcb_xkb_key_v_mod_map_iterator_t +xcb_xkb_set_map_values_vmodmap_iterator (const xcb_xkb_set_map_request_t *R, + const xcb_xkb_set_map_values_t *S); + +int +xcb_xkb_set_map_values_serialize (void **_buffer, + uint8_t nTypes, + uint8_t nKeySyms, + uint8_t nKeyActions, + uint16_t totalActions, + uint8_t totalKeyBehaviors, + uint16_t virtualMods, + uint8_t totalKeyExplicit, + uint8_t totalModMapKeys, + uint8_t totalVModMapKeys, + uint16_t present, + const xcb_xkb_set_map_values_t *_aux); + +int +xcb_xkb_set_map_values_unpack (const void *_buffer, + uint8_t nTypes, + uint8_t nKeySyms, + uint8_t nKeyActions, + uint16_t totalActions, + uint8_t totalKeyBehaviors, + uint16_t virtualMods, + uint8_t totalKeyExplicit, + uint8_t totalModMapKeys, + uint8_t totalVModMapKeys, + uint16_t present, + xcb_xkb_set_map_values_t *_aux); + +int +xcb_xkb_set_map_values_sizeof (const void *_buffer, + uint8_t nTypes, + uint8_t nKeySyms, + uint8_t nKeyActions, + uint16_t totalActions, + uint8_t totalKeyBehaviors, + uint16_t virtualMods, + uint8_t totalKeyExplicit, + uint8_t totalModMapKeys, + uint8_t totalVModMapKeys, + uint16_t present); + +int +xcb_xkb_set_map_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_xkb_set_map_checked (xcb_connection_t *c, + xcb_xkb_device_spec_t deviceSpec, + uint16_t present, + uint16_t flags, + xcb_keycode_t minKeyCode, + xcb_keycode_t maxKeyCode, + uint8_t firstType, + uint8_t nTypes, + xcb_keycode_t firstKeySym, + uint8_t nKeySyms, + uint16_t totalSyms, + xcb_keycode_t firstKeyAction, + uint8_t nKeyActions, + uint16_t totalActions, + xcb_keycode_t firstKeyBehavior, + uint8_t nKeyBehaviors, + uint8_t totalKeyBehaviors, + xcb_keycode_t firstKeyExplicit, + uint8_t nKeyExplicit, + uint8_t totalKeyExplicit, + xcb_keycode_t firstModMapKey, + uint8_t nModMapKeys, + uint8_t totalModMapKeys, + xcb_keycode_t firstVModMapKey, + uint8_t nVModMapKeys, + uint8_t totalVModMapKeys, + uint16_t virtualMods, + const void *values); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_xkb_set_map (xcb_connection_t *c, + xcb_xkb_device_spec_t deviceSpec, + uint16_t present, + uint16_t flags, + xcb_keycode_t minKeyCode, + xcb_keycode_t maxKeyCode, + uint8_t firstType, + uint8_t nTypes, + xcb_keycode_t firstKeySym, + uint8_t nKeySyms, + uint16_t totalSyms, + xcb_keycode_t firstKeyAction, + uint8_t nKeyActions, + uint16_t totalActions, + xcb_keycode_t firstKeyBehavior, + uint8_t nKeyBehaviors, + uint8_t totalKeyBehaviors, + xcb_keycode_t firstKeyExplicit, + uint8_t nKeyExplicit, + uint8_t totalKeyExplicit, + xcb_keycode_t firstModMapKey, + uint8_t nModMapKeys, + uint8_t totalModMapKeys, + xcb_keycode_t firstVModMapKey, + uint8_t nVModMapKeys, + uint8_t totalVModMapKeys, + uint16_t virtualMods, + const void *values); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_xkb_set_map_aux_checked (xcb_connection_t *c, + xcb_xkb_device_spec_t deviceSpec, + uint16_t present, + uint16_t flags, + xcb_keycode_t minKeyCode, + xcb_keycode_t maxKeyCode, + uint8_t firstType, + uint8_t nTypes, + xcb_keycode_t firstKeySym, + uint8_t nKeySyms, + uint16_t totalSyms, + xcb_keycode_t firstKeyAction, + uint8_t nKeyActions, + uint16_t totalActions, + xcb_keycode_t firstKeyBehavior, + uint8_t nKeyBehaviors, + uint8_t totalKeyBehaviors, + xcb_keycode_t firstKeyExplicit, + uint8_t nKeyExplicit, + uint8_t totalKeyExplicit, + xcb_keycode_t firstModMapKey, + uint8_t nModMapKeys, + uint8_t totalModMapKeys, + xcb_keycode_t firstVModMapKey, + uint8_t nVModMapKeys, + uint8_t totalVModMapKeys, + uint16_t virtualMods, + const xcb_xkb_set_map_values_t *values); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_xkb_set_map_aux (xcb_connection_t *c, + xcb_xkb_device_spec_t deviceSpec, + uint16_t present, + uint16_t flags, + xcb_keycode_t minKeyCode, + xcb_keycode_t maxKeyCode, + uint8_t firstType, + uint8_t nTypes, + xcb_keycode_t firstKeySym, + uint8_t nKeySyms, + uint16_t totalSyms, + xcb_keycode_t firstKeyAction, + uint8_t nKeyActions, + uint16_t totalActions, + xcb_keycode_t firstKeyBehavior, + uint8_t nKeyBehaviors, + uint8_t totalKeyBehaviors, + xcb_keycode_t firstKeyExplicit, + uint8_t nKeyExplicit, + uint8_t totalKeyExplicit, + xcb_keycode_t firstModMapKey, + uint8_t nModMapKeys, + uint8_t totalModMapKeys, + xcb_keycode_t firstVModMapKey, + uint8_t nVModMapKeys, + uint8_t totalVModMapKeys, + uint16_t virtualMods, + const xcb_xkb_set_map_values_t *values); + +void * +xcb_xkb_set_map_values (const xcb_xkb_set_map_request_t *R); + +int +xcb_xkb_get_compat_map_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_xkb_get_compat_map_cookie_t +xcb_xkb_get_compat_map (xcb_connection_t *c, + xcb_xkb_device_spec_t deviceSpec, + uint8_t groups, + uint8_t getAllSI, + uint16_t firstSI, + uint16_t nSI); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_xkb_get_compat_map_cookie_t +xcb_xkb_get_compat_map_unchecked (xcb_connection_t *c, + xcb_xkb_device_spec_t deviceSpec, + uint8_t groups, + uint8_t getAllSI, + uint16_t firstSI, + uint16_t nSI); + +xcb_xkb_sym_interpret_t * +xcb_xkb_get_compat_map_si_rtrn (const xcb_xkb_get_compat_map_reply_t *R); + +int +xcb_xkb_get_compat_map_si_rtrn_length (const xcb_xkb_get_compat_map_reply_t *R); + +xcb_xkb_sym_interpret_iterator_t +xcb_xkb_get_compat_map_si_rtrn_iterator (const xcb_xkb_get_compat_map_reply_t *R); + +xcb_xkb_mod_def_t * +xcb_xkb_get_compat_map_group_rtrn (const xcb_xkb_get_compat_map_reply_t *R); + +int +xcb_xkb_get_compat_map_group_rtrn_length (const xcb_xkb_get_compat_map_reply_t *R); + +xcb_xkb_mod_def_iterator_t +xcb_xkb_get_compat_map_group_rtrn_iterator (const xcb_xkb_get_compat_map_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_xkb_get_compat_map_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_xkb_get_compat_map_reply_t * +xcb_xkb_get_compat_map_reply (xcb_connection_t *c, + xcb_xkb_get_compat_map_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_xkb_set_compat_map_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_xkb_set_compat_map_checked (xcb_connection_t *c, + xcb_xkb_device_spec_t deviceSpec, + uint8_t recomputeActions, + uint8_t truncateSI, + uint8_t groups, + uint16_t firstSI, + uint16_t nSI, + const xcb_xkb_sym_interpret_t *si, + const xcb_xkb_mod_def_t *groupMaps); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_xkb_set_compat_map (xcb_connection_t *c, + xcb_xkb_device_spec_t deviceSpec, + uint8_t recomputeActions, + uint8_t truncateSI, + uint8_t groups, + uint16_t firstSI, + uint16_t nSI, + const xcb_xkb_sym_interpret_t *si, + const xcb_xkb_mod_def_t *groupMaps); + +xcb_xkb_sym_interpret_t * +xcb_xkb_set_compat_map_si (const xcb_xkb_set_compat_map_request_t *R); + +int +xcb_xkb_set_compat_map_si_length (const xcb_xkb_set_compat_map_request_t *R); + +xcb_xkb_sym_interpret_iterator_t +xcb_xkb_set_compat_map_si_iterator (const xcb_xkb_set_compat_map_request_t *R); + +xcb_xkb_mod_def_t * +xcb_xkb_set_compat_map_group_maps (const xcb_xkb_set_compat_map_request_t *R); + +int +xcb_xkb_set_compat_map_group_maps_length (const xcb_xkb_set_compat_map_request_t *R); + +xcb_xkb_mod_def_iterator_t +xcb_xkb_set_compat_map_group_maps_iterator (const xcb_xkb_set_compat_map_request_t *R); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_xkb_get_indicator_state_cookie_t +xcb_xkb_get_indicator_state (xcb_connection_t *c, + xcb_xkb_device_spec_t deviceSpec); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_xkb_get_indicator_state_cookie_t +xcb_xkb_get_indicator_state_unchecked (xcb_connection_t *c, + xcb_xkb_device_spec_t deviceSpec); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_xkb_get_indicator_state_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_xkb_get_indicator_state_reply_t * +xcb_xkb_get_indicator_state_reply (xcb_connection_t *c, + xcb_xkb_get_indicator_state_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_xkb_get_indicator_map_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_xkb_get_indicator_map_cookie_t +xcb_xkb_get_indicator_map (xcb_connection_t *c, + xcb_xkb_device_spec_t deviceSpec, + uint32_t which); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_xkb_get_indicator_map_cookie_t +xcb_xkb_get_indicator_map_unchecked (xcb_connection_t *c, + xcb_xkb_device_spec_t deviceSpec, + uint32_t which); + +xcb_xkb_indicator_map_t * +xcb_xkb_get_indicator_map_maps (const xcb_xkb_get_indicator_map_reply_t *R); + +int +xcb_xkb_get_indicator_map_maps_length (const xcb_xkb_get_indicator_map_reply_t *R); + +xcb_xkb_indicator_map_iterator_t +xcb_xkb_get_indicator_map_maps_iterator (const xcb_xkb_get_indicator_map_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_xkb_get_indicator_map_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_xkb_get_indicator_map_reply_t * +xcb_xkb_get_indicator_map_reply (xcb_connection_t *c, + xcb_xkb_get_indicator_map_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_xkb_set_indicator_map_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_xkb_set_indicator_map_checked (xcb_connection_t *c, + xcb_xkb_device_spec_t deviceSpec, + uint32_t which, + const xcb_xkb_indicator_map_t *maps); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_xkb_set_indicator_map (xcb_connection_t *c, + xcb_xkb_device_spec_t deviceSpec, + uint32_t which, + const xcb_xkb_indicator_map_t *maps); + +xcb_xkb_indicator_map_t * +xcb_xkb_set_indicator_map_maps (const xcb_xkb_set_indicator_map_request_t *R); + +int +xcb_xkb_set_indicator_map_maps_length (const xcb_xkb_set_indicator_map_request_t *R); + +xcb_xkb_indicator_map_iterator_t +xcb_xkb_set_indicator_map_maps_iterator (const xcb_xkb_set_indicator_map_request_t *R); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_xkb_get_named_indicator_cookie_t +xcb_xkb_get_named_indicator (xcb_connection_t *c, + xcb_xkb_device_spec_t deviceSpec, + xcb_xkb_led_class_spec_t ledClass, + xcb_xkb_id_spec_t ledID, + xcb_atom_t indicator); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_xkb_get_named_indicator_cookie_t +xcb_xkb_get_named_indicator_unchecked (xcb_connection_t *c, + xcb_xkb_device_spec_t deviceSpec, + xcb_xkb_led_class_spec_t ledClass, + xcb_xkb_id_spec_t ledID, + xcb_atom_t indicator); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_xkb_get_named_indicator_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_xkb_get_named_indicator_reply_t * +xcb_xkb_get_named_indicator_reply (xcb_connection_t *c, + xcb_xkb_get_named_indicator_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_xkb_set_named_indicator_checked (xcb_connection_t *c, + xcb_xkb_device_spec_t deviceSpec, + xcb_xkb_led_class_spec_t ledClass, + xcb_xkb_id_spec_t ledID, + xcb_atom_t indicator, + uint8_t setState, + uint8_t on, + uint8_t setMap, + uint8_t createMap, + uint8_t map_flags, + uint8_t map_whichGroups, + uint8_t map_groups, + uint8_t map_whichMods, + uint8_t map_realMods, + uint16_t map_vmods, + uint32_t map_ctrls); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_xkb_set_named_indicator (xcb_connection_t *c, + xcb_xkb_device_spec_t deviceSpec, + xcb_xkb_led_class_spec_t ledClass, + xcb_xkb_id_spec_t ledID, + xcb_atom_t indicator, + uint8_t setState, + uint8_t on, + uint8_t setMap, + uint8_t createMap, + uint8_t map_flags, + uint8_t map_whichGroups, + uint8_t map_groups, + uint8_t map_whichMods, + uint8_t map_realMods, + uint16_t map_vmods, + uint32_t map_ctrls); + +xcb_atom_t * +xcb_xkb_get_names_value_list_type_names (const xcb_xkb_get_names_value_list_t *S); + +int +xcb_xkb_get_names_value_list_type_names_length (const xcb_xkb_get_names_reply_t *R, + const xcb_xkb_get_names_value_list_t *S); + +xcb_generic_iterator_t +xcb_xkb_get_names_value_list_type_names_end (const xcb_xkb_get_names_reply_t *R, + const xcb_xkb_get_names_value_list_t *S); + +uint8_t * +xcb_xkb_get_names_value_list_n_levels_per_type (const xcb_xkb_get_names_value_list_t *S); + +int +xcb_xkb_get_names_value_list_n_levels_per_type_length (const xcb_xkb_get_names_reply_t *R, + const xcb_xkb_get_names_value_list_t *S); + +xcb_generic_iterator_t +xcb_xkb_get_names_value_list_n_levels_per_type_end (const xcb_xkb_get_names_reply_t *R, + const xcb_xkb_get_names_value_list_t *S); + +xcb_atom_t * +xcb_xkb_get_names_value_list_kt_level_names (const xcb_xkb_get_names_value_list_t *S); + +int +xcb_xkb_get_names_value_list_kt_level_names_length (const xcb_xkb_get_names_reply_t *R, + const xcb_xkb_get_names_value_list_t *S); + +xcb_generic_iterator_t +xcb_xkb_get_names_value_list_kt_level_names_end (const xcb_xkb_get_names_reply_t *R, + const xcb_xkb_get_names_value_list_t *S); + +xcb_atom_t * +xcb_xkb_get_names_value_list_indicator_names (const xcb_xkb_get_names_value_list_t *S); + +int +xcb_xkb_get_names_value_list_indicator_names_length (const xcb_xkb_get_names_reply_t *R, + const xcb_xkb_get_names_value_list_t *S); + +xcb_generic_iterator_t +xcb_xkb_get_names_value_list_indicator_names_end (const xcb_xkb_get_names_reply_t *R, + const xcb_xkb_get_names_value_list_t *S); + +xcb_atom_t * +xcb_xkb_get_names_value_list_virtual_mod_names (const xcb_xkb_get_names_value_list_t *S); + +int +xcb_xkb_get_names_value_list_virtual_mod_names_length (const xcb_xkb_get_names_reply_t *R, + const xcb_xkb_get_names_value_list_t *S); + +xcb_generic_iterator_t +xcb_xkb_get_names_value_list_virtual_mod_names_end (const xcb_xkb_get_names_reply_t *R, + const xcb_xkb_get_names_value_list_t *S); + +xcb_atom_t * +xcb_xkb_get_names_value_list_groups (const xcb_xkb_get_names_value_list_t *S); + +int +xcb_xkb_get_names_value_list_groups_length (const xcb_xkb_get_names_reply_t *R, + const xcb_xkb_get_names_value_list_t *S); + +xcb_generic_iterator_t +xcb_xkb_get_names_value_list_groups_end (const xcb_xkb_get_names_reply_t *R, + const xcb_xkb_get_names_value_list_t *S); + +xcb_xkb_key_name_t * +xcb_xkb_get_names_value_list_key_names (const xcb_xkb_get_names_value_list_t *S); + +int +xcb_xkb_get_names_value_list_key_names_length (const xcb_xkb_get_names_reply_t *R, + const xcb_xkb_get_names_value_list_t *S); + +xcb_xkb_key_name_iterator_t +xcb_xkb_get_names_value_list_key_names_iterator (const xcb_xkb_get_names_reply_t *R, + const xcb_xkb_get_names_value_list_t *S); + +xcb_xkb_key_alias_t * +xcb_xkb_get_names_value_list_key_aliases (const xcb_xkb_get_names_value_list_t *S); + +int +xcb_xkb_get_names_value_list_key_aliases_length (const xcb_xkb_get_names_reply_t *R, + const xcb_xkb_get_names_value_list_t *S); + +xcb_xkb_key_alias_iterator_t +xcb_xkb_get_names_value_list_key_aliases_iterator (const xcb_xkb_get_names_reply_t *R, + const xcb_xkb_get_names_value_list_t *S); + +xcb_atom_t * +xcb_xkb_get_names_value_list_radio_group_names (const xcb_xkb_get_names_value_list_t *S); + +int +xcb_xkb_get_names_value_list_radio_group_names_length (const xcb_xkb_get_names_reply_t *R, + const xcb_xkb_get_names_value_list_t *S); + +xcb_generic_iterator_t +xcb_xkb_get_names_value_list_radio_group_names_end (const xcb_xkb_get_names_reply_t *R, + const xcb_xkb_get_names_value_list_t *S); + +int +xcb_xkb_get_names_value_list_serialize (void **_buffer, + uint8_t nTypes, + uint32_t indicators, + uint16_t virtualMods, + uint8_t groupNames, + uint8_t nKeys, + uint8_t nKeyAliases, + uint8_t nRadioGroups, + uint32_t which, + const xcb_xkb_get_names_value_list_t *_aux); + +int +xcb_xkb_get_names_value_list_unpack (const void *_buffer, + uint8_t nTypes, + uint32_t indicators, + uint16_t virtualMods, + uint8_t groupNames, + uint8_t nKeys, + uint8_t nKeyAliases, + uint8_t nRadioGroups, + uint32_t which, + xcb_xkb_get_names_value_list_t *_aux); + +int +xcb_xkb_get_names_value_list_sizeof (const void *_buffer, + uint8_t nTypes, + uint32_t indicators, + uint16_t virtualMods, + uint8_t groupNames, + uint8_t nKeys, + uint8_t nKeyAliases, + uint8_t nRadioGroups, + uint32_t which); + +int +xcb_xkb_get_names_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_xkb_get_names_cookie_t +xcb_xkb_get_names (xcb_connection_t *c, + xcb_xkb_device_spec_t deviceSpec, + uint32_t which); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_xkb_get_names_cookie_t +xcb_xkb_get_names_unchecked (xcb_connection_t *c, + xcb_xkb_device_spec_t deviceSpec, + uint32_t which); + +void * +xcb_xkb_get_names_value_list (const xcb_xkb_get_names_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_xkb_get_names_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_xkb_get_names_reply_t * +xcb_xkb_get_names_reply (xcb_connection_t *c, + xcb_xkb_get_names_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +xcb_atom_t * +xcb_xkb_set_names_values_type_names (const xcb_xkb_set_names_values_t *S); + +int +xcb_xkb_set_names_values_type_names_length (const xcb_xkb_set_names_request_t *R, + const xcb_xkb_set_names_values_t *S); + +xcb_generic_iterator_t +xcb_xkb_set_names_values_type_names_end (const xcb_xkb_set_names_request_t *R, + const xcb_xkb_set_names_values_t *S); + +uint8_t * +xcb_xkb_set_names_values_n_levels_per_type (const xcb_xkb_set_names_values_t *S); + +int +xcb_xkb_set_names_values_n_levels_per_type_length (const xcb_xkb_set_names_request_t *R, + const xcb_xkb_set_names_values_t *S); + +xcb_generic_iterator_t +xcb_xkb_set_names_values_n_levels_per_type_end (const xcb_xkb_set_names_request_t *R, + const xcb_xkb_set_names_values_t *S); + +xcb_atom_t * +xcb_xkb_set_names_values_kt_level_names (const xcb_xkb_set_names_values_t *S); + +int +xcb_xkb_set_names_values_kt_level_names_length (const xcb_xkb_set_names_request_t *R, + const xcb_xkb_set_names_values_t *S); + +xcb_generic_iterator_t +xcb_xkb_set_names_values_kt_level_names_end (const xcb_xkb_set_names_request_t *R, + const xcb_xkb_set_names_values_t *S); + +xcb_atom_t * +xcb_xkb_set_names_values_indicator_names (const xcb_xkb_set_names_values_t *S); + +int +xcb_xkb_set_names_values_indicator_names_length (const xcb_xkb_set_names_request_t *R, + const xcb_xkb_set_names_values_t *S); + +xcb_generic_iterator_t +xcb_xkb_set_names_values_indicator_names_end (const xcb_xkb_set_names_request_t *R, + const xcb_xkb_set_names_values_t *S); + +xcb_atom_t * +xcb_xkb_set_names_values_virtual_mod_names (const xcb_xkb_set_names_values_t *S); + +int +xcb_xkb_set_names_values_virtual_mod_names_length (const xcb_xkb_set_names_request_t *R, + const xcb_xkb_set_names_values_t *S); + +xcb_generic_iterator_t +xcb_xkb_set_names_values_virtual_mod_names_end (const xcb_xkb_set_names_request_t *R, + const xcb_xkb_set_names_values_t *S); + +xcb_atom_t * +xcb_xkb_set_names_values_groups (const xcb_xkb_set_names_values_t *S); + +int +xcb_xkb_set_names_values_groups_length (const xcb_xkb_set_names_request_t *R, + const xcb_xkb_set_names_values_t *S); + +xcb_generic_iterator_t +xcb_xkb_set_names_values_groups_end (const xcb_xkb_set_names_request_t *R, + const xcb_xkb_set_names_values_t *S); + +xcb_xkb_key_name_t * +xcb_xkb_set_names_values_key_names (const xcb_xkb_set_names_values_t *S); + +int +xcb_xkb_set_names_values_key_names_length (const xcb_xkb_set_names_request_t *R, + const xcb_xkb_set_names_values_t *S); + +xcb_xkb_key_name_iterator_t +xcb_xkb_set_names_values_key_names_iterator (const xcb_xkb_set_names_request_t *R, + const xcb_xkb_set_names_values_t *S); + +xcb_xkb_key_alias_t * +xcb_xkb_set_names_values_key_aliases (const xcb_xkb_set_names_values_t *S); + +int +xcb_xkb_set_names_values_key_aliases_length (const xcb_xkb_set_names_request_t *R, + const xcb_xkb_set_names_values_t *S); + +xcb_xkb_key_alias_iterator_t +xcb_xkb_set_names_values_key_aliases_iterator (const xcb_xkb_set_names_request_t *R, + const xcb_xkb_set_names_values_t *S); + +xcb_atom_t * +xcb_xkb_set_names_values_radio_group_names (const xcb_xkb_set_names_values_t *S); + +int +xcb_xkb_set_names_values_radio_group_names_length (const xcb_xkb_set_names_request_t *R, + const xcb_xkb_set_names_values_t *S); + +xcb_generic_iterator_t +xcb_xkb_set_names_values_radio_group_names_end (const xcb_xkb_set_names_request_t *R, + const xcb_xkb_set_names_values_t *S); + +int +xcb_xkb_set_names_values_serialize (void **_buffer, + uint8_t nTypes, + uint32_t indicators, + uint16_t virtualMods, + uint8_t groupNames, + uint8_t nKeys, + uint8_t nKeyAliases, + uint8_t nRadioGroups, + uint32_t which, + const xcb_xkb_set_names_values_t *_aux); + +int +xcb_xkb_set_names_values_unpack (const void *_buffer, + uint8_t nTypes, + uint32_t indicators, + uint16_t virtualMods, + uint8_t groupNames, + uint8_t nKeys, + uint8_t nKeyAliases, + uint8_t nRadioGroups, + uint32_t which, + xcb_xkb_set_names_values_t *_aux); + +int +xcb_xkb_set_names_values_sizeof (const void *_buffer, + uint8_t nTypes, + uint32_t indicators, + uint16_t virtualMods, + uint8_t groupNames, + uint8_t nKeys, + uint8_t nKeyAliases, + uint8_t nRadioGroups, + uint32_t which); + +int +xcb_xkb_set_names_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_xkb_set_names_checked (xcb_connection_t *c, + xcb_xkb_device_spec_t deviceSpec, + uint16_t virtualMods, + uint32_t which, + uint8_t firstType, + uint8_t nTypes, + uint8_t firstKTLevelt, + uint8_t nKTLevels, + uint32_t indicators, + uint8_t groupNames, + uint8_t nRadioGroups, + xcb_keycode_t firstKey, + uint8_t nKeys, + uint8_t nKeyAliases, + uint16_t totalKTLevelNames, + const void *values); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_xkb_set_names (xcb_connection_t *c, + xcb_xkb_device_spec_t deviceSpec, + uint16_t virtualMods, + uint32_t which, + uint8_t firstType, + uint8_t nTypes, + uint8_t firstKTLevelt, + uint8_t nKTLevels, + uint32_t indicators, + uint8_t groupNames, + uint8_t nRadioGroups, + xcb_keycode_t firstKey, + uint8_t nKeys, + uint8_t nKeyAliases, + uint16_t totalKTLevelNames, + const void *values); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_xkb_set_names_aux_checked (xcb_connection_t *c, + xcb_xkb_device_spec_t deviceSpec, + uint16_t virtualMods, + uint32_t which, + uint8_t firstType, + uint8_t nTypes, + uint8_t firstKTLevelt, + uint8_t nKTLevels, + uint32_t indicators, + uint8_t groupNames, + uint8_t nRadioGroups, + xcb_keycode_t firstKey, + uint8_t nKeys, + uint8_t nKeyAliases, + uint16_t totalKTLevelNames, + const xcb_xkb_set_names_values_t *values); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_xkb_set_names_aux (xcb_connection_t *c, + xcb_xkb_device_spec_t deviceSpec, + uint16_t virtualMods, + uint32_t which, + uint8_t firstType, + uint8_t nTypes, + uint8_t firstKTLevelt, + uint8_t nKTLevels, + uint32_t indicators, + uint8_t groupNames, + uint8_t nRadioGroups, + xcb_keycode_t firstKey, + uint8_t nKeys, + uint8_t nKeyAliases, + uint16_t totalKTLevelNames, + const xcb_xkb_set_names_values_t *values); + +void * +xcb_xkb_set_names_values (const xcb_xkb_set_names_request_t *R); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_xkb_per_client_flags_cookie_t +xcb_xkb_per_client_flags (xcb_connection_t *c, + xcb_xkb_device_spec_t deviceSpec, + uint32_t change, + uint32_t value, + uint32_t ctrlsToChange, + uint32_t autoCtrls, + uint32_t autoCtrlsValues); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_xkb_per_client_flags_cookie_t +xcb_xkb_per_client_flags_unchecked (xcb_connection_t *c, + xcb_xkb_device_spec_t deviceSpec, + uint32_t change, + uint32_t value, + uint32_t ctrlsToChange, + uint32_t autoCtrls, + uint32_t autoCtrlsValues); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_xkb_per_client_flags_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_xkb_per_client_flags_reply_t * +xcb_xkb_per_client_flags_reply (xcb_connection_t *c, + xcb_xkb_per_client_flags_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_xkb_list_components_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_xkb_list_components_cookie_t +xcb_xkb_list_components (xcb_connection_t *c, + xcb_xkb_device_spec_t deviceSpec, + uint16_t maxNames); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_xkb_list_components_cookie_t +xcb_xkb_list_components_unchecked (xcb_connection_t *c, + xcb_xkb_device_spec_t deviceSpec, + uint16_t maxNames); + +int +xcb_xkb_list_components_keymaps_length (const xcb_xkb_list_components_reply_t *R); + +xcb_xkb_listing_iterator_t +xcb_xkb_list_components_keymaps_iterator (const xcb_xkb_list_components_reply_t *R); + +int +xcb_xkb_list_components_keycodes_length (const xcb_xkb_list_components_reply_t *R); + +xcb_xkb_listing_iterator_t +xcb_xkb_list_components_keycodes_iterator (const xcb_xkb_list_components_reply_t *R); + +int +xcb_xkb_list_components_types_length (const xcb_xkb_list_components_reply_t *R); + +xcb_xkb_listing_iterator_t +xcb_xkb_list_components_types_iterator (const xcb_xkb_list_components_reply_t *R); + +int +xcb_xkb_list_components_compat_maps_length (const xcb_xkb_list_components_reply_t *R); + +xcb_xkb_listing_iterator_t +xcb_xkb_list_components_compat_maps_iterator (const xcb_xkb_list_components_reply_t *R); + +int +xcb_xkb_list_components_symbols_length (const xcb_xkb_list_components_reply_t *R); + +xcb_xkb_listing_iterator_t +xcb_xkb_list_components_symbols_iterator (const xcb_xkb_list_components_reply_t *R); + +int +xcb_xkb_list_components_geometries_length (const xcb_xkb_list_components_reply_t *R); + +xcb_xkb_listing_iterator_t +xcb_xkb_list_components_geometries_iterator (const xcb_xkb_list_components_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_xkb_list_components_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_xkb_list_components_reply_t * +xcb_xkb_list_components_reply (xcb_connection_t *c, + xcb_xkb_list_components_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_xkb_get_kbd_by_name_replies_types_map_types_rtrn_length (const xcb_xkb_get_kbd_by_name_reply_t *R, + const xcb_xkb_get_kbd_by_name_replies_t *S); + +xcb_xkb_key_type_iterator_t +xcb_xkb_get_kbd_by_name_replies_types_map_types_rtrn_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R, + const xcb_xkb_get_kbd_by_name_replies_t *S); + +int +xcb_xkb_get_kbd_by_name_replies_types_map_syms_rtrn_length (const xcb_xkb_get_kbd_by_name_reply_t *R, + const xcb_xkb_get_kbd_by_name_replies_t *S); + +xcb_xkb_key_sym_map_iterator_t +xcb_xkb_get_kbd_by_name_replies_types_map_syms_rtrn_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R, + const xcb_xkb_get_kbd_by_name_replies_t *S); + +uint8_t * +xcb_xkb_get_kbd_by_name_replies_types_map_acts_rtrn_count (const xcb_xkb_get_kbd_by_name_replies_t *S); + +int +xcb_xkb_get_kbd_by_name_replies_types_map_acts_rtrn_count_length (const xcb_xkb_get_kbd_by_name_reply_t *R, + const xcb_xkb_get_kbd_by_name_replies_t *S); + +xcb_generic_iterator_t +xcb_xkb_get_kbd_by_name_replies_types_map_acts_rtrn_count_end (const xcb_xkb_get_kbd_by_name_reply_t *R, + const xcb_xkb_get_kbd_by_name_replies_t *S); + +xcb_xkb_action_t * +xcb_xkb_get_kbd_by_name_replies_types_map_acts_rtrn_acts (const xcb_xkb_get_kbd_by_name_replies_t *S); + +int +xcb_xkb_get_kbd_by_name_replies_types_map_acts_rtrn_acts_length (const xcb_xkb_get_kbd_by_name_reply_t *R, + const xcb_xkb_get_kbd_by_name_replies_t *S); + +xcb_xkb_action_iterator_t +xcb_xkb_get_kbd_by_name_replies_types_map_acts_rtrn_acts_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R, + const xcb_xkb_get_kbd_by_name_replies_t *S); + +xcb_xkb_set_behavior_t * +xcb_xkb_get_kbd_by_name_replies_types_map_behaviors_rtrn (const xcb_xkb_get_kbd_by_name_replies_t *S); + +int +xcb_xkb_get_kbd_by_name_replies_types_map_behaviors_rtrn_length (const xcb_xkb_get_kbd_by_name_reply_t *R, + const xcb_xkb_get_kbd_by_name_replies_t *S); + +xcb_xkb_set_behavior_iterator_t +xcb_xkb_get_kbd_by_name_replies_types_map_behaviors_rtrn_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R, + const xcb_xkb_get_kbd_by_name_replies_t *S); + +uint8_t * +xcb_xkb_get_kbd_by_name_replies_types_map_vmods_rtrn (const xcb_xkb_get_kbd_by_name_replies_t *S); + +int +xcb_xkb_get_kbd_by_name_replies_types_map_vmods_rtrn_length (const xcb_xkb_get_kbd_by_name_reply_t *R, + const xcb_xkb_get_kbd_by_name_replies_t *S); + +xcb_generic_iterator_t +xcb_xkb_get_kbd_by_name_replies_types_map_vmods_rtrn_end (const xcb_xkb_get_kbd_by_name_reply_t *R, + const xcb_xkb_get_kbd_by_name_replies_t *S); + +xcb_xkb_set_explicit_t * +xcb_xkb_get_kbd_by_name_replies_types_map_explicit_rtrn (const xcb_xkb_get_kbd_by_name_replies_t *S); + +int +xcb_xkb_get_kbd_by_name_replies_types_map_explicit_rtrn_length (const xcb_xkb_get_kbd_by_name_reply_t *R, + const xcb_xkb_get_kbd_by_name_replies_t *S); + +xcb_xkb_set_explicit_iterator_t +xcb_xkb_get_kbd_by_name_replies_types_map_explicit_rtrn_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R, + const xcb_xkb_get_kbd_by_name_replies_t *S); + +xcb_xkb_key_mod_map_t * +xcb_xkb_get_kbd_by_name_replies_types_map_modmap_rtrn (const xcb_xkb_get_kbd_by_name_replies_t *S); + +int +xcb_xkb_get_kbd_by_name_replies_types_map_modmap_rtrn_length (const xcb_xkb_get_kbd_by_name_reply_t *R, + const xcb_xkb_get_kbd_by_name_replies_t *S); + +xcb_xkb_key_mod_map_iterator_t +xcb_xkb_get_kbd_by_name_replies_types_map_modmap_rtrn_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R, + const xcb_xkb_get_kbd_by_name_replies_t *S); + +xcb_xkb_key_v_mod_map_t * +xcb_xkb_get_kbd_by_name_replies_types_map_vmodmap_rtrn (const xcb_xkb_get_kbd_by_name_replies_t *S); + +int +xcb_xkb_get_kbd_by_name_replies_types_map_vmodmap_rtrn_length (const xcb_xkb_get_kbd_by_name_reply_t *R, + const xcb_xkb_get_kbd_by_name_replies_t *S); + +xcb_xkb_key_v_mod_map_iterator_t +xcb_xkb_get_kbd_by_name_replies_types_map_vmodmap_rtrn_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R, + const xcb_xkb_get_kbd_by_name_replies_t *S); + +int +xcb_xkb_get_kbd_by_name_replies_types_map_serialize (void **_buffer, + uint8_t nTypes, + uint8_t nKeySyms, + uint8_t nKeyActions, + uint16_t totalActions, + uint8_t totalKeyBehaviors, + uint16_t virtualMods, + uint8_t totalKeyExplicit, + uint8_t totalModMapKeys, + uint8_t totalVModMapKeys, + uint16_t present, + const xcb_xkb_get_kbd_by_name_replies_types_map_t *_aux); + +int +xcb_xkb_get_kbd_by_name_replies_types_map_unpack (const void *_buffer, + uint8_t nTypes, + uint8_t nKeySyms, + uint8_t nKeyActions, + uint16_t totalActions, + uint8_t totalKeyBehaviors, + uint16_t virtualMods, + uint8_t totalKeyExplicit, + uint8_t totalModMapKeys, + uint8_t totalVModMapKeys, + uint16_t present, + xcb_xkb_get_kbd_by_name_replies_types_map_t *_aux); + +int +xcb_xkb_get_kbd_by_name_replies_types_map_sizeof (const void *_buffer, + uint8_t nTypes, + uint8_t nKeySyms, + uint8_t nKeyActions, + uint16_t totalActions, + uint8_t totalKeyBehaviors, + uint16_t virtualMods, + uint8_t totalKeyExplicit, + uint8_t totalModMapKeys, + uint8_t totalVModMapKeys, + uint16_t present); + +xcb_atom_t * +xcb_xkb_get_kbd_by_name_replies_key_names_value_list_type_names (const xcb_xkb_get_kbd_by_name_replies_t *S); + +int +xcb_xkb_get_kbd_by_name_replies_key_names_value_list_type_names_length (const xcb_xkb_get_kbd_by_name_reply_t *R, + const xcb_xkb_get_kbd_by_name_replies_t *S); + +xcb_generic_iterator_t +xcb_xkb_get_kbd_by_name_replies_key_names_value_list_type_names_end (const xcb_xkb_get_kbd_by_name_reply_t *R, + const xcb_xkb_get_kbd_by_name_replies_t *S); + +uint8_t * +xcb_xkb_get_kbd_by_name_replies_key_names_value_list_n_levels_per_type (const xcb_xkb_get_kbd_by_name_replies_t *S); + +int +xcb_xkb_get_kbd_by_name_replies_key_names_value_list_n_levels_per_type_length (const xcb_xkb_get_kbd_by_name_reply_t *R, + const xcb_xkb_get_kbd_by_name_replies_t *S); + +xcb_generic_iterator_t +xcb_xkb_get_kbd_by_name_replies_key_names_value_list_n_levels_per_type_end (const xcb_xkb_get_kbd_by_name_reply_t *R, + const xcb_xkb_get_kbd_by_name_replies_t *S); + +xcb_atom_t * +xcb_xkb_get_kbd_by_name_replies_key_names_value_list_kt_level_names (const xcb_xkb_get_kbd_by_name_replies_t *S); + +int +xcb_xkb_get_kbd_by_name_replies_key_names_value_list_kt_level_names_length (const xcb_xkb_get_kbd_by_name_reply_t *R, + const xcb_xkb_get_kbd_by_name_replies_t *S); + +xcb_generic_iterator_t +xcb_xkb_get_kbd_by_name_replies_key_names_value_list_kt_level_names_end (const xcb_xkb_get_kbd_by_name_reply_t *R, + const xcb_xkb_get_kbd_by_name_replies_t *S); + +xcb_atom_t * +xcb_xkb_get_kbd_by_name_replies_key_names_value_list_indicator_names (const xcb_xkb_get_kbd_by_name_replies_t *S); + +int +xcb_xkb_get_kbd_by_name_replies_key_names_value_list_indicator_names_length (const xcb_xkb_get_kbd_by_name_reply_t *R, + const xcb_xkb_get_kbd_by_name_replies_t *S); + +xcb_generic_iterator_t +xcb_xkb_get_kbd_by_name_replies_key_names_value_list_indicator_names_end (const xcb_xkb_get_kbd_by_name_reply_t *R, + const xcb_xkb_get_kbd_by_name_replies_t *S); + +xcb_atom_t * +xcb_xkb_get_kbd_by_name_replies_key_names_value_list_virtual_mod_names (const xcb_xkb_get_kbd_by_name_replies_t *S); + +int +xcb_xkb_get_kbd_by_name_replies_key_names_value_list_virtual_mod_names_length (const xcb_xkb_get_kbd_by_name_reply_t *R, + const xcb_xkb_get_kbd_by_name_replies_t *S); + +xcb_generic_iterator_t +xcb_xkb_get_kbd_by_name_replies_key_names_value_list_virtual_mod_names_end (const xcb_xkb_get_kbd_by_name_reply_t *R, + const xcb_xkb_get_kbd_by_name_replies_t *S); + +xcb_atom_t * +xcb_xkb_get_kbd_by_name_replies_key_names_value_list_groups (const xcb_xkb_get_kbd_by_name_replies_t *S); + +int +xcb_xkb_get_kbd_by_name_replies_key_names_value_list_groups_length (const xcb_xkb_get_kbd_by_name_reply_t *R, + const xcb_xkb_get_kbd_by_name_replies_t *S); + +xcb_generic_iterator_t +xcb_xkb_get_kbd_by_name_replies_key_names_value_list_groups_end (const xcb_xkb_get_kbd_by_name_reply_t *R, + const xcb_xkb_get_kbd_by_name_replies_t *S); + +xcb_xkb_key_name_t * +xcb_xkb_get_kbd_by_name_replies_key_names_value_list_key_names (const xcb_xkb_get_kbd_by_name_replies_t *S); + +int +xcb_xkb_get_kbd_by_name_replies_key_names_value_list_key_names_length (const xcb_xkb_get_kbd_by_name_reply_t *R, + const xcb_xkb_get_kbd_by_name_replies_t *S); + +xcb_xkb_key_name_iterator_t +xcb_xkb_get_kbd_by_name_replies_key_names_value_list_key_names_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R, + const xcb_xkb_get_kbd_by_name_replies_t *S); + +xcb_xkb_key_alias_t * +xcb_xkb_get_kbd_by_name_replies_key_names_value_list_key_aliases (const xcb_xkb_get_kbd_by_name_replies_t *S); + +int +xcb_xkb_get_kbd_by_name_replies_key_names_value_list_key_aliases_length (const xcb_xkb_get_kbd_by_name_reply_t *R, + const xcb_xkb_get_kbd_by_name_replies_t *S); + +xcb_xkb_key_alias_iterator_t +xcb_xkb_get_kbd_by_name_replies_key_names_value_list_key_aliases_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R, + const xcb_xkb_get_kbd_by_name_replies_t *S); + +xcb_atom_t * +xcb_xkb_get_kbd_by_name_replies_key_names_value_list_radio_group_names (const xcb_xkb_get_kbd_by_name_replies_t *S); + +int +xcb_xkb_get_kbd_by_name_replies_key_names_value_list_radio_group_names_length (const xcb_xkb_get_kbd_by_name_reply_t *R, + const xcb_xkb_get_kbd_by_name_replies_t *S); + +xcb_generic_iterator_t +xcb_xkb_get_kbd_by_name_replies_key_names_value_list_radio_group_names_end (const xcb_xkb_get_kbd_by_name_reply_t *R, + const xcb_xkb_get_kbd_by_name_replies_t *S); + +int +xcb_xkb_get_kbd_by_name_replies_key_names_value_list_serialize (void **_buffer, + uint8_t nTypes, + uint32_t indicators, + uint16_t virtualMods, + uint8_t groupNames, + uint8_t nKeys, + uint8_t nKeyAliases, + uint8_t nRadioGroups, + uint32_t which, + const xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t *_aux); + +int +xcb_xkb_get_kbd_by_name_replies_key_names_value_list_unpack (const void *_buffer, + uint8_t nTypes, + uint32_t indicators, + uint16_t virtualMods, + uint8_t groupNames, + uint8_t nKeys, + uint8_t nKeyAliases, + uint8_t nRadioGroups, + uint32_t which, + xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t *_aux); + +int +xcb_xkb_get_kbd_by_name_replies_key_names_value_list_sizeof (const void *_buffer, + uint8_t nTypes, + uint32_t indicators, + uint16_t virtualMods, + uint8_t groupNames, + uint8_t nKeys, + uint8_t nKeyAliases, + uint8_t nRadioGroups, + uint32_t which); + +xcb_xkb_sym_interpret_t * +xcb_xkb_get_kbd_by_name_replies_compat_map_si_rtrn (const xcb_xkb_get_kbd_by_name_replies_t *S); + +int +xcb_xkb_get_kbd_by_name_replies_compat_map_si_rtrn_length (const xcb_xkb_get_kbd_by_name_reply_t *R, + const xcb_xkb_get_kbd_by_name_replies_t *S); + +xcb_xkb_sym_interpret_iterator_t +xcb_xkb_get_kbd_by_name_replies_compat_map_si_rtrn_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R, + const xcb_xkb_get_kbd_by_name_replies_t *S); + +xcb_xkb_mod_def_t * +xcb_xkb_get_kbd_by_name_replies_compat_map_group_rtrn (const xcb_xkb_get_kbd_by_name_replies_t *S); + +int +xcb_xkb_get_kbd_by_name_replies_compat_map_group_rtrn_length (const xcb_xkb_get_kbd_by_name_reply_t *R, + const xcb_xkb_get_kbd_by_name_replies_t *S); + +xcb_xkb_mod_def_iterator_t +xcb_xkb_get_kbd_by_name_replies_compat_map_group_rtrn_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R, + const xcb_xkb_get_kbd_by_name_replies_t *S); + +xcb_xkb_indicator_map_t * +xcb_xkb_get_kbd_by_name_replies_indicator_maps_maps (const xcb_xkb_get_kbd_by_name_replies_t *S); + +int +xcb_xkb_get_kbd_by_name_replies_indicator_maps_maps_length (const xcb_xkb_get_kbd_by_name_reply_t *R, + const xcb_xkb_get_kbd_by_name_replies_t *S); + +xcb_xkb_indicator_map_iterator_t +xcb_xkb_get_kbd_by_name_replies_indicator_maps_maps_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R, + const xcb_xkb_get_kbd_by_name_replies_t *S); + +xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t * +xcb_xkb_get_kbd_by_name_replies_key_names_value_list (const xcb_xkb_get_kbd_by_name_replies_t *R); + +xcb_xkb_counted_string_16_t * +xcb_xkb_get_kbd_by_name_replies_geometry_label_font (const xcb_xkb_get_kbd_by_name_replies_t *R); + +int +xcb_xkb_get_kbd_by_name_replies_serialize (void **_buffer, + uint16_t reported, + const xcb_xkb_get_kbd_by_name_replies_t *_aux); + +int +xcb_xkb_get_kbd_by_name_replies_unpack (const void *_buffer, + uint16_t reported, + xcb_xkb_get_kbd_by_name_replies_t *_aux); + +int +xcb_xkb_get_kbd_by_name_replies_sizeof (const void *_buffer, + uint16_t reported); + +int +xcb_xkb_get_kbd_by_name_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_xkb_get_kbd_by_name_cookie_t +xcb_xkb_get_kbd_by_name (xcb_connection_t *c, + xcb_xkb_device_spec_t deviceSpec, + uint16_t need, + uint16_t want, + uint8_t load); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_xkb_get_kbd_by_name_cookie_t +xcb_xkb_get_kbd_by_name_unchecked (xcb_connection_t *c, + xcb_xkb_device_spec_t deviceSpec, + uint16_t need, + uint16_t want, + uint8_t load); + +void * +xcb_xkb_get_kbd_by_name_replies (const xcb_xkb_get_kbd_by_name_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_xkb_get_kbd_by_name_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_xkb_get_kbd_by_name_reply_t * +xcb_xkb_get_kbd_by_name_reply (xcb_connection_t *c, + xcb_xkb_get_kbd_by_name_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_xkb_get_device_info_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_xkb_get_device_info_cookie_t +xcb_xkb_get_device_info (xcb_connection_t *c, + xcb_xkb_device_spec_t deviceSpec, + uint16_t wanted, + uint8_t allButtons, + uint8_t firstButton, + uint8_t nButtons, + xcb_xkb_led_class_spec_t ledClass, + xcb_xkb_id_spec_t ledID); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_xkb_get_device_info_cookie_t +xcb_xkb_get_device_info_unchecked (xcb_connection_t *c, + xcb_xkb_device_spec_t deviceSpec, + uint16_t wanted, + uint8_t allButtons, + uint8_t firstButton, + uint8_t nButtons, + xcb_xkb_led_class_spec_t ledClass, + xcb_xkb_id_spec_t ledID); + +xcb_xkb_string8_t * +xcb_xkb_get_device_info_name (const xcb_xkb_get_device_info_reply_t *R); + +int +xcb_xkb_get_device_info_name_length (const xcb_xkb_get_device_info_reply_t *R); + +xcb_generic_iterator_t +xcb_xkb_get_device_info_name_end (const xcb_xkb_get_device_info_reply_t *R); + +xcb_xkb_action_t * +xcb_xkb_get_device_info_btn_actions (const xcb_xkb_get_device_info_reply_t *R); + +int +xcb_xkb_get_device_info_btn_actions_length (const xcb_xkb_get_device_info_reply_t *R); + +xcb_xkb_action_iterator_t +xcb_xkb_get_device_info_btn_actions_iterator (const xcb_xkb_get_device_info_reply_t *R); + +int +xcb_xkb_get_device_info_leds_length (const xcb_xkb_get_device_info_reply_t *R); + +xcb_xkb_device_led_info_iterator_t +xcb_xkb_get_device_info_leds_iterator (const xcb_xkb_get_device_info_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_xkb_get_device_info_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_xkb_get_device_info_reply_t * +xcb_xkb_get_device_info_reply (xcb_connection_t *c, + xcb_xkb_get_device_info_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_xkb_set_device_info_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_xkb_set_device_info_checked (xcb_connection_t *c, + xcb_xkb_device_spec_t deviceSpec, + uint8_t firstBtn, + uint8_t nBtns, + uint16_t change, + uint16_t nDeviceLedFBs, + const xcb_xkb_action_t *btnActions, + const xcb_xkb_device_led_info_t *leds); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_xkb_set_device_info (xcb_connection_t *c, + xcb_xkb_device_spec_t deviceSpec, + uint8_t firstBtn, + uint8_t nBtns, + uint16_t change, + uint16_t nDeviceLedFBs, + const xcb_xkb_action_t *btnActions, + const xcb_xkb_device_led_info_t *leds); + +xcb_xkb_action_t * +xcb_xkb_set_device_info_btn_actions (const xcb_xkb_set_device_info_request_t *R); + +int +xcb_xkb_set_device_info_btn_actions_length (const xcb_xkb_set_device_info_request_t *R); + +xcb_xkb_action_iterator_t +xcb_xkb_set_device_info_btn_actions_iterator (const xcb_xkb_set_device_info_request_t *R); + +int +xcb_xkb_set_device_info_leds_length (const xcb_xkb_set_device_info_request_t *R); + +xcb_xkb_device_led_info_iterator_t +xcb_xkb_set_device_info_leds_iterator (const xcb_xkb_set_device_info_request_t *R); + +int +xcb_xkb_set_debugging_flags_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_xkb_set_debugging_flags_cookie_t +xcb_xkb_set_debugging_flags (xcb_connection_t *c, + uint16_t msgLength, + uint32_t affectFlags, + uint32_t flags, + uint32_t affectCtrls, + uint32_t ctrls, + const xcb_xkb_string8_t *message); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_xkb_set_debugging_flags_cookie_t +xcb_xkb_set_debugging_flags_unchecked (xcb_connection_t *c, + uint16_t msgLength, + uint32_t affectFlags, + uint32_t flags, + uint32_t affectCtrls, + uint32_t ctrls, + const xcb_xkb_string8_t *message); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_xkb_set_debugging_flags_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_xkb_set_debugging_flags_reply_t * +xcb_xkb_set_debugging_flags_reply (xcb_connection_t *c, + xcb_xkb_set_debugging_flags_cookie_t cookie /**< */, + xcb_generic_error_t **e); + + +#ifdef __cplusplus +} +#endif + +#endif + +/** + * @} + */ diff --git a/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/include/xcb/xprint.h b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/include/xcb/xprint.h new file mode 100644 index 0000000000000000000000000000000000000000..0825bbcfd7ccc4b75be8686c390f6c6589283ec1 --- /dev/null +++ b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/include/xcb/xprint.h @@ -0,0 +1,1895 @@ +/* + * This file generated automatically from xprint.xml by c_client.py. + * Edit at your peril. + */ + +/** + * @defgroup XCB_XPrint_API XCB XPrint API + * @brief XPrint XCB Protocol Implementation. + * @{ + **/ + +#ifndef __XPRINT_H +#define __XPRINT_H + +#include "xcb.h" +#include "xproto.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#define XCB_XPRINT_MAJOR_VERSION 1 +#define XCB_XPRINT_MINOR_VERSION 0 + +extern xcb_extension_t xcb_x_print_id; + +typedef char xcb_x_print_string8_t; + +/** + * @brief xcb_x_print_string8_iterator_t + **/ +typedef struct xcb_x_print_string8_iterator_t { + xcb_x_print_string8_t *data; + int rem; + int index; +} xcb_x_print_string8_iterator_t; + +/** + * @brief xcb_x_print_printer_t + **/ +typedef struct xcb_x_print_printer_t { + uint32_t nameLen; + uint32_t descLen; +} xcb_x_print_printer_t; + +/** + * @brief xcb_x_print_printer_iterator_t + **/ +typedef struct xcb_x_print_printer_iterator_t { + xcb_x_print_printer_t *data; + int rem; + int index; +} xcb_x_print_printer_iterator_t; + +typedef uint32_t xcb_x_print_pcontext_t; + +/** + * @brief xcb_x_print_pcontext_iterator_t + **/ +typedef struct xcb_x_print_pcontext_iterator_t { + xcb_x_print_pcontext_t *data; + int rem; + int index; +} xcb_x_print_pcontext_iterator_t; + +typedef enum xcb_x_print_get_doc_t { + XCB_X_PRINT_GET_DOC_FINISHED = 0, + XCB_X_PRINT_GET_DOC_SECOND_CONSUMER = 1 +} xcb_x_print_get_doc_t; + +typedef enum xcb_x_print_ev_mask_t { + XCB_X_PRINT_EV_MASK_NO_EVENT_MASK = 0, + XCB_X_PRINT_EV_MASK_PRINT_MASK = 1, + XCB_X_PRINT_EV_MASK_ATTRIBUTE_MASK = 2 +} xcb_x_print_ev_mask_t; + +typedef enum xcb_x_print_detail_t { + XCB_X_PRINT_DETAIL_START_JOB_NOTIFY = 1, + XCB_X_PRINT_DETAIL_END_JOB_NOTIFY = 2, + XCB_X_PRINT_DETAIL_START_DOC_NOTIFY = 3, + XCB_X_PRINT_DETAIL_END_DOC_NOTIFY = 4, + XCB_X_PRINT_DETAIL_START_PAGE_NOTIFY = 5, + XCB_X_PRINT_DETAIL_END_PAGE_NOTIFY = 6 +} xcb_x_print_detail_t; + +typedef enum xcb_x_print_attr_t { + XCB_X_PRINT_ATTR_JOB_ATTR = 1, + XCB_X_PRINT_ATTR_DOC_ATTR = 2, + XCB_X_PRINT_ATTR_PAGE_ATTR = 3, + XCB_X_PRINT_ATTR_PRINTER_ATTR = 4, + XCB_X_PRINT_ATTR_SERVER_ATTR = 5, + XCB_X_PRINT_ATTR_MEDIUM_ATTR = 6, + XCB_X_PRINT_ATTR_SPOOLER_ATTR = 7 +} xcb_x_print_attr_t; + +/** + * @brief xcb_x_print_print_query_version_cookie_t + **/ +typedef struct xcb_x_print_print_query_version_cookie_t { + unsigned int sequence; +} xcb_x_print_print_query_version_cookie_t; + +/** Opcode for xcb_x_print_print_query_version. */ +#define XCB_X_PRINT_PRINT_QUERY_VERSION 0 + +/** + * @brief xcb_x_print_print_query_version_request_t + **/ +typedef struct xcb_x_print_print_query_version_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; +} xcb_x_print_print_query_version_request_t; + +/** + * @brief xcb_x_print_print_query_version_reply_t + **/ +typedef struct xcb_x_print_print_query_version_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint16_t major_version; + uint16_t minor_version; +} xcb_x_print_print_query_version_reply_t; + +/** + * @brief xcb_x_print_print_get_printer_list_cookie_t + **/ +typedef struct xcb_x_print_print_get_printer_list_cookie_t { + unsigned int sequence; +} xcb_x_print_print_get_printer_list_cookie_t; + +/** Opcode for xcb_x_print_print_get_printer_list. */ +#define XCB_X_PRINT_PRINT_GET_PRINTER_LIST 1 + +/** + * @brief xcb_x_print_print_get_printer_list_request_t + **/ +typedef struct xcb_x_print_print_get_printer_list_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + uint32_t printerNameLen; + uint32_t localeLen; +} xcb_x_print_print_get_printer_list_request_t; + +/** + * @brief xcb_x_print_print_get_printer_list_reply_t + **/ +typedef struct xcb_x_print_print_get_printer_list_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint32_t listCount; + uint8_t pad1[20]; +} xcb_x_print_print_get_printer_list_reply_t; + +/** Opcode for xcb_x_print_print_rehash_printer_list. */ +#define XCB_X_PRINT_PRINT_REHASH_PRINTER_LIST 20 + +/** + * @brief xcb_x_print_print_rehash_printer_list_request_t + **/ +typedef struct xcb_x_print_print_rehash_printer_list_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; +} xcb_x_print_print_rehash_printer_list_request_t; + +/** Opcode for xcb_x_print_create_context. */ +#define XCB_X_PRINT_CREATE_CONTEXT 2 + +/** + * @brief xcb_x_print_create_context_request_t + **/ +typedef struct xcb_x_print_create_context_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + uint32_t context_id; + uint32_t printerNameLen; + uint32_t localeLen; +} xcb_x_print_create_context_request_t; + +/** Opcode for xcb_x_print_print_set_context. */ +#define XCB_X_PRINT_PRINT_SET_CONTEXT 3 + +/** + * @brief xcb_x_print_print_set_context_request_t + **/ +typedef struct xcb_x_print_print_set_context_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + uint32_t context; +} xcb_x_print_print_set_context_request_t; + +/** + * @brief xcb_x_print_print_get_context_cookie_t + **/ +typedef struct xcb_x_print_print_get_context_cookie_t { + unsigned int sequence; +} xcb_x_print_print_get_context_cookie_t; + +/** Opcode for xcb_x_print_print_get_context. */ +#define XCB_X_PRINT_PRINT_GET_CONTEXT 4 + +/** + * @brief xcb_x_print_print_get_context_request_t + **/ +typedef struct xcb_x_print_print_get_context_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; +} xcb_x_print_print_get_context_request_t; + +/** + * @brief xcb_x_print_print_get_context_reply_t + **/ +typedef struct xcb_x_print_print_get_context_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint32_t context; +} xcb_x_print_print_get_context_reply_t; + +/** Opcode for xcb_x_print_print_destroy_context. */ +#define XCB_X_PRINT_PRINT_DESTROY_CONTEXT 5 + +/** + * @brief xcb_x_print_print_destroy_context_request_t + **/ +typedef struct xcb_x_print_print_destroy_context_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + uint32_t context; +} xcb_x_print_print_destroy_context_request_t; + +/** + * @brief xcb_x_print_print_get_screen_of_context_cookie_t + **/ +typedef struct xcb_x_print_print_get_screen_of_context_cookie_t { + unsigned int sequence; +} xcb_x_print_print_get_screen_of_context_cookie_t; + +/** Opcode for xcb_x_print_print_get_screen_of_context. */ +#define XCB_X_PRINT_PRINT_GET_SCREEN_OF_CONTEXT 6 + +/** + * @brief xcb_x_print_print_get_screen_of_context_request_t + **/ +typedef struct xcb_x_print_print_get_screen_of_context_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; +} xcb_x_print_print_get_screen_of_context_request_t; + +/** + * @brief xcb_x_print_print_get_screen_of_context_reply_t + **/ +typedef struct xcb_x_print_print_get_screen_of_context_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + xcb_window_t root; +} xcb_x_print_print_get_screen_of_context_reply_t; + +/** Opcode for xcb_x_print_print_start_job. */ +#define XCB_X_PRINT_PRINT_START_JOB 7 + +/** + * @brief xcb_x_print_print_start_job_request_t + **/ +typedef struct xcb_x_print_print_start_job_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + uint8_t output_mode; +} xcb_x_print_print_start_job_request_t; + +/** Opcode for xcb_x_print_print_end_job. */ +#define XCB_X_PRINT_PRINT_END_JOB 8 + +/** + * @brief xcb_x_print_print_end_job_request_t + **/ +typedef struct xcb_x_print_print_end_job_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + uint8_t cancel; +} xcb_x_print_print_end_job_request_t; + +/** Opcode for xcb_x_print_print_start_doc. */ +#define XCB_X_PRINT_PRINT_START_DOC 9 + +/** + * @brief xcb_x_print_print_start_doc_request_t + **/ +typedef struct xcb_x_print_print_start_doc_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + uint8_t driver_mode; +} xcb_x_print_print_start_doc_request_t; + +/** Opcode for xcb_x_print_print_end_doc. */ +#define XCB_X_PRINT_PRINT_END_DOC 10 + +/** + * @brief xcb_x_print_print_end_doc_request_t + **/ +typedef struct xcb_x_print_print_end_doc_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + uint8_t cancel; +} xcb_x_print_print_end_doc_request_t; + +/** Opcode for xcb_x_print_print_put_document_data. */ +#define XCB_X_PRINT_PRINT_PUT_DOCUMENT_DATA 11 + +/** + * @brief xcb_x_print_print_put_document_data_request_t + **/ +typedef struct xcb_x_print_print_put_document_data_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_drawable_t drawable; + uint32_t len_data; + uint16_t len_fmt; + uint16_t len_options; +} xcb_x_print_print_put_document_data_request_t; + +/** + * @brief xcb_x_print_print_get_document_data_cookie_t + **/ +typedef struct xcb_x_print_print_get_document_data_cookie_t { + unsigned int sequence; +} xcb_x_print_print_get_document_data_cookie_t; + +/** Opcode for xcb_x_print_print_get_document_data. */ +#define XCB_X_PRINT_PRINT_GET_DOCUMENT_DATA 12 + +/** + * @brief xcb_x_print_print_get_document_data_request_t + **/ +typedef struct xcb_x_print_print_get_document_data_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_x_print_pcontext_t context; + uint32_t max_bytes; +} xcb_x_print_print_get_document_data_request_t; + +/** + * @brief xcb_x_print_print_get_document_data_reply_t + **/ +typedef struct xcb_x_print_print_get_document_data_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint32_t status_code; + uint32_t finished_flag; + uint32_t dataLen; + uint8_t pad1[12]; +} xcb_x_print_print_get_document_data_reply_t; + +/** Opcode for xcb_x_print_print_start_page. */ +#define XCB_X_PRINT_PRINT_START_PAGE 13 + +/** + * @brief xcb_x_print_print_start_page_request_t + **/ +typedef struct xcb_x_print_print_start_page_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_window_t window; +} xcb_x_print_print_start_page_request_t; + +/** Opcode for xcb_x_print_print_end_page. */ +#define XCB_X_PRINT_PRINT_END_PAGE 14 + +/** + * @brief xcb_x_print_print_end_page_request_t + **/ +typedef struct xcb_x_print_print_end_page_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + uint8_t cancel; + uint8_t pad0[3]; +} xcb_x_print_print_end_page_request_t; + +/** Opcode for xcb_x_print_print_select_input. */ +#define XCB_X_PRINT_PRINT_SELECT_INPUT 15 + +/** + * @brief xcb_x_print_print_select_input_request_t + **/ +typedef struct xcb_x_print_print_select_input_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_x_print_pcontext_t context; + uint32_t event_mask; +} xcb_x_print_print_select_input_request_t; + +/** + * @brief xcb_x_print_print_input_selected_cookie_t + **/ +typedef struct xcb_x_print_print_input_selected_cookie_t { + unsigned int sequence; +} xcb_x_print_print_input_selected_cookie_t; + +/** Opcode for xcb_x_print_print_input_selected. */ +#define XCB_X_PRINT_PRINT_INPUT_SELECTED 16 + +/** + * @brief xcb_x_print_print_input_selected_request_t + **/ +typedef struct xcb_x_print_print_input_selected_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_x_print_pcontext_t context; +} xcb_x_print_print_input_selected_request_t; + +/** + * @brief xcb_x_print_print_input_selected_reply_t + **/ +typedef struct xcb_x_print_print_input_selected_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint32_t event_mask; + uint32_t all_events_mask; +} xcb_x_print_print_input_selected_reply_t; + +/** + * @brief xcb_x_print_print_get_attributes_cookie_t + **/ +typedef struct xcb_x_print_print_get_attributes_cookie_t { + unsigned int sequence; +} xcb_x_print_print_get_attributes_cookie_t; + +/** Opcode for xcb_x_print_print_get_attributes. */ +#define XCB_X_PRINT_PRINT_GET_ATTRIBUTES 17 + +/** + * @brief xcb_x_print_print_get_attributes_request_t + **/ +typedef struct xcb_x_print_print_get_attributes_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_x_print_pcontext_t context; + uint8_t pool; + uint8_t pad0[3]; +} xcb_x_print_print_get_attributes_request_t; + +/** + * @brief xcb_x_print_print_get_attributes_reply_t + **/ +typedef struct xcb_x_print_print_get_attributes_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint32_t stringLen; + uint8_t pad1[20]; +} xcb_x_print_print_get_attributes_reply_t; + +/** + * @brief xcb_x_print_print_get_one_attributes_cookie_t + **/ +typedef struct xcb_x_print_print_get_one_attributes_cookie_t { + unsigned int sequence; +} xcb_x_print_print_get_one_attributes_cookie_t; + +/** Opcode for xcb_x_print_print_get_one_attributes. */ +#define XCB_X_PRINT_PRINT_GET_ONE_ATTRIBUTES 19 + +/** + * @brief xcb_x_print_print_get_one_attributes_request_t + **/ +typedef struct xcb_x_print_print_get_one_attributes_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_x_print_pcontext_t context; + uint32_t nameLen; + uint8_t pool; + uint8_t pad0[3]; +} xcb_x_print_print_get_one_attributes_request_t; + +/** + * @brief xcb_x_print_print_get_one_attributes_reply_t + **/ +typedef struct xcb_x_print_print_get_one_attributes_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint32_t valueLen; + uint8_t pad1[20]; +} xcb_x_print_print_get_one_attributes_reply_t; + +/** Opcode for xcb_x_print_print_set_attributes. */ +#define XCB_X_PRINT_PRINT_SET_ATTRIBUTES 18 + +/** + * @brief xcb_x_print_print_set_attributes_request_t + **/ +typedef struct xcb_x_print_print_set_attributes_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_x_print_pcontext_t context; + uint32_t stringLen; + uint8_t pool; + uint8_t rule; + uint8_t pad0[2]; +} xcb_x_print_print_set_attributes_request_t; + +/** + * @brief xcb_x_print_print_get_page_dimensions_cookie_t + **/ +typedef struct xcb_x_print_print_get_page_dimensions_cookie_t { + unsigned int sequence; +} xcb_x_print_print_get_page_dimensions_cookie_t; + +/** Opcode for xcb_x_print_print_get_page_dimensions. */ +#define XCB_X_PRINT_PRINT_GET_PAGE_DIMENSIONS 21 + +/** + * @brief xcb_x_print_print_get_page_dimensions_request_t + **/ +typedef struct xcb_x_print_print_get_page_dimensions_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_x_print_pcontext_t context; +} xcb_x_print_print_get_page_dimensions_request_t; + +/** + * @brief xcb_x_print_print_get_page_dimensions_reply_t + **/ +typedef struct xcb_x_print_print_get_page_dimensions_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint16_t width; + uint16_t height; + uint16_t offset_x; + uint16_t offset_y; + uint16_t reproducible_width; + uint16_t reproducible_height; +} xcb_x_print_print_get_page_dimensions_reply_t; + +/** + * @brief xcb_x_print_print_query_screens_cookie_t + **/ +typedef struct xcb_x_print_print_query_screens_cookie_t { + unsigned int sequence; +} xcb_x_print_print_query_screens_cookie_t; + +/** Opcode for xcb_x_print_print_query_screens. */ +#define XCB_X_PRINT_PRINT_QUERY_SCREENS 22 + +/** + * @brief xcb_x_print_print_query_screens_request_t + **/ +typedef struct xcb_x_print_print_query_screens_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; +} xcb_x_print_print_query_screens_request_t; + +/** + * @brief xcb_x_print_print_query_screens_reply_t + **/ +typedef struct xcb_x_print_print_query_screens_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint32_t listCount; + uint8_t pad1[20]; +} xcb_x_print_print_query_screens_reply_t; + +/** + * @brief xcb_x_print_print_set_image_resolution_cookie_t + **/ +typedef struct xcb_x_print_print_set_image_resolution_cookie_t { + unsigned int sequence; +} xcb_x_print_print_set_image_resolution_cookie_t; + +/** Opcode for xcb_x_print_print_set_image_resolution. */ +#define XCB_X_PRINT_PRINT_SET_IMAGE_RESOLUTION 23 + +/** + * @brief xcb_x_print_print_set_image_resolution_request_t + **/ +typedef struct xcb_x_print_print_set_image_resolution_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_x_print_pcontext_t context; + uint16_t image_resolution; +} xcb_x_print_print_set_image_resolution_request_t; + +/** + * @brief xcb_x_print_print_set_image_resolution_reply_t + **/ +typedef struct xcb_x_print_print_set_image_resolution_reply_t { + uint8_t response_type; + uint8_t status; + uint16_t sequence; + uint32_t length; + uint16_t previous_resolutions; +} xcb_x_print_print_set_image_resolution_reply_t; + +/** + * @brief xcb_x_print_print_get_image_resolution_cookie_t + **/ +typedef struct xcb_x_print_print_get_image_resolution_cookie_t { + unsigned int sequence; +} xcb_x_print_print_get_image_resolution_cookie_t; + +/** Opcode for xcb_x_print_print_get_image_resolution. */ +#define XCB_X_PRINT_PRINT_GET_IMAGE_RESOLUTION 24 + +/** + * @brief xcb_x_print_print_get_image_resolution_request_t + **/ +typedef struct xcb_x_print_print_get_image_resolution_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_x_print_pcontext_t context; +} xcb_x_print_print_get_image_resolution_request_t; + +/** + * @brief xcb_x_print_print_get_image_resolution_reply_t + **/ +typedef struct xcb_x_print_print_get_image_resolution_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint16_t image_resolution; +} xcb_x_print_print_get_image_resolution_reply_t; + +/** Opcode for xcb_x_print_notify. */ +#define XCB_X_PRINT_NOTIFY 0 + +/** + * @brief xcb_x_print_notify_event_t + **/ +typedef struct xcb_x_print_notify_event_t { + uint8_t response_type; + uint8_t detail; + uint16_t sequence; + xcb_x_print_pcontext_t context; + uint8_t cancel; +} xcb_x_print_notify_event_t; + +/** Opcode for xcb_x_print_attribut_notify. */ +#define XCB_X_PRINT_ATTRIBUT_NOTIFY 1 + +/** + * @brief xcb_x_print_attribut_notify_event_t + **/ +typedef struct xcb_x_print_attribut_notify_event_t { + uint8_t response_type; + uint8_t detail; + uint16_t sequence; + xcb_x_print_pcontext_t context; +} xcb_x_print_attribut_notify_event_t; + +/** Opcode for xcb_x_print_bad_context. */ +#define XCB_X_PRINT_BAD_CONTEXT 0 + +/** + * @brief xcb_x_print_bad_context_error_t + **/ +typedef struct xcb_x_print_bad_context_error_t { + uint8_t response_type; + uint8_t error_code; + uint16_t sequence; + uint32_t bad_value; + uint16_t minor_opcode; + uint8_t major_opcode; +} xcb_x_print_bad_context_error_t; + +/** Opcode for xcb_x_print_bad_sequence. */ +#define XCB_X_PRINT_BAD_SEQUENCE 1 + +/** + * @brief xcb_x_print_bad_sequence_error_t + **/ +typedef struct xcb_x_print_bad_sequence_error_t { + uint8_t response_type; + uint8_t error_code; + uint16_t sequence; + uint32_t bad_value; + uint16_t minor_opcode; + uint8_t major_opcode; +} xcb_x_print_bad_sequence_error_t; + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_x_print_string8_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_x_print_string8_t) + */ +void +xcb_x_print_string8_next (xcb_x_print_string8_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_x_print_string8_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_x_print_string8_end (xcb_x_print_string8_iterator_t i); + +int +xcb_x_print_printer_serialize (void **_buffer, + const xcb_x_print_printer_t *_aux, + const xcb_x_print_string8_t *name, + const xcb_x_print_string8_t *description); + +int +xcb_x_print_printer_unserialize (const void *_buffer, + xcb_x_print_printer_t **_aux); + +int +xcb_x_print_printer_sizeof (const void *_buffer); + +xcb_x_print_string8_t * +xcb_x_print_printer_name (const xcb_x_print_printer_t *R); + +int +xcb_x_print_printer_name_length (const xcb_x_print_printer_t *R); + +xcb_generic_iterator_t +xcb_x_print_printer_name_end (const xcb_x_print_printer_t *R); + +xcb_x_print_string8_t * +xcb_x_print_printer_description (const xcb_x_print_printer_t *R); + +int +xcb_x_print_printer_description_length (const xcb_x_print_printer_t *R); + +xcb_generic_iterator_t +xcb_x_print_printer_description_end (const xcb_x_print_printer_t *R); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_x_print_printer_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_x_print_printer_t) + */ +void +xcb_x_print_printer_next (xcb_x_print_printer_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_x_print_printer_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_x_print_printer_end (xcb_x_print_printer_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_x_print_pcontext_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_x_print_pcontext_t) + */ +void +xcb_x_print_pcontext_next (xcb_x_print_pcontext_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_x_print_pcontext_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_x_print_pcontext_end (xcb_x_print_pcontext_iterator_t i); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_x_print_print_query_version_cookie_t +xcb_x_print_print_query_version (xcb_connection_t *c); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_x_print_print_query_version_cookie_t +xcb_x_print_print_query_version_unchecked (xcb_connection_t *c); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_x_print_print_query_version_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_x_print_print_query_version_reply_t * +xcb_x_print_print_query_version_reply (xcb_connection_t *c, + xcb_x_print_print_query_version_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_x_print_print_get_printer_list_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_x_print_print_get_printer_list_cookie_t +xcb_x_print_print_get_printer_list (xcb_connection_t *c, + uint32_t printerNameLen, + uint32_t localeLen, + const xcb_x_print_string8_t *printer_name, + const xcb_x_print_string8_t *locale); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_x_print_print_get_printer_list_cookie_t +xcb_x_print_print_get_printer_list_unchecked (xcb_connection_t *c, + uint32_t printerNameLen, + uint32_t localeLen, + const xcb_x_print_string8_t *printer_name, + const xcb_x_print_string8_t *locale); + +int +xcb_x_print_print_get_printer_list_printers_length (const xcb_x_print_print_get_printer_list_reply_t *R); + +xcb_x_print_printer_iterator_t +xcb_x_print_print_get_printer_list_printers_iterator (const xcb_x_print_print_get_printer_list_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_x_print_print_get_printer_list_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_x_print_print_get_printer_list_reply_t * +xcb_x_print_print_get_printer_list_reply (xcb_connection_t *c, + xcb_x_print_print_get_printer_list_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_x_print_print_rehash_printer_list_checked (xcb_connection_t *c); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_x_print_print_rehash_printer_list (xcb_connection_t *c); + +int +xcb_x_print_create_context_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_x_print_create_context_checked (xcb_connection_t *c, + uint32_t context_id, + uint32_t printerNameLen, + uint32_t localeLen, + const xcb_x_print_string8_t *printerName, + const xcb_x_print_string8_t *locale); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_x_print_create_context (xcb_connection_t *c, + uint32_t context_id, + uint32_t printerNameLen, + uint32_t localeLen, + const xcb_x_print_string8_t *printerName, + const xcb_x_print_string8_t *locale); + +xcb_x_print_string8_t * +xcb_x_print_create_context_printer_name (const xcb_x_print_create_context_request_t *R); + +int +xcb_x_print_create_context_printer_name_length (const xcb_x_print_create_context_request_t *R); + +xcb_generic_iterator_t +xcb_x_print_create_context_printer_name_end (const xcb_x_print_create_context_request_t *R); + +xcb_x_print_string8_t * +xcb_x_print_create_context_locale (const xcb_x_print_create_context_request_t *R); + +int +xcb_x_print_create_context_locale_length (const xcb_x_print_create_context_request_t *R); + +xcb_generic_iterator_t +xcb_x_print_create_context_locale_end (const xcb_x_print_create_context_request_t *R); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_x_print_print_set_context_checked (xcb_connection_t *c, + uint32_t context); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_x_print_print_set_context (xcb_connection_t *c, + uint32_t context); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_x_print_print_get_context_cookie_t +xcb_x_print_print_get_context (xcb_connection_t *c); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_x_print_print_get_context_cookie_t +xcb_x_print_print_get_context_unchecked (xcb_connection_t *c); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_x_print_print_get_context_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_x_print_print_get_context_reply_t * +xcb_x_print_print_get_context_reply (xcb_connection_t *c, + xcb_x_print_print_get_context_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_x_print_print_destroy_context_checked (xcb_connection_t *c, + uint32_t context); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_x_print_print_destroy_context (xcb_connection_t *c, + uint32_t context); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_x_print_print_get_screen_of_context_cookie_t +xcb_x_print_print_get_screen_of_context (xcb_connection_t *c); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_x_print_print_get_screen_of_context_cookie_t +xcb_x_print_print_get_screen_of_context_unchecked (xcb_connection_t *c); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_x_print_print_get_screen_of_context_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_x_print_print_get_screen_of_context_reply_t * +xcb_x_print_print_get_screen_of_context_reply (xcb_connection_t *c, + xcb_x_print_print_get_screen_of_context_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_x_print_print_start_job_checked (xcb_connection_t *c, + uint8_t output_mode); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_x_print_print_start_job (xcb_connection_t *c, + uint8_t output_mode); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_x_print_print_end_job_checked (xcb_connection_t *c, + uint8_t cancel); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_x_print_print_end_job (xcb_connection_t *c, + uint8_t cancel); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_x_print_print_start_doc_checked (xcb_connection_t *c, + uint8_t driver_mode); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_x_print_print_start_doc (xcb_connection_t *c, + uint8_t driver_mode); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_x_print_print_end_doc_checked (xcb_connection_t *c, + uint8_t cancel); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_x_print_print_end_doc (xcb_connection_t *c, + uint8_t cancel); + +int +xcb_x_print_print_put_document_data_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_x_print_print_put_document_data_checked (xcb_connection_t *c, + xcb_drawable_t drawable, + uint32_t len_data, + uint16_t len_fmt, + uint16_t len_options, + const uint8_t *data, + const xcb_x_print_string8_t *doc_format, + const xcb_x_print_string8_t *options); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_x_print_print_put_document_data (xcb_connection_t *c, + xcb_drawable_t drawable, + uint32_t len_data, + uint16_t len_fmt, + uint16_t len_options, + const uint8_t *data, + const xcb_x_print_string8_t *doc_format, + const xcb_x_print_string8_t *options); + +uint8_t * +xcb_x_print_print_put_document_data_data (const xcb_x_print_print_put_document_data_request_t *R); + +int +xcb_x_print_print_put_document_data_data_length (const xcb_x_print_print_put_document_data_request_t *R); + +xcb_generic_iterator_t +xcb_x_print_print_put_document_data_data_end (const xcb_x_print_print_put_document_data_request_t *R); + +xcb_x_print_string8_t * +xcb_x_print_print_put_document_data_doc_format (const xcb_x_print_print_put_document_data_request_t *R); + +int +xcb_x_print_print_put_document_data_doc_format_length (const xcb_x_print_print_put_document_data_request_t *R); + +xcb_generic_iterator_t +xcb_x_print_print_put_document_data_doc_format_end (const xcb_x_print_print_put_document_data_request_t *R); + +xcb_x_print_string8_t * +xcb_x_print_print_put_document_data_options (const xcb_x_print_print_put_document_data_request_t *R); + +int +xcb_x_print_print_put_document_data_options_length (const xcb_x_print_print_put_document_data_request_t *R); + +xcb_generic_iterator_t +xcb_x_print_print_put_document_data_options_end (const xcb_x_print_print_put_document_data_request_t *R); + +int +xcb_x_print_print_get_document_data_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_x_print_print_get_document_data_cookie_t +xcb_x_print_print_get_document_data (xcb_connection_t *c, + xcb_x_print_pcontext_t context, + uint32_t max_bytes); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_x_print_print_get_document_data_cookie_t +xcb_x_print_print_get_document_data_unchecked (xcb_connection_t *c, + xcb_x_print_pcontext_t context, + uint32_t max_bytes); + +uint8_t * +xcb_x_print_print_get_document_data_data (const xcb_x_print_print_get_document_data_reply_t *R); + +int +xcb_x_print_print_get_document_data_data_length (const xcb_x_print_print_get_document_data_reply_t *R); + +xcb_generic_iterator_t +xcb_x_print_print_get_document_data_data_end (const xcb_x_print_print_get_document_data_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_x_print_print_get_document_data_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_x_print_print_get_document_data_reply_t * +xcb_x_print_print_get_document_data_reply (xcb_connection_t *c, + xcb_x_print_print_get_document_data_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_x_print_print_start_page_checked (xcb_connection_t *c, + xcb_window_t window); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_x_print_print_start_page (xcb_connection_t *c, + xcb_window_t window); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_x_print_print_end_page_checked (xcb_connection_t *c, + uint8_t cancel); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_x_print_print_end_page (xcb_connection_t *c, + uint8_t cancel); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_x_print_print_select_input_checked (xcb_connection_t *c, + xcb_x_print_pcontext_t context, + uint32_t event_mask); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_x_print_print_select_input (xcb_connection_t *c, + xcb_x_print_pcontext_t context, + uint32_t event_mask); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_x_print_print_input_selected_cookie_t +xcb_x_print_print_input_selected (xcb_connection_t *c, + xcb_x_print_pcontext_t context); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_x_print_print_input_selected_cookie_t +xcb_x_print_print_input_selected_unchecked (xcb_connection_t *c, + xcb_x_print_pcontext_t context); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_x_print_print_input_selected_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_x_print_print_input_selected_reply_t * +xcb_x_print_print_input_selected_reply (xcb_connection_t *c, + xcb_x_print_print_input_selected_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_x_print_print_get_attributes_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_x_print_print_get_attributes_cookie_t +xcb_x_print_print_get_attributes (xcb_connection_t *c, + xcb_x_print_pcontext_t context, + uint8_t pool); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_x_print_print_get_attributes_cookie_t +xcb_x_print_print_get_attributes_unchecked (xcb_connection_t *c, + xcb_x_print_pcontext_t context, + uint8_t pool); + +xcb_x_print_string8_t * +xcb_x_print_print_get_attributes_attributes (const xcb_x_print_print_get_attributes_reply_t *R); + +int +xcb_x_print_print_get_attributes_attributes_length (const xcb_x_print_print_get_attributes_reply_t *R); + +xcb_generic_iterator_t +xcb_x_print_print_get_attributes_attributes_end (const xcb_x_print_print_get_attributes_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_x_print_print_get_attributes_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_x_print_print_get_attributes_reply_t * +xcb_x_print_print_get_attributes_reply (xcb_connection_t *c, + xcb_x_print_print_get_attributes_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_x_print_print_get_one_attributes_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_x_print_print_get_one_attributes_cookie_t +xcb_x_print_print_get_one_attributes (xcb_connection_t *c, + xcb_x_print_pcontext_t context, + uint32_t nameLen, + uint8_t pool, + const xcb_x_print_string8_t *name); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_x_print_print_get_one_attributes_cookie_t +xcb_x_print_print_get_one_attributes_unchecked (xcb_connection_t *c, + xcb_x_print_pcontext_t context, + uint32_t nameLen, + uint8_t pool, + const xcb_x_print_string8_t *name); + +xcb_x_print_string8_t * +xcb_x_print_print_get_one_attributes_value (const xcb_x_print_print_get_one_attributes_reply_t *R); + +int +xcb_x_print_print_get_one_attributes_value_length (const xcb_x_print_print_get_one_attributes_reply_t *R); + +xcb_generic_iterator_t +xcb_x_print_print_get_one_attributes_value_end (const xcb_x_print_print_get_one_attributes_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_x_print_print_get_one_attributes_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_x_print_print_get_one_attributes_reply_t * +xcb_x_print_print_get_one_attributes_reply (xcb_connection_t *c, + xcb_x_print_print_get_one_attributes_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_x_print_print_set_attributes_sizeof (const void *_buffer, + uint32_t attributes_len); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_x_print_print_set_attributes_checked (xcb_connection_t *c, + xcb_x_print_pcontext_t context, + uint32_t stringLen, + uint8_t pool, + uint8_t rule, + uint32_t attributes_len, + const xcb_x_print_string8_t *attributes); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_x_print_print_set_attributes (xcb_connection_t *c, + xcb_x_print_pcontext_t context, + uint32_t stringLen, + uint8_t pool, + uint8_t rule, + uint32_t attributes_len, + const xcb_x_print_string8_t *attributes); + +xcb_x_print_string8_t * +xcb_x_print_print_set_attributes_attributes (const xcb_x_print_print_set_attributes_request_t *R); + +int +xcb_x_print_print_set_attributes_attributes_length (const xcb_x_print_print_set_attributes_request_t *R); + +xcb_generic_iterator_t +xcb_x_print_print_set_attributes_attributes_end (const xcb_x_print_print_set_attributes_request_t *R); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_x_print_print_get_page_dimensions_cookie_t +xcb_x_print_print_get_page_dimensions (xcb_connection_t *c, + xcb_x_print_pcontext_t context); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_x_print_print_get_page_dimensions_cookie_t +xcb_x_print_print_get_page_dimensions_unchecked (xcb_connection_t *c, + xcb_x_print_pcontext_t context); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_x_print_print_get_page_dimensions_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_x_print_print_get_page_dimensions_reply_t * +xcb_x_print_print_get_page_dimensions_reply (xcb_connection_t *c, + xcb_x_print_print_get_page_dimensions_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_x_print_print_query_screens_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_x_print_print_query_screens_cookie_t +xcb_x_print_print_query_screens (xcb_connection_t *c); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_x_print_print_query_screens_cookie_t +xcb_x_print_print_query_screens_unchecked (xcb_connection_t *c); + +xcb_window_t * +xcb_x_print_print_query_screens_roots (const xcb_x_print_print_query_screens_reply_t *R); + +int +xcb_x_print_print_query_screens_roots_length (const xcb_x_print_print_query_screens_reply_t *R); + +xcb_generic_iterator_t +xcb_x_print_print_query_screens_roots_end (const xcb_x_print_print_query_screens_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_x_print_print_query_screens_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_x_print_print_query_screens_reply_t * +xcb_x_print_print_query_screens_reply (xcb_connection_t *c, + xcb_x_print_print_query_screens_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_x_print_print_set_image_resolution_cookie_t +xcb_x_print_print_set_image_resolution (xcb_connection_t *c, + xcb_x_print_pcontext_t context, + uint16_t image_resolution); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_x_print_print_set_image_resolution_cookie_t +xcb_x_print_print_set_image_resolution_unchecked (xcb_connection_t *c, + xcb_x_print_pcontext_t context, + uint16_t image_resolution); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_x_print_print_set_image_resolution_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_x_print_print_set_image_resolution_reply_t * +xcb_x_print_print_set_image_resolution_reply (xcb_connection_t *c, + xcb_x_print_print_set_image_resolution_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_x_print_print_get_image_resolution_cookie_t +xcb_x_print_print_get_image_resolution (xcb_connection_t *c, + xcb_x_print_pcontext_t context); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_x_print_print_get_image_resolution_cookie_t +xcb_x_print_print_get_image_resolution_unchecked (xcb_connection_t *c, + xcb_x_print_pcontext_t context); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_x_print_print_get_image_resolution_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_x_print_print_get_image_resolution_reply_t * +xcb_x_print_print_get_image_resolution_reply (xcb_connection_t *c, + xcb_x_print_print_get_image_resolution_cookie_t cookie /**< */, + xcb_generic_error_t **e); + + +#ifdef __cplusplus +} +#endif + +#endif + +/** + * @} + */ diff --git a/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/include/xcb/xproto.h b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/include/xcb/xproto.h new file mode 100644 index 0000000000000000000000000000000000000000..4d87b72e5c7f9f1e1c8b602396a7945459dec568 --- /dev/null +++ b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/include/xcb/xproto.h @@ -0,0 +1,12696 @@ +/* + * This file generated automatically from xproto.xml by c_client.py. + * Edit at your peril. + */ + +/** + * @defgroup XCB__API XCB API + * @brief XCB Protocol Implementation. + * @{ + **/ + +#ifndef __XPROTO_H +#define __XPROTO_H + +#include "xcb.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @brief xcb_char2b_t + **/ +typedef struct xcb_char2b_t { + uint8_t byte1; + uint8_t byte2; +} xcb_char2b_t; + +/** + * @brief xcb_char2b_iterator_t + **/ +typedef struct xcb_char2b_iterator_t { + xcb_char2b_t *data; + int rem; + int index; +} xcb_char2b_iterator_t; + +typedef uint32_t xcb_window_t; + +/** + * @brief xcb_window_iterator_t + **/ +typedef struct xcb_window_iterator_t { + xcb_window_t *data; + int rem; + int index; +} xcb_window_iterator_t; + +typedef uint32_t xcb_pixmap_t; + +/** + * @brief xcb_pixmap_iterator_t + **/ +typedef struct xcb_pixmap_iterator_t { + xcb_pixmap_t *data; + int rem; + int index; +} xcb_pixmap_iterator_t; + +typedef uint32_t xcb_cursor_t; + +/** + * @brief xcb_cursor_iterator_t + **/ +typedef struct xcb_cursor_iterator_t { + xcb_cursor_t *data; + int rem; + int index; +} xcb_cursor_iterator_t; + +typedef uint32_t xcb_font_t; + +/** + * @brief xcb_font_iterator_t + **/ +typedef struct xcb_font_iterator_t { + xcb_font_t *data; + int rem; + int index; +} xcb_font_iterator_t; + +typedef uint32_t xcb_gcontext_t; + +/** + * @brief xcb_gcontext_iterator_t + **/ +typedef struct xcb_gcontext_iterator_t { + xcb_gcontext_t *data; + int rem; + int index; +} xcb_gcontext_iterator_t; + +typedef uint32_t xcb_colormap_t; + +/** + * @brief xcb_colormap_iterator_t + **/ +typedef struct xcb_colormap_iterator_t { + xcb_colormap_t *data; + int rem; + int index; +} xcb_colormap_iterator_t; + +typedef uint32_t xcb_atom_t; + +/** + * @brief xcb_atom_iterator_t + **/ +typedef struct xcb_atom_iterator_t { + xcb_atom_t *data; + int rem; + int index; +} xcb_atom_iterator_t; + +typedef uint32_t xcb_drawable_t; + +/** + * @brief xcb_drawable_iterator_t + **/ +typedef struct xcb_drawable_iterator_t { + xcb_drawable_t *data; + int rem; + int index; +} xcb_drawable_iterator_t; + +typedef uint32_t xcb_fontable_t; + +/** + * @brief xcb_fontable_iterator_t + **/ +typedef struct xcb_fontable_iterator_t { + xcb_fontable_t *data; + int rem; + int index; +} xcb_fontable_iterator_t; + +typedef uint32_t xcb_bool32_t; + +/** + * @brief xcb_bool32_iterator_t + **/ +typedef struct xcb_bool32_iterator_t { + xcb_bool32_t *data; + int rem; + int index; +} xcb_bool32_iterator_t; + +typedef uint32_t xcb_visualid_t; + +/** + * @brief xcb_visualid_iterator_t + **/ +typedef struct xcb_visualid_iterator_t { + xcb_visualid_t *data; + int rem; + int index; +} xcb_visualid_iterator_t; + +typedef uint32_t xcb_timestamp_t; + +/** + * @brief xcb_timestamp_iterator_t + **/ +typedef struct xcb_timestamp_iterator_t { + xcb_timestamp_t *data; + int rem; + int index; +} xcb_timestamp_iterator_t; + +typedef uint32_t xcb_keysym_t; + +/** + * @brief xcb_keysym_iterator_t + **/ +typedef struct xcb_keysym_iterator_t { + xcb_keysym_t *data; + int rem; + int index; +} xcb_keysym_iterator_t; + +typedef uint8_t xcb_keycode_t; + +/** + * @brief xcb_keycode_iterator_t + **/ +typedef struct xcb_keycode_iterator_t { + xcb_keycode_t *data; + int rem; + int index; +} xcb_keycode_iterator_t; + +typedef uint32_t xcb_keycode32_t; + +/** + * @brief xcb_keycode32_iterator_t + **/ +typedef struct xcb_keycode32_iterator_t { + xcb_keycode32_t *data; + int rem; + int index; +} xcb_keycode32_iterator_t; + +typedef uint8_t xcb_button_t; + +/** + * @brief xcb_button_iterator_t + **/ +typedef struct xcb_button_iterator_t { + xcb_button_t *data; + int rem; + int index; +} xcb_button_iterator_t; + +/** + * @brief xcb_point_t + **/ +typedef struct xcb_point_t { + int16_t x; + int16_t y; +} xcb_point_t; + +/** + * @brief xcb_point_iterator_t + **/ +typedef struct xcb_point_iterator_t { + xcb_point_t *data; + int rem; + int index; +} xcb_point_iterator_t; + +/** + * @brief xcb_rectangle_t + **/ +typedef struct xcb_rectangle_t { + int16_t x; + int16_t y; + uint16_t width; + uint16_t height; +} xcb_rectangle_t; + +/** + * @brief xcb_rectangle_iterator_t + **/ +typedef struct xcb_rectangle_iterator_t { + xcb_rectangle_t *data; + int rem; + int index; +} xcb_rectangle_iterator_t; + +/** + * @brief xcb_arc_t + **/ +typedef struct xcb_arc_t { + int16_t x; + int16_t y; + uint16_t width; + uint16_t height; + int16_t angle1; + int16_t angle2; +} xcb_arc_t; + +/** + * @brief xcb_arc_iterator_t + **/ +typedef struct xcb_arc_iterator_t { + xcb_arc_t *data; + int rem; + int index; +} xcb_arc_iterator_t; + +/** + * @brief xcb_format_t + **/ +typedef struct xcb_format_t { + uint8_t depth; + uint8_t bits_per_pixel; + uint8_t scanline_pad; + uint8_t pad0[5]; +} xcb_format_t; + +/** + * @brief xcb_format_iterator_t + **/ +typedef struct xcb_format_iterator_t { + xcb_format_t *data; + int rem; + int index; +} xcb_format_iterator_t; + +typedef enum xcb_visual_class_t { + XCB_VISUAL_CLASS_STATIC_GRAY = 0, + XCB_VISUAL_CLASS_GRAY_SCALE = 1, + XCB_VISUAL_CLASS_STATIC_COLOR = 2, + XCB_VISUAL_CLASS_PSEUDO_COLOR = 3, + XCB_VISUAL_CLASS_TRUE_COLOR = 4, + XCB_VISUAL_CLASS_DIRECT_COLOR = 5 +} xcb_visual_class_t; + +/** + * @brief xcb_visualtype_t + **/ +typedef struct xcb_visualtype_t { + xcb_visualid_t visual_id; + uint8_t _class; + uint8_t bits_per_rgb_value; + uint16_t colormap_entries; + uint32_t red_mask; + uint32_t green_mask; + uint32_t blue_mask; + uint8_t pad0[4]; +} xcb_visualtype_t; + +/** + * @brief xcb_visualtype_iterator_t + **/ +typedef struct xcb_visualtype_iterator_t { + xcb_visualtype_t *data; + int rem; + int index; +} xcb_visualtype_iterator_t; + +/** + * @brief xcb_depth_t + **/ +typedef struct xcb_depth_t { + uint8_t depth; + uint8_t pad0; + uint16_t visuals_len; + uint8_t pad1[4]; +} xcb_depth_t; + +/** + * @brief xcb_depth_iterator_t + **/ +typedef struct xcb_depth_iterator_t { + xcb_depth_t *data; + int rem; + int index; +} xcb_depth_iterator_t; + +typedef enum xcb_event_mask_t { + XCB_EVENT_MASK_NO_EVENT = 0, + XCB_EVENT_MASK_KEY_PRESS = 1, + XCB_EVENT_MASK_KEY_RELEASE = 2, + XCB_EVENT_MASK_BUTTON_PRESS = 4, + XCB_EVENT_MASK_BUTTON_RELEASE = 8, + XCB_EVENT_MASK_ENTER_WINDOW = 16, + XCB_EVENT_MASK_LEAVE_WINDOW = 32, + XCB_EVENT_MASK_POINTER_MOTION = 64, + XCB_EVENT_MASK_POINTER_MOTION_HINT = 128, + XCB_EVENT_MASK_BUTTON_1_MOTION = 256, + XCB_EVENT_MASK_BUTTON_2_MOTION = 512, + XCB_EVENT_MASK_BUTTON_3_MOTION = 1024, + XCB_EVENT_MASK_BUTTON_4_MOTION = 2048, + XCB_EVENT_MASK_BUTTON_5_MOTION = 4096, + XCB_EVENT_MASK_BUTTON_MOTION = 8192, + XCB_EVENT_MASK_KEYMAP_STATE = 16384, + XCB_EVENT_MASK_EXPOSURE = 32768, + XCB_EVENT_MASK_VISIBILITY_CHANGE = 65536, + XCB_EVENT_MASK_STRUCTURE_NOTIFY = 131072, + XCB_EVENT_MASK_RESIZE_REDIRECT = 262144, + XCB_EVENT_MASK_SUBSTRUCTURE_NOTIFY = 524288, + XCB_EVENT_MASK_SUBSTRUCTURE_REDIRECT = 1048576, + XCB_EVENT_MASK_FOCUS_CHANGE = 2097152, + XCB_EVENT_MASK_PROPERTY_CHANGE = 4194304, + XCB_EVENT_MASK_COLOR_MAP_CHANGE = 8388608, + XCB_EVENT_MASK_OWNER_GRAB_BUTTON = 16777216 +} xcb_event_mask_t; + +typedef enum xcb_backing_store_t { + XCB_BACKING_STORE_NOT_USEFUL = 0, + XCB_BACKING_STORE_WHEN_MAPPED = 1, + XCB_BACKING_STORE_ALWAYS = 2 +} xcb_backing_store_t; + +/** + * @brief xcb_screen_t + **/ +typedef struct xcb_screen_t { + xcb_window_t root; + xcb_colormap_t default_colormap; + uint32_t white_pixel; + uint32_t black_pixel; + uint32_t current_input_masks; + uint16_t width_in_pixels; + uint16_t height_in_pixels; + uint16_t width_in_millimeters; + uint16_t height_in_millimeters; + uint16_t min_installed_maps; + uint16_t max_installed_maps; + xcb_visualid_t root_visual; + uint8_t backing_stores; + uint8_t save_unders; + uint8_t root_depth; + uint8_t allowed_depths_len; +} xcb_screen_t; + +/** + * @brief xcb_screen_iterator_t + **/ +typedef struct xcb_screen_iterator_t { + xcb_screen_t *data; + int rem; + int index; +} xcb_screen_iterator_t; + +/** + * @brief xcb_setup_request_t + **/ +typedef struct xcb_setup_request_t { + uint8_t byte_order; + uint8_t pad0; + uint16_t protocol_major_version; + uint16_t protocol_minor_version; + uint16_t authorization_protocol_name_len; + uint16_t authorization_protocol_data_len; + uint8_t pad1[2]; +} xcb_setup_request_t; + +/** + * @brief xcb_setup_request_iterator_t + **/ +typedef struct xcb_setup_request_iterator_t { + xcb_setup_request_t *data; + int rem; + int index; +} xcb_setup_request_iterator_t; + +/** + * @brief xcb_setup_failed_t + **/ +typedef struct xcb_setup_failed_t { + uint8_t status; + uint8_t reason_len; + uint16_t protocol_major_version; + uint16_t protocol_minor_version; + uint16_t length; +} xcb_setup_failed_t; + +/** + * @brief xcb_setup_failed_iterator_t + **/ +typedef struct xcb_setup_failed_iterator_t { + xcb_setup_failed_t *data; + int rem; + int index; +} xcb_setup_failed_iterator_t; + +/** + * @brief xcb_setup_authenticate_t + **/ +typedef struct xcb_setup_authenticate_t { + uint8_t status; + uint8_t pad0[5]; + uint16_t length; +} xcb_setup_authenticate_t; + +/** + * @brief xcb_setup_authenticate_iterator_t + **/ +typedef struct xcb_setup_authenticate_iterator_t { + xcb_setup_authenticate_t *data; + int rem; + int index; +} xcb_setup_authenticate_iterator_t; + +typedef enum xcb_image_order_t { + XCB_IMAGE_ORDER_LSB_FIRST = 0, + XCB_IMAGE_ORDER_MSB_FIRST = 1 +} xcb_image_order_t; + +/** + * @brief xcb_setup_t + **/ +typedef struct xcb_setup_t { + uint8_t status; + uint8_t pad0; + uint16_t protocol_major_version; + uint16_t protocol_minor_version; + uint16_t length; + uint32_t release_number; + uint32_t resource_id_base; + uint32_t resource_id_mask; + uint32_t motion_buffer_size; + uint16_t vendor_len; + uint16_t maximum_request_length; + uint8_t roots_len; + uint8_t pixmap_formats_len; + uint8_t image_byte_order; + uint8_t bitmap_format_bit_order; + uint8_t bitmap_format_scanline_unit; + uint8_t bitmap_format_scanline_pad; + xcb_keycode_t min_keycode; + xcb_keycode_t max_keycode; + uint8_t pad1[4]; +} xcb_setup_t; + +/** + * @brief xcb_setup_iterator_t + **/ +typedef struct xcb_setup_iterator_t { + xcb_setup_t *data; + int rem; + int index; +} xcb_setup_iterator_t; + +typedef enum xcb_mod_mask_t { + XCB_MOD_MASK_SHIFT = 1, + XCB_MOD_MASK_LOCK = 2, + XCB_MOD_MASK_CONTROL = 4, + XCB_MOD_MASK_1 = 8, + XCB_MOD_MASK_2 = 16, + XCB_MOD_MASK_3 = 32, + XCB_MOD_MASK_4 = 64, + XCB_MOD_MASK_5 = 128, + XCB_MOD_MASK_ANY = 32768 +} xcb_mod_mask_t; + +typedef enum xcb_key_but_mask_t { + XCB_KEY_BUT_MASK_SHIFT = 1, + XCB_KEY_BUT_MASK_LOCK = 2, + XCB_KEY_BUT_MASK_CONTROL = 4, + XCB_KEY_BUT_MASK_MOD_1 = 8, + XCB_KEY_BUT_MASK_MOD_2 = 16, + XCB_KEY_BUT_MASK_MOD_3 = 32, + XCB_KEY_BUT_MASK_MOD_4 = 64, + XCB_KEY_BUT_MASK_MOD_5 = 128, + XCB_KEY_BUT_MASK_BUTTON_1 = 256, + XCB_KEY_BUT_MASK_BUTTON_2 = 512, + XCB_KEY_BUT_MASK_BUTTON_3 = 1024, + XCB_KEY_BUT_MASK_BUTTON_4 = 2048, + XCB_KEY_BUT_MASK_BUTTON_5 = 4096 +} xcb_key_but_mask_t; + +typedef enum xcb_window_enum_t { + XCB_WINDOW_NONE = 0 +} xcb_window_enum_t; + +/** Opcode for xcb_key_press. */ +#define XCB_KEY_PRESS 2 + +/** + * @brief xcb_key_press_event_t + **/ +typedef struct xcb_key_press_event_t { + uint8_t response_type; + xcb_keycode_t detail; + uint16_t sequence; + xcb_timestamp_t time; + xcb_window_t root; + xcb_window_t event; + xcb_window_t child; + int16_t root_x; + int16_t root_y; + int16_t event_x; + int16_t event_y; + uint16_t state; + uint8_t same_screen; + uint8_t pad0; +} xcb_key_press_event_t; + +/** Opcode for xcb_key_release. */ +#define XCB_KEY_RELEASE 3 + +typedef xcb_key_press_event_t xcb_key_release_event_t; + +typedef enum xcb_button_mask_t { + XCB_BUTTON_MASK_1 = 256, + XCB_BUTTON_MASK_2 = 512, + XCB_BUTTON_MASK_3 = 1024, + XCB_BUTTON_MASK_4 = 2048, + XCB_BUTTON_MASK_5 = 4096, + XCB_BUTTON_MASK_ANY = 32768 +} xcb_button_mask_t; + +/** Opcode for xcb_button_press. */ +#define XCB_BUTTON_PRESS 4 + +/** + * @brief xcb_button_press_event_t + **/ +typedef struct xcb_button_press_event_t { + uint8_t response_type; + xcb_button_t detail; + uint16_t sequence; + xcb_timestamp_t time; + xcb_window_t root; + xcb_window_t event; + xcb_window_t child; + int16_t root_x; + int16_t root_y; + int16_t event_x; + int16_t event_y; + uint16_t state; + uint8_t same_screen; + uint8_t pad0; +} xcb_button_press_event_t; + +/** Opcode for xcb_button_release. */ +#define XCB_BUTTON_RELEASE 5 + +typedef xcb_button_press_event_t xcb_button_release_event_t; + +typedef enum xcb_motion_t { + XCB_MOTION_NORMAL = 0, + XCB_MOTION_HINT = 1 +} xcb_motion_t; + +/** Opcode for xcb_motion_notify. */ +#define XCB_MOTION_NOTIFY 6 + +/** + * @brief xcb_motion_notify_event_t + **/ +typedef struct xcb_motion_notify_event_t { + uint8_t response_type; + uint8_t detail; + uint16_t sequence; + xcb_timestamp_t time; + xcb_window_t root; + xcb_window_t event; + xcb_window_t child; + int16_t root_x; + int16_t root_y; + int16_t event_x; + int16_t event_y; + uint16_t state; + uint8_t same_screen; + uint8_t pad0; +} xcb_motion_notify_event_t; + +typedef enum xcb_notify_detail_t { + XCB_NOTIFY_DETAIL_ANCESTOR = 0, + XCB_NOTIFY_DETAIL_VIRTUAL = 1, + XCB_NOTIFY_DETAIL_INFERIOR = 2, + XCB_NOTIFY_DETAIL_NONLINEAR = 3, + XCB_NOTIFY_DETAIL_NONLINEAR_VIRTUAL = 4, + XCB_NOTIFY_DETAIL_POINTER = 5, + XCB_NOTIFY_DETAIL_POINTER_ROOT = 6, + XCB_NOTIFY_DETAIL_NONE = 7 +} xcb_notify_detail_t; + +typedef enum xcb_notify_mode_t { + XCB_NOTIFY_MODE_NORMAL = 0, + XCB_NOTIFY_MODE_GRAB = 1, + XCB_NOTIFY_MODE_UNGRAB = 2, + XCB_NOTIFY_MODE_WHILE_GRABBED = 3 +} xcb_notify_mode_t; + +/** Opcode for xcb_enter_notify. */ +#define XCB_ENTER_NOTIFY 7 + +/** + * @brief xcb_enter_notify_event_t + **/ +typedef struct xcb_enter_notify_event_t { + uint8_t response_type; + uint8_t detail; + uint16_t sequence; + xcb_timestamp_t time; + xcb_window_t root; + xcb_window_t event; + xcb_window_t child; + int16_t root_x; + int16_t root_y; + int16_t event_x; + int16_t event_y; + uint16_t state; + uint8_t mode; + uint8_t same_screen_focus; +} xcb_enter_notify_event_t; + +/** Opcode for xcb_leave_notify. */ +#define XCB_LEAVE_NOTIFY 8 + +typedef xcb_enter_notify_event_t xcb_leave_notify_event_t; + +/** Opcode for xcb_focus_in. */ +#define XCB_FOCUS_IN 9 + +/** + * @brief xcb_focus_in_event_t + **/ +typedef struct xcb_focus_in_event_t { + uint8_t response_type; + uint8_t detail; + uint16_t sequence; + xcb_window_t event; + uint8_t mode; + uint8_t pad0[3]; +} xcb_focus_in_event_t; + +/** Opcode for xcb_focus_out. */ +#define XCB_FOCUS_OUT 10 + +typedef xcb_focus_in_event_t xcb_focus_out_event_t; + +/** Opcode for xcb_keymap_notify. */ +#define XCB_KEYMAP_NOTIFY 11 + +/** + * @brief xcb_keymap_notify_event_t + **/ +typedef struct xcb_keymap_notify_event_t { + uint8_t response_type; + uint8_t keys[31]; +} xcb_keymap_notify_event_t; + +/** Opcode for xcb_expose. */ +#define XCB_EXPOSE 12 + +/** + * @brief xcb_expose_event_t + **/ +typedef struct xcb_expose_event_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + xcb_window_t window; + uint16_t x; + uint16_t y; + uint16_t width; + uint16_t height; + uint16_t count; + uint8_t pad1[2]; +} xcb_expose_event_t; + +/** Opcode for xcb_graphics_exposure. */ +#define XCB_GRAPHICS_EXPOSURE 13 + +/** + * @brief xcb_graphics_exposure_event_t + **/ +typedef struct xcb_graphics_exposure_event_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + xcb_drawable_t drawable; + uint16_t x; + uint16_t y; + uint16_t width; + uint16_t height; + uint16_t minor_opcode; + uint16_t count; + uint8_t major_opcode; + uint8_t pad1[3]; +} xcb_graphics_exposure_event_t; + +/** Opcode for xcb_no_exposure. */ +#define XCB_NO_EXPOSURE 14 + +/** + * @brief xcb_no_exposure_event_t + **/ +typedef struct xcb_no_exposure_event_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + xcb_drawable_t drawable; + uint16_t minor_opcode; + uint8_t major_opcode; + uint8_t pad1; +} xcb_no_exposure_event_t; + +typedef enum xcb_visibility_t { + XCB_VISIBILITY_UNOBSCURED = 0, + XCB_VISIBILITY_PARTIALLY_OBSCURED = 1, + XCB_VISIBILITY_FULLY_OBSCURED = 2 +} xcb_visibility_t; + +/** Opcode for xcb_visibility_notify. */ +#define XCB_VISIBILITY_NOTIFY 15 + +/** + * @brief xcb_visibility_notify_event_t + **/ +typedef struct xcb_visibility_notify_event_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + xcb_window_t window; + uint8_t state; + uint8_t pad1[3]; +} xcb_visibility_notify_event_t; + +/** Opcode for xcb_create_notify. */ +#define XCB_CREATE_NOTIFY 16 + +/** + * @brief xcb_create_notify_event_t + **/ +typedef struct xcb_create_notify_event_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + xcb_window_t parent; + xcb_window_t window; + int16_t x; + int16_t y; + uint16_t width; + uint16_t height; + uint16_t border_width; + uint8_t override_redirect; + uint8_t pad1; +} xcb_create_notify_event_t; + +/** Opcode for xcb_destroy_notify. */ +#define XCB_DESTROY_NOTIFY 17 + +/** + * @brief xcb_destroy_notify_event_t + **/ +typedef struct xcb_destroy_notify_event_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + xcb_window_t event; + xcb_window_t window; +} xcb_destroy_notify_event_t; + +/** Opcode for xcb_unmap_notify. */ +#define XCB_UNMAP_NOTIFY 18 + +/** + * @brief xcb_unmap_notify_event_t + **/ +typedef struct xcb_unmap_notify_event_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + xcb_window_t event; + xcb_window_t window; + uint8_t from_configure; + uint8_t pad1[3]; +} xcb_unmap_notify_event_t; + +/** Opcode for xcb_map_notify. */ +#define XCB_MAP_NOTIFY 19 + +/** + * @brief xcb_map_notify_event_t + **/ +typedef struct xcb_map_notify_event_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + xcb_window_t event; + xcb_window_t window; + uint8_t override_redirect; + uint8_t pad1[3]; +} xcb_map_notify_event_t; + +/** Opcode for xcb_map_request. */ +#define XCB_MAP_REQUEST 20 + +/** + * @brief xcb_map_request_event_t + **/ +typedef struct xcb_map_request_event_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + xcb_window_t parent; + xcb_window_t window; +} xcb_map_request_event_t; + +/** Opcode for xcb_reparent_notify. */ +#define XCB_REPARENT_NOTIFY 21 + +/** + * @brief xcb_reparent_notify_event_t + **/ +typedef struct xcb_reparent_notify_event_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + xcb_window_t event; + xcb_window_t window; + xcb_window_t parent; + int16_t x; + int16_t y; + uint8_t override_redirect; + uint8_t pad1[3]; +} xcb_reparent_notify_event_t; + +/** Opcode for xcb_configure_notify. */ +#define XCB_CONFIGURE_NOTIFY 22 + +/** + * @brief xcb_configure_notify_event_t + **/ +typedef struct xcb_configure_notify_event_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + xcb_window_t event; + xcb_window_t window; + xcb_window_t above_sibling; + int16_t x; + int16_t y; + uint16_t width; + uint16_t height; + uint16_t border_width; + uint8_t override_redirect; + uint8_t pad1; +} xcb_configure_notify_event_t; + +/** Opcode for xcb_configure_request. */ +#define XCB_CONFIGURE_REQUEST 23 + +/** + * @brief xcb_configure_request_event_t + **/ +typedef struct xcb_configure_request_event_t { + uint8_t response_type; + uint8_t stack_mode; + uint16_t sequence; + xcb_window_t parent; + xcb_window_t window; + xcb_window_t sibling; + int16_t x; + int16_t y; + uint16_t width; + uint16_t height; + uint16_t border_width; + uint16_t value_mask; +} xcb_configure_request_event_t; + +/** Opcode for xcb_gravity_notify. */ +#define XCB_GRAVITY_NOTIFY 24 + +/** + * @brief xcb_gravity_notify_event_t + **/ +typedef struct xcb_gravity_notify_event_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + xcb_window_t event; + xcb_window_t window; + int16_t x; + int16_t y; +} xcb_gravity_notify_event_t; + +/** Opcode for xcb_resize_request. */ +#define XCB_RESIZE_REQUEST 25 + +/** + * @brief xcb_resize_request_event_t + **/ +typedef struct xcb_resize_request_event_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + xcb_window_t window; + uint16_t width; + uint16_t height; +} xcb_resize_request_event_t; + +typedef enum xcb_place_t { + XCB_PLACE_ON_TOP = 0, +/**< The window is now on top of all siblings. */ + + XCB_PLACE_ON_BOTTOM = 1 +/**< The window is now below all siblings. */ + +} xcb_place_t; + +/** Opcode for xcb_circulate_notify. */ +#define XCB_CIRCULATE_NOTIFY 26 + +/** + * @brief xcb_circulate_notify_event_t + **/ +typedef struct xcb_circulate_notify_event_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + xcb_window_t event; + xcb_window_t window; + uint8_t pad1[4]; + uint8_t place; + uint8_t pad2[3]; +} xcb_circulate_notify_event_t; + +/** Opcode for xcb_circulate_request. */ +#define XCB_CIRCULATE_REQUEST 27 + +typedef xcb_circulate_notify_event_t xcb_circulate_request_event_t; + +typedef enum xcb_property_t { + XCB_PROPERTY_NEW_VALUE = 0, + XCB_PROPERTY_DELETE = 1 +} xcb_property_t; + +/** Opcode for xcb_property_notify. */ +#define XCB_PROPERTY_NOTIFY 28 + +/** + * @brief xcb_property_notify_event_t + **/ +typedef struct xcb_property_notify_event_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + xcb_window_t window; + xcb_atom_t atom; + xcb_timestamp_t time; + uint8_t state; + uint8_t pad1[3]; +} xcb_property_notify_event_t; + +/** Opcode for xcb_selection_clear. */ +#define XCB_SELECTION_CLEAR 29 + +/** + * @brief xcb_selection_clear_event_t + **/ +typedef struct xcb_selection_clear_event_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + xcb_timestamp_t time; + xcb_window_t owner; + xcb_atom_t selection; +} xcb_selection_clear_event_t; + +typedef enum xcb_time_t { + XCB_TIME_CURRENT_TIME = 0 +} xcb_time_t; + +typedef enum xcb_atom_enum_t { + XCB_ATOM_NONE = 0, + XCB_ATOM_ANY = 0, + XCB_ATOM_PRIMARY = 1, + XCB_ATOM_SECONDARY = 2, + XCB_ATOM_ARC = 3, + XCB_ATOM_ATOM = 4, + XCB_ATOM_BITMAP = 5, + XCB_ATOM_CARDINAL = 6, + XCB_ATOM_COLORMAP = 7, + XCB_ATOM_CURSOR = 8, + XCB_ATOM_CUT_BUFFER0 = 9, + XCB_ATOM_CUT_BUFFER1 = 10, + XCB_ATOM_CUT_BUFFER2 = 11, + XCB_ATOM_CUT_BUFFER3 = 12, + XCB_ATOM_CUT_BUFFER4 = 13, + XCB_ATOM_CUT_BUFFER5 = 14, + XCB_ATOM_CUT_BUFFER6 = 15, + XCB_ATOM_CUT_BUFFER7 = 16, + XCB_ATOM_DRAWABLE = 17, + XCB_ATOM_FONT = 18, + XCB_ATOM_INTEGER = 19, + XCB_ATOM_PIXMAP = 20, + XCB_ATOM_POINT = 21, + XCB_ATOM_RECTANGLE = 22, + XCB_ATOM_RESOURCE_MANAGER = 23, + XCB_ATOM_RGB_COLOR_MAP = 24, + XCB_ATOM_RGB_BEST_MAP = 25, + XCB_ATOM_RGB_BLUE_MAP = 26, + XCB_ATOM_RGB_DEFAULT_MAP = 27, + XCB_ATOM_RGB_GRAY_MAP = 28, + XCB_ATOM_RGB_GREEN_MAP = 29, + XCB_ATOM_RGB_RED_MAP = 30, + XCB_ATOM_STRING = 31, + XCB_ATOM_VISUALID = 32, + XCB_ATOM_WINDOW = 33, + XCB_ATOM_WM_COMMAND = 34, + XCB_ATOM_WM_HINTS = 35, + XCB_ATOM_WM_CLIENT_MACHINE = 36, + XCB_ATOM_WM_ICON_NAME = 37, + XCB_ATOM_WM_ICON_SIZE = 38, + XCB_ATOM_WM_NAME = 39, + XCB_ATOM_WM_NORMAL_HINTS = 40, + XCB_ATOM_WM_SIZE_HINTS = 41, + XCB_ATOM_WM_ZOOM_HINTS = 42, + XCB_ATOM_MIN_SPACE = 43, + XCB_ATOM_NORM_SPACE = 44, + XCB_ATOM_MAX_SPACE = 45, + XCB_ATOM_END_SPACE = 46, + XCB_ATOM_SUPERSCRIPT_X = 47, + XCB_ATOM_SUPERSCRIPT_Y = 48, + XCB_ATOM_SUBSCRIPT_X = 49, + XCB_ATOM_SUBSCRIPT_Y = 50, + XCB_ATOM_UNDERLINE_POSITION = 51, + XCB_ATOM_UNDERLINE_THICKNESS = 52, + XCB_ATOM_STRIKEOUT_ASCENT = 53, + XCB_ATOM_STRIKEOUT_DESCENT = 54, + XCB_ATOM_ITALIC_ANGLE = 55, + XCB_ATOM_X_HEIGHT = 56, + XCB_ATOM_QUAD_WIDTH = 57, + XCB_ATOM_WEIGHT = 58, + XCB_ATOM_POINT_SIZE = 59, + XCB_ATOM_RESOLUTION = 60, + XCB_ATOM_COPYRIGHT = 61, + XCB_ATOM_NOTICE = 62, + XCB_ATOM_FONT_NAME = 63, + XCB_ATOM_FAMILY_NAME = 64, + XCB_ATOM_FULL_NAME = 65, + XCB_ATOM_CAP_HEIGHT = 66, + XCB_ATOM_WM_CLASS = 67, + XCB_ATOM_WM_TRANSIENT_FOR = 68 +} xcb_atom_enum_t; + +/** Opcode for xcb_selection_request. */ +#define XCB_SELECTION_REQUEST 30 + +/** + * @brief xcb_selection_request_event_t + **/ +typedef struct xcb_selection_request_event_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + xcb_timestamp_t time; + xcb_window_t owner; + xcb_window_t requestor; + xcb_atom_t selection; + xcb_atom_t target; + xcb_atom_t property; +} xcb_selection_request_event_t; + +/** Opcode for xcb_selection_notify. */ +#define XCB_SELECTION_NOTIFY 31 + +/** + * @brief xcb_selection_notify_event_t + **/ +typedef struct xcb_selection_notify_event_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + xcb_timestamp_t time; + xcb_window_t requestor; + xcb_atom_t selection; + xcb_atom_t target; + xcb_atom_t property; +} xcb_selection_notify_event_t; + +typedef enum xcb_colormap_state_t { + XCB_COLORMAP_STATE_UNINSTALLED = 0, +/**< The colormap was uninstalled. */ + + XCB_COLORMAP_STATE_INSTALLED = 1 +/**< The colormap was installed. */ + +} xcb_colormap_state_t; + +typedef enum xcb_colormap_enum_t { + XCB_COLORMAP_NONE = 0 +} xcb_colormap_enum_t; + +/** Opcode for xcb_colormap_notify. */ +#define XCB_COLORMAP_NOTIFY 32 + +/** + * @brief xcb_colormap_notify_event_t + **/ +typedef struct xcb_colormap_notify_event_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + xcb_window_t window; + xcb_colormap_t colormap; + uint8_t _new; + uint8_t state; + uint8_t pad1[2]; +} xcb_colormap_notify_event_t; + +/** + * @brief xcb_client_message_data_t + **/ +typedef union xcb_client_message_data_t { + uint8_t data8[20]; + uint16_t data16[10]; + uint32_t data32[5]; +} xcb_client_message_data_t; + +/** + * @brief xcb_client_message_data_iterator_t + **/ +typedef struct xcb_client_message_data_iterator_t { + xcb_client_message_data_t *data; + int rem; + int index; +} xcb_client_message_data_iterator_t; + +/** Opcode for xcb_client_message. */ +#define XCB_CLIENT_MESSAGE 33 + +/** + * @brief xcb_client_message_event_t + **/ +typedef struct xcb_client_message_event_t { + uint8_t response_type; + uint8_t format; + uint16_t sequence; + xcb_window_t window; + xcb_atom_t type; + xcb_client_message_data_t data; +} xcb_client_message_event_t; + +typedef enum xcb_mapping_t { + XCB_MAPPING_MODIFIER = 0, + XCB_MAPPING_KEYBOARD = 1, + XCB_MAPPING_POINTER = 2 +} xcb_mapping_t; + +/** Opcode for xcb_mapping_notify. */ +#define XCB_MAPPING_NOTIFY 34 + +/** + * @brief xcb_mapping_notify_event_t + **/ +typedef struct xcb_mapping_notify_event_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint8_t request; + xcb_keycode_t first_keycode; + uint8_t count; + uint8_t pad1; +} xcb_mapping_notify_event_t; + +/** Opcode for xcb_ge_generic. */ +#define XCB_GE_GENERIC 35 + +/** + * @brief xcb_ge_generic_event_t + **/ +typedef struct xcb_ge_generic_event_t { + uint8_t response_type; + uint8_t extension; + uint16_t sequence; + uint32_t length; + uint16_t event_type; + uint8_t pad0[22]; + uint32_t full_sequence; +} xcb_ge_generic_event_t; + +/** Opcode for xcb_request. */ +#define XCB_REQUEST 1 + +/** + * @brief xcb_request_error_t + **/ +typedef struct xcb_request_error_t { + uint8_t response_type; + uint8_t error_code; + uint16_t sequence; + uint32_t bad_value; + uint16_t minor_opcode; + uint8_t major_opcode; + uint8_t pad0; +} xcb_request_error_t; + +/** Opcode for xcb_value. */ +#define XCB_VALUE 2 + +/** + * @brief xcb_value_error_t + **/ +typedef struct xcb_value_error_t { + uint8_t response_type; + uint8_t error_code; + uint16_t sequence; + uint32_t bad_value; + uint16_t minor_opcode; + uint8_t major_opcode; + uint8_t pad0; +} xcb_value_error_t; + +/** Opcode for xcb_window. */ +#define XCB_WINDOW 3 + +typedef xcb_value_error_t xcb_window_error_t; + +/** Opcode for xcb_pixmap. */ +#define XCB_PIXMAP 4 + +typedef xcb_value_error_t xcb_pixmap_error_t; + +/** Opcode for xcb_atom. */ +#define XCB_ATOM 5 + +typedef xcb_value_error_t xcb_atom_error_t; + +/** Opcode for xcb_cursor. */ +#define XCB_CURSOR 6 + +typedef xcb_value_error_t xcb_cursor_error_t; + +/** Opcode for xcb_font. */ +#define XCB_FONT 7 + +typedef xcb_value_error_t xcb_font_error_t; + +/** Opcode for xcb_match. */ +#define XCB_MATCH 8 + +typedef xcb_request_error_t xcb_match_error_t; + +/** Opcode for xcb_drawable. */ +#define XCB_DRAWABLE 9 + +typedef xcb_value_error_t xcb_drawable_error_t; + +/** Opcode for xcb_access. */ +#define XCB_ACCESS 10 + +typedef xcb_request_error_t xcb_access_error_t; + +/** Opcode for xcb_alloc. */ +#define XCB_ALLOC 11 + +typedef xcb_request_error_t xcb_alloc_error_t; + +/** Opcode for xcb_colormap. */ +#define XCB_COLORMAP 12 + +typedef xcb_value_error_t xcb_colormap_error_t; + +/** Opcode for xcb_g_context. */ +#define XCB_G_CONTEXT 13 + +typedef xcb_value_error_t xcb_g_context_error_t; + +/** Opcode for xcb_id_choice. */ +#define XCB_ID_CHOICE 14 + +typedef xcb_value_error_t xcb_id_choice_error_t; + +/** Opcode for xcb_name. */ +#define XCB_NAME 15 + +typedef xcb_request_error_t xcb_name_error_t; + +/** Opcode for xcb_length. */ +#define XCB_LENGTH 16 + +typedef xcb_request_error_t xcb_length_error_t; + +/** Opcode for xcb_implementation. */ +#define XCB_IMPLEMENTATION 17 + +typedef xcb_request_error_t xcb_implementation_error_t; + +typedef enum xcb_window_class_t { + XCB_WINDOW_CLASS_COPY_FROM_PARENT = 0, + XCB_WINDOW_CLASS_INPUT_OUTPUT = 1, + XCB_WINDOW_CLASS_INPUT_ONLY = 2 +} xcb_window_class_t; + +typedef enum xcb_cw_t { + XCB_CW_BACK_PIXMAP = 1, +/**< Overrides the default background-pixmap. The background pixmap and window must +have the same root and same depth. Any size pixmap can be used, although some +sizes may be faster than others. + +If `XCB_BACK_PIXMAP_NONE` is specified, the window has no defined background. +The server may fill the contents with the previous screen contents or with +contents of its own choosing. + +If `XCB_BACK_PIXMAP_PARENT_RELATIVE` is specified, the parent's background is +used, but the window must have the same depth as the parent (or a Match error +results). The parent's background is tracked, and the current version is +used each time the window background is required. */ + + XCB_CW_BACK_PIXEL = 2, +/**< Overrides `BackPixmap`. A pixmap of undefined size filled with the specified +background pixel is used for the background. Range-checking is not performed, +the background pixel is truncated to the appropriate number of bits. */ + + XCB_CW_BORDER_PIXMAP = 4, +/**< Overrides the default border-pixmap. The border pixmap and window must have the +same root and the same depth. Any size pixmap can be used, although some sizes +may be faster than others. + +The special value `XCB_COPY_FROM_PARENT` means the parent's border pixmap is +copied (subsequent changes to the parent's border attribute do not affect the +child), but the window must have the same depth as the parent. */ + + XCB_CW_BORDER_PIXEL = 8, +/**< Overrides `BorderPixmap`. A pixmap of undefined size filled with the specified +border pixel is used for the border. Range checking is not performed on the +border-pixel value, it is truncated to the appropriate number of bits. */ + + XCB_CW_BIT_GRAVITY = 16, +/**< Defines which region of the window should be retained if the window is resized. */ + + XCB_CW_WIN_GRAVITY = 32, +/**< Defines how the window should be repositioned if the parent is resized (see +`ConfigureWindow`). */ + + XCB_CW_BACKING_STORE = 64, +/**< A backing-store of `WhenMapped` advises the server that maintaining contents of +obscured regions when the window is mapped would be beneficial. A backing-store +of `Always` advises the server that maintaining contents even when the window +is unmapped would be beneficial. In this case, the server may generate an +exposure event when the window is created. A value of `NotUseful` advises the +server that maintaining contents is unnecessary, although a server may still +choose to maintain contents while the window is mapped. Note that if the server +maintains contents, then the server should maintain complete contents not just +the region within the parent boundaries, even if the window is larger than its +parent. While the server maintains contents, exposure events will not normally +be generated, but the server may stop maintaining contents at any time. */ + + XCB_CW_BACKING_PLANES = 128, +/**< The backing-planes indicates (with bits set to 1) which bit planes of the +window hold dynamic data that must be preserved in backing-stores and during +save-unders. */ + + XCB_CW_BACKING_PIXEL = 256, +/**< The backing-pixel specifies what value to use in planes not covered by +backing-planes. The server is free to save only the specified bit planes in the +backing-store or save-under and regenerate the remaining planes with the +specified pixel value. Any bits beyond the specified depth of the window in +these values are simply ignored. */ + + XCB_CW_OVERRIDE_REDIRECT = 512, +/**< The override-redirect specifies whether map and configure requests on this +window should override a SubstructureRedirect on the parent, typically to +inform a window manager not to tamper with the window. */ + + XCB_CW_SAVE_UNDER = 1024, +/**< If 1, the server is advised that when this window is mapped, saving the +contents of windows it obscures would be beneficial. */ + + XCB_CW_EVENT_MASK = 2048, +/**< The event-mask defines which events the client is interested in for this window +(or for some event types, inferiors of the window). */ + + XCB_CW_DONT_PROPAGATE = 4096, +/**< The do-not-propagate-mask defines which events should not be propagated to +ancestor windows when no client has the event type selected in this window. */ + + XCB_CW_COLORMAP = 8192, +/**< The colormap specifies the colormap that best reflects the true colors of the window. Servers +capable of supporting multiple hardware colormaps may use this information, and window man- +agers may use it for InstallColormap requests. The colormap must have the same visual type +and root as the window (or a Match error results). If CopyFromParent is specified, the parent's +colormap is copied (subsequent changes to the parent's colormap attribute do not affect the child). +However, the window must have the same visual type as the parent (or a Match error results), +and the parent must not have a colormap of None (or a Match error results). For an explanation +of None, see FreeColormap request. The colormap is copied by sharing the colormap object +between the child and the parent, not by making a complete copy of the colormap contents. */ + + XCB_CW_CURSOR = 16384 +/**< If a cursor is specified, it will be used whenever the pointer is in the window. If None is speci- +fied, the parent's cursor will be used when the pointer is in the window, and any change in the +parent's cursor will cause an immediate change in the displayed cursor. */ + +} xcb_cw_t; + +typedef enum xcb_back_pixmap_t { + XCB_BACK_PIXMAP_NONE = 0, + XCB_BACK_PIXMAP_PARENT_RELATIVE = 1 +} xcb_back_pixmap_t; + +typedef enum xcb_gravity_t { + XCB_GRAVITY_BIT_FORGET = 0, + XCB_GRAVITY_WIN_UNMAP = 0, + XCB_GRAVITY_NORTH_WEST = 1, + XCB_GRAVITY_NORTH = 2, + XCB_GRAVITY_NORTH_EAST = 3, + XCB_GRAVITY_WEST = 4, + XCB_GRAVITY_CENTER = 5, + XCB_GRAVITY_EAST = 6, + XCB_GRAVITY_SOUTH_WEST = 7, + XCB_GRAVITY_SOUTH = 8, + XCB_GRAVITY_SOUTH_EAST = 9, + XCB_GRAVITY_STATIC = 10 +} xcb_gravity_t; + +/** + * @brief xcb_create_window_value_list_t + **/ +typedef struct xcb_create_window_value_list_t { + xcb_pixmap_t background_pixmap; + uint32_t background_pixel; + xcb_pixmap_t border_pixmap; + uint32_t border_pixel; + uint32_t bit_gravity; + uint32_t win_gravity; + uint32_t backing_store; + uint32_t backing_planes; + uint32_t backing_pixel; + xcb_bool32_t override_redirect; + xcb_bool32_t save_under; + uint32_t event_mask; + uint32_t do_not_propogate_mask; + xcb_colormap_t colormap; + xcb_cursor_t cursor; +} xcb_create_window_value_list_t; + +/** Opcode for xcb_create_window. */ +#define XCB_CREATE_WINDOW 1 + +/** + * @brief xcb_create_window_request_t + **/ +typedef struct xcb_create_window_request_t { + uint8_t major_opcode; + uint8_t depth; + uint16_t length; + xcb_window_t wid; + xcb_window_t parent; + int16_t x; + int16_t y; + uint16_t width; + uint16_t height; + uint16_t border_width; + uint16_t _class; + xcb_visualid_t visual; + uint32_t value_mask; +} xcb_create_window_request_t; + +/** + * @brief xcb_change_window_attributes_value_list_t + **/ +typedef struct xcb_change_window_attributes_value_list_t { + xcb_pixmap_t background_pixmap; + uint32_t background_pixel; + xcb_pixmap_t border_pixmap; + uint32_t border_pixel; + uint32_t bit_gravity; + uint32_t win_gravity; + uint32_t backing_store; + uint32_t backing_planes; + uint32_t backing_pixel; + xcb_bool32_t override_redirect; + xcb_bool32_t save_under; + uint32_t event_mask; + uint32_t do_not_propogate_mask; + xcb_colormap_t colormap; + xcb_cursor_t cursor; +} xcb_change_window_attributes_value_list_t; + +/** Opcode for xcb_change_window_attributes. */ +#define XCB_CHANGE_WINDOW_ATTRIBUTES 2 + +/** + * @brief xcb_change_window_attributes_request_t + **/ +typedef struct xcb_change_window_attributes_request_t { + uint8_t major_opcode; + uint8_t pad0; + uint16_t length; + xcb_window_t window; + uint32_t value_mask; +} xcb_change_window_attributes_request_t; + +typedef enum xcb_map_state_t { + XCB_MAP_STATE_UNMAPPED = 0, + XCB_MAP_STATE_UNVIEWABLE = 1, + XCB_MAP_STATE_VIEWABLE = 2 +} xcb_map_state_t; + +/** + * @brief xcb_get_window_attributes_cookie_t + **/ +typedef struct xcb_get_window_attributes_cookie_t { + unsigned int sequence; +} xcb_get_window_attributes_cookie_t; + +/** Opcode for xcb_get_window_attributes. */ +#define XCB_GET_WINDOW_ATTRIBUTES 3 + +/** + * @brief xcb_get_window_attributes_request_t + **/ +typedef struct xcb_get_window_attributes_request_t { + uint8_t major_opcode; + uint8_t pad0; + uint16_t length; + xcb_window_t window; +} xcb_get_window_attributes_request_t; + +/** + * @brief xcb_get_window_attributes_reply_t + **/ +typedef struct xcb_get_window_attributes_reply_t { + uint8_t response_type; + uint8_t backing_store; + uint16_t sequence; + uint32_t length; + xcb_visualid_t visual; + uint16_t _class; + uint8_t bit_gravity; + uint8_t win_gravity; + uint32_t backing_planes; + uint32_t backing_pixel; + uint8_t save_under; + uint8_t map_is_installed; + uint8_t map_state; + uint8_t override_redirect; + xcb_colormap_t colormap; + uint32_t all_event_masks; + uint32_t your_event_mask; + uint16_t do_not_propagate_mask; + uint8_t pad0[2]; +} xcb_get_window_attributes_reply_t; + +/** Opcode for xcb_destroy_window. */ +#define XCB_DESTROY_WINDOW 4 + +/** + * @brief xcb_destroy_window_request_t + **/ +typedef struct xcb_destroy_window_request_t { + uint8_t major_opcode; + uint8_t pad0; + uint16_t length; + xcb_window_t window; +} xcb_destroy_window_request_t; + +/** Opcode for xcb_destroy_subwindows. */ +#define XCB_DESTROY_SUBWINDOWS 5 + +/** + * @brief xcb_destroy_subwindows_request_t + **/ +typedef struct xcb_destroy_subwindows_request_t { + uint8_t major_opcode; + uint8_t pad0; + uint16_t length; + xcb_window_t window; +} xcb_destroy_subwindows_request_t; + +typedef enum xcb_set_mode_t { + XCB_SET_MODE_INSERT = 0, + XCB_SET_MODE_DELETE = 1 +} xcb_set_mode_t; + +/** Opcode for xcb_change_save_set. */ +#define XCB_CHANGE_SAVE_SET 6 + +/** + * @brief xcb_change_save_set_request_t + **/ +typedef struct xcb_change_save_set_request_t { + uint8_t major_opcode; + uint8_t mode; + uint16_t length; + xcb_window_t window; +} xcb_change_save_set_request_t; + +/** Opcode for xcb_reparent_window. */ +#define XCB_REPARENT_WINDOW 7 + +/** + * @brief xcb_reparent_window_request_t + **/ +typedef struct xcb_reparent_window_request_t { + uint8_t major_opcode; + uint8_t pad0; + uint16_t length; + xcb_window_t window; + xcb_window_t parent; + int16_t x; + int16_t y; +} xcb_reparent_window_request_t; + +/** Opcode for xcb_map_window. */ +#define XCB_MAP_WINDOW 8 + +/** + * @brief xcb_map_window_request_t + **/ +typedef struct xcb_map_window_request_t { + uint8_t major_opcode; + uint8_t pad0; + uint16_t length; + xcb_window_t window; +} xcb_map_window_request_t; + +/** Opcode for xcb_map_subwindows. */ +#define XCB_MAP_SUBWINDOWS 9 + +/** + * @brief xcb_map_subwindows_request_t + **/ +typedef struct xcb_map_subwindows_request_t { + uint8_t major_opcode; + uint8_t pad0; + uint16_t length; + xcb_window_t window; +} xcb_map_subwindows_request_t; + +/** Opcode for xcb_unmap_window. */ +#define XCB_UNMAP_WINDOW 10 + +/** + * @brief xcb_unmap_window_request_t + **/ +typedef struct xcb_unmap_window_request_t { + uint8_t major_opcode; + uint8_t pad0; + uint16_t length; + xcb_window_t window; +} xcb_unmap_window_request_t; + +/** Opcode for xcb_unmap_subwindows. */ +#define XCB_UNMAP_SUBWINDOWS 11 + +/** + * @brief xcb_unmap_subwindows_request_t + **/ +typedef struct xcb_unmap_subwindows_request_t { + uint8_t major_opcode; + uint8_t pad0; + uint16_t length; + xcb_window_t window; +} xcb_unmap_subwindows_request_t; + +typedef enum xcb_config_window_t { + XCB_CONFIG_WINDOW_X = 1, + XCB_CONFIG_WINDOW_Y = 2, + XCB_CONFIG_WINDOW_WIDTH = 4, + XCB_CONFIG_WINDOW_HEIGHT = 8, + XCB_CONFIG_WINDOW_BORDER_WIDTH = 16, + XCB_CONFIG_WINDOW_SIBLING = 32, + XCB_CONFIG_WINDOW_STACK_MODE = 64 +} xcb_config_window_t; + +typedef enum xcb_stack_mode_t { + XCB_STACK_MODE_ABOVE = 0, + XCB_STACK_MODE_BELOW = 1, + XCB_STACK_MODE_TOP_IF = 2, + XCB_STACK_MODE_BOTTOM_IF = 3, + XCB_STACK_MODE_OPPOSITE = 4 +} xcb_stack_mode_t; + +/** + * @brief xcb_configure_window_value_list_t + **/ +typedef struct xcb_configure_window_value_list_t { + int32_t x; + int32_t y; + uint32_t width; + uint32_t height; + uint32_t border_width; + xcb_window_t sibling; + uint32_t stack_mode; +} xcb_configure_window_value_list_t; + +/** Opcode for xcb_configure_window. */ +#define XCB_CONFIGURE_WINDOW 12 + +/** + * @brief xcb_configure_window_request_t + **/ +typedef struct xcb_configure_window_request_t { + uint8_t major_opcode; + uint8_t pad0; + uint16_t length; + xcb_window_t window; + uint16_t value_mask; + uint8_t pad1[2]; +} xcb_configure_window_request_t; + +typedef enum xcb_circulate_t { + XCB_CIRCULATE_RAISE_LOWEST = 0, + XCB_CIRCULATE_LOWER_HIGHEST = 1 +} xcb_circulate_t; + +/** Opcode for xcb_circulate_window. */ +#define XCB_CIRCULATE_WINDOW 13 + +/** + * @brief xcb_circulate_window_request_t + **/ +typedef struct xcb_circulate_window_request_t { + uint8_t major_opcode; + uint8_t direction; + uint16_t length; + xcb_window_t window; +} xcb_circulate_window_request_t; + +/** + * @brief xcb_get_geometry_cookie_t + **/ +typedef struct xcb_get_geometry_cookie_t { + unsigned int sequence; +} xcb_get_geometry_cookie_t; + +/** Opcode for xcb_get_geometry. */ +#define XCB_GET_GEOMETRY 14 + +/** + * @brief xcb_get_geometry_request_t + **/ +typedef struct xcb_get_geometry_request_t { + uint8_t major_opcode; + uint8_t pad0; + uint16_t length; + xcb_drawable_t drawable; +} xcb_get_geometry_request_t; + +/** + * @brief xcb_get_geometry_reply_t + **/ +typedef struct xcb_get_geometry_reply_t { + uint8_t response_type; + uint8_t depth; + uint16_t sequence; + uint32_t length; + xcb_window_t root; + int16_t x; + int16_t y; + uint16_t width; + uint16_t height; + uint16_t border_width; + uint8_t pad0[2]; +} xcb_get_geometry_reply_t; + +/** + * @brief xcb_query_tree_cookie_t + **/ +typedef struct xcb_query_tree_cookie_t { + unsigned int sequence; +} xcb_query_tree_cookie_t; + +/** Opcode for xcb_query_tree. */ +#define XCB_QUERY_TREE 15 + +/** + * @brief xcb_query_tree_request_t + **/ +typedef struct xcb_query_tree_request_t { + uint8_t major_opcode; + uint8_t pad0; + uint16_t length; + xcb_window_t window; +} xcb_query_tree_request_t; + +/** + * @brief xcb_query_tree_reply_t + **/ +typedef struct xcb_query_tree_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + xcb_window_t root; + xcb_window_t parent; + uint16_t children_len; + uint8_t pad1[14]; +} xcb_query_tree_reply_t; + +/** + * @brief xcb_intern_atom_cookie_t + **/ +typedef struct xcb_intern_atom_cookie_t { + unsigned int sequence; +} xcb_intern_atom_cookie_t; + +/** Opcode for xcb_intern_atom. */ +#define XCB_INTERN_ATOM 16 + +/** + * @brief xcb_intern_atom_request_t + **/ +typedef struct xcb_intern_atom_request_t { + uint8_t major_opcode; + uint8_t only_if_exists; + uint16_t length; + uint16_t name_len; + uint8_t pad0[2]; +} xcb_intern_atom_request_t; + +/** + * @brief xcb_intern_atom_reply_t + **/ +typedef struct xcb_intern_atom_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + xcb_atom_t atom; +} xcb_intern_atom_reply_t; + +/** + * @brief xcb_get_atom_name_cookie_t + **/ +typedef struct xcb_get_atom_name_cookie_t { + unsigned int sequence; +} xcb_get_atom_name_cookie_t; + +/** Opcode for xcb_get_atom_name. */ +#define XCB_GET_ATOM_NAME 17 + +/** + * @brief xcb_get_atom_name_request_t + **/ +typedef struct xcb_get_atom_name_request_t { + uint8_t major_opcode; + uint8_t pad0; + uint16_t length; + xcb_atom_t atom; +} xcb_get_atom_name_request_t; + +/** + * @brief xcb_get_atom_name_reply_t + **/ +typedef struct xcb_get_atom_name_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint16_t name_len; + uint8_t pad1[22]; +} xcb_get_atom_name_reply_t; + +typedef enum xcb_prop_mode_t { + XCB_PROP_MODE_REPLACE = 0, +/**< Discard the previous property value and store the new data. */ + + XCB_PROP_MODE_PREPEND = 1, +/**< Insert the new data before the beginning of existing data. The `format` must +match existing property value. If the property is undefined, it is treated as +defined with the correct type and format with zero-length data. */ + + XCB_PROP_MODE_APPEND = 2 +/**< Insert the new data after the beginning of existing data. The `format` must +match existing property value. If the property is undefined, it is treated as +defined with the correct type and format with zero-length data. */ + +} xcb_prop_mode_t; + +/** Opcode for xcb_change_property. */ +#define XCB_CHANGE_PROPERTY 18 + +/** + * @brief xcb_change_property_request_t + **/ +typedef struct xcb_change_property_request_t { + uint8_t major_opcode; + uint8_t mode; + uint16_t length; + xcb_window_t window; + xcb_atom_t property; + xcb_atom_t type; + uint8_t format; + uint8_t pad0[3]; + uint32_t data_len; +} xcb_change_property_request_t; + +/** Opcode for xcb_delete_property. */ +#define XCB_DELETE_PROPERTY 19 + +/** + * @brief xcb_delete_property_request_t + **/ +typedef struct xcb_delete_property_request_t { + uint8_t major_opcode; + uint8_t pad0; + uint16_t length; + xcb_window_t window; + xcb_atom_t property; +} xcb_delete_property_request_t; + +typedef enum xcb_get_property_type_t { + XCB_GET_PROPERTY_TYPE_ANY = 0 +} xcb_get_property_type_t; + +/** + * @brief xcb_get_property_cookie_t + **/ +typedef struct xcb_get_property_cookie_t { + unsigned int sequence; +} xcb_get_property_cookie_t; + +/** Opcode for xcb_get_property. */ +#define XCB_GET_PROPERTY 20 + +/** + * @brief xcb_get_property_request_t + **/ +typedef struct xcb_get_property_request_t { + uint8_t major_opcode; + uint8_t _delete; + uint16_t length; + xcb_window_t window; + xcb_atom_t property; + xcb_atom_t type; + uint32_t long_offset; + uint32_t long_length; +} xcb_get_property_request_t; + +/** + * @brief xcb_get_property_reply_t + **/ +typedef struct xcb_get_property_reply_t { + uint8_t response_type; + uint8_t format; + uint16_t sequence; + uint32_t length; + xcb_atom_t type; + uint32_t bytes_after; + uint32_t value_len; + uint8_t pad0[12]; +} xcb_get_property_reply_t; + +/** + * @brief xcb_list_properties_cookie_t + **/ +typedef struct xcb_list_properties_cookie_t { + unsigned int sequence; +} xcb_list_properties_cookie_t; + +/** Opcode for xcb_list_properties. */ +#define XCB_LIST_PROPERTIES 21 + +/** + * @brief xcb_list_properties_request_t + **/ +typedef struct xcb_list_properties_request_t { + uint8_t major_opcode; + uint8_t pad0; + uint16_t length; + xcb_window_t window; +} xcb_list_properties_request_t; + +/** + * @brief xcb_list_properties_reply_t + **/ +typedef struct xcb_list_properties_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint16_t atoms_len; + uint8_t pad1[22]; +} xcb_list_properties_reply_t; + +/** Opcode for xcb_set_selection_owner. */ +#define XCB_SET_SELECTION_OWNER 22 + +/** + * @brief xcb_set_selection_owner_request_t + **/ +typedef struct xcb_set_selection_owner_request_t { + uint8_t major_opcode; + uint8_t pad0; + uint16_t length; + xcb_window_t owner; + xcb_atom_t selection; + xcb_timestamp_t time; +} xcb_set_selection_owner_request_t; + +/** + * @brief xcb_get_selection_owner_cookie_t + **/ +typedef struct xcb_get_selection_owner_cookie_t { + unsigned int sequence; +} xcb_get_selection_owner_cookie_t; + +/** Opcode for xcb_get_selection_owner. */ +#define XCB_GET_SELECTION_OWNER 23 + +/** + * @brief xcb_get_selection_owner_request_t + **/ +typedef struct xcb_get_selection_owner_request_t { + uint8_t major_opcode; + uint8_t pad0; + uint16_t length; + xcb_atom_t selection; +} xcb_get_selection_owner_request_t; + +/** + * @brief xcb_get_selection_owner_reply_t + **/ +typedef struct xcb_get_selection_owner_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + xcb_window_t owner; +} xcb_get_selection_owner_reply_t; + +/** Opcode for xcb_convert_selection. */ +#define XCB_CONVERT_SELECTION 24 + +/** + * @brief xcb_convert_selection_request_t + **/ +typedef struct xcb_convert_selection_request_t { + uint8_t major_opcode; + uint8_t pad0; + uint16_t length; + xcb_window_t requestor; + xcb_atom_t selection; + xcb_atom_t target; + xcb_atom_t property; + xcb_timestamp_t time; +} xcb_convert_selection_request_t; + +typedef enum xcb_send_event_dest_t { + XCB_SEND_EVENT_DEST_POINTER_WINDOW = 0, + XCB_SEND_EVENT_DEST_ITEM_FOCUS = 1 +} xcb_send_event_dest_t; + +/** Opcode for xcb_send_event. */ +#define XCB_SEND_EVENT 25 + +/** + * @brief xcb_send_event_request_t + **/ +typedef struct xcb_send_event_request_t { + uint8_t major_opcode; + uint8_t propagate; + uint16_t length; + xcb_window_t destination; + uint32_t event_mask; + char event[32]; +} xcb_send_event_request_t; + +typedef enum xcb_grab_mode_t { + XCB_GRAB_MODE_SYNC = 0, +/**< The state of the keyboard appears to freeze: No further keyboard events are +generated by the server until the grabbing client issues a releasing +`AllowEvents` request or until the keyboard grab is released. */ + + XCB_GRAB_MODE_ASYNC = 1 +/**< Keyboard event processing continues normally. */ + +} xcb_grab_mode_t; + +typedef enum xcb_grab_status_t { + XCB_GRAB_STATUS_SUCCESS = 0, + XCB_GRAB_STATUS_ALREADY_GRABBED = 1, + XCB_GRAB_STATUS_INVALID_TIME = 2, + XCB_GRAB_STATUS_NOT_VIEWABLE = 3, + XCB_GRAB_STATUS_FROZEN = 4 +} xcb_grab_status_t; + +typedef enum xcb_cursor_enum_t { + XCB_CURSOR_NONE = 0 +} xcb_cursor_enum_t; + +/** + * @brief xcb_grab_pointer_cookie_t + **/ +typedef struct xcb_grab_pointer_cookie_t { + unsigned int sequence; +} xcb_grab_pointer_cookie_t; + +/** Opcode for xcb_grab_pointer. */ +#define XCB_GRAB_POINTER 26 + +/** + * @brief xcb_grab_pointer_request_t + **/ +typedef struct xcb_grab_pointer_request_t { + uint8_t major_opcode; + uint8_t owner_events; + uint16_t length; + xcb_window_t grab_window; + uint16_t event_mask; + uint8_t pointer_mode; + uint8_t keyboard_mode; + xcb_window_t confine_to; + xcb_cursor_t cursor; + xcb_timestamp_t time; +} xcb_grab_pointer_request_t; + +/** + * @brief xcb_grab_pointer_reply_t + **/ +typedef struct xcb_grab_pointer_reply_t { + uint8_t response_type; + uint8_t status; + uint16_t sequence; + uint32_t length; +} xcb_grab_pointer_reply_t; + +/** Opcode for xcb_ungrab_pointer. */ +#define XCB_UNGRAB_POINTER 27 + +/** + * @brief xcb_ungrab_pointer_request_t + **/ +typedef struct xcb_ungrab_pointer_request_t { + uint8_t major_opcode; + uint8_t pad0; + uint16_t length; + xcb_timestamp_t time; +} xcb_ungrab_pointer_request_t; + +typedef enum xcb_button_index_t { + XCB_BUTTON_INDEX_ANY = 0, +/**< Any of the following (or none): */ + + XCB_BUTTON_INDEX_1 = 1, +/**< The left mouse button. */ + + XCB_BUTTON_INDEX_2 = 2, +/**< The right mouse button. */ + + XCB_BUTTON_INDEX_3 = 3, +/**< The middle mouse button. */ + + XCB_BUTTON_INDEX_4 = 4, +/**< Scroll wheel. TODO: direction? */ + + XCB_BUTTON_INDEX_5 = 5 +/**< Scroll wheel. TODO: direction? */ + +} xcb_button_index_t; + +/** Opcode for xcb_grab_button. */ +#define XCB_GRAB_BUTTON 28 + +/** + * @brief xcb_grab_button_request_t + **/ +typedef struct xcb_grab_button_request_t { + uint8_t major_opcode; + uint8_t owner_events; + uint16_t length; + xcb_window_t grab_window; + uint16_t event_mask; + uint8_t pointer_mode; + uint8_t keyboard_mode; + xcb_window_t confine_to; + xcb_cursor_t cursor; + uint8_t button; + uint8_t pad0; + uint16_t modifiers; +} xcb_grab_button_request_t; + +/** Opcode for xcb_ungrab_button. */ +#define XCB_UNGRAB_BUTTON 29 + +/** + * @brief xcb_ungrab_button_request_t + **/ +typedef struct xcb_ungrab_button_request_t { + uint8_t major_opcode; + uint8_t button; + uint16_t length; + xcb_window_t grab_window; + uint16_t modifiers; + uint8_t pad0[2]; +} xcb_ungrab_button_request_t; + +/** Opcode for xcb_change_active_pointer_grab. */ +#define XCB_CHANGE_ACTIVE_POINTER_GRAB 30 + +/** + * @brief xcb_change_active_pointer_grab_request_t + **/ +typedef struct xcb_change_active_pointer_grab_request_t { + uint8_t major_opcode; + uint8_t pad0; + uint16_t length; + xcb_cursor_t cursor; + xcb_timestamp_t time; + uint16_t event_mask; + uint8_t pad1[2]; +} xcb_change_active_pointer_grab_request_t; + +/** + * @brief xcb_grab_keyboard_cookie_t + **/ +typedef struct xcb_grab_keyboard_cookie_t { + unsigned int sequence; +} xcb_grab_keyboard_cookie_t; + +/** Opcode for xcb_grab_keyboard. */ +#define XCB_GRAB_KEYBOARD 31 + +/** + * @brief xcb_grab_keyboard_request_t + **/ +typedef struct xcb_grab_keyboard_request_t { + uint8_t major_opcode; + uint8_t owner_events; + uint16_t length; + xcb_window_t grab_window; + xcb_timestamp_t time; + uint8_t pointer_mode; + uint8_t keyboard_mode; + uint8_t pad0[2]; +} xcb_grab_keyboard_request_t; + +/** + * @brief xcb_grab_keyboard_reply_t + **/ +typedef struct xcb_grab_keyboard_reply_t { + uint8_t response_type; + uint8_t status; + uint16_t sequence; + uint32_t length; +} xcb_grab_keyboard_reply_t; + +/** Opcode for xcb_ungrab_keyboard. */ +#define XCB_UNGRAB_KEYBOARD 32 + +/** + * @brief xcb_ungrab_keyboard_request_t + **/ +typedef struct xcb_ungrab_keyboard_request_t { + uint8_t major_opcode; + uint8_t pad0; + uint16_t length; + xcb_timestamp_t time; +} xcb_ungrab_keyboard_request_t; + +typedef enum xcb_grab_t { + XCB_GRAB_ANY = 0 +} xcb_grab_t; + +/** Opcode for xcb_grab_key. */ +#define XCB_GRAB_KEY 33 + +/** + * @brief xcb_grab_key_request_t + **/ +typedef struct xcb_grab_key_request_t { + uint8_t major_opcode; + uint8_t owner_events; + uint16_t length; + xcb_window_t grab_window; + uint16_t modifiers; + xcb_keycode_t key; + uint8_t pointer_mode; + uint8_t keyboard_mode; + uint8_t pad0[3]; +} xcb_grab_key_request_t; + +/** Opcode for xcb_ungrab_key. */ +#define XCB_UNGRAB_KEY 34 + +/** + * @brief xcb_ungrab_key_request_t + **/ +typedef struct xcb_ungrab_key_request_t { + uint8_t major_opcode; + xcb_keycode_t key; + uint16_t length; + xcb_window_t grab_window; + uint16_t modifiers; + uint8_t pad0[2]; +} xcb_ungrab_key_request_t; + +typedef enum xcb_allow_t { + XCB_ALLOW_ASYNC_POINTER = 0, +/**< For AsyncPointer, if the pointer is frozen by the client, pointer event +processing continues normally. If the pointer is frozen twice by the client on +behalf of two separate grabs, AsyncPointer thaws for both. AsyncPointer has no +effect if the pointer is not frozen by the client, but the pointer need not be +grabbed by the client. + +TODO: rewrite this in more understandable terms. */ + + XCB_ALLOW_SYNC_POINTER = 1, +/**< For SyncPointer, if the pointer is frozen and actively grabbed by the client, +pointer event processing continues normally until the next ButtonPress or +ButtonRelease event is reported to the client, at which time the pointer again +appears to freeze. However, if the reported event causes the pointer grab to be +released, then the pointer does not freeze. SyncPointer has no effect if the +pointer is not frozen by the client or if the pointer is not grabbed by the +client. */ + + XCB_ALLOW_REPLAY_POINTER = 2, +/**< For ReplayPointer, if the pointer is actively grabbed by the client and is +frozen as the result of an event having been sent to the client (either from +the activation of a GrabButton or from a previous AllowEvents with mode +SyncPointer but not from a GrabPointer), then the pointer grab is released and +that event is completely reprocessed, this time ignoring any passive grabs at +or above (towards the root) the grab-window of the grab just released. The +request has no effect if the pointer is not grabbed by the client or if the +pointer is not frozen as the result of an event. */ + + XCB_ALLOW_ASYNC_KEYBOARD = 3, +/**< For AsyncKeyboard, if the keyboard is frozen by the client, keyboard event +processing continues normally. If the keyboard is frozen twice by the client on +behalf of two separate grabs, AsyncKeyboard thaws for both. AsyncKeyboard has +no effect if the keyboard is not frozen by the client, but the keyboard need +not be grabbed by the client. */ + + XCB_ALLOW_SYNC_KEYBOARD = 4, +/**< For SyncKeyboard, if the keyboard is frozen and actively grabbed by the client, +keyboard event processing continues normally until the next KeyPress or +KeyRelease event is reported to the client, at which time the keyboard again +appears to freeze. However, if the reported event causes the keyboard grab to +be released, then the keyboard does not freeze. SyncKeyboard has no effect if +the keyboard is not frozen by the client or if the keyboard is not grabbed by +the client. */ + + XCB_ALLOW_REPLAY_KEYBOARD = 5, +/**< For ReplayKeyboard, if the keyboard is actively grabbed by the client and is +frozen as the result of an event having been sent to the client (either from +the activation of a GrabKey or from a previous AllowEvents with mode +SyncKeyboard but not from a GrabKeyboard), then the keyboard grab is released +and that event is completely reprocessed, this time ignoring any passive grabs +at or above (towards the root) the grab-window of the grab just released. The +request has no effect if the keyboard is not grabbed by the client or if the +keyboard is not frozen as the result of an event. */ + + XCB_ALLOW_ASYNC_BOTH = 6, +/**< For AsyncBoth, if the pointer and the keyboard are frozen by the client, event +processing for both devices continues normally. If a device is frozen twice by +the client on behalf of two separate grabs, AsyncBoth thaws for both. AsyncBoth +has no effect unless both pointer and keyboard are frozen by the client. */ + + XCB_ALLOW_SYNC_BOTH = 7 +/**< For SyncBoth, if both pointer and keyboard are frozen by the client, event +processing (for both devices) continues normally until the next ButtonPress, +ButtonRelease, KeyPress, or KeyRelease event is reported to the client for a +grabbed device (button event for the pointer, key event for the keyboard), at +which time the devices again appear to freeze. However, if the reported event +causes the grab to be released, then the devices do not freeze (but if the +other device is still grabbed, then a subsequent event for it will still cause +both devices to freeze). SyncBoth has no effect unless both pointer and +keyboard are frozen by the client. If the pointer or keyboard is frozen twice +by the client on behalf of two separate grabs, SyncBoth thaws for both (but a +subsequent freeze for SyncBoth will only freeze each device once). */ + +} xcb_allow_t; + +/** Opcode for xcb_allow_events. */ +#define XCB_ALLOW_EVENTS 35 + +/** + * @brief xcb_allow_events_request_t + **/ +typedef struct xcb_allow_events_request_t { + uint8_t major_opcode; + uint8_t mode; + uint16_t length; + xcb_timestamp_t time; +} xcb_allow_events_request_t; + +/** Opcode for xcb_grab_server. */ +#define XCB_GRAB_SERVER 36 + +/** + * @brief xcb_grab_server_request_t + **/ +typedef struct xcb_grab_server_request_t { + uint8_t major_opcode; + uint8_t pad0; + uint16_t length; +} xcb_grab_server_request_t; + +/** Opcode for xcb_ungrab_server. */ +#define XCB_UNGRAB_SERVER 37 + +/** + * @brief xcb_ungrab_server_request_t + **/ +typedef struct xcb_ungrab_server_request_t { + uint8_t major_opcode; + uint8_t pad0; + uint16_t length; +} xcb_ungrab_server_request_t; + +/** + * @brief xcb_query_pointer_cookie_t + **/ +typedef struct xcb_query_pointer_cookie_t { + unsigned int sequence; +} xcb_query_pointer_cookie_t; + +/** Opcode for xcb_query_pointer. */ +#define XCB_QUERY_POINTER 38 + +/** + * @brief xcb_query_pointer_request_t + **/ +typedef struct xcb_query_pointer_request_t { + uint8_t major_opcode; + uint8_t pad0; + uint16_t length; + xcb_window_t window; +} xcb_query_pointer_request_t; + +/** + * @brief xcb_query_pointer_reply_t + **/ +typedef struct xcb_query_pointer_reply_t { + uint8_t response_type; + uint8_t same_screen; + uint16_t sequence; + uint32_t length; + xcb_window_t root; + xcb_window_t child; + int16_t root_x; + int16_t root_y; + int16_t win_x; + int16_t win_y; + uint16_t mask; + uint8_t pad0[2]; +} xcb_query_pointer_reply_t; + +/** + * @brief xcb_timecoord_t + **/ +typedef struct xcb_timecoord_t { + xcb_timestamp_t time; + int16_t x; + int16_t y; +} xcb_timecoord_t; + +/** + * @brief xcb_timecoord_iterator_t + **/ +typedef struct xcb_timecoord_iterator_t { + xcb_timecoord_t *data; + int rem; + int index; +} xcb_timecoord_iterator_t; + +/** + * @brief xcb_get_motion_events_cookie_t + **/ +typedef struct xcb_get_motion_events_cookie_t { + unsigned int sequence; +} xcb_get_motion_events_cookie_t; + +/** Opcode for xcb_get_motion_events. */ +#define XCB_GET_MOTION_EVENTS 39 + +/** + * @brief xcb_get_motion_events_request_t + **/ +typedef struct xcb_get_motion_events_request_t { + uint8_t major_opcode; + uint8_t pad0; + uint16_t length; + xcb_window_t window; + xcb_timestamp_t start; + xcb_timestamp_t stop; +} xcb_get_motion_events_request_t; + +/** + * @brief xcb_get_motion_events_reply_t + **/ +typedef struct xcb_get_motion_events_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint32_t events_len; + uint8_t pad1[20]; +} xcb_get_motion_events_reply_t; + +/** + * @brief xcb_translate_coordinates_cookie_t + **/ +typedef struct xcb_translate_coordinates_cookie_t { + unsigned int sequence; +} xcb_translate_coordinates_cookie_t; + +/** Opcode for xcb_translate_coordinates. */ +#define XCB_TRANSLATE_COORDINATES 40 + +/** + * @brief xcb_translate_coordinates_request_t + **/ +typedef struct xcb_translate_coordinates_request_t { + uint8_t major_opcode; + uint8_t pad0; + uint16_t length; + xcb_window_t src_window; + xcb_window_t dst_window; + int16_t src_x; + int16_t src_y; +} xcb_translate_coordinates_request_t; + +/** + * @brief xcb_translate_coordinates_reply_t + **/ +typedef struct xcb_translate_coordinates_reply_t { + uint8_t response_type; + uint8_t same_screen; + uint16_t sequence; + uint32_t length; + xcb_window_t child; + int16_t dst_x; + int16_t dst_y; +} xcb_translate_coordinates_reply_t; + +/** Opcode for xcb_warp_pointer. */ +#define XCB_WARP_POINTER 41 + +/** + * @brief xcb_warp_pointer_request_t + **/ +typedef struct xcb_warp_pointer_request_t { + uint8_t major_opcode; + uint8_t pad0; + uint16_t length; + xcb_window_t src_window; + xcb_window_t dst_window; + int16_t src_x; + int16_t src_y; + uint16_t src_width; + uint16_t src_height; + int16_t dst_x; + int16_t dst_y; +} xcb_warp_pointer_request_t; + +typedef enum xcb_input_focus_t { + XCB_INPUT_FOCUS_NONE = 0, +/**< The focus reverts to `XCB_NONE`, so no window will have the input focus. */ + + XCB_INPUT_FOCUS_POINTER_ROOT = 1, +/**< The focus reverts to `XCB_POINTER_ROOT` respectively. When the focus reverts, +FocusIn and FocusOut events are generated, but the last-focus-change time is +not changed. */ + + XCB_INPUT_FOCUS_PARENT = 2, +/**< The focus reverts to the parent (or closest viewable ancestor) and the new +revert_to value is `XCB_INPUT_FOCUS_NONE`. */ + + XCB_INPUT_FOCUS_FOLLOW_KEYBOARD = 3 +/**< NOT YET DOCUMENTED. Only relevant for the xinput extension. */ + +} xcb_input_focus_t; + +/** Opcode for xcb_set_input_focus. */ +#define XCB_SET_INPUT_FOCUS 42 + +/** + * @brief xcb_set_input_focus_request_t + **/ +typedef struct xcb_set_input_focus_request_t { + uint8_t major_opcode; + uint8_t revert_to; + uint16_t length; + xcb_window_t focus; + xcb_timestamp_t time; +} xcb_set_input_focus_request_t; + +/** + * @brief xcb_get_input_focus_cookie_t + **/ +typedef struct xcb_get_input_focus_cookie_t { + unsigned int sequence; +} xcb_get_input_focus_cookie_t; + +/** Opcode for xcb_get_input_focus. */ +#define XCB_GET_INPUT_FOCUS 43 + +/** + * @brief xcb_get_input_focus_request_t + **/ +typedef struct xcb_get_input_focus_request_t { + uint8_t major_opcode; + uint8_t pad0; + uint16_t length; +} xcb_get_input_focus_request_t; + +/** + * @brief xcb_get_input_focus_reply_t + **/ +typedef struct xcb_get_input_focus_reply_t { + uint8_t response_type; + uint8_t revert_to; + uint16_t sequence; + uint32_t length; + xcb_window_t focus; +} xcb_get_input_focus_reply_t; + +/** + * @brief xcb_query_keymap_cookie_t + **/ +typedef struct xcb_query_keymap_cookie_t { + unsigned int sequence; +} xcb_query_keymap_cookie_t; + +/** Opcode for xcb_query_keymap. */ +#define XCB_QUERY_KEYMAP 44 + +/** + * @brief xcb_query_keymap_request_t + **/ +typedef struct xcb_query_keymap_request_t { + uint8_t major_opcode; + uint8_t pad0; + uint16_t length; +} xcb_query_keymap_request_t; + +/** + * @brief xcb_query_keymap_reply_t + **/ +typedef struct xcb_query_keymap_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint8_t keys[32]; +} xcb_query_keymap_reply_t; + +/** Opcode for xcb_open_font. */ +#define XCB_OPEN_FONT 45 + +/** + * @brief xcb_open_font_request_t + **/ +typedef struct xcb_open_font_request_t { + uint8_t major_opcode; + uint8_t pad0; + uint16_t length; + xcb_font_t fid; + uint16_t name_len; + uint8_t pad1[2]; +} xcb_open_font_request_t; + +/** Opcode for xcb_close_font. */ +#define XCB_CLOSE_FONT 46 + +/** + * @brief xcb_close_font_request_t + **/ +typedef struct xcb_close_font_request_t { + uint8_t major_opcode; + uint8_t pad0; + uint16_t length; + xcb_font_t font; +} xcb_close_font_request_t; + +typedef enum xcb_font_draw_t { + XCB_FONT_DRAW_LEFT_TO_RIGHT = 0, + XCB_FONT_DRAW_RIGHT_TO_LEFT = 1 +} xcb_font_draw_t; + +/** + * @brief xcb_fontprop_t + **/ +typedef struct xcb_fontprop_t { + xcb_atom_t name; + uint32_t value; +} xcb_fontprop_t; + +/** + * @brief xcb_fontprop_iterator_t + **/ +typedef struct xcb_fontprop_iterator_t { + xcb_fontprop_t *data; + int rem; + int index; +} xcb_fontprop_iterator_t; + +/** + * @brief xcb_charinfo_t + **/ +typedef struct xcb_charinfo_t { + int16_t left_side_bearing; + int16_t right_side_bearing; + int16_t character_width; + int16_t ascent; + int16_t descent; + uint16_t attributes; +} xcb_charinfo_t; + +/** + * @brief xcb_charinfo_iterator_t + **/ +typedef struct xcb_charinfo_iterator_t { + xcb_charinfo_t *data; + int rem; + int index; +} xcb_charinfo_iterator_t; + +/** + * @brief xcb_query_font_cookie_t + **/ +typedef struct xcb_query_font_cookie_t { + unsigned int sequence; +} xcb_query_font_cookie_t; + +/** Opcode for xcb_query_font. */ +#define XCB_QUERY_FONT 47 + +/** + * @brief xcb_query_font_request_t + **/ +typedef struct xcb_query_font_request_t { + uint8_t major_opcode; + uint8_t pad0; + uint16_t length; + xcb_fontable_t font; +} xcb_query_font_request_t; + +/** + * @brief xcb_query_font_reply_t + **/ +typedef struct xcb_query_font_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + xcb_charinfo_t min_bounds; + uint8_t pad1[4]; + xcb_charinfo_t max_bounds; + uint8_t pad2[4]; + uint16_t min_char_or_byte2; + uint16_t max_char_or_byte2; + uint16_t default_char; + uint16_t properties_len; + uint8_t draw_direction; + uint8_t min_byte1; + uint8_t max_byte1; + uint8_t all_chars_exist; + int16_t font_ascent; + int16_t font_descent; + uint32_t char_infos_len; +} xcb_query_font_reply_t; + +/** + * @brief xcb_query_text_extents_cookie_t + **/ +typedef struct xcb_query_text_extents_cookie_t { + unsigned int sequence; +} xcb_query_text_extents_cookie_t; + +/** Opcode for xcb_query_text_extents. */ +#define XCB_QUERY_TEXT_EXTENTS 48 + +/** + * @brief xcb_query_text_extents_request_t + **/ +typedef struct xcb_query_text_extents_request_t { + uint8_t major_opcode; + uint8_t odd_length; + uint16_t length; + xcb_fontable_t font; +} xcb_query_text_extents_request_t; + +/** + * @brief xcb_query_text_extents_reply_t + **/ +typedef struct xcb_query_text_extents_reply_t { + uint8_t response_type; + uint8_t draw_direction; + uint16_t sequence; + uint32_t length; + int16_t font_ascent; + int16_t font_descent; + int16_t overall_ascent; + int16_t overall_descent; + int32_t overall_width; + int32_t overall_left; + int32_t overall_right; +} xcb_query_text_extents_reply_t; + +/** + * @brief xcb_str_t + **/ +typedef struct xcb_str_t { + uint8_t name_len; +} xcb_str_t; + +/** + * @brief xcb_str_iterator_t + **/ +typedef struct xcb_str_iterator_t { + xcb_str_t *data; + int rem; + int index; +} xcb_str_iterator_t; + +/** + * @brief xcb_list_fonts_cookie_t + **/ +typedef struct xcb_list_fonts_cookie_t { + unsigned int sequence; +} xcb_list_fonts_cookie_t; + +/** Opcode for xcb_list_fonts. */ +#define XCB_LIST_FONTS 49 + +/** + * @brief xcb_list_fonts_request_t + **/ +typedef struct xcb_list_fonts_request_t { + uint8_t major_opcode; + uint8_t pad0; + uint16_t length; + uint16_t max_names; + uint16_t pattern_len; +} xcb_list_fonts_request_t; + +/** + * @brief xcb_list_fonts_reply_t + **/ +typedef struct xcb_list_fonts_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint16_t names_len; + uint8_t pad1[22]; +} xcb_list_fonts_reply_t; + +/** + * @brief xcb_list_fonts_with_info_cookie_t + **/ +typedef struct xcb_list_fonts_with_info_cookie_t { + unsigned int sequence; +} xcb_list_fonts_with_info_cookie_t; + +/** Opcode for xcb_list_fonts_with_info. */ +#define XCB_LIST_FONTS_WITH_INFO 50 + +/** + * @brief xcb_list_fonts_with_info_request_t + **/ +typedef struct xcb_list_fonts_with_info_request_t { + uint8_t major_opcode; + uint8_t pad0; + uint16_t length; + uint16_t max_names; + uint16_t pattern_len; +} xcb_list_fonts_with_info_request_t; + +/** + * @brief xcb_list_fonts_with_info_reply_t + **/ +typedef struct xcb_list_fonts_with_info_reply_t { + uint8_t response_type; + uint8_t name_len; + uint16_t sequence; + uint32_t length; + xcb_charinfo_t min_bounds; + uint8_t pad0[4]; + xcb_charinfo_t max_bounds; + uint8_t pad1[4]; + uint16_t min_char_or_byte2; + uint16_t max_char_or_byte2; + uint16_t default_char; + uint16_t properties_len; + uint8_t draw_direction; + uint8_t min_byte1; + uint8_t max_byte1; + uint8_t all_chars_exist; + int16_t font_ascent; + int16_t font_descent; + uint32_t replies_hint; +} xcb_list_fonts_with_info_reply_t; + +/** Opcode for xcb_set_font_path. */ +#define XCB_SET_FONT_PATH 51 + +/** + * @brief xcb_set_font_path_request_t + **/ +typedef struct xcb_set_font_path_request_t { + uint8_t major_opcode; + uint8_t pad0; + uint16_t length; + uint16_t font_qty; + uint8_t pad1[2]; +} xcb_set_font_path_request_t; + +/** + * @brief xcb_get_font_path_cookie_t + **/ +typedef struct xcb_get_font_path_cookie_t { + unsigned int sequence; +} xcb_get_font_path_cookie_t; + +/** Opcode for xcb_get_font_path. */ +#define XCB_GET_FONT_PATH 52 + +/** + * @brief xcb_get_font_path_request_t + **/ +typedef struct xcb_get_font_path_request_t { + uint8_t major_opcode; + uint8_t pad0; + uint16_t length; +} xcb_get_font_path_request_t; + +/** + * @brief xcb_get_font_path_reply_t + **/ +typedef struct xcb_get_font_path_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint16_t path_len; + uint8_t pad1[22]; +} xcb_get_font_path_reply_t; + +/** Opcode for xcb_create_pixmap. */ +#define XCB_CREATE_PIXMAP 53 + +/** + * @brief xcb_create_pixmap_request_t + **/ +typedef struct xcb_create_pixmap_request_t { + uint8_t major_opcode; + uint8_t depth; + uint16_t length; + xcb_pixmap_t pid; + xcb_drawable_t drawable; + uint16_t width; + uint16_t height; +} xcb_create_pixmap_request_t; + +/** Opcode for xcb_free_pixmap. */ +#define XCB_FREE_PIXMAP 54 + +/** + * @brief xcb_free_pixmap_request_t + **/ +typedef struct xcb_free_pixmap_request_t { + uint8_t major_opcode; + uint8_t pad0; + uint16_t length; + xcb_pixmap_t pixmap; +} xcb_free_pixmap_request_t; + +typedef enum xcb_gc_t { + XCB_GC_FUNCTION = 1, +/**< TODO: Refer to GX */ + + XCB_GC_PLANE_MASK = 2, +/**< In graphics operations, given a source and destination pixel, the result is +computed bitwise on corresponding bits of the pixels; that is, a Boolean +operation is performed in each bit plane. The plane-mask restricts the +operation to a subset of planes, so the result is: + + ((src FUNC dst) AND plane-mask) OR (dst AND (NOT plane-mask)) */ + + XCB_GC_FOREGROUND = 4, +/**< Foreground colorpixel. */ + + XCB_GC_BACKGROUND = 8, +/**< Background colorpixel. */ + + XCB_GC_LINE_WIDTH = 16, +/**< The line-width is measured in pixels and can be greater than or equal to one, a wide line, or the +special value zero, a thin line. */ + + XCB_GC_LINE_STYLE = 32, +/**< The line-style defines which sections of a line are drawn: +Solid The full path of the line is drawn. +DoubleDash The full path of the line is drawn, but the even dashes are filled differently + than the odd dashes (see fill-style), with Butt cap-style used where even and + odd dashes meet. +OnOffDash Only the even dashes are drawn, and cap-style applies to all internal ends of + the individual dashes (except NotLast is treated as Butt). */ + + XCB_GC_CAP_STYLE = 64, +/**< The cap-style defines how the endpoints of a path are drawn: +NotLast The result is equivalent to Butt, except that for a line-width of zero the final + endpoint is not drawn. +Butt The result is square at the endpoint (perpendicular to the slope of the line) + with no projection beyond. +Round The result is a circular arc with its diameter equal to the line-width, centered + on the endpoint; it is equivalent to Butt for line-width zero. +Projecting The result is square at the end, but the path continues beyond the endpoint for + a distance equal to half the line-width; it is equivalent to Butt for line-width + zero. */ + + XCB_GC_JOIN_STYLE = 128, +/**< The join-style defines how corners are drawn for wide lines: +Miter The outer edges of the two lines extend to meet at an angle. However, if the + angle is less than 11 degrees, a Bevel join-style is used instead. +Round The result is a circular arc with a diameter equal to the line-width, centered + on the joinpoint. +Bevel The result is Butt endpoint styles, and then the triangular notch is filled. */ + + XCB_GC_FILL_STYLE = 256, +/**< The fill-style defines the contents of the source for line, text, and fill requests. For all text and fill +requests (for example, PolyText8, PolyText16, PolyFillRectangle, FillPoly, and PolyFillArc) +as well as for line requests with line-style Solid, (for example, PolyLine, PolySegment, +PolyRectangle, PolyArc) and for the even dashes for line requests with line-style OnOffDash +or DoubleDash: +Solid Foreground +Tiled Tile +OpaqueStippled A tile with the same width and height as stipple but with background + everywhere stipple has a zero and with foreground everywhere stipple + has a one +Stippled Foreground masked by stipple +For the odd dashes for line requests with line-style DoubleDash: +Solid Background +Tiled Same as for even dashes +OpaqueStippled Same as for even dashes +Stippled Background masked by stipple */ + + XCB_GC_FILL_RULE = 512, +/**< */ + + XCB_GC_TILE = 1024, +/**< The tile/stipple represents an infinite two-dimensional plane with the tile/stipple replicated in all +dimensions. When that plane is superimposed on the drawable for use in a graphics operation, +the upper-left corner of some instance of the tile/stipple is at the coordinates within the drawable +specified by the tile/stipple origin. The tile/stipple and clip origins are interpreted relative to the +origin of whatever destination drawable is specified in a graphics request. +The tile pixmap must have the same root and depth as the gcontext (or a Match error results). +The stipple pixmap must have depth one and must have the same root as the gcontext (or a +Match error results). For fill-style Stippled (but not fill-style +OpaqueStippled), the stipple pattern is tiled in a single plane and acts as an +additional clip mask to be ANDed with the clip-mask. +Any size pixmap can be used for tiling or stippling, although some sizes may be faster to use than +others. */ + + XCB_GC_STIPPLE = 2048, +/**< The tile/stipple represents an infinite two-dimensional plane with the tile/stipple replicated in all +dimensions. When that plane is superimposed on the drawable for use in a graphics operation, +the upper-left corner of some instance of the tile/stipple is at the coordinates within the drawable +specified by the tile/stipple origin. The tile/stipple and clip origins are interpreted relative to the +origin of whatever destination drawable is specified in a graphics request. +The tile pixmap must have the same root and depth as the gcontext (or a Match error results). +The stipple pixmap must have depth one and must have the same root as the gcontext (or a +Match error results). For fill-style Stippled (but not fill-style +OpaqueStippled), the stipple pattern is tiled in a single plane and acts as an +additional clip mask to be ANDed with the clip-mask. +Any size pixmap can be used for tiling or stippling, although some sizes may be faster to use than +others. */ + + XCB_GC_TILE_STIPPLE_ORIGIN_X = 4096, +/**< TODO */ + + XCB_GC_TILE_STIPPLE_ORIGIN_Y = 8192, +/**< TODO */ + + XCB_GC_FONT = 16384, +/**< Which font to use for the `ImageText8` and `ImageText16` requests. */ + + XCB_GC_SUBWINDOW_MODE = 32768, +/**< For ClipByChildren, both source and destination windows are additionally +clipped by all viewable InputOutput children. For IncludeInferiors, neither +source nor destination window is +clipped by inferiors. This will result in including subwindow contents in the source and drawing +through subwindow boundaries of the destination. The use of IncludeInferiors with a source or +destination window of one depth with mapped inferiors of differing depth is not illegal, but the +semantics is undefined by the core protocol. */ + + XCB_GC_GRAPHICS_EXPOSURES = 65536, +/**< Whether ExposureEvents should be generated (1) or not (0). + +The default is 1. */ + + XCB_GC_CLIP_ORIGIN_X = 131072, +/**< TODO */ + + XCB_GC_CLIP_ORIGIN_Y = 262144, +/**< TODO */ + + XCB_GC_CLIP_MASK = 524288, +/**< The clip-mask restricts writes to the destination drawable. Only pixels where the clip-mask has +bits set to 1 are drawn. Pixels are not drawn outside the area covered by the clip-mask or where +the clip-mask has bits set to 0. The clip-mask affects all graphics requests, but it does not clip +sources. The clip-mask origin is interpreted relative to the origin of whatever destination drawable is specified in a graphics request. If a pixmap is specified as the clip-mask, it must have +depth 1 and have the same root as the gcontext (or a Match error results). If clip-mask is None, +then pixels are always drawn, regardless of the clip origin. The clip-mask can also be set with the +SetClipRectangles request. */ + + XCB_GC_DASH_OFFSET = 1048576, +/**< TODO */ + + XCB_GC_DASH_LIST = 2097152, +/**< TODO */ + + XCB_GC_ARC_MODE = 4194304 +/**< TODO */ + +} xcb_gc_t; + +typedef enum xcb_gx_t { + XCB_GX_CLEAR = 0, + XCB_GX_AND = 1, + XCB_GX_AND_REVERSE = 2, + XCB_GX_COPY = 3, + XCB_GX_AND_INVERTED = 4, + XCB_GX_NOOP = 5, + XCB_GX_XOR = 6, + XCB_GX_OR = 7, + XCB_GX_NOR = 8, + XCB_GX_EQUIV = 9, + XCB_GX_INVERT = 10, + XCB_GX_OR_REVERSE = 11, + XCB_GX_COPY_INVERTED = 12, + XCB_GX_OR_INVERTED = 13, + XCB_GX_NAND = 14, + XCB_GX_SET = 15 +} xcb_gx_t; + +typedef enum xcb_line_style_t { + XCB_LINE_STYLE_SOLID = 0, + XCB_LINE_STYLE_ON_OFF_DASH = 1, + XCB_LINE_STYLE_DOUBLE_DASH = 2 +} xcb_line_style_t; + +typedef enum xcb_cap_style_t { + XCB_CAP_STYLE_NOT_LAST = 0, + XCB_CAP_STYLE_BUTT = 1, + XCB_CAP_STYLE_ROUND = 2, + XCB_CAP_STYLE_PROJECTING = 3 +} xcb_cap_style_t; + +typedef enum xcb_join_style_t { + XCB_JOIN_STYLE_MITER = 0, + XCB_JOIN_STYLE_ROUND = 1, + XCB_JOIN_STYLE_BEVEL = 2 +} xcb_join_style_t; + +typedef enum xcb_fill_style_t { + XCB_FILL_STYLE_SOLID = 0, + XCB_FILL_STYLE_TILED = 1, + XCB_FILL_STYLE_STIPPLED = 2, + XCB_FILL_STYLE_OPAQUE_STIPPLED = 3 +} xcb_fill_style_t; + +typedef enum xcb_fill_rule_t { + XCB_FILL_RULE_EVEN_ODD = 0, + XCB_FILL_RULE_WINDING = 1 +} xcb_fill_rule_t; + +typedef enum xcb_subwindow_mode_t { + XCB_SUBWINDOW_MODE_CLIP_BY_CHILDREN = 0, + XCB_SUBWINDOW_MODE_INCLUDE_INFERIORS = 1 +} xcb_subwindow_mode_t; + +typedef enum xcb_arc_mode_t { + XCB_ARC_MODE_CHORD = 0, + XCB_ARC_MODE_PIE_SLICE = 1 +} xcb_arc_mode_t; + +/** + * @brief xcb_create_gc_value_list_t + **/ +typedef struct xcb_create_gc_value_list_t { + uint32_t function; + uint32_t plane_mask; + uint32_t foreground; + uint32_t background; + uint32_t line_width; + uint32_t line_style; + uint32_t cap_style; + uint32_t join_style; + uint32_t fill_style; + uint32_t fill_rule; + xcb_pixmap_t tile; + xcb_pixmap_t stipple; + int32_t tile_stipple_x_origin; + int32_t tile_stipple_y_origin; + xcb_font_t font; + uint32_t subwindow_mode; + xcb_bool32_t graphics_exposures; + int32_t clip_x_origin; + int32_t clip_y_origin; + xcb_pixmap_t clip_mask; + uint32_t dash_offset; + uint32_t dashes; + uint32_t arc_mode; +} xcb_create_gc_value_list_t; + +/** Opcode for xcb_create_gc. */ +#define XCB_CREATE_GC 55 + +/** + * @brief xcb_create_gc_request_t + **/ +typedef struct xcb_create_gc_request_t { + uint8_t major_opcode; + uint8_t pad0; + uint16_t length; + xcb_gcontext_t cid; + xcb_drawable_t drawable; + uint32_t value_mask; +} xcb_create_gc_request_t; + +/** + * @brief xcb_change_gc_value_list_t + **/ +typedef struct xcb_change_gc_value_list_t { + uint32_t function; + uint32_t plane_mask; + uint32_t foreground; + uint32_t background; + uint32_t line_width; + uint32_t line_style; + uint32_t cap_style; + uint32_t join_style; + uint32_t fill_style; + uint32_t fill_rule; + xcb_pixmap_t tile; + xcb_pixmap_t stipple; + int32_t tile_stipple_x_origin; + int32_t tile_stipple_y_origin; + xcb_font_t font; + uint32_t subwindow_mode; + xcb_bool32_t graphics_exposures; + int32_t clip_x_origin; + int32_t clip_y_origin; + xcb_pixmap_t clip_mask; + uint32_t dash_offset; + uint32_t dashes; + uint32_t arc_mode; +} xcb_change_gc_value_list_t; + +/** Opcode for xcb_change_gc. */ +#define XCB_CHANGE_GC 56 + +/** + * @brief xcb_change_gc_request_t + **/ +typedef struct xcb_change_gc_request_t { + uint8_t major_opcode; + uint8_t pad0; + uint16_t length; + xcb_gcontext_t gc; + uint32_t value_mask; +} xcb_change_gc_request_t; + +/** Opcode for xcb_copy_gc. */ +#define XCB_COPY_GC 57 + +/** + * @brief xcb_copy_gc_request_t + **/ +typedef struct xcb_copy_gc_request_t { + uint8_t major_opcode; + uint8_t pad0; + uint16_t length; + xcb_gcontext_t src_gc; + xcb_gcontext_t dst_gc; + uint32_t value_mask; +} xcb_copy_gc_request_t; + +/** Opcode for xcb_set_dashes. */ +#define XCB_SET_DASHES 58 + +/** + * @brief xcb_set_dashes_request_t + **/ +typedef struct xcb_set_dashes_request_t { + uint8_t major_opcode; + uint8_t pad0; + uint16_t length; + xcb_gcontext_t gc; + uint16_t dash_offset; + uint16_t dashes_len; +} xcb_set_dashes_request_t; + +typedef enum xcb_clip_ordering_t { + XCB_CLIP_ORDERING_UNSORTED = 0, + XCB_CLIP_ORDERING_Y_SORTED = 1, + XCB_CLIP_ORDERING_YX_SORTED = 2, + XCB_CLIP_ORDERING_YX_BANDED = 3 +} xcb_clip_ordering_t; + +/** Opcode for xcb_set_clip_rectangles. */ +#define XCB_SET_CLIP_RECTANGLES 59 + +/** + * @brief xcb_set_clip_rectangles_request_t + **/ +typedef struct xcb_set_clip_rectangles_request_t { + uint8_t major_opcode; + uint8_t ordering; + uint16_t length; + xcb_gcontext_t gc; + int16_t clip_x_origin; + int16_t clip_y_origin; +} xcb_set_clip_rectangles_request_t; + +/** Opcode for xcb_free_gc. */ +#define XCB_FREE_GC 60 + +/** + * @brief xcb_free_gc_request_t + **/ +typedef struct xcb_free_gc_request_t { + uint8_t major_opcode; + uint8_t pad0; + uint16_t length; + xcb_gcontext_t gc; +} xcb_free_gc_request_t; + +/** Opcode for xcb_clear_area. */ +#define XCB_CLEAR_AREA 61 + +/** + * @brief xcb_clear_area_request_t + **/ +typedef struct xcb_clear_area_request_t { + uint8_t major_opcode; + uint8_t exposures; + uint16_t length; + xcb_window_t window; + int16_t x; + int16_t y; + uint16_t width; + uint16_t height; +} xcb_clear_area_request_t; + +/** Opcode for xcb_copy_area. */ +#define XCB_COPY_AREA 62 + +/** + * @brief xcb_copy_area_request_t + **/ +typedef struct xcb_copy_area_request_t { + uint8_t major_opcode; + uint8_t pad0; + uint16_t length; + xcb_drawable_t src_drawable; + xcb_drawable_t dst_drawable; + xcb_gcontext_t gc; + int16_t src_x; + int16_t src_y; + int16_t dst_x; + int16_t dst_y; + uint16_t width; + uint16_t height; +} xcb_copy_area_request_t; + +/** Opcode for xcb_copy_plane. */ +#define XCB_COPY_PLANE 63 + +/** + * @brief xcb_copy_plane_request_t + **/ +typedef struct xcb_copy_plane_request_t { + uint8_t major_opcode; + uint8_t pad0; + uint16_t length; + xcb_drawable_t src_drawable; + xcb_drawable_t dst_drawable; + xcb_gcontext_t gc; + int16_t src_x; + int16_t src_y; + int16_t dst_x; + int16_t dst_y; + uint16_t width; + uint16_t height; + uint32_t bit_plane; +} xcb_copy_plane_request_t; + +typedef enum xcb_coord_mode_t { + XCB_COORD_MODE_ORIGIN = 0, +/**< Treats all coordinates as relative to the origin. */ + + XCB_COORD_MODE_PREVIOUS = 1 +/**< Treats all coordinates after the first as relative to the previous coordinate. */ + +} xcb_coord_mode_t; + +/** Opcode for xcb_poly_point. */ +#define XCB_POLY_POINT 64 + +/** + * @brief xcb_poly_point_request_t + **/ +typedef struct xcb_poly_point_request_t { + uint8_t major_opcode; + uint8_t coordinate_mode; + uint16_t length; + xcb_drawable_t drawable; + xcb_gcontext_t gc; +} xcb_poly_point_request_t; + +/** Opcode for xcb_poly_line. */ +#define XCB_POLY_LINE 65 + +/** + * @brief xcb_poly_line_request_t + **/ +typedef struct xcb_poly_line_request_t { + uint8_t major_opcode; + uint8_t coordinate_mode; + uint16_t length; + xcb_drawable_t drawable; + xcb_gcontext_t gc; +} xcb_poly_line_request_t; + +/** + * @brief xcb_segment_t + **/ +typedef struct xcb_segment_t { + int16_t x1; + int16_t y1; + int16_t x2; + int16_t y2; +} xcb_segment_t; + +/** + * @brief xcb_segment_iterator_t + **/ +typedef struct xcb_segment_iterator_t { + xcb_segment_t *data; + int rem; + int index; +} xcb_segment_iterator_t; + +/** Opcode for xcb_poly_segment. */ +#define XCB_POLY_SEGMENT 66 + +/** + * @brief xcb_poly_segment_request_t + **/ +typedef struct xcb_poly_segment_request_t { + uint8_t major_opcode; + uint8_t pad0; + uint16_t length; + xcb_drawable_t drawable; + xcb_gcontext_t gc; +} xcb_poly_segment_request_t; + +/** Opcode for xcb_poly_rectangle. */ +#define XCB_POLY_RECTANGLE 67 + +/** + * @brief xcb_poly_rectangle_request_t + **/ +typedef struct xcb_poly_rectangle_request_t { + uint8_t major_opcode; + uint8_t pad0; + uint16_t length; + xcb_drawable_t drawable; + xcb_gcontext_t gc; +} xcb_poly_rectangle_request_t; + +/** Opcode for xcb_poly_arc. */ +#define XCB_POLY_ARC 68 + +/** + * @brief xcb_poly_arc_request_t + **/ +typedef struct xcb_poly_arc_request_t { + uint8_t major_opcode; + uint8_t pad0; + uint16_t length; + xcb_drawable_t drawable; + xcb_gcontext_t gc; +} xcb_poly_arc_request_t; + +typedef enum xcb_poly_shape_t { + XCB_POLY_SHAPE_COMPLEX = 0, + XCB_POLY_SHAPE_NONCONVEX = 1, + XCB_POLY_SHAPE_CONVEX = 2 +} xcb_poly_shape_t; + +/** Opcode for xcb_fill_poly. */ +#define XCB_FILL_POLY 69 + +/** + * @brief xcb_fill_poly_request_t + **/ +typedef struct xcb_fill_poly_request_t { + uint8_t major_opcode; + uint8_t pad0; + uint16_t length; + xcb_drawable_t drawable; + xcb_gcontext_t gc; + uint8_t shape; + uint8_t coordinate_mode; + uint8_t pad1[2]; +} xcb_fill_poly_request_t; + +/** Opcode for xcb_poly_fill_rectangle. */ +#define XCB_POLY_FILL_RECTANGLE 70 + +/** + * @brief xcb_poly_fill_rectangle_request_t + **/ +typedef struct xcb_poly_fill_rectangle_request_t { + uint8_t major_opcode; + uint8_t pad0; + uint16_t length; + xcb_drawable_t drawable; + xcb_gcontext_t gc; +} xcb_poly_fill_rectangle_request_t; + +/** Opcode for xcb_poly_fill_arc. */ +#define XCB_POLY_FILL_ARC 71 + +/** + * @brief xcb_poly_fill_arc_request_t + **/ +typedef struct xcb_poly_fill_arc_request_t { + uint8_t major_opcode; + uint8_t pad0; + uint16_t length; + xcb_drawable_t drawable; + xcb_gcontext_t gc; +} xcb_poly_fill_arc_request_t; + +typedef enum xcb_image_format_t { + XCB_IMAGE_FORMAT_XY_BITMAP = 0, + XCB_IMAGE_FORMAT_XY_PIXMAP = 1, + XCB_IMAGE_FORMAT_Z_PIXMAP = 2 +} xcb_image_format_t; + +/** Opcode for xcb_put_image. */ +#define XCB_PUT_IMAGE 72 + +/** + * @brief xcb_put_image_request_t + **/ +typedef struct xcb_put_image_request_t { + uint8_t major_opcode; + uint8_t format; + uint16_t length; + xcb_drawable_t drawable; + xcb_gcontext_t gc; + uint16_t width; + uint16_t height; + int16_t dst_x; + int16_t dst_y; + uint8_t left_pad; + uint8_t depth; + uint8_t pad0[2]; +} xcb_put_image_request_t; + +/** + * @brief xcb_get_image_cookie_t + **/ +typedef struct xcb_get_image_cookie_t { + unsigned int sequence; +} xcb_get_image_cookie_t; + +/** Opcode for xcb_get_image. */ +#define XCB_GET_IMAGE 73 + +/** + * @brief xcb_get_image_request_t + **/ +typedef struct xcb_get_image_request_t { + uint8_t major_opcode; + uint8_t format; + uint16_t length; + xcb_drawable_t drawable; + int16_t x; + int16_t y; + uint16_t width; + uint16_t height; + uint32_t plane_mask; +} xcb_get_image_request_t; + +/** + * @brief xcb_get_image_reply_t + **/ +typedef struct xcb_get_image_reply_t { + uint8_t response_type; + uint8_t depth; + uint16_t sequence; + uint32_t length; + xcb_visualid_t visual; + uint8_t pad0[20]; +} xcb_get_image_reply_t; + +/** Opcode for xcb_poly_text_8. */ +#define XCB_POLY_TEXT_8 74 + +/** + * @brief xcb_poly_text_8_request_t + **/ +typedef struct xcb_poly_text_8_request_t { + uint8_t major_opcode; + uint8_t pad0; + uint16_t length; + xcb_drawable_t drawable; + xcb_gcontext_t gc; + int16_t x; + int16_t y; +} xcb_poly_text_8_request_t; + +/** Opcode for xcb_poly_text_16. */ +#define XCB_POLY_TEXT_16 75 + +/** + * @brief xcb_poly_text_16_request_t + **/ +typedef struct xcb_poly_text_16_request_t { + uint8_t major_opcode; + uint8_t pad0; + uint16_t length; + xcb_drawable_t drawable; + xcb_gcontext_t gc; + int16_t x; + int16_t y; +} xcb_poly_text_16_request_t; + +/** Opcode for xcb_image_text_8. */ +#define XCB_IMAGE_TEXT_8 76 + +/** + * @brief xcb_image_text_8_request_t + **/ +typedef struct xcb_image_text_8_request_t { + uint8_t major_opcode; + uint8_t string_len; + uint16_t length; + xcb_drawable_t drawable; + xcb_gcontext_t gc; + int16_t x; + int16_t y; +} xcb_image_text_8_request_t; + +/** Opcode for xcb_image_text_16. */ +#define XCB_IMAGE_TEXT_16 77 + +/** + * @brief xcb_image_text_16_request_t + **/ +typedef struct xcb_image_text_16_request_t { + uint8_t major_opcode; + uint8_t string_len; + uint16_t length; + xcb_drawable_t drawable; + xcb_gcontext_t gc; + int16_t x; + int16_t y; +} xcb_image_text_16_request_t; + +typedef enum xcb_colormap_alloc_t { + XCB_COLORMAP_ALLOC_NONE = 0, + XCB_COLORMAP_ALLOC_ALL = 1 +} xcb_colormap_alloc_t; + +/** Opcode for xcb_create_colormap. */ +#define XCB_CREATE_COLORMAP 78 + +/** + * @brief xcb_create_colormap_request_t + **/ +typedef struct xcb_create_colormap_request_t { + uint8_t major_opcode; + uint8_t alloc; + uint16_t length; + xcb_colormap_t mid; + xcb_window_t window; + xcb_visualid_t visual; +} xcb_create_colormap_request_t; + +/** Opcode for xcb_free_colormap. */ +#define XCB_FREE_COLORMAP 79 + +/** + * @brief xcb_free_colormap_request_t + **/ +typedef struct xcb_free_colormap_request_t { + uint8_t major_opcode; + uint8_t pad0; + uint16_t length; + xcb_colormap_t cmap; +} xcb_free_colormap_request_t; + +/** Opcode for xcb_copy_colormap_and_free. */ +#define XCB_COPY_COLORMAP_AND_FREE 80 + +/** + * @brief xcb_copy_colormap_and_free_request_t + **/ +typedef struct xcb_copy_colormap_and_free_request_t { + uint8_t major_opcode; + uint8_t pad0; + uint16_t length; + xcb_colormap_t mid; + xcb_colormap_t src_cmap; +} xcb_copy_colormap_and_free_request_t; + +/** Opcode for xcb_install_colormap. */ +#define XCB_INSTALL_COLORMAP 81 + +/** + * @brief xcb_install_colormap_request_t + **/ +typedef struct xcb_install_colormap_request_t { + uint8_t major_opcode; + uint8_t pad0; + uint16_t length; + xcb_colormap_t cmap; +} xcb_install_colormap_request_t; + +/** Opcode for xcb_uninstall_colormap. */ +#define XCB_UNINSTALL_COLORMAP 82 + +/** + * @brief xcb_uninstall_colormap_request_t + **/ +typedef struct xcb_uninstall_colormap_request_t { + uint8_t major_opcode; + uint8_t pad0; + uint16_t length; + xcb_colormap_t cmap; +} xcb_uninstall_colormap_request_t; + +/** + * @brief xcb_list_installed_colormaps_cookie_t + **/ +typedef struct xcb_list_installed_colormaps_cookie_t { + unsigned int sequence; +} xcb_list_installed_colormaps_cookie_t; + +/** Opcode for xcb_list_installed_colormaps. */ +#define XCB_LIST_INSTALLED_COLORMAPS 83 + +/** + * @brief xcb_list_installed_colormaps_request_t + **/ +typedef struct xcb_list_installed_colormaps_request_t { + uint8_t major_opcode; + uint8_t pad0; + uint16_t length; + xcb_window_t window; +} xcb_list_installed_colormaps_request_t; + +/** + * @brief xcb_list_installed_colormaps_reply_t + **/ +typedef struct xcb_list_installed_colormaps_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint16_t cmaps_len; + uint8_t pad1[22]; +} xcb_list_installed_colormaps_reply_t; + +/** + * @brief xcb_alloc_color_cookie_t + **/ +typedef struct xcb_alloc_color_cookie_t { + unsigned int sequence; +} xcb_alloc_color_cookie_t; + +/** Opcode for xcb_alloc_color. */ +#define XCB_ALLOC_COLOR 84 + +/** + * @brief xcb_alloc_color_request_t + **/ +typedef struct xcb_alloc_color_request_t { + uint8_t major_opcode; + uint8_t pad0; + uint16_t length; + xcb_colormap_t cmap; + uint16_t red; + uint16_t green; + uint16_t blue; + uint8_t pad1[2]; +} xcb_alloc_color_request_t; + +/** + * @brief xcb_alloc_color_reply_t + **/ +typedef struct xcb_alloc_color_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint16_t red; + uint16_t green; + uint16_t blue; + uint8_t pad1[2]; + uint32_t pixel; +} xcb_alloc_color_reply_t; + +/** + * @brief xcb_alloc_named_color_cookie_t + **/ +typedef struct xcb_alloc_named_color_cookie_t { + unsigned int sequence; +} xcb_alloc_named_color_cookie_t; + +/** Opcode for xcb_alloc_named_color. */ +#define XCB_ALLOC_NAMED_COLOR 85 + +/** + * @brief xcb_alloc_named_color_request_t + **/ +typedef struct xcb_alloc_named_color_request_t { + uint8_t major_opcode; + uint8_t pad0; + uint16_t length; + xcb_colormap_t cmap; + uint16_t name_len; + uint8_t pad1[2]; +} xcb_alloc_named_color_request_t; + +/** + * @brief xcb_alloc_named_color_reply_t + **/ +typedef struct xcb_alloc_named_color_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint32_t pixel; + uint16_t exact_red; + uint16_t exact_green; + uint16_t exact_blue; + uint16_t visual_red; + uint16_t visual_green; + uint16_t visual_blue; +} xcb_alloc_named_color_reply_t; + +/** + * @brief xcb_alloc_color_cells_cookie_t + **/ +typedef struct xcb_alloc_color_cells_cookie_t { + unsigned int sequence; +} xcb_alloc_color_cells_cookie_t; + +/** Opcode for xcb_alloc_color_cells. */ +#define XCB_ALLOC_COLOR_CELLS 86 + +/** + * @brief xcb_alloc_color_cells_request_t + **/ +typedef struct xcb_alloc_color_cells_request_t { + uint8_t major_opcode; + uint8_t contiguous; + uint16_t length; + xcb_colormap_t cmap; + uint16_t colors; + uint16_t planes; +} xcb_alloc_color_cells_request_t; + +/** + * @brief xcb_alloc_color_cells_reply_t + **/ +typedef struct xcb_alloc_color_cells_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint16_t pixels_len; + uint16_t masks_len; + uint8_t pad1[20]; +} xcb_alloc_color_cells_reply_t; + +/** + * @brief xcb_alloc_color_planes_cookie_t + **/ +typedef struct xcb_alloc_color_planes_cookie_t { + unsigned int sequence; +} xcb_alloc_color_planes_cookie_t; + +/** Opcode for xcb_alloc_color_planes. */ +#define XCB_ALLOC_COLOR_PLANES 87 + +/** + * @brief xcb_alloc_color_planes_request_t + **/ +typedef struct xcb_alloc_color_planes_request_t { + uint8_t major_opcode; + uint8_t contiguous; + uint16_t length; + xcb_colormap_t cmap; + uint16_t colors; + uint16_t reds; + uint16_t greens; + uint16_t blues; +} xcb_alloc_color_planes_request_t; + +/** + * @brief xcb_alloc_color_planes_reply_t + **/ +typedef struct xcb_alloc_color_planes_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint16_t pixels_len; + uint8_t pad1[2]; + uint32_t red_mask; + uint32_t green_mask; + uint32_t blue_mask; + uint8_t pad2[8]; +} xcb_alloc_color_planes_reply_t; + +/** Opcode for xcb_free_colors. */ +#define XCB_FREE_COLORS 88 + +/** + * @brief xcb_free_colors_request_t + **/ +typedef struct xcb_free_colors_request_t { + uint8_t major_opcode; + uint8_t pad0; + uint16_t length; + xcb_colormap_t cmap; + uint32_t plane_mask; +} xcb_free_colors_request_t; + +typedef enum xcb_color_flag_t { + XCB_COLOR_FLAG_RED = 1, + XCB_COLOR_FLAG_GREEN = 2, + XCB_COLOR_FLAG_BLUE = 4 +} xcb_color_flag_t; + +/** + * @brief xcb_coloritem_t + **/ +typedef struct xcb_coloritem_t { + uint32_t pixel; + uint16_t red; + uint16_t green; + uint16_t blue; + uint8_t flags; + uint8_t pad0; +} xcb_coloritem_t; + +/** + * @brief xcb_coloritem_iterator_t + **/ +typedef struct xcb_coloritem_iterator_t { + xcb_coloritem_t *data; + int rem; + int index; +} xcb_coloritem_iterator_t; + +/** Opcode for xcb_store_colors. */ +#define XCB_STORE_COLORS 89 + +/** + * @brief xcb_store_colors_request_t + **/ +typedef struct xcb_store_colors_request_t { + uint8_t major_opcode; + uint8_t pad0; + uint16_t length; + xcb_colormap_t cmap; +} xcb_store_colors_request_t; + +/** Opcode for xcb_store_named_color. */ +#define XCB_STORE_NAMED_COLOR 90 + +/** + * @brief xcb_store_named_color_request_t + **/ +typedef struct xcb_store_named_color_request_t { + uint8_t major_opcode; + uint8_t flags; + uint16_t length; + xcb_colormap_t cmap; + uint32_t pixel; + uint16_t name_len; + uint8_t pad0[2]; +} xcb_store_named_color_request_t; + +/** + * @brief xcb_rgb_t + **/ +typedef struct xcb_rgb_t { + uint16_t red; + uint16_t green; + uint16_t blue; + uint8_t pad0[2]; +} xcb_rgb_t; + +/** + * @brief xcb_rgb_iterator_t + **/ +typedef struct xcb_rgb_iterator_t { + xcb_rgb_t *data; + int rem; + int index; +} xcb_rgb_iterator_t; + +/** + * @brief xcb_query_colors_cookie_t + **/ +typedef struct xcb_query_colors_cookie_t { + unsigned int sequence; +} xcb_query_colors_cookie_t; + +/** Opcode for xcb_query_colors. */ +#define XCB_QUERY_COLORS 91 + +/** + * @brief xcb_query_colors_request_t + **/ +typedef struct xcb_query_colors_request_t { + uint8_t major_opcode; + uint8_t pad0; + uint16_t length; + xcb_colormap_t cmap; +} xcb_query_colors_request_t; + +/** + * @brief xcb_query_colors_reply_t + **/ +typedef struct xcb_query_colors_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint16_t colors_len; + uint8_t pad1[22]; +} xcb_query_colors_reply_t; + +/** + * @brief xcb_lookup_color_cookie_t + **/ +typedef struct xcb_lookup_color_cookie_t { + unsigned int sequence; +} xcb_lookup_color_cookie_t; + +/** Opcode for xcb_lookup_color. */ +#define XCB_LOOKUP_COLOR 92 + +/** + * @brief xcb_lookup_color_request_t + **/ +typedef struct xcb_lookup_color_request_t { + uint8_t major_opcode; + uint8_t pad0; + uint16_t length; + xcb_colormap_t cmap; + uint16_t name_len; + uint8_t pad1[2]; +} xcb_lookup_color_request_t; + +/** + * @brief xcb_lookup_color_reply_t + **/ +typedef struct xcb_lookup_color_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint16_t exact_red; + uint16_t exact_green; + uint16_t exact_blue; + uint16_t visual_red; + uint16_t visual_green; + uint16_t visual_blue; +} xcb_lookup_color_reply_t; + +typedef enum xcb_pixmap_enum_t { + XCB_PIXMAP_NONE = 0 +} xcb_pixmap_enum_t; + +/** Opcode for xcb_create_cursor. */ +#define XCB_CREATE_CURSOR 93 + +/** + * @brief xcb_create_cursor_request_t + **/ +typedef struct xcb_create_cursor_request_t { + uint8_t major_opcode; + uint8_t pad0; + uint16_t length; + xcb_cursor_t cid; + xcb_pixmap_t source; + xcb_pixmap_t mask; + uint16_t fore_red; + uint16_t fore_green; + uint16_t fore_blue; + uint16_t back_red; + uint16_t back_green; + uint16_t back_blue; + uint16_t x; + uint16_t y; +} xcb_create_cursor_request_t; + +typedef enum xcb_font_enum_t { + XCB_FONT_NONE = 0 +} xcb_font_enum_t; + +/** Opcode for xcb_create_glyph_cursor. */ +#define XCB_CREATE_GLYPH_CURSOR 94 + +/** + * @brief xcb_create_glyph_cursor_request_t + **/ +typedef struct xcb_create_glyph_cursor_request_t { + uint8_t major_opcode; + uint8_t pad0; + uint16_t length; + xcb_cursor_t cid; + xcb_font_t source_font; + xcb_font_t mask_font; + uint16_t source_char; + uint16_t mask_char; + uint16_t fore_red; + uint16_t fore_green; + uint16_t fore_blue; + uint16_t back_red; + uint16_t back_green; + uint16_t back_blue; +} xcb_create_glyph_cursor_request_t; + +/** Opcode for xcb_free_cursor. */ +#define XCB_FREE_CURSOR 95 + +/** + * @brief xcb_free_cursor_request_t + **/ +typedef struct xcb_free_cursor_request_t { + uint8_t major_opcode; + uint8_t pad0; + uint16_t length; + xcb_cursor_t cursor; +} xcb_free_cursor_request_t; + +/** Opcode for xcb_recolor_cursor. */ +#define XCB_RECOLOR_CURSOR 96 + +/** + * @brief xcb_recolor_cursor_request_t + **/ +typedef struct xcb_recolor_cursor_request_t { + uint8_t major_opcode; + uint8_t pad0; + uint16_t length; + xcb_cursor_t cursor; + uint16_t fore_red; + uint16_t fore_green; + uint16_t fore_blue; + uint16_t back_red; + uint16_t back_green; + uint16_t back_blue; +} xcb_recolor_cursor_request_t; + +typedef enum xcb_query_shape_of_t { + XCB_QUERY_SHAPE_OF_LARGEST_CURSOR = 0, + XCB_QUERY_SHAPE_OF_FASTEST_TILE = 1, + XCB_QUERY_SHAPE_OF_FASTEST_STIPPLE = 2 +} xcb_query_shape_of_t; + +/** + * @brief xcb_query_best_size_cookie_t + **/ +typedef struct xcb_query_best_size_cookie_t { + unsigned int sequence; +} xcb_query_best_size_cookie_t; + +/** Opcode for xcb_query_best_size. */ +#define XCB_QUERY_BEST_SIZE 97 + +/** + * @brief xcb_query_best_size_request_t + **/ +typedef struct xcb_query_best_size_request_t { + uint8_t major_opcode; + uint8_t _class; + uint16_t length; + xcb_drawable_t drawable; + uint16_t width; + uint16_t height; +} xcb_query_best_size_request_t; + +/** + * @brief xcb_query_best_size_reply_t + **/ +typedef struct xcb_query_best_size_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint16_t width; + uint16_t height; +} xcb_query_best_size_reply_t; + +/** + * @brief xcb_query_extension_cookie_t + **/ +typedef struct xcb_query_extension_cookie_t { + unsigned int sequence; +} xcb_query_extension_cookie_t; + +/** Opcode for xcb_query_extension. */ +#define XCB_QUERY_EXTENSION 98 + +/** + * @brief xcb_query_extension_request_t + **/ +typedef struct xcb_query_extension_request_t { + uint8_t major_opcode; + uint8_t pad0; + uint16_t length; + uint16_t name_len; + uint8_t pad1[2]; +} xcb_query_extension_request_t; + +/** + * @brief xcb_query_extension_reply_t + **/ +typedef struct xcb_query_extension_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint8_t present; + uint8_t major_opcode; + uint8_t first_event; + uint8_t first_error; +} xcb_query_extension_reply_t; + +/** + * @brief xcb_list_extensions_cookie_t + **/ +typedef struct xcb_list_extensions_cookie_t { + unsigned int sequence; +} xcb_list_extensions_cookie_t; + +/** Opcode for xcb_list_extensions. */ +#define XCB_LIST_EXTENSIONS 99 + +/** + * @brief xcb_list_extensions_request_t + **/ +typedef struct xcb_list_extensions_request_t { + uint8_t major_opcode; + uint8_t pad0; + uint16_t length; +} xcb_list_extensions_request_t; + +/** + * @brief xcb_list_extensions_reply_t + **/ +typedef struct xcb_list_extensions_reply_t { + uint8_t response_type; + uint8_t names_len; + uint16_t sequence; + uint32_t length; + uint8_t pad0[24]; +} xcb_list_extensions_reply_t; + +/** Opcode for xcb_change_keyboard_mapping. */ +#define XCB_CHANGE_KEYBOARD_MAPPING 100 + +/** + * @brief xcb_change_keyboard_mapping_request_t + **/ +typedef struct xcb_change_keyboard_mapping_request_t { + uint8_t major_opcode; + uint8_t keycode_count; + uint16_t length; + xcb_keycode_t first_keycode; + uint8_t keysyms_per_keycode; + uint8_t pad0[2]; +} xcb_change_keyboard_mapping_request_t; + +/** + * @brief xcb_get_keyboard_mapping_cookie_t + **/ +typedef struct xcb_get_keyboard_mapping_cookie_t { + unsigned int sequence; +} xcb_get_keyboard_mapping_cookie_t; + +/** Opcode for xcb_get_keyboard_mapping. */ +#define XCB_GET_KEYBOARD_MAPPING 101 + +/** + * @brief xcb_get_keyboard_mapping_request_t + **/ +typedef struct xcb_get_keyboard_mapping_request_t { + uint8_t major_opcode; + uint8_t pad0; + uint16_t length; + xcb_keycode_t first_keycode; + uint8_t count; +} xcb_get_keyboard_mapping_request_t; + +/** + * @brief xcb_get_keyboard_mapping_reply_t + **/ +typedef struct xcb_get_keyboard_mapping_reply_t { + uint8_t response_type; + uint8_t keysyms_per_keycode; + uint16_t sequence; + uint32_t length; + uint8_t pad0[24]; +} xcb_get_keyboard_mapping_reply_t; + +typedef enum xcb_kb_t { + XCB_KB_KEY_CLICK_PERCENT = 1, + XCB_KB_BELL_PERCENT = 2, + XCB_KB_BELL_PITCH = 4, + XCB_KB_BELL_DURATION = 8, + XCB_KB_LED = 16, + XCB_KB_LED_MODE = 32, + XCB_KB_KEY = 64, + XCB_KB_AUTO_REPEAT_MODE = 128 +} xcb_kb_t; + +typedef enum xcb_led_mode_t { + XCB_LED_MODE_OFF = 0, + XCB_LED_MODE_ON = 1 +} xcb_led_mode_t; + +typedef enum xcb_auto_repeat_mode_t { + XCB_AUTO_REPEAT_MODE_OFF = 0, + XCB_AUTO_REPEAT_MODE_ON = 1, + XCB_AUTO_REPEAT_MODE_DEFAULT = 2 +} xcb_auto_repeat_mode_t; + +/** + * @brief xcb_change_keyboard_control_value_list_t + **/ +typedef struct xcb_change_keyboard_control_value_list_t { + int32_t key_click_percent; + int32_t bell_percent; + int32_t bell_pitch; + int32_t bell_duration; + uint32_t led; + uint32_t led_mode; + xcb_keycode32_t key; + uint32_t auto_repeat_mode; +} xcb_change_keyboard_control_value_list_t; + +/** Opcode for xcb_change_keyboard_control. */ +#define XCB_CHANGE_KEYBOARD_CONTROL 102 + +/** + * @brief xcb_change_keyboard_control_request_t + **/ +typedef struct xcb_change_keyboard_control_request_t { + uint8_t major_opcode; + uint8_t pad0; + uint16_t length; + uint32_t value_mask; +} xcb_change_keyboard_control_request_t; + +/** + * @brief xcb_get_keyboard_control_cookie_t + **/ +typedef struct xcb_get_keyboard_control_cookie_t { + unsigned int sequence; +} xcb_get_keyboard_control_cookie_t; + +/** Opcode for xcb_get_keyboard_control. */ +#define XCB_GET_KEYBOARD_CONTROL 103 + +/** + * @brief xcb_get_keyboard_control_request_t + **/ +typedef struct xcb_get_keyboard_control_request_t { + uint8_t major_opcode; + uint8_t pad0; + uint16_t length; +} xcb_get_keyboard_control_request_t; + +/** + * @brief xcb_get_keyboard_control_reply_t + **/ +typedef struct xcb_get_keyboard_control_reply_t { + uint8_t response_type; + uint8_t global_auto_repeat; + uint16_t sequence; + uint32_t length; + uint32_t led_mask; + uint8_t key_click_percent; + uint8_t bell_percent; + uint16_t bell_pitch; + uint16_t bell_duration; + uint8_t pad0[2]; + uint8_t auto_repeats[32]; +} xcb_get_keyboard_control_reply_t; + +/** Opcode for xcb_bell. */ +#define XCB_BELL 104 + +/** + * @brief xcb_bell_request_t + **/ +typedef struct xcb_bell_request_t { + uint8_t major_opcode; + int8_t percent; + uint16_t length; +} xcb_bell_request_t; + +/** Opcode for xcb_change_pointer_control. */ +#define XCB_CHANGE_POINTER_CONTROL 105 + +/** + * @brief xcb_change_pointer_control_request_t + **/ +typedef struct xcb_change_pointer_control_request_t { + uint8_t major_opcode; + uint8_t pad0; + uint16_t length; + int16_t acceleration_numerator; + int16_t acceleration_denominator; + int16_t threshold; + uint8_t do_acceleration; + uint8_t do_threshold; +} xcb_change_pointer_control_request_t; + +/** + * @brief xcb_get_pointer_control_cookie_t + **/ +typedef struct xcb_get_pointer_control_cookie_t { + unsigned int sequence; +} xcb_get_pointer_control_cookie_t; + +/** Opcode for xcb_get_pointer_control. */ +#define XCB_GET_POINTER_CONTROL 106 + +/** + * @brief xcb_get_pointer_control_request_t + **/ +typedef struct xcb_get_pointer_control_request_t { + uint8_t major_opcode; + uint8_t pad0; + uint16_t length; +} xcb_get_pointer_control_request_t; + +/** + * @brief xcb_get_pointer_control_reply_t + **/ +typedef struct xcb_get_pointer_control_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint16_t acceleration_numerator; + uint16_t acceleration_denominator; + uint16_t threshold; + uint8_t pad1[18]; +} xcb_get_pointer_control_reply_t; + +typedef enum xcb_blanking_t { + XCB_BLANKING_NOT_PREFERRED = 0, + XCB_BLANKING_PREFERRED = 1, + XCB_BLANKING_DEFAULT = 2 +} xcb_blanking_t; + +typedef enum xcb_exposures_t { + XCB_EXPOSURES_NOT_ALLOWED = 0, + XCB_EXPOSURES_ALLOWED = 1, + XCB_EXPOSURES_DEFAULT = 2 +} xcb_exposures_t; + +/** Opcode for xcb_set_screen_saver. */ +#define XCB_SET_SCREEN_SAVER 107 + +/** + * @brief xcb_set_screen_saver_request_t + **/ +typedef struct xcb_set_screen_saver_request_t { + uint8_t major_opcode; + uint8_t pad0; + uint16_t length; + int16_t timeout; + int16_t interval; + uint8_t prefer_blanking; + uint8_t allow_exposures; +} xcb_set_screen_saver_request_t; + +/** + * @brief xcb_get_screen_saver_cookie_t + **/ +typedef struct xcb_get_screen_saver_cookie_t { + unsigned int sequence; +} xcb_get_screen_saver_cookie_t; + +/** Opcode for xcb_get_screen_saver. */ +#define XCB_GET_SCREEN_SAVER 108 + +/** + * @brief xcb_get_screen_saver_request_t + **/ +typedef struct xcb_get_screen_saver_request_t { + uint8_t major_opcode; + uint8_t pad0; + uint16_t length; +} xcb_get_screen_saver_request_t; + +/** + * @brief xcb_get_screen_saver_reply_t + **/ +typedef struct xcb_get_screen_saver_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint16_t timeout; + uint16_t interval; + uint8_t prefer_blanking; + uint8_t allow_exposures; + uint8_t pad1[18]; +} xcb_get_screen_saver_reply_t; + +typedef enum xcb_host_mode_t { + XCB_HOST_MODE_INSERT = 0, + XCB_HOST_MODE_DELETE = 1 +} xcb_host_mode_t; + +typedef enum xcb_family_t { + XCB_FAMILY_INTERNET = 0, + XCB_FAMILY_DECNET = 1, + XCB_FAMILY_CHAOS = 2, + XCB_FAMILY_SERVER_INTERPRETED = 5, + XCB_FAMILY_INTERNET_6 = 6 +} xcb_family_t; + +/** Opcode for xcb_change_hosts. */ +#define XCB_CHANGE_HOSTS 109 + +/** + * @brief xcb_change_hosts_request_t + **/ +typedef struct xcb_change_hosts_request_t { + uint8_t major_opcode; + uint8_t mode; + uint16_t length; + uint8_t family; + uint8_t pad0; + uint16_t address_len; +} xcb_change_hosts_request_t; + +/** + * @brief xcb_host_t + **/ +typedef struct xcb_host_t { + uint8_t family; + uint8_t pad0; + uint16_t address_len; +} xcb_host_t; + +/** + * @brief xcb_host_iterator_t + **/ +typedef struct xcb_host_iterator_t { + xcb_host_t *data; + int rem; + int index; +} xcb_host_iterator_t; + +/** + * @brief xcb_list_hosts_cookie_t + **/ +typedef struct xcb_list_hosts_cookie_t { + unsigned int sequence; +} xcb_list_hosts_cookie_t; + +/** Opcode for xcb_list_hosts. */ +#define XCB_LIST_HOSTS 110 + +/** + * @brief xcb_list_hosts_request_t + **/ +typedef struct xcb_list_hosts_request_t { + uint8_t major_opcode; + uint8_t pad0; + uint16_t length; +} xcb_list_hosts_request_t; + +/** + * @brief xcb_list_hosts_reply_t + **/ +typedef struct xcb_list_hosts_reply_t { + uint8_t response_type; + uint8_t mode; + uint16_t sequence; + uint32_t length; + uint16_t hosts_len; + uint8_t pad0[22]; +} xcb_list_hosts_reply_t; + +typedef enum xcb_access_control_t { + XCB_ACCESS_CONTROL_DISABLE = 0, + XCB_ACCESS_CONTROL_ENABLE = 1 +} xcb_access_control_t; + +/** Opcode for xcb_set_access_control. */ +#define XCB_SET_ACCESS_CONTROL 111 + +/** + * @brief xcb_set_access_control_request_t + **/ +typedef struct xcb_set_access_control_request_t { + uint8_t major_opcode; + uint8_t mode; + uint16_t length; +} xcb_set_access_control_request_t; + +typedef enum xcb_close_down_t { + XCB_CLOSE_DOWN_DESTROY_ALL = 0, + XCB_CLOSE_DOWN_RETAIN_PERMANENT = 1, + XCB_CLOSE_DOWN_RETAIN_TEMPORARY = 2 +} xcb_close_down_t; + +/** Opcode for xcb_set_close_down_mode. */ +#define XCB_SET_CLOSE_DOWN_MODE 112 + +/** + * @brief xcb_set_close_down_mode_request_t + **/ +typedef struct xcb_set_close_down_mode_request_t { + uint8_t major_opcode; + uint8_t mode; + uint16_t length; +} xcb_set_close_down_mode_request_t; + +typedef enum xcb_kill_t { + XCB_KILL_ALL_TEMPORARY = 0 +} xcb_kill_t; + +/** Opcode for xcb_kill_client. */ +#define XCB_KILL_CLIENT 113 + +/** + * @brief xcb_kill_client_request_t + **/ +typedef struct xcb_kill_client_request_t { + uint8_t major_opcode; + uint8_t pad0; + uint16_t length; + uint32_t resource; +} xcb_kill_client_request_t; + +/** Opcode for xcb_rotate_properties. */ +#define XCB_ROTATE_PROPERTIES 114 + +/** + * @brief xcb_rotate_properties_request_t + **/ +typedef struct xcb_rotate_properties_request_t { + uint8_t major_opcode; + uint8_t pad0; + uint16_t length; + xcb_window_t window; + uint16_t atoms_len; + int16_t delta; +} xcb_rotate_properties_request_t; + +typedef enum xcb_screen_saver_t { + XCB_SCREEN_SAVER_RESET = 0, + XCB_SCREEN_SAVER_ACTIVE = 1 +} xcb_screen_saver_t; + +/** Opcode for xcb_force_screen_saver. */ +#define XCB_FORCE_SCREEN_SAVER 115 + +/** + * @brief xcb_force_screen_saver_request_t + **/ +typedef struct xcb_force_screen_saver_request_t { + uint8_t major_opcode; + uint8_t mode; + uint16_t length; +} xcb_force_screen_saver_request_t; + +typedef enum xcb_mapping_status_t { + XCB_MAPPING_STATUS_SUCCESS = 0, + XCB_MAPPING_STATUS_BUSY = 1, + XCB_MAPPING_STATUS_FAILURE = 2 +} xcb_mapping_status_t; + +/** + * @brief xcb_set_pointer_mapping_cookie_t + **/ +typedef struct xcb_set_pointer_mapping_cookie_t { + unsigned int sequence; +} xcb_set_pointer_mapping_cookie_t; + +/** Opcode for xcb_set_pointer_mapping. */ +#define XCB_SET_POINTER_MAPPING 116 + +/** + * @brief xcb_set_pointer_mapping_request_t + **/ +typedef struct xcb_set_pointer_mapping_request_t { + uint8_t major_opcode; + uint8_t map_len; + uint16_t length; +} xcb_set_pointer_mapping_request_t; + +/** + * @brief xcb_set_pointer_mapping_reply_t + **/ +typedef struct xcb_set_pointer_mapping_reply_t { + uint8_t response_type; + uint8_t status; + uint16_t sequence; + uint32_t length; +} xcb_set_pointer_mapping_reply_t; + +/** + * @brief xcb_get_pointer_mapping_cookie_t + **/ +typedef struct xcb_get_pointer_mapping_cookie_t { + unsigned int sequence; +} xcb_get_pointer_mapping_cookie_t; + +/** Opcode for xcb_get_pointer_mapping. */ +#define XCB_GET_POINTER_MAPPING 117 + +/** + * @brief xcb_get_pointer_mapping_request_t + **/ +typedef struct xcb_get_pointer_mapping_request_t { + uint8_t major_opcode; + uint8_t pad0; + uint16_t length; +} xcb_get_pointer_mapping_request_t; + +/** + * @brief xcb_get_pointer_mapping_reply_t + **/ +typedef struct xcb_get_pointer_mapping_reply_t { + uint8_t response_type; + uint8_t map_len; + uint16_t sequence; + uint32_t length; + uint8_t pad0[24]; +} xcb_get_pointer_mapping_reply_t; + +typedef enum xcb_map_index_t { + XCB_MAP_INDEX_SHIFT = 0, + XCB_MAP_INDEX_LOCK = 1, + XCB_MAP_INDEX_CONTROL = 2, + XCB_MAP_INDEX_1 = 3, + XCB_MAP_INDEX_2 = 4, + XCB_MAP_INDEX_3 = 5, + XCB_MAP_INDEX_4 = 6, + XCB_MAP_INDEX_5 = 7 +} xcb_map_index_t; + +/** + * @brief xcb_set_modifier_mapping_cookie_t + **/ +typedef struct xcb_set_modifier_mapping_cookie_t { + unsigned int sequence; +} xcb_set_modifier_mapping_cookie_t; + +/** Opcode for xcb_set_modifier_mapping. */ +#define XCB_SET_MODIFIER_MAPPING 118 + +/** + * @brief xcb_set_modifier_mapping_request_t + **/ +typedef struct xcb_set_modifier_mapping_request_t { + uint8_t major_opcode; + uint8_t keycodes_per_modifier; + uint16_t length; +} xcb_set_modifier_mapping_request_t; + +/** + * @brief xcb_set_modifier_mapping_reply_t + **/ +typedef struct xcb_set_modifier_mapping_reply_t { + uint8_t response_type; + uint8_t status; + uint16_t sequence; + uint32_t length; +} xcb_set_modifier_mapping_reply_t; + +/** + * @brief xcb_get_modifier_mapping_cookie_t + **/ +typedef struct xcb_get_modifier_mapping_cookie_t { + unsigned int sequence; +} xcb_get_modifier_mapping_cookie_t; + +/** Opcode for xcb_get_modifier_mapping. */ +#define XCB_GET_MODIFIER_MAPPING 119 + +/** + * @brief xcb_get_modifier_mapping_request_t + **/ +typedef struct xcb_get_modifier_mapping_request_t { + uint8_t major_opcode; + uint8_t pad0; + uint16_t length; +} xcb_get_modifier_mapping_request_t; + +/** + * @brief xcb_get_modifier_mapping_reply_t + **/ +typedef struct xcb_get_modifier_mapping_reply_t { + uint8_t response_type; + uint8_t keycodes_per_modifier; + uint16_t sequence; + uint32_t length; + uint8_t pad0[24]; +} xcb_get_modifier_mapping_reply_t; + +/** Opcode for xcb_no_operation. */ +#define XCB_NO_OPERATION 127 + +/** + * @brief xcb_no_operation_request_t + **/ +typedef struct xcb_no_operation_request_t { + uint8_t major_opcode; + uint8_t pad0; + uint16_t length; +} xcb_no_operation_request_t; + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_char2b_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_char2b_t) + */ +void +xcb_char2b_next (xcb_char2b_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_char2b_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_char2b_end (xcb_char2b_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_window_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_window_t) + */ +void +xcb_window_next (xcb_window_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_window_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_window_end (xcb_window_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_pixmap_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_pixmap_t) + */ +void +xcb_pixmap_next (xcb_pixmap_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_pixmap_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_pixmap_end (xcb_pixmap_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_cursor_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_cursor_t) + */ +void +xcb_cursor_next (xcb_cursor_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_cursor_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_cursor_end (xcb_cursor_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_font_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_font_t) + */ +void +xcb_font_next (xcb_font_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_font_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_font_end (xcb_font_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_gcontext_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_gcontext_t) + */ +void +xcb_gcontext_next (xcb_gcontext_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_gcontext_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_gcontext_end (xcb_gcontext_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_colormap_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_colormap_t) + */ +void +xcb_colormap_next (xcb_colormap_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_colormap_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_colormap_end (xcb_colormap_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_atom_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_atom_t) + */ +void +xcb_atom_next (xcb_atom_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_atom_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_atom_end (xcb_atom_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_drawable_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_drawable_t) + */ +void +xcb_drawable_next (xcb_drawable_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_drawable_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_drawable_end (xcb_drawable_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_fontable_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_fontable_t) + */ +void +xcb_fontable_next (xcb_fontable_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_fontable_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_fontable_end (xcb_fontable_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_bool32_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_bool32_t) + */ +void +xcb_bool32_next (xcb_bool32_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_bool32_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_bool32_end (xcb_bool32_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_visualid_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_visualid_t) + */ +void +xcb_visualid_next (xcb_visualid_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_visualid_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_visualid_end (xcb_visualid_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_timestamp_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_timestamp_t) + */ +void +xcb_timestamp_next (xcb_timestamp_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_timestamp_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_timestamp_end (xcb_timestamp_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_keysym_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_keysym_t) + */ +void +xcb_keysym_next (xcb_keysym_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_keysym_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_keysym_end (xcb_keysym_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_keycode_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_keycode_t) + */ +void +xcb_keycode_next (xcb_keycode_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_keycode_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_keycode_end (xcb_keycode_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_keycode32_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_keycode32_t) + */ +void +xcb_keycode32_next (xcb_keycode32_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_keycode32_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_keycode32_end (xcb_keycode32_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_button_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_button_t) + */ +void +xcb_button_next (xcb_button_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_button_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_button_end (xcb_button_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_point_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_point_t) + */ +void +xcb_point_next (xcb_point_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_point_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_point_end (xcb_point_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_rectangle_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_rectangle_t) + */ +void +xcb_rectangle_next (xcb_rectangle_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_rectangle_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_rectangle_end (xcb_rectangle_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_arc_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_arc_t) + */ +void +xcb_arc_next (xcb_arc_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_arc_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_arc_end (xcb_arc_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_format_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_format_t) + */ +void +xcb_format_next (xcb_format_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_format_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_format_end (xcb_format_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_visualtype_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_visualtype_t) + */ +void +xcb_visualtype_next (xcb_visualtype_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_visualtype_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_visualtype_end (xcb_visualtype_iterator_t i); + +int +xcb_depth_sizeof (const void *_buffer); + +xcb_visualtype_t * +xcb_depth_visuals (const xcb_depth_t *R); + +int +xcb_depth_visuals_length (const xcb_depth_t *R); + +xcb_visualtype_iterator_t +xcb_depth_visuals_iterator (const xcb_depth_t *R); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_depth_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_depth_t) + */ +void +xcb_depth_next (xcb_depth_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_depth_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_depth_end (xcb_depth_iterator_t i); + +int +xcb_screen_sizeof (const void *_buffer); + +int +xcb_screen_allowed_depths_length (const xcb_screen_t *R); + +xcb_depth_iterator_t +xcb_screen_allowed_depths_iterator (const xcb_screen_t *R); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_screen_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_screen_t) + */ +void +xcb_screen_next (xcb_screen_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_screen_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_screen_end (xcb_screen_iterator_t i); + +int +xcb_setup_request_sizeof (const void *_buffer); + +char * +xcb_setup_request_authorization_protocol_name (const xcb_setup_request_t *R); + +int +xcb_setup_request_authorization_protocol_name_length (const xcb_setup_request_t *R); + +xcb_generic_iterator_t +xcb_setup_request_authorization_protocol_name_end (const xcb_setup_request_t *R); + +char * +xcb_setup_request_authorization_protocol_data (const xcb_setup_request_t *R); + +int +xcb_setup_request_authorization_protocol_data_length (const xcb_setup_request_t *R); + +xcb_generic_iterator_t +xcb_setup_request_authorization_protocol_data_end (const xcb_setup_request_t *R); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_setup_request_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_setup_request_t) + */ +void +xcb_setup_request_next (xcb_setup_request_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_setup_request_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_setup_request_end (xcb_setup_request_iterator_t i); + +int +xcb_setup_failed_sizeof (const void *_buffer); + +char * +xcb_setup_failed_reason (const xcb_setup_failed_t *R); + +int +xcb_setup_failed_reason_length (const xcb_setup_failed_t *R); + +xcb_generic_iterator_t +xcb_setup_failed_reason_end (const xcb_setup_failed_t *R); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_setup_failed_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_setup_failed_t) + */ +void +xcb_setup_failed_next (xcb_setup_failed_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_setup_failed_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_setup_failed_end (xcb_setup_failed_iterator_t i); + +int +xcb_setup_authenticate_sizeof (const void *_buffer); + +char * +xcb_setup_authenticate_reason (const xcb_setup_authenticate_t *R); + +int +xcb_setup_authenticate_reason_length (const xcb_setup_authenticate_t *R); + +xcb_generic_iterator_t +xcb_setup_authenticate_reason_end (const xcb_setup_authenticate_t *R); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_setup_authenticate_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_setup_authenticate_t) + */ +void +xcb_setup_authenticate_next (xcb_setup_authenticate_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_setup_authenticate_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_setup_authenticate_end (xcb_setup_authenticate_iterator_t i); + +int +xcb_setup_sizeof (const void *_buffer); + +char * +xcb_setup_vendor (const xcb_setup_t *R); + +int +xcb_setup_vendor_length (const xcb_setup_t *R); + +xcb_generic_iterator_t +xcb_setup_vendor_end (const xcb_setup_t *R); + +xcb_format_t * +xcb_setup_pixmap_formats (const xcb_setup_t *R); + +int +xcb_setup_pixmap_formats_length (const xcb_setup_t *R); + +xcb_format_iterator_t +xcb_setup_pixmap_formats_iterator (const xcb_setup_t *R); + +int +xcb_setup_roots_length (const xcb_setup_t *R); + +xcb_screen_iterator_t +xcb_setup_roots_iterator (const xcb_setup_t *R); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_setup_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_setup_t) + */ +void +xcb_setup_next (xcb_setup_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_setup_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_setup_end (xcb_setup_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_client_message_data_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_client_message_data_t) + */ +void +xcb_client_message_data_next (xcb_client_message_data_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_client_message_data_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_client_message_data_end (xcb_client_message_data_iterator_t i); + +int +xcb_create_window_value_list_serialize (void **_buffer, + uint32_t value_mask, + const xcb_create_window_value_list_t *_aux); + +int +xcb_create_window_value_list_unpack (const void *_buffer, + uint32_t value_mask, + xcb_create_window_value_list_t *_aux); + +int +xcb_create_window_value_list_sizeof (const void *_buffer, + uint32_t value_mask); + +int +xcb_create_window_sizeof (const void *_buffer); + +/** + * @brief Creates a window + * + * @param c The connection + * @param depth Specifies the new window's depth (TODO: what unit?). + * \n + * The special value `XCB_COPY_FROM_PARENT` means the depth is taken from the + * \a parent window. + * @param wid The ID with which you will refer to the new window, created by + * `xcb_generate_id`. + * @param parent The parent window of the new window. + * @param x The X coordinate of the new window. + * @param y The Y coordinate of the new window. + * @param width The width of the new window. + * @param height The height of the new window. + * @param border_width TODO: + * \n + * Must be zero if the `class` is `InputOnly` or a `xcb_match_error_t` occurs. + * @param _class A bitmask of #xcb_window_class_t values. + * @param _class \n + * @param visual Specifies the id for the new window's visual. + * \n + * The special value `XCB_COPY_FROM_PARENT` means the visual is taken from the + * \a parent window. + * @param value_mask A bitmask of #xcb_cw_t values. + * @return A cookie + * + * Creates an unmapped window as child of the specified \a parent window. A + * CreateNotify event will be generated. The new window is placed on top in the + * stacking order with respect to siblings. + * + * The coordinate system has the X axis horizontal and the Y axis vertical with + * the origin [0, 0] at the upper-left corner. Coordinates are integral, in terms + * of pixels, and coincide with pixel centers. Each window and pixmap has its own + * coordinate system. For a window, the origin is inside the border at the inside, + * upper-left corner. + * + * The created window is not yet displayed (mapped), call `xcb_map_window` to + * display it. + * + * The created window will initially use the same cursor as its parent. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_create_window_checked (xcb_connection_t *c, + uint8_t depth, + xcb_window_t wid, + xcb_window_t parent, + int16_t x, + int16_t y, + uint16_t width, + uint16_t height, + uint16_t border_width, + uint16_t _class, + xcb_visualid_t visual, + uint32_t value_mask, + const void *value_list); + +/** + * @brief Creates a window + * + * @param c The connection + * @param depth Specifies the new window's depth (TODO: what unit?). + * \n + * The special value `XCB_COPY_FROM_PARENT` means the depth is taken from the + * \a parent window. + * @param wid The ID with which you will refer to the new window, created by + * `xcb_generate_id`. + * @param parent The parent window of the new window. + * @param x The X coordinate of the new window. + * @param y The Y coordinate of the new window. + * @param width The width of the new window. + * @param height The height of the new window. + * @param border_width TODO: + * \n + * Must be zero if the `class` is `InputOnly` or a `xcb_match_error_t` occurs. + * @param _class A bitmask of #xcb_window_class_t values. + * @param _class \n + * @param visual Specifies the id for the new window's visual. + * \n + * The special value `XCB_COPY_FROM_PARENT` means the visual is taken from the + * \a parent window. + * @param value_mask A bitmask of #xcb_cw_t values. + * @return A cookie + * + * Creates an unmapped window as child of the specified \a parent window. A + * CreateNotify event will be generated. The new window is placed on top in the + * stacking order with respect to siblings. + * + * The coordinate system has the X axis horizontal and the Y axis vertical with + * the origin [0, 0] at the upper-left corner. Coordinates are integral, in terms + * of pixels, and coincide with pixel centers. Each window and pixmap has its own + * coordinate system. For a window, the origin is inside the border at the inside, + * upper-left corner. + * + * The created window is not yet displayed (mapped), call `xcb_map_window` to + * display it. + * + * The created window will initially use the same cursor as its parent. + * + */ +xcb_void_cookie_t +xcb_create_window (xcb_connection_t *c, + uint8_t depth, + xcb_window_t wid, + xcb_window_t parent, + int16_t x, + int16_t y, + uint16_t width, + uint16_t height, + uint16_t border_width, + uint16_t _class, + xcb_visualid_t visual, + uint32_t value_mask, + const void *value_list); + +/** + * @brief Creates a window + * + * @param c The connection + * @param depth Specifies the new window's depth (TODO: what unit?). + * \n + * The special value `XCB_COPY_FROM_PARENT` means the depth is taken from the + * \a parent window. + * @param wid The ID with which you will refer to the new window, created by + * `xcb_generate_id`. + * @param parent The parent window of the new window. + * @param x The X coordinate of the new window. + * @param y The Y coordinate of the new window. + * @param width The width of the new window. + * @param height The height of the new window. + * @param border_width TODO: + * \n + * Must be zero if the `class` is `InputOnly` or a `xcb_match_error_t` occurs. + * @param _class A bitmask of #xcb_window_class_t values. + * @param _class \n + * @param visual Specifies the id for the new window's visual. + * \n + * The special value `XCB_COPY_FROM_PARENT` means the visual is taken from the + * \a parent window. + * @param value_mask A bitmask of #xcb_cw_t values. + * @return A cookie + * + * Creates an unmapped window as child of the specified \a parent window. A + * CreateNotify event will be generated. The new window is placed on top in the + * stacking order with respect to siblings. + * + * The coordinate system has the X axis horizontal and the Y axis vertical with + * the origin [0, 0] at the upper-left corner. Coordinates are integral, in terms + * of pixels, and coincide with pixel centers. Each window and pixmap has its own + * coordinate system. For a window, the origin is inside the border at the inside, + * upper-left corner. + * + * The created window is not yet displayed (mapped), call `xcb_map_window` to + * display it. + * + * The created window will initially use the same cursor as its parent. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_create_window_aux_checked (xcb_connection_t *c, + uint8_t depth, + xcb_window_t wid, + xcb_window_t parent, + int16_t x, + int16_t y, + uint16_t width, + uint16_t height, + uint16_t border_width, + uint16_t _class, + xcb_visualid_t visual, + uint32_t value_mask, + const xcb_create_window_value_list_t *value_list); + +/** + * @brief Creates a window + * + * @param c The connection + * @param depth Specifies the new window's depth (TODO: what unit?). + * \n + * The special value `XCB_COPY_FROM_PARENT` means the depth is taken from the + * \a parent window. + * @param wid The ID with which you will refer to the new window, created by + * `xcb_generate_id`. + * @param parent The parent window of the new window. + * @param x The X coordinate of the new window. + * @param y The Y coordinate of the new window. + * @param width The width of the new window. + * @param height The height of the new window. + * @param border_width TODO: + * \n + * Must be zero if the `class` is `InputOnly` or a `xcb_match_error_t` occurs. + * @param _class A bitmask of #xcb_window_class_t values. + * @param _class \n + * @param visual Specifies the id for the new window's visual. + * \n + * The special value `XCB_COPY_FROM_PARENT` means the visual is taken from the + * \a parent window. + * @param value_mask A bitmask of #xcb_cw_t values. + * @return A cookie + * + * Creates an unmapped window as child of the specified \a parent window. A + * CreateNotify event will be generated. The new window is placed on top in the + * stacking order with respect to siblings. + * + * The coordinate system has the X axis horizontal and the Y axis vertical with + * the origin [0, 0] at the upper-left corner. Coordinates are integral, in terms + * of pixels, and coincide with pixel centers. Each window and pixmap has its own + * coordinate system. For a window, the origin is inside the border at the inside, + * upper-left corner. + * + * The created window is not yet displayed (mapped), call `xcb_map_window` to + * display it. + * + * The created window will initially use the same cursor as its parent. + * + */ +xcb_void_cookie_t +xcb_create_window_aux (xcb_connection_t *c, + uint8_t depth, + xcb_window_t wid, + xcb_window_t parent, + int16_t x, + int16_t y, + uint16_t width, + uint16_t height, + uint16_t border_width, + uint16_t _class, + xcb_visualid_t visual, + uint32_t value_mask, + const xcb_create_window_value_list_t *value_list); + +void * +xcb_create_window_value_list (const xcb_create_window_request_t *R); + +int +xcb_change_window_attributes_value_list_serialize (void **_buffer, + uint32_t value_mask, + const xcb_change_window_attributes_value_list_t *_aux); + +int +xcb_change_window_attributes_value_list_unpack (const void *_buffer, + uint32_t value_mask, + xcb_change_window_attributes_value_list_t *_aux); + +int +xcb_change_window_attributes_value_list_sizeof (const void *_buffer, + uint32_t value_mask); + +int +xcb_change_window_attributes_sizeof (const void *_buffer); + +/** + * @brief change window attributes + * + * @param c The connection + * @param window The window to change. + * @param value_mask A bitmask of #xcb_cw_t values. + * @param value_mask \n + * @param value_list Values for each of the attributes specified in the bitmask \a value_mask. The + * order has to correspond to the order of possible \a value_mask bits. See the + * example. + * @return A cookie + * + * Changes the attributes specified by \a value_mask for the specified \a window. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_change_window_attributes_checked (xcb_connection_t *c, + xcb_window_t window, + uint32_t value_mask, + const void *value_list); + +/** + * @brief change window attributes + * + * @param c The connection + * @param window The window to change. + * @param value_mask A bitmask of #xcb_cw_t values. + * @param value_mask \n + * @param value_list Values for each of the attributes specified in the bitmask \a value_mask. The + * order has to correspond to the order of possible \a value_mask bits. See the + * example. + * @return A cookie + * + * Changes the attributes specified by \a value_mask for the specified \a window. + * + */ +xcb_void_cookie_t +xcb_change_window_attributes (xcb_connection_t *c, + xcb_window_t window, + uint32_t value_mask, + const void *value_list); + +/** + * @brief change window attributes + * + * @param c The connection + * @param window The window to change. + * @param value_mask A bitmask of #xcb_cw_t values. + * @param value_mask \n + * @param value_list Values for each of the attributes specified in the bitmask \a value_mask. The + * order has to correspond to the order of possible \a value_mask bits. See the + * example. + * @return A cookie + * + * Changes the attributes specified by \a value_mask for the specified \a window. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_change_window_attributes_aux_checked (xcb_connection_t *c, + xcb_window_t window, + uint32_t value_mask, + const xcb_change_window_attributes_value_list_t *value_list); + +/** + * @brief change window attributes + * + * @param c The connection + * @param window The window to change. + * @param value_mask A bitmask of #xcb_cw_t values. + * @param value_mask \n + * @param value_list Values for each of the attributes specified in the bitmask \a value_mask. The + * order has to correspond to the order of possible \a value_mask bits. See the + * example. + * @return A cookie + * + * Changes the attributes specified by \a value_mask for the specified \a window. + * + */ +xcb_void_cookie_t +xcb_change_window_attributes_aux (xcb_connection_t *c, + xcb_window_t window, + uint32_t value_mask, + const xcb_change_window_attributes_value_list_t *value_list); + +void * +xcb_change_window_attributes_value_list (const xcb_change_window_attributes_request_t *R); + +/** + * @brief Gets window attributes + * + * @param c The connection + * @param window The window to get the attributes from. + * @return A cookie + * + * Gets the current attributes for the specified \a window. + * + */ +xcb_get_window_attributes_cookie_t +xcb_get_window_attributes (xcb_connection_t *c, + xcb_window_t window); + +/** + * @brief Gets window attributes + * + * @param c The connection + * @param window The window to get the attributes from. + * @return A cookie + * + * Gets the current attributes for the specified \a window. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_get_window_attributes_cookie_t +xcb_get_window_attributes_unchecked (xcb_connection_t *c, + xcb_window_t window); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_get_window_attributes_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_get_window_attributes_reply_t * +xcb_get_window_attributes_reply (xcb_connection_t *c, + xcb_get_window_attributes_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +/** + * @brief Destroys a window + * + * @param c The connection + * @param window The window to destroy. + * @return A cookie + * + * Destroys the specified window and all of its subwindows. A DestroyNotify event + * is generated for each destroyed window (a DestroyNotify event is first generated + * for any given window's inferiors). If the window was mapped, it will be + * automatically unmapped before destroying. + * + * Calling DestroyWindow on the root window will do nothing. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_destroy_window_checked (xcb_connection_t *c, + xcb_window_t window); + +/** + * @brief Destroys a window + * + * @param c The connection + * @param window The window to destroy. + * @return A cookie + * + * Destroys the specified window and all of its subwindows. A DestroyNotify event + * is generated for each destroyed window (a DestroyNotify event is first generated + * for any given window's inferiors). If the window was mapped, it will be + * automatically unmapped before destroying. + * + * Calling DestroyWindow on the root window will do nothing. + * + */ +xcb_void_cookie_t +xcb_destroy_window (xcb_connection_t *c, + xcb_window_t window); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_destroy_subwindows_checked (xcb_connection_t *c, + xcb_window_t window); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_destroy_subwindows (xcb_connection_t *c, + xcb_window_t window); + +/** + * @brief Changes a client's save set + * + * @param c The connection + * @param mode A bitmask of #xcb_set_mode_t values. + * @param mode Insert to add the specified window to the save set or Delete to delete it from the save set. + * @param window The window to add or delete to/from your save set. + * @return A cookie + * + * TODO: explain what the save set is for. + * + * This function either adds or removes the specified window to the client's (your + * application's) save set. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_change_save_set_checked (xcb_connection_t *c, + uint8_t mode, + xcb_window_t window); + +/** + * @brief Changes a client's save set + * + * @param c The connection + * @param mode A bitmask of #xcb_set_mode_t values. + * @param mode Insert to add the specified window to the save set or Delete to delete it from the save set. + * @param window The window to add or delete to/from your save set. + * @return A cookie + * + * TODO: explain what the save set is for. + * + * This function either adds or removes the specified window to the client's (your + * application's) save set. + * + */ +xcb_void_cookie_t +xcb_change_save_set (xcb_connection_t *c, + uint8_t mode, + xcb_window_t window); + +/** + * @brief Reparents a window + * + * @param c The connection + * @param window The window to reparent. + * @param parent The new parent of the window. + * @param x The X position of the window within its new parent. + * @param y The Y position of the window within its new parent. + * @return A cookie + * + * Makes the specified window a child of the specified parent window. If the + * window is mapped, it will automatically be unmapped before reparenting and + * re-mapped after reparenting. The window is placed in the stacking order on top + * with respect to sibling windows. + * + * After reparenting, a ReparentNotify event is generated. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_reparent_window_checked (xcb_connection_t *c, + xcb_window_t window, + xcb_window_t parent, + int16_t x, + int16_t y); + +/** + * @brief Reparents a window + * + * @param c The connection + * @param window The window to reparent. + * @param parent The new parent of the window. + * @param x The X position of the window within its new parent. + * @param y The Y position of the window within its new parent. + * @return A cookie + * + * Makes the specified window a child of the specified parent window. If the + * window is mapped, it will automatically be unmapped before reparenting and + * re-mapped after reparenting. The window is placed in the stacking order on top + * with respect to sibling windows. + * + * After reparenting, a ReparentNotify event is generated. + * + */ +xcb_void_cookie_t +xcb_reparent_window (xcb_connection_t *c, + xcb_window_t window, + xcb_window_t parent, + int16_t x, + int16_t y); + +/** + * @brief Makes a window visible + * + * @param c The connection + * @param window The window to make visible. + * @return A cookie + * + * Maps the specified window. This means making the window visible (as long as its + * parent is visible). + * + * This MapWindow request will be translated to a MapRequest request if a window + * manager is running. The window manager then decides to either map the window or + * not. Set the override-redirect window attribute to true if you want to bypass + * this mechanism. + * + * If the window manager decides to map the window (or if no window manager is + * running), a MapNotify event is generated. + * + * If the window becomes viewable and no earlier contents for it are remembered, + * the X server tiles the window with its background. If the window's background + * is undefined, the existing screen contents are not altered, and the X server + * generates zero or more Expose events. + * + * If the window type is InputOutput, an Expose event will be generated when the + * window becomes visible. The normal response to an Expose event should be to + * repaint the window. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_map_window_checked (xcb_connection_t *c, + xcb_window_t window); + +/** + * @brief Makes a window visible + * + * @param c The connection + * @param window The window to make visible. + * @return A cookie + * + * Maps the specified window. This means making the window visible (as long as its + * parent is visible). + * + * This MapWindow request will be translated to a MapRequest request if a window + * manager is running. The window manager then decides to either map the window or + * not. Set the override-redirect window attribute to true if you want to bypass + * this mechanism. + * + * If the window manager decides to map the window (or if no window manager is + * running), a MapNotify event is generated. + * + * If the window becomes viewable and no earlier contents for it are remembered, + * the X server tiles the window with its background. If the window's background + * is undefined, the existing screen contents are not altered, and the X server + * generates zero or more Expose events. + * + * If the window type is InputOutput, an Expose event will be generated when the + * window becomes visible. The normal response to an Expose event should be to + * repaint the window. + * + */ +xcb_void_cookie_t +xcb_map_window (xcb_connection_t *c, + xcb_window_t window); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_map_subwindows_checked (xcb_connection_t *c, + xcb_window_t window); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_map_subwindows (xcb_connection_t *c, + xcb_window_t window); + +/** + * @brief Makes a window invisible + * + * @param c The connection + * @param window The window to make invisible. + * @return A cookie + * + * Unmaps the specified window. This means making the window invisible (and all + * its child windows). + * + * Unmapping a window leads to the `UnmapNotify` event being generated. Also, + * `Expose` events are generated for formerly obscured windows. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_unmap_window_checked (xcb_connection_t *c, + xcb_window_t window); + +/** + * @brief Makes a window invisible + * + * @param c The connection + * @param window The window to make invisible. + * @return A cookie + * + * Unmaps the specified window. This means making the window invisible (and all + * its child windows). + * + * Unmapping a window leads to the `UnmapNotify` event being generated. Also, + * `Expose` events are generated for formerly obscured windows. + * + */ +xcb_void_cookie_t +xcb_unmap_window (xcb_connection_t *c, + xcb_window_t window); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_unmap_subwindows_checked (xcb_connection_t *c, + xcb_window_t window); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_unmap_subwindows (xcb_connection_t *c, + xcb_window_t window); + +int +xcb_configure_window_value_list_serialize (void **_buffer, + uint16_t value_mask, + const xcb_configure_window_value_list_t *_aux); + +int +xcb_configure_window_value_list_unpack (const void *_buffer, + uint16_t value_mask, + xcb_configure_window_value_list_t *_aux); + +int +xcb_configure_window_value_list_sizeof (const void *_buffer, + uint16_t value_mask); + +int +xcb_configure_window_sizeof (const void *_buffer); + +/** + * @brief Configures window attributes + * + * @param c The connection + * @param window The window to configure. + * @param value_mask Bitmask of attributes to change. + * @param value_list New values, corresponding to the attributes in value_mask. The order has to + * correspond to the order of possible \a value_mask bits. See the example. + * @return A cookie + * + * Configures a window's size, position, border width and stacking order. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_configure_window_checked (xcb_connection_t *c, + xcb_window_t window, + uint16_t value_mask, + const void *value_list); + +/** + * @brief Configures window attributes + * + * @param c The connection + * @param window The window to configure. + * @param value_mask Bitmask of attributes to change. + * @param value_list New values, corresponding to the attributes in value_mask. The order has to + * correspond to the order of possible \a value_mask bits. See the example. + * @return A cookie + * + * Configures a window's size, position, border width and stacking order. + * + */ +xcb_void_cookie_t +xcb_configure_window (xcb_connection_t *c, + xcb_window_t window, + uint16_t value_mask, + const void *value_list); + +/** + * @brief Configures window attributes + * + * @param c The connection + * @param window The window to configure. + * @param value_mask Bitmask of attributes to change. + * @param value_list New values, corresponding to the attributes in value_mask. The order has to + * correspond to the order of possible \a value_mask bits. See the example. + * @return A cookie + * + * Configures a window's size, position, border width and stacking order. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_configure_window_aux_checked (xcb_connection_t *c, + xcb_window_t window, + uint16_t value_mask, + const xcb_configure_window_value_list_t *value_list); + +/** + * @brief Configures window attributes + * + * @param c The connection + * @param window The window to configure. + * @param value_mask Bitmask of attributes to change. + * @param value_list New values, corresponding to the attributes in value_mask. The order has to + * correspond to the order of possible \a value_mask bits. See the example. + * @return A cookie + * + * Configures a window's size, position, border width and stacking order. + * + */ +xcb_void_cookie_t +xcb_configure_window_aux (xcb_connection_t *c, + xcb_window_t window, + uint16_t value_mask, + const xcb_configure_window_value_list_t *value_list); + +void * +xcb_configure_window_value_list (const xcb_configure_window_request_t *R); + +/** + * @brief Change window stacking order + * + * @param c The connection + * @param direction A bitmask of #xcb_circulate_t values. + * @param direction \n + * @param window The window to raise/lower (depending on \a direction). + * @return A cookie + * + * If \a direction is `XCB_CIRCULATE_RAISE_LOWEST`, the lowest mapped child (if + * any) will be raised to the top of the stack. + * + * If \a direction is `XCB_CIRCULATE_LOWER_HIGHEST`, the highest mapped child will + * be lowered to the bottom of the stack. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_circulate_window_checked (xcb_connection_t *c, + uint8_t direction, + xcb_window_t window); + +/** + * @brief Change window stacking order + * + * @param c The connection + * @param direction A bitmask of #xcb_circulate_t values. + * @param direction \n + * @param window The window to raise/lower (depending on \a direction). + * @return A cookie + * + * If \a direction is `XCB_CIRCULATE_RAISE_LOWEST`, the lowest mapped child (if + * any) will be raised to the top of the stack. + * + * If \a direction is `XCB_CIRCULATE_LOWER_HIGHEST`, the highest mapped child will + * be lowered to the bottom of the stack. + * + */ +xcb_void_cookie_t +xcb_circulate_window (xcb_connection_t *c, + uint8_t direction, + xcb_window_t window); + +/** + * @brief Get current window geometry + * + * @param c The connection + * @param drawable The drawable (`Window` or `Pixmap`) of which the geometry will be received. + * @return A cookie + * + * Gets the current geometry of the specified drawable (either `Window` or `Pixmap`). + * + */ +xcb_get_geometry_cookie_t +xcb_get_geometry (xcb_connection_t *c, + xcb_drawable_t drawable); + +/** + * @brief Get current window geometry + * + * @param c The connection + * @param drawable The drawable (`Window` or `Pixmap`) of which the geometry will be received. + * @return A cookie + * + * Gets the current geometry of the specified drawable (either `Window` or `Pixmap`). + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_get_geometry_cookie_t +xcb_get_geometry_unchecked (xcb_connection_t *c, + xcb_drawable_t drawable); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_get_geometry_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_get_geometry_reply_t * +xcb_get_geometry_reply (xcb_connection_t *c, + xcb_get_geometry_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_query_tree_sizeof (const void *_buffer); + +/** + * @brief query the window tree + * + * @param c The connection + * @param window The \a window to query. + * @return A cookie + * + * Gets the root window ID, parent window ID and list of children windows for the + * specified \a window. The children are listed in bottom-to-top stacking order. + * + */ +xcb_query_tree_cookie_t +xcb_query_tree (xcb_connection_t *c, + xcb_window_t window); + +/** + * @brief query the window tree + * + * @param c The connection + * @param window The \a window to query. + * @return A cookie + * + * Gets the root window ID, parent window ID and list of children windows for the + * specified \a window. The children are listed in bottom-to-top stacking order. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_query_tree_cookie_t +xcb_query_tree_unchecked (xcb_connection_t *c, + xcb_window_t window); + +xcb_window_t * +xcb_query_tree_children (const xcb_query_tree_reply_t *R); + +int +xcb_query_tree_children_length (const xcb_query_tree_reply_t *R); + +xcb_generic_iterator_t +xcb_query_tree_children_end (const xcb_query_tree_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_query_tree_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_query_tree_reply_t * +xcb_query_tree_reply (xcb_connection_t *c, + xcb_query_tree_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_intern_atom_sizeof (const void *_buffer); + +/** + * @brief Get atom identifier by name + * + * @param c The connection + * @param only_if_exists Return a valid atom id only if the atom already exists. + * @param name_len The length of the following \a name. + * @param name The name of the atom. + * @return A cookie + * + * Retrieves the identifier (xcb_atom_t TODO) for the atom with the specified + * name. Atoms are used in protocols like EWMH, for example to store window titles + * (`_NET_WM_NAME` atom) as property of a window. + * + * If \a only_if_exists is 0, the atom will be created if it does not already exist. + * If \a only_if_exists is 1, `XCB_ATOM_NONE` will be returned if the atom does + * not yet exist. + * + */ +xcb_intern_atom_cookie_t +xcb_intern_atom (xcb_connection_t *c, + uint8_t only_if_exists, + uint16_t name_len, + const char *name); + +/** + * @brief Get atom identifier by name + * + * @param c The connection + * @param only_if_exists Return a valid atom id only if the atom already exists. + * @param name_len The length of the following \a name. + * @param name The name of the atom. + * @return A cookie + * + * Retrieves the identifier (xcb_atom_t TODO) for the atom with the specified + * name. Atoms are used in protocols like EWMH, for example to store window titles + * (`_NET_WM_NAME` atom) as property of a window. + * + * If \a only_if_exists is 0, the atom will be created if it does not already exist. + * If \a only_if_exists is 1, `XCB_ATOM_NONE` will be returned if the atom does + * not yet exist. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_intern_atom_cookie_t +xcb_intern_atom_unchecked (xcb_connection_t *c, + uint8_t only_if_exists, + uint16_t name_len, + const char *name); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_intern_atom_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_intern_atom_reply_t * +xcb_intern_atom_reply (xcb_connection_t *c, + xcb_intern_atom_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_get_atom_name_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_get_atom_name_cookie_t +xcb_get_atom_name (xcb_connection_t *c, + xcb_atom_t atom); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_get_atom_name_cookie_t +xcb_get_atom_name_unchecked (xcb_connection_t *c, + xcb_atom_t atom); + +char * +xcb_get_atom_name_name (const xcb_get_atom_name_reply_t *R); + +int +xcb_get_atom_name_name_length (const xcb_get_atom_name_reply_t *R); + +xcb_generic_iterator_t +xcb_get_atom_name_name_end (const xcb_get_atom_name_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_get_atom_name_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_get_atom_name_reply_t * +xcb_get_atom_name_reply (xcb_connection_t *c, + xcb_get_atom_name_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_change_property_sizeof (const void *_buffer); + +/** + * @brief Changes a window property + * + * @param c The connection + * @param mode A bitmask of #xcb_prop_mode_t values. + * @param mode \n + * @param window The window whose property you want to change. + * @param property The property you want to change (an atom). + * @param type The type of the property you want to change (an atom). + * @param format Specifies whether the data should be viewed as a list of 8-bit, 16-bit or + * 32-bit quantities. Possible values are 8, 16 and 32. This information allows + * the X server to correctly perform byte-swap operations as necessary. + * @param data_len Specifies the number of elements (see \a format). + * @param data The property data. + * @return A cookie + * + * Sets or updates a property on the specified \a window. Properties are for + * example the window title (`WM_NAME`) or its minimum size (`WM_NORMAL_HINTS`). + * Protocols such as EWMH also use properties - for example EWMH defines the + * window title, encoded as UTF-8 string, in the `_NET_WM_NAME` property. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_change_property_checked (xcb_connection_t *c, + uint8_t mode, + xcb_window_t window, + xcb_atom_t property, + xcb_atom_t type, + uint8_t format, + uint32_t data_len, + const void *data); + +/** + * @brief Changes a window property + * + * @param c The connection + * @param mode A bitmask of #xcb_prop_mode_t values. + * @param mode \n + * @param window The window whose property you want to change. + * @param property The property you want to change (an atom). + * @param type The type of the property you want to change (an atom). + * @param format Specifies whether the data should be viewed as a list of 8-bit, 16-bit or + * 32-bit quantities. Possible values are 8, 16 and 32. This information allows + * the X server to correctly perform byte-swap operations as necessary. + * @param data_len Specifies the number of elements (see \a format). + * @param data The property data. + * @return A cookie + * + * Sets or updates a property on the specified \a window. Properties are for + * example the window title (`WM_NAME`) or its minimum size (`WM_NORMAL_HINTS`). + * Protocols such as EWMH also use properties - for example EWMH defines the + * window title, encoded as UTF-8 string, in the `_NET_WM_NAME` property. + * + */ +xcb_void_cookie_t +xcb_change_property (xcb_connection_t *c, + uint8_t mode, + xcb_window_t window, + xcb_atom_t property, + xcb_atom_t type, + uint8_t format, + uint32_t data_len, + const void *data); + +void * +xcb_change_property_data (const xcb_change_property_request_t *R); + +int +xcb_change_property_data_length (const xcb_change_property_request_t *R); + +xcb_generic_iterator_t +xcb_change_property_data_end (const xcb_change_property_request_t *R); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_delete_property_checked (xcb_connection_t *c, + xcb_window_t window, + xcb_atom_t property); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_delete_property (xcb_connection_t *c, + xcb_window_t window, + xcb_atom_t property); + +int +xcb_get_property_sizeof (const void *_buffer); + +/** + * @brief Gets a window property + * + * @param c The connection + * @param _delete Whether the property should actually be deleted. For deleting a property, the + * specified \a type has to match the actual property type. + * @param window The window whose property you want to get. + * @param property The property you want to get (an atom). + * @param type The type of the property you want to get (an atom). + * @param long_offset Specifies the offset (in 32-bit multiples) in the specified property where the + * data is to be retrieved. + * @param long_length Specifies how many 32-bit multiples of data should be retrieved (e.g. if you + * set \a long_length to 4, you will receive 16 bytes of data). + * @return A cookie + * + * Gets the specified \a property from the specified \a window. Properties are for + * example the window title (`WM_NAME`) or its minimum size (`WM_NORMAL_HINTS`). + * Protocols such as EWMH also use properties - for example EWMH defines the + * window title, encoded as UTF-8 string, in the `_NET_WM_NAME` property. + * + * TODO: talk about \a type + * + * TODO: talk about `delete` + * + * TODO: talk about the offset/length thing. what's a valid use case? + * + */ +xcb_get_property_cookie_t +xcb_get_property (xcb_connection_t *c, + uint8_t _delete, + xcb_window_t window, + xcb_atom_t property, + xcb_atom_t type, + uint32_t long_offset, + uint32_t long_length); + +/** + * @brief Gets a window property + * + * @param c The connection + * @param _delete Whether the property should actually be deleted. For deleting a property, the + * specified \a type has to match the actual property type. + * @param window The window whose property you want to get. + * @param property The property you want to get (an atom). + * @param type The type of the property you want to get (an atom). + * @param long_offset Specifies the offset (in 32-bit multiples) in the specified property where the + * data is to be retrieved. + * @param long_length Specifies how many 32-bit multiples of data should be retrieved (e.g. if you + * set \a long_length to 4, you will receive 16 bytes of data). + * @return A cookie + * + * Gets the specified \a property from the specified \a window. Properties are for + * example the window title (`WM_NAME`) or its minimum size (`WM_NORMAL_HINTS`). + * Protocols such as EWMH also use properties - for example EWMH defines the + * window title, encoded as UTF-8 string, in the `_NET_WM_NAME` property. + * + * TODO: talk about \a type + * + * TODO: talk about `delete` + * + * TODO: talk about the offset/length thing. what's a valid use case? + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_get_property_cookie_t +xcb_get_property_unchecked (xcb_connection_t *c, + uint8_t _delete, + xcb_window_t window, + xcb_atom_t property, + xcb_atom_t type, + uint32_t long_offset, + uint32_t long_length); + +void * +xcb_get_property_value (const xcb_get_property_reply_t *R); + +int +xcb_get_property_value_length (const xcb_get_property_reply_t *R); + +xcb_generic_iterator_t +xcb_get_property_value_end (const xcb_get_property_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_get_property_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_get_property_reply_t * +xcb_get_property_reply (xcb_connection_t *c, + xcb_get_property_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_list_properties_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_list_properties_cookie_t +xcb_list_properties (xcb_connection_t *c, + xcb_window_t window); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_list_properties_cookie_t +xcb_list_properties_unchecked (xcb_connection_t *c, + xcb_window_t window); + +xcb_atom_t * +xcb_list_properties_atoms (const xcb_list_properties_reply_t *R); + +int +xcb_list_properties_atoms_length (const xcb_list_properties_reply_t *R); + +xcb_generic_iterator_t +xcb_list_properties_atoms_end (const xcb_list_properties_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_list_properties_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_list_properties_reply_t * +xcb_list_properties_reply (xcb_connection_t *c, + xcb_list_properties_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +/** + * @brief Sets the owner of a selection + * + * @param c The connection + * @param owner The new owner of the selection. + * \n + * The special value `XCB_NONE` means that the selection will have no owner. + * @param selection The selection. + * @param time Timestamp to avoid race conditions when running X over the network. + * \n + * The selection will not be changed if \a time is earlier than the current + * last-change time of the \a selection or is later than the current X server time. + * Otherwise, the last-change time is set to the specified time. + * \n + * The special value `XCB_CURRENT_TIME` will be replaced with the current server + * time. + * @return A cookie + * + * Makes `window` the owner of the selection \a selection and updates the + * last-change time of the specified selection. + * + * TODO: briefly explain what a selection is. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_set_selection_owner_checked (xcb_connection_t *c, + xcb_window_t owner, + xcb_atom_t selection, + xcb_timestamp_t time); + +/** + * @brief Sets the owner of a selection + * + * @param c The connection + * @param owner The new owner of the selection. + * \n + * The special value `XCB_NONE` means that the selection will have no owner. + * @param selection The selection. + * @param time Timestamp to avoid race conditions when running X over the network. + * \n + * The selection will not be changed if \a time is earlier than the current + * last-change time of the \a selection or is later than the current X server time. + * Otherwise, the last-change time is set to the specified time. + * \n + * The special value `XCB_CURRENT_TIME` will be replaced with the current server + * time. + * @return A cookie + * + * Makes `window` the owner of the selection \a selection and updates the + * last-change time of the specified selection. + * + * TODO: briefly explain what a selection is. + * + */ +xcb_void_cookie_t +xcb_set_selection_owner (xcb_connection_t *c, + xcb_window_t owner, + xcb_atom_t selection, + xcb_timestamp_t time); + +/** + * @brief Gets the owner of a selection + * + * @param c The connection + * @param selection The selection. + * @return A cookie + * + * Gets the owner of the specified selection. + * + * TODO: briefly explain what a selection is. + * + */ +xcb_get_selection_owner_cookie_t +xcb_get_selection_owner (xcb_connection_t *c, + xcb_atom_t selection); + +/** + * @brief Gets the owner of a selection + * + * @param c The connection + * @param selection The selection. + * @return A cookie + * + * Gets the owner of the specified selection. + * + * TODO: briefly explain what a selection is. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_get_selection_owner_cookie_t +xcb_get_selection_owner_unchecked (xcb_connection_t *c, + xcb_atom_t selection); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_get_selection_owner_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_get_selection_owner_reply_t * +xcb_get_selection_owner_reply (xcb_connection_t *c, + xcb_get_selection_owner_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_convert_selection_checked (xcb_connection_t *c, + xcb_window_t requestor, + xcb_atom_t selection, + xcb_atom_t target, + xcb_atom_t property, + xcb_timestamp_t time); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_convert_selection (xcb_connection_t *c, + xcb_window_t requestor, + xcb_atom_t selection, + xcb_atom_t target, + xcb_atom_t property, + xcb_timestamp_t time); + +/** + * @brief send an event + * + * @param c The connection + * @param propagate If \a propagate is true and no clients have selected any event on \a destination, + * the destination is replaced with the closest ancestor of \a destination for + * which some client has selected a type in \a event_mask and for which no + * intervening window has that type in its do-not-propagate-mask. If no such + * window exists or if the window is an ancestor of the focus window and + * `InputFocus` was originally specified as the destination, the event is not sent + * to any clients. Otherwise, the event is reported to every client selecting on + * the final destination any of the types specified in \a event_mask. + * @param destination The window to send this event to. Every client which selects any event within + * \a event_mask on \a destination will get the event. + * \n + * The special value `XCB_SEND_EVENT_DEST_POINTER_WINDOW` refers to the window + * that contains the mouse pointer. + * \n + * The special value `XCB_SEND_EVENT_DEST_ITEM_FOCUS` refers to the window which + * has the keyboard focus. + * @param event_mask Event_mask for determining which clients should receive the specified event. + * See \a destination and \a propagate. + * @param event The event to send to the specified \a destination. + * @return A cookie + * + * Identifies the \a destination window, determines which clients should receive + * the specified event and ignores any active grabs. + * + * The \a event must be one of the core events or an event defined by an extension, + * so that the X server can correctly byte-swap the contents as necessary. The + * contents of \a event are otherwise unaltered and unchecked except for the + * `send_event` field which is forced to 'true'. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_send_event_checked (xcb_connection_t *c, + uint8_t propagate, + xcb_window_t destination, + uint32_t event_mask, + const char *event); + +/** + * @brief send an event + * + * @param c The connection + * @param propagate If \a propagate is true and no clients have selected any event on \a destination, + * the destination is replaced with the closest ancestor of \a destination for + * which some client has selected a type in \a event_mask and for which no + * intervening window has that type in its do-not-propagate-mask. If no such + * window exists or if the window is an ancestor of the focus window and + * `InputFocus` was originally specified as the destination, the event is not sent + * to any clients. Otherwise, the event is reported to every client selecting on + * the final destination any of the types specified in \a event_mask. + * @param destination The window to send this event to. Every client which selects any event within + * \a event_mask on \a destination will get the event. + * \n + * The special value `XCB_SEND_EVENT_DEST_POINTER_WINDOW` refers to the window + * that contains the mouse pointer. + * \n + * The special value `XCB_SEND_EVENT_DEST_ITEM_FOCUS` refers to the window which + * has the keyboard focus. + * @param event_mask Event_mask for determining which clients should receive the specified event. + * See \a destination and \a propagate. + * @param event The event to send to the specified \a destination. + * @return A cookie + * + * Identifies the \a destination window, determines which clients should receive + * the specified event and ignores any active grabs. + * + * The \a event must be one of the core events or an event defined by an extension, + * so that the X server can correctly byte-swap the contents as necessary. The + * contents of \a event are otherwise unaltered and unchecked except for the + * `send_event` field which is forced to 'true'. + * + */ +xcb_void_cookie_t +xcb_send_event (xcb_connection_t *c, + uint8_t propagate, + xcb_window_t destination, + uint32_t event_mask, + const char *event); + +/** + * @brief Grab the pointer + * + * @param c The connection + * @param owner_events If 1, the \a grab_window will still get the pointer events. If 0, events are not + * reported to the \a grab_window. + * @param grab_window Specifies the window on which the pointer should be grabbed. + * @param event_mask Specifies which pointer events are reported to the client. + * \n + * TODO: which values? + * @param pointer_mode A bitmask of #xcb_grab_mode_t values. + * @param pointer_mode \n + * @param keyboard_mode A bitmask of #xcb_grab_mode_t values. + * @param keyboard_mode \n + * @param confine_to Specifies the window to confine the pointer in (the user will not be able to + * move the pointer out of that window). + * \n + * The special value `XCB_NONE` means don't confine the pointer. + * @param cursor Specifies the cursor that should be displayed or `XCB_NONE` to not change the + * cursor. + * @param time The time argument allows you to avoid certain circumstances that come up if + * applications take a long time to respond or if there are long network delays. + * Consider a situation where you have two applications, both of which normally + * grab the pointer when clicked on. If both applications specify the timestamp + * from the event, the second application may wake up faster and successfully grab + * the pointer before the first application. The first application then will get + * an indication that the other application grabbed the pointer before its request + * was processed. + * \n + * The special value `XCB_CURRENT_TIME` will be replaced with the current server + * time. + * @return A cookie + * + * Actively grabs control of the pointer. Further pointer events are reported only to the grabbing client. Overrides any active pointer grab by this client. + * + */ +xcb_grab_pointer_cookie_t +xcb_grab_pointer (xcb_connection_t *c, + uint8_t owner_events, + xcb_window_t grab_window, + uint16_t event_mask, + uint8_t pointer_mode, + uint8_t keyboard_mode, + xcb_window_t confine_to, + xcb_cursor_t cursor, + xcb_timestamp_t time); + +/** + * @brief Grab the pointer + * + * @param c The connection + * @param owner_events If 1, the \a grab_window will still get the pointer events. If 0, events are not + * reported to the \a grab_window. + * @param grab_window Specifies the window on which the pointer should be grabbed. + * @param event_mask Specifies which pointer events are reported to the client. + * \n + * TODO: which values? + * @param pointer_mode A bitmask of #xcb_grab_mode_t values. + * @param pointer_mode \n + * @param keyboard_mode A bitmask of #xcb_grab_mode_t values. + * @param keyboard_mode \n + * @param confine_to Specifies the window to confine the pointer in (the user will not be able to + * move the pointer out of that window). + * \n + * The special value `XCB_NONE` means don't confine the pointer. + * @param cursor Specifies the cursor that should be displayed or `XCB_NONE` to not change the + * cursor. + * @param time The time argument allows you to avoid certain circumstances that come up if + * applications take a long time to respond or if there are long network delays. + * Consider a situation where you have two applications, both of which normally + * grab the pointer when clicked on. If both applications specify the timestamp + * from the event, the second application may wake up faster and successfully grab + * the pointer before the first application. The first application then will get + * an indication that the other application grabbed the pointer before its request + * was processed. + * \n + * The special value `XCB_CURRENT_TIME` will be replaced with the current server + * time. + * @return A cookie + * + * Actively grabs control of the pointer. Further pointer events are reported only to the grabbing client. Overrides any active pointer grab by this client. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_grab_pointer_cookie_t +xcb_grab_pointer_unchecked (xcb_connection_t *c, + uint8_t owner_events, + xcb_window_t grab_window, + uint16_t event_mask, + uint8_t pointer_mode, + uint8_t keyboard_mode, + xcb_window_t confine_to, + xcb_cursor_t cursor, + xcb_timestamp_t time); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_grab_pointer_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_grab_pointer_reply_t * +xcb_grab_pointer_reply (xcb_connection_t *c, + xcb_grab_pointer_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +/** + * @brief release the pointer + * + * @param c The connection + * @param time Timestamp to avoid race conditions when running X over the network. + * \n + * The pointer will not be released if \a time is earlier than the + * last-pointer-grab time or later than the current X server time. + * @return A cookie + * + * Releases the pointer and any queued events if you actively grabbed the pointer + * before using `xcb_grab_pointer`, `xcb_grab_button` or within a normal button + * press. + * + * EnterNotify and LeaveNotify events are generated. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_ungrab_pointer_checked (xcb_connection_t *c, + xcb_timestamp_t time); + +/** + * @brief release the pointer + * + * @param c The connection + * @param time Timestamp to avoid race conditions when running X over the network. + * \n + * The pointer will not be released if \a time is earlier than the + * last-pointer-grab time or later than the current X server time. + * @return A cookie + * + * Releases the pointer and any queued events if you actively grabbed the pointer + * before using `xcb_grab_pointer`, `xcb_grab_button` or within a normal button + * press. + * + * EnterNotify and LeaveNotify events are generated. + * + */ +xcb_void_cookie_t +xcb_ungrab_pointer (xcb_connection_t *c, + xcb_timestamp_t time); + +/** + * @brief Grab pointer button(s) + * + * @param c The connection + * @param owner_events If 1, the \a grab_window will still get the pointer events. If 0, events are not + * reported to the \a grab_window. + * @param grab_window Specifies the window on which the pointer should be grabbed. + * @param event_mask Specifies which pointer events are reported to the client. + * \n + * TODO: which values? + * @param pointer_mode A bitmask of #xcb_grab_mode_t values. + * @param pointer_mode \n + * @param keyboard_mode A bitmask of #xcb_grab_mode_t values. + * @param keyboard_mode \n + * @param confine_to Specifies the window to confine the pointer in (the user will not be able to + * move the pointer out of that window). + * \n + * The special value `XCB_NONE` means don't confine the pointer. + * @param cursor Specifies the cursor that should be displayed or `XCB_NONE` to not change the + * cursor. + * @param button A bitmask of #xcb_button_index_t values. + * @param button \n + * @param modifiers The modifiers to grab. + * \n + * Using the special value `XCB_MOD_MASK_ANY` means grab the pointer with all + * possible modifier combinations. + * @return A cookie + * + * This request establishes a passive grab. The pointer is actively grabbed as + * described in GrabPointer, the last-pointer-grab time is set to the time at + * which the button was pressed (as transmitted in the ButtonPress event), and the + * ButtonPress event is reported if all of the following conditions are true: + * + * The pointer is not grabbed and the specified button is logically pressed when + * the specified modifier keys are logically down, and no other buttons or + * modifier keys are logically down. + * + * The grab-window contains the pointer. + * + * The confine-to window (if any) is viewable. + * + * A passive grab on the same button/key combination does not exist on any + * ancestor of grab-window. + * + * The interpretation of the remaining arguments is the same as for GrabPointer. + * The active grab is terminated automatically when the logical state of the + * pointer has all buttons released, independent of the logical state of modifier + * keys. Note that the logical state of a device (as seen by means of the + * protocol) may lag the physical state if device event processing is frozen. This + * request overrides all previous passive grabs by the same client on the same + * button/key combinations on the same window. A modifier of AnyModifier is + * equivalent to issuing the request for all possible modifier combinations + * (including the combination of no modifiers). It is not required that all + * specified modifiers have currently assigned keycodes. A button of AnyButton is + * equivalent to issuing the request for all possible buttons. Otherwise, it is + * not required that the button specified currently be assigned to a physical + * button. + * + * An Access error is generated if some other client has already issued a + * GrabButton request with the same button/key combination on the same window. + * When using AnyModifier or AnyButton, the request fails completely (no grabs are + * established), and an Access error is generated if there is a conflicting grab + * for any combination. The request has no effect on an active grab. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_grab_button_checked (xcb_connection_t *c, + uint8_t owner_events, + xcb_window_t grab_window, + uint16_t event_mask, + uint8_t pointer_mode, + uint8_t keyboard_mode, + xcb_window_t confine_to, + xcb_cursor_t cursor, + uint8_t button, + uint16_t modifiers); + +/** + * @brief Grab pointer button(s) + * + * @param c The connection + * @param owner_events If 1, the \a grab_window will still get the pointer events. If 0, events are not + * reported to the \a grab_window. + * @param grab_window Specifies the window on which the pointer should be grabbed. + * @param event_mask Specifies which pointer events are reported to the client. + * \n + * TODO: which values? + * @param pointer_mode A bitmask of #xcb_grab_mode_t values. + * @param pointer_mode \n + * @param keyboard_mode A bitmask of #xcb_grab_mode_t values. + * @param keyboard_mode \n + * @param confine_to Specifies the window to confine the pointer in (the user will not be able to + * move the pointer out of that window). + * \n + * The special value `XCB_NONE` means don't confine the pointer. + * @param cursor Specifies the cursor that should be displayed or `XCB_NONE` to not change the + * cursor. + * @param button A bitmask of #xcb_button_index_t values. + * @param button \n + * @param modifiers The modifiers to grab. + * \n + * Using the special value `XCB_MOD_MASK_ANY` means grab the pointer with all + * possible modifier combinations. + * @return A cookie + * + * This request establishes a passive grab. The pointer is actively grabbed as + * described in GrabPointer, the last-pointer-grab time is set to the time at + * which the button was pressed (as transmitted in the ButtonPress event), and the + * ButtonPress event is reported if all of the following conditions are true: + * + * The pointer is not grabbed and the specified button is logically pressed when + * the specified modifier keys are logically down, and no other buttons or + * modifier keys are logically down. + * + * The grab-window contains the pointer. + * + * The confine-to window (if any) is viewable. + * + * A passive grab on the same button/key combination does not exist on any + * ancestor of grab-window. + * + * The interpretation of the remaining arguments is the same as for GrabPointer. + * The active grab is terminated automatically when the logical state of the + * pointer has all buttons released, independent of the logical state of modifier + * keys. Note that the logical state of a device (as seen by means of the + * protocol) may lag the physical state if device event processing is frozen. This + * request overrides all previous passive grabs by the same client on the same + * button/key combinations on the same window. A modifier of AnyModifier is + * equivalent to issuing the request for all possible modifier combinations + * (including the combination of no modifiers). It is not required that all + * specified modifiers have currently assigned keycodes. A button of AnyButton is + * equivalent to issuing the request for all possible buttons. Otherwise, it is + * not required that the button specified currently be assigned to a physical + * button. + * + * An Access error is generated if some other client has already issued a + * GrabButton request with the same button/key combination on the same window. + * When using AnyModifier or AnyButton, the request fails completely (no grabs are + * established), and an Access error is generated if there is a conflicting grab + * for any combination. The request has no effect on an active grab. + * + */ +xcb_void_cookie_t +xcb_grab_button (xcb_connection_t *c, + uint8_t owner_events, + xcb_window_t grab_window, + uint16_t event_mask, + uint8_t pointer_mode, + uint8_t keyboard_mode, + xcb_window_t confine_to, + xcb_cursor_t cursor, + uint8_t button, + uint16_t modifiers); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_ungrab_button_checked (xcb_connection_t *c, + uint8_t button, + xcb_window_t grab_window, + uint16_t modifiers); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_ungrab_button (xcb_connection_t *c, + uint8_t button, + xcb_window_t grab_window, + uint16_t modifiers); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_change_active_pointer_grab_checked (xcb_connection_t *c, + xcb_cursor_t cursor, + xcb_timestamp_t time, + uint16_t event_mask); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_change_active_pointer_grab (xcb_connection_t *c, + xcb_cursor_t cursor, + xcb_timestamp_t time, + uint16_t event_mask); + +/** + * @brief Grab the keyboard + * + * @param c The connection + * @param owner_events If 1, the \a grab_window will still get the pointer events. If 0, events are not + * reported to the \a grab_window. + * @param grab_window Specifies the window on which the pointer should be grabbed. + * @param time Timestamp to avoid race conditions when running X over the network. + * \n + * The special value `XCB_CURRENT_TIME` will be replaced with the current server + * time. + * @param pointer_mode A bitmask of #xcb_grab_mode_t values. + * @param pointer_mode \n + * @param keyboard_mode A bitmask of #xcb_grab_mode_t values. + * @param keyboard_mode \n + * @return A cookie + * + * Actively grabs control of the keyboard and generates FocusIn and FocusOut + * events. Further key events are reported only to the grabbing client. + * + * Any active keyboard grab by this client is overridden. If the keyboard is + * actively grabbed by some other client, `AlreadyGrabbed` is returned. If + * \a grab_window is not viewable, `GrabNotViewable` is returned. If the keyboard + * is frozen by an active grab of another client, `GrabFrozen` is returned. If the + * specified \a time is earlier than the last-keyboard-grab time or later than the + * current X server time, `GrabInvalidTime` is returned. Otherwise, the + * last-keyboard-grab time is set to the specified time. + * + */ +xcb_grab_keyboard_cookie_t +xcb_grab_keyboard (xcb_connection_t *c, + uint8_t owner_events, + xcb_window_t grab_window, + xcb_timestamp_t time, + uint8_t pointer_mode, + uint8_t keyboard_mode); + +/** + * @brief Grab the keyboard + * + * @param c The connection + * @param owner_events If 1, the \a grab_window will still get the pointer events. If 0, events are not + * reported to the \a grab_window. + * @param grab_window Specifies the window on which the pointer should be grabbed. + * @param time Timestamp to avoid race conditions when running X over the network. + * \n + * The special value `XCB_CURRENT_TIME` will be replaced with the current server + * time. + * @param pointer_mode A bitmask of #xcb_grab_mode_t values. + * @param pointer_mode \n + * @param keyboard_mode A bitmask of #xcb_grab_mode_t values. + * @param keyboard_mode \n + * @return A cookie + * + * Actively grabs control of the keyboard and generates FocusIn and FocusOut + * events. Further key events are reported only to the grabbing client. + * + * Any active keyboard grab by this client is overridden. If the keyboard is + * actively grabbed by some other client, `AlreadyGrabbed` is returned. If + * \a grab_window is not viewable, `GrabNotViewable` is returned. If the keyboard + * is frozen by an active grab of another client, `GrabFrozen` is returned. If the + * specified \a time is earlier than the last-keyboard-grab time or later than the + * current X server time, `GrabInvalidTime` is returned. Otherwise, the + * last-keyboard-grab time is set to the specified time. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_grab_keyboard_cookie_t +xcb_grab_keyboard_unchecked (xcb_connection_t *c, + uint8_t owner_events, + xcb_window_t grab_window, + xcb_timestamp_t time, + uint8_t pointer_mode, + uint8_t keyboard_mode); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_grab_keyboard_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_grab_keyboard_reply_t * +xcb_grab_keyboard_reply (xcb_connection_t *c, + xcb_grab_keyboard_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_ungrab_keyboard_checked (xcb_connection_t *c, + xcb_timestamp_t time); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_ungrab_keyboard (xcb_connection_t *c, + xcb_timestamp_t time); + +/** + * @brief Grab keyboard key(s) + * + * @param c The connection + * @param owner_events If 1, the \a grab_window will still get the key events. If 0, events are not + * reported to the \a grab_window. + * @param grab_window Specifies the window on which the key should be grabbed. + * @param modifiers The modifiers to grab. + * \n + * Using the special value `XCB_MOD_MASK_ANY` means grab the key with all + * possible modifier combinations. + * @param key The keycode of the key to grab. + * \n + * The special value `XCB_GRAB_ANY` means grab any key. + * @param pointer_mode A bitmask of #xcb_grab_mode_t values. + * @param pointer_mode \n + * @param keyboard_mode A bitmask of #xcb_grab_mode_t values. + * @param keyboard_mode \n + * @return A cookie + * + * Establishes a passive grab on the keyboard. In the future, the keyboard is + * actively grabbed (as for `GrabKeyboard`), the last-keyboard-grab time is set to + * the time at which the key was pressed (as transmitted in the KeyPress event), + * and the KeyPress event is reported if all of the following conditions are true: + * + * The keyboard is not grabbed and the specified key (which can itself be a + * modifier key) is logically pressed when the specified modifier keys are + * logically down, and no other modifier keys are logically down. + * + * Either the grab_window is an ancestor of (or is) the focus window, or the + * grab_window is a descendant of the focus window and contains the pointer. + * + * A passive grab on the same key combination does not exist on any ancestor of + * grab_window. + * + * The interpretation of the remaining arguments is as for XGrabKeyboard. The active grab is terminated + * automatically when the logical state of the keyboard has the specified key released (independent of the + * logical state of the modifier keys), at which point a KeyRelease event is reported to the grabbing window. + * + * Note that the logical state of a device (as seen by client applications) may lag the physical state if + * device event processing is frozen. + * + * A modifiers argument of AnyModifier is equivalent to issuing the request for all possible modifier combinations (including the combination of no modifiers). It is not required that all modifiers specified + * have currently assigned KeyCodes. A keycode argument of AnyKey is equivalent to issuing the request for + * all possible KeyCodes. Otherwise, the specified keycode must be in the range specified by min_keycode + * and max_keycode in the connection setup, or a BadValue error results. + * + * If some other client has issued a XGrabKey with the same key combination on the same window, a BadAccess + * error results. When using AnyModifier or AnyKey, the request fails completely, and a BadAccess error + * results (no grabs are established) if there is a conflicting grab for any combination. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_grab_key_checked (xcb_connection_t *c, + uint8_t owner_events, + xcb_window_t grab_window, + uint16_t modifiers, + xcb_keycode_t key, + uint8_t pointer_mode, + uint8_t keyboard_mode); + +/** + * @brief Grab keyboard key(s) + * + * @param c The connection + * @param owner_events If 1, the \a grab_window will still get the key events. If 0, events are not + * reported to the \a grab_window. + * @param grab_window Specifies the window on which the key should be grabbed. + * @param modifiers The modifiers to grab. + * \n + * Using the special value `XCB_MOD_MASK_ANY` means grab the key with all + * possible modifier combinations. + * @param key The keycode of the key to grab. + * \n + * The special value `XCB_GRAB_ANY` means grab any key. + * @param pointer_mode A bitmask of #xcb_grab_mode_t values. + * @param pointer_mode \n + * @param keyboard_mode A bitmask of #xcb_grab_mode_t values. + * @param keyboard_mode \n + * @return A cookie + * + * Establishes a passive grab on the keyboard. In the future, the keyboard is + * actively grabbed (as for `GrabKeyboard`), the last-keyboard-grab time is set to + * the time at which the key was pressed (as transmitted in the KeyPress event), + * and the KeyPress event is reported if all of the following conditions are true: + * + * The keyboard is not grabbed and the specified key (which can itself be a + * modifier key) is logically pressed when the specified modifier keys are + * logically down, and no other modifier keys are logically down. + * + * Either the grab_window is an ancestor of (or is) the focus window, or the + * grab_window is a descendant of the focus window and contains the pointer. + * + * A passive grab on the same key combination does not exist on any ancestor of + * grab_window. + * + * The interpretation of the remaining arguments is as for XGrabKeyboard. The active grab is terminated + * automatically when the logical state of the keyboard has the specified key released (independent of the + * logical state of the modifier keys), at which point a KeyRelease event is reported to the grabbing window. + * + * Note that the logical state of a device (as seen by client applications) may lag the physical state if + * device event processing is frozen. + * + * A modifiers argument of AnyModifier is equivalent to issuing the request for all possible modifier combinations (including the combination of no modifiers). It is not required that all modifiers specified + * have currently assigned KeyCodes. A keycode argument of AnyKey is equivalent to issuing the request for + * all possible KeyCodes. Otherwise, the specified keycode must be in the range specified by min_keycode + * and max_keycode in the connection setup, or a BadValue error results. + * + * If some other client has issued a XGrabKey with the same key combination on the same window, a BadAccess + * error results. When using AnyModifier or AnyKey, the request fails completely, and a BadAccess error + * results (no grabs are established) if there is a conflicting grab for any combination. + * + */ +xcb_void_cookie_t +xcb_grab_key (xcb_connection_t *c, + uint8_t owner_events, + xcb_window_t grab_window, + uint16_t modifiers, + xcb_keycode_t key, + uint8_t pointer_mode, + uint8_t keyboard_mode); + +/** + * @brief release a key combination + * + * @param c The connection + * @param key The keycode of the specified key combination. + * \n + * Using the special value `XCB_GRAB_ANY` means releasing all possible key codes. + * @param grab_window The window on which the grabbed key combination will be released. + * @param modifiers The modifiers of the specified key combination. + * \n + * Using the special value `XCB_MOD_MASK_ANY` means releasing the key combination + * with every possible modifier combination. + * @return A cookie + * + * Releases the key combination on \a grab_window if you grabbed it using + * `xcb_grab_key` before. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_ungrab_key_checked (xcb_connection_t *c, + xcb_keycode_t key, + xcb_window_t grab_window, + uint16_t modifiers); + +/** + * @brief release a key combination + * + * @param c The connection + * @param key The keycode of the specified key combination. + * \n + * Using the special value `XCB_GRAB_ANY` means releasing all possible key codes. + * @param grab_window The window on which the grabbed key combination will be released. + * @param modifiers The modifiers of the specified key combination. + * \n + * Using the special value `XCB_MOD_MASK_ANY` means releasing the key combination + * with every possible modifier combination. + * @return A cookie + * + * Releases the key combination on \a grab_window if you grabbed it using + * `xcb_grab_key` before. + * + */ +xcb_void_cookie_t +xcb_ungrab_key (xcb_connection_t *c, + xcb_keycode_t key, + xcb_window_t grab_window, + uint16_t modifiers); + +/** + * @brief release queued events + * + * @param c The connection + * @param mode A bitmask of #xcb_allow_t values. + * @param mode \n + * @param time Timestamp to avoid race conditions when running X over the network. + * \n + * The special value `XCB_CURRENT_TIME` will be replaced with the current server + * time. + * @return A cookie + * + * Releases queued events if the client has caused a device (pointer/keyboard) to + * freeze due to grabbing it actively. This request has no effect if \a time is + * earlier than the last-grab time of the most recent active grab for this client + * or if \a time is later than the current X server time. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_allow_events_checked (xcb_connection_t *c, + uint8_t mode, + xcb_timestamp_t time); + +/** + * @brief release queued events + * + * @param c The connection + * @param mode A bitmask of #xcb_allow_t values. + * @param mode \n + * @param time Timestamp to avoid race conditions when running X over the network. + * \n + * The special value `XCB_CURRENT_TIME` will be replaced with the current server + * time. + * @return A cookie + * + * Releases queued events if the client has caused a device (pointer/keyboard) to + * freeze due to grabbing it actively. This request has no effect if \a time is + * earlier than the last-grab time of the most recent active grab for this client + * or if \a time is later than the current X server time. + * + */ +xcb_void_cookie_t +xcb_allow_events (xcb_connection_t *c, + uint8_t mode, + xcb_timestamp_t time); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_grab_server_checked (xcb_connection_t *c); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_grab_server (xcb_connection_t *c); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_ungrab_server_checked (xcb_connection_t *c); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_ungrab_server (xcb_connection_t *c); + +/** + * @brief get pointer coordinates + * + * @param c The connection + * @param window A window to check if the pointer is on the same screen as \a window (see the + * `same_screen` field in the reply). + * @return A cookie + * + * Gets the root window the pointer is logically on and the pointer coordinates + * relative to the root window's origin. + * + */ +xcb_query_pointer_cookie_t +xcb_query_pointer (xcb_connection_t *c, + xcb_window_t window); + +/** + * @brief get pointer coordinates + * + * @param c The connection + * @param window A window to check if the pointer is on the same screen as \a window (see the + * `same_screen` field in the reply). + * @return A cookie + * + * Gets the root window the pointer is logically on and the pointer coordinates + * relative to the root window's origin. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_query_pointer_cookie_t +xcb_query_pointer_unchecked (xcb_connection_t *c, + xcb_window_t window); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_query_pointer_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_query_pointer_reply_t * +xcb_query_pointer_reply (xcb_connection_t *c, + xcb_query_pointer_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_timecoord_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_timecoord_t) + */ +void +xcb_timecoord_next (xcb_timecoord_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_timecoord_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_timecoord_end (xcb_timecoord_iterator_t i); + +int +xcb_get_motion_events_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_get_motion_events_cookie_t +xcb_get_motion_events (xcb_connection_t *c, + xcb_window_t window, + xcb_timestamp_t start, + xcb_timestamp_t stop); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_get_motion_events_cookie_t +xcb_get_motion_events_unchecked (xcb_connection_t *c, + xcb_window_t window, + xcb_timestamp_t start, + xcb_timestamp_t stop); + +xcb_timecoord_t * +xcb_get_motion_events_events (const xcb_get_motion_events_reply_t *R); + +int +xcb_get_motion_events_events_length (const xcb_get_motion_events_reply_t *R); + +xcb_timecoord_iterator_t +xcb_get_motion_events_events_iterator (const xcb_get_motion_events_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_get_motion_events_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_get_motion_events_reply_t * +xcb_get_motion_events_reply (xcb_connection_t *c, + xcb_get_motion_events_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_translate_coordinates_cookie_t +xcb_translate_coordinates (xcb_connection_t *c, + xcb_window_t src_window, + xcb_window_t dst_window, + int16_t src_x, + int16_t src_y); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_translate_coordinates_cookie_t +xcb_translate_coordinates_unchecked (xcb_connection_t *c, + xcb_window_t src_window, + xcb_window_t dst_window, + int16_t src_x, + int16_t src_y); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_translate_coordinates_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_translate_coordinates_reply_t * +xcb_translate_coordinates_reply (xcb_connection_t *c, + xcb_translate_coordinates_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +/** + * @brief move mouse pointer + * + * @param c The connection + * @param src_window If \a src_window is not `XCB_NONE` (TODO), the move will only take place if the + * pointer is inside \a src_window and within the rectangle specified by (\a src_x, + * \a src_y, \a src_width, \a src_height). The rectangle coordinates are relative to + * \a src_window. + * @param dst_window If \a dst_window is not `XCB_NONE` (TODO), the pointer will be moved to the + * offsets (\a dst_x, \a dst_y) relative to \a dst_window. If \a dst_window is + * `XCB_NONE` (TODO), the pointer will be moved by the offsets (\a dst_x, \a dst_y) + * relative to the current position of the pointer. + * @return A cookie + * + * Moves the mouse pointer to the specified position. + * + * If \a src_window is not `XCB_NONE` (TODO), the move will only take place if the + * pointer is inside \a src_window and within the rectangle specified by (\a src_x, + * \a src_y, \a src_width, \a src_height). The rectangle coordinates are relative to + * \a src_window. + * + * If \a dst_window is not `XCB_NONE` (TODO), the pointer will be moved to the + * offsets (\a dst_x, \a dst_y) relative to \a dst_window. If \a dst_window is + * `XCB_NONE` (TODO), the pointer will be moved by the offsets (\a dst_x, \a dst_y) + * relative to the current position of the pointer. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_warp_pointer_checked (xcb_connection_t *c, + xcb_window_t src_window, + xcb_window_t dst_window, + int16_t src_x, + int16_t src_y, + uint16_t src_width, + uint16_t src_height, + int16_t dst_x, + int16_t dst_y); + +/** + * @brief move mouse pointer + * + * @param c The connection + * @param src_window If \a src_window is not `XCB_NONE` (TODO), the move will only take place if the + * pointer is inside \a src_window and within the rectangle specified by (\a src_x, + * \a src_y, \a src_width, \a src_height). The rectangle coordinates are relative to + * \a src_window. + * @param dst_window If \a dst_window is not `XCB_NONE` (TODO), the pointer will be moved to the + * offsets (\a dst_x, \a dst_y) relative to \a dst_window. If \a dst_window is + * `XCB_NONE` (TODO), the pointer will be moved by the offsets (\a dst_x, \a dst_y) + * relative to the current position of the pointer. + * @return A cookie + * + * Moves the mouse pointer to the specified position. + * + * If \a src_window is not `XCB_NONE` (TODO), the move will only take place if the + * pointer is inside \a src_window and within the rectangle specified by (\a src_x, + * \a src_y, \a src_width, \a src_height). The rectangle coordinates are relative to + * \a src_window. + * + * If \a dst_window is not `XCB_NONE` (TODO), the pointer will be moved to the + * offsets (\a dst_x, \a dst_y) relative to \a dst_window. If \a dst_window is + * `XCB_NONE` (TODO), the pointer will be moved by the offsets (\a dst_x, \a dst_y) + * relative to the current position of the pointer. + * + */ +xcb_void_cookie_t +xcb_warp_pointer (xcb_connection_t *c, + xcb_window_t src_window, + xcb_window_t dst_window, + int16_t src_x, + int16_t src_y, + uint16_t src_width, + uint16_t src_height, + int16_t dst_x, + int16_t dst_y); + +/** + * @brief Sets input focus + * + * @param c The connection + * @param revert_to A bitmask of #xcb_input_focus_t values. + * @param revert_to Specifies what happens when the \a focus window becomes unviewable (if \a focus + * is neither `XCB_NONE` nor `XCB_POINTER_ROOT`). + * @param focus The window to focus. All keyboard events will be reported to this window. The + * window must be viewable (TODO), or a `xcb_match_error_t` occurs (TODO). + * \n + * If \a focus is `XCB_NONE` (TODO), all keyboard events are + * discarded until a new focus window is set. + * \n + * If \a focus is `XCB_POINTER_ROOT` (TODO), focus is on the root window of the + * screen on which the pointer is on currently. + * @param time Timestamp to avoid race conditions when running X over the network. + * \n + * The special value `XCB_CURRENT_TIME` will be replaced with the current server + * time. + * @return A cookie + * + * Changes the input focus and the last-focus-change time. If the specified \a time + * is earlier than the current last-focus-change time, the request is ignored (to + * avoid race conditions when running X over the network). + * + * A FocusIn and FocusOut event is generated when focus is changed. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_set_input_focus_checked (xcb_connection_t *c, + uint8_t revert_to, + xcb_window_t focus, + xcb_timestamp_t time); + +/** + * @brief Sets input focus + * + * @param c The connection + * @param revert_to A bitmask of #xcb_input_focus_t values. + * @param revert_to Specifies what happens when the \a focus window becomes unviewable (if \a focus + * is neither `XCB_NONE` nor `XCB_POINTER_ROOT`). + * @param focus The window to focus. All keyboard events will be reported to this window. The + * window must be viewable (TODO), or a `xcb_match_error_t` occurs (TODO). + * \n + * If \a focus is `XCB_NONE` (TODO), all keyboard events are + * discarded until a new focus window is set. + * \n + * If \a focus is `XCB_POINTER_ROOT` (TODO), focus is on the root window of the + * screen on which the pointer is on currently. + * @param time Timestamp to avoid race conditions when running X over the network. + * \n + * The special value `XCB_CURRENT_TIME` will be replaced with the current server + * time. + * @return A cookie + * + * Changes the input focus and the last-focus-change time. If the specified \a time + * is earlier than the current last-focus-change time, the request is ignored (to + * avoid race conditions when running X over the network). + * + * A FocusIn and FocusOut event is generated when focus is changed. + * + */ +xcb_void_cookie_t +xcb_set_input_focus (xcb_connection_t *c, + uint8_t revert_to, + xcb_window_t focus, + xcb_timestamp_t time); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_get_input_focus_cookie_t +xcb_get_input_focus (xcb_connection_t *c); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_get_input_focus_cookie_t +xcb_get_input_focus_unchecked (xcb_connection_t *c); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_get_input_focus_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_get_input_focus_reply_t * +xcb_get_input_focus_reply (xcb_connection_t *c, + xcb_get_input_focus_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_query_keymap_cookie_t +xcb_query_keymap (xcb_connection_t *c); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_query_keymap_cookie_t +xcb_query_keymap_unchecked (xcb_connection_t *c); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_query_keymap_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_query_keymap_reply_t * +xcb_query_keymap_reply (xcb_connection_t *c, + xcb_query_keymap_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_open_font_sizeof (const void *_buffer); + +/** + * @brief opens a font + * + * @param c The connection + * @param fid The ID with which you will refer to the font, created by `xcb_generate_id`. + * @param name_len Length (in bytes) of \a name. + * @param name A pattern describing an X core font. + * @return A cookie + * + * Opens any X core font matching the given \a name (for example "-misc-fixed-*"). + * + * Note that X core fonts are deprecated (but still supported) in favor of + * client-side rendering using Xft. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_open_font_checked (xcb_connection_t *c, + xcb_font_t fid, + uint16_t name_len, + const char *name); + +/** + * @brief opens a font + * + * @param c The connection + * @param fid The ID with which you will refer to the font, created by `xcb_generate_id`. + * @param name_len Length (in bytes) of \a name. + * @param name A pattern describing an X core font. + * @return A cookie + * + * Opens any X core font matching the given \a name (for example "-misc-fixed-*"). + * + * Note that X core fonts are deprecated (but still supported) in favor of + * client-side rendering using Xft. + * + */ +xcb_void_cookie_t +xcb_open_font (xcb_connection_t *c, + xcb_font_t fid, + uint16_t name_len, + const char *name); + +char * +xcb_open_font_name (const xcb_open_font_request_t *R); + +int +xcb_open_font_name_length (const xcb_open_font_request_t *R); + +xcb_generic_iterator_t +xcb_open_font_name_end (const xcb_open_font_request_t *R); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_close_font_checked (xcb_connection_t *c, + xcb_font_t font); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_close_font (xcb_connection_t *c, + xcb_font_t font); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_fontprop_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_fontprop_t) + */ +void +xcb_fontprop_next (xcb_fontprop_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_fontprop_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_fontprop_end (xcb_fontprop_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_charinfo_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_charinfo_t) + */ +void +xcb_charinfo_next (xcb_charinfo_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_charinfo_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_charinfo_end (xcb_charinfo_iterator_t i); + +int +xcb_query_font_sizeof (const void *_buffer); + +/** + * @brief query font metrics + * + * @param c The connection + * @param font The fontable (Font or Graphics Context) to query. + * @return A cookie + * + * Queries information associated with the font. + * + */ +xcb_query_font_cookie_t +xcb_query_font (xcb_connection_t *c, + xcb_fontable_t font); + +/** + * @brief query font metrics + * + * @param c The connection + * @param font The fontable (Font or Graphics Context) to query. + * @return A cookie + * + * Queries information associated with the font. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_query_font_cookie_t +xcb_query_font_unchecked (xcb_connection_t *c, + xcb_fontable_t font); + +xcb_fontprop_t * +xcb_query_font_properties (const xcb_query_font_reply_t *R); + +int +xcb_query_font_properties_length (const xcb_query_font_reply_t *R); + +xcb_fontprop_iterator_t +xcb_query_font_properties_iterator (const xcb_query_font_reply_t *R); + +xcb_charinfo_t * +xcb_query_font_char_infos (const xcb_query_font_reply_t *R); + +int +xcb_query_font_char_infos_length (const xcb_query_font_reply_t *R); + +xcb_charinfo_iterator_t +xcb_query_font_char_infos_iterator (const xcb_query_font_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_query_font_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_query_font_reply_t * +xcb_query_font_reply (xcb_connection_t *c, + xcb_query_font_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_query_text_extents_sizeof (const void *_buffer, + uint32_t string_len); + +/** + * @brief get text extents + * + * @param c The connection + * @param font The \a font to calculate text extents in. You can also pass a graphics context. + * @param string_len The number of characters in \a string. + * @param string The text to get text extents for. + * @return A cookie + * + * Query text extents from the X11 server. This request returns the bounding box + * of the specified 16-bit character string in the specified \a font or the font + * contained in the specified graphics context. + * + * `font_ascent` is set to the maximum of the ascent metrics of all characters in + * the string. `font_descent` is set to the maximum of the descent metrics. + * `overall_width` is set to the sum of the character-width metrics of all + * characters in the string. For each character in the string, let W be the sum of + * the character-width metrics of all characters preceding it in the string. Let L + * be the left-side-bearing metric of the character plus W. Let R be the + * right-side-bearing metric of the character plus W. The lbearing member is set + * to the minimum L of all characters in the string. The rbearing member is set to + * the maximum R. + * + * For fonts defined with linear indexing rather than 2-byte matrix indexing, each + * `xcb_char2b_t` structure is interpreted as a 16-bit number with byte1 as the + * most significant byte. If the font has no defined default character, undefined + * characters in the string are taken to have all zero metrics. + * + * Characters with all zero metrics are ignored. If the font has no defined + * default_char, the undefined characters in the string are also ignored. + * + */ +xcb_query_text_extents_cookie_t +xcb_query_text_extents (xcb_connection_t *c, + xcb_fontable_t font, + uint32_t string_len, + const xcb_char2b_t *string); + +/** + * @brief get text extents + * + * @param c The connection + * @param font The \a font to calculate text extents in. You can also pass a graphics context. + * @param string_len The number of characters in \a string. + * @param string The text to get text extents for. + * @return A cookie + * + * Query text extents from the X11 server. This request returns the bounding box + * of the specified 16-bit character string in the specified \a font or the font + * contained in the specified graphics context. + * + * `font_ascent` is set to the maximum of the ascent metrics of all characters in + * the string. `font_descent` is set to the maximum of the descent metrics. + * `overall_width` is set to the sum of the character-width metrics of all + * characters in the string. For each character in the string, let W be the sum of + * the character-width metrics of all characters preceding it in the string. Let L + * be the left-side-bearing metric of the character plus W. Let R be the + * right-side-bearing metric of the character plus W. The lbearing member is set + * to the minimum L of all characters in the string. The rbearing member is set to + * the maximum R. + * + * For fonts defined with linear indexing rather than 2-byte matrix indexing, each + * `xcb_char2b_t` structure is interpreted as a 16-bit number with byte1 as the + * most significant byte. If the font has no defined default character, undefined + * characters in the string are taken to have all zero metrics. + * + * Characters with all zero metrics are ignored. If the font has no defined + * default_char, the undefined characters in the string are also ignored. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_query_text_extents_cookie_t +xcb_query_text_extents_unchecked (xcb_connection_t *c, + xcb_fontable_t font, + uint32_t string_len, + const xcb_char2b_t *string); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_query_text_extents_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_query_text_extents_reply_t * +xcb_query_text_extents_reply (xcb_connection_t *c, + xcb_query_text_extents_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_str_sizeof (const void *_buffer); + +char * +xcb_str_name (const xcb_str_t *R); + +int +xcb_str_name_length (const xcb_str_t *R); + +xcb_generic_iterator_t +xcb_str_name_end (const xcb_str_t *R); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_str_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_str_t) + */ +void +xcb_str_next (xcb_str_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_str_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_str_end (xcb_str_iterator_t i); + +int +xcb_list_fonts_sizeof (const void *_buffer); + +/** + * @brief get matching font names + * + * @param c The connection + * @param max_names The maximum number of fonts to be returned. + * @param pattern_len The length (in bytes) of \a pattern. + * @param pattern A font pattern, for example "-misc-fixed-*". + * \n + * The asterisk (*) is a wildcard for any number of characters. The question mark + * (?) is a wildcard for a single character. Use of uppercase or lowercase does + * not matter. + * @return A cookie + * + * Gets a list of available font names which match the given \a pattern. + * + */ +xcb_list_fonts_cookie_t +xcb_list_fonts (xcb_connection_t *c, + uint16_t max_names, + uint16_t pattern_len, + const char *pattern); + +/** + * @brief get matching font names + * + * @param c The connection + * @param max_names The maximum number of fonts to be returned. + * @param pattern_len The length (in bytes) of \a pattern. + * @param pattern A font pattern, for example "-misc-fixed-*". + * \n + * The asterisk (*) is a wildcard for any number of characters. The question mark + * (?) is a wildcard for a single character. Use of uppercase or lowercase does + * not matter. + * @return A cookie + * + * Gets a list of available font names which match the given \a pattern. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_list_fonts_cookie_t +xcb_list_fonts_unchecked (xcb_connection_t *c, + uint16_t max_names, + uint16_t pattern_len, + const char *pattern); + +int +xcb_list_fonts_names_length (const xcb_list_fonts_reply_t *R); + +xcb_str_iterator_t +xcb_list_fonts_names_iterator (const xcb_list_fonts_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_list_fonts_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_list_fonts_reply_t * +xcb_list_fonts_reply (xcb_connection_t *c, + xcb_list_fonts_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_list_fonts_with_info_sizeof (const void *_buffer); + +/** + * @brief get matching font names and information + * + * @param c The connection + * @param max_names The maximum number of fonts to be returned. + * @param pattern_len The length (in bytes) of \a pattern. + * @param pattern A font pattern, for example "-misc-fixed-*". + * \n + * The asterisk (*) is a wildcard for any number of characters. The question mark + * (?) is a wildcard for a single character. Use of uppercase or lowercase does + * not matter. + * @return A cookie + * + * Gets a list of available font names which match the given \a pattern. + * + */ +xcb_list_fonts_with_info_cookie_t +xcb_list_fonts_with_info (xcb_connection_t *c, + uint16_t max_names, + uint16_t pattern_len, + const char *pattern); + +/** + * @brief get matching font names and information + * + * @param c The connection + * @param max_names The maximum number of fonts to be returned. + * @param pattern_len The length (in bytes) of \a pattern. + * @param pattern A font pattern, for example "-misc-fixed-*". + * \n + * The asterisk (*) is a wildcard for any number of characters. The question mark + * (?) is a wildcard for a single character. Use of uppercase or lowercase does + * not matter. + * @return A cookie + * + * Gets a list of available font names which match the given \a pattern. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_list_fonts_with_info_cookie_t +xcb_list_fonts_with_info_unchecked (xcb_connection_t *c, + uint16_t max_names, + uint16_t pattern_len, + const char *pattern); + +xcb_fontprop_t * +xcb_list_fonts_with_info_properties (const xcb_list_fonts_with_info_reply_t *R); + +int +xcb_list_fonts_with_info_properties_length (const xcb_list_fonts_with_info_reply_t *R); + +xcb_fontprop_iterator_t +xcb_list_fonts_with_info_properties_iterator (const xcb_list_fonts_with_info_reply_t *R); + +char * +xcb_list_fonts_with_info_name (const xcb_list_fonts_with_info_reply_t *R); + +int +xcb_list_fonts_with_info_name_length (const xcb_list_fonts_with_info_reply_t *R); + +xcb_generic_iterator_t +xcb_list_fonts_with_info_name_end (const xcb_list_fonts_with_info_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_list_fonts_with_info_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_list_fonts_with_info_reply_t * +xcb_list_fonts_with_info_reply (xcb_connection_t *c, + xcb_list_fonts_with_info_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_set_font_path_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_set_font_path_checked (xcb_connection_t *c, + uint16_t font_qty, + const xcb_str_t *font); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_set_font_path (xcb_connection_t *c, + uint16_t font_qty, + const xcb_str_t *font); + +int +xcb_set_font_path_font_length (const xcb_set_font_path_request_t *R); + +xcb_str_iterator_t +xcb_set_font_path_font_iterator (const xcb_set_font_path_request_t *R); + +int +xcb_get_font_path_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_get_font_path_cookie_t +xcb_get_font_path (xcb_connection_t *c); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_get_font_path_cookie_t +xcb_get_font_path_unchecked (xcb_connection_t *c); + +int +xcb_get_font_path_path_length (const xcb_get_font_path_reply_t *R); + +xcb_str_iterator_t +xcb_get_font_path_path_iterator (const xcb_get_font_path_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_get_font_path_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_get_font_path_reply_t * +xcb_get_font_path_reply (xcb_connection_t *c, + xcb_get_font_path_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +/** + * @brief Creates a pixmap + * + * @param c The connection + * @param depth TODO + * @param pid The ID with which you will refer to the new pixmap, created by + * `xcb_generate_id`. + * @param drawable Drawable to get the screen from. + * @param width The width of the new pixmap. + * @param height The height of the new pixmap. + * @return A cookie + * + * Creates a pixmap. The pixmap can only be used on the same screen as \a drawable + * is on and only with drawables of the same \a depth. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_create_pixmap_checked (xcb_connection_t *c, + uint8_t depth, + xcb_pixmap_t pid, + xcb_drawable_t drawable, + uint16_t width, + uint16_t height); + +/** + * @brief Creates a pixmap + * + * @param c The connection + * @param depth TODO + * @param pid The ID with which you will refer to the new pixmap, created by + * `xcb_generate_id`. + * @param drawable Drawable to get the screen from. + * @param width The width of the new pixmap. + * @param height The height of the new pixmap. + * @return A cookie + * + * Creates a pixmap. The pixmap can only be used on the same screen as \a drawable + * is on and only with drawables of the same \a depth. + * + */ +xcb_void_cookie_t +xcb_create_pixmap (xcb_connection_t *c, + uint8_t depth, + xcb_pixmap_t pid, + xcb_drawable_t drawable, + uint16_t width, + uint16_t height); + +/** + * @brief Destroys a pixmap + * + * @param c The connection + * @param pixmap The pixmap to destroy. + * @return A cookie + * + * Deletes the association between the pixmap ID and the pixmap. The pixmap + * storage will be freed when there are no more references to it. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_free_pixmap_checked (xcb_connection_t *c, + xcb_pixmap_t pixmap); + +/** + * @brief Destroys a pixmap + * + * @param c The connection + * @param pixmap The pixmap to destroy. + * @return A cookie + * + * Deletes the association between the pixmap ID and the pixmap. The pixmap + * storage will be freed when there are no more references to it. + * + */ +xcb_void_cookie_t +xcb_free_pixmap (xcb_connection_t *c, + xcb_pixmap_t pixmap); + +int +xcb_create_gc_value_list_serialize (void **_buffer, + uint32_t value_mask, + const xcb_create_gc_value_list_t *_aux); + +int +xcb_create_gc_value_list_unpack (const void *_buffer, + uint32_t value_mask, + xcb_create_gc_value_list_t *_aux); + +int +xcb_create_gc_value_list_sizeof (const void *_buffer, + uint32_t value_mask); + +int +xcb_create_gc_sizeof (const void *_buffer); + +/** + * @brief Creates a graphics context + * + * @param c The connection + * @param cid The ID with which you will refer to the graphics context, created by + * `xcb_generate_id`. + * @param drawable Drawable to get the root/depth from. + * @return A cookie + * + * Creates a graphics context. The graphics context can be used with any drawable + * that has the same root and depth as the specified drawable. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_create_gc_checked (xcb_connection_t *c, + xcb_gcontext_t cid, + xcb_drawable_t drawable, + uint32_t value_mask, + const void *value_list); + +/** + * @brief Creates a graphics context + * + * @param c The connection + * @param cid The ID with which you will refer to the graphics context, created by + * `xcb_generate_id`. + * @param drawable Drawable to get the root/depth from. + * @return A cookie + * + * Creates a graphics context. The graphics context can be used with any drawable + * that has the same root and depth as the specified drawable. + * + */ +xcb_void_cookie_t +xcb_create_gc (xcb_connection_t *c, + xcb_gcontext_t cid, + xcb_drawable_t drawable, + uint32_t value_mask, + const void *value_list); + +/** + * @brief Creates a graphics context + * + * @param c The connection + * @param cid The ID with which you will refer to the graphics context, created by + * `xcb_generate_id`. + * @param drawable Drawable to get the root/depth from. + * @return A cookie + * + * Creates a graphics context. The graphics context can be used with any drawable + * that has the same root and depth as the specified drawable. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_create_gc_aux_checked (xcb_connection_t *c, + xcb_gcontext_t cid, + xcb_drawable_t drawable, + uint32_t value_mask, + const xcb_create_gc_value_list_t *value_list); + +/** + * @brief Creates a graphics context + * + * @param c The connection + * @param cid The ID with which you will refer to the graphics context, created by + * `xcb_generate_id`. + * @param drawable Drawable to get the root/depth from. + * @return A cookie + * + * Creates a graphics context. The graphics context can be used with any drawable + * that has the same root and depth as the specified drawable. + * + */ +xcb_void_cookie_t +xcb_create_gc_aux (xcb_connection_t *c, + xcb_gcontext_t cid, + xcb_drawable_t drawable, + uint32_t value_mask, + const xcb_create_gc_value_list_t *value_list); + +void * +xcb_create_gc_value_list (const xcb_create_gc_request_t *R); + +int +xcb_change_gc_value_list_serialize (void **_buffer, + uint32_t value_mask, + const xcb_change_gc_value_list_t *_aux); + +int +xcb_change_gc_value_list_unpack (const void *_buffer, + uint32_t value_mask, + xcb_change_gc_value_list_t *_aux); + +int +xcb_change_gc_value_list_sizeof (const void *_buffer, + uint32_t value_mask); + +int +xcb_change_gc_sizeof (const void *_buffer); + +/** + * @brief change graphics context components + * + * @param c The connection + * @param gc The graphics context to change. + * @param value_mask A bitmask of #xcb_gc_t values. + * @param value_mask \n + * @param value_list Values for each of the components specified in the bitmask \a value_mask. The + * order has to correspond to the order of possible \a value_mask bits. See the + * example. + * @return A cookie + * + * Changes the components specified by \a value_mask for the specified graphics context. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_change_gc_checked (xcb_connection_t *c, + xcb_gcontext_t gc, + uint32_t value_mask, + const void *value_list); + +/** + * @brief change graphics context components + * + * @param c The connection + * @param gc The graphics context to change. + * @param value_mask A bitmask of #xcb_gc_t values. + * @param value_mask \n + * @param value_list Values for each of the components specified in the bitmask \a value_mask. The + * order has to correspond to the order of possible \a value_mask bits. See the + * example. + * @return A cookie + * + * Changes the components specified by \a value_mask for the specified graphics context. + * + */ +xcb_void_cookie_t +xcb_change_gc (xcb_connection_t *c, + xcb_gcontext_t gc, + uint32_t value_mask, + const void *value_list); + +/** + * @brief change graphics context components + * + * @param c The connection + * @param gc The graphics context to change. + * @param value_mask A bitmask of #xcb_gc_t values. + * @param value_mask \n + * @param value_list Values for each of the components specified in the bitmask \a value_mask. The + * order has to correspond to the order of possible \a value_mask bits. See the + * example. + * @return A cookie + * + * Changes the components specified by \a value_mask for the specified graphics context. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_change_gc_aux_checked (xcb_connection_t *c, + xcb_gcontext_t gc, + uint32_t value_mask, + const xcb_change_gc_value_list_t *value_list); + +/** + * @brief change graphics context components + * + * @param c The connection + * @param gc The graphics context to change. + * @param value_mask A bitmask of #xcb_gc_t values. + * @param value_mask \n + * @param value_list Values for each of the components specified in the bitmask \a value_mask. The + * order has to correspond to the order of possible \a value_mask bits. See the + * example. + * @return A cookie + * + * Changes the components specified by \a value_mask for the specified graphics context. + * + */ +xcb_void_cookie_t +xcb_change_gc_aux (xcb_connection_t *c, + xcb_gcontext_t gc, + uint32_t value_mask, + const xcb_change_gc_value_list_t *value_list); + +void * +xcb_change_gc_value_list (const xcb_change_gc_request_t *R); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_copy_gc_checked (xcb_connection_t *c, + xcb_gcontext_t src_gc, + xcb_gcontext_t dst_gc, + uint32_t value_mask); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_copy_gc (xcb_connection_t *c, + xcb_gcontext_t src_gc, + xcb_gcontext_t dst_gc, + uint32_t value_mask); + +int +xcb_set_dashes_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_set_dashes_checked (xcb_connection_t *c, + xcb_gcontext_t gc, + uint16_t dash_offset, + uint16_t dashes_len, + const uint8_t *dashes); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_set_dashes (xcb_connection_t *c, + xcb_gcontext_t gc, + uint16_t dash_offset, + uint16_t dashes_len, + const uint8_t *dashes); + +uint8_t * +xcb_set_dashes_dashes (const xcb_set_dashes_request_t *R); + +int +xcb_set_dashes_dashes_length (const xcb_set_dashes_request_t *R); + +xcb_generic_iterator_t +xcb_set_dashes_dashes_end (const xcb_set_dashes_request_t *R); + +int +xcb_set_clip_rectangles_sizeof (const void *_buffer, + uint32_t rectangles_len); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_set_clip_rectangles_checked (xcb_connection_t *c, + uint8_t ordering, + xcb_gcontext_t gc, + int16_t clip_x_origin, + int16_t clip_y_origin, + uint32_t rectangles_len, + const xcb_rectangle_t *rectangles); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_set_clip_rectangles (xcb_connection_t *c, + uint8_t ordering, + xcb_gcontext_t gc, + int16_t clip_x_origin, + int16_t clip_y_origin, + uint32_t rectangles_len, + const xcb_rectangle_t *rectangles); + +xcb_rectangle_t * +xcb_set_clip_rectangles_rectangles (const xcb_set_clip_rectangles_request_t *R); + +int +xcb_set_clip_rectangles_rectangles_length (const xcb_set_clip_rectangles_request_t *R); + +xcb_rectangle_iterator_t +xcb_set_clip_rectangles_rectangles_iterator (const xcb_set_clip_rectangles_request_t *R); + +/** + * @brief Destroys a graphics context + * + * @param c The connection + * @param gc The graphics context to destroy. + * @return A cookie + * + * Destroys the specified \a gc and all associated storage. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_free_gc_checked (xcb_connection_t *c, + xcb_gcontext_t gc); + +/** + * @brief Destroys a graphics context + * + * @param c The connection + * @param gc The graphics context to destroy. + * @return A cookie + * + * Destroys the specified \a gc and all associated storage. + * + */ +xcb_void_cookie_t +xcb_free_gc (xcb_connection_t *c, + xcb_gcontext_t gc); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_clear_area_checked (xcb_connection_t *c, + uint8_t exposures, + xcb_window_t window, + int16_t x, + int16_t y, + uint16_t width, + uint16_t height); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_clear_area (xcb_connection_t *c, + uint8_t exposures, + xcb_window_t window, + int16_t x, + int16_t y, + uint16_t width, + uint16_t height); + +/** + * @brief copy areas + * + * @param c The connection + * @param src_drawable The source drawable (Window or Pixmap). + * @param dst_drawable The destination drawable (Window or Pixmap). + * @param gc The graphics context to use. + * @param src_x The source X coordinate. + * @param src_y The source Y coordinate. + * @param dst_x The destination X coordinate. + * @param dst_y The destination Y coordinate. + * @param width The width of the area to copy (in pixels). + * @param height The height of the area to copy (in pixels). + * @return A cookie + * + * Copies the specified rectangle from \a src_drawable to \a dst_drawable. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_copy_area_checked (xcb_connection_t *c, + xcb_drawable_t src_drawable, + xcb_drawable_t dst_drawable, + xcb_gcontext_t gc, + int16_t src_x, + int16_t src_y, + int16_t dst_x, + int16_t dst_y, + uint16_t width, + uint16_t height); + +/** + * @brief copy areas + * + * @param c The connection + * @param src_drawable The source drawable (Window or Pixmap). + * @param dst_drawable The destination drawable (Window or Pixmap). + * @param gc The graphics context to use. + * @param src_x The source X coordinate. + * @param src_y The source Y coordinate. + * @param dst_x The destination X coordinate. + * @param dst_y The destination Y coordinate. + * @param width The width of the area to copy (in pixels). + * @param height The height of the area to copy (in pixels). + * @return A cookie + * + * Copies the specified rectangle from \a src_drawable to \a dst_drawable. + * + */ +xcb_void_cookie_t +xcb_copy_area (xcb_connection_t *c, + xcb_drawable_t src_drawable, + xcb_drawable_t dst_drawable, + xcb_gcontext_t gc, + int16_t src_x, + int16_t src_y, + int16_t dst_x, + int16_t dst_y, + uint16_t width, + uint16_t height); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_copy_plane_checked (xcb_connection_t *c, + xcb_drawable_t src_drawable, + xcb_drawable_t dst_drawable, + xcb_gcontext_t gc, + int16_t src_x, + int16_t src_y, + int16_t dst_x, + int16_t dst_y, + uint16_t width, + uint16_t height, + uint32_t bit_plane); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_copy_plane (xcb_connection_t *c, + xcb_drawable_t src_drawable, + xcb_drawable_t dst_drawable, + xcb_gcontext_t gc, + int16_t src_x, + int16_t src_y, + int16_t dst_x, + int16_t dst_y, + uint16_t width, + uint16_t height, + uint32_t bit_plane); + +int +xcb_poly_point_sizeof (const void *_buffer, + uint32_t points_len); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_poly_point_checked (xcb_connection_t *c, + uint8_t coordinate_mode, + xcb_drawable_t drawable, + xcb_gcontext_t gc, + uint32_t points_len, + const xcb_point_t *points); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_poly_point (xcb_connection_t *c, + uint8_t coordinate_mode, + xcb_drawable_t drawable, + xcb_gcontext_t gc, + uint32_t points_len, + const xcb_point_t *points); + +xcb_point_t * +xcb_poly_point_points (const xcb_poly_point_request_t *R); + +int +xcb_poly_point_points_length (const xcb_poly_point_request_t *R); + +xcb_point_iterator_t +xcb_poly_point_points_iterator (const xcb_poly_point_request_t *R); + +int +xcb_poly_line_sizeof (const void *_buffer, + uint32_t points_len); + +/** + * @brief draw lines + * + * @param c The connection + * @param coordinate_mode A bitmask of #xcb_coord_mode_t values. + * @param coordinate_mode \n + * @param drawable The drawable to draw the line(s) on. + * @param gc The graphics context to use. + * @param points_len The number of `xcb_point_t` structures in \a points. + * @param points An array of points. + * @return A cookie + * + * Draws \a points_len-1 lines between each pair of points (point[i], point[i+1]) + * in the \a points array. The lines are drawn in the order listed in the array. + * They join correctly at all intermediate points, and if the first and last + * points coincide, the first and last lines also join correctly. For any given + * line, a pixel is not drawn more than once. If thin (zero line-width) lines + * intersect, the intersecting pixels are drawn multiple times. If wide lines + * intersect, the intersecting pixels are drawn only once, as though the entire + * request were a single, filled shape. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_poly_line_checked (xcb_connection_t *c, + uint8_t coordinate_mode, + xcb_drawable_t drawable, + xcb_gcontext_t gc, + uint32_t points_len, + const xcb_point_t *points); + +/** + * @brief draw lines + * + * @param c The connection + * @param coordinate_mode A bitmask of #xcb_coord_mode_t values. + * @param coordinate_mode \n + * @param drawable The drawable to draw the line(s) on. + * @param gc The graphics context to use. + * @param points_len The number of `xcb_point_t` structures in \a points. + * @param points An array of points. + * @return A cookie + * + * Draws \a points_len-1 lines between each pair of points (point[i], point[i+1]) + * in the \a points array. The lines are drawn in the order listed in the array. + * They join correctly at all intermediate points, and if the first and last + * points coincide, the first and last lines also join correctly. For any given + * line, a pixel is not drawn more than once. If thin (zero line-width) lines + * intersect, the intersecting pixels are drawn multiple times. If wide lines + * intersect, the intersecting pixels are drawn only once, as though the entire + * request were a single, filled shape. + * + */ +xcb_void_cookie_t +xcb_poly_line (xcb_connection_t *c, + uint8_t coordinate_mode, + xcb_drawable_t drawable, + xcb_gcontext_t gc, + uint32_t points_len, + const xcb_point_t *points); + +xcb_point_t * +xcb_poly_line_points (const xcb_poly_line_request_t *R); + +int +xcb_poly_line_points_length (const xcb_poly_line_request_t *R); + +xcb_point_iterator_t +xcb_poly_line_points_iterator (const xcb_poly_line_request_t *R); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_segment_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_segment_t) + */ +void +xcb_segment_next (xcb_segment_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_segment_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_segment_end (xcb_segment_iterator_t i); + +int +xcb_poly_segment_sizeof (const void *_buffer, + uint32_t segments_len); + +/** + * @brief draw lines + * + * @param c The connection + * @param drawable A drawable (Window or Pixmap) to draw on. + * @param gc The graphics context to use. + * \n + * TODO: document which attributes of a gc are used + * @param segments_len The number of `xcb_segment_t` structures in \a segments. + * @param segments An array of `xcb_segment_t` structures. + * @return A cookie + * + * Draws multiple, unconnected lines. For each segment, a line is drawn between + * (x1, y1) and (x2, y2). The lines are drawn in the order listed in the array of + * `xcb_segment_t` structures and does not perform joining at coincident + * endpoints. For any given line, a pixel is not drawn more than once. If lines + * intersect, the intersecting pixels are drawn multiple times. + * + * TODO: include the xcb_segment_t data structure + * + * TODO: an example + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_poly_segment_checked (xcb_connection_t *c, + xcb_drawable_t drawable, + xcb_gcontext_t gc, + uint32_t segments_len, + const xcb_segment_t *segments); + +/** + * @brief draw lines + * + * @param c The connection + * @param drawable A drawable (Window or Pixmap) to draw on. + * @param gc The graphics context to use. + * \n + * TODO: document which attributes of a gc are used + * @param segments_len The number of `xcb_segment_t` structures in \a segments. + * @param segments An array of `xcb_segment_t` structures. + * @return A cookie + * + * Draws multiple, unconnected lines. For each segment, a line is drawn between + * (x1, y1) and (x2, y2). The lines are drawn in the order listed in the array of + * `xcb_segment_t` structures and does not perform joining at coincident + * endpoints. For any given line, a pixel is not drawn more than once. If lines + * intersect, the intersecting pixels are drawn multiple times. + * + * TODO: include the xcb_segment_t data structure + * + * TODO: an example + * + */ +xcb_void_cookie_t +xcb_poly_segment (xcb_connection_t *c, + xcb_drawable_t drawable, + xcb_gcontext_t gc, + uint32_t segments_len, + const xcb_segment_t *segments); + +xcb_segment_t * +xcb_poly_segment_segments (const xcb_poly_segment_request_t *R); + +int +xcb_poly_segment_segments_length (const xcb_poly_segment_request_t *R); + +xcb_segment_iterator_t +xcb_poly_segment_segments_iterator (const xcb_poly_segment_request_t *R); + +int +xcb_poly_rectangle_sizeof (const void *_buffer, + uint32_t rectangles_len); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_poly_rectangle_checked (xcb_connection_t *c, + xcb_drawable_t drawable, + xcb_gcontext_t gc, + uint32_t rectangles_len, + const xcb_rectangle_t *rectangles); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_poly_rectangle (xcb_connection_t *c, + xcb_drawable_t drawable, + xcb_gcontext_t gc, + uint32_t rectangles_len, + const xcb_rectangle_t *rectangles); + +xcb_rectangle_t * +xcb_poly_rectangle_rectangles (const xcb_poly_rectangle_request_t *R); + +int +xcb_poly_rectangle_rectangles_length (const xcb_poly_rectangle_request_t *R); + +xcb_rectangle_iterator_t +xcb_poly_rectangle_rectangles_iterator (const xcb_poly_rectangle_request_t *R); + +int +xcb_poly_arc_sizeof (const void *_buffer, + uint32_t arcs_len); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_poly_arc_checked (xcb_connection_t *c, + xcb_drawable_t drawable, + xcb_gcontext_t gc, + uint32_t arcs_len, + const xcb_arc_t *arcs); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_poly_arc (xcb_connection_t *c, + xcb_drawable_t drawable, + xcb_gcontext_t gc, + uint32_t arcs_len, + const xcb_arc_t *arcs); + +xcb_arc_t * +xcb_poly_arc_arcs (const xcb_poly_arc_request_t *R); + +int +xcb_poly_arc_arcs_length (const xcb_poly_arc_request_t *R); + +xcb_arc_iterator_t +xcb_poly_arc_arcs_iterator (const xcb_poly_arc_request_t *R); + +int +xcb_fill_poly_sizeof (const void *_buffer, + uint32_t points_len); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_fill_poly_checked (xcb_connection_t *c, + xcb_drawable_t drawable, + xcb_gcontext_t gc, + uint8_t shape, + uint8_t coordinate_mode, + uint32_t points_len, + const xcb_point_t *points); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_fill_poly (xcb_connection_t *c, + xcb_drawable_t drawable, + xcb_gcontext_t gc, + uint8_t shape, + uint8_t coordinate_mode, + uint32_t points_len, + const xcb_point_t *points); + +xcb_point_t * +xcb_fill_poly_points (const xcb_fill_poly_request_t *R); + +int +xcb_fill_poly_points_length (const xcb_fill_poly_request_t *R); + +xcb_point_iterator_t +xcb_fill_poly_points_iterator (const xcb_fill_poly_request_t *R); + +int +xcb_poly_fill_rectangle_sizeof (const void *_buffer, + uint32_t rectangles_len); + +/** + * @brief Fills rectangles + * + * @param c The connection + * @param drawable The drawable (Window or Pixmap) to draw on. + * @param gc The graphics context to use. + * \n + * The following graphics context components are used: function, plane-mask, + * fill-style, subwindow-mode, clip-x-origin, clip-y-origin, and clip-mask. + * \n + * The following graphics context mode-dependent components are used: + * foreground, background, tile, stipple, tile-stipple-x-origin, and + * tile-stipple-y-origin. + * @param rectangles_len The number of `xcb_rectangle_t` structures in \a rectangles. + * @param rectangles The rectangles to fill. + * @return A cookie + * + * Fills the specified rectangle(s) in the order listed in the array. For any + * given rectangle, each pixel is not drawn more than once. If rectangles + * intersect, the intersecting pixels are drawn multiple times. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_poly_fill_rectangle_checked (xcb_connection_t *c, + xcb_drawable_t drawable, + xcb_gcontext_t gc, + uint32_t rectangles_len, + const xcb_rectangle_t *rectangles); + +/** + * @brief Fills rectangles + * + * @param c The connection + * @param drawable The drawable (Window or Pixmap) to draw on. + * @param gc The graphics context to use. + * \n + * The following graphics context components are used: function, plane-mask, + * fill-style, subwindow-mode, clip-x-origin, clip-y-origin, and clip-mask. + * \n + * The following graphics context mode-dependent components are used: + * foreground, background, tile, stipple, tile-stipple-x-origin, and + * tile-stipple-y-origin. + * @param rectangles_len The number of `xcb_rectangle_t` structures in \a rectangles. + * @param rectangles The rectangles to fill. + * @return A cookie + * + * Fills the specified rectangle(s) in the order listed in the array. For any + * given rectangle, each pixel is not drawn more than once. If rectangles + * intersect, the intersecting pixels are drawn multiple times. + * + */ +xcb_void_cookie_t +xcb_poly_fill_rectangle (xcb_connection_t *c, + xcb_drawable_t drawable, + xcb_gcontext_t gc, + uint32_t rectangles_len, + const xcb_rectangle_t *rectangles); + +xcb_rectangle_t * +xcb_poly_fill_rectangle_rectangles (const xcb_poly_fill_rectangle_request_t *R); + +int +xcb_poly_fill_rectangle_rectangles_length (const xcb_poly_fill_rectangle_request_t *R); + +xcb_rectangle_iterator_t +xcb_poly_fill_rectangle_rectangles_iterator (const xcb_poly_fill_rectangle_request_t *R); + +int +xcb_poly_fill_arc_sizeof (const void *_buffer, + uint32_t arcs_len); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_poly_fill_arc_checked (xcb_connection_t *c, + xcb_drawable_t drawable, + xcb_gcontext_t gc, + uint32_t arcs_len, + const xcb_arc_t *arcs); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_poly_fill_arc (xcb_connection_t *c, + xcb_drawable_t drawable, + xcb_gcontext_t gc, + uint32_t arcs_len, + const xcb_arc_t *arcs); + +xcb_arc_t * +xcb_poly_fill_arc_arcs (const xcb_poly_fill_arc_request_t *R); + +int +xcb_poly_fill_arc_arcs_length (const xcb_poly_fill_arc_request_t *R); + +xcb_arc_iterator_t +xcb_poly_fill_arc_arcs_iterator (const xcb_poly_fill_arc_request_t *R); + +int +xcb_put_image_sizeof (const void *_buffer, + uint32_t data_len); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_put_image_checked (xcb_connection_t *c, + uint8_t format, + xcb_drawable_t drawable, + xcb_gcontext_t gc, + uint16_t width, + uint16_t height, + int16_t dst_x, + int16_t dst_y, + uint8_t left_pad, + uint8_t depth, + uint32_t data_len, + const uint8_t *data); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_put_image (xcb_connection_t *c, + uint8_t format, + xcb_drawable_t drawable, + xcb_gcontext_t gc, + uint16_t width, + uint16_t height, + int16_t dst_x, + int16_t dst_y, + uint8_t left_pad, + uint8_t depth, + uint32_t data_len, + const uint8_t *data); + +uint8_t * +xcb_put_image_data (const xcb_put_image_request_t *R); + +int +xcb_put_image_data_length (const xcb_put_image_request_t *R); + +xcb_generic_iterator_t +xcb_put_image_data_end (const xcb_put_image_request_t *R); + +int +xcb_get_image_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_get_image_cookie_t +xcb_get_image (xcb_connection_t *c, + uint8_t format, + xcb_drawable_t drawable, + int16_t x, + int16_t y, + uint16_t width, + uint16_t height, + uint32_t plane_mask); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_get_image_cookie_t +xcb_get_image_unchecked (xcb_connection_t *c, + uint8_t format, + xcb_drawable_t drawable, + int16_t x, + int16_t y, + uint16_t width, + uint16_t height, + uint32_t plane_mask); + +uint8_t * +xcb_get_image_data (const xcb_get_image_reply_t *R); + +int +xcb_get_image_data_length (const xcb_get_image_reply_t *R); + +xcb_generic_iterator_t +xcb_get_image_data_end (const xcb_get_image_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_get_image_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_get_image_reply_t * +xcb_get_image_reply (xcb_connection_t *c, + xcb_get_image_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_poly_text_8_sizeof (const void *_buffer, + uint32_t items_len); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_poly_text_8_checked (xcb_connection_t *c, + xcb_drawable_t drawable, + xcb_gcontext_t gc, + int16_t x, + int16_t y, + uint32_t items_len, + const uint8_t *items); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_poly_text_8 (xcb_connection_t *c, + xcb_drawable_t drawable, + xcb_gcontext_t gc, + int16_t x, + int16_t y, + uint32_t items_len, + const uint8_t *items); + +uint8_t * +xcb_poly_text_8_items (const xcb_poly_text_8_request_t *R); + +int +xcb_poly_text_8_items_length (const xcb_poly_text_8_request_t *R); + +xcb_generic_iterator_t +xcb_poly_text_8_items_end (const xcb_poly_text_8_request_t *R); + +int +xcb_poly_text_16_sizeof (const void *_buffer, + uint32_t items_len); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_poly_text_16_checked (xcb_connection_t *c, + xcb_drawable_t drawable, + xcb_gcontext_t gc, + int16_t x, + int16_t y, + uint32_t items_len, + const uint8_t *items); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_poly_text_16 (xcb_connection_t *c, + xcb_drawable_t drawable, + xcb_gcontext_t gc, + int16_t x, + int16_t y, + uint32_t items_len, + const uint8_t *items); + +uint8_t * +xcb_poly_text_16_items (const xcb_poly_text_16_request_t *R); + +int +xcb_poly_text_16_items_length (const xcb_poly_text_16_request_t *R); + +xcb_generic_iterator_t +xcb_poly_text_16_items_end (const xcb_poly_text_16_request_t *R); + +int +xcb_image_text_8_sizeof (const void *_buffer); + +/** + * @brief Draws text + * + * @param c The connection + * @param string_len The length of the \a string. Note that this parameter limited by 255 due to + * using 8 bits! + * @param drawable The drawable (Window or Pixmap) to draw text on. + * @param gc The graphics context to use. + * \n + * The following graphics context components are used: plane-mask, foreground, + * background, font, subwindow-mode, clip-x-origin, clip-y-origin, and clip-mask. + * @param x The x coordinate of the first character, relative to the origin of \a drawable. + * @param y The y coordinate of the first character, relative to the origin of \a drawable. + * @param string The string to draw. Only the first 255 characters are relevant due to the data + * type of \a string_len. + * @return A cookie + * + * Fills the destination rectangle with the background pixel from \a gc, then + * paints the text with the foreground pixel from \a gc. The upper-left corner of + * the filled rectangle is at [x, y - font-ascent]. The width is overall-width, + * the height is font-ascent + font-descent. The overall-width, font-ascent and + * font-descent are as returned by `xcb_query_text_extents` (TODO). + * + * Note that using X core fonts is deprecated (but still supported) in favor of + * client-side rendering using Xft. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_image_text_8_checked (xcb_connection_t *c, + uint8_t string_len, + xcb_drawable_t drawable, + xcb_gcontext_t gc, + int16_t x, + int16_t y, + const char *string); + +/** + * @brief Draws text + * + * @param c The connection + * @param string_len The length of the \a string. Note that this parameter limited by 255 due to + * using 8 bits! + * @param drawable The drawable (Window or Pixmap) to draw text on. + * @param gc The graphics context to use. + * \n + * The following graphics context components are used: plane-mask, foreground, + * background, font, subwindow-mode, clip-x-origin, clip-y-origin, and clip-mask. + * @param x The x coordinate of the first character, relative to the origin of \a drawable. + * @param y The y coordinate of the first character, relative to the origin of \a drawable. + * @param string The string to draw. Only the first 255 characters are relevant due to the data + * type of \a string_len. + * @return A cookie + * + * Fills the destination rectangle with the background pixel from \a gc, then + * paints the text with the foreground pixel from \a gc. The upper-left corner of + * the filled rectangle is at [x, y - font-ascent]. The width is overall-width, + * the height is font-ascent + font-descent. The overall-width, font-ascent and + * font-descent are as returned by `xcb_query_text_extents` (TODO). + * + * Note that using X core fonts is deprecated (but still supported) in favor of + * client-side rendering using Xft. + * + */ +xcb_void_cookie_t +xcb_image_text_8 (xcb_connection_t *c, + uint8_t string_len, + xcb_drawable_t drawable, + xcb_gcontext_t gc, + int16_t x, + int16_t y, + const char *string); + +char * +xcb_image_text_8_string (const xcb_image_text_8_request_t *R); + +int +xcb_image_text_8_string_length (const xcb_image_text_8_request_t *R); + +xcb_generic_iterator_t +xcb_image_text_8_string_end (const xcb_image_text_8_request_t *R); + +int +xcb_image_text_16_sizeof (const void *_buffer); + +/** + * @brief Draws text + * + * @param c The connection + * @param string_len The length of the \a string in characters. Note that this parameter limited by + * 255 due to using 8 bits! + * @param drawable The drawable (Window or Pixmap) to draw text on. + * @param gc The graphics context to use. + * \n + * The following graphics context components are used: plane-mask, foreground, + * background, font, subwindow-mode, clip-x-origin, clip-y-origin, and clip-mask. + * @param x The x coordinate of the first character, relative to the origin of \a drawable. + * @param y The y coordinate of the first character, relative to the origin of \a drawable. + * @param string The string to draw. Only the first 255 characters are relevant due to the data + * type of \a string_len. Every character uses 2 bytes (hence the 16 in this + * request's name). + * @return A cookie + * + * Fills the destination rectangle with the background pixel from \a gc, then + * paints the text with the foreground pixel from \a gc. The upper-left corner of + * the filled rectangle is at [x, y - font-ascent]. The width is overall-width, + * the height is font-ascent + font-descent. The overall-width, font-ascent and + * font-descent are as returned by `xcb_query_text_extents` (TODO). + * + * Note that using X core fonts is deprecated (but still supported) in favor of + * client-side rendering using Xft. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_image_text_16_checked (xcb_connection_t *c, + uint8_t string_len, + xcb_drawable_t drawable, + xcb_gcontext_t gc, + int16_t x, + int16_t y, + const xcb_char2b_t *string); + +/** + * @brief Draws text + * + * @param c The connection + * @param string_len The length of the \a string in characters. Note that this parameter limited by + * 255 due to using 8 bits! + * @param drawable The drawable (Window or Pixmap) to draw text on. + * @param gc The graphics context to use. + * \n + * The following graphics context components are used: plane-mask, foreground, + * background, font, subwindow-mode, clip-x-origin, clip-y-origin, and clip-mask. + * @param x The x coordinate of the first character, relative to the origin of \a drawable. + * @param y The y coordinate of the first character, relative to the origin of \a drawable. + * @param string The string to draw. Only the first 255 characters are relevant due to the data + * type of \a string_len. Every character uses 2 bytes (hence the 16 in this + * request's name). + * @return A cookie + * + * Fills the destination rectangle with the background pixel from \a gc, then + * paints the text with the foreground pixel from \a gc. The upper-left corner of + * the filled rectangle is at [x, y - font-ascent]. The width is overall-width, + * the height is font-ascent + font-descent. The overall-width, font-ascent and + * font-descent are as returned by `xcb_query_text_extents` (TODO). + * + * Note that using X core fonts is deprecated (but still supported) in favor of + * client-side rendering using Xft. + * + */ +xcb_void_cookie_t +xcb_image_text_16 (xcb_connection_t *c, + uint8_t string_len, + xcb_drawable_t drawable, + xcb_gcontext_t gc, + int16_t x, + int16_t y, + const xcb_char2b_t *string); + +xcb_char2b_t * +xcb_image_text_16_string (const xcb_image_text_16_request_t *R); + +int +xcb_image_text_16_string_length (const xcb_image_text_16_request_t *R); + +xcb_char2b_iterator_t +xcb_image_text_16_string_iterator (const xcb_image_text_16_request_t *R); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_create_colormap_checked (xcb_connection_t *c, + uint8_t alloc, + xcb_colormap_t mid, + xcb_window_t window, + xcb_visualid_t visual); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_create_colormap (xcb_connection_t *c, + uint8_t alloc, + xcb_colormap_t mid, + xcb_window_t window, + xcb_visualid_t visual); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_free_colormap_checked (xcb_connection_t *c, + xcb_colormap_t cmap); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_free_colormap (xcb_connection_t *c, + xcb_colormap_t cmap); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_copy_colormap_and_free_checked (xcb_connection_t *c, + xcb_colormap_t mid, + xcb_colormap_t src_cmap); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_copy_colormap_and_free (xcb_connection_t *c, + xcb_colormap_t mid, + xcb_colormap_t src_cmap); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_install_colormap_checked (xcb_connection_t *c, + xcb_colormap_t cmap); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_install_colormap (xcb_connection_t *c, + xcb_colormap_t cmap); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_uninstall_colormap_checked (xcb_connection_t *c, + xcb_colormap_t cmap); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_uninstall_colormap (xcb_connection_t *c, + xcb_colormap_t cmap); + +int +xcb_list_installed_colormaps_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_list_installed_colormaps_cookie_t +xcb_list_installed_colormaps (xcb_connection_t *c, + xcb_window_t window); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_list_installed_colormaps_cookie_t +xcb_list_installed_colormaps_unchecked (xcb_connection_t *c, + xcb_window_t window); + +xcb_colormap_t * +xcb_list_installed_colormaps_cmaps (const xcb_list_installed_colormaps_reply_t *R); + +int +xcb_list_installed_colormaps_cmaps_length (const xcb_list_installed_colormaps_reply_t *R); + +xcb_generic_iterator_t +xcb_list_installed_colormaps_cmaps_end (const xcb_list_installed_colormaps_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_list_installed_colormaps_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_list_installed_colormaps_reply_t * +xcb_list_installed_colormaps_reply (xcb_connection_t *c, + xcb_list_installed_colormaps_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +/** + * @brief Allocate a color + * + * @param c The connection + * @param cmap TODO + * @param red The red value of your color. + * @param green The green value of your color. + * @param blue The blue value of your color. + * @return A cookie + * + * Allocates a read-only colormap entry corresponding to the closest RGB value + * supported by the hardware. If you are using TrueColor, you can take a shortcut + * and directly calculate the color pixel value to avoid the round trip. But, for + * example, on 16-bit color setups (VNC), you can easily get the closest supported + * RGB value to the RGB value you are specifying. + * + */ +xcb_alloc_color_cookie_t +xcb_alloc_color (xcb_connection_t *c, + xcb_colormap_t cmap, + uint16_t red, + uint16_t green, + uint16_t blue); + +/** + * @brief Allocate a color + * + * @param c The connection + * @param cmap TODO + * @param red The red value of your color. + * @param green The green value of your color. + * @param blue The blue value of your color. + * @return A cookie + * + * Allocates a read-only colormap entry corresponding to the closest RGB value + * supported by the hardware. If you are using TrueColor, you can take a shortcut + * and directly calculate the color pixel value to avoid the round trip. But, for + * example, on 16-bit color setups (VNC), you can easily get the closest supported + * RGB value to the RGB value you are specifying. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_alloc_color_cookie_t +xcb_alloc_color_unchecked (xcb_connection_t *c, + xcb_colormap_t cmap, + uint16_t red, + uint16_t green, + uint16_t blue); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_alloc_color_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_alloc_color_reply_t * +xcb_alloc_color_reply (xcb_connection_t *c, + xcb_alloc_color_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_alloc_named_color_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_alloc_named_color_cookie_t +xcb_alloc_named_color (xcb_connection_t *c, + xcb_colormap_t cmap, + uint16_t name_len, + const char *name); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_alloc_named_color_cookie_t +xcb_alloc_named_color_unchecked (xcb_connection_t *c, + xcb_colormap_t cmap, + uint16_t name_len, + const char *name); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_alloc_named_color_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_alloc_named_color_reply_t * +xcb_alloc_named_color_reply (xcb_connection_t *c, + xcb_alloc_named_color_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_alloc_color_cells_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_alloc_color_cells_cookie_t +xcb_alloc_color_cells (xcb_connection_t *c, + uint8_t contiguous, + xcb_colormap_t cmap, + uint16_t colors, + uint16_t planes); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_alloc_color_cells_cookie_t +xcb_alloc_color_cells_unchecked (xcb_connection_t *c, + uint8_t contiguous, + xcb_colormap_t cmap, + uint16_t colors, + uint16_t planes); + +uint32_t * +xcb_alloc_color_cells_pixels (const xcb_alloc_color_cells_reply_t *R); + +int +xcb_alloc_color_cells_pixels_length (const xcb_alloc_color_cells_reply_t *R); + +xcb_generic_iterator_t +xcb_alloc_color_cells_pixels_end (const xcb_alloc_color_cells_reply_t *R); + +uint32_t * +xcb_alloc_color_cells_masks (const xcb_alloc_color_cells_reply_t *R); + +int +xcb_alloc_color_cells_masks_length (const xcb_alloc_color_cells_reply_t *R); + +xcb_generic_iterator_t +xcb_alloc_color_cells_masks_end (const xcb_alloc_color_cells_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_alloc_color_cells_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_alloc_color_cells_reply_t * +xcb_alloc_color_cells_reply (xcb_connection_t *c, + xcb_alloc_color_cells_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_alloc_color_planes_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_alloc_color_planes_cookie_t +xcb_alloc_color_planes (xcb_connection_t *c, + uint8_t contiguous, + xcb_colormap_t cmap, + uint16_t colors, + uint16_t reds, + uint16_t greens, + uint16_t blues); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_alloc_color_planes_cookie_t +xcb_alloc_color_planes_unchecked (xcb_connection_t *c, + uint8_t contiguous, + xcb_colormap_t cmap, + uint16_t colors, + uint16_t reds, + uint16_t greens, + uint16_t blues); + +uint32_t * +xcb_alloc_color_planes_pixels (const xcb_alloc_color_planes_reply_t *R); + +int +xcb_alloc_color_planes_pixels_length (const xcb_alloc_color_planes_reply_t *R); + +xcb_generic_iterator_t +xcb_alloc_color_planes_pixels_end (const xcb_alloc_color_planes_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_alloc_color_planes_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_alloc_color_planes_reply_t * +xcb_alloc_color_planes_reply (xcb_connection_t *c, + xcb_alloc_color_planes_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_free_colors_sizeof (const void *_buffer, + uint32_t pixels_len); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_free_colors_checked (xcb_connection_t *c, + xcb_colormap_t cmap, + uint32_t plane_mask, + uint32_t pixels_len, + const uint32_t *pixels); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_free_colors (xcb_connection_t *c, + xcb_colormap_t cmap, + uint32_t plane_mask, + uint32_t pixels_len, + const uint32_t *pixels); + +uint32_t * +xcb_free_colors_pixels (const xcb_free_colors_request_t *R); + +int +xcb_free_colors_pixels_length (const xcb_free_colors_request_t *R); + +xcb_generic_iterator_t +xcb_free_colors_pixels_end (const xcb_free_colors_request_t *R); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_coloritem_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_coloritem_t) + */ +void +xcb_coloritem_next (xcb_coloritem_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_coloritem_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_coloritem_end (xcb_coloritem_iterator_t i); + +int +xcb_store_colors_sizeof (const void *_buffer, + uint32_t items_len); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_store_colors_checked (xcb_connection_t *c, + xcb_colormap_t cmap, + uint32_t items_len, + const xcb_coloritem_t *items); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_store_colors (xcb_connection_t *c, + xcb_colormap_t cmap, + uint32_t items_len, + const xcb_coloritem_t *items); + +xcb_coloritem_t * +xcb_store_colors_items (const xcb_store_colors_request_t *R); + +int +xcb_store_colors_items_length (const xcb_store_colors_request_t *R); + +xcb_coloritem_iterator_t +xcb_store_colors_items_iterator (const xcb_store_colors_request_t *R); + +int +xcb_store_named_color_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_store_named_color_checked (xcb_connection_t *c, + uint8_t flags, + xcb_colormap_t cmap, + uint32_t pixel, + uint16_t name_len, + const char *name); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_store_named_color (xcb_connection_t *c, + uint8_t flags, + xcb_colormap_t cmap, + uint32_t pixel, + uint16_t name_len, + const char *name); + +char * +xcb_store_named_color_name (const xcb_store_named_color_request_t *R); + +int +xcb_store_named_color_name_length (const xcb_store_named_color_request_t *R); + +xcb_generic_iterator_t +xcb_store_named_color_name_end (const xcb_store_named_color_request_t *R); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_rgb_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_rgb_t) + */ +void +xcb_rgb_next (xcb_rgb_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_rgb_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_rgb_end (xcb_rgb_iterator_t i); + +int +xcb_query_colors_sizeof (const void *_buffer, + uint32_t pixels_len); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_query_colors_cookie_t +xcb_query_colors (xcb_connection_t *c, + xcb_colormap_t cmap, + uint32_t pixels_len, + const uint32_t *pixels); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_query_colors_cookie_t +xcb_query_colors_unchecked (xcb_connection_t *c, + xcb_colormap_t cmap, + uint32_t pixels_len, + const uint32_t *pixels); + +xcb_rgb_t * +xcb_query_colors_colors (const xcb_query_colors_reply_t *R); + +int +xcb_query_colors_colors_length (const xcb_query_colors_reply_t *R); + +xcb_rgb_iterator_t +xcb_query_colors_colors_iterator (const xcb_query_colors_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_query_colors_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_query_colors_reply_t * +xcb_query_colors_reply (xcb_connection_t *c, + xcb_query_colors_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_lookup_color_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_lookup_color_cookie_t +xcb_lookup_color (xcb_connection_t *c, + xcb_colormap_t cmap, + uint16_t name_len, + const char *name); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_lookup_color_cookie_t +xcb_lookup_color_unchecked (xcb_connection_t *c, + xcb_colormap_t cmap, + uint16_t name_len, + const char *name); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_lookup_color_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_lookup_color_reply_t * +xcb_lookup_color_reply (xcb_connection_t *c, + xcb_lookup_color_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_create_cursor_checked (xcb_connection_t *c, + xcb_cursor_t cid, + xcb_pixmap_t source, + xcb_pixmap_t mask, + uint16_t fore_red, + uint16_t fore_green, + uint16_t fore_blue, + uint16_t back_red, + uint16_t back_green, + uint16_t back_blue, + uint16_t x, + uint16_t y); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_create_cursor (xcb_connection_t *c, + xcb_cursor_t cid, + xcb_pixmap_t source, + xcb_pixmap_t mask, + uint16_t fore_red, + uint16_t fore_green, + uint16_t fore_blue, + uint16_t back_red, + uint16_t back_green, + uint16_t back_blue, + uint16_t x, + uint16_t y); + +/** + * @brief create cursor + * + * @param c The connection + * @param cid The ID with which you will refer to the cursor, created by `xcb_generate_id`. + * @param source_font In which font to look for the cursor glyph. + * @param mask_font In which font to look for the mask glyph. + * @param source_char The glyph of \a source_font to use. + * @param mask_char The glyph of \a mask_font to use as a mask: Pixels which are set to 1 define + * which source pixels are displayed. All pixels which are set to 0 are not + * displayed. + * @param fore_red The red value of the foreground color. + * @param fore_green The green value of the foreground color. + * @param fore_blue The blue value of the foreground color. + * @param back_red The red value of the background color. + * @param back_green The green value of the background color. + * @param back_blue The blue value of the background color. + * @return A cookie + * + * Creates a cursor from a font glyph. X provides a set of standard cursor shapes + * in a special font named cursor. Applications are encouraged to use this + * interface for their cursors because the font can be customized for the + * individual display type. + * + * All pixels which are set to 1 in the source will use the foreground color (as + * specified by \a fore_red, \a fore_green and \a fore_blue). All pixels set to 0 + * will use the background color (as specified by \a back_red, \a back_green and + * \a back_blue). + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_create_glyph_cursor_checked (xcb_connection_t *c, + xcb_cursor_t cid, + xcb_font_t source_font, + xcb_font_t mask_font, + uint16_t source_char, + uint16_t mask_char, + uint16_t fore_red, + uint16_t fore_green, + uint16_t fore_blue, + uint16_t back_red, + uint16_t back_green, + uint16_t back_blue); + +/** + * @brief create cursor + * + * @param c The connection + * @param cid The ID with which you will refer to the cursor, created by `xcb_generate_id`. + * @param source_font In which font to look for the cursor glyph. + * @param mask_font In which font to look for the mask glyph. + * @param source_char The glyph of \a source_font to use. + * @param mask_char The glyph of \a mask_font to use as a mask: Pixels which are set to 1 define + * which source pixels are displayed. All pixels which are set to 0 are not + * displayed. + * @param fore_red The red value of the foreground color. + * @param fore_green The green value of the foreground color. + * @param fore_blue The blue value of the foreground color. + * @param back_red The red value of the background color. + * @param back_green The green value of the background color. + * @param back_blue The blue value of the background color. + * @return A cookie + * + * Creates a cursor from a font glyph. X provides a set of standard cursor shapes + * in a special font named cursor. Applications are encouraged to use this + * interface for their cursors because the font can be customized for the + * individual display type. + * + * All pixels which are set to 1 in the source will use the foreground color (as + * specified by \a fore_red, \a fore_green and \a fore_blue). All pixels set to 0 + * will use the background color (as specified by \a back_red, \a back_green and + * \a back_blue). + * + */ +xcb_void_cookie_t +xcb_create_glyph_cursor (xcb_connection_t *c, + xcb_cursor_t cid, + xcb_font_t source_font, + xcb_font_t mask_font, + uint16_t source_char, + uint16_t mask_char, + uint16_t fore_red, + uint16_t fore_green, + uint16_t fore_blue, + uint16_t back_red, + uint16_t back_green, + uint16_t back_blue); + +/** + * @brief Deletes a cursor + * + * @param c The connection + * @param cursor The cursor to destroy. + * @return A cookie + * + * Deletes the association between the cursor resource ID and the specified + * cursor. The cursor is freed when no other resource references it. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_free_cursor_checked (xcb_connection_t *c, + xcb_cursor_t cursor); + +/** + * @brief Deletes a cursor + * + * @param c The connection + * @param cursor The cursor to destroy. + * @return A cookie + * + * Deletes the association between the cursor resource ID and the specified + * cursor. The cursor is freed when no other resource references it. + * + */ +xcb_void_cookie_t +xcb_free_cursor (xcb_connection_t *c, + xcb_cursor_t cursor); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_recolor_cursor_checked (xcb_connection_t *c, + xcb_cursor_t cursor, + uint16_t fore_red, + uint16_t fore_green, + uint16_t fore_blue, + uint16_t back_red, + uint16_t back_green, + uint16_t back_blue); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_recolor_cursor (xcb_connection_t *c, + xcb_cursor_t cursor, + uint16_t fore_red, + uint16_t fore_green, + uint16_t fore_blue, + uint16_t back_red, + uint16_t back_green, + uint16_t back_blue); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_query_best_size_cookie_t +xcb_query_best_size (xcb_connection_t *c, + uint8_t _class, + xcb_drawable_t drawable, + uint16_t width, + uint16_t height); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_query_best_size_cookie_t +xcb_query_best_size_unchecked (xcb_connection_t *c, + uint8_t _class, + xcb_drawable_t drawable, + uint16_t width, + uint16_t height); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_query_best_size_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_query_best_size_reply_t * +xcb_query_best_size_reply (xcb_connection_t *c, + xcb_query_best_size_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_query_extension_sizeof (const void *_buffer); + +/** + * @brief check if extension is present + * + * @param c The connection + * @param name_len The length of \a name in bytes. + * @param name The name of the extension to query, for example "RANDR". This is case + * sensitive! + * @return A cookie + * + * Determines if the specified extension is present on this X11 server. + * + * Every extension has a unique `major_opcode` to identify requests, the minor + * opcodes and request formats are extension-specific. If the extension provides + * events and errors, the `first_event` and `first_error` fields in the reply are + * set accordingly. + * + * There should rarely be a need to use this request directly, XCB provides the + * `xcb_get_extension_data` function instead. + * + */ +xcb_query_extension_cookie_t +xcb_query_extension (xcb_connection_t *c, + uint16_t name_len, + const char *name); + +/** + * @brief check if extension is present + * + * @param c The connection + * @param name_len The length of \a name in bytes. + * @param name The name of the extension to query, for example "RANDR". This is case + * sensitive! + * @return A cookie + * + * Determines if the specified extension is present on this X11 server. + * + * Every extension has a unique `major_opcode` to identify requests, the minor + * opcodes and request formats are extension-specific. If the extension provides + * events and errors, the `first_event` and `first_error` fields in the reply are + * set accordingly. + * + * There should rarely be a need to use this request directly, XCB provides the + * `xcb_get_extension_data` function instead. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_query_extension_cookie_t +xcb_query_extension_unchecked (xcb_connection_t *c, + uint16_t name_len, + const char *name); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_query_extension_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_query_extension_reply_t * +xcb_query_extension_reply (xcb_connection_t *c, + xcb_query_extension_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_list_extensions_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_list_extensions_cookie_t +xcb_list_extensions (xcb_connection_t *c); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_list_extensions_cookie_t +xcb_list_extensions_unchecked (xcb_connection_t *c); + +int +xcb_list_extensions_names_length (const xcb_list_extensions_reply_t *R); + +xcb_str_iterator_t +xcb_list_extensions_names_iterator (const xcb_list_extensions_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_list_extensions_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_list_extensions_reply_t * +xcb_list_extensions_reply (xcb_connection_t *c, + xcb_list_extensions_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_change_keyboard_mapping_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_change_keyboard_mapping_checked (xcb_connection_t *c, + uint8_t keycode_count, + xcb_keycode_t first_keycode, + uint8_t keysyms_per_keycode, + const xcb_keysym_t *keysyms); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_change_keyboard_mapping (xcb_connection_t *c, + uint8_t keycode_count, + xcb_keycode_t first_keycode, + uint8_t keysyms_per_keycode, + const xcb_keysym_t *keysyms); + +xcb_keysym_t * +xcb_change_keyboard_mapping_keysyms (const xcb_change_keyboard_mapping_request_t *R); + +int +xcb_change_keyboard_mapping_keysyms_length (const xcb_change_keyboard_mapping_request_t *R); + +xcb_generic_iterator_t +xcb_change_keyboard_mapping_keysyms_end (const xcb_change_keyboard_mapping_request_t *R); + +int +xcb_get_keyboard_mapping_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_get_keyboard_mapping_cookie_t +xcb_get_keyboard_mapping (xcb_connection_t *c, + xcb_keycode_t first_keycode, + uint8_t count); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_get_keyboard_mapping_cookie_t +xcb_get_keyboard_mapping_unchecked (xcb_connection_t *c, + xcb_keycode_t first_keycode, + uint8_t count); + +xcb_keysym_t * +xcb_get_keyboard_mapping_keysyms (const xcb_get_keyboard_mapping_reply_t *R); + +int +xcb_get_keyboard_mapping_keysyms_length (const xcb_get_keyboard_mapping_reply_t *R); + +xcb_generic_iterator_t +xcb_get_keyboard_mapping_keysyms_end (const xcb_get_keyboard_mapping_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_get_keyboard_mapping_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_get_keyboard_mapping_reply_t * +xcb_get_keyboard_mapping_reply (xcb_connection_t *c, + xcb_get_keyboard_mapping_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_change_keyboard_control_value_list_serialize (void **_buffer, + uint32_t value_mask, + const xcb_change_keyboard_control_value_list_t *_aux); + +int +xcb_change_keyboard_control_value_list_unpack (const void *_buffer, + uint32_t value_mask, + xcb_change_keyboard_control_value_list_t *_aux); + +int +xcb_change_keyboard_control_value_list_sizeof (const void *_buffer, + uint32_t value_mask); + +int +xcb_change_keyboard_control_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_change_keyboard_control_checked (xcb_connection_t *c, + uint32_t value_mask, + const void *value_list); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_change_keyboard_control (xcb_connection_t *c, + uint32_t value_mask, + const void *value_list); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_change_keyboard_control_aux_checked (xcb_connection_t *c, + uint32_t value_mask, + const xcb_change_keyboard_control_value_list_t *value_list); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_change_keyboard_control_aux (xcb_connection_t *c, + uint32_t value_mask, + const xcb_change_keyboard_control_value_list_t *value_list); + +void * +xcb_change_keyboard_control_value_list (const xcb_change_keyboard_control_request_t *R); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_get_keyboard_control_cookie_t +xcb_get_keyboard_control (xcb_connection_t *c); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_get_keyboard_control_cookie_t +xcb_get_keyboard_control_unchecked (xcb_connection_t *c); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_get_keyboard_control_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_get_keyboard_control_reply_t * +xcb_get_keyboard_control_reply (xcb_connection_t *c, + xcb_get_keyboard_control_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_bell_checked (xcb_connection_t *c, + int8_t percent); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_bell (xcb_connection_t *c, + int8_t percent); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_change_pointer_control_checked (xcb_connection_t *c, + int16_t acceleration_numerator, + int16_t acceleration_denominator, + int16_t threshold, + uint8_t do_acceleration, + uint8_t do_threshold); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_change_pointer_control (xcb_connection_t *c, + int16_t acceleration_numerator, + int16_t acceleration_denominator, + int16_t threshold, + uint8_t do_acceleration, + uint8_t do_threshold); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_get_pointer_control_cookie_t +xcb_get_pointer_control (xcb_connection_t *c); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_get_pointer_control_cookie_t +xcb_get_pointer_control_unchecked (xcb_connection_t *c); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_get_pointer_control_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_get_pointer_control_reply_t * +xcb_get_pointer_control_reply (xcb_connection_t *c, + xcb_get_pointer_control_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_set_screen_saver_checked (xcb_connection_t *c, + int16_t timeout, + int16_t interval, + uint8_t prefer_blanking, + uint8_t allow_exposures); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_set_screen_saver (xcb_connection_t *c, + int16_t timeout, + int16_t interval, + uint8_t prefer_blanking, + uint8_t allow_exposures); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_get_screen_saver_cookie_t +xcb_get_screen_saver (xcb_connection_t *c); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_get_screen_saver_cookie_t +xcb_get_screen_saver_unchecked (xcb_connection_t *c); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_get_screen_saver_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_get_screen_saver_reply_t * +xcb_get_screen_saver_reply (xcb_connection_t *c, + xcb_get_screen_saver_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_change_hosts_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_change_hosts_checked (xcb_connection_t *c, + uint8_t mode, + uint8_t family, + uint16_t address_len, + const uint8_t *address); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_change_hosts (xcb_connection_t *c, + uint8_t mode, + uint8_t family, + uint16_t address_len, + const uint8_t *address); + +uint8_t * +xcb_change_hosts_address (const xcb_change_hosts_request_t *R); + +int +xcb_change_hosts_address_length (const xcb_change_hosts_request_t *R); + +xcb_generic_iterator_t +xcb_change_hosts_address_end (const xcb_change_hosts_request_t *R); + +int +xcb_host_sizeof (const void *_buffer); + +uint8_t * +xcb_host_address (const xcb_host_t *R); + +int +xcb_host_address_length (const xcb_host_t *R); + +xcb_generic_iterator_t +xcb_host_address_end (const xcb_host_t *R); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_host_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_host_t) + */ +void +xcb_host_next (xcb_host_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_host_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_host_end (xcb_host_iterator_t i); + +int +xcb_list_hosts_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_list_hosts_cookie_t +xcb_list_hosts (xcb_connection_t *c); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_list_hosts_cookie_t +xcb_list_hosts_unchecked (xcb_connection_t *c); + +int +xcb_list_hosts_hosts_length (const xcb_list_hosts_reply_t *R); + +xcb_host_iterator_t +xcb_list_hosts_hosts_iterator (const xcb_list_hosts_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_list_hosts_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_list_hosts_reply_t * +xcb_list_hosts_reply (xcb_connection_t *c, + xcb_list_hosts_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_set_access_control_checked (xcb_connection_t *c, + uint8_t mode); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_set_access_control (xcb_connection_t *c, + uint8_t mode); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_set_close_down_mode_checked (xcb_connection_t *c, + uint8_t mode); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_set_close_down_mode (xcb_connection_t *c, + uint8_t mode); + +/** + * @brief kills a client + * + * @param c The connection + * @param resource Any resource belonging to the client (for example a Window), used to identify + * the client connection. + * \n + * The special value of `XCB_KILL_ALL_TEMPORARY`, the resources of all clients + * that have terminated in `RetainTemporary` (TODO) are destroyed. + * @return A cookie + * + * Forces a close down of the client that created the specified \a resource. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_kill_client_checked (xcb_connection_t *c, + uint32_t resource); + +/** + * @brief kills a client + * + * @param c The connection + * @param resource Any resource belonging to the client (for example a Window), used to identify + * the client connection. + * \n + * The special value of `XCB_KILL_ALL_TEMPORARY`, the resources of all clients + * that have terminated in `RetainTemporary` (TODO) are destroyed. + * @return A cookie + * + * Forces a close down of the client that created the specified \a resource. + * + */ +xcb_void_cookie_t +xcb_kill_client (xcb_connection_t *c, + uint32_t resource); + +int +xcb_rotate_properties_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_rotate_properties_checked (xcb_connection_t *c, + xcb_window_t window, + uint16_t atoms_len, + int16_t delta, + const xcb_atom_t *atoms); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_rotate_properties (xcb_connection_t *c, + xcb_window_t window, + uint16_t atoms_len, + int16_t delta, + const xcb_atom_t *atoms); + +xcb_atom_t * +xcb_rotate_properties_atoms (const xcb_rotate_properties_request_t *R); + +int +xcb_rotate_properties_atoms_length (const xcb_rotate_properties_request_t *R); + +xcb_generic_iterator_t +xcb_rotate_properties_atoms_end (const xcb_rotate_properties_request_t *R); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_force_screen_saver_checked (xcb_connection_t *c, + uint8_t mode); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_force_screen_saver (xcb_connection_t *c, + uint8_t mode); + +int +xcb_set_pointer_mapping_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_set_pointer_mapping_cookie_t +xcb_set_pointer_mapping (xcb_connection_t *c, + uint8_t map_len, + const uint8_t *map); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_set_pointer_mapping_cookie_t +xcb_set_pointer_mapping_unchecked (xcb_connection_t *c, + uint8_t map_len, + const uint8_t *map); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_set_pointer_mapping_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_set_pointer_mapping_reply_t * +xcb_set_pointer_mapping_reply (xcb_connection_t *c, + xcb_set_pointer_mapping_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_get_pointer_mapping_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_get_pointer_mapping_cookie_t +xcb_get_pointer_mapping (xcb_connection_t *c); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_get_pointer_mapping_cookie_t +xcb_get_pointer_mapping_unchecked (xcb_connection_t *c); + +uint8_t * +xcb_get_pointer_mapping_map (const xcb_get_pointer_mapping_reply_t *R); + +int +xcb_get_pointer_mapping_map_length (const xcb_get_pointer_mapping_reply_t *R); + +xcb_generic_iterator_t +xcb_get_pointer_mapping_map_end (const xcb_get_pointer_mapping_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_get_pointer_mapping_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_get_pointer_mapping_reply_t * +xcb_get_pointer_mapping_reply (xcb_connection_t *c, + xcb_get_pointer_mapping_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_set_modifier_mapping_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_set_modifier_mapping_cookie_t +xcb_set_modifier_mapping (xcb_connection_t *c, + uint8_t keycodes_per_modifier, + const xcb_keycode_t *keycodes); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_set_modifier_mapping_cookie_t +xcb_set_modifier_mapping_unchecked (xcb_connection_t *c, + uint8_t keycodes_per_modifier, + const xcb_keycode_t *keycodes); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_set_modifier_mapping_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_set_modifier_mapping_reply_t * +xcb_set_modifier_mapping_reply (xcb_connection_t *c, + xcb_set_modifier_mapping_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_get_modifier_mapping_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_get_modifier_mapping_cookie_t +xcb_get_modifier_mapping (xcb_connection_t *c); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_get_modifier_mapping_cookie_t +xcb_get_modifier_mapping_unchecked (xcb_connection_t *c); + +xcb_keycode_t * +xcb_get_modifier_mapping_keycodes (const xcb_get_modifier_mapping_reply_t *R); + +int +xcb_get_modifier_mapping_keycodes_length (const xcb_get_modifier_mapping_reply_t *R); + +xcb_generic_iterator_t +xcb_get_modifier_mapping_keycodes_end (const xcb_get_modifier_mapping_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_get_modifier_mapping_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_get_modifier_mapping_reply_t * +xcb_get_modifier_mapping_reply (xcb_connection_t *c, + xcb_get_modifier_mapping_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_no_operation_checked (xcb_connection_t *c); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_no_operation (xcb_connection_t *c); + + +#ifdef __cplusplus +} +#endif + +#endif + +/** + * @} + */ diff --git a/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/include/xcb/xselinux.h b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/include/xcb/xselinux.h new file mode 100644 index 0000000000000000000000000000000000000000..abcb28db1ba8b7e0cf76883a42e60151dd191f9e --- /dev/null +++ b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/include/xcb/xselinux.h @@ -0,0 +1,1889 @@ +/* + * This file generated automatically from xselinux.xml by c_client.py. + * Edit at your peril. + */ + +/** + * @defgroup XCB_SELinux_API XCB SELinux API + * @brief SELinux XCB Protocol Implementation. + * @{ + **/ + +#ifndef __XSELINUX_H +#define __XSELINUX_H + +#include "xcb.h" +#include "xproto.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#define XCB_SELINUX_MAJOR_VERSION 1 +#define XCB_SELINUX_MINOR_VERSION 0 + +extern xcb_extension_t xcb_selinux_id; + +/** + * @brief xcb_selinux_query_version_cookie_t + **/ +typedef struct xcb_selinux_query_version_cookie_t { + unsigned int sequence; +} xcb_selinux_query_version_cookie_t; + +/** Opcode for xcb_selinux_query_version. */ +#define XCB_SELINUX_QUERY_VERSION 0 + +/** + * @brief xcb_selinux_query_version_request_t + **/ +typedef struct xcb_selinux_query_version_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + uint8_t client_major; + uint8_t client_minor; +} xcb_selinux_query_version_request_t; + +/** + * @brief xcb_selinux_query_version_reply_t + **/ +typedef struct xcb_selinux_query_version_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint16_t server_major; + uint16_t server_minor; +} xcb_selinux_query_version_reply_t; + +/** Opcode for xcb_selinux_set_device_create_context. */ +#define XCB_SELINUX_SET_DEVICE_CREATE_CONTEXT 1 + +/** + * @brief xcb_selinux_set_device_create_context_request_t + **/ +typedef struct xcb_selinux_set_device_create_context_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + uint32_t context_len; +} xcb_selinux_set_device_create_context_request_t; + +/** + * @brief xcb_selinux_get_device_create_context_cookie_t + **/ +typedef struct xcb_selinux_get_device_create_context_cookie_t { + unsigned int sequence; +} xcb_selinux_get_device_create_context_cookie_t; + +/** Opcode for xcb_selinux_get_device_create_context. */ +#define XCB_SELINUX_GET_DEVICE_CREATE_CONTEXT 2 + +/** + * @brief xcb_selinux_get_device_create_context_request_t + **/ +typedef struct xcb_selinux_get_device_create_context_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; +} xcb_selinux_get_device_create_context_request_t; + +/** + * @brief xcb_selinux_get_device_create_context_reply_t + **/ +typedef struct xcb_selinux_get_device_create_context_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint32_t context_len; + uint8_t pad1[20]; +} xcb_selinux_get_device_create_context_reply_t; + +/** Opcode for xcb_selinux_set_device_context. */ +#define XCB_SELINUX_SET_DEVICE_CONTEXT 3 + +/** + * @brief xcb_selinux_set_device_context_request_t + **/ +typedef struct xcb_selinux_set_device_context_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + uint32_t device; + uint32_t context_len; +} xcb_selinux_set_device_context_request_t; + +/** + * @brief xcb_selinux_get_device_context_cookie_t + **/ +typedef struct xcb_selinux_get_device_context_cookie_t { + unsigned int sequence; +} xcb_selinux_get_device_context_cookie_t; + +/** Opcode for xcb_selinux_get_device_context. */ +#define XCB_SELINUX_GET_DEVICE_CONTEXT 4 + +/** + * @brief xcb_selinux_get_device_context_request_t + **/ +typedef struct xcb_selinux_get_device_context_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + uint32_t device; +} xcb_selinux_get_device_context_request_t; + +/** + * @brief xcb_selinux_get_device_context_reply_t + **/ +typedef struct xcb_selinux_get_device_context_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint32_t context_len; + uint8_t pad1[20]; +} xcb_selinux_get_device_context_reply_t; + +/** Opcode for xcb_selinux_set_window_create_context. */ +#define XCB_SELINUX_SET_WINDOW_CREATE_CONTEXT 5 + +/** + * @brief xcb_selinux_set_window_create_context_request_t + **/ +typedef struct xcb_selinux_set_window_create_context_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + uint32_t context_len; +} xcb_selinux_set_window_create_context_request_t; + +/** + * @brief xcb_selinux_get_window_create_context_cookie_t + **/ +typedef struct xcb_selinux_get_window_create_context_cookie_t { + unsigned int sequence; +} xcb_selinux_get_window_create_context_cookie_t; + +/** Opcode for xcb_selinux_get_window_create_context. */ +#define XCB_SELINUX_GET_WINDOW_CREATE_CONTEXT 6 + +/** + * @brief xcb_selinux_get_window_create_context_request_t + **/ +typedef struct xcb_selinux_get_window_create_context_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; +} xcb_selinux_get_window_create_context_request_t; + +/** + * @brief xcb_selinux_get_window_create_context_reply_t + **/ +typedef struct xcb_selinux_get_window_create_context_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint32_t context_len; + uint8_t pad1[20]; +} xcb_selinux_get_window_create_context_reply_t; + +/** + * @brief xcb_selinux_get_window_context_cookie_t + **/ +typedef struct xcb_selinux_get_window_context_cookie_t { + unsigned int sequence; +} xcb_selinux_get_window_context_cookie_t; + +/** Opcode for xcb_selinux_get_window_context. */ +#define XCB_SELINUX_GET_WINDOW_CONTEXT 7 + +/** + * @brief xcb_selinux_get_window_context_request_t + **/ +typedef struct xcb_selinux_get_window_context_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_window_t window; +} xcb_selinux_get_window_context_request_t; + +/** + * @brief xcb_selinux_get_window_context_reply_t + **/ +typedef struct xcb_selinux_get_window_context_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint32_t context_len; + uint8_t pad1[20]; +} xcb_selinux_get_window_context_reply_t; + +/** + * @brief xcb_selinux_list_item_t + **/ +typedef struct xcb_selinux_list_item_t { + xcb_atom_t name; + uint32_t object_context_len; + uint32_t data_context_len; +} xcb_selinux_list_item_t; + +/** + * @brief xcb_selinux_list_item_iterator_t + **/ +typedef struct xcb_selinux_list_item_iterator_t { + xcb_selinux_list_item_t *data; + int rem; + int index; +} xcb_selinux_list_item_iterator_t; + +/** Opcode for xcb_selinux_set_property_create_context. */ +#define XCB_SELINUX_SET_PROPERTY_CREATE_CONTEXT 8 + +/** + * @brief xcb_selinux_set_property_create_context_request_t + **/ +typedef struct xcb_selinux_set_property_create_context_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + uint32_t context_len; +} xcb_selinux_set_property_create_context_request_t; + +/** + * @brief xcb_selinux_get_property_create_context_cookie_t + **/ +typedef struct xcb_selinux_get_property_create_context_cookie_t { + unsigned int sequence; +} xcb_selinux_get_property_create_context_cookie_t; + +/** Opcode for xcb_selinux_get_property_create_context. */ +#define XCB_SELINUX_GET_PROPERTY_CREATE_CONTEXT 9 + +/** + * @brief xcb_selinux_get_property_create_context_request_t + **/ +typedef struct xcb_selinux_get_property_create_context_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; +} xcb_selinux_get_property_create_context_request_t; + +/** + * @brief xcb_selinux_get_property_create_context_reply_t + **/ +typedef struct xcb_selinux_get_property_create_context_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint32_t context_len; + uint8_t pad1[20]; +} xcb_selinux_get_property_create_context_reply_t; + +/** Opcode for xcb_selinux_set_property_use_context. */ +#define XCB_SELINUX_SET_PROPERTY_USE_CONTEXT 10 + +/** + * @brief xcb_selinux_set_property_use_context_request_t + **/ +typedef struct xcb_selinux_set_property_use_context_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + uint32_t context_len; +} xcb_selinux_set_property_use_context_request_t; + +/** + * @brief xcb_selinux_get_property_use_context_cookie_t + **/ +typedef struct xcb_selinux_get_property_use_context_cookie_t { + unsigned int sequence; +} xcb_selinux_get_property_use_context_cookie_t; + +/** Opcode for xcb_selinux_get_property_use_context. */ +#define XCB_SELINUX_GET_PROPERTY_USE_CONTEXT 11 + +/** + * @brief xcb_selinux_get_property_use_context_request_t + **/ +typedef struct xcb_selinux_get_property_use_context_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; +} xcb_selinux_get_property_use_context_request_t; + +/** + * @brief xcb_selinux_get_property_use_context_reply_t + **/ +typedef struct xcb_selinux_get_property_use_context_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint32_t context_len; + uint8_t pad1[20]; +} xcb_selinux_get_property_use_context_reply_t; + +/** + * @brief xcb_selinux_get_property_context_cookie_t + **/ +typedef struct xcb_selinux_get_property_context_cookie_t { + unsigned int sequence; +} xcb_selinux_get_property_context_cookie_t; + +/** Opcode for xcb_selinux_get_property_context. */ +#define XCB_SELINUX_GET_PROPERTY_CONTEXT 12 + +/** + * @brief xcb_selinux_get_property_context_request_t + **/ +typedef struct xcb_selinux_get_property_context_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_window_t window; + xcb_atom_t property; +} xcb_selinux_get_property_context_request_t; + +/** + * @brief xcb_selinux_get_property_context_reply_t + **/ +typedef struct xcb_selinux_get_property_context_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint32_t context_len; + uint8_t pad1[20]; +} xcb_selinux_get_property_context_reply_t; + +/** + * @brief xcb_selinux_get_property_data_context_cookie_t + **/ +typedef struct xcb_selinux_get_property_data_context_cookie_t { + unsigned int sequence; +} xcb_selinux_get_property_data_context_cookie_t; + +/** Opcode for xcb_selinux_get_property_data_context. */ +#define XCB_SELINUX_GET_PROPERTY_DATA_CONTEXT 13 + +/** + * @brief xcb_selinux_get_property_data_context_request_t + **/ +typedef struct xcb_selinux_get_property_data_context_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_window_t window; + xcb_atom_t property; +} xcb_selinux_get_property_data_context_request_t; + +/** + * @brief xcb_selinux_get_property_data_context_reply_t + **/ +typedef struct xcb_selinux_get_property_data_context_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint32_t context_len; + uint8_t pad1[20]; +} xcb_selinux_get_property_data_context_reply_t; + +/** + * @brief xcb_selinux_list_properties_cookie_t + **/ +typedef struct xcb_selinux_list_properties_cookie_t { + unsigned int sequence; +} xcb_selinux_list_properties_cookie_t; + +/** Opcode for xcb_selinux_list_properties. */ +#define XCB_SELINUX_LIST_PROPERTIES 14 + +/** + * @brief xcb_selinux_list_properties_request_t + **/ +typedef struct xcb_selinux_list_properties_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_window_t window; +} xcb_selinux_list_properties_request_t; + +/** + * @brief xcb_selinux_list_properties_reply_t + **/ +typedef struct xcb_selinux_list_properties_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint32_t properties_len; + uint8_t pad1[20]; +} xcb_selinux_list_properties_reply_t; + +/** Opcode for xcb_selinux_set_selection_create_context. */ +#define XCB_SELINUX_SET_SELECTION_CREATE_CONTEXT 15 + +/** + * @brief xcb_selinux_set_selection_create_context_request_t + **/ +typedef struct xcb_selinux_set_selection_create_context_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + uint32_t context_len; +} xcb_selinux_set_selection_create_context_request_t; + +/** + * @brief xcb_selinux_get_selection_create_context_cookie_t + **/ +typedef struct xcb_selinux_get_selection_create_context_cookie_t { + unsigned int sequence; +} xcb_selinux_get_selection_create_context_cookie_t; + +/** Opcode for xcb_selinux_get_selection_create_context. */ +#define XCB_SELINUX_GET_SELECTION_CREATE_CONTEXT 16 + +/** + * @brief xcb_selinux_get_selection_create_context_request_t + **/ +typedef struct xcb_selinux_get_selection_create_context_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; +} xcb_selinux_get_selection_create_context_request_t; + +/** + * @brief xcb_selinux_get_selection_create_context_reply_t + **/ +typedef struct xcb_selinux_get_selection_create_context_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint32_t context_len; + uint8_t pad1[20]; +} xcb_selinux_get_selection_create_context_reply_t; + +/** Opcode for xcb_selinux_set_selection_use_context. */ +#define XCB_SELINUX_SET_SELECTION_USE_CONTEXT 17 + +/** + * @brief xcb_selinux_set_selection_use_context_request_t + **/ +typedef struct xcb_selinux_set_selection_use_context_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + uint32_t context_len; +} xcb_selinux_set_selection_use_context_request_t; + +/** + * @brief xcb_selinux_get_selection_use_context_cookie_t + **/ +typedef struct xcb_selinux_get_selection_use_context_cookie_t { + unsigned int sequence; +} xcb_selinux_get_selection_use_context_cookie_t; + +/** Opcode for xcb_selinux_get_selection_use_context. */ +#define XCB_SELINUX_GET_SELECTION_USE_CONTEXT 18 + +/** + * @brief xcb_selinux_get_selection_use_context_request_t + **/ +typedef struct xcb_selinux_get_selection_use_context_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; +} xcb_selinux_get_selection_use_context_request_t; + +/** + * @brief xcb_selinux_get_selection_use_context_reply_t + **/ +typedef struct xcb_selinux_get_selection_use_context_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint32_t context_len; + uint8_t pad1[20]; +} xcb_selinux_get_selection_use_context_reply_t; + +/** + * @brief xcb_selinux_get_selection_context_cookie_t + **/ +typedef struct xcb_selinux_get_selection_context_cookie_t { + unsigned int sequence; +} xcb_selinux_get_selection_context_cookie_t; + +/** Opcode for xcb_selinux_get_selection_context. */ +#define XCB_SELINUX_GET_SELECTION_CONTEXT 19 + +/** + * @brief xcb_selinux_get_selection_context_request_t + **/ +typedef struct xcb_selinux_get_selection_context_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_atom_t selection; +} xcb_selinux_get_selection_context_request_t; + +/** + * @brief xcb_selinux_get_selection_context_reply_t + **/ +typedef struct xcb_selinux_get_selection_context_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint32_t context_len; + uint8_t pad1[20]; +} xcb_selinux_get_selection_context_reply_t; + +/** + * @brief xcb_selinux_get_selection_data_context_cookie_t + **/ +typedef struct xcb_selinux_get_selection_data_context_cookie_t { + unsigned int sequence; +} xcb_selinux_get_selection_data_context_cookie_t; + +/** Opcode for xcb_selinux_get_selection_data_context. */ +#define XCB_SELINUX_GET_SELECTION_DATA_CONTEXT 20 + +/** + * @brief xcb_selinux_get_selection_data_context_request_t + **/ +typedef struct xcb_selinux_get_selection_data_context_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_atom_t selection; +} xcb_selinux_get_selection_data_context_request_t; + +/** + * @brief xcb_selinux_get_selection_data_context_reply_t + **/ +typedef struct xcb_selinux_get_selection_data_context_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint32_t context_len; + uint8_t pad1[20]; +} xcb_selinux_get_selection_data_context_reply_t; + +/** + * @brief xcb_selinux_list_selections_cookie_t + **/ +typedef struct xcb_selinux_list_selections_cookie_t { + unsigned int sequence; +} xcb_selinux_list_selections_cookie_t; + +/** Opcode for xcb_selinux_list_selections. */ +#define XCB_SELINUX_LIST_SELECTIONS 21 + +/** + * @brief xcb_selinux_list_selections_request_t + **/ +typedef struct xcb_selinux_list_selections_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; +} xcb_selinux_list_selections_request_t; + +/** + * @brief xcb_selinux_list_selections_reply_t + **/ +typedef struct xcb_selinux_list_selections_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint32_t selections_len; + uint8_t pad1[20]; +} xcb_selinux_list_selections_reply_t; + +/** + * @brief xcb_selinux_get_client_context_cookie_t + **/ +typedef struct xcb_selinux_get_client_context_cookie_t { + unsigned int sequence; +} xcb_selinux_get_client_context_cookie_t; + +/** Opcode for xcb_selinux_get_client_context. */ +#define XCB_SELINUX_GET_CLIENT_CONTEXT 22 + +/** + * @brief xcb_selinux_get_client_context_request_t + **/ +typedef struct xcb_selinux_get_client_context_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + uint32_t resource; +} xcb_selinux_get_client_context_request_t; + +/** + * @brief xcb_selinux_get_client_context_reply_t + **/ +typedef struct xcb_selinux_get_client_context_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint32_t context_len; + uint8_t pad1[20]; +} xcb_selinux_get_client_context_reply_t; + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_selinux_query_version_cookie_t +xcb_selinux_query_version (xcb_connection_t *c, + uint8_t client_major, + uint8_t client_minor); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_selinux_query_version_cookie_t +xcb_selinux_query_version_unchecked (xcb_connection_t *c, + uint8_t client_major, + uint8_t client_minor); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_selinux_query_version_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_selinux_query_version_reply_t * +xcb_selinux_query_version_reply (xcb_connection_t *c, + xcb_selinux_query_version_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_selinux_set_device_create_context_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_selinux_set_device_create_context_checked (xcb_connection_t *c, + uint32_t context_len, + const char *context); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_selinux_set_device_create_context (xcb_connection_t *c, + uint32_t context_len, + const char *context); + +char * +xcb_selinux_set_device_create_context_context (const xcb_selinux_set_device_create_context_request_t *R); + +int +xcb_selinux_set_device_create_context_context_length (const xcb_selinux_set_device_create_context_request_t *R); + +xcb_generic_iterator_t +xcb_selinux_set_device_create_context_context_end (const xcb_selinux_set_device_create_context_request_t *R); + +int +xcb_selinux_get_device_create_context_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_selinux_get_device_create_context_cookie_t +xcb_selinux_get_device_create_context (xcb_connection_t *c); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_selinux_get_device_create_context_cookie_t +xcb_selinux_get_device_create_context_unchecked (xcb_connection_t *c); + +char * +xcb_selinux_get_device_create_context_context (const xcb_selinux_get_device_create_context_reply_t *R); + +int +xcb_selinux_get_device_create_context_context_length (const xcb_selinux_get_device_create_context_reply_t *R); + +xcb_generic_iterator_t +xcb_selinux_get_device_create_context_context_end (const xcb_selinux_get_device_create_context_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_selinux_get_device_create_context_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_selinux_get_device_create_context_reply_t * +xcb_selinux_get_device_create_context_reply (xcb_connection_t *c, + xcb_selinux_get_device_create_context_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_selinux_set_device_context_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_selinux_set_device_context_checked (xcb_connection_t *c, + uint32_t device, + uint32_t context_len, + const char *context); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_selinux_set_device_context (xcb_connection_t *c, + uint32_t device, + uint32_t context_len, + const char *context); + +char * +xcb_selinux_set_device_context_context (const xcb_selinux_set_device_context_request_t *R); + +int +xcb_selinux_set_device_context_context_length (const xcb_selinux_set_device_context_request_t *R); + +xcb_generic_iterator_t +xcb_selinux_set_device_context_context_end (const xcb_selinux_set_device_context_request_t *R); + +int +xcb_selinux_get_device_context_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_selinux_get_device_context_cookie_t +xcb_selinux_get_device_context (xcb_connection_t *c, + uint32_t device); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_selinux_get_device_context_cookie_t +xcb_selinux_get_device_context_unchecked (xcb_connection_t *c, + uint32_t device); + +char * +xcb_selinux_get_device_context_context (const xcb_selinux_get_device_context_reply_t *R); + +int +xcb_selinux_get_device_context_context_length (const xcb_selinux_get_device_context_reply_t *R); + +xcb_generic_iterator_t +xcb_selinux_get_device_context_context_end (const xcb_selinux_get_device_context_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_selinux_get_device_context_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_selinux_get_device_context_reply_t * +xcb_selinux_get_device_context_reply (xcb_connection_t *c, + xcb_selinux_get_device_context_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_selinux_set_window_create_context_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_selinux_set_window_create_context_checked (xcb_connection_t *c, + uint32_t context_len, + const char *context); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_selinux_set_window_create_context (xcb_connection_t *c, + uint32_t context_len, + const char *context); + +char * +xcb_selinux_set_window_create_context_context (const xcb_selinux_set_window_create_context_request_t *R); + +int +xcb_selinux_set_window_create_context_context_length (const xcb_selinux_set_window_create_context_request_t *R); + +xcb_generic_iterator_t +xcb_selinux_set_window_create_context_context_end (const xcb_selinux_set_window_create_context_request_t *R); + +int +xcb_selinux_get_window_create_context_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_selinux_get_window_create_context_cookie_t +xcb_selinux_get_window_create_context (xcb_connection_t *c); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_selinux_get_window_create_context_cookie_t +xcb_selinux_get_window_create_context_unchecked (xcb_connection_t *c); + +char * +xcb_selinux_get_window_create_context_context (const xcb_selinux_get_window_create_context_reply_t *R); + +int +xcb_selinux_get_window_create_context_context_length (const xcb_selinux_get_window_create_context_reply_t *R); + +xcb_generic_iterator_t +xcb_selinux_get_window_create_context_context_end (const xcb_selinux_get_window_create_context_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_selinux_get_window_create_context_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_selinux_get_window_create_context_reply_t * +xcb_selinux_get_window_create_context_reply (xcb_connection_t *c, + xcb_selinux_get_window_create_context_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_selinux_get_window_context_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_selinux_get_window_context_cookie_t +xcb_selinux_get_window_context (xcb_connection_t *c, + xcb_window_t window); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_selinux_get_window_context_cookie_t +xcb_selinux_get_window_context_unchecked (xcb_connection_t *c, + xcb_window_t window); + +char * +xcb_selinux_get_window_context_context (const xcb_selinux_get_window_context_reply_t *R); + +int +xcb_selinux_get_window_context_context_length (const xcb_selinux_get_window_context_reply_t *R); + +xcb_generic_iterator_t +xcb_selinux_get_window_context_context_end (const xcb_selinux_get_window_context_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_selinux_get_window_context_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_selinux_get_window_context_reply_t * +xcb_selinux_get_window_context_reply (xcb_connection_t *c, + xcb_selinux_get_window_context_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_selinux_list_item_sizeof (const void *_buffer); + +char * +xcb_selinux_list_item_object_context (const xcb_selinux_list_item_t *R); + +int +xcb_selinux_list_item_object_context_length (const xcb_selinux_list_item_t *R); + +xcb_generic_iterator_t +xcb_selinux_list_item_object_context_end (const xcb_selinux_list_item_t *R); + +char * +xcb_selinux_list_item_data_context (const xcb_selinux_list_item_t *R); + +int +xcb_selinux_list_item_data_context_length (const xcb_selinux_list_item_t *R); + +xcb_generic_iterator_t +xcb_selinux_list_item_data_context_end (const xcb_selinux_list_item_t *R); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_selinux_list_item_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_selinux_list_item_t) + */ +void +xcb_selinux_list_item_next (xcb_selinux_list_item_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_selinux_list_item_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_selinux_list_item_end (xcb_selinux_list_item_iterator_t i); + +int +xcb_selinux_set_property_create_context_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_selinux_set_property_create_context_checked (xcb_connection_t *c, + uint32_t context_len, + const char *context); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_selinux_set_property_create_context (xcb_connection_t *c, + uint32_t context_len, + const char *context); + +char * +xcb_selinux_set_property_create_context_context (const xcb_selinux_set_property_create_context_request_t *R); + +int +xcb_selinux_set_property_create_context_context_length (const xcb_selinux_set_property_create_context_request_t *R); + +xcb_generic_iterator_t +xcb_selinux_set_property_create_context_context_end (const xcb_selinux_set_property_create_context_request_t *R); + +int +xcb_selinux_get_property_create_context_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_selinux_get_property_create_context_cookie_t +xcb_selinux_get_property_create_context (xcb_connection_t *c); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_selinux_get_property_create_context_cookie_t +xcb_selinux_get_property_create_context_unchecked (xcb_connection_t *c); + +char * +xcb_selinux_get_property_create_context_context (const xcb_selinux_get_property_create_context_reply_t *R); + +int +xcb_selinux_get_property_create_context_context_length (const xcb_selinux_get_property_create_context_reply_t *R); + +xcb_generic_iterator_t +xcb_selinux_get_property_create_context_context_end (const xcb_selinux_get_property_create_context_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_selinux_get_property_create_context_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_selinux_get_property_create_context_reply_t * +xcb_selinux_get_property_create_context_reply (xcb_connection_t *c, + xcb_selinux_get_property_create_context_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_selinux_set_property_use_context_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_selinux_set_property_use_context_checked (xcb_connection_t *c, + uint32_t context_len, + const char *context); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_selinux_set_property_use_context (xcb_connection_t *c, + uint32_t context_len, + const char *context); + +char * +xcb_selinux_set_property_use_context_context (const xcb_selinux_set_property_use_context_request_t *R); + +int +xcb_selinux_set_property_use_context_context_length (const xcb_selinux_set_property_use_context_request_t *R); + +xcb_generic_iterator_t +xcb_selinux_set_property_use_context_context_end (const xcb_selinux_set_property_use_context_request_t *R); + +int +xcb_selinux_get_property_use_context_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_selinux_get_property_use_context_cookie_t +xcb_selinux_get_property_use_context (xcb_connection_t *c); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_selinux_get_property_use_context_cookie_t +xcb_selinux_get_property_use_context_unchecked (xcb_connection_t *c); + +char * +xcb_selinux_get_property_use_context_context (const xcb_selinux_get_property_use_context_reply_t *R); + +int +xcb_selinux_get_property_use_context_context_length (const xcb_selinux_get_property_use_context_reply_t *R); + +xcb_generic_iterator_t +xcb_selinux_get_property_use_context_context_end (const xcb_selinux_get_property_use_context_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_selinux_get_property_use_context_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_selinux_get_property_use_context_reply_t * +xcb_selinux_get_property_use_context_reply (xcb_connection_t *c, + xcb_selinux_get_property_use_context_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_selinux_get_property_context_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_selinux_get_property_context_cookie_t +xcb_selinux_get_property_context (xcb_connection_t *c, + xcb_window_t window, + xcb_atom_t property); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_selinux_get_property_context_cookie_t +xcb_selinux_get_property_context_unchecked (xcb_connection_t *c, + xcb_window_t window, + xcb_atom_t property); + +char * +xcb_selinux_get_property_context_context (const xcb_selinux_get_property_context_reply_t *R); + +int +xcb_selinux_get_property_context_context_length (const xcb_selinux_get_property_context_reply_t *R); + +xcb_generic_iterator_t +xcb_selinux_get_property_context_context_end (const xcb_selinux_get_property_context_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_selinux_get_property_context_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_selinux_get_property_context_reply_t * +xcb_selinux_get_property_context_reply (xcb_connection_t *c, + xcb_selinux_get_property_context_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_selinux_get_property_data_context_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_selinux_get_property_data_context_cookie_t +xcb_selinux_get_property_data_context (xcb_connection_t *c, + xcb_window_t window, + xcb_atom_t property); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_selinux_get_property_data_context_cookie_t +xcb_selinux_get_property_data_context_unchecked (xcb_connection_t *c, + xcb_window_t window, + xcb_atom_t property); + +char * +xcb_selinux_get_property_data_context_context (const xcb_selinux_get_property_data_context_reply_t *R); + +int +xcb_selinux_get_property_data_context_context_length (const xcb_selinux_get_property_data_context_reply_t *R); + +xcb_generic_iterator_t +xcb_selinux_get_property_data_context_context_end (const xcb_selinux_get_property_data_context_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_selinux_get_property_data_context_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_selinux_get_property_data_context_reply_t * +xcb_selinux_get_property_data_context_reply (xcb_connection_t *c, + xcb_selinux_get_property_data_context_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_selinux_list_properties_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_selinux_list_properties_cookie_t +xcb_selinux_list_properties (xcb_connection_t *c, + xcb_window_t window); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_selinux_list_properties_cookie_t +xcb_selinux_list_properties_unchecked (xcb_connection_t *c, + xcb_window_t window); + +int +xcb_selinux_list_properties_properties_length (const xcb_selinux_list_properties_reply_t *R); + +xcb_selinux_list_item_iterator_t +xcb_selinux_list_properties_properties_iterator (const xcb_selinux_list_properties_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_selinux_list_properties_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_selinux_list_properties_reply_t * +xcb_selinux_list_properties_reply (xcb_connection_t *c, + xcb_selinux_list_properties_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_selinux_set_selection_create_context_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_selinux_set_selection_create_context_checked (xcb_connection_t *c, + uint32_t context_len, + const char *context); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_selinux_set_selection_create_context (xcb_connection_t *c, + uint32_t context_len, + const char *context); + +char * +xcb_selinux_set_selection_create_context_context (const xcb_selinux_set_selection_create_context_request_t *R); + +int +xcb_selinux_set_selection_create_context_context_length (const xcb_selinux_set_selection_create_context_request_t *R); + +xcb_generic_iterator_t +xcb_selinux_set_selection_create_context_context_end (const xcb_selinux_set_selection_create_context_request_t *R); + +int +xcb_selinux_get_selection_create_context_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_selinux_get_selection_create_context_cookie_t +xcb_selinux_get_selection_create_context (xcb_connection_t *c); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_selinux_get_selection_create_context_cookie_t +xcb_selinux_get_selection_create_context_unchecked (xcb_connection_t *c); + +char * +xcb_selinux_get_selection_create_context_context (const xcb_selinux_get_selection_create_context_reply_t *R); + +int +xcb_selinux_get_selection_create_context_context_length (const xcb_selinux_get_selection_create_context_reply_t *R); + +xcb_generic_iterator_t +xcb_selinux_get_selection_create_context_context_end (const xcb_selinux_get_selection_create_context_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_selinux_get_selection_create_context_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_selinux_get_selection_create_context_reply_t * +xcb_selinux_get_selection_create_context_reply (xcb_connection_t *c, + xcb_selinux_get_selection_create_context_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_selinux_set_selection_use_context_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_selinux_set_selection_use_context_checked (xcb_connection_t *c, + uint32_t context_len, + const char *context); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_selinux_set_selection_use_context (xcb_connection_t *c, + uint32_t context_len, + const char *context); + +char * +xcb_selinux_set_selection_use_context_context (const xcb_selinux_set_selection_use_context_request_t *R); + +int +xcb_selinux_set_selection_use_context_context_length (const xcb_selinux_set_selection_use_context_request_t *R); + +xcb_generic_iterator_t +xcb_selinux_set_selection_use_context_context_end (const xcb_selinux_set_selection_use_context_request_t *R); + +int +xcb_selinux_get_selection_use_context_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_selinux_get_selection_use_context_cookie_t +xcb_selinux_get_selection_use_context (xcb_connection_t *c); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_selinux_get_selection_use_context_cookie_t +xcb_selinux_get_selection_use_context_unchecked (xcb_connection_t *c); + +char * +xcb_selinux_get_selection_use_context_context (const xcb_selinux_get_selection_use_context_reply_t *R); + +int +xcb_selinux_get_selection_use_context_context_length (const xcb_selinux_get_selection_use_context_reply_t *R); + +xcb_generic_iterator_t +xcb_selinux_get_selection_use_context_context_end (const xcb_selinux_get_selection_use_context_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_selinux_get_selection_use_context_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_selinux_get_selection_use_context_reply_t * +xcb_selinux_get_selection_use_context_reply (xcb_connection_t *c, + xcb_selinux_get_selection_use_context_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_selinux_get_selection_context_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_selinux_get_selection_context_cookie_t +xcb_selinux_get_selection_context (xcb_connection_t *c, + xcb_atom_t selection); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_selinux_get_selection_context_cookie_t +xcb_selinux_get_selection_context_unchecked (xcb_connection_t *c, + xcb_atom_t selection); + +char * +xcb_selinux_get_selection_context_context (const xcb_selinux_get_selection_context_reply_t *R); + +int +xcb_selinux_get_selection_context_context_length (const xcb_selinux_get_selection_context_reply_t *R); + +xcb_generic_iterator_t +xcb_selinux_get_selection_context_context_end (const xcb_selinux_get_selection_context_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_selinux_get_selection_context_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_selinux_get_selection_context_reply_t * +xcb_selinux_get_selection_context_reply (xcb_connection_t *c, + xcb_selinux_get_selection_context_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_selinux_get_selection_data_context_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_selinux_get_selection_data_context_cookie_t +xcb_selinux_get_selection_data_context (xcb_connection_t *c, + xcb_atom_t selection); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_selinux_get_selection_data_context_cookie_t +xcb_selinux_get_selection_data_context_unchecked (xcb_connection_t *c, + xcb_atom_t selection); + +char * +xcb_selinux_get_selection_data_context_context (const xcb_selinux_get_selection_data_context_reply_t *R); + +int +xcb_selinux_get_selection_data_context_context_length (const xcb_selinux_get_selection_data_context_reply_t *R); + +xcb_generic_iterator_t +xcb_selinux_get_selection_data_context_context_end (const xcb_selinux_get_selection_data_context_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_selinux_get_selection_data_context_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_selinux_get_selection_data_context_reply_t * +xcb_selinux_get_selection_data_context_reply (xcb_connection_t *c, + xcb_selinux_get_selection_data_context_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_selinux_list_selections_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_selinux_list_selections_cookie_t +xcb_selinux_list_selections (xcb_connection_t *c); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_selinux_list_selections_cookie_t +xcb_selinux_list_selections_unchecked (xcb_connection_t *c); + +int +xcb_selinux_list_selections_selections_length (const xcb_selinux_list_selections_reply_t *R); + +xcb_selinux_list_item_iterator_t +xcb_selinux_list_selections_selections_iterator (const xcb_selinux_list_selections_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_selinux_list_selections_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_selinux_list_selections_reply_t * +xcb_selinux_list_selections_reply (xcb_connection_t *c, + xcb_selinux_list_selections_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_selinux_get_client_context_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_selinux_get_client_context_cookie_t +xcb_selinux_get_client_context (xcb_connection_t *c, + uint32_t resource); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_selinux_get_client_context_cookie_t +xcb_selinux_get_client_context_unchecked (xcb_connection_t *c, + uint32_t resource); + +char * +xcb_selinux_get_client_context_context (const xcb_selinux_get_client_context_reply_t *R); + +int +xcb_selinux_get_client_context_context_length (const xcb_selinux_get_client_context_reply_t *R); + +xcb_generic_iterator_t +xcb_selinux_get_client_context_context_end (const xcb_selinux_get_client_context_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_selinux_get_client_context_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_selinux_get_client_context_reply_t * +xcb_selinux_get_client_context_reply (xcb_connection_t *c, + xcb_selinux_get_client_context_cookie_t cookie /**< */, + xcb_generic_error_t **e); + + +#ifdef __cplusplus +} +#endif + +#endif + +/** + * @} + */ diff --git a/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/include/xcb/xtest.h b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/include/xcb/xtest.h new file mode 100644 index 0000000000000000000000000000000000000000..e97733e4f1a678cc76b08182d990b708aa6b3a3f --- /dev/null +++ b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/include/xcb/xtest.h @@ -0,0 +1,303 @@ +/* + * This file generated automatically from xtest.xml by c_client.py. + * Edit at your peril. + */ + +/** + * @defgroup XCB_Test_API XCB Test API + * @brief Test XCB Protocol Implementation. + * @{ + **/ + +#ifndef __XTEST_H +#define __XTEST_H + +#include "xcb.h" +#include "xproto.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#define XCB_TEST_MAJOR_VERSION 2 +#define XCB_TEST_MINOR_VERSION 2 + +extern xcb_extension_t xcb_test_id; + +/** + * @brief xcb_test_get_version_cookie_t + **/ +typedef struct xcb_test_get_version_cookie_t { + unsigned int sequence; +} xcb_test_get_version_cookie_t; + +/** Opcode for xcb_test_get_version. */ +#define XCB_TEST_GET_VERSION 0 + +/** + * @brief xcb_test_get_version_request_t + **/ +typedef struct xcb_test_get_version_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + uint8_t major_version; + uint8_t pad0; + uint16_t minor_version; +} xcb_test_get_version_request_t; + +/** + * @brief xcb_test_get_version_reply_t + **/ +typedef struct xcb_test_get_version_reply_t { + uint8_t response_type; + uint8_t major_version; + uint16_t sequence; + uint32_t length; + uint16_t minor_version; +} xcb_test_get_version_reply_t; + +typedef enum xcb_test_cursor_t { + XCB_TEST_CURSOR_NONE = 0, + XCB_TEST_CURSOR_CURRENT = 1 +} xcb_test_cursor_t; + +/** + * @brief xcb_test_compare_cursor_cookie_t + **/ +typedef struct xcb_test_compare_cursor_cookie_t { + unsigned int sequence; +} xcb_test_compare_cursor_cookie_t; + +/** Opcode for xcb_test_compare_cursor. */ +#define XCB_TEST_COMPARE_CURSOR 1 + +/** + * @brief xcb_test_compare_cursor_request_t + **/ +typedef struct xcb_test_compare_cursor_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_window_t window; + xcb_cursor_t cursor; +} xcb_test_compare_cursor_request_t; + +/** + * @brief xcb_test_compare_cursor_reply_t + **/ +typedef struct xcb_test_compare_cursor_reply_t { + uint8_t response_type; + uint8_t same; + uint16_t sequence; + uint32_t length; +} xcb_test_compare_cursor_reply_t; + +/** Opcode for xcb_test_fake_input. */ +#define XCB_TEST_FAKE_INPUT 2 + +/** + * @brief xcb_test_fake_input_request_t + **/ +typedef struct xcb_test_fake_input_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + uint8_t type; + uint8_t detail; + uint8_t pad0[2]; + uint32_t time; + xcb_window_t root; + uint8_t pad1[8]; + int16_t rootX; + int16_t rootY; + uint8_t pad2[7]; + uint8_t deviceid; +} xcb_test_fake_input_request_t; + +/** Opcode for xcb_test_grab_control. */ +#define XCB_TEST_GRAB_CONTROL 3 + +/** + * @brief xcb_test_grab_control_request_t + **/ +typedef struct xcb_test_grab_control_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + uint8_t impervious; + uint8_t pad0[3]; +} xcb_test_grab_control_request_t; + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_test_get_version_cookie_t +xcb_test_get_version (xcb_connection_t *c, + uint8_t major_version, + uint16_t minor_version); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_test_get_version_cookie_t +xcb_test_get_version_unchecked (xcb_connection_t *c, + uint8_t major_version, + uint16_t minor_version); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_test_get_version_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_test_get_version_reply_t * +xcb_test_get_version_reply (xcb_connection_t *c, + xcb_test_get_version_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_test_compare_cursor_cookie_t +xcb_test_compare_cursor (xcb_connection_t *c, + xcb_window_t window, + xcb_cursor_t cursor); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_test_compare_cursor_cookie_t +xcb_test_compare_cursor_unchecked (xcb_connection_t *c, + xcb_window_t window, + xcb_cursor_t cursor); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_test_compare_cursor_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_test_compare_cursor_reply_t * +xcb_test_compare_cursor_reply (xcb_connection_t *c, + xcb_test_compare_cursor_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_test_fake_input_checked (xcb_connection_t *c, + uint8_t type, + uint8_t detail, + uint32_t time, + xcb_window_t root, + int16_t rootX, + int16_t rootY, + uint8_t deviceid); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_test_fake_input (xcb_connection_t *c, + uint8_t type, + uint8_t detail, + uint32_t time, + xcb_window_t root, + int16_t rootX, + int16_t rootY, + uint8_t deviceid); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_test_grab_control_checked (xcb_connection_t *c, + uint8_t impervious); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_test_grab_control (xcb_connection_t *c, + uint8_t impervious); + + +#ifdef __cplusplus +} +#endif + +#endif + +/** + * @} + */ diff --git a/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/include/xcb/xv.h b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/include/xcb/xv.h new file mode 100644 index 0000000000000000000000000000000000000000..9e50008a82a1eed3023787bdb349de7c3fc6deb3 --- /dev/null +++ b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/include/xcb/xv.h @@ -0,0 +1,2096 @@ +/* + * This file generated automatically from xv.xml by c_client.py. + * Edit at your peril. + */ + +/** + * @defgroup XCB_Xv_API XCB Xv API + * @brief Xv XCB Protocol Implementation. + * @{ + **/ + +#ifndef __XV_H +#define __XV_H + +#include "xcb.h" +#include "xproto.h" +#include "shm.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#define XCB_XV_MAJOR_VERSION 2 +#define XCB_XV_MINOR_VERSION 2 + +extern xcb_extension_t xcb_xv_id; + +typedef uint32_t xcb_xv_port_t; + +/** + * @brief xcb_xv_port_iterator_t + **/ +typedef struct xcb_xv_port_iterator_t { + xcb_xv_port_t *data; + int rem; + int index; +} xcb_xv_port_iterator_t; + +typedef uint32_t xcb_xv_encoding_t; + +/** + * @brief xcb_xv_encoding_iterator_t + **/ +typedef struct xcb_xv_encoding_iterator_t { + xcb_xv_encoding_t *data; + int rem; + int index; +} xcb_xv_encoding_iterator_t; + +typedef enum xcb_xv_type_t { + XCB_XV_TYPE_INPUT_MASK = 1, + XCB_XV_TYPE_OUTPUT_MASK = 2, + XCB_XV_TYPE_VIDEO_MASK = 4, + XCB_XV_TYPE_STILL_MASK = 8, + XCB_XV_TYPE_IMAGE_MASK = 16 +} xcb_xv_type_t; + +typedef enum xcb_xv_image_format_info_type_t { + XCB_XV_IMAGE_FORMAT_INFO_TYPE_RGB = 0, + XCB_XV_IMAGE_FORMAT_INFO_TYPE_YUV = 1 +} xcb_xv_image_format_info_type_t; + +typedef enum xcb_xv_image_format_info_format_t { + XCB_XV_IMAGE_FORMAT_INFO_FORMAT_PACKED = 0, + XCB_XV_IMAGE_FORMAT_INFO_FORMAT_PLANAR = 1 +} xcb_xv_image_format_info_format_t; + +typedef enum xcb_xv_attribute_flag_t { + XCB_XV_ATTRIBUTE_FLAG_GETTABLE = 1, + XCB_XV_ATTRIBUTE_FLAG_SETTABLE = 2 +} xcb_xv_attribute_flag_t; + +typedef enum xcb_xv_video_notify_reason_t { + XCB_XV_VIDEO_NOTIFY_REASON_STARTED = 0, + XCB_XV_VIDEO_NOTIFY_REASON_STOPPED = 1, + XCB_XV_VIDEO_NOTIFY_REASON_BUSY = 2, + XCB_XV_VIDEO_NOTIFY_REASON_PREEMPTED = 3, + XCB_XV_VIDEO_NOTIFY_REASON_HARD_ERROR = 4 +} xcb_xv_video_notify_reason_t; + +typedef enum xcb_xv_scanline_order_t { + XCB_XV_SCANLINE_ORDER_TOP_TO_BOTTOM = 0, + XCB_XV_SCANLINE_ORDER_BOTTOM_TO_TOP = 1 +} xcb_xv_scanline_order_t; + +typedef enum xcb_xv_grab_port_status_t { + XCB_XV_GRAB_PORT_STATUS_SUCCESS = 0, + XCB_XV_GRAB_PORT_STATUS_BAD_EXTENSION = 1, + XCB_XV_GRAB_PORT_STATUS_ALREADY_GRABBED = 2, + XCB_XV_GRAB_PORT_STATUS_INVALID_TIME = 3, + XCB_XV_GRAB_PORT_STATUS_BAD_REPLY = 4, + XCB_XV_GRAB_PORT_STATUS_BAD_ALLOC = 5 +} xcb_xv_grab_port_status_t; + +/** + * @brief xcb_xv_rational_t + **/ +typedef struct xcb_xv_rational_t { + int32_t numerator; + int32_t denominator; +} xcb_xv_rational_t; + +/** + * @brief xcb_xv_rational_iterator_t + **/ +typedef struct xcb_xv_rational_iterator_t { + xcb_xv_rational_t *data; + int rem; + int index; +} xcb_xv_rational_iterator_t; + +/** + * @brief xcb_xv_format_t + **/ +typedef struct xcb_xv_format_t { + xcb_visualid_t visual; + uint8_t depth; + uint8_t pad0[3]; +} xcb_xv_format_t; + +/** + * @brief xcb_xv_format_iterator_t + **/ +typedef struct xcb_xv_format_iterator_t { + xcb_xv_format_t *data; + int rem; + int index; +} xcb_xv_format_iterator_t; + +/** + * @brief xcb_xv_adaptor_info_t + **/ +typedef struct xcb_xv_adaptor_info_t { + xcb_xv_port_t base_id; + uint16_t name_size; + uint16_t num_ports; + uint16_t num_formats; + uint8_t type; + uint8_t pad0; +} xcb_xv_adaptor_info_t; + +/** + * @brief xcb_xv_adaptor_info_iterator_t + **/ +typedef struct xcb_xv_adaptor_info_iterator_t { + xcb_xv_adaptor_info_t *data; + int rem; + int index; +} xcb_xv_adaptor_info_iterator_t; + +/** + * @brief xcb_xv_encoding_info_t + **/ +typedef struct xcb_xv_encoding_info_t { + xcb_xv_encoding_t encoding; + uint16_t name_size; + uint16_t width; + uint16_t height; + uint8_t pad0[2]; + xcb_xv_rational_t rate; +} xcb_xv_encoding_info_t; + +/** + * @brief xcb_xv_encoding_info_iterator_t + **/ +typedef struct xcb_xv_encoding_info_iterator_t { + xcb_xv_encoding_info_t *data; + int rem; + int index; +} xcb_xv_encoding_info_iterator_t; + +/** + * @brief xcb_xv_image_t + **/ +typedef struct xcb_xv_image_t { + uint32_t id; + uint16_t width; + uint16_t height; + uint32_t data_size; + uint32_t num_planes; +} xcb_xv_image_t; + +/** + * @brief xcb_xv_image_iterator_t + **/ +typedef struct xcb_xv_image_iterator_t { + xcb_xv_image_t *data; + int rem; + int index; +} xcb_xv_image_iterator_t; + +/** + * @brief xcb_xv_attribute_info_t + **/ +typedef struct xcb_xv_attribute_info_t { + uint32_t flags; + int32_t min; + int32_t max; + uint32_t size; +} xcb_xv_attribute_info_t; + +/** + * @brief xcb_xv_attribute_info_iterator_t + **/ +typedef struct xcb_xv_attribute_info_iterator_t { + xcb_xv_attribute_info_t *data; + int rem; + int index; +} xcb_xv_attribute_info_iterator_t; + +/** + * @brief xcb_xv_image_format_info_t + **/ +typedef struct xcb_xv_image_format_info_t { + uint32_t id; + uint8_t type; + uint8_t byte_order; + uint8_t pad0[2]; + uint8_t guid[16]; + uint8_t bpp; + uint8_t num_planes; + uint8_t pad1[2]; + uint8_t depth; + uint8_t pad2[3]; + uint32_t red_mask; + uint32_t green_mask; + uint32_t blue_mask; + uint8_t format; + uint8_t pad3[3]; + uint32_t y_sample_bits; + uint32_t u_sample_bits; + uint32_t v_sample_bits; + uint32_t vhorz_y_period; + uint32_t vhorz_u_period; + uint32_t vhorz_v_period; + uint32_t vvert_y_period; + uint32_t vvert_u_period; + uint32_t vvert_v_period; + uint8_t vcomp_order[32]; + uint8_t vscanline_order; + uint8_t pad4[11]; +} xcb_xv_image_format_info_t; + +/** + * @brief xcb_xv_image_format_info_iterator_t + **/ +typedef struct xcb_xv_image_format_info_iterator_t { + xcb_xv_image_format_info_t *data; + int rem; + int index; +} xcb_xv_image_format_info_iterator_t; + +/** Opcode for xcb_xv_bad_port. */ +#define XCB_XV_BAD_PORT 0 + +/** + * @brief xcb_xv_bad_port_error_t + **/ +typedef struct xcb_xv_bad_port_error_t { + uint8_t response_type; + uint8_t error_code; + uint16_t sequence; + uint32_t bad_value; + uint16_t minor_opcode; + uint8_t major_opcode; +} xcb_xv_bad_port_error_t; + +/** Opcode for xcb_xv_bad_encoding. */ +#define XCB_XV_BAD_ENCODING 1 + +/** + * @brief xcb_xv_bad_encoding_error_t + **/ +typedef struct xcb_xv_bad_encoding_error_t { + uint8_t response_type; + uint8_t error_code; + uint16_t sequence; + uint32_t bad_value; + uint16_t minor_opcode; + uint8_t major_opcode; +} xcb_xv_bad_encoding_error_t; + +/** Opcode for xcb_xv_bad_control. */ +#define XCB_XV_BAD_CONTROL 2 + +/** + * @brief xcb_xv_bad_control_error_t + **/ +typedef struct xcb_xv_bad_control_error_t { + uint8_t response_type; + uint8_t error_code; + uint16_t sequence; + uint32_t bad_value; + uint16_t minor_opcode; + uint8_t major_opcode; +} xcb_xv_bad_control_error_t; + +/** Opcode for xcb_xv_video_notify. */ +#define XCB_XV_VIDEO_NOTIFY 0 + +/** + * @brief xcb_xv_video_notify_event_t + **/ +typedef struct xcb_xv_video_notify_event_t { + uint8_t response_type; + uint8_t reason; + uint16_t sequence; + xcb_timestamp_t time; + xcb_drawable_t drawable; + xcb_xv_port_t port; +} xcb_xv_video_notify_event_t; + +/** Opcode for xcb_xv_port_notify. */ +#define XCB_XV_PORT_NOTIFY 1 + +/** + * @brief xcb_xv_port_notify_event_t + **/ +typedef struct xcb_xv_port_notify_event_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + xcb_timestamp_t time; + xcb_xv_port_t port; + xcb_atom_t attribute; + int32_t value; +} xcb_xv_port_notify_event_t; + +/** + * @brief xcb_xv_query_extension_cookie_t + **/ +typedef struct xcb_xv_query_extension_cookie_t { + unsigned int sequence; +} xcb_xv_query_extension_cookie_t; + +/** Opcode for xcb_xv_query_extension. */ +#define XCB_XV_QUERY_EXTENSION 0 + +/** + * @brief xcb_xv_query_extension_request_t + **/ +typedef struct xcb_xv_query_extension_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; +} xcb_xv_query_extension_request_t; + +/** + * @brief xcb_xv_query_extension_reply_t + **/ +typedef struct xcb_xv_query_extension_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint16_t major; + uint16_t minor; +} xcb_xv_query_extension_reply_t; + +/** + * @brief xcb_xv_query_adaptors_cookie_t + **/ +typedef struct xcb_xv_query_adaptors_cookie_t { + unsigned int sequence; +} xcb_xv_query_adaptors_cookie_t; + +/** Opcode for xcb_xv_query_adaptors. */ +#define XCB_XV_QUERY_ADAPTORS 1 + +/** + * @brief xcb_xv_query_adaptors_request_t + **/ +typedef struct xcb_xv_query_adaptors_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_window_t window; +} xcb_xv_query_adaptors_request_t; + +/** + * @brief xcb_xv_query_adaptors_reply_t + **/ +typedef struct xcb_xv_query_adaptors_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint16_t num_adaptors; + uint8_t pad1[22]; +} xcb_xv_query_adaptors_reply_t; + +/** + * @brief xcb_xv_query_encodings_cookie_t + **/ +typedef struct xcb_xv_query_encodings_cookie_t { + unsigned int sequence; +} xcb_xv_query_encodings_cookie_t; + +/** Opcode for xcb_xv_query_encodings. */ +#define XCB_XV_QUERY_ENCODINGS 2 + +/** + * @brief xcb_xv_query_encodings_request_t + **/ +typedef struct xcb_xv_query_encodings_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_xv_port_t port; +} xcb_xv_query_encodings_request_t; + +/** + * @brief xcb_xv_query_encodings_reply_t + **/ +typedef struct xcb_xv_query_encodings_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint16_t num_encodings; + uint8_t pad1[22]; +} xcb_xv_query_encodings_reply_t; + +/** + * @brief xcb_xv_grab_port_cookie_t + **/ +typedef struct xcb_xv_grab_port_cookie_t { + unsigned int sequence; +} xcb_xv_grab_port_cookie_t; + +/** Opcode for xcb_xv_grab_port. */ +#define XCB_XV_GRAB_PORT 3 + +/** + * @brief xcb_xv_grab_port_request_t + **/ +typedef struct xcb_xv_grab_port_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_xv_port_t port; + xcb_timestamp_t time; +} xcb_xv_grab_port_request_t; + +/** + * @brief xcb_xv_grab_port_reply_t + **/ +typedef struct xcb_xv_grab_port_reply_t { + uint8_t response_type; + uint8_t result; + uint16_t sequence; + uint32_t length; +} xcb_xv_grab_port_reply_t; + +/** Opcode for xcb_xv_ungrab_port. */ +#define XCB_XV_UNGRAB_PORT 4 + +/** + * @brief xcb_xv_ungrab_port_request_t + **/ +typedef struct xcb_xv_ungrab_port_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_xv_port_t port; + xcb_timestamp_t time; +} xcb_xv_ungrab_port_request_t; + +/** Opcode for xcb_xv_put_video. */ +#define XCB_XV_PUT_VIDEO 5 + +/** + * @brief xcb_xv_put_video_request_t + **/ +typedef struct xcb_xv_put_video_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_xv_port_t port; + xcb_drawable_t drawable; + xcb_gcontext_t gc; + int16_t vid_x; + int16_t vid_y; + uint16_t vid_w; + uint16_t vid_h; + int16_t drw_x; + int16_t drw_y; + uint16_t drw_w; + uint16_t drw_h; +} xcb_xv_put_video_request_t; + +/** Opcode for xcb_xv_put_still. */ +#define XCB_XV_PUT_STILL 6 + +/** + * @brief xcb_xv_put_still_request_t + **/ +typedef struct xcb_xv_put_still_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_xv_port_t port; + xcb_drawable_t drawable; + xcb_gcontext_t gc; + int16_t vid_x; + int16_t vid_y; + uint16_t vid_w; + uint16_t vid_h; + int16_t drw_x; + int16_t drw_y; + uint16_t drw_w; + uint16_t drw_h; +} xcb_xv_put_still_request_t; + +/** Opcode for xcb_xv_get_video. */ +#define XCB_XV_GET_VIDEO 7 + +/** + * @brief xcb_xv_get_video_request_t + **/ +typedef struct xcb_xv_get_video_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_xv_port_t port; + xcb_drawable_t drawable; + xcb_gcontext_t gc; + int16_t vid_x; + int16_t vid_y; + uint16_t vid_w; + uint16_t vid_h; + int16_t drw_x; + int16_t drw_y; + uint16_t drw_w; + uint16_t drw_h; +} xcb_xv_get_video_request_t; + +/** Opcode for xcb_xv_get_still. */ +#define XCB_XV_GET_STILL 8 + +/** + * @brief xcb_xv_get_still_request_t + **/ +typedef struct xcb_xv_get_still_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_xv_port_t port; + xcb_drawable_t drawable; + xcb_gcontext_t gc; + int16_t vid_x; + int16_t vid_y; + uint16_t vid_w; + uint16_t vid_h; + int16_t drw_x; + int16_t drw_y; + uint16_t drw_w; + uint16_t drw_h; +} xcb_xv_get_still_request_t; + +/** Opcode for xcb_xv_stop_video. */ +#define XCB_XV_STOP_VIDEO 9 + +/** + * @brief xcb_xv_stop_video_request_t + **/ +typedef struct xcb_xv_stop_video_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_xv_port_t port; + xcb_drawable_t drawable; +} xcb_xv_stop_video_request_t; + +/** Opcode for xcb_xv_select_video_notify. */ +#define XCB_XV_SELECT_VIDEO_NOTIFY 10 + +/** + * @brief xcb_xv_select_video_notify_request_t + **/ +typedef struct xcb_xv_select_video_notify_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_drawable_t drawable; + uint8_t onoff; + uint8_t pad0[3]; +} xcb_xv_select_video_notify_request_t; + +/** Opcode for xcb_xv_select_port_notify. */ +#define XCB_XV_SELECT_PORT_NOTIFY 11 + +/** + * @brief xcb_xv_select_port_notify_request_t + **/ +typedef struct xcb_xv_select_port_notify_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_xv_port_t port; + uint8_t onoff; + uint8_t pad0[3]; +} xcb_xv_select_port_notify_request_t; + +/** + * @brief xcb_xv_query_best_size_cookie_t + **/ +typedef struct xcb_xv_query_best_size_cookie_t { + unsigned int sequence; +} xcb_xv_query_best_size_cookie_t; + +/** Opcode for xcb_xv_query_best_size. */ +#define XCB_XV_QUERY_BEST_SIZE 12 + +/** + * @brief xcb_xv_query_best_size_request_t + **/ +typedef struct xcb_xv_query_best_size_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_xv_port_t port; + uint16_t vid_w; + uint16_t vid_h; + uint16_t drw_w; + uint16_t drw_h; + uint8_t motion; + uint8_t pad0[3]; +} xcb_xv_query_best_size_request_t; + +/** + * @brief xcb_xv_query_best_size_reply_t + **/ +typedef struct xcb_xv_query_best_size_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint16_t actual_width; + uint16_t actual_height; +} xcb_xv_query_best_size_reply_t; + +/** Opcode for xcb_xv_set_port_attribute. */ +#define XCB_XV_SET_PORT_ATTRIBUTE 13 + +/** + * @brief xcb_xv_set_port_attribute_request_t + **/ +typedef struct xcb_xv_set_port_attribute_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_xv_port_t port; + xcb_atom_t attribute; + int32_t value; +} xcb_xv_set_port_attribute_request_t; + +/** + * @brief xcb_xv_get_port_attribute_cookie_t + **/ +typedef struct xcb_xv_get_port_attribute_cookie_t { + unsigned int sequence; +} xcb_xv_get_port_attribute_cookie_t; + +/** Opcode for xcb_xv_get_port_attribute. */ +#define XCB_XV_GET_PORT_ATTRIBUTE 14 + +/** + * @brief xcb_xv_get_port_attribute_request_t + **/ +typedef struct xcb_xv_get_port_attribute_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_xv_port_t port; + xcb_atom_t attribute; +} xcb_xv_get_port_attribute_request_t; + +/** + * @brief xcb_xv_get_port_attribute_reply_t + **/ +typedef struct xcb_xv_get_port_attribute_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + int32_t value; +} xcb_xv_get_port_attribute_reply_t; + +/** + * @brief xcb_xv_query_port_attributes_cookie_t + **/ +typedef struct xcb_xv_query_port_attributes_cookie_t { + unsigned int sequence; +} xcb_xv_query_port_attributes_cookie_t; + +/** Opcode for xcb_xv_query_port_attributes. */ +#define XCB_XV_QUERY_PORT_ATTRIBUTES 15 + +/** + * @brief xcb_xv_query_port_attributes_request_t + **/ +typedef struct xcb_xv_query_port_attributes_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_xv_port_t port; +} xcb_xv_query_port_attributes_request_t; + +/** + * @brief xcb_xv_query_port_attributes_reply_t + **/ +typedef struct xcb_xv_query_port_attributes_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint32_t num_attributes; + uint32_t text_size; + uint8_t pad1[16]; +} xcb_xv_query_port_attributes_reply_t; + +/** + * @brief xcb_xv_list_image_formats_cookie_t + **/ +typedef struct xcb_xv_list_image_formats_cookie_t { + unsigned int sequence; +} xcb_xv_list_image_formats_cookie_t; + +/** Opcode for xcb_xv_list_image_formats. */ +#define XCB_XV_LIST_IMAGE_FORMATS 16 + +/** + * @brief xcb_xv_list_image_formats_request_t + **/ +typedef struct xcb_xv_list_image_formats_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_xv_port_t port; +} xcb_xv_list_image_formats_request_t; + +/** + * @brief xcb_xv_list_image_formats_reply_t + **/ +typedef struct xcb_xv_list_image_formats_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint32_t num_formats; + uint8_t pad1[20]; +} xcb_xv_list_image_formats_reply_t; + +/** + * @brief xcb_xv_query_image_attributes_cookie_t + **/ +typedef struct xcb_xv_query_image_attributes_cookie_t { + unsigned int sequence; +} xcb_xv_query_image_attributes_cookie_t; + +/** Opcode for xcb_xv_query_image_attributes. */ +#define XCB_XV_QUERY_IMAGE_ATTRIBUTES 17 + +/** + * @brief xcb_xv_query_image_attributes_request_t + **/ +typedef struct xcb_xv_query_image_attributes_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_xv_port_t port; + uint32_t id; + uint16_t width; + uint16_t height; +} xcb_xv_query_image_attributes_request_t; + +/** + * @brief xcb_xv_query_image_attributes_reply_t + **/ +typedef struct xcb_xv_query_image_attributes_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint32_t num_planes; + uint32_t data_size; + uint16_t width; + uint16_t height; + uint8_t pad1[12]; +} xcb_xv_query_image_attributes_reply_t; + +/** Opcode for xcb_xv_put_image. */ +#define XCB_XV_PUT_IMAGE 18 + +/** + * @brief xcb_xv_put_image_request_t + **/ +typedef struct xcb_xv_put_image_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_xv_port_t port; + xcb_drawable_t drawable; + xcb_gcontext_t gc; + uint32_t id; + int16_t src_x; + int16_t src_y; + uint16_t src_w; + uint16_t src_h; + int16_t drw_x; + int16_t drw_y; + uint16_t drw_w; + uint16_t drw_h; + uint16_t width; + uint16_t height; +} xcb_xv_put_image_request_t; + +/** Opcode for xcb_xv_shm_put_image. */ +#define XCB_XV_SHM_PUT_IMAGE 19 + +/** + * @brief xcb_xv_shm_put_image_request_t + **/ +typedef struct xcb_xv_shm_put_image_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_xv_port_t port; + xcb_drawable_t drawable; + xcb_gcontext_t gc; + xcb_shm_seg_t shmseg; + uint32_t id; + uint32_t offset; + int16_t src_x; + int16_t src_y; + uint16_t src_w; + uint16_t src_h; + int16_t drw_x; + int16_t drw_y; + uint16_t drw_w; + uint16_t drw_h; + uint16_t width; + uint16_t height; + uint8_t send_event; + uint8_t pad0[3]; +} xcb_xv_shm_put_image_request_t; + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_xv_port_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_xv_port_t) + */ +void +xcb_xv_port_next (xcb_xv_port_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_xv_port_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_xv_port_end (xcb_xv_port_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_xv_encoding_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_xv_encoding_t) + */ +void +xcb_xv_encoding_next (xcb_xv_encoding_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_xv_encoding_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_xv_encoding_end (xcb_xv_encoding_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_xv_rational_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_xv_rational_t) + */ +void +xcb_xv_rational_next (xcb_xv_rational_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_xv_rational_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_xv_rational_end (xcb_xv_rational_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_xv_format_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_xv_format_t) + */ +void +xcb_xv_format_next (xcb_xv_format_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_xv_format_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_xv_format_end (xcb_xv_format_iterator_t i); + +int +xcb_xv_adaptor_info_sizeof (const void *_buffer); + +char * +xcb_xv_adaptor_info_name (const xcb_xv_adaptor_info_t *R); + +int +xcb_xv_adaptor_info_name_length (const xcb_xv_adaptor_info_t *R); + +xcb_generic_iterator_t +xcb_xv_adaptor_info_name_end (const xcb_xv_adaptor_info_t *R); + +xcb_xv_format_t * +xcb_xv_adaptor_info_formats (const xcb_xv_adaptor_info_t *R); + +int +xcb_xv_adaptor_info_formats_length (const xcb_xv_adaptor_info_t *R); + +xcb_xv_format_iterator_t +xcb_xv_adaptor_info_formats_iterator (const xcb_xv_adaptor_info_t *R); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_xv_adaptor_info_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_xv_adaptor_info_t) + */ +void +xcb_xv_adaptor_info_next (xcb_xv_adaptor_info_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_xv_adaptor_info_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_xv_adaptor_info_end (xcb_xv_adaptor_info_iterator_t i); + +int +xcb_xv_encoding_info_sizeof (const void *_buffer); + +char * +xcb_xv_encoding_info_name (const xcb_xv_encoding_info_t *R); + +int +xcb_xv_encoding_info_name_length (const xcb_xv_encoding_info_t *R); + +xcb_generic_iterator_t +xcb_xv_encoding_info_name_end (const xcb_xv_encoding_info_t *R); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_xv_encoding_info_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_xv_encoding_info_t) + */ +void +xcb_xv_encoding_info_next (xcb_xv_encoding_info_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_xv_encoding_info_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_xv_encoding_info_end (xcb_xv_encoding_info_iterator_t i); + +int +xcb_xv_image_sizeof (const void *_buffer); + +uint32_t * +xcb_xv_image_pitches (const xcb_xv_image_t *R); + +int +xcb_xv_image_pitches_length (const xcb_xv_image_t *R); + +xcb_generic_iterator_t +xcb_xv_image_pitches_end (const xcb_xv_image_t *R); + +uint32_t * +xcb_xv_image_offsets (const xcb_xv_image_t *R); + +int +xcb_xv_image_offsets_length (const xcb_xv_image_t *R); + +xcb_generic_iterator_t +xcb_xv_image_offsets_end (const xcb_xv_image_t *R); + +uint8_t * +xcb_xv_image_data (const xcb_xv_image_t *R); + +int +xcb_xv_image_data_length (const xcb_xv_image_t *R); + +xcb_generic_iterator_t +xcb_xv_image_data_end (const xcb_xv_image_t *R); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_xv_image_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_xv_image_t) + */ +void +xcb_xv_image_next (xcb_xv_image_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_xv_image_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_xv_image_end (xcb_xv_image_iterator_t i); + +int +xcb_xv_attribute_info_sizeof (const void *_buffer); + +char * +xcb_xv_attribute_info_name (const xcb_xv_attribute_info_t *R); + +int +xcb_xv_attribute_info_name_length (const xcb_xv_attribute_info_t *R); + +xcb_generic_iterator_t +xcb_xv_attribute_info_name_end (const xcb_xv_attribute_info_t *R); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_xv_attribute_info_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_xv_attribute_info_t) + */ +void +xcb_xv_attribute_info_next (xcb_xv_attribute_info_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_xv_attribute_info_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_xv_attribute_info_end (xcb_xv_attribute_info_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_xv_image_format_info_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_xv_image_format_info_t) + */ +void +xcb_xv_image_format_info_next (xcb_xv_image_format_info_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_xv_image_format_info_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_xv_image_format_info_end (xcb_xv_image_format_info_iterator_t i); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_xv_query_extension_cookie_t +xcb_xv_query_extension (xcb_connection_t *c); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_xv_query_extension_cookie_t +xcb_xv_query_extension_unchecked (xcb_connection_t *c); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_xv_query_extension_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_xv_query_extension_reply_t * +xcb_xv_query_extension_reply (xcb_connection_t *c, + xcb_xv_query_extension_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_xv_query_adaptors_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_xv_query_adaptors_cookie_t +xcb_xv_query_adaptors (xcb_connection_t *c, + xcb_window_t window); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_xv_query_adaptors_cookie_t +xcb_xv_query_adaptors_unchecked (xcb_connection_t *c, + xcb_window_t window); + +int +xcb_xv_query_adaptors_info_length (const xcb_xv_query_adaptors_reply_t *R); + +xcb_xv_adaptor_info_iterator_t +xcb_xv_query_adaptors_info_iterator (const xcb_xv_query_adaptors_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_xv_query_adaptors_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_xv_query_adaptors_reply_t * +xcb_xv_query_adaptors_reply (xcb_connection_t *c, + xcb_xv_query_adaptors_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_xv_query_encodings_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_xv_query_encodings_cookie_t +xcb_xv_query_encodings (xcb_connection_t *c, + xcb_xv_port_t port); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_xv_query_encodings_cookie_t +xcb_xv_query_encodings_unchecked (xcb_connection_t *c, + xcb_xv_port_t port); + +int +xcb_xv_query_encodings_info_length (const xcb_xv_query_encodings_reply_t *R); + +xcb_xv_encoding_info_iterator_t +xcb_xv_query_encodings_info_iterator (const xcb_xv_query_encodings_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_xv_query_encodings_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_xv_query_encodings_reply_t * +xcb_xv_query_encodings_reply (xcb_connection_t *c, + xcb_xv_query_encodings_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_xv_grab_port_cookie_t +xcb_xv_grab_port (xcb_connection_t *c, + xcb_xv_port_t port, + xcb_timestamp_t time); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_xv_grab_port_cookie_t +xcb_xv_grab_port_unchecked (xcb_connection_t *c, + xcb_xv_port_t port, + xcb_timestamp_t time); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_xv_grab_port_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_xv_grab_port_reply_t * +xcb_xv_grab_port_reply (xcb_connection_t *c, + xcb_xv_grab_port_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_xv_ungrab_port_checked (xcb_connection_t *c, + xcb_xv_port_t port, + xcb_timestamp_t time); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_xv_ungrab_port (xcb_connection_t *c, + xcb_xv_port_t port, + xcb_timestamp_t time); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_xv_put_video_checked (xcb_connection_t *c, + xcb_xv_port_t port, + xcb_drawable_t drawable, + xcb_gcontext_t gc, + int16_t vid_x, + int16_t vid_y, + uint16_t vid_w, + uint16_t vid_h, + int16_t drw_x, + int16_t drw_y, + uint16_t drw_w, + uint16_t drw_h); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_xv_put_video (xcb_connection_t *c, + xcb_xv_port_t port, + xcb_drawable_t drawable, + xcb_gcontext_t gc, + int16_t vid_x, + int16_t vid_y, + uint16_t vid_w, + uint16_t vid_h, + int16_t drw_x, + int16_t drw_y, + uint16_t drw_w, + uint16_t drw_h); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_xv_put_still_checked (xcb_connection_t *c, + xcb_xv_port_t port, + xcb_drawable_t drawable, + xcb_gcontext_t gc, + int16_t vid_x, + int16_t vid_y, + uint16_t vid_w, + uint16_t vid_h, + int16_t drw_x, + int16_t drw_y, + uint16_t drw_w, + uint16_t drw_h); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_xv_put_still (xcb_connection_t *c, + xcb_xv_port_t port, + xcb_drawable_t drawable, + xcb_gcontext_t gc, + int16_t vid_x, + int16_t vid_y, + uint16_t vid_w, + uint16_t vid_h, + int16_t drw_x, + int16_t drw_y, + uint16_t drw_w, + uint16_t drw_h); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_xv_get_video_checked (xcb_connection_t *c, + xcb_xv_port_t port, + xcb_drawable_t drawable, + xcb_gcontext_t gc, + int16_t vid_x, + int16_t vid_y, + uint16_t vid_w, + uint16_t vid_h, + int16_t drw_x, + int16_t drw_y, + uint16_t drw_w, + uint16_t drw_h); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_xv_get_video (xcb_connection_t *c, + xcb_xv_port_t port, + xcb_drawable_t drawable, + xcb_gcontext_t gc, + int16_t vid_x, + int16_t vid_y, + uint16_t vid_w, + uint16_t vid_h, + int16_t drw_x, + int16_t drw_y, + uint16_t drw_w, + uint16_t drw_h); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_xv_get_still_checked (xcb_connection_t *c, + xcb_xv_port_t port, + xcb_drawable_t drawable, + xcb_gcontext_t gc, + int16_t vid_x, + int16_t vid_y, + uint16_t vid_w, + uint16_t vid_h, + int16_t drw_x, + int16_t drw_y, + uint16_t drw_w, + uint16_t drw_h); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_xv_get_still (xcb_connection_t *c, + xcb_xv_port_t port, + xcb_drawable_t drawable, + xcb_gcontext_t gc, + int16_t vid_x, + int16_t vid_y, + uint16_t vid_w, + uint16_t vid_h, + int16_t drw_x, + int16_t drw_y, + uint16_t drw_w, + uint16_t drw_h); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_xv_stop_video_checked (xcb_connection_t *c, + xcb_xv_port_t port, + xcb_drawable_t drawable); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_xv_stop_video (xcb_connection_t *c, + xcb_xv_port_t port, + xcb_drawable_t drawable); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_xv_select_video_notify_checked (xcb_connection_t *c, + xcb_drawable_t drawable, + uint8_t onoff); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_xv_select_video_notify (xcb_connection_t *c, + xcb_drawable_t drawable, + uint8_t onoff); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_xv_select_port_notify_checked (xcb_connection_t *c, + xcb_xv_port_t port, + uint8_t onoff); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_xv_select_port_notify (xcb_connection_t *c, + xcb_xv_port_t port, + uint8_t onoff); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_xv_query_best_size_cookie_t +xcb_xv_query_best_size (xcb_connection_t *c, + xcb_xv_port_t port, + uint16_t vid_w, + uint16_t vid_h, + uint16_t drw_w, + uint16_t drw_h, + uint8_t motion); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_xv_query_best_size_cookie_t +xcb_xv_query_best_size_unchecked (xcb_connection_t *c, + xcb_xv_port_t port, + uint16_t vid_w, + uint16_t vid_h, + uint16_t drw_w, + uint16_t drw_h, + uint8_t motion); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_xv_query_best_size_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_xv_query_best_size_reply_t * +xcb_xv_query_best_size_reply (xcb_connection_t *c, + xcb_xv_query_best_size_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_xv_set_port_attribute_checked (xcb_connection_t *c, + xcb_xv_port_t port, + xcb_atom_t attribute, + int32_t value); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_xv_set_port_attribute (xcb_connection_t *c, + xcb_xv_port_t port, + xcb_atom_t attribute, + int32_t value); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_xv_get_port_attribute_cookie_t +xcb_xv_get_port_attribute (xcb_connection_t *c, + xcb_xv_port_t port, + xcb_atom_t attribute); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_xv_get_port_attribute_cookie_t +xcb_xv_get_port_attribute_unchecked (xcb_connection_t *c, + xcb_xv_port_t port, + xcb_atom_t attribute); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_xv_get_port_attribute_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_xv_get_port_attribute_reply_t * +xcb_xv_get_port_attribute_reply (xcb_connection_t *c, + xcb_xv_get_port_attribute_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_xv_query_port_attributes_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_xv_query_port_attributes_cookie_t +xcb_xv_query_port_attributes (xcb_connection_t *c, + xcb_xv_port_t port); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_xv_query_port_attributes_cookie_t +xcb_xv_query_port_attributes_unchecked (xcb_connection_t *c, + xcb_xv_port_t port); + +int +xcb_xv_query_port_attributes_attributes_length (const xcb_xv_query_port_attributes_reply_t *R); + +xcb_xv_attribute_info_iterator_t +xcb_xv_query_port_attributes_attributes_iterator (const xcb_xv_query_port_attributes_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_xv_query_port_attributes_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_xv_query_port_attributes_reply_t * +xcb_xv_query_port_attributes_reply (xcb_connection_t *c, + xcb_xv_query_port_attributes_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_xv_list_image_formats_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_xv_list_image_formats_cookie_t +xcb_xv_list_image_formats (xcb_connection_t *c, + xcb_xv_port_t port); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_xv_list_image_formats_cookie_t +xcb_xv_list_image_formats_unchecked (xcb_connection_t *c, + xcb_xv_port_t port); + +xcb_xv_image_format_info_t * +xcb_xv_list_image_formats_format (const xcb_xv_list_image_formats_reply_t *R); + +int +xcb_xv_list_image_formats_format_length (const xcb_xv_list_image_formats_reply_t *R); + +xcb_xv_image_format_info_iterator_t +xcb_xv_list_image_formats_format_iterator (const xcb_xv_list_image_formats_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_xv_list_image_formats_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_xv_list_image_formats_reply_t * +xcb_xv_list_image_formats_reply (xcb_connection_t *c, + xcb_xv_list_image_formats_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_xv_query_image_attributes_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_xv_query_image_attributes_cookie_t +xcb_xv_query_image_attributes (xcb_connection_t *c, + xcb_xv_port_t port, + uint32_t id, + uint16_t width, + uint16_t height); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_xv_query_image_attributes_cookie_t +xcb_xv_query_image_attributes_unchecked (xcb_connection_t *c, + xcb_xv_port_t port, + uint32_t id, + uint16_t width, + uint16_t height); + +uint32_t * +xcb_xv_query_image_attributes_pitches (const xcb_xv_query_image_attributes_reply_t *R); + +int +xcb_xv_query_image_attributes_pitches_length (const xcb_xv_query_image_attributes_reply_t *R); + +xcb_generic_iterator_t +xcb_xv_query_image_attributes_pitches_end (const xcb_xv_query_image_attributes_reply_t *R); + +uint32_t * +xcb_xv_query_image_attributes_offsets (const xcb_xv_query_image_attributes_reply_t *R); + +int +xcb_xv_query_image_attributes_offsets_length (const xcb_xv_query_image_attributes_reply_t *R); + +xcb_generic_iterator_t +xcb_xv_query_image_attributes_offsets_end (const xcb_xv_query_image_attributes_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_xv_query_image_attributes_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_xv_query_image_attributes_reply_t * +xcb_xv_query_image_attributes_reply (xcb_connection_t *c, + xcb_xv_query_image_attributes_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_xv_put_image_sizeof (const void *_buffer, + uint32_t data_len); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_xv_put_image_checked (xcb_connection_t *c, + xcb_xv_port_t port, + xcb_drawable_t drawable, + xcb_gcontext_t gc, + uint32_t id, + int16_t src_x, + int16_t src_y, + uint16_t src_w, + uint16_t src_h, + int16_t drw_x, + int16_t drw_y, + uint16_t drw_w, + uint16_t drw_h, + uint16_t width, + uint16_t height, + uint32_t data_len, + const uint8_t *data); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_xv_put_image (xcb_connection_t *c, + xcb_xv_port_t port, + xcb_drawable_t drawable, + xcb_gcontext_t gc, + uint32_t id, + int16_t src_x, + int16_t src_y, + uint16_t src_w, + uint16_t src_h, + int16_t drw_x, + int16_t drw_y, + uint16_t drw_w, + uint16_t drw_h, + uint16_t width, + uint16_t height, + uint32_t data_len, + const uint8_t *data); + +uint8_t * +xcb_xv_put_image_data (const xcb_xv_put_image_request_t *R); + +int +xcb_xv_put_image_data_length (const xcb_xv_put_image_request_t *R); + +xcb_generic_iterator_t +xcb_xv_put_image_data_end (const xcb_xv_put_image_request_t *R); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_xv_shm_put_image_checked (xcb_connection_t *c, + xcb_xv_port_t port, + xcb_drawable_t drawable, + xcb_gcontext_t gc, + xcb_shm_seg_t shmseg, + uint32_t id, + uint32_t offset, + int16_t src_x, + int16_t src_y, + uint16_t src_w, + uint16_t src_h, + int16_t drw_x, + int16_t drw_y, + uint16_t drw_w, + uint16_t drw_h, + uint16_t width, + uint16_t height, + uint8_t send_event); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_xv_shm_put_image (xcb_connection_t *c, + xcb_xv_port_t port, + xcb_drawable_t drawable, + xcb_gcontext_t gc, + xcb_shm_seg_t shmseg, + uint32_t id, + uint32_t offset, + int16_t src_x, + int16_t src_y, + uint16_t src_w, + uint16_t src_h, + int16_t drw_x, + int16_t drw_y, + uint16_t drw_w, + uint16_t drw_h, + uint16_t width, + uint16_t height, + uint8_t send_event); + + +#ifdef __cplusplus +} +#endif + +#endif + +/** + * @} + */ diff --git a/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/include/xcb/xvmc.h b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/include/xcb/xvmc.h new file mode 100644 index 0000000000000000000000000000000000000000..6305416f1c4a9c021b07c5817e5f5a2b3160fad4 --- /dev/null +++ b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/include/xcb/xvmc.h @@ -0,0 +1,868 @@ +/* + * This file generated automatically from xvmc.xml by c_client.py. + * Edit at your peril. + */ + +/** + * @defgroup XCB_XvMC_API XCB XvMC API + * @brief XvMC XCB Protocol Implementation. + * @{ + **/ + +#ifndef __XVMC_H +#define __XVMC_H + +#include "xcb.h" +#include "xv.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#define XCB_XVMC_MAJOR_VERSION 1 +#define XCB_XVMC_MINOR_VERSION 1 + +extern xcb_extension_t xcb_xvmc_id; + +typedef uint32_t xcb_xvmc_context_t; + +/** + * @brief xcb_xvmc_context_iterator_t + **/ +typedef struct xcb_xvmc_context_iterator_t { + xcb_xvmc_context_t *data; + int rem; + int index; +} xcb_xvmc_context_iterator_t; + +typedef uint32_t xcb_xvmc_surface_t; + +/** + * @brief xcb_xvmc_surface_iterator_t + **/ +typedef struct xcb_xvmc_surface_iterator_t { + xcb_xvmc_surface_t *data; + int rem; + int index; +} xcb_xvmc_surface_iterator_t; + +typedef uint32_t xcb_xvmc_subpicture_t; + +/** + * @brief xcb_xvmc_subpicture_iterator_t + **/ +typedef struct xcb_xvmc_subpicture_iterator_t { + xcb_xvmc_subpicture_t *data; + int rem; + int index; +} xcb_xvmc_subpicture_iterator_t; + +/** + * @brief xcb_xvmc_surface_info_t + **/ +typedef struct xcb_xvmc_surface_info_t { + xcb_xvmc_surface_t id; + uint16_t chroma_format; + uint16_t pad0; + uint16_t max_width; + uint16_t max_height; + uint16_t subpicture_max_width; + uint16_t subpicture_max_height; + uint32_t mc_type; + uint32_t flags; +} xcb_xvmc_surface_info_t; + +/** + * @brief xcb_xvmc_surface_info_iterator_t + **/ +typedef struct xcb_xvmc_surface_info_iterator_t { + xcb_xvmc_surface_info_t *data; + int rem; + int index; +} xcb_xvmc_surface_info_iterator_t; + +/** + * @brief xcb_xvmc_query_version_cookie_t + **/ +typedef struct xcb_xvmc_query_version_cookie_t { + unsigned int sequence; +} xcb_xvmc_query_version_cookie_t; + +/** Opcode for xcb_xvmc_query_version. */ +#define XCB_XVMC_QUERY_VERSION 0 + +/** + * @brief xcb_xvmc_query_version_request_t + **/ +typedef struct xcb_xvmc_query_version_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; +} xcb_xvmc_query_version_request_t; + +/** + * @brief xcb_xvmc_query_version_reply_t + **/ +typedef struct xcb_xvmc_query_version_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint32_t major; + uint32_t minor; +} xcb_xvmc_query_version_reply_t; + +/** + * @brief xcb_xvmc_list_surface_types_cookie_t + **/ +typedef struct xcb_xvmc_list_surface_types_cookie_t { + unsigned int sequence; +} xcb_xvmc_list_surface_types_cookie_t; + +/** Opcode for xcb_xvmc_list_surface_types. */ +#define XCB_XVMC_LIST_SURFACE_TYPES 1 + +/** + * @brief xcb_xvmc_list_surface_types_request_t + **/ +typedef struct xcb_xvmc_list_surface_types_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_xv_port_t port_id; +} xcb_xvmc_list_surface_types_request_t; + +/** + * @brief xcb_xvmc_list_surface_types_reply_t + **/ +typedef struct xcb_xvmc_list_surface_types_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint32_t num; + uint8_t pad1[20]; +} xcb_xvmc_list_surface_types_reply_t; + +/** + * @brief xcb_xvmc_create_context_cookie_t + **/ +typedef struct xcb_xvmc_create_context_cookie_t { + unsigned int sequence; +} xcb_xvmc_create_context_cookie_t; + +/** Opcode for xcb_xvmc_create_context. */ +#define XCB_XVMC_CREATE_CONTEXT 2 + +/** + * @brief xcb_xvmc_create_context_request_t + **/ +typedef struct xcb_xvmc_create_context_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_xvmc_context_t context_id; + xcb_xv_port_t port_id; + xcb_xvmc_surface_t surface_id; + uint16_t width; + uint16_t height; + uint32_t flags; +} xcb_xvmc_create_context_request_t; + +/** + * @brief xcb_xvmc_create_context_reply_t + **/ +typedef struct xcb_xvmc_create_context_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint16_t width_actual; + uint16_t height_actual; + uint32_t flags_return; + uint8_t pad1[20]; +} xcb_xvmc_create_context_reply_t; + +/** Opcode for xcb_xvmc_destroy_context. */ +#define XCB_XVMC_DESTROY_CONTEXT 3 + +/** + * @brief xcb_xvmc_destroy_context_request_t + **/ +typedef struct xcb_xvmc_destroy_context_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_xvmc_context_t context_id; +} xcb_xvmc_destroy_context_request_t; + +/** + * @brief xcb_xvmc_create_surface_cookie_t + **/ +typedef struct xcb_xvmc_create_surface_cookie_t { + unsigned int sequence; +} xcb_xvmc_create_surface_cookie_t; + +/** Opcode for xcb_xvmc_create_surface. */ +#define XCB_XVMC_CREATE_SURFACE 4 + +/** + * @brief xcb_xvmc_create_surface_request_t + **/ +typedef struct xcb_xvmc_create_surface_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_xvmc_surface_t surface_id; + xcb_xvmc_context_t context_id; +} xcb_xvmc_create_surface_request_t; + +/** + * @brief xcb_xvmc_create_surface_reply_t + **/ +typedef struct xcb_xvmc_create_surface_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint8_t pad1[24]; +} xcb_xvmc_create_surface_reply_t; + +/** Opcode for xcb_xvmc_destroy_surface. */ +#define XCB_XVMC_DESTROY_SURFACE 5 + +/** + * @brief xcb_xvmc_destroy_surface_request_t + **/ +typedef struct xcb_xvmc_destroy_surface_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_xvmc_surface_t surface_id; +} xcb_xvmc_destroy_surface_request_t; + +/** + * @brief xcb_xvmc_create_subpicture_cookie_t + **/ +typedef struct xcb_xvmc_create_subpicture_cookie_t { + unsigned int sequence; +} xcb_xvmc_create_subpicture_cookie_t; + +/** Opcode for xcb_xvmc_create_subpicture. */ +#define XCB_XVMC_CREATE_SUBPICTURE 6 + +/** + * @brief xcb_xvmc_create_subpicture_request_t + **/ +typedef struct xcb_xvmc_create_subpicture_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_xvmc_subpicture_t subpicture_id; + xcb_xvmc_context_t context; + uint32_t xvimage_id; + uint16_t width; + uint16_t height; +} xcb_xvmc_create_subpicture_request_t; + +/** + * @brief xcb_xvmc_create_subpicture_reply_t + **/ +typedef struct xcb_xvmc_create_subpicture_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint16_t width_actual; + uint16_t height_actual; + uint16_t num_palette_entries; + uint16_t entry_bytes; + uint8_t component_order[4]; + uint8_t pad1[12]; +} xcb_xvmc_create_subpicture_reply_t; + +/** Opcode for xcb_xvmc_destroy_subpicture. */ +#define XCB_XVMC_DESTROY_SUBPICTURE 7 + +/** + * @brief xcb_xvmc_destroy_subpicture_request_t + **/ +typedef struct xcb_xvmc_destroy_subpicture_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_xvmc_subpicture_t subpicture_id; +} xcb_xvmc_destroy_subpicture_request_t; + +/** + * @brief xcb_xvmc_list_subpicture_types_cookie_t + **/ +typedef struct xcb_xvmc_list_subpicture_types_cookie_t { + unsigned int sequence; +} xcb_xvmc_list_subpicture_types_cookie_t; + +/** Opcode for xcb_xvmc_list_subpicture_types. */ +#define XCB_XVMC_LIST_SUBPICTURE_TYPES 8 + +/** + * @brief xcb_xvmc_list_subpicture_types_request_t + **/ +typedef struct xcb_xvmc_list_subpicture_types_request_t { + uint8_t major_opcode; + uint8_t minor_opcode; + uint16_t length; + xcb_xv_port_t port_id; + xcb_xvmc_surface_t surface_id; +} xcb_xvmc_list_subpicture_types_request_t; + +/** + * @brief xcb_xvmc_list_subpicture_types_reply_t + **/ +typedef struct xcb_xvmc_list_subpicture_types_reply_t { + uint8_t response_type; + uint8_t pad0; + uint16_t sequence; + uint32_t length; + uint32_t num; + uint8_t pad1[20]; +} xcb_xvmc_list_subpicture_types_reply_t; + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_xvmc_context_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_xvmc_context_t) + */ +void +xcb_xvmc_context_next (xcb_xvmc_context_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_xvmc_context_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_xvmc_context_end (xcb_xvmc_context_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_xvmc_surface_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_xvmc_surface_t) + */ +void +xcb_xvmc_surface_next (xcb_xvmc_surface_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_xvmc_surface_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_xvmc_surface_end (xcb_xvmc_surface_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_xvmc_subpicture_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_xvmc_subpicture_t) + */ +void +xcb_xvmc_subpicture_next (xcb_xvmc_subpicture_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_xvmc_subpicture_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_xvmc_subpicture_end (xcb_xvmc_subpicture_iterator_t i); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_xvmc_surface_info_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_xvmc_surface_info_t) + */ +void +xcb_xvmc_surface_info_next (xcb_xvmc_surface_info_iterator_t *i); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_xvmc_surface_info_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ +xcb_generic_iterator_t +xcb_xvmc_surface_info_end (xcb_xvmc_surface_info_iterator_t i); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_xvmc_query_version_cookie_t +xcb_xvmc_query_version (xcb_connection_t *c); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_xvmc_query_version_cookie_t +xcb_xvmc_query_version_unchecked (xcb_connection_t *c); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_xvmc_query_version_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_xvmc_query_version_reply_t * +xcb_xvmc_query_version_reply (xcb_connection_t *c, + xcb_xvmc_query_version_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_xvmc_list_surface_types_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_xvmc_list_surface_types_cookie_t +xcb_xvmc_list_surface_types (xcb_connection_t *c, + xcb_xv_port_t port_id); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_xvmc_list_surface_types_cookie_t +xcb_xvmc_list_surface_types_unchecked (xcb_connection_t *c, + xcb_xv_port_t port_id); + +xcb_xvmc_surface_info_t * +xcb_xvmc_list_surface_types_surfaces (const xcb_xvmc_list_surface_types_reply_t *R); + +int +xcb_xvmc_list_surface_types_surfaces_length (const xcb_xvmc_list_surface_types_reply_t *R); + +xcb_xvmc_surface_info_iterator_t +xcb_xvmc_list_surface_types_surfaces_iterator (const xcb_xvmc_list_surface_types_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_xvmc_list_surface_types_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_xvmc_list_surface_types_reply_t * +xcb_xvmc_list_surface_types_reply (xcb_connection_t *c, + xcb_xvmc_list_surface_types_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +int +xcb_xvmc_create_context_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_xvmc_create_context_cookie_t +xcb_xvmc_create_context (xcb_connection_t *c, + xcb_xvmc_context_t context_id, + xcb_xv_port_t port_id, + xcb_xvmc_surface_t surface_id, + uint16_t width, + uint16_t height, + uint32_t flags); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_xvmc_create_context_cookie_t +xcb_xvmc_create_context_unchecked (xcb_connection_t *c, + xcb_xvmc_context_t context_id, + xcb_xv_port_t port_id, + xcb_xvmc_surface_t surface_id, + uint16_t width, + uint16_t height, + uint32_t flags); + +uint32_t * +xcb_xvmc_create_context_priv_data (const xcb_xvmc_create_context_reply_t *R); + +int +xcb_xvmc_create_context_priv_data_length (const xcb_xvmc_create_context_reply_t *R); + +xcb_generic_iterator_t +xcb_xvmc_create_context_priv_data_end (const xcb_xvmc_create_context_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_xvmc_create_context_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_xvmc_create_context_reply_t * +xcb_xvmc_create_context_reply (xcb_connection_t *c, + xcb_xvmc_create_context_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_xvmc_destroy_context_checked (xcb_connection_t *c, + xcb_xvmc_context_t context_id); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_xvmc_destroy_context (xcb_connection_t *c, + xcb_xvmc_context_t context_id); + +int +xcb_xvmc_create_surface_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_xvmc_create_surface_cookie_t +xcb_xvmc_create_surface (xcb_connection_t *c, + xcb_xvmc_surface_t surface_id, + xcb_xvmc_context_t context_id); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_xvmc_create_surface_cookie_t +xcb_xvmc_create_surface_unchecked (xcb_connection_t *c, + xcb_xvmc_surface_t surface_id, + xcb_xvmc_context_t context_id); + +uint32_t * +xcb_xvmc_create_surface_priv_data (const xcb_xvmc_create_surface_reply_t *R); + +int +xcb_xvmc_create_surface_priv_data_length (const xcb_xvmc_create_surface_reply_t *R); + +xcb_generic_iterator_t +xcb_xvmc_create_surface_priv_data_end (const xcb_xvmc_create_surface_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_xvmc_create_surface_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_xvmc_create_surface_reply_t * +xcb_xvmc_create_surface_reply (xcb_connection_t *c, + xcb_xvmc_create_surface_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_xvmc_destroy_surface_checked (xcb_connection_t *c, + xcb_xvmc_surface_t surface_id); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_xvmc_destroy_surface (xcb_connection_t *c, + xcb_xvmc_surface_t surface_id); + +int +xcb_xvmc_create_subpicture_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_xvmc_create_subpicture_cookie_t +xcb_xvmc_create_subpicture (xcb_connection_t *c, + xcb_xvmc_subpicture_t subpicture_id, + xcb_xvmc_context_t context, + uint32_t xvimage_id, + uint16_t width, + uint16_t height); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_xvmc_create_subpicture_cookie_t +xcb_xvmc_create_subpicture_unchecked (xcb_connection_t *c, + xcb_xvmc_subpicture_t subpicture_id, + xcb_xvmc_context_t context, + uint32_t xvimage_id, + uint16_t width, + uint16_t height); + +uint32_t * +xcb_xvmc_create_subpicture_priv_data (const xcb_xvmc_create_subpicture_reply_t *R); + +int +xcb_xvmc_create_subpicture_priv_data_length (const xcb_xvmc_create_subpicture_reply_t *R); + +xcb_generic_iterator_t +xcb_xvmc_create_subpicture_priv_data_end (const xcb_xvmc_create_subpicture_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_xvmc_create_subpicture_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_xvmc_create_subpicture_reply_t * +xcb_xvmc_create_subpicture_reply (xcb_connection_t *c, + xcb_xvmc_create_subpicture_cookie_t cookie /**< */, + xcb_generic_error_t **e); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ +xcb_void_cookie_t +xcb_xvmc_destroy_subpicture_checked (xcb_connection_t *c, + xcb_xvmc_subpicture_t subpicture_id); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_void_cookie_t +xcb_xvmc_destroy_subpicture (xcb_connection_t *c, + xcb_xvmc_subpicture_t subpicture_id); + +int +xcb_xvmc_list_subpicture_types_sizeof (const void *_buffer); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ +xcb_xvmc_list_subpicture_types_cookie_t +xcb_xvmc_list_subpicture_types (xcb_connection_t *c, + xcb_xv_port_t port_id, + xcb_xvmc_surface_t surface_id); + +/** + * + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ +xcb_xvmc_list_subpicture_types_cookie_t +xcb_xvmc_list_subpicture_types_unchecked (xcb_connection_t *c, + xcb_xv_port_t port_id, + xcb_xvmc_surface_t surface_id); + +xcb_xv_image_format_info_t * +xcb_xvmc_list_subpicture_types_types (const xcb_xvmc_list_subpicture_types_reply_t *R); + +int +xcb_xvmc_list_subpicture_types_types_length (const xcb_xvmc_list_subpicture_types_reply_t *R); + +xcb_xv_image_format_info_iterator_t +xcb_xvmc_list_subpicture_types_types_iterator (const xcb_xvmc_list_subpicture_types_reply_t *R); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_xvmc_list_subpicture_types_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ +xcb_xvmc_list_subpicture_types_reply_t * +xcb_xvmc_list_subpicture_types_reply (xcb_connection_t *c, + xcb_xvmc_list_subpicture_types_cookie_t cookie /**< */, + xcb_generic_error_t **e); + + +#ifdef __cplusplus +} +#endif + +#endif + +/** + * @} + */ diff --git a/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/info/about.json b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/info/about.json new file mode 100644 index 0000000000000000000000000000000000000000..227aa93aeadab276d33030c026605876cc7d63c2 --- /dev/null +++ b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/info/about.json @@ -0,0 +1,131 @@ +{ + "channels": [ + "https://repo.anaconda.com/pkgs/main" + ], + "conda_build_version": "24.1.2", + "conda_version": "24.1.2", + "dev_url": "https://gitlab.freedesktop.org/xorg/lib/libxcb", + "doc_url": "https://xcb.freedesktop.org/XcbApi/", + "env_vars": { + "CIO_TEST": "" + }, + "extra": { + "copy_test_source_files": true, + "final": true, + "flow_run_id": "27eff2a1-ad98-4509-9bd0-d44780c3a3ef", + "recipe-maintainers": [ + "ccordoba12", + "pkgw" + ], + "remote_url": "git@github.com:AnacondaRecipes/libxcb-feedstock.git", + "sha": "100919a1de05526a20cc14c55374715d562c7223" + }, + "home": "https://xcb.freedesktop.org/", + "identifiers": [], + "keywords": [], + "license": "MIT", + "license_family": "MIT", + "license_file": "COPYING", + "root_pkgs": [ + "_libgcc_mutex 0.1 main", + "_openmp_mutex 5.1 1_gnu", + "archspec 0.2.1 pyhd3eb1b0_0", + "boltons 23.0.0 py39h06a4308_0", + "brotli-python 1.0.9 py39h6a678d5_7", + "bzip2 1.0.8 h7b6447c_0", + "c-ares 1.19.1 h5eee18b_0", + "charset-normalizer 2.0.4 pyhd3eb1b0_0", + "conda-content-trust 0.2.0 py39h06a4308_0", + "conda-package-handling 2.2.0 py39h06a4308_0", + "conda-package-streaming 0.9.0 py39h06a4308_0", + "fmt 9.1.0 hdb19cb5_0", + "icu 73.1 h6a678d5_0", + "idna 3.4 py39h06a4308_0", + "jsonpatch 1.32 pyhd3eb1b0_0", + "jsonpointer 2.1 pyhd3eb1b0_0", + "krb5 1.20.1 h143b758_1", + "ld_impl_linux-64 2.38 h1181459_1", + "libarchive 3.6.2 h6ac8c49_2", + "libev 4.33 h7f8727e_1", + "libffi 3.4.4 h6a678d5_0", + "libgcc-ng 11.2.0 h1234567_1", + "libgomp 11.2.0 h1234567_1", + "libnghttp2 1.57.0 h2d74bed_0", + "libsolv 0.7.24 he621ea3_0", + "libssh2 1.10.0 hdbd6064_2", + "libstdcxx-ng 11.2.0 h1234567_1", + "libxml2 2.10.4 hf1b16e4_1", + "lz4-c 1.9.4 h6a678d5_0", + "ncurses 6.4 h6a678d5_0", + "packaging 23.1 py39h06a4308_0", + "pcre2 10.42 hebb0a14_0", + "pluggy 1.0.0 py39h06a4308_1", + "pybind11-abi 4 hd3eb1b0_1", + "pycosat 0.6.6 py39h5eee18b_0", + "pycparser 2.21 pyhd3eb1b0_0", + "pysocks 1.7.1 py39h06a4308_0", + "python 3.9.18 h955ad1f_0", + "readline 8.2 h5eee18b_0", + "reproc 14.2.4 h295c915_1", + "reproc-cpp 14.2.4 h295c915_1", + "ruamel.yaml 0.17.21 py39h5eee18b_0", + "ruamel.yaml.clib 0.2.6 py39h5eee18b_1", + "sqlite 3.41.2 h5eee18b_0", + "tk 8.6.12 h1ccaba5_0", + "tqdm 4.65.0 py39hb070fc8_0", + "wheel 0.41.2 py39h06a4308_0", + "yaml-cpp 0.8.0 h6a678d5_0", + "zlib 1.2.13 h5eee18b_0", + "zstandard 0.19.0 py39h5eee18b_0", + "zstd 1.5.5 hc292b87_0", + "attrs 23.1.0 py39h06a4308_0", + "beautifulsoup4 4.12.2 py39h06a4308_0", + "ca-certificates 2023.12.12 h06a4308_0", + "certifi 2024.2.2 py39h06a4308_0", + "cffi 1.16.0 py39h5eee18b_0", + "chardet 4.0.0 py39h06a4308_1003", + "click 8.1.7 py39h06a4308_0", + "conda 24.1.2 py39h06a4308_0", + "conda-build 24.1.2 py39h06a4308_0", + "conda-index 0.4.0 pyhd3eb1b0_0", + "conda-libmamba-solver 24.1.0 pyhd3eb1b0_0", + "cryptography 42.0.2 py39hdda0065_0", + "distro 1.8.0 py39h06a4308_0", + "filelock 3.13.1 py39h06a4308_0", + "jinja2 3.1.3 py39h06a4308_0", + "jsonschema 4.19.2 py39h06a4308_0", + "jsonschema-specifications 2023.7.1 py39h06a4308_0", + "libcurl 8.5.0 h251f7ec_0", + "libedit 3.1.20230828 h5eee18b_0", + "liblief 0.12.3 h6a678d5_0", + "libmamba 1.5.6 haf1ee3a_0", + "libmambapy 1.5.6 py39h2dafd23_0", + "markupsafe 2.1.3 py39h5eee18b_0", + "menuinst 2.0.2 py39h06a4308_0", + "more-itertools 10.1.0 py39h06a4308_0", + "openssl 3.0.13 h7f8727e_0", + "patch 2.7.6 h7b6447c_1001", + "patchelf 0.17.2 h6a678d5_0", + "pip 23.3.1 py39h06a4308_0", + "pkginfo 1.9.6 py39h06a4308_0", + "platformdirs 3.10.0 py39h06a4308_0", + "psutil 5.9.0 py39h5eee18b_0", + "py-lief 0.12.3 py39h6a678d5_0", + "pyopenssl 24.0.0 py39h06a4308_0", + "python-libarchive-c 2.9 pyhd3eb1b0_1", + "pytz 2023.3.post1 py39h06a4308_0", + "pyyaml 6.0.1 py39h5eee18b_0", + "referencing 0.30.2 py39h06a4308_0", + "requests 2.31.0 py39h06a4308_1", + "rpds-py 0.10.6 py39hb02cf49_0", + "setuptools 68.2.2 py39h06a4308_0", + "soupsieve 2.5 py39h06a4308_0", + "tomli 2.0.1 py39h06a4308_0", + "tzdata 2023d h04d1e81_0", + "urllib3 2.1.0 py39h06a4308_1", + "xz 5.4.5 h5eee18b_0", + "yaml 0.2.5 h7b6447c_0" + ], + "summary": "This is the C-language Binding (XCB) package to the X Window System protocol", + "tags": [] +} \ No newline at end of file diff --git a/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/info/files b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/info/files new file mode 100644 index 0000000000000000000000000000000000000000..9c9f411da8a1aa0e68cef06e4c48f2dd0667e953 --- /dev/null +++ b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/info/files @@ -0,0 +1,135 @@ +include/xcb/bigreq.h +include/xcb/composite.h +include/xcb/damage.h +include/xcb/dbe.h +include/xcb/dpms.h +include/xcb/dri2.h +include/xcb/dri3.h +include/xcb/ge.h +include/xcb/glx.h +include/xcb/present.h +include/xcb/randr.h +include/xcb/record.h +include/xcb/render.h +include/xcb/res.h +include/xcb/screensaver.h +include/xcb/shape.h +include/xcb/shm.h +include/xcb/sync.h +include/xcb/xc_misc.h +include/xcb/xcb.h +include/xcb/xcbext.h +include/xcb/xevie.h +include/xcb/xf86dri.h +include/xcb/xfixes.h +include/xcb/xinerama.h +include/xcb/xinput.h +include/xcb/xkb.h +include/xcb/xprint.h +include/xcb/xproto.h +include/xcb/xselinux.h +include/xcb/xtest.h +include/xcb/xv.h +include/xcb/xvmc.h +lib/libxcb-composite.so +lib/libxcb-composite.so.0 +lib/libxcb-composite.so.0.0.0 +lib/libxcb-damage.so +lib/libxcb-damage.so.0 +lib/libxcb-damage.so.0.0.0 +lib/libxcb-dbe.so +lib/libxcb-dbe.so.0 +lib/libxcb-dbe.so.0.0.0 +lib/libxcb-dpms.so +lib/libxcb-dpms.so.0 +lib/libxcb-dpms.so.0.0.0 +lib/libxcb-dri2.so +lib/libxcb-dri2.so.0 +lib/libxcb-dri2.so.0.0.0 +lib/libxcb-dri3.so +lib/libxcb-dri3.so.0 +lib/libxcb-dri3.so.0.1.0 +lib/libxcb-glx.so +lib/libxcb-glx.so.0 +lib/libxcb-glx.so.0.0.0 +lib/libxcb-present.so +lib/libxcb-present.so.0 +lib/libxcb-present.so.0.0.0 +lib/libxcb-randr.so +lib/libxcb-randr.so.0 +lib/libxcb-randr.so.0.1.0 +lib/libxcb-record.so +lib/libxcb-record.so.0 +lib/libxcb-record.so.0.0.0 +lib/libxcb-render.so +lib/libxcb-render.so.0 +lib/libxcb-render.so.0.0.0 +lib/libxcb-res.so +lib/libxcb-res.so.0 +lib/libxcb-res.so.0.0.0 +lib/libxcb-screensaver.so +lib/libxcb-screensaver.so.0 +lib/libxcb-screensaver.so.0.0.0 +lib/libxcb-shape.so +lib/libxcb-shape.so.0 +lib/libxcb-shape.so.0.0.0 +lib/libxcb-shm.so +lib/libxcb-shm.so.0 +lib/libxcb-shm.so.0.0.0 +lib/libxcb-sync.so +lib/libxcb-sync.so.1 +lib/libxcb-sync.so.1.0.0 +lib/libxcb-xf86dri.so +lib/libxcb-xf86dri.so.0 +lib/libxcb-xf86dri.so.0.0.0 +lib/libxcb-xfixes.so +lib/libxcb-xfixes.so.0 +lib/libxcb-xfixes.so.0.0.0 +lib/libxcb-xinerama.so +lib/libxcb-xinerama.so.0 +lib/libxcb-xinerama.so.0.0.0 +lib/libxcb-xinput.so +lib/libxcb-xinput.so.0 +lib/libxcb-xinput.so.0.1.0 +lib/libxcb-xkb.so +lib/libxcb-xkb.so.1 +lib/libxcb-xkb.so.1.0.0 +lib/libxcb-xlib.so.0 +lib/libxcb-xlib.so.0.0.0 +lib/libxcb-xtest.so +lib/libxcb-xtest.so.0 +lib/libxcb-xtest.so.0.0.0 +lib/libxcb-xv.so +lib/libxcb-xv.so.0 +lib/libxcb-xv.so.0.0.0 +lib/libxcb-xvmc.so +lib/libxcb-xvmc.so.0 +lib/libxcb-xvmc.so.0.0.0 +lib/libxcb.so +lib/libxcb.so.1 +lib/libxcb.so.1.1.0 +lib/pkgconfig/xcb-composite.pc +lib/pkgconfig/xcb-damage.pc +lib/pkgconfig/xcb-dbe.pc +lib/pkgconfig/xcb-dpms.pc +lib/pkgconfig/xcb-dri2.pc +lib/pkgconfig/xcb-dri3.pc +lib/pkgconfig/xcb-glx.pc +lib/pkgconfig/xcb-present.pc +lib/pkgconfig/xcb-randr.pc +lib/pkgconfig/xcb-record.pc +lib/pkgconfig/xcb-render.pc +lib/pkgconfig/xcb-res.pc +lib/pkgconfig/xcb-screensaver.pc +lib/pkgconfig/xcb-shape.pc +lib/pkgconfig/xcb-shm.pc +lib/pkgconfig/xcb-sync.pc +lib/pkgconfig/xcb-xf86dri.pc +lib/pkgconfig/xcb-xfixes.pc +lib/pkgconfig/xcb-xinerama.pc +lib/pkgconfig/xcb-xinput.pc +lib/pkgconfig/xcb-xkb.pc +lib/pkgconfig/xcb-xtest.pc +lib/pkgconfig/xcb-xv.pc +lib/pkgconfig/xcb-xvmc.pc +lib/pkgconfig/xcb.pc diff --git a/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/info/git b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/info/git new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/info/has_prefix b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/info/has_prefix new file mode 100644 index 0000000000000000000000000000000000000000..0f292a97eccf12cdd3f07d540073703d771fe2cc --- /dev/null +++ b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/info/has_prefix @@ -0,0 +1,25 @@ +/croot/libxcb_1746022161355/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_ text lib/pkgconfig/xcb-composite.pc +/croot/libxcb_1746022161355/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_ text lib/pkgconfig/xcb-damage.pc +/croot/libxcb_1746022161355/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_ text lib/pkgconfig/xcb-dbe.pc +/croot/libxcb_1746022161355/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_ text lib/pkgconfig/xcb-dpms.pc +/croot/libxcb_1746022161355/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_ text lib/pkgconfig/xcb-dri2.pc +/croot/libxcb_1746022161355/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_ text lib/pkgconfig/xcb-dri3.pc +/croot/libxcb_1746022161355/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_ text lib/pkgconfig/xcb-glx.pc +/croot/libxcb_1746022161355/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_ text lib/pkgconfig/xcb-present.pc +/croot/libxcb_1746022161355/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_ text lib/pkgconfig/xcb-randr.pc +/croot/libxcb_1746022161355/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_ text lib/pkgconfig/xcb-record.pc +/croot/libxcb_1746022161355/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_ text lib/pkgconfig/xcb-render.pc +/croot/libxcb_1746022161355/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_ text lib/pkgconfig/xcb-res.pc +/croot/libxcb_1746022161355/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_ text lib/pkgconfig/xcb-screensaver.pc +/croot/libxcb_1746022161355/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_ text lib/pkgconfig/xcb-shape.pc +/croot/libxcb_1746022161355/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_ text lib/pkgconfig/xcb-shm.pc +/croot/libxcb_1746022161355/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_ text lib/pkgconfig/xcb-sync.pc +/croot/libxcb_1746022161355/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_ text lib/pkgconfig/xcb-xf86dri.pc +/croot/libxcb_1746022161355/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_ text lib/pkgconfig/xcb-xfixes.pc +/croot/libxcb_1746022161355/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_ text lib/pkgconfig/xcb-xinerama.pc +/croot/libxcb_1746022161355/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_ text lib/pkgconfig/xcb-xinput.pc +/croot/libxcb_1746022161355/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_ text lib/pkgconfig/xcb-xkb.pc +/croot/libxcb_1746022161355/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_ text lib/pkgconfig/xcb-xtest.pc +/croot/libxcb_1746022161355/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_ text lib/pkgconfig/xcb-xv.pc +/croot/libxcb_1746022161355/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_ text lib/pkgconfig/xcb-xvmc.pc +/croot/libxcb_1746022161355/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_ text lib/pkgconfig/xcb.pc diff --git a/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/info/hash_input.json b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/info/hash_input.json new file mode 100644 index 0000000000000000000000000000000000000000..481da3318052db2fab5937b3a9439a6f30994307 --- /dev/null +++ b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/info/hash_input.json @@ -0,0 +1,7 @@ +{ + "c_compiler_version": "11.2.0", + "c_compiler": "gcc", + "target_platform": "linux-64", + "channel_targets": "defaults", + "am_version": "1.15" +} \ No newline at end of file diff --git a/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/info/index.json b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/info/index.json new file mode 100644 index 0000000000000000000000000000000000000000..22079918636559fd7a2d2c3446f255cbcdfca1da --- /dev/null +++ b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/info/index.json @@ -0,0 +1,18 @@ +{ + "arch": "x86_64", + "build": "h9b100fa_0", + "build_number": 0, + "depends": [ + "libgcc-ng >=11.2.0", + "pthread-stubs", + "xorg-libxau >=1.0.12,<2.0a0", + "xorg-libxdmcp >=1.1.5,<2.0a0" + ], + "license": "MIT", + "license_family": "MIT", + "name": "libxcb", + "platform": "linux", + "subdir": "linux-64", + "timestamp": 1746022211479, + "version": "1.17.0" +} \ No newline at end of file diff --git a/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/info/licenses/COPYING b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/info/licenses/COPYING new file mode 100644 index 0000000000000000000000000000000000000000..54bfbe5b02074d0c276959c9140072ccba0dc670 --- /dev/null +++ b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/info/licenses/COPYING @@ -0,0 +1,30 @@ +Copyright (C) 2001-2006 Bart Massey, Jamey Sharp, and Josh Triplett. +All Rights Reserved. + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated +documentation files (the "Software"), to deal in the +Software without restriction, including without limitation +the rights to use, copy, modify, merge, publish, distribute, +sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall +be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY +KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR +PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS +BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the names of the authors +or their institutions shall not be used in advertising or +otherwise to promote the sale, use or other dealings in this +Software without prior written authorization from the +authors. diff --git a/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/info/paths.json b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/info/paths.json new file mode 100644 index 0000000000000000000000000000000000000000..2c51ab183442a5f1613bb2a4b05f66c48d6d7490 --- /dev/null +++ b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/info/paths.json @@ -0,0 +1,865 @@ +{ + "paths": [ + { + "_path": "include/xcb/bigreq.h", + "path_type": "hardlink", + "sha256": "bbc4c19af6fca3cf9bf284ca97457712e6c44f3532d9935eb2fbca59e27d3a25", + "size_in_bytes": 2961 + }, + { + "_path": "include/xcb/composite.h", + "path_type": "hardlink", + "sha256": "ca519efcf513541ae516b95b38c9f04b46da82a56fd65e713965a6e9bfb947fb", + "size_in_bytes": 19127 + }, + { + "_path": "include/xcb/damage.h", + "path_type": "hardlink", + "sha256": "2559f45c771fd82eb20f67b788e258deadd6613af341b91510dd584606577896", + "size_in_bytes": 14707 + }, + { + "_path": "include/xcb/dbe.h", + "path_type": "hardlink", + "sha256": "5584a5179b7b274f89ac02bac9db457351da3945f200b8287aec7dd40980003f", + "size_in_bytes": 24836 + }, + { + "_path": "include/xcb/dpms.h", + "path_type": "hardlink", + "sha256": "aa3d525123e0b1978aa5b6a1787a0ed09e6cae7c27945ded40c36b294a688d60", + "size_in_bytes": 13479 + }, + { + "_path": "include/xcb/dri2.h", + "path_type": "hardlink", + "sha256": "30b96a825b28e11e65f1529a3986d241c5cde298be0b224315d96a4d14cfac03", + "size_in_bytes": 35759 + }, + { + "_path": "include/xcb/dri3.h", + "path_type": "hardlink", + "sha256": "825f1ffd6eaaee9db2585f10982689ffa4f265bd04a7765e58c13c5458c9b719", + "size_in_bytes": 29133 + }, + { + "_path": "include/xcb/ge.h", + "path_type": "hardlink", + "sha256": "43415614975435d3ce9385534d12c33c384a8bd3c8de775a8a8c9eb6fb7a428f", + "size_in_bytes": 2981 + }, + { + "_path": "include/xcb/glx.h", + "path_type": "hardlink", + "sha256": "99924e8abe6daa54f6e13cbf6e059ae116dabf862576309fdf6ec7fc7801ecc0", + "size_in_bytes": 252818 + }, + { + "_path": "include/xcb/present.h", + "path_type": "hardlink", + "sha256": "67c7909705a210cd04966ca751599e1e6645b92bc614e5e8b6ecd5a69b4caab6", + "size_in_bytes": 23861 + }, + { + "_path": "include/xcb/randr.h", + "path_type": "hardlink", + "sha256": "910646163feeb1695d6f2e0b5bc49fe9fe9d80f815064c2fb10059a56b6b6bfc", + "size_in_bytes": 139936 + }, + { + "_path": "include/xcb/record.h", + "path_type": "hardlink", + "sha256": "717bffacab552ba6ead0b4e077bdc2845bb00a84468c018fb11679e1e4b16133", + "size_in_bytes": 27966 + }, + { + "_path": "include/xcb/render.h", + "path_type": "hardlink", + "sha256": "e5f76a9183896af58921da80be3dbe6ac33ff549009f41e125fdadf57f418126", + "size_in_bytes": 104116 + }, + { + "_path": "include/xcb/res.h", + "path_type": "hardlink", + "sha256": "4a8e3e6d31ed3315a82c97428e791757a508daea7ae2f3ddc629a7e418bb381d", + "size_in_bytes": 24483 + }, + { + "_path": "include/xcb/screensaver.h", + "path_type": "hardlink", + "sha256": "0c5537a8af3be2686cb5b7a24423727bb724ebe1567ea7925ae66592d26d6ed8", + "size_in_bytes": 16460 + }, + { + "_path": "include/xcb/shape.h", + "path_type": "hardlink", + "sha256": "cde14f4e8d82d1183054c30fb8176d7740e34c662eaa47f73924de2329b31e90", + "size_in_bytes": 20806 + }, + { + "_path": "include/xcb/shm.h", + "path_type": "hardlink", + "sha256": "a95ebf5a7d7c84951678b5fe7f48e4b8e9343901190a375a19bd3db69599da7a", + "size_in_bytes": 27681 + }, + { + "_path": "include/xcb/sync.h", + "path_type": "hardlink", + "sha256": "31b26960aa01aad3abd55d772ea645878ded314238b2378c0a3b5ba069f3781a", + "size_in_bytes": 43756 + }, + { + "_path": "include/xcb/xc_misc.h", + "path_type": "hardlink", + "sha256": "489f7db5d4d8d92ffe70fdcca0a8f5773ad5f4c9a7531383c85dad4d6f1afe9d", + "size_in_bytes": 7137 + }, + { + "_path": "include/xcb/xcb.h", + "path_type": "hardlink", + "sha256": "70218365dcfd8b2e9202b145e9bafbaba042872eae046888680bf58c38cf30e6", + "size_in_bytes": 22326 + }, + { + "_path": "include/xcb/xcbext.h", + "path_type": "hardlink", + "sha256": "b101d53f1bed75e659e7469f0b7a3eb213bf1cf228f821580c7020b8e70be647", + "size_in_bytes": 13990 + }, + { + "_path": "include/xcb/xevie.h", + "path_type": "hardlink", + "sha256": "0f23f3be2239688249e1abc61005a761e0ad2e22810ae05a07ecf75af915106e", + "size_in_bytes": 11593 + }, + { + "_path": "include/xcb/xf86dri.h", + "path_type": "hardlink", + "sha256": "4b373191f3f9514dfd21a677ecc89b8044e6c169a8bcac1c9257eeaf64f7a4dc", + "size_in_bytes": 28034 + }, + { + "_path": "include/xcb/xfixes.h", + "path_type": "hardlink", + "sha256": "2c0608c444293f064ecfd385f8e0fd4235a3d09c7397a11970eae4fc96f8aff8", + "size_in_bytes": 62303 + }, + { + "_path": "include/xcb/xinerama.h", + "path_type": "hardlink", + "sha256": "7d09cb8b743f8a92e206816c464393fdd42ce032fd73e90b7a3fe92233aedfa8", + "size_in_bytes": 14955 + }, + { + "_path": "include/xcb/xinput.h", + "path_type": "hardlink", + "sha256": "ece203736670ed2a9f2f47e9931aa9175c1165fec0a9d8a0f23b8bf788d67ecd", + "size_in_bytes": 311095 + }, + { + "_path": "include/xcb/xkb.h", + "path_type": "hardlink", + "sha256": "91583e0ccc11c7e017cfb48d2b9faa7a6cad556491934087c9f055306da8d55d", + "size_in_bytes": 246448 + }, + { + "_path": "include/xcb/xprint.h", + "path_type": "hardlink", + "sha256": "08dfb8dec1d5461c5478f1b2f7cd23b92e4f1cb25100d45355069b002080dc2d", + "size_in_bytes": 57343 + }, + { + "_path": "include/xcb/xproto.h", + "path_type": "hardlink", + "sha256": "6f45223c52dc24621e7b307b26d39e4d7c884dc08900be619361e076fcac40ec", + "size_in_bytes": 385776 + }, + { + "_path": "include/xcb/xselinux.h", + "path_type": "hardlink", + "sha256": "448c417a42ba653941c67779cab38941202d2494668e0fe0cbf698c4e83451f8", + "size_in_bytes": 56622 + }, + { + "_path": "include/xcb/xtest.h", + "path_type": "hardlink", + "sha256": "9864ef03fc9f77e5bcf737aefc98b446af1f1c27c540aedd8ef68cc49b9bfe3d", + "size_in_bytes": 7589 + }, + { + "_path": "include/xcb/xv.h", + "path_type": "hardlink", + "sha256": "5e612c45d1bda49c4fda8b5d87c97bae9f5988421af3400444843f38fe3d2dd9", + "size_in_bytes": 58022 + }, + { + "_path": "include/xcb/xvmc.h", + "path_type": "hardlink", + "sha256": "5c85ffb29d0bf2eebaa6e66bcd003a8b72c023e6be003a99c9c0d16d6c9baadd", + "size_in_bytes": 24530 + }, + { + "_path": "lib/libxcb-composite.so", + "path_type": "softlink", + "sha256": "3ea6fe355f11fc3664581d1778b9bdf9dd5994d1f37acab8aaae581d8f39c23d", + "size_in_bytes": 17384 + }, + { + "_path": "lib/libxcb-composite.so.0", + "path_type": "softlink", + "sha256": "3ea6fe355f11fc3664581d1778b9bdf9dd5994d1f37acab8aaae581d8f39c23d", + "size_in_bytes": 17384 + }, + { + "_path": "lib/libxcb-composite.so.0.0.0", + "path_type": "hardlink", + "sha256": "3ea6fe355f11fc3664581d1778b9bdf9dd5994d1f37acab8aaae581d8f39c23d", + "size_in_bytes": 17384 + }, + { + "_path": "lib/libxcb-damage.so", + "path_type": "softlink", + "sha256": "4424461b4a11dee69efe66f325f3dd6a8cd01d40eca01679967e6b5c77efc37f", + "size_in_bytes": 16472 + }, + { + "_path": "lib/libxcb-damage.so.0", + "path_type": "softlink", + "sha256": "4424461b4a11dee69efe66f325f3dd6a8cd01d40eca01679967e6b5c77efc37f", + "size_in_bytes": 16472 + }, + { + "_path": "lib/libxcb-damage.so.0.0.0", + "path_type": "hardlink", + "sha256": "4424461b4a11dee69efe66f325f3dd6a8cd01d40eca01679967e6b5c77efc37f", + "size_in_bytes": 16472 + }, + { + "_path": "lib/libxcb-dbe.so", + "path_type": "softlink", + "sha256": "674576f978b2899ffdb58833660b786e2f8e47caa724888490ad736333fbbad9", + "size_in_bytes": 22320 + }, + { + "_path": "lib/libxcb-dbe.so.0", + "path_type": "softlink", + "sha256": "674576f978b2899ffdb58833660b786e2f8e47caa724888490ad736333fbbad9", + "size_in_bytes": 22320 + }, + { + "_path": "lib/libxcb-dbe.so.0.0.0", + "path_type": "hardlink", + "sha256": "674576f978b2899ffdb58833660b786e2f8e47caa724888490ad736333fbbad9", + "size_in_bytes": 22320 + }, + { + "_path": "lib/libxcb-dpms.so", + "path_type": "softlink", + "sha256": "c8119ddfe850e30f52e8c58ec7fa9b790f835ca77fe2b907df2f416a0a8af3f5", + "size_in_bytes": 17176 + }, + { + "_path": "lib/libxcb-dpms.so.0", + "path_type": "softlink", + "sha256": "c8119ddfe850e30f52e8c58ec7fa9b790f835ca77fe2b907df2f416a0a8af3f5", + "size_in_bytes": 17176 + }, + { + "_path": "lib/libxcb-dpms.so.0.0.0", + "path_type": "hardlink", + "sha256": "c8119ddfe850e30f52e8c58ec7fa9b790f835ca77fe2b907df2f416a0a8af3f5", + "size_in_bytes": 17176 + }, + { + "_path": "lib/libxcb-dri2.so", + "path_type": "softlink", + "sha256": "bc8e230af0f350691555bdeaa5ac9f3455cb735595445bfda1fc0de33b0ed39b", + "size_in_bytes": 27912 + }, + { + "_path": "lib/libxcb-dri2.so.0", + "path_type": "softlink", + "sha256": "bc8e230af0f350691555bdeaa5ac9f3455cb735595445bfda1fc0de33b0ed39b", + "size_in_bytes": 27912 + }, + { + "_path": "lib/libxcb-dri2.so.0.0.0", + "path_type": "hardlink", + "sha256": "bc8e230af0f350691555bdeaa5ac9f3455cb735595445bfda1fc0de33b0ed39b", + "size_in_bytes": 27912 + }, + { + "_path": "lib/libxcb-dri3.so", + "path_type": "softlink", + "sha256": "e7010ddb2491770ae20d40464cd0d0a1abff04b99c5c8fc660d50fcb90460bcd", + "size_in_bytes": 27784 + }, + { + "_path": "lib/libxcb-dri3.so.0", + "path_type": "softlink", + "sha256": "e7010ddb2491770ae20d40464cd0d0a1abff04b99c5c8fc660d50fcb90460bcd", + "size_in_bytes": 27784 + }, + { + "_path": "lib/libxcb-dri3.so.0.1.0", + "path_type": "hardlink", + "sha256": "e7010ddb2491770ae20d40464cd0d0a1abff04b99c5c8fc660d50fcb90460bcd", + "size_in_bytes": 27784 + }, + { + "_path": "lib/libxcb-glx.so", + "path_type": "softlink", + "sha256": "d3f46066a978b974e39c0a914c4c80ea320f8f7ed0daec1286ecbc19e4d65dbc", + "size_in_bytes": 161320 + }, + { + "_path": "lib/libxcb-glx.so.0", + "path_type": "softlink", + "sha256": "d3f46066a978b974e39c0a914c4c80ea320f8f7ed0daec1286ecbc19e4d65dbc", + "size_in_bytes": 161320 + }, + { + "_path": "lib/libxcb-glx.so.0.0.0", + "path_type": "hardlink", + "sha256": "d3f46066a978b974e39c0a914c4c80ea320f8f7ed0daec1286ecbc19e4d65dbc", + "size_in_bytes": 161320 + }, + { + "_path": "lib/libxcb-present.so", + "path_type": "softlink", + "sha256": "95fcabdca901fb292cc303617fc1be71ae514ba8f6b36a566ee6497ba1936136", + "size_in_bytes": 21696 + }, + { + "_path": "lib/libxcb-present.so.0", + "path_type": "softlink", + "sha256": "95fcabdca901fb292cc303617fc1be71ae514ba8f6b36a566ee6497ba1936136", + "size_in_bytes": 21696 + }, + { + "_path": "lib/libxcb-present.so.0.0.0", + "path_type": "hardlink", + "sha256": "95fcabdca901fb292cc303617fc1be71ae514ba8f6b36a566ee6497ba1936136", + "size_in_bytes": 21696 + }, + { + "_path": "lib/libxcb-randr.so", + "path_type": "softlink", + "sha256": "4b64e6d54b348987153cdfb69abc6d3e48b2c3343d5b2b9bbe28d22ebc859297", + "size_in_bytes": 99432 + }, + { + "_path": "lib/libxcb-randr.so.0", + "path_type": "softlink", + "sha256": "4b64e6d54b348987153cdfb69abc6d3e48b2c3343d5b2b9bbe28d22ebc859297", + "size_in_bytes": 99432 + }, + { + "_path": "lib/libxcb-randr.so.0.1.0", + "path_type": "hardlink", + "sha256": "4b64e6d54b348987153cdfb69abc6d3e48b2c3343d5b2b9bbe28d22ebc859297", + "size_in_bytes": 99432 + }, + { + "_path": "lib/libxcb-record.so", + "path_type": "softlink", + "sha256": "058797d10f8b27dd9b7edc73177d74c2542f17e8252f35a6907b65f5ebe48159", + "size_in_bytes": 27928 + }, + { + "_path": "lib/libxcb-record.so.0", + "path_type": "softlink", + "sha256": "058797d10f8b27dd9b7edc73177d74c2542f17e8252f35a6907b65f5ebe48159", + "size_in_bytes": 27928 + }, + { + "_path": "lib/libxcb-record.so.0.0.0", + "path_type": "hardlink", + "sha256": "058797d10f8b27dd9b7edc73177d74c2542f17e8252f35a6907b65f5ebe48159", + "size_in_bytes": 27928 + }, + { + "_path": "lib/libxcb-render.so", + "path_type": "softlink", + "sha256": "b7b7ea3ef5738505feb64177135cd13045ed3e3cf766c520b4cc9264201efd51", + "size_in_bytes": 76816 + }, + { + "_path": "lib/libxcb-render.so.0", + "path_type": "softlink", + "sha256": "b7b7ea3ef5738505feb64177135cd13045ed3e3cf766c520b4cc9264201efd51", + "size_in_bytes": 76816 + }, + { + "_path": "lib/libxcb-render.so.0.0.0", + "path_type": "hardlink", + "sha256": "b7b7ea3ef5738505feb64177135cd13045ed3e3cf766c520b4cc9264201efd51", + "size_in_bytes": 76816 + }, + { + "_path": "lib/libxcb-res.so", + "path_type": "softlink", + "sha256": "f8872c5db2a836ce950dfa56b529599c9335ce07dabba9d3cc8e5765cfc439a5", + "size_in_bytes": 23112 + }, + { + "_path": "lib/libxcb-res.so.0", + "path_type": "softlink", + "sha256": "f8872c5db2a836ce950dfa56b529599c9335ce07dabba9d3cc8e5765cfc439a5", + "size_in_bytes": 23112 + }, + { + "_path": "lib/libxcb-res.so.0.0.0", + "path_type": "hardlink", + "sha256": "f8872c5db2a836ce950dfa56b529599c9335ce07dabba9d3cc8e5765cfc439a5", + "size_in_bytes": 23112 + }, + { + "_path": "lib/libxcb-screensaver.so", + "path_type": "softlink", + "sha256": "226436cdbef3467259d4794a210a6509c3e088c88a2640c977dd714de5cdbfa2", + "size_in_bytes": 25600 + }, + { + "_path": "lib/libxcb-screensaver.so.0", + "path_type": "softlink", + "sha256": "226436cdbef3467259d4794a210a6509c3e088c88a2640c977dd714de5cdbfa2", + "size_in_bytes": 25600 + }, + { + "_path": "lib/libxcb-screensaver.so.0.0.0", + "path_type": "hardlink", + "sha256": "226436cdbef3467259d4794a210a6509c3e088c88a2640c977dd714de5cdbfa2", + "size_in_bytes": 25600 + }, + { + "_path": "lib/libxcb-shape.so", + "path_type": "softlink", + "sha256": "0b287693d2be30296491a82139226fb613cae6db704316d55c227ef4375529da", + "size_in_bytes": 22000 + }, + { + "_path": "lib/libxcb-shape.so.0", + "path_type": "softlink", + "sha256": "0b287693d2be30296491a82139226fb613cae6db704316d55c227ef4375529da", + "size_in_bytes": 22000 + }, + { + "_path": "lib/libxcb-shape.so.0.0.0", + "path_type": "hardlink", + "sha256": "0b287693d2be30296491a82139226fb613cae6db704316d55c227ef4375529da", + "size_in_bytes": 22000 + }, + { + "_path": "lib/libxcb-shm.so", + "path_type": "softlink", + "sha256": "7ded2738cf2f1c726c47c8d96d771785790e5620ebab1c554ec59810a1b90365", + "size_in_bytes": 17192 + }, + { + "_path": "lib/libxcb-shm.so.0", + "path_type": "softlink", + "sha256": "7ded2738cf2f1c726c47c8d96d771785790e5620ebab1c554ec59810a1b90365", + "size_in_bytes": 17192 + }, + { + "_path": "lib/libxcb-shm.so.0.0.0", + "path_type": "hardlink", + "sha256": "7ded2738cf2f1c726c47c8d96d771785790e5620ebab1c554ec59810a1b90365", + "size_in_bytes": 17192 + }, + { + "_path": "lib/libxcb-sync.so", + "path_type": "softlink", + "sha256": "00d488784854014c3de009cf2caad772b863854b3da8973d4a414c340f6a80c7", + "size_in_bytes": 42400 + }, + { + "_path": "lib/libxcb-sync.so.1", + "path_type": "softlink", + "sha256": "00d488784854014c3de009cf2caad772b863854b3da8973d4a414c340f6a80c7", + "size_in_bytes": 42400 + }, + { + "_path": "lib/libxcb-sync.so.1.0.0", + "path_type": "hardlink", + "sha256": "00d488784854014c3de009cf2caad772b863854b3da8973d4a414c340f6a80c7", + "size_in_bytes": 42400 + }, + { + "_path": "lib/libxcb-xf86dri.so", + "path_type": "softlink", + "sha256": "083c34d29bb492632fd163c31112803cd17236a2a80253b0bf60cb89012e7c54", + "size_in_bytes": 23824 + }, + { + "_path": "lib/libxcb-xf86dri.so.0", + "path_type": "softlink", + "sha256": "083c34d29bb492632fd163c31112803cd17236a2a80253b0bf60cb89012e7c54", + "size_in_bytes": 23824 + }, + { + "_path": "lib/libxcb-xf86dri.so.0.0.0", + "path_type": "hardlink", + "sha256": "083c34d29bb492632fd163c31112803cd17236a2a80253b0bf60cb89012e7c54", + "size_in_bytes": 23824 + }, + { + "_path": "lib/libxcb-xfixes.so", + "path_type": "softlink", + "sha256": "fa22e4e25dc8923697c2f9a4b7a2e6e420090cf2d7f0b6d8494b666df564ef06", + "size_in_bytes": 49632 + }, + { + "_path": "lib/libxcb-xfixes.so.0", + "path_type": "softlink", + "sha256": "fa22e4e25dc8923697c2f9a4b7a2e6e420090cf2d7f0b6d8494b666df564ef06", + "size_in_bytes": 49632 + }, + { + "_path": "lib/libxcb-xfixes.so.0.0.0", + "path_type": "hardlink", + "sha256": "fa22e4e25dc8923697c2f9a4b7a2e6e420090cf2d7f0b6d8494b666df564ef06", + "size_in_bytes": 49632 + }, + { + "_path": "lib/libxcb-xinerama.so", + "path_type": "softlink", + "sha256": "661679dfd146cbba5d2507c61b691455a7ba1dcde62e5ed016c2cd48077cb07a", + "size_in_bytes": 17304 + }, + { + "_path": "lib/libxcb-xinerama.so.0", + "path_type": "softlink", + "sha256": "661679dfd146cbba5d2507c61b691455a7ba1dcde62e5ed016c2cd48077cb07a", + "size_in_bytes": 17304 + }, + { + "_path": "lib/libxcb-xinerama.so.0.0.0", + "path_type": "hardlink", + "sha256": "661679dfd146cbba5d2507c61b691455a7ba1dcde62e5ed016c2cd48077cb07a", + "size_in_bytes": 17304 + }, + { + "_path": "lib/libxcb-xinput.so", + "path_type": "softlink", + "sha256": "85e651c4ab531237b48feadc3ba13c9cc076cf3dc50c6d070413a381c5a9f1f7", + "size_in_bytes": 201736 + }, + { + "_path": "lib/libxcb-xinput.so.0", + "path_type": "softlink", + "sha256": "85e651c4ab531237b48feadc3ba13c9cc076cf3dc50c6d070413a381c5a9f1f7", + "size_in_bytes": 201736 + }, + { + "_path": "lib/libxcb-xinput.so.0.1.0", + "path_type": "hardlink", + "sha256": "85e651c4ab531237b48feadc3ba13c9cc076cf3dc50c6d070413a381c5a9f1f7", + "size_in_bytes": 201736 + }, + { + "_path": "lib/libxcb-xkb.so", + "path_type": "softlink", + "sha256": "5b676f3827de9acddd1a912384a00cc71f6e8ed1d0c5c3667204368f7fde8df7", + "size_in_bytes": 162496 + }, + { + "_path": "lib/libxcb-xkb.so.1", + "path_type": "softlink", + "sha256": "5b676f3827de9acddd1a912384a00cc71f6e8ed1d0c5c3667204368f7fde8df7", + "size_in_bytes": 162496 + }, + { + "_path": "lib/libxcb-xkb.so.1.0.0", + "path_type": "hardlink", + "sha256": "5b676f3827de9acddd1a912384a00cc71f6e8ed1d0c5c3667204368f7fde8df7", + "size_in_bytes": 162496 + }, + { + "_path": "lib/libxcb-xlib.so.0", + "path_type": "softlink", + "sha256": "550edadb0d61bf9dc22cb3ee59277d5ebbf7d8a2efa42f87b9811fcc0bb32ad3", + "size_in_bytes": 15080 + }, + { + "_path": "lib/libxcb-xlib.so.0.0.0", + "path_type": "hardlink", + "sha256": "550edadb0d61bf9dc22cb3ee59277d5ebbf7d8a2efa42f87b9811fcc0bb32ad3", + "size_in_bytes": 15080 + }, + { + "_path": "lib/libxcb-xtest.so", + "path_type": "softlink", + "sha256": "998382fc83d52984663ba69ded41ab055aab42c0071c59b47d6a2db418fd4d46", + "size_in_bytes": 16288 + }, + { + "_path": "lib/libxcb-xtest.so.0", + "path_type": "softlink", + "sha256": "998382fc83d52984663ba69ded41ab055aab42c0071c59b47d6a2db418fd4d46", + "size_in_bytes": 16288 + }, + { + "_path": "lib/libxcb-xtest.so.0.0.0", + "path_type": "hardlink", + "sha256": "998382fc83d52984663ba69ded41ab055aab42c0071c59b47d6a2db418fd4d46", + "size_in_bytes": 16288 + }, + { + "_path": "lib/libxcb-xv.so", + "path_type": "softlink", + "sha256": "b24d48478f026bc79e00078ff38320bcf8f3c4ea29d3f48f30faca7395ad42b5", + "size_in_bytes": 43440 + }, + { + "_path": "lib/libxcb-xv.so.0", + "path_type": "softlink", + "sha256": "b24d48478f026bc79e00078ff38320bcf8f3c4ea29d3f48f30faca7395ad42b5", + "size_in_bytes": 43440 + }, + { + "_path": "lib/libxcb-xv.so.0.0.0", + "path_type": "hardlink", + "sha256": "b24d48478f026bc79e00078ff38320bcf8f3c4ea29d3f48f30faca7395ad42b5", + "size_in_bytes": 43440 + }, + { + "_path": "lib/libxcb-xvmc.so", + "path_type": "softlink", + "sha256": "55c6b99299d7ef2200c28e6b3e836fedde66912055ae23ddd3cee9fb8fa6de56", + "size_in_bytes": 23176 + }, + { + "_path": "lib/libxcb-xvmc.so.0", + "path_type": "softlink", + "sha256": "55c6b99299d7ef2200c28e6b3e836fedde66912055ae23ddd3cee9fb8fa6de56", + "size_in_bytes": 23176 + }, + { + "_path": "lib/libxcb-xvmc.so.0.0.0", + "path_type": "hardlink", + "sha256": "55c6b99299d7ef2200c28e6b3e836fedde66912055ae23ddd3cee9fb8fa6de56", + "size_in_bytes": 23176 + }, + { + "_path": "lib/libxcb.so", + "path_type": "softlink", + "sha256": "1829db06915fa25760d65e99b9224bcb7b29760d36677dc09c6a8ec16957c67e", + "size_in_bytes": 228800 + }, + { + "_path": "lib/libxcb.so.1", + "path_type": "softlink", + "sha256": "1829db06915fa25760d65e99b9224bcb7b29760d36677dc09c6a8ec16957c67e", + "size_in_bytes": 228800 + }, + { + "_path": "lib/libxcb.so.1.1.0", + "path_type": "hardlink", + "sha256": "1829db06915fa25760d65e99b9224bcb7b29760d36677dc09c6a8ec16957c67e", + "size_in_bytes": 228800 + }, + { + "_path": "lib/pkgconfig/xcb-composite.pc", + "file_mode": "text", + "path_type": "hardlink", + "prefix_placeholder": "/croot/libxcb_1746022161355/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_", + "sha256": "392617736c36bfb04c216404910e13a3f71c1e6a2c48147f76f14eb1f0ba34e6", + "size_in_bytes": 505 + }, + { + "_path": "lib/pkgconfig/xcb-damage.pc", + "file_mode": "text", + "path_type": "hardlink", + "prefix_placeholder": "/croot/libxcb_1746022161355/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_", + "sha256": "61a8f7c5570dafdd83147b8873a375b2e66f4bad3bcd8796799ed2d34815264c", + "size_in_bytes": 496 + }, + { + "_path": "lib/pkgconfig/xcb-dbe.pc", + "file_mode": "text", + "path_type": "hardlink", + "prefix_placeholder": "/croot/libxcb_1746022161355/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_", + "sha256": "158d46272102d561bb35806b13bb9e6821b2cca1ddbbd704a78f9b989fc4cd8a", + "size_in_bytes": 486 + }, + { + "_path": "lib/pkgconfig/xcb-dpms.pc", + "file_mode": "text", + "path_type": "hardlink", + "prefix_placeholder": "/croot/libxcb_1746022161355/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_", + "sha256": "4543c474a991cb876c7ddb2edbcd245233e78e8da59bfd107f2ed963fcc74127", + "size_in_bytes": 479 + }, + { + "_path": "lib/pkgconfig/xcb-dri2.pc", + "file_mode": "text", + "path_type": "hardlink", + "prefix_placeholder": "/croot/libxcb_1746022161355/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_", + "sha256": "9fe8b646d38e60a95a12f703d187a552735782e41e3cc76541f02e352ebf0b33", + "size_in_bytes": 479 + }, + { + "_path": "lib/pkgconfig/xcb-dri3.pc", + "file_mode": "text", + "path_type": "hardlink", + "prefix_placeholder": "/croot/libxcb_1746022161355/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_", + "sha256": "05e53632ace30b0bba860cfe6247cd477938686d53bdb3393be97486532c8260", + "size_in_bytes": 479 + }, + { + "_path": "lib/pkgconfig/xcb-glx.pc", + "file_mode": "text", + "path_type": "hardlink", + "prefix_placeholder": "/croot/libxcb_1746022161355/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_", + "sha256": "20be637b478c9c36c1764da2929111baa9bb5583ef954ce0852b02274b83bea8", + "size_in_bytes": 476 + }, + { + "_path": "lib/pkgconfig/xcb-present.pc", + "file_mode": "text", + "path_type": "hardlink", + "prefix_placeholder": "/croot/libxcb_1746022161355/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_", + "sha256": "3c66e22264bf0d7eee239be9d602956cb230394ab0e35ad41e7d83a2b840a195", + "size_in_bytes": 527 + }, + { + "_path": "lib/pkgconfig/xcb-randr.pc", + "file_mode": "text", + "path_type": "hardlink", + "prefix_placeholder": "/croot/libxcb_1746022161355/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_", + "sha256": "0dd2b23f16efa52fd8fc360d03190da2162b7033fb5ef44075b96913ad7e7559", + "size_in_bytes": 493 + }, + { + "_path": "lib/pkgconfig/xcb-record.pc", + "file_mode": "text", + "path_type": "hardlink", + "prefix_placeholder": "/croot/libxcb_1746022161355/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_", + "sha256": "c1fc6da33e42dc7c5f8fa3a052a58f045cef613b56e5c4ba20194caedb19ddc9", + "size_in_bytes": 485 + }, + { + "_path": "lib/pkgconfig/xcb-render.pc", + "file_mode": "text", + "path_type": "hardlink", + "prefix_placeholder": "/croot/libxcb_1746022161355/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_", + "sha256": "629c3d1799397ddf1025f9e7a3bd946d5123ea510e48096a588787d75e90ebf6", + "size_in_bytes": 485 + }, + { + "_path": "lib/pkgconfig/xcb-res.pc", + "file_mode": "text", + "path_type": "hardlink", + "prefix_placeholder": "/croot/libxcb_1746022161355/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_", + "sha256": "46782bd54c5668e9157fbaada2c50f39808d08c8a9f9a27b70f66396ea572fbb", + "size_in_bytes": 483 + }, + { + "_path": "lib/pkgconfig/xcb-screensaver.pc", + "file_mode": "text", + "path_type": "hardlink", + "prefix_placeholder": "/croot/libxcb_1746022161355/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_", + "sha256": "cae42767c334c1793d95d68df0c4e9cd6ba7f899652701fa9ed55be4268a9de1", + "size_in_bytes": 500 + }, + { + "_path": "lib/pkgconfig/xcb-shape.pc", + "file_mode": "text", + "path_type": "hardlink", + "prefix_placeholder": "/croot/libxcb_1746022161355/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_", + "sha256": "a5ccf172f64cee9a823e8b111251bbba912dac90e2416852ff0ad16197d17bfc", + "size_in_bytes": 482 + }, + { + "_path": "lib/pkgconfig/xcb-shm.pc", + "file_mode": "text", + "path_type": "hardlink", + "prefix_placeholder": "/croot/libxcb_1746022161355/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_", + "sha256": "0862d1554b125d19ad653c58d019a1dfca3c8ca084f6c56857167240360f5f5b", + "size_in_bytes": 476 + }, + { + "_path": "lib/pkgconfig/xcb-sync.pc", + "file_mode": "text", + "path_type": "hardlink", + "prefix_placeholder": "/croot/libxcb_1746022161355/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_", + "sha256": "b99b3603464217884bbeba73cfcb94bc6f0aa03974d8c519c2dd0649c3f37383", + "size_in_bytes": 479 + }, + { + "_path": "lib/pkgconfig/xcb-xf86dri.pc", + "file_mode": "text", + "path_type": "hardlink", + "prefix_placeholder": "/croot/libxcb_1746022161355/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_", + "sha256": "a807cca9282a9e5f07b9630901cb7f19457e88958ba34c93a991d8e86e89f346", + "size_in_bytes": 496 + }, + { + "_path": "lib/pkgconfig/xcb-xfixes.pc", + "file_mode": "text", + "path_type": "hardlink", + "prefix_placeholder": "/croot/libxcb_1746022161355/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_", + "sha256": "669435a533dbe30b510ec0b06bce813ca79263235bff639ee3a7f2891986ca08", + "size_in_bytes": 506 + }, + { + "_path": "lib/pkgconfig/xcb-xinerama.pc", + "file_mode": "text", + "path_type": "hardlink", + "prefix_placeholder": "/croot/libxcb_1746022161355/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_", + "sha256": "9018d4a33bcd34aa3252beae1feba57484f659dac7bc87b39bdcf7f6697560f3", + "size_in_bytes": 491 + }, + { + "_path": "lib/pkgconfig/xcb-xinput.pc", + "file_mode": "text", + "path_type": "hardlink", + "prefix_placeholder": "/croot/libxcb_1746022161355/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_", + "sha256": "193f8d2828f2f9d801849afb0724ded452969e2b26ceccb4de84fe3233618010", + "size_in_bytes": 511 + }, + { + "_path": "lib/pkgconfig/xcb-xkb.pc", + "file_mode": "text", + "path_type": "hardlink", + "prefix_placeholder": "/croot/libxcb_1746022161355/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_", + "sha256": "46bae313161719ee817b9b5f53ec4726af472c597a1365fec45214fde4ce177a", + "size_in_bytes": 496 + }, + { + "_path": "lib/pkgconfig/xcb-xtest.pc", + "file_mode": "text", + "path_type": "hardlink", + "prefix_placeholder": "/croot/libxcb_1746022161355/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_", + "sha256": "265cda1d94bb6b116643af0351fc9e72645cf5ec413be8b3de999c052ef3d246", + "size_in_bytes": 482 + }, + { + "_path": "lib/pkgconfig/xcb-xv.pc", + "file_mode": "text", + "path_type": "hardlink", + "prefix_placeholder": "/croot/libxcb_1746022161355/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_", + "sha256": "04d4e7aeab299d7860e95603e505133db8a8dcbd0cc6c4429fa4201604e47325", + "size_in_bytes": 481 + }, + { + "_path": "lib/pkgconfig/xcb-xvmc.pc", + "file_mode": "text", + "path_type": "hardlink", + "prefix_placeholder": "/croot/libxcb_1746022161355/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_", + "sha256": "7ef8be5864a07233ad970698eeef08d20f9b513f5a339f1fe573023f9467264b", + "size_in_bytes": 486 + }, + { + "_path": "lib/pkgconfig/xcb.pc", + "file_mode": "text", + "path_type": "hardlink", + "prefix_placeholder": "/croot/libxcb_1746022161355/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_", + "sha256": "ef77d897b119da593048c8a664b51dadaceb90c84700549d7635122bd19ba439", + "size_in_bytes": 526 + } + ], + "paths_version": 1 +} \ No newline at end of file diff --git a/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/info/recipe/bld.bat b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/info/recipe/bld.bat new file mode 100644 index 0000000000000000000000000000000000000000..d2d47f89334c4c1d29a7e903e3f6fa8262936428 --- /dev/null +++ b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/info/recipe/bld.bat @@ -0,0 +1,18 @@ +:: Trailing semicolon in this variable as set by current (2017/01) +:: conda-build breaks us. Manual fix: +set "MSYS2_ARG_CONV_EXCL=/AI;/AL;/OUT;/out" +:: Delegate to the Unixy script. We need to translate the key path variables +:: to be Unix-y rather than Windows-y, though. +set "saved_recipe_dir=%RECIPE_DIR%" +FOR /F "delims=" %%i IN ('cygpath.exe -u -p "%PATH%"') DO set "PATH_OVERRIDE=%%i" +FOR /F "delims=" %%i IN ('cygpath.exe -m "%BUILD_PREFIX%"') DO set "BUILD_PREFIX_M=%%i" +FOR /F "delims=" %%i IN ('cygpath.exe -m "%LIBRARY_PREFIX%"') DO set "LIBRARY_PREFIX_M=%%i" +FOR /F "delims=" %%i IN ('cygpath.exe -u "%LIBRARY_PREFIX%"') DO set "LIBRARY_PREFIX_U=%%i" +FOR /F "delims=" %%i IN ('cygpath.exe -u "%PREFIX%"') DO set "PREFIX=%%i" +FOR /F "delims=" %%i IN ('cygpath.exe -u "%PYTHON%"') DO set "PYTHON=%%i" +FOR /F "delims=" %%i IN ('cygpath.exe -u "%RECIPE_DIR%"') DO set "RECIPE_DIR=%%i" +FOR /F "delims=" %%i IN ('cygpath.exe -u "%SP_DIR%"') DO set "SP_DIR=%%i" +FOR /F "delims=" %%i IN ('cygpath.exe -u "%SRC_DIR%"') DO set "SRC_DIR=%%i" +FOR /F "delims=" %%i IN ('cygpath.exe -u "%STDLIB_DIR%"') DO set "STDLIB_DIR=%%i" +bash -x %saved_recipe_dir%\build.sh +if errorlevel 1 exit 1 diff --git a/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/info/recipe/build.sh b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/info/recipe/build.sh new file mode 100644 index 0000000000000000000000000000000000000000..3393445e9a3e0aa44b263b76a921bb4cdbbfecf3 --- /dev/null +++ b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/info/recipe/build.sh @@ -0,0 +1,130 @@ +#! /bin/bash + +set -e +set -x +IFS=$' \t\n' # workaround for conda 4.2.13+toolchain bug + +# Adopt a Unix-friendly path if we're on Windows (see bld.bat). +[ -n "$PATH_OVERRIDE" ] && export PATH="$PATH_OVERRIDE" + +# On Windows we want $LIBRARY_PREFIX in both "mixed" (C:/Conda/...) and Unix +# (/c/Conda) forms, but Unix form is often "/" which can cause problems. +if [ -n "$LIBRARY_PREFIX_M" ] ; then + mprefix="$LIBRARY_PREFIX_M" + if [ "$LIBRARY_PREFIX_U" = / ] ; then + uprefix="" + else + uprefix="$LIBRARY_PREFIX_U" + fi +else + mprefix="$PREFIX" + uprefix="$PREFIX" +fi + +# On Windows we need to regenerate the configure scripts. +if [ -n "$CYGWIN_PREFIX" ] ; then + export ACLOCAL=aclocal-$am_version + export AUTOMAKE=automake-$am_version + autoreconf_args=( + --force + --install + -I "$mprefix/share/aclocal" + -I "$BUILD_PREFIX_M/Library/usr/share/aclocal" + ) + autoreconf "${autoreconf_args[@]}" + + # And we need to add the search path that lets libtool find the + # msys2 stub libraries for ws2_32. + # Find MSYS2 libraries directory using a more reliable approach + platlibs="" + for potential_path in \ + "$(dirname $($CC --print-prog-name=ld))/../sysroot/usr/lib" \ + "$(dirname $($CC --print-prog-name=ld))/../x86_64-w64-mingw32/lib" \ + "$BUILD_PREFIX_M/Library/mingw-w64/lib" \ + "$BUILD_PREFIX_M/Library/usr/lib" \ + "$BUILD_PREFIX_M/Library/x86_64-w64-mingw32/sysroot/usr/lib"; do + if [ -f "$(cygpath -u "$potential_path")/libws2_32.a" ]; then + platlibs=$(cygpath -u "$potential_path") + break + fi + done + + if [ -f "$platlibs/libws2_32.a" ]; then + export LDFLAGS="$LDFLAGS -L$platlibs" + else + echo "Warning: Could not find libws2_32.a" + fi + export DLLTOOL=x86_64-w64-mingw32-dlltool.exe + export NM=x86_64-w64-mingw32-nm.exe + export OBJDUMP=x86_64-w64-mingw32-objdump.exe +else + # for other platforms we just need to reconf to get the correct achitecture + echo libtoolize + libtoolize + echo aclocal -I $PREFIX/share/aclocal -I $BUILD_PREFIX/share/aclocal + aclocal -I $PREFIX/share/aclocal -I $BUILD_PREFIX/share/aclocal + echo autoheader + autoheader + echo autoconf + autoconf + echo automake --force-missing --add-missing --include-deps + automake --force-missing --add-missing --include-deps + export CONFIG_FLAGS="--build=${BUILD}" +fi + +export PKG_CONFIG_LIBDIR=$uprefix/lib/pkgconfig:$uprefix/share/pkgconfig +configure_args=( + $CONFIG_FLAGS + --prefix=$mprefix + --disable-static + --disable-dependency-tracking + --disable-selective-werror + --disable-silent-rules +) + +./configure "${configure_args[@]}" +make -j$CPU_COUNT +make install +if [[ "${CONDA_BUILD_CROSS_COMPILATION}" != "1" ]]; then +make check +fi + +rm -rf $uprefix/share/man $uprefix/share/doc/${PKG_NAME#xorg-} + +# Remove any new Libtool files we may have installed. It is intended that +# conda-build will eventually do this automatically. +find $uprefix/. -name '*.la' -delete + +if [ "$(uname)" == "Linux" ]; then + # Build a dummy libxcb-xlib. This library used to exist, but was + # deprecated. + # The problem is that on older systems where it still exists + # (e.g SUSE 11), we may end up mixing the system's libxcb-xlib with the + # libX11 and libxcb provided by conda. + # This can cause missing symbols when trying to run a binary which links + # to libxcb: + # + # /usr/lib64/libxcb-xlib.so.0: undefined symbol: _xcb_unlock_io + # + # In this case _xcb_unlock_io is present on /usr/lib64/libxcb.so.1, but + # there is no such function anymore on the version we built here. + # Packaging a dummy library solves libxcb-xlib this problem as the only + # libxcb-xlib user is libX11: + # + # https://lists.freedesktop.org/archives/xcb/2009-April/004489.html + # https://lists.freedesktop.org/archives/xcb/2009-April/004492.html + # + # PLEASE NOTE that if you are facing this problem you also need to install + # conda-forge's libx11, otherwise you will get something like: + # + # /usr/lib64/libX11.so.6: undefined symbol: xcb_xlib_lock + cd "$PREFIX/lib" + echo ' ' | $CC --shared -Wl,-soname,libxcb-xlib.so.0 -o libxcb-xlib.so.0.0.0 + ln -s libxcb-xlib.so.0.0.0 libxcb-xlib.so.0 +fi + +# See https://github.com/conda-forge/libxcb-feedstock/issues/21 . For some +# reason, the osx-arm64 install ends up containing inappropriate __pycache__ +# files in a site-packages subdirectory. Not at all clear why it only seems +# to happen on that one platform, but no need to be ultra-precise: +rm -rfv $PREFIX/lib/python*/site-packages/xcbgen diff --git a/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/info/recipe/conda_build_config.yaml b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/info/recipe/conda_build_config.yaml new file mode 100644 index 0000000000000000000000000000000000000000..333a15b4071f1c1a6c6b4aa9af6f438238f7ee04 --- /dev/null +++ b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/info/recipe/conda_build_config.yaml @@ -0,0 +1,108 @@ +VERBOSE_AT: V=1 +VERBOSE_CM: VERBOSE=1 +am_version: '1.15' +blas_impl: openblas +boost: '1.82' +boost_cpp: '1.82' +bzip2: '1.0' +c_compiler: gcc +c_compiler_version: 11.2.0 +cairo: '1.16' +cgo_compiler: go-cgo +cgo_compiler_version: '1.21' +channel_targets: defaults +clang_variant: clang +cpu_optimization_target: nocona +cran_mirror: https://cran.r-project.org +cuda_compiler: cuda-nvcc +cuda_compiler_version: '12.4' +cxx_compiler: gxx +cxx_compiler_version: 11.2.0 +cyrus_sasl: 2.1.28 +dbus: '1' +expat: '2' +extend_keys: +- ignore_version +- pin_run_as_build +- extend_keys +- ignore_build_only_deps +fontconfig: '2.14' +fortran_compiler: gfortran +fortran_compiler_version: 11.2.0 +freetype: '2.10' +g2clib: '1.6' +geos: 3.10.6 +giflib: '5' +glib: '2' +gmp: '6.3' +gnu: 2.12.2 +go_compiler: go-nocgo +go_compiler_version: '1.21' +gst_plugins_base: '1.24' +gstreamer: '1.24' +harfbuzz: '10' +hdf4: '4.2' +hdf5: 1.14.5 +hdfeos2: '2.20' +hdfeos5: '5.1' +icu: '73' +ignore_build_only_deps: +- python +- numpy +jpeg: '9' +libabseil: '20250127.0' +libcurl: 8.1.1 +libdap4: '3.19' +libffi: '3.4' +libgd: 2.3.3 +libgdal: 3.6.2 +libgrpc: 1.71.0 +libgsasl: '1.10' +libkml: '1.3' +libnetcdf: '4.8' +libpng: '1.6' +libprotobuf: 5.29.3 +libtiff: '4.7' +libwebp: 1.3.2 +libxml2: '2.13' +libxslt: '1.1' +llvm_variant: llvm +lua: '5' +lzo: '2' +mkl: 2023.* +mpfr: '4' +numpy: '2.0' +openblas: 0.3.21 +openjpeg: '2.3' +openssl: '3.0' +perl: '5.38' +pin_run_as_build: + python: + max_pin: x.x + min_pin: x.x + r-base: + max_pin: x.x + min_pin: x.x + libboost: + max_pin: x.x.x +pixman: '0.40' +proj: 9.3.1 +proj4: 5.2.0 +python: '3.9' +python_impl: cpython +python_implementation: cpython +r_base: 4.3.1 +r_implementation: r-base +r_version: 4.3.1 +readline: '8.1' +rust_compiler: rust +rust_compiler_version: 1.82.0 +sqlite: '3' +target_platform: linux-64 +tk: '8.6' +xz: '5' +zip_keys: +- - python + - numpy +zlib: '1.2' +zstd: 1.5.2 diff --git a/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/info/recipe/meta.yaml b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/info/recipe/meta.yaml new file mode 100644 index 0000000000000000000000000000000000000000..ded8d024a32e201da9d341d1fbe4a302cacebe3d --- /dev/null +++ b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/info/recipe/meta.yaml @@ -0,0 +1,125 @@ +# This file created by conda-build 24.1.2 +# meta.yaml template originally from: +# /feedstock/recipe, last modified Wed Apr 30 14:09:16 2025 +# ------------------------------------------------ + +package: + name: libxcb + version: 1.17.0 +source: + patches: null + sha256: 2c69287424c9e2128cb47ffe92171e10417041ec2963bceafb65cb3fcf8f0b85 + url: https://xorg.freedesktop.org/archive/individual/lib/libxcb-1.17.0.tar.gz +build: + detect_binary_files_with_prefix: true + number: '0' + run_exports: + - libxcb >=1.17.0,<2.0a0 + string: h9b100fa_0 +requirements: + build: + - _libgcc_mutex 0.1 main + - _openmp_mutex 5.1 1_gnu + - _sysroot_linux-64_curr_repodata_hack 3 haa98f57_10 + - autoconf 2.71 pl5340h5eee18b_0 + - automake 1.16.5 pl5340h06a4308_1 + - binutils_impl_linux-64 2.40 h5293946_0 + - binutils_linux-64 2.40.0 hc2dff05_2 + - gcc_impl_linux-64 11.2.0 h1234567_1 + - gcc_linux-64 11.2.0 h5c386dc_2 + - gettext 0.21.0 hedfda30_2 + - gnuconfig 2021.05.24 hd3eb1b0_0 + - icu 73.1 h6a678d5_0 + - kernel-headers_linux-64 3.10.0 h57e8cba_10 + - ld_impl_linux-64 2.40 h12ee557_0 + - libgcc-devel_linux-64 11.2.0 h1234567_1 + - libgcc-ng 11.2.0 h1234567_1 + - libgomp 11.2.0 h1234567_1 + - libstdcxx-ng 11.2.0 h1234567_1 + - libtool 2.4.7 h6a678d5_0 + - libxml2 2.13.8 hfdd30dd_0 + - m4 1.4.18 h4e445db_0 + - make 4.2.1 h1bed415_1 + - ncurses 6.4 h6a678d5_0 + - perl 5.38.2 0_h5eee18b_perl5 + - pkg-config 0.29.2 h1bed415_8 + - sysroot_linux-64 2.17 h57e8cba_10 + - xz 5.6.4 h5eee18b_1 + - zlib 1.2.13 h5eee18b_1 + host: + - _libgcc_mutex 0.1 main + - _openmp_mutex 5.1 1_gnu + - bzip2 1.0.8 h5eee18b_6 + - ca-certificates 2025.2.25 h06a4308_0 + - expat 2.7.1 h6a678d5_0 + - ld_impl_linux-64 2.40 h12ee557_0 + - libffi 3.4.4 h6a678d5_1 + - libgcc-ng 11.2.0 h1234567_1 + - libgomp 11.2.0 h1234567_1 + - libmpdec 4.0.0 h5eee18b_0 + - libstdcxx-ng 11.2.0 h1234567_1 + - libuuid 1.41.5 h5eee18b_0 + - ncurses 6.4 h6a678d5_0 + - openssl 3.0.16 h5eee18b_0 + - pthread-stubs 0.3 h0ce48e5_1 + - python 3.13.2 hf623796_100_cp313 + - python_abi 3.13 0_cp313 + - readline 8.2 h5eee18b_0 + - sqlite 3.45.3 h5eee18b_0 + - tk 8.6.14 h39e8969_0 + - tzdata 2025a h04d1e81_0 + - xcb-proto 1.17.0 py313h9b100fa_2 + - xorg-libxau 1.0.12 h9b100fa_0 + - xorg-libxdmcp 1.1.5 h9b100fa_0 + - xorg-util-macros 1.19.0 h27cfd23_2 + - xorg-xorgproto 2024.1 h5eee18b_0 + - xz 5.6.4 h5eee18b_1 + - zlib 1.2.13 h5eee18b_1 + run: + - libgcc-ng >=11.2.0 + - pthread-stubs + - xorg-libxau >=1.0.12,<2.0a0 + - xorg-libxdmcp >=1.1.5,<2.0a0 +test: + commands: + - test -f $PREFIX/lib/libxcb.so + - test -f $PREFIX/lib/libxcb-composite.so + - test -f $PREFIX/lib/libxcb-damage.so + - test -f $PREFIX/lib/libxcb-dpms.so + - test -f $PREFIX/lib/libxcb-dri2.so + - test -f $PREFIX/lib/libxcb-glx.so + - test -f $PREFIX/lib/libxcb-present.so + - test -f $PREFIX/lib/libxcb-randr.so + - test -f $PREFIX/lib/libxcb-record.so + - test -f $PREFIX/lib/libxcb-res.so + - test -f $PREFIX/lib/libxcb-screensaver.so + - test -f $PREFIX/lib/libxcb-shape.so + - test -f $PREFIX/lib/libxcb-shm.so + - test -f $PREFIX/lib/libxcb-sync.so + - test -f $PREFIX/lib/libxcb-xf86dri.so + - test -f $PREFIX/lib/libxcb-xfixes.so + - test -f $PREFIX/lib/libxcb-xinerama.so + - test -f $PREFIX/lib/libxcb-xkb.so + - test -f $PREFIX/lib/libxcb-xtest.so + - test -f $PREFIX/lib/libxcb-xv.so + - test -f $PREFIX/lib/libxcb-xvmc.so + - test -f $PREFIX/lib/libxcb-dri3.so + - test -f $PREFIX/lib/libxcb-render.so + - test -f $PREFIX/lib/libxcb-xinput.so +about: + dev_url: https://gitlab.freedesktop.org/xorg/lib/libxcb + doc_url: https://xcb.freedesktop.org/XcbApi/ + home: https://xcb.freedesktop.org/ + license: MIT + license_family: MIT + license_file: COPYING + summary: This is the C-language Binding (XCB) package to the X Window System protocol +extra: + copy_test_source_files: true + final: true + flow_run_id: 27eff2a1-ad98-4509-9bd0-d44780c3a3ef + recipe-maintainers: + - ccordoba12 + - pkgw + remote_url: git@github.com:AnacondaRecipes/libxcb-feedstock.git + sha: 100919a1de05526a20cc14c55374715d562c7223 diff --git a/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/info/recipe/meta.yaml.template b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/info/recipe/meta.yaml.template new file mode 100644 index 0000000000000000000000000000000000000000..24e95cdafc19571b46306aff6f8ec7b128cdaa63 --- /dev/null +++ b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/info/recipe/meta.yaml.template @@ -0,0 +1,104 @@ +{% set xorg_name = "libxcb" %} +{% set xorg_category = "lib" %} +{% set name = "libxcb" %} +{% set version = "1.17.0" %} +{% set sha256 = "2c69287424c9e2128cb47ffe92171e10417041ec2963bceafb65cb3fcf8f0b85" %} + +package: + name: {{ name|lower }} + version: {{ version }} + +source: + url: https://xorg.freedesktop.org/archive/individual/{{ xorg_category }}/{{ xorg_name }}-{{ version }}.tar.gz + sha256: {{ sha256 }} + patches: + - windows.patch # [win] + +build: + number: 0 + # xorg-libxdmcp isn't available on Windows because its dependencies clash with m2/msys2 and mingw64/ucrt64 toolchains. + skip: true # [win] + detect_binary_files_with_prefix: true + run_exports: + - {{ pin_subpackage('libxcb', max_pin='x') }} + +requirements: + build: + - m2-patch # [win] + - m2-autoconf # [win] + - m2-automake{{ am_version }} # [win] + - m2-libtool # [win] + - pkg-config # [unix] + - m2-pkg-config # [win] + - gnuconfig # [unix] + - m2-base # [win] + - make # [unix] + - m2-make # [win] + - {{ compiler('c') }} # [unix] + - {{ compiler('m2w64_c') }} # [win] + - autoconf # [unix] + - automake # [unix] + - gettext # [unix] + - libtool # [unix] + - python # [build_platform != target_platform] + host: + - pthread-stubs + - xorg-libxau + - xorg-libxdmcp + - xorg-util-macros + - xcb-proto {{ version }} + - xorg-xorgproto + run: + - pthread-stubs + - xorg-libxau + - xorg-libxdmcp + +test: + commands: + {% set lib_idents = [ + "xcb", + "xcb-composite", + "xcb-damage", + "xcb-dpms", + "xcb-dri2", + "xcb-glx", + "xcb-present", + "xcb-randr", + "xcb-record", + "xcb-res", + "xcb-screensaver", + "xcb-shape", + "xcb-shm", + "xcb-sync", + "xcb-xf86dri", + "xcb-xfixes", + "xcb-xinerama", + "xcb-xkb", + "xcb-xtest", + "xcb-xv", + "xcb-xvmc", + ] %} + {% set lib_idents = lib_idents + ['xcb-dri3', 'xcb-render', 'xcb-xinput'] %} # [not win] + {% for lib_ident in lib_idents %} + - test -f $PREFIX/lib/lib{{ lib_ident }}.dylib # [osx] + - test -f $PREFIX/lib/lib{{ lib_ident }}.so # [linux] + {% endfor %} + + # Check downstream packages (if needed): + # gst-plugins-base, cairo, libxkbcommon, freeglut, qtbase, qtwebengine, + # nsight-compute, xcb-util-cursor, qt-webengine, pyside6, r-cairo, r-tkrplot, r-gdtools + + +about: + home: https://xcb.freedesktop.org/ + dev_url: https://gitlab.freedesktop.org/xorg/lib/libxcb + doc_url: https://xcb.freedesktop.org/XcbApi/ + license: MIT + license_family: MIT + license_file: COPYING + summary: "This is the C-language Binding (XCB) package to the X Window System protocol" + +extra: + recipe-maintainers: + - ccordoba12 + - pkgw diff --git a/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/info/recipe/python3.patch b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/info/recipe/python3.patch new file mode 100644 index 0000000000000000000000000000000000000000..a2e0992135b1e551f9c7f81e232426e8872e1700 --- /dev/null +++ b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/info/recipe/python3.patch @@ -0,0 +1,22 @@ +--- src/c_client.py.orig 2017-01-19 12:01:35.092979043 -0500 ++++ src/c_client.py 2017-01-19 12:02:31.000282059 -0500 +@@ -1930,14 +1930,14 @@ + # from the request size and divide that by the member size + return '(((R->length * 4) - sizeof('+ self.c_type + '))/'+'sizeof('+field.type.member.c_wiretype+'))' + else: +- # use the accessor to get the start of the list, then +- # compute the length of it by subtracting it from ++ # use the accessor to get the start of the list, then ++ # compute the length of it by subtracting it from + # the adress of the first byte after the end of the + # request +- after_end_of_request = '(((char*)R) + R->length * 4)' +- start_of_list = '%s(R)' % (field.c_accessor_name) ++ after_end_of_request = '(((char*)R) + R->length * 4)' ++ start_of_list = '%s(R)' % (field.c_accessor_name) + bytesize_of_list = '%s - (char*)(%s)' % (after_end_of_request, start_of_list) +- return '(%s) / sizeof(%s)' % (bytesize_of_list, field.type.member.c_wiretype) ++ return '(%s) / sizeof(%s)' % (bytesize_of_list, field.type.member.c_wiretype) + else: + raise Exception( + "lengthless lists with varsized members are not supported. Fieldname '%s'" diff --git a/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/info/recipe/windows-pythondir.patch b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/info/recipe/windows-pythondir.patch new file mode 100644 index 0000000000000000000000000000000000000000..8fede1f166108cef21f1c4bd58727766d407451b --- /dev/null +++ b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/info/recipe/windows-pythondir.patch @@ -0,0 +1,10 @@ +--- configure.ac.orig 2017-02-04 17:17:00.583752530 -0500 ++++ configure.ac 2017-02-04 17:17:54.347995984 -0500 +@@ -15,6 +15,7 @@ + fi + + AM_PATH_PYTHON([2.5]) ++pythondir="$(cd $PREFIX/Lib/site-packages && pwd -W)" + + xcbincludedir='${datadir}/xcb' + AC_SUBST(xcbincludedir) diff --git a/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/info/recipe/windows.patch b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/info/recipe/windows.patch new file mode 100644 index 0000000000000000000000000000000000000000..06b82dcaee75a266ce7d4e0305ee9beaa4a5a575 --- /dev/null +++ b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/info/recipe/windows.patch @@ -0,0 +1,52 @@ +diff --git a/configure.ac b/configure.ac +index 4e6f028..031a3bd 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -140,7 +140,7 @@ esac + have_win32="no" + lt_enable_auto_import="" + case $host_os in +-mingw*) ++mingw*|*msys*) + have_win32="yes" + lt_enable_auto_import="-Wl,--enable-auto-import" + ;; +@@ -212,7 +212,7 @@ esac + + dnl Link with winsock for socket functions on MinGW + case $host_os in +- *mingw*) ++ *mingw*|*msys*) + AC_CHECK_LIB([ws2_32],[main]) + ;; + *) +@@ -252,16 +252,14 @@ AC_ARG_WITH(serverside-support, AS_HELP_STRING([--with-serverside-support], [Bui + + AM_CONDITIONAL(XCB_SERVERSIDE_SUPPORT, test "x$XCB_SERVERSIDE_SUPPORT" = "xyes") + +-AC_CONFIG_FILES([ +-Makefile ++AC_CONFIG_FILES([Makefile + doc/Makefile + man/Makefile + src/Makefile + tests/Makefile + ]) + +-AC_CONFIG_FILES([ +-xcb.pc ++AC_CONFIG_FILES([xcb.pc + xcb-composite.pc + xcb-damage.pc + xcb-dbe.pc +@@ -292,8 +290,7 @@ xcb-xv.pc + xcb-xvmc.pc + ]) + +-AC_CONFIG_FILES([ +-doc/xcb.doxygen ++AC_CONFIG_FILES([doc/xcb.doxygen + ]) + + AC_OUTPUT + \ No newline at end of file diff --git a/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/info/repodata_record.json b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/info/repodata_record.json new file mode 100644 index 0000000000000000000000000000000000000000..e120d18b98e27f69b0b50d0a33180961b9dea3d7 --- /dev/null +++ b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/info/repodata_record.json @@ -0,0 +1,25 @@ +{ + "arch": "x86_64", + "build": "h9b100fa_0", + "build_number": 0, + "channel": "https://repo.anaconda.com/pkgs/main/linux-64/", + "constrains": [], + "depends": [ + "libgcc-ng >=11.2.0", + "pthread-stubs", + "xorg-libxau >=1.0.12,<2.0a0", + "xorg-libxdmcp >=1.1.5,<2.0a0" + ], + "fn": "libxcb-1.17.0-h9b100fa_0.conda", + "license": "MIT", + "license_family": "MIT", + "md5": "fdf0d380fa3809a301e2dbc0d5183883", + "name": "libxcb", + "platform": "linux", + "sha256": "f9cd1564fc83261ddba7496404f18143d4f8fda52e42c040005c1b1ad3e47f56", + "size": 440690, + "subdir": "linux-64", + "timestamp": 1746022211000, + "url": "https://repo.anaconda.com/pkgs/main/linux-64/libxcb-1.17.0-h9b100fa_0.conda", + "version": "1.17.0" +} \ No newline at end of file diff --git a/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/info/run_exports.json b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/info/run_exports.json new file mode 100644 index 0000000000000000000000000000000000000000..42dc51927818349d9740baa7ea3379b499757a5a --- /dev/null +++ b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/info/run_exports.json @@ -0,0 +1 @@ +{"weak": ["libxcb >=1.17.0,<2.0a0"]} \ No newline at end of file diff --git a/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/info/test/run_test.sh b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/info/test/run_test.sh new file mode 100644 index 0000000000000000000000000000000000000000..7a05afb1f41b39b66ab98265f7439a3d295d9bbc --- /dev/null +++ b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/info/test/run_test.sh @@ -0,0 +1,31 @@ + + +set -ex + + + +test -f $PREFIX/lib/libxcb.so +test -f $PREFIX/lib/libxcb-composite.so +test -f $PREFIX/lib/libxcb-damage.so +test -f $PREFIX/lib/libxcb-dpms.so +test -f $PREFIX/lib/libxcb-dri2.so +test -f $PREFIX/lib/libxcb-glx.so +test -f $PREFIX/lib/libxcb-present.so +test -f $PREFIX/lib/libxcb-randr.so +test -f $PREFIX/lib/libxcb-record.so +test -f $PREFIX/lib/libxcb-res.so +test -f $PREFIX/lib/libxcb-screensaver.so +test -f $PREFIX/lib/libxcb-shape.so +test -f $PREFIX/lib/libxcb-shm.so +test -f $PREFIX/lib/libxcb-sync.so +test -f $PREFIX/lib/libxcb-xf86dri.so +test -f $PREFIX/lib/libxcb-xfixes.so +test -f $PREFIX/lib/libxcb-xinerama.so +test -f $PREFIX/lib/libxcb-xkb.so +test -f $PREFIX/lib/libxcb-xtest.so +test -f $PREFIX/lib/libxcb-xv.so +test -f $PREFIX/lib/libxcb-xvmc.so +test -f $PREFIX/lib/libxcb-dri3.so +test -f $PREFIX/lib/libxcb-render.so +test -f $PREFIX/lib/libxcb-xinput.so +exit 0 diff --git a/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-composite.so b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-composite.so new file mode 100644 index 0000000000000000000000000000000000000000..20d5777f600d15a4861823a590360bb3c40fcd77 Binary files /dev/null and b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-composite.so differ diff --git a/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-composite.so.0 b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-composite.so.0 new file mode 100644 index 0000000000000000000000000000000000000000..20d5777f600d15a4861823a590360bb3c40fcd77 Binary files /dev/null and b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-composite.so.0 differ diff --git a/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-composite.so.0.0.0 b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-composite.so.0.0.0 new file mode 100644 index 0000000000000000000000000000000000000000..20d5777f600d15a4861823a590360bb3c40fcd77 Binary files /dev/null and b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-composite.so.0.0.0 differ diff --git a/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-damage.so b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-damage.so new file mode 100644 index 0000000000000000000000000000000000000000..de03f5464feb29a64096d5bfb54ffe77b4d374d0 Binary files /dev/null and b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-damage.so differ diff --git a/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-damage.so.0 b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-damage.so.0 new file mode 100644 index 0000000000000000000000000000000000000000..de03f5464feb29a64096d5bfb54ffe77b4d374d0 Binary files /dev/null and b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-damage.so.0 differ diff --git a/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-damage.so.0.0.0 b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-damage.so.0.0.0 new file mode 100644 index 0000000000000000000000000000000000000000..de03f5464feb29a64096d5bfb54ffe77b4d374d0 Binary files /dev/null and b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-damage.so.0.0.0 differ diff --git a/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-dbe.so b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-dbe.so new file mode 100644 index 0000000000000000000000000000000000000000..80afc29ad9c859c2aa1a746add2b0f61552d7eda Binary files /dev/null and b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-dbe.so differ diff --git a/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-dbe.so.0 b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-dbe.so.0 new file mode 100644 index 0000000000000000000000000000000000000000..80afc29ad9c859c2aa1a746add2b0f61552d7eda Binary files /dev/null and b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-dbe.so.0 differ diff --git a/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-dbe.so.0.0.0 b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-dbe.so.0.0.0 new file mode 100644 index 0000000000000000000000000000000000000000..80afc29ad9c859c2aa1a746add2b0f61552d7eda Binary files /dev/null and b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-dbe.so.0.0.0 differ diff --git a/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-dpms.so b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-dpms.so new file mode 100644 index 0000000000000000000000000000000000000000..836aa46c54bc7b354c057e5f0e851e261d393a9c Binary files /dev/null and b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-dpms.so differ diff --git a/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-dpms.so.0 b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-dpms.so.0 new file mode 100644 index 0000000000000000000000000000000000000000..836aa46c54bc7b354c057e5f0e851e261d393a9c Binary files /dev/null and b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-dpms.so.0 differ diff --git a/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-dpms.so.0.0.0 b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-dpms.so.0.0.0 new file mode 100644 index 0000000000000000000000000000000000000000..836aa46c54bc7b354c057e5f0e851e261d393a9c Binary files /dev/null and b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-dpms.so.0.0.0 differ diff --git a/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-dri2.so b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-dri2.so new file mode 100644 index 0000000000000000000000000000000000000000..87d593af098ccb3298133ad9d9fe35e9f63474ca Binary files /dev/null and b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-dri2.so differ diff --git a/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-dri2.so.0 b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-dri2.so.0 new file mode 100644 index 0000000000000000000000000000000000000000..87d593af098ccb3298133ad9d9fe35e9f63474ca Binary files /dev/null and b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-dri2.so.0 differ diff --git a/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-dri2.so.0.0.0 b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-dri2.so.0.0.0 new file mode 100644 index 0000000000000000000000000000000000000000..87d593af098ccb3298133ad9d9fe35e9f63474ca Binary files /dev/null and b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-dri2.so.0.0.0 differ diff --git a/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-dri3.so b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-dri3.so new file mode 100644 index 0000000000000000000000000000000000000000..cc745736ac5cac1834cccfb999f5cf7f9cd164fa Binary files /dev/null and b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-dri3.so differ diff --git a/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-dri3.so.0 b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-dri3.so.0 new file mode 100644 index 0000000000000000000000000000000000000000..cc745736ac5cac1834cccfb999f5cf7f9cd164fa Binary files /dev/null and b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-dri3.so.0 differ diff --git a/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-dri3.so.0.1.0 b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-dri3.so.0.1.0 new file mode 100644 index 0000000000000000000000000000000000000000..cc745736ac5cac1834cccfb999f5cf7f9cd164fa Binary files /dev/null and b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-dri3.so.0.1.0 differ diff --git a/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-present.so b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-present.so new file mode 100644 index 0000000000000000000000000000000000000000..fc0178cb9f7dff6074cb7167df645544c9a453e2 Binary files /dev/null and b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-present.so differ diff --git a/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-present.so.0 b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-present.so.0 new file mode 100644 index 0000000000000000000000000000000000000000..fc0178cb9f7dff6074cb7167df645544c9a453e2 Binary files /dev/null and b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-present.so.0 differ diff --git a/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-present.so.0.0.0 b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-present.so.0.0.0 new file mode 100644 index 0000000000000000000000000000000000000000..fc0178cb9f7dff6074cb7167df645544c9a453e2 Binary files /dev/null and b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-present.so.0.0.0 differ diff --git a/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-randr.so b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-randr.so new file mode 100644 index 0000000000000000000000000000000000000000..6f09722772447520a699b38aeb62e585144c5d99 Binary files /dev/null and b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-randr.so differ diff --git a/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-randr.so.0 b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-randr.so.0 new file mode 100644 index 0000000000000000000000000000000000000000..6f09722772447520a699b38aeb62e585144c5d99 Binary files /dev/null and b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-randr.so.0 differ diff --git a/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-randr.so.0.1.0 b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-randr.so.0.1.0 new file mode 100644 index 0000000000000000000000000000000000000000..6f09722772447520a699b38aeb62e585144c5d99 Binary files /dev/null and b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-randr.so.0.1.0 differ diff --git a/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-record.so b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-record.so new file mode 100644 index 0000000000000000000000000000000000000000..2ec2e7fcf47d00d8412e7cbc4a140c740d59d97e Binary files /dev/null and b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-record.so differ diff --git a/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-record.so.0 b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-record.so.0 new file mode 100644 index 0000000000000000000000000000000000000000..2ec2e7fcf47d00d8412e7cbc4a140c740d59d97e Binary files /dev/null and b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-record.so.0 differ diff --git a/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-record.so.0.0.0 b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-record.so.0.0.0 new file mode 100644 index 0000000000000000000000000000000000000000..2ec2e7fcf47d00d8412e7cbc4a140c740d59d97e Binary files /dev/null and b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-record.so.0.0.0 differ diff --git a/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-render.so b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-render.so new file mode 100644 index 0000000000000000000000000000000000000000..cb65e02656d95ebee8855b82cb75ead42393d536 Binary files /dev/null and b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-render.so differ diff --git a/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-render.so.0 b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-render.so.0 new file mode 100644 index 0000000000000000000000000000000000000000..cb65e02656d95ebee8855b82cb75ead42393d536 Binary files /dev/null and b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-render.so.0 differ diff --git a/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-render.so.0.0.0 b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-render.so.0.0.0 new file mode 100644 index 0000000000000000000000000000000000000000..cb65e02656d95ebee8855b82cb75ead42393d536 Binary files /dev/null and b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-render.so.0.0.0 differ diff --git a/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-res.so b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-res.so new file mode 100644 index 0000000000000000000000000000000000000000..9d229738462bc1e1ba7cb768e0d5e6b0217d2a77 Binary files /dev/null and b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-res.so differ diff --git a/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-res.so.0 b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-res.so.0 new file mode 100644 index 0000000000000000000000000000000000000000..9d229738462bc1e1ba7cb768e0d5e6b0217d2a77 Binary files /dev/null and b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-res.so.0 differ diff --git a/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-res.so.0.0.0 b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-res.so.0.0.0 new file mode 100644 index 0000000000000000000000000000000000000000..9d229738462bc1e1ba7cb768e0d5e6b0217d2a77 Binary files /dev/null and b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-res.so.0.0.0 differ diff --git a/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-screensaver.so b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-screensaver.so new file mode 100644 index 0000000000000000000000000000000000000000..3e15a3df20f86e42fb35d37bb6f4803ff8b1df74 Binary files /dev/null and b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-screensaver.so differ diff --git a/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-screensaver.so.0 b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-screensaver.so.0 new file mode 100644 index 0000000000000000000000000000000000000000..3e15a3df20f86e42fb35d37bb6f4803ff8b1df74 Binary files /dev/null and b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-screensaver.so.0 differ diff --git a/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-screensaver.so.0.0.0 b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-screensaver.so.0.0.0 new file mode 100644 index 0000000000000000000000000000000000000000..3e15a3df20f86e42fb35d37bb6f4803ff8b1df74 Binary files /dev/null and b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-screensaver.so.0.0.0 differ diff --git a/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-shape.so b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-shape.so new file mode 100644 index 0000000000000000000000000000000000000000..1214841f39b92792f8bb4dc20fd9cc440305439e Binary files /dev/null and b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-shape.so differ diff --git a/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-shape.so.0 b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-shape.so.0 new file mode 100644 index 0000000000000000000000000000000000000000..1214841f39b92792f8bb4dc20fd9cc440305439e Binary files /dev/null and b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-shape.so.0 differ diff --git a/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-shape.so.0.0.0 b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-shape.so.0.0.0 new file mode 100644 index 0000000000000000000000000000000000000000..1214841f39b92792f8bb4dc20fd9cc440305439e Binary files /dev/null and b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-shape.so.0.0.0 differ diff --git a/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-shm.so b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-shm.so new file mode 100644 index 0000000000000000000000000000000000000000..03a8c126a21140b0d43fe36993548e04ea026e91 Binary files /dev/null and b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-shm.so differ diff --git a/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-shm.so.0 b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-shm.so.0 new file mode 100644 index 0000000000000000000000000000000000000000..03a8c126a21140b0d43fe36993548e04ea026e91 Binary files /dev/null and b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-shm.so.0 differ diff --git a/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-shm.so.0.0.0 b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-shm.so.0.0.0 new file mode 100644 index 0000000000000000000000000000000000000000..03a8c126a21140b0d43fe36993548e04ea026e91 Binary files /dev/null and b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-shm.so.0.0.0 differ diff --git a/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-sync.so b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-sync.so new file mode 100644 index 0000000000000000000000000000000000000000..76f051604ac445b513453a6b39c67359973344b5 Binary files /dev/null and b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-sync.so differ diff --git a/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-sync.so.1 b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-sync.so.1 new file mode 100644 index 0000000000000000000000000000000000000000..76f051604ac445b513453a6b39c67359973344b5 Binary files /dev/null and b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-sync.so.1 differ diff --git a/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-sync.so.1.0.0 b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-sync.so.1.0.0 new file mode 100644 index 0000000000000000000000000000000000000000..76f051604ac445b513453a6b39c67359973344b5 Binary files /dev/null and b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-sync.so.1.0.0 differ diff --git a/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-xf86dri.so b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-xf86dri.so new file mode 100644 index 0000000000000000000000000000000000000000..9635e33aa23fa9cb366fc38f937f7cf1f9aeab4a Binary files /dev/null and b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-xf86dri.so differ diff --git a/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-xf86dri.so.0 b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-xf86dri.so.0 new file mode 100644 index 0000000000000000000000000000000000000000..9635e33aa23fa9cb366fc38f937f7cf1f9aeab4a Binary files /dev/null and b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-xf86dri.so.0 differ diff --git a/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-xf86dri.so.0.0.0 b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-xf86dri.so.0.0.0 new file mode 100644 index 0000000000000000000000000000000000000000..9635e33aa23fa9cb366fc38f937f7cf1f9aeab4a Binary files /dev/null and b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-xf86dri.so.0.0.0 differ diff --git a/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-xfixes.so b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-xfixes.so new file mode 100644 index 0000000000000000000000000000000000000000..1f31351566b16d6ba2cc20e6ab5100d054d920c3 Binary files /dev/null and b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-xfixes.so differ diff --git a/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-xfixes.so.0 b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-xfixes.so.0 new file mode 100644 index 0000000000000000000000000000000000000000..1f31351566b16d6ba2cc20e6ab5100d054d920c3 Binary files /dev/null and b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-xfixes.so.0 differ diff --git a/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-xfixes.so.0.0.0 b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-xfixes.so.0.0.0 new file mode 100644 index 0000000000000000000000000000000000000000..1f31351566b16d6ba2cc20e6ab5100d054d920c3 Binary files /dev/null and b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-xfixes.so.0.0.0 differ diff --git a/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-xinerama.so b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-xinerama.so new file mode 100644 index 0000000000000000000000000000000000000000..1662c1ee705349465c71bbdaf67f70853aacb021 Binary files /dev/null and b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-xinerama.so differ diff --git a/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-xinerama.so.0 b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-xinerama.so.0 new file mode 100644 index 0000000000000000000000000000000000000000..1662c1ee705349465c71bbdaf67f70853aacb021 Binary files /dev/null and b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-xinerama.so.0 differ diff --git a/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-xinerama.so.0.0.0 b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-xinerama.so.0.0.0 new file mode 100644 index 0000000000000000000000000000000000000000..1662c1ee705349465c71bbdaf67f70853aacb021 Binary files /dev/null and b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-xinerama.so.0.0.0 differ diff --git a/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-xlib.so.0 b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-xlib.so.0 new file mode 100644 index 0000000000000000000000000000000000000000..45f5bda6f8b061e8f294a329ea98428dad7a915e Binary files /dev/null and b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-xlib.so.0 differ diff --git a/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-xlib.so.0.0.0 b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-xlib.so.0.0.0 new file mode 100644 index 0000000000000000000000000000000000000000..45f5bda6f8b061e8f294a329ea98428dad7a915e Binary files /dev/null and b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-xlib.so.0.0.0 differ diff --git a/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-xtest.so b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-xtest.so new file mode 100644 index 0000000000000000000000000000000000000000..eb1d7f78e401953e9e0dca8216a6fd3e63688da5 Binary files /dev/null and b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-xtest.so differ diff --git a/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-xtest.so.0 b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-xtest.so.0 new file mode 100644 index 0000000000000000000000000000000000000000..eb1d7f78e401953e9e0dca8216a6fd3e63688da5 Binary files /dev/null and b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-xtest.so.0 differ diff --git a/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-xtest.so.0.0.0 b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-xtest.so.0.0.0 new file mode 100644 index 0000000000000000000000000000000000000000..eb1d7f78e401953e9e0dca8216a6fd3e63688da5 Binary files /dev/null and b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-xtest.so.0.0.0 differ diff --git a/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-xv.so b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-xv.so new file mode 100644 index 0000000000000000000000000000000000000000..837f25d9be2a11960543790c4bf289e9519d1d2a Binary files /dev/null and b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-xv.so differ diff --git a/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-xv.so.0 b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-xv.so.0 new file mode 100644 index 0000000000000000000000000000000000000000..837f25d9be2a11960543790c4bf289e9519d1d2a Binary files /dev/null and b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-xv.so.0 differ diff --git a/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-xv.so.0.0.0 b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-xv.so.0.0.0 new file mode 100644 index 0000000000000000000000000000000000000000..837f25d9be2a11960543790c4bf289e9519d1d2a Binary files /dev/null and b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-xv.so.0.0.0 differ diff --git a/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-xvmc.so b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-xvmc.so new file mode 100644 index 0000000000000000000000000000000000000000..620accfe1ca09d9a968c6f9ce9c766f338864a79 Binary files /dev/null and b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-xvmc.so differ diff --git a/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-xvmc.so.0 b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-xvmc.so.0 new file mode 100644 index 0000000000000000000000000000000000000000..620accfe1ca09d9a968c6f9ce9c766f338864a79 Binary files /dev/null and b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-xvmc.so.0 differ diff --git a/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-xvmc.so.0.0.0 b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-xvmc.so.0.0.0 new file mode 100644 index 0000000000000000000000000000000000000000..620accfe1ca09d9a968c6f9ce9c766f338864a79 Binary files /dev/null and b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/libxcb-xvmc.so.0.0.0 differ diff --git a/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/pkgconfig/xcb-composite.pc b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/pkgconfig/xcb-composite.pc new file mode 100644 index 0000000000000000000000000000000000000000..5573ca8943f3169e71350ae5cdccd2506eb176d9 --- /dev/null +++ b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/pkgconfig/xcb-composite.pc @@ -0,0 +1,11 @@ +prefix=/croot/libxcb_1746022161355/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_ +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: XCB Composite +Description: XCB Composite Extension +Version: 1.17.0 +Requires.private: xcb xcb-xfixes +Libs: -L${libdir} -lxcb-composite +Cflags: -I${includedir} diff --git a/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/pkgconfig/xcb-damage.pc b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/pkgconfig/xcb-damage.pc new file mode 100644 index 0000000000000000000000000000000000000000..91dab23737204ddce5ac1562dbc9e4b4aaf6a83f --- /dev/null +++ b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/pkgconfig/xcb-damage.pc @@ -0,0 +1,11 @@ +prefix=/croot/libxcb_1746022161355/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_ +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: XCB Damage +Description: XCB Damage Extension +Version: 1.17.0 +Requires.private: xcb xcb-xfixes +Libs: -L${libdir} -lxcb-damage +Cflags: -I${includedir} diff --git a/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/pkgconfig/xcb-dbe.pc b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/pkgconfig/xcb-dbe.pc new file mode 100644 index 0000000000000000000000000000000000000000..96358674c441804f5ff02ee1b459320822ffe9f9 --- /dev/null +++ b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/pkgconfig/xcb-dbe.pc @@ -0,0 +1,11 @@ +prefix=/croot/libxcb_1746022161355/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_ +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: XCB Dbe +Description: XCB Double Buffer Extension +Version: 1.17.0 +Requires.private: xcb +Libs: -L${libdir} -lxcb-dbe +Cflags: -I${includedir} diff --git a/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/pkgconfig/xcb-dpms.pc b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/pkgconfig/xcb-dpms.pc new file mode 100644 index 0000000000000000000000000000000000000000..62bd85d6655ca270a6f45d9d2b423a8adb4f0e42 --- /dev/null +++ b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/pkgconfig/xcb-dpms.pc @@ -0,0 +1,11 @@ +prefix=/croot/libxcb_1746022161355/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_ +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: XCB DPMS +Description: XCB DPMS Extension +Version: 1.17.0 +Requires.private: xcb +Libs: -L${libdir} -lxcb-dpms +Cflags: -I${includedir} diff --git a/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/pkgconfig/xcb-dri2.pc b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/pkgconfig/xcb-dri2.pc new file mode 100644 index 0000000000000000000000000000000000000000..15dd015b67f354ab88aba41115e4e9fcd71813d4 --- /dev/null +++ b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/pkgconfig/xcb-dri2.pc @@ -0,0 +1,11 @@ +prefix=/croot/libxcb_1746022161355/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_ +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: XCB DRI2 +Description: XCB DRI2 Extension +Version: 1.17.0 +Requires.private: xcb +Libs: -L${libdir} -lxcb-dri2 +Cflags: -I${includedir} diff --git a/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/pkgconfig/xcb-dri3.pc b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/pkgconfig/xcb-dri3.pc new file mode 100644 index 0000000000000000000000000000000000000000..6bdb9ab69a93cd28c8f46055e2f42943ce2427bc --- /dev/null +++ b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/pkgconfig/xcb-dri3.pc @@ -0,0 +1,11 @@ +prefix=/croot/libxcb_1746022161355/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_ +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: XCB DRI3 +Description: XCB DRI3 Extension +Version: 1.17.0 +Requires.private: xcb +Libs: -L${libdir} -lxcb-dri3 +Cflags: -I${includedir} diff --git a/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/pkgconfig/xcb-glx.pc b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/pkgconfig/xcb-glx.pc new file mode 100644 index 0000000000000000000000000000000000000000..d9b40c863a7a8e4587aa7f0f3ca09abf9ce3a054 --- /dev/null +++ b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/pkgconfig/xcb-glx.pc @@ -0,0 +1,11 @@ +prefix=/croot/libxcb_1746022161355/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_ +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: XCB GLX +Description: XCB GLX Extension +Version: 1.17.0 +Requires.private: xcb +Libs: -L${libdir} -lxcb-glx +Cflags: -I${includedir} diff --git a/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/pkgconfig/xcb-present.pc b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/pkgconfig/xcb-present.pc new file mode 100644 index 0000000000000000000000000000000000000000..903364186206aa95f818a77f8156bc68f0bfd0e0 --- /dev/null +++ b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/pkgconfig/xcb-present.pc @@ -0,0 +1,11 @@ +prefix=/croot/libxcb_1746022161355/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_ +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: XCB Present +Description: XCB Present Extension +Version: 1.17.0 +Requires.private: xcb xcb-randr xcb-xfixes xcb-sync xcb-dri3 +Libs: -L${libdir} -lxcb-present +Cflags: -I${includedir} diff --git a/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/pkgconfig/xcb-randr.pc b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/pkgconfig/xcb-randr.pc new file mode 100644 index 0000000000000000000000000000000000000000..05202ba322386db4ed2aa245e1d52297457baf69 --- /dev/null +++ b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/pkgconfig/xcb-randr.pc @@ -0,0 +1,11 @@ +prefix=/croot/libxcb_1746022161355/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_ +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: XCB RandR +Description: XCB RandR Extension +Version: 1.17.0 +Requires.private: xcb xcb-render +Libs: -L${libdir} -lxcb-randr +Cflags: -I${includedir} diff --git a/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/pkgconfig/xcb-record.pc b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/pkgconfig/xcb-record.pc new file mode 100644 index 0000000000000000000000000000000000000000..91b0dadbac3d4ea4ff57bc9e6a27cb8ef732a74c --- /dev/null +++ b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/pkgconfig/xcb-record.pc @@ -0,0 +1,11 @@ +prefix=/croot/libxcb_1746022161355/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_ +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: XCB Record +Description: XCB Record Extension +Version: 1.17.0 +Requires.private: xcb +Libs: -L${libdir} -lxcb-record +Cflags: -I${includedir} diff --git a/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/pkgconfig/xcb-render.pc b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/pkgconfig/xcb-render.pc new file mode 100644 index 0000000000000000000000000000000000000000..763d2eeec415479e9cc5479645786814e9c118f5 --- /dev/null +++ b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/pkgconfig/xcb-render.pc @@ -0,0 +1,11 @@ +prefix=/croot/libxcb_1746022161355/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_ +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: XCB Render +Description: XCB Render Extension +Version: 1.17.0 +Requires.private: xcb +Libs: -L${libdir} -lxcb-render +Cflags: -I${includedir} diff --git a/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/pkgconfig/xcb-res.pc b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/pkgconfig/xcb-res.pc new file mode 100644 index 0000000000000000000000000000000000000000..a5703f3454b2d608bb822507a1c0070bf8ee5bce --- /dev/null +++ b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/pkgconfig/xcb-res.pc @@ -0,0 +1,11 @@ +prefix=/croot/libxcb_1746022161355/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_ +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: XCB Res +Description: XCB X-Resource Extension +Version: 1.17.0 +Requires.private: xcb +Libs: -L${libdir} -lxcb-res +Cflags: -I${includedir} diff --git a/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/pkgconfig/xcb-screensaver.pc b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/pkgconfig/xcb-screensaver.pc new file mode 100644 index 0000000000000000000000000000000000000000..0282eb3af2ea3dd22b3f6251d8ae07d09b5f0ba5 --- /dev/null +++ b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/pkgconfig/xcb-screensaver.pc @@ -0,0 +1,11 @@ +prefix=/croot/libxcb_1746022161355/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_ +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: XCB Screensaver +Description: XCB Screensaver Extension +Version: 1.17.0 +Requires.private: xcb +Libs: -L${libdir} -lxcb-screensaver +Cflags: -I${includedir} diff --git a/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/pkgconfig/xcb-shape.pc b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/pkgconfig/xcb-shape.pc new file mode 100644 index 0000000000000000000000000000000000000000..c9a6c3c98c68f7c157d131703c607524d002ae73 --- /dev/null +++ b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/pkgconfig/xcb-shape.pc @@ -0,0 +1,11 @@ +prefix=/croot/libxcb_1746022161355/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_ +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: XCB Shape +Description: XCB Shape Extension +Version: 1.17.0 +Requires.private: xcb +Libs: -L${libdir} -lxcb-shape +Cflags: -I${includedir} diff --git a/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/pkgconfig/xcb-shm.pc b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/pkgconfig/xcb-shm.pc new file mode 100644 index 0000000000000000000000000000000000000000..ab6b80d8bcf23d07fd8c0ed62680555e53441d1e --- /dev/null +++ b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/pkgconfig/xcb-shm.pc @@ -0,0 +1,11 @@ +prefix=/croot/libxcb_1746022161355/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_ +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: XCB Shm +Description: XCB Shm Extension +Version: 1.17.0 +Requires.private: xcb +Libs: -L${libdir} -lxcb-shm +Cflags: -I${includedir} diff --git a/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/pkgconfig/xcb-sync.pc b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/pkgconfig/xcb-sync.pc new file mode 100644 index 0000000000000000000000000000000000000000..5a0d0a7e11fa3936f351ecc9e10f969813d6533d --- /dev/null +++ b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/pkgconfig/xcb-sync.pc @@ -0,0 +1,11 @@ +prefix=/croot/libxcb_1746022161355/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_ +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: XCB Sync +Description: XCB Sync Extension +Version: 1.17.0 +Requires.private: xcb +Libs: -L${libdir} -lxcb-sync +Cflags: -I${includedir} diff --git a/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/pkgconfig/xcb-xf86dri.pc b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/pkgconfig/xcb-xf86dri.pc new file mode 100644 index 0000000000000000000000000000000000000000..4cccd83914b37f465f1db3ac24524a8f5cfbf774 --- /dev/null +++ b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/pkgconfig/xcb-xf86dri.pc @@ -0,0 +1,11 @@ +prefix=/croot/libxcb_1746022161355/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_ +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: XCB XFree86-DRI +Description: XCB XFree86-DRI Extension +Version: 1.17.0 +Requires.private: xcb +Libs: -L${libdir} -lxcb-xf86dri +Cflags: -I${includedir} diff --git a/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/pkgconfig/xcb-xfixes.pc b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/pkgconfig/xcb-xfixes.pc new file mode 100644 index 0000000000000000000000000000000000000000..cdec76dae357c51a6c37b9670845430e53ca4f9d --- /dev/null +++ b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/pkgconfig/xcb-xfixes.pc @@ -0,0 +1,11 @@ +prefix=/croot/libxcb_1746022161355/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_ +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: XCB XFixes +Description: XCB XFixes Extension +Version: 1.17.0 +Requires.private: xcb xcb-render xcb-shape +Libs: -L${libdir} -lxcb-xfixes +Cflags: -I${includedir} diff --git a/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/pkgconfig/xcb-xinerama.pc b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/pkgconfig/xcb-xinerama.pc new file mode 100644 index 0000000000000000000000000000000000000000..11df711a0765ffa869c47102c46de6b23846ce3e --- /dev/null +++ b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/pkgconfig/xcb-xinerama.pc @@ -0,0 +1,11 @@ +prefix=/croot/libxcb_1746022161355/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_ +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: XCB Xinerama +Description: XCB Xinerama Extension +Version: 1.17.0 +Requires.private: xcb +Libs: -L${libdir} -lxcb-xinerama +Cflags: -I${includedir} diff --git a/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/pkgconfig/xcb-xinput.pc b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/pkgconfig/xcb-xinput.pc new file mode 100644 index 0000000000000000000000000000000000000000..1b2c62520e75b411ecc5b551a87c870b151cb508 --- /dev/null +++ b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/pkgconfig/xcb-xinput.pc @@ -0,0 +1,11 @@ +prefix=/croot/libxcb_1746022161355/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_ +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: XCB XInput +Description: XCB XInput Extension (EXPERIMENTAL) +Version: 1.17.0 +Requires.private: xcb xcb-xfixes +Libs: -L${libdir} -lxcb-xinput +Cflags: -I${includedir} diff --git a/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/pkgconfig/xcb-xkb.pc b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/pkgconfig/xcb-xkb.pc new file mode 100644 index 0000000000000000000000000000000000000000..aac5564ad63dd236b435141efd34b1e88706a1a9 --- /dev/null +++ b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/pkgconfig/xcb-xkb.pc @@ -0,0 +1,11 @@ +prefix=/croot/libxcb_1746022161355/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_ +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: XCB XKB +Description: XCB Keyboard Extension (EXPERIMENTAL) +Version: 1.17.0 +Requires.private: xcb +Libs: -L${libdir} -lxcb-xkb +Cflags: -I${includedir} diff --git a/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/pkgconfig/xcb-xtest.pc b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/pkgconfig/xcb-xtest.pc new file mode 100644 index 0000000000000000000000000000000000000000..cd07cc2ac5091b357082cd26e1ab82254bb81032 --- /dev/null +++ b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/pkgconfig/xcb-xtest.pc @@ -0,0 +1,11 @@ +prefix=/croot/libxcb_1746022161355/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_ +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: XCB XTEST +Description: XCB XTEST Extension +Version: 1.17.0 +Requires.private: xcb +Libs: -L${libdir} -lxcb-xtest +Cflags: -I${includedir} diff --git a/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/pkgconfig/xcb-xv.pc b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/pkgconfig/xcb-xv.pc new file mode 100644 index 0000000000000000000000000000000000000000..d3882e3f7923841f17fadf87f52e489b5d1f9468 --- /dev/null +++ b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/pkgconfig/xcb-xv.pc @@ -0,0 +1,11 @@ +prefix=/croot/libxcb_1746022161355/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_ +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: XCB Xv +Description: XCB Xv Extension +Version: 1.17.0 +Requires.private: xcb xcb-shm +Libs: -L${libdir} -lxcb-xv +Cflags: -I${includedir} diff --git a/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/pkgconfig/xcb-xvmc.pc b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/pkgconfig/xcb-xvmc.pc new file mode 100644 index 0000000000000000000000000000000000000000..419c155e8876907a52cfd414f1b7da05157d7c61 --- /dev/null +++ b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/pkgconfig/xcb-xvmc.pc @@ -0,0 +1,11 @@ +prefix=/croot/libxcb_1746022161355/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_ +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: XCB XvMC +Description: XCB XvMC Extension +Version: 1.17.0 +Requires.private: xcb xcb-xv +Libs: -L${libdir} -lxcb-xvmc +Cflags: -I${includedir} diff --git a/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/pkgconfig/xcb.pc b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/pkgconfig/xcb.pc new file mode 100644 index 0000000000000000000000000000000000000000..cb4179431e2add73817ae90b7a2ca534dd5f5b55 --- /dev/null +++ b/miniconda3/pkgs/libxcb-1.17.0-h9b100fa_0/lib/pkgconfig/xcb.pc @@ -0,0 +1,13 @@ +prefix=/croot/libxcb_1746022161355/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_ +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include +xcbproto_version=1.17.0 + +Name: XCB +Description: X-protocol C Binding +Version: 1.17.0 +Requires.private: xau >= 0.99.2 xdmcp +Libs: -L${libdir} -lxcb +Libs.private: +Cflags: -I${includedir} diff --git a/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/bin/xml2-config b/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/bin/xml2-config new file mode 100644 index 0000000000000000000000000000000000000000..ebc4a22e65bbc6f2958c5a5c476a80122e8a4d78 --- /dev/null +++ b/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/bin/xml2-config @@ -0,0 +1,108 @@ +#! /bin/sh + +prefix=/home/task_176176819578609/conda-bld/libxml2_1761768910671/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold +exec_prefix=${prefix} +includedir=${prefix}/include +libdir=${exec_prefix}/lib +cflags= +libs= + +usage() +{ + cat < +#include + +#ifdef LIBXML_HTML_ENABLED + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * Most of the back-end structures from XML and HTML are shared. + */ +typedef xmlParserCtxt htmlParserCtxt; +typedef xmlParserCtxtPtr htmlParserCtxtPtr; +typedef xmlParserNodeInfo htmlParserNodeInfo; +typedef xmlSAXHandler htmlSAXHandler; +typedef xmlSAXHandlerPtr htmlSAXHandlerPtr; +typedef xmlParserInput htmlParserInput; +typedef xmlParserInputPtr htmlParserInputPtr; +typedef xmlDocPtr htmlDocPtr; +typedef xmlNodePtr htmlNodePtr; + +/* + * Internal description of an HTML element, representing HTML 4.01 + * and XHTML 1.0 (which share the same structure). + */ +typedef struct _htmlElemDesc htmlElemDesc; +typedef htmlElemDesc *htmlElemDescPtr; +struct _htmlElemDesc { + const char *name; /* The tag name */ + char startTag; /* Whether the start tag can be implied */ + char endTag; /* Whether the end tag can be implied */ + char saveEndTag; /* Whether the end tag should be saved */ + char empty; /* Is this an empty element ? */ + char depr; /* Is this a deprecated element ? */ + char dtd; /* 1: only in Loose DTD, 2: only Frameset one */ + char isinline; /* is this a block 0 or inline 1 element */ + const char *desc; /* the description */ + +/* NRK Jan.2003 + * New fields encapsulating HTML structure + * + * Bugs: + * This is a very limited representation. It fails to tell us when + * an element *requires* subelements (we only have whether they're + * allowed or not), and it doesn't tell us where CDATA and PCDATA + * are allowed. Some element relationships are not fully represented: + * these are flagged with the word MODIFIER + */ + const char** subelts; /* allowed sub-elements of this element */ + const char* defaultsubelt; /* subelement for suggested auto-repair + if necessary or NULL */ + const char** attrs_opt; /* Optional Attributes */ + const char** attrs_depr; /* Additional deprecated attributes */ + const char** attrs_req; /* Required attributes */ +}; + +/* + * Internal description of an HTML entity. + */ +typedef struct _htmlEntityDesc htmlEntityDesc; +typedef htmlEntityDesc *htmlEntityDescPtr; +struct _htmlEntityDesc { + unsigned int value; /* the UNICODE value for the character */ + const char *name; /* The entity name */ + const char *desc; /* the description */ +}; + +#ifdef LIBXML_SAX1_ENABLED + +XML_DEPRECATED +XMLPUBVAR const xmlSAXHandlerV1 htmlDefaultSAXHandler; + +#ifdef LIBXML_THREAD_ENABLED +XML_DEPRECATED +XMLPUBFUN const xmlSAXHandlerV1 *__htmlDefaultSAXHandler(void); +#endif + +#endif /* LIBXML_SAX1_ENABLED */ + +/* + * There is only few public functions. + */ +XML_DEPRECATED +XMLPUBFUN void + htmlInitAutoClose (void); +XMLPUBFUN const htmlElemDesc * + htmlTagLookup (const xmlChar *tag); +XMLPUBFUN const htmlEntityDesc * + htmlEntityLookup(const xmlChar *name); +XMLPUBFUN const htmlEntityDesc * + htmlEntityValueLookup(unsigned int value); + +XMLPUBFUN int + htmlIsAutoClosed(htmlDocPtr doc, + htmlNodePtr elem); +XMLPUBFUN int + htmlAutoCloseTag(htmlDocPtr doc, + const xmlChar *name, + htmlNodePtr elem); +XML_DEPRECATED +XMLPUBFUN const htmlEntityDesc * + htmlParseEntityRef(htmlParserCtxtPtr ctxt, + const xmlChar **str); +XML_DEPRECATED +XMLPUBFUN int + htmlParseCharRef(htmlParserCtxtPtr ctxt); +XML_DEPRECATED +XMLPUBFUN void + htmlParseElement(htmlParserCtxtPtr ctxt); + +XMLPUBFUN htmlParserCtxtPtr + htmlNewParserCtxt(void); +XMLPUBFUN htmlParserCtxtPtr + htmlNewSAXParserCtxt(const htmlSAXHandler *sax, + void *userData); + +XMLPUBFUN htmlParserCtxtPtr + htmlCreateMemoryParserCtxt(const char *buffer, + int size); + +XMLPUBFUN int + htmlParseDocument(htmlParserCtxtPtr ctxt); +XML_DEPRECATED +XMLPUBFUN htmlDocPtr + htmlSAXParseDoc (const xmlChar *cur, + const char *encoding, + htmlSAXHandlerPtr sax, + void *userData); +XMLPUBFUN htmlDocPtr + htmlParseDoc (const xmlChar *cur, + const char *encoding); +XMLPUBFUN htmlParserCtxtPtr + htmlCreateFileParserCtxt(const char *filename, + const char *encoding); +XML_DEPRECATED +XMLPUBFUN htmlDocPtr + htmlSAXParseFile(const char *filename, + const char *encoding, + htmlSAXHandlerPtr sax, + void *userData); +XMLPUBFUN htmlDocPtr + htmlParseFile (const char *filename, + const char *encoding); +XMLPUBFUN int + UTF8ToHtml (unsigned char *out, + int *outlen, + const unsigned char *in, + int *inlen); +XMLPUBFUN int + htmlEncodeEntities(unsigned char *out, + int *outlen, + const unsigned char *in, + int *inlen, int quoteChar); +XMLPUBFUN int + htmlIsScriptAttribute(const xmlChar *name); +XML_DEPRECATED +XMLPUBFUN int + htmlHandleOmittedElem(int val); + +#ifdef LIBXML_PUSH_ENABLED +/** + * Interfaces for the Push mode. + */ +XMLPUBFUN htmlParserCtxtPtr + htmlCreatePushParserCtxt(htmlSAXHandlerPtr sax, + void *user_data, + const char *chunk, + int size, + const char *filename, + xmlCharEncoding enc); +XMLPUBFUN int + htmlParseChunk (htmlParserCtxtPtr ctxt, + const char *chunk, + int size, + int terminate); +#endif /* LIBXML_PUSH_ENABLED */ + +XMLPUBFUN void + htmlFreeParserCtxt (htmlParserCtxtPtr ctxt); + +/* + * New set of simpler/more flexible APIs + */ +/** + * xmlParserOption: + * + * This is the set of XML parser options that can be passed down + * to the xmlReadDoc() and similar calls. + */ +typedef enum { + HTML_PARSE_RECOVER = 1<<0, /* Relaxed parsing */ + HTML_PARSE_NODEFDTD = 1<<2, /* do not default a doctype if not found */ + HTML_PARSE_NOERROR = 1<<5, /* suppress error reports */ + HTML_PARSE_NOWARNING= 1<<6, /* suppress warning reports */ + HTML_PARSE_PEDANTIC = 1<<7, /* pedantic error reporting */ + HTML_PARSE_NOBLANKS = 1<<8, /* remove blank nodes */ + HTML_PARSE_NONET = 1<<11,/* Forbid network access */ + HTML_PARSE_NOIMPLIED= 1<<13,/* Do not add implied html/body... elements */ + HTML_PARSE_COMPACT = 1<<16,/* compact small text nodes */ + HTML_PARSE_IGNORE_ENC=1<<21 /* ignore internal document encoding hint */ +} htmlParserOption; + +XMLPUBFUN void + htmlCtxtReset (htmlParserCtxtPtr ctxt); +XMLPUBFUN int + htmlCtxtUseOptions (htmlParserCtxtPtr ctxt, + int options); +XMLPUBFUN htmlDocPtr + htmlReadDoc (const xmlChar *cur, + const char *URL, + const char *encoding, + int options); +XMLPUBFUN htmlDocPtr + htmlReadFile (const char *URL, + const char *encoding, + int options); +XMLPUBFUN htmlDocPtr + htmlReadMemory (const char *buffer, + int size, + const char *URL, + const char *encoding, + int options); +XMLPUBFUN htmlDocPtr + htmlReadFd (int fd, + const char *URL, + const char *encoding, + int options); +XMLPUBFUN htmlDocPtr + htmlReadIO (xmlInputReadCallback ioread, + xmlInputCloseCallback ioclose, + void *ioctx, + const char *URL, + const char *encoding, + int options); +XMLPUBFUN htmlDocPtr + htmlCtxtParseDocument (htmlParserCtxtPtr ctxt, + xmlParserInputPtr input); +XMLPUBFUN htmlDocPtr + htmlCtxtReadDoc (xmlParserCtxtPtr ctxt, + const xmlChar *cur, + const char *URL, + const char *encoding, + int options); +XMLPUBFUN htmlDocPtr + htmlCtxtReadFile (xmlParserCtxtPtr ctxt, + const char *filename, + const char *encoding, + int options); +XMLPUBFUN htmlDocPtr + htmlCtxtReadMemory (xmlParserCtxtPtr ctxt, + const char *buffer, + int size, + const char *URL, + const char *encoding, + int options); +XMLPUBFUN htmlDocPtr + htmlCtxtReadFd (xmlParserCtxtPtr ctxt, + int fd, + const char *URL, + const char *encoding, + int options); +XMLPUBFUN htmlDocPtr + htmlCtxtReadIO (xmlParserCtxtPtr ctxt, + xmlInputReadCallback ioread, + xmlInputCloseCallback ioclose, + void *ioctx, + const char *URL, + const char *encoding, + int options); + +/* NRK/Jan2003: further knowledge of HTML structure + */ +typedef enum { + HTML_NA = 0 , /* something we don't check at all */ + HTML_INVALID = 0x1 , + HTML_DEPRECATED = 0x2 , + HTML_VALID = 0x4 , + HTML_REQUIRED = 0xc /* VALID bit set so ( & HTML_VALID ) is TRUE */ +} htmlStatus ; + +/* Using htmlElemDesc rather than name here, to emphasise the fact + that otherwise there's a lookup overhead +*/ +XMLPUBFUN htmlStatus htmlAttrAllowed(const htmlElemDesc*, const xmlChar*, int) ; +XMLPUBFUN int htmlElementAllowedHere(const htmlElemDesc*, const xmlChar*) ; +XMLPUBFUN htmlStatus htmlElementStatusHere(const htmlElemDesc*, const htmlElemDesc*) ; +XMLPUBFUN htmlStatus htmlNodeStatus(htmlNodePtr, int) ; +/** + * htmlDefaultSubelement: + * @elt: HTML element + * + * Returns the default subelement for this element + */ +#define htmlDefaultSubelement(elt) elt->defaultsubelt +/** + * htmlElementAllowedHereDesc: + * @parent: HTML parent element + * @elt: HTML element + * + * Checks whether an HTML element description may be a + * direct child of the specified element. + * + * Returns 1 if allowed; 0 otherwise. + */ +#define htmlElementAllowedHereDesc(parent,elt) \ + htmlElementAllowedHere((parent), (elt)->name) +/** + * htmlRequiredAttrs: + * @elt: HTML element + * + * Returns the attributes required for the specified element. + */ +#define htmlRequiredAttrs(elt) (elt)->attrs_req + + +#ifdef __cplusplus +} +#endif + +#endif /* LIBXML_HTML_ENABLED */ +#endif /* __HTML_PARSER_H__ */ diff --git a/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/include/libxml2/libxml/HTMLtree.h b/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/include/libxml2/libxml/HTMLtree.h new file mode 100644 index 0000000000000000000000000000000000000000..8e1ba90e9157b3bb7ad47b13f9ceae99cc748a13 --- /dev/null +++ b/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/include/libxml2/libxml/HTMLtree.h @@ -0,0 +1,147 @@ +/* + * Summary: specific APIs to process HTML tree, especially serialization + * Description: this module implements a few function needed to process + * tree in an HTML specific way. + * + * Copy: See Copyright for the status of this software. + * + * Author: Daniel Veillard + */ + +#ifndef __HTML_TREE_H__ +#define __HTML_TREE_H__ + +#include +#include +#include +#include + +#ifdef LIBXML_HTML_ENABLED + +#ifdef __cplusplus +extern "C" { +#endif + + +/** + * HTML_TEXT_NODE: + * + * Macro. A text node in a HTML document is really implemented + * the same way as a text node in an XML document. + */ +#define HTML_TEXT_NODE XML_TEXT_NODE +/** + * HTML_ENTITY_REF_NODE: + * + * Macro. An entity reference in a HTML document is really implemented + * the same way as an entity reference in an XML document. + */ +#define HTML_ENTITY_REF_NODE XML_ENTITY_REF_NODE +/** + * HTML_COMMENT_NODE: + * + * Macro. A comment in a HTML document is really implemented + * the same way as a comment in an XML document. + */ +#define HTML_COMMENT_NODE XML_COMMENT_NODE +/** + * HTML_PRESERVE_NODE: + * + * Macro. A preserved node in a HTML document is really implemented + * the same way as a CDATA section in an XML document. + */ +#define HTML_PRESERVE_NODE XML_CDATA_SECTION_NODE +/** + * HTML_PI_NODE: + * + * Macro. A processing instruction in a HTML document is really implemented + * the same way as a processing instruction in an XML document. + */ +#define HTML_PI_NODE XML_PI_NODE + +XMLPUBFUN htmlDocPtr + htmlNewDoc (const xmlChar *URI, + const xmlChar *ExternalID); +XMLPUBFUN htmlDocPtr + htmlNewDocNoDtD (const xmlChar *URI, + const xmlChar *ExternalID); +XMLPUBFUN const xmlChar * + htmlGetMetaEncoding (htmlDocPtr doc); +XMLPUBFUN int + htmlSetMetaEncoding (htmlDocPtr doc, + const xmlChar *encoding); +#ifdef LIBXML_OUTPUT_ENABLED +XMLPUBFUN void + htmlDocDumpMemory (xmlDocPtr cur, + xmlChar **mem, + int *size); +XMLPUBFUN void + htmlDocDumpMemoryFormat (xmlDocPtr cur, + xmlChar **mem, + int *size, + int format); +XMLPUBFUN int + htmlDocDump (FILE *f, + xmlDocPtr cur); +XMLPUBFUN int + htmlSaveFile (const char *filename, + xmlDocPtr cur); +XMLPUBFUN int + htmlNodeDump (xmlBufferPtr buf, + xmlDocPtr doc, + xmlNodePtr cur); +XMLPUBFUN void + htmlNodeDumpFile (FILE *out, + xmlDocPtr doc, + xmlNodePtr cur); +XMLPUBFUN int + htmlNodeDumpFileFormat (FILE *out, + xmlDocPtr doc, + xmlNodePtr cur, + const char *encoding, + int format); +XMLPUBFUN int + htmlSaveFileEnc (const char *filename, + xmlDocPtr cur, + const char *encoding); +XMLPUBFUN int + htmlSaveFileFormat (const char *filename, + xmlDocPtr cur, + const char *encoding, + int format); + +XMLPUBFUN void + htmlNodeDumpFormatOutput(xmlOutputBufferPtr buf, + xmlDocPtr doc, + xmlNodePtr cur, + const char *encoding, + int format); +XMLPUBFUN void + htmlDocContentDumpOutput(xmlOutputBufferPtr buf, + xmlDocPtr cur, + const char *encoding); +XMLPUBFUN void + htmlDocContentDumpFormatOutput(xmlOutputBufferPtr buf, + xmlDocPtr cur, + const char *encoding, + int format); +XMLPUBFUN void + htmlNodeDumpOutput (xmlOutputBufferPtr buf, + xmlDocPtr doc, + xmlNodePtr cur, + const char *encoding); + +#endif /* LIBXML_OUTPUT_ENABLED */ + +XMLPUBFUN int + htmlIsBooleanAttr (const xmlChar *name); + + +#ifdef __cplusplus +} +#endif + +#endif /* LIBXML_HTML_ENABLED */ + +#endif /* __HTML_TREE_H__ */ + diff --git a/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/include/libxml2/libxml/SAX.h b/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/include/libxml2/libxml/SAX.h new file mode 100644 index 0000000000000000000000000000000000000000..eea1057bfcc533cd2309a4de73767f004c97380f --- /dev/null +++ b/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/include/libxml2/libxml/SAX.h @@ -0,0 +1,202 @@ +/* + * Summary: Old SAX version 1 handler, deprecated + * Description: DEPRECATED set of SAX version 1 interfaces used to + * build the DOM tree. + * + * Copy: See Copyright for the status of this software. + * + * Author: Daniel Veillard + */ + + +#ifndef __XML_SAX_H__ +#define __XML_SAX_H__ + +#include +#include + +#ifdef LIBXML_LEGACY_ENABLED + +#ifdef __cplusplus +extern "C" { +#endif +XML_DEPRECATED +XMLPUBFUN const xmlChar * + getPublicId (void *ctx); +XML_DEPRECATED +XMLPUBFUN const xmlChar * + getSystemId (void *ctx); +XML_DEPRECATED +XMLPUBFUN void + setDocumentLocator (void *ctx, + xmlSAXLocatorPtr loc); + +XML_DEPRECATED +XMLPUBFUN int + getLineNumber (void *ctx); +XML_DEPRECATED +XMLPUBFUN int + getColumnNumber (void *ctx); + +XML_DEPRECATED +XMLPUBFUN int + isStandalone (void *ctx); +XML_DEPRECATED +XMLPUBFUN int + hasInternalSubset (void *ctx); +XML_DEPRECATED +XMLPUBFUN int + hasExternalSubset (void *ctx); + +XML_DEPRECATED +XMLPUBFUN void + internalSubset (void *ctx, + const xmlChar *name, + const xmlChar *ExternalID, + const xmlChar *SystemID); +XML_DEPRECATED +XMLPUBFUN void + externalSubset (void *ctx, + const xmlChar *name, + const xmlChar *ExternalID, + const xmlChar *SystemID); +XML_DEPRECATED +XMLPUBFUN xmlEntityPtr + getEntity (void *ctx, + const xmlChar *name); +XML_DEPRECATED +XMLPUBFUN xmlEntityPtr + getParameterEntity (void *ctx, + const xmlChar *name); +XML_DEPRECATED +XMLPUBFUN xmlParserInputPtr + resolveEntity (void *ctx, + const xmlChar *publicId, + const xmlChar *systemId); + +XML_DEPRECATED +XMLPUBFUN void + entityDecl (void *ctx, + const xmlChar *name, + int type, + const xmlChar *publicId, + const xmlChar *systemId, + xmlChar *content); +XML_DEPRECATED +XMLPUBFUN void + attributeDecl (void *ctx, + const xmlChar *elem, + const xmlChar *fullname, + int type, + int def, + const xmlChar *defaultValue, + xmlEnumerationPtr tree); +XML_DEPRECATED +XMLPUBFUN void + elementDecl (void *ctx, + const xmlChar *name, + int type, + xmlElementContentPtr content); +XML_DEPRECATED +XMLPUBFUN void + notationDecl (void *ctx, + const xmlChar *name, + const xmlChar *publicId, + const xmlChar *systemId); +XML_DEPRECATED +XMLPUBFUN void + unparsedEntityDecl (void *ctx, + const xmlChar *name, + const xmlChar *publicId, + const xmlChar *systemId, + const xmlChar *notationName); + +XML_DEPRECATED +XMLPUBFUN void + startDocument (void *ctx); +XML_DEPRECATED +XMLPUBFUN void + endDocument (void *ctx); +XML_DEPRECATED +XMLPUBFUN void + attribute (void *ctx, + const xmlChar *fullname, + const xmlChar *value); +XML_DEPRECATED +XMLPUBFUN void + startElement (void *ctx, + const xmlChar *fullname, + const xmlChar **atts); +XML_DEPRECATED +XMLPUBFUN void + endElement (void *ctx, + const xmlChar *name); +XML_DEPRECATED +XMLPUBFUN void + reference (void *ctx, + const xmlChar *name); +XML_DEPRECATED +XMLPUBFUN void + characters (void *ctx, + const xmlChar *ch, + int len); +XML_DEPRECATED +XMLPUBFUN void + ignorableWhitespace (void *ctx, + const xmlChar *ch, + int len); +XML_DEPRECATED +XMLPUBFUN void + processingInstruction (void *ctx, + const xmlChar *target, + const xmlChar *data); +XML_DEPRECATED +XMLPUBFUN void + globalNamespace (void *ctx, + const xmlChar *href, + const xmlChar *prefix); +XML_DEPRECATED +XMLPUBFUN void + setNamespace (void *ctx, + const xmlChar *name); +XML_DEPRECATED +XMLPUBFUN xmlNsPtr + getNamespace (void *ctx); +XML_DEPRECATED +XMLPUBFUN int + checkNamespace (void *ctx, + xmlChar *nameSpace); +XML_DEPRECATED +XMLPUBFUN void + namespaceDecl (void *ctx, + const xmlChar *href, + const xmlChar *prefix); +XML_DEPRECATED +XMLPUBFUN void + comment (void *ctx, + const xmlChar *value); +XML_DEPRECATED +XMLPUBFUN void + cdataBlock (void *ctx, + const xmlChar *value, + int len); + +#ifdef LIBXML_SAX1_ENABLED +XML_DEPRECATED +XMLPUBFUN void + initxmlDefaultSAXHandler (xmlSAXHandlerV1 *hdlr, + int warning); +#ifdef LIBXML_HTML_ENABLED +XML_DEPRECATED +XMLPUBFUN void + inithtmlDefaultSAXHandler (xmlSAXHandlerV1 *hdlr); +#endif +#endif /* LIBXML_SAX1_ENABLED */ + +#ifdef __cplusplus +} +#endif + +#endif /* LIBXML_LEGACY_ENABLED */ + +#endif /* __XML_SAX_H__ */ diff --git a/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/include/libxml2/libxml/SAX2.h b/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/include/libxml2/libxml/SAX2.h new file mode 100644 index 0000000000000000000000000000000000000000..4c4ecce8e598b2bb2011f9daf6367bcc8f028b88 --- /dev/null +++ b/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/include/libxml2/libxml/SAX2.h @@ -0,0 +1,171 @@ +/* + * Summary: SAX2 parser interface used to build the DOM tree + * Description: those are the default SAX2 interfaces used by + * the library when building DOM tree. + * + * Copy: See Copyright for the status of this software. + * + * Author: Daniel Veillard + */ + + +#ifndef __XML_SAX2_H__ +#define __XML_SAX2_H__ + +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif +XMLPUBFUN const xmlChar * + xmlSAX2GetPublicId (void *ctx); +XMLPUBFUN const xmlChar * + xmlSAX2GetSystemId (void *ctx); +XMLPUBFUN void + xmlSAX2SetDocumentLocator (void *ctx, + xmlSAXLocatorPtr loc); + +XMLPUBFUN int + xmlSAX2GetLineNumber (void *ctx); +XMLPUBFUN int + xmlSAX2GetColumnNumber (void *ctx); + +XMLPUBFUN int + xmlSAX2IsStandalone (void *ctx); +XMLPUBFUN int + xmlSAX2HasInternalSubset (void *ctx); +XMLPUBFUN int + xmlSAX2HasExternalSubset (void *ctx); + +XMLPUBFUN void + xmlSAX2InternalSubset (void *ctx, + const xmlChar *name, + const xmlChar *ExternalID, + const xmlChar *SystemID); +XMLPUBFUN void + xmlSAX2ExternalSubset (void *ctx, + const xmlChar *name, + const xmlChar *ExternalID, + const xmlChar *SystemID); +XMLPUBFUN xmlEntityPtr + xmlSAX2GetEntity (void *ctx, + const xmlChar *name); +XMLPUBFUN xmlEntityPtr + xmlSAX2GetParameterEntity (void *ctx, + const xmlChar *name); +XMLPUBFUN xmlParserInputPtr + xmlSAX2ResolveEntity (void *ctx, + const xmlChar *publicId, + const xmlChar *systemId); + +XMLPUBFUN void + xmlSAX2EntityDecl (void *ctx, + const xmlChar *name, + int type, + const xmlChar *publicId, + const xmlChar *systemId, + xmlChar *content); +XMLPUBFUN void + xmlSAX2AttributeDecl (void *ctx, + const xmlChar *elem, + const xmlChar *fullname, + int type, + int def, + const xmlChar *defaultValue, + xmlEnumerationPtr tree); +XMLPUBFUN void + xmlSAX2ElementDecl (void *ctx, + const xmlChar *name, + int type, + xmlElementContentPtr content); +XMLPUBFUN void + xmlSAX2NotationDecl (void *ctx, + const xmlChar *name, + const xmlChar *publicId, + const xmlChar *systemId); +XMLPUBFUN void + xmlSAX2UnparsedEntityDecl (void *ctx, + const xmlChar *name, + const xmlChar *publicId, + const xmlChar *systemId, + const xmlChar *notationName); + +XMLPUBFUN void + xmlSAX2StartDocument (void *ctx); +XMLPUBFUN void + xmlSAX2EndDocument (void *ctx); +#if defined(LIBXML_SAX1_ENABLED) || defined(LIBXML_HTML_ENABLED) || \ + defined(LIBXML_WRITER_ENABLED) || defined(LIBXML_LEGACY_ENABLED) +XMLPUBFUN void + xmlSAX2StartElement (void *ctx, + const xmlChar *fullname, + const xmlChar **atts); +XMLPUBFUN void + xmlSAX2EndElement (void *ctx, + const xmlChar *name); +#endif /* LIBXML_SAX1_ENABLED or LIBXML_HTML_ENABLED or LIBXML_LEGACY_ENABLED */ +XMLPUBFUN void + xmlSAX2StartElementNs (void *ctx, + const xmlChar *localname, + const xmlChar *prefix, + const xmlChar *URI, + int nb_namespaces, + const xmlChar **namespaces, + int nb_attributes, + int nb_defaulted, + const xmlChar **attributes); +XMLPUBFUN void + xmlSAX2EndElementNs (void *ctx, + const xmlChar *localname, + const xmlChar *prefix, + const xmlChar *URI); +XMLPUBFUN void + xmlSAX2Reference (void *ctx, + const xmlChar *name); +XMLPUBFUN void + xmlSAX2Characters (void *ctx, + const xmlChar *ch, + int len); +XMLPUBFUN void + xmlSAX2IgnorableWhitespace (void *ctx, + const xmlChar *ch, + int len); +XMLPUBFUN void + xmlSAX2ProcessingInstruction (void *ctx, + const xmlChar *target, + const xmlChar *data); +XMLPUBFUN void + xmlSAX2Comment (void *ctx, + const xmlChar *value); +XMLPUBFUN void + xmlSAX2CDataBlock (void *ctx, + const xmlChar *value, + int len); + +#ifdef LIBXML_SAX1_ENABLED +XML_DEPRECATED +XMLPUBFUN int + xmlSAXDefaultVersion (int version); +#endif /* LIBXML_SAX1_ENABLED */ + +XMLPUBFUN int + xmlSAXVersion (xmlSAXHandler *hdlr, + int version); +XMLPUBFUN void + xmlSAX2InitDefaultSAXHandler (xmlSAXHandler *hdlr, + int warning); +#ifdef LIBXML_HTML_ENABLED +XMLPUBFUN void + xmlSAX2InitHtmlDefaultSAXHandler(xmlSAXHandler *hdlr); +XML_DEPRECATED +XMLPUBFUN void + htmlDefaultSAXHandlerInit (void); +#endif +XML_DEPRECATED +XMLPUBFUN void + xmlDefaultSAXHandlerInit (void); +#ifdef __cplusplus +} +#endif +#endif /* __XML_SAX2_H__ */ diff --git a/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/include/libxml2/libxml/c14n.h b/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/include/libxml2/libxml/c14n.h new file mode 100644 index 0000000000000000000000000000000000000000..8ccd1cef632e920751aefa6a8b112e2be660bc2d --- /dev/null +++ b/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/include/libxml2/libxml/c14n.h @@ -0,0 +1,115 @@ +/* + * Summary: Provide Canonical XML and Exclusive XML Canonicalization + * Description: the c14n modules provides a + * + * "Canonical XML" implementation + * http://www.w3.org/TR/xml-c14n + * + * and an + * + * "Exclusive XML Canonicalization" implementation + * http://www.w3.org/TR/xml-exc-c14n + + * Copy: See Copyright for the status of this software. + * + * Author: Aleksey Sanin + */ +#ifndef __XML_C14N_H__ +#define __XML_C14N_H__ + +#include + +#ifdef LIBXML_C14N_ENABLED + +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + +/* + * XML Canonicalization + * http://www.w3.org/TR/xml-c14n + * + * Exclusive XML Canonicalization + * http://www.w3.org/TR/xml-exc-c14n + * + * Canonical form of an XML document could be created if and only if + * a) default attributes (if any) are added to all nodes + * b) all character and parsed entity references are resolved + * In order to achieve this in libxml2 the document MUST be loaded with + * following options: XML_PARSE_DTDATTR | XML_PARSE_NOENT + */ + +/* + * xmlC14NMode: + * + * Predefined values for C14N modes + * + */ +typedef enum { + XML_C14N_1_0 = 0, /* Original C14N 1.0 spec */ + XML_C14N_EXCLUSIVE_1_0 = 1, /* Exclusive C14N 1.0 spec */ + XML_C14N_1_1 = 2 /* C14N 1.1 spec */ +} xmlC14NMode; + +XMLPUBFUN int + xmlC14NDocSaveTo (xmlDocPtr doc, + xmlNodeSetPtr nodes, + int mode, /* a xmlC14NMode */ + xmlChar **inclusive_ns_prefixes, + int with_comments, + xmlOutputBufferPtr buf); + +XMLPUBFUN int + xmlC14NDocDumpMemory (xmlDocPtr doc, + xmlNodeSetPtr nodes, + int mode, /* a xmlC14NMode */ + xmlChar **inclusive_ns_prefixes, + int with_comments, + xmlChar **doc_txt_ptr); + +XMLPUBFUN int + xmlC14NDocSave (xmlDocPtr doc, + xmlNodeSetPtr nodes, + int mode, /* a xmlC14NMode */ + xmlChar **inclusive_ns_prefixes, + int with_comments, + const char* filename, + int compression); + + +/** + * This is the core C14N function + */ +/** + * xmlC14NIsVisibleCallback: + * @user_data: user data + * @node: the current node + * @parent: the parent node + * + * Signature for a C14N callback on visible nodes + * + * Returns 1 if the node should be included + */ +typedef int (*xmlC14NIsVisibleCallback) (void* user_data, + xmlNodePtr node, + xmlNodePtr parent); + +XMLPUBFUN int + xmlC14NExecute (xmlDocPtr doc, + xmlC14NIsVisibleCallback is_visible_callback, + void* user_data, + int mode, /* a xmlC14NMode */ + xmlChar **inclusive_ns_prefixes, + int with_comments, + xmlOutputBufferPtr buf); + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + +#endif /* LIBXML_C14N_ENABLED */ +#endif /* __XML_C14N_H__ */ + diff --git a/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/include/libxml2/libxml/catalog.h b/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/include/libxml2/libxml/catalog.h new file mode 100644 index 0000000000000000000000000000000000000000..02fa7ab2a03a95563cf4ccdf7b644c95af1b15c2 --- /dev/null +++ b/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/include/libxml2/libxml/catalog.h @@ -0,0 +1,182 @@ +/** + * Summary: interfaces to the Catalog handling system + * Description: the catalog module implements the support for + * XML Catalogs and SGML catalogs + * + * SGML Open Technical Resolution TR9401:1997. + * http://www.jclark.com/sp/catalog.htm + * + * XML Catalogs Working Draft 06 August 2001 + * http://www.oasis-open.org/committees/entity/spec-2001-08-06.html + * + * Copy: See Copyright for the status of this software. + * + * Author: Daniel Veillard + */ + +#ifndef __XML_CATALOG_H__ +#define __XML_CATALOG_H__ + +#include + +#include +#include +#include + +#ifdef LIBXML_CATALOG_ENABLED + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * XML_CATALOGS_NAMESPACE: + * + * The namespace for the XML Catalogs elements. + */ +#define XML_CATALOGS_NAMESPACE \ + (const xmlChar *) "urn:oasis:names:tc:entity:xmlns:xml:catalog" +/** + * XML_CATALOG_PI: + * + * The specific XML Catalog Processing Instruction name. + */ +#define XML_CATALOG_PI \ + (const xmlChar *) "oasis-xml-catalog" + +/* + * The API is voluntarily limited to general cataloging. + */ +typedef enum { + XML_CATA_PREFER_NONE = 0, + XML_CATA_PREFER_PUBLIC = 1, + XML_CATA_PREFER_SYSTEM +} xmlCatalogPrefer; + +typedef enum { + XML_CATA_ALLOW_NONE = 0, + XML_CATA_ALLOW_GLOBAL = 1, + XML_CATA_ALLOW_DOCUMENT = 2, + XML_CATA_ALLOW_ALL = 3 +} xmlCatalogAllow; + +typedef struct _xmlCatalog xmlCatalog; +typedef xmlCatalog *xmlCatalogPtr; + +/* + * Operations on a given catalog. + */ +XMLPUBFUN xmlCatalogPtr + xmlNewCatalog (int sgml); +XMLPUBFUN xmlCatalogPtr + xmlLoadACatalog (const char *filename); +XMLPUBFUN xmlCatalogPtr + xmlLoadSGMLSuperCatalog (const char *filename); +XMLPUBFUN int + xmlConvertSGMLCatalog (xmlCatalogPtr catal); +XMLPUBFUN int + xmlACatalogAdd (xmlCatalogPtr catal, + const xmlChar *type, + const xmlChar *orig, + const xmlChar *replace); +XMLPUBFUN int + xmlACatalogRemove (xmlCatalogPtr catal, + const xmlChar *value); +XMLPUBFUN xmlChar * + xmlACatalogResolve (xmlCatalogPtr catal, + const xmlChar *pubID, + const xmlChar *sysID); +XMLPUBFUN xmlChar * + xmlACatalogResolveSystem(xmlCatalogPtr catal, + const xmlChar *sysID); +XMLPUBFUN xmlChar * + xmlACatalogResolvePublic(xmlCatalogPtr catal, + const xmlChar *pubID); +XMLPUBFUN xmlChar * + xmlACatalogResolveURI (xmlCatalogPtr catal, + const xmlChar *URI); +#ifdef LIBXML_OUTPUT_ENABLED +XMLPUBFUN void + xmlACatalogDump (xmlCatalogPtr catal, + FILE *out); +#endif /* LIBXML_OUTPUT_ENABLED */ +XMLPUBFUN void + xmlFreeCatalog (xmlCatalogPtr catal); +XMLPUBFUN int + xmlCatalogIsEmpty (xmlCatalogPtr catal); + +/* + * Global operations. + */ +XMLPUBFUN void + xmlInitializeCatalog (void); +XMLPUBFUN int + xmlLoadCatalog (const char *filename); +XMLPUBFUN void + xmlLoadCatalogs (const char *paths); +XMLPUBFUN void + xmlCatalogCleanup (void); +#ifdef LIBXML_OUTPUT_ENABLED +XMLPUBFUN void + xmlCatalogDump (FILE *out); +#endif /* LIBXML_OUTPUT_ENABLED */ +XMLPUBFUN xmlChar * + xmlCatalogResolve (const xmlChar *pubID, + const xmlChar *sysID); +XMLPUBFUN xmlChar * + xmlCatalogResolveSystem (const xmlChar *sysID); +XMLPUBFUN xmlChar * + xmlCatalogResolvePublic (const xmlChar *pubID); +XMLPUBFUN xmlChar * + xmlCatalogResolveURI (const xmlChar *URI); +XMLPUBFUN int + xmlCatalogAdd (const xmlChar *type, + const xmlChar *orig, + const xmlChar *replace); +XMLPUBFUN int + xmlCatalogRemove (const xmlChar *value); +XMLPUBFUN xmlDocPtr + xmlParseCatalogFile (const char *filename); +XMLPUBFUN int + xmlCatalogConvert (void); + +/* + * Strictly minimal interfaces for per-document catalogs used + * by the parser. + */ +XMLPUBFUN void + xmlCatalogFreeLocal (void *catalogs); +XMLPUBFUN void * + xmlCatalogAddLocal (void *catalogs, + const xmlChar *URL); +XMLPUBFUN xmlChar * + xmlCatalogLocalResolve (void *catalogs, + const xmlChar *pubID, + const xmlChar *sysID); +XMLPUBFUN xmlChar * + xmlCatalogLocalResolveURI(void *catalogs, + const xmlChar *URI); +/* + * Preference settings. + */ +XMLPUBFUN int + xmlCatalogSetDebug (int level); +XMLPUBFUN xmlCatalogPrefer + xmlCatalogSetDefaultPrefer(xmlCatalogPrefer prefer); +XMLPUBFUN void + xmlCatalogSetDefaults (xmlCatalogAllow allow); +XMLPUBFUN xmlCatalogAllow + xmlCatalogGetDefaults (void); + + +/* DEPRECATED interfaces */ +XMLPUBFUN const xmlChar * + xmlCatalogGetSystem (const xmlChar *sysID); +XMLPUBFUN const xmlChar * + xmlCatalogGetPublic (const xmlChar *pubID); + +#ifdef __cplusplus +} +#endif +#endif /* LIBXML_CATALOG_ENABLED */ +#endif /* __XML_CATALOG_H__ */ diff --git a/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/include/libxml2/libxml/chvalid.h b/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/include/libxml2/libxml/chvalid.h new file mode 100644 index 0000000000000000000000000000000000000000..8225c95ee865f9639f46bd22db54932f257df52c --- /dev/null +++ b/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/include/libxml2/libxml/chvalid.h @@ -0,0 +1,230 @@ +/* + * Summary: Unicode character range checking + * Description: this module exports interfaces for the character + * range validation APIs + * + * This file is automatically generated from the cvs source + * definition files using the genChRanges.py Python script + * + * Generation date: Mon Mar 27 11:09:48 2006 + * Sources: chvalid.def + * Author: William Brack + */ + +#ifndef __XML_CHVALID_H__ +#define __XML_CHVALID_H__ + +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * Define our typedefs and structures + * + */ +typedef struct _xmlChSRange xmlChSRange; +typedef xmlChSRange *xmlChSRangePtr; +struct _xmlChSRange { + unsigned short low; + unsigned short high; +}; + +typedef struct _xmlChLRange xmlChLRange; +typedef xmlChLRange *xmlChLRangePtr; +struct _xmlChLRange { + unsigned int low; + unsigned int high; +}; + +typedef struct _xmlChRangeGroup xmlChRangeGroup; +typedef xmlChRangeGroup *xmlChRangeGroupPtr; +struct _xmlChRangeGroup { + int nbShortRange; + int nbLongRange; + const xmlChSRange *shortRange; /* points to an array of ranges */ + const xmlChLRange *longRange; +}; + +/** + * Range checking routine + */ +XMLPUBFUN int + xmlCharInRange(unsigned int val, const xmlChRangeGroup *group); + + +/** + * xmlIsBaseChar_ch: + * @c: char to validate + * + * Automatically generated by genChRanges.py + */ +#define xmlIsBaseChar_ch(c) (((0x41 <= (c)) && ((c) <= 0x5a)) || \ + ((0x61 <= (c)) && ((c) <= 0x7a)) || \ + ((0xc0 <= (c)) && ((c) <= 0xd6)) || \ + ((0xd8 <= (c)) && ((c) <= 0xf6)) || \ + (0xf8 <= (c))) + +/** + * xmlIsBaseCharQ: + * @c: char to validate + * + * Automatically generated by genChRanges.py + */ +#define xmlIsBaseCharQ(c) (((c) < 0x100) ? \ + xmlIsBaseChar_ch((c)) : \ + xmlCharInRange((c), &xmlIsBaseCharGroup)) + +XMLPUBVAR const xmlChRangeGroup xmlIsBaseCharGroup; + +/** + * xmlIsBlank_ch: + * @c: char to validate + * + * Automatically generated by genChRanges.py + */ +#define xmlIsBlank_ch(c) (((c) == 0x20) || \ + ((0x9 <= (c)) && ((c) <= 0xa)) || \ + ((c) == 0xd)) + +/** + * xmlIsBlankQ: + * @c: char to validate + * + * Automatically generated by genChRanges.py + */ +#define xmlIsBlankQ(c) (((c) < 0x100) ? \ + xmlIsBlank_ch((c)) : 0) + + +/** + * xmlIsChar_ch: + * @c: char to validate + * + * Automatically generated by genChRanges.py + */ +#define xmlIsChar_ch(c) (((0x9 <= (c)) && ((c) <= 0xa)) || \ + ((c) == 0xd) || \ + (0x20 <= (c))) + +/** + * xmlIsCharQ: + * @c: char to validate + * + * Automatically generated by genChRanges.py + */ +#define xmlIsCharQ(c) (((c) < 0x100) ? \ + xmlIsChar_ch((c)) :\ + (((0x100 <= (c)) && ((c) <= 0xd7ff)) || \ + ((0xe000 <= (c)) && ((c) <= 0xfffd)) || \ + ((0x10000 <= (c)) && ((c) <= 0x10ffff)))) + +XMLPUBVAR const xmlChRangeGroup xmlIsCharGroup; + +/** + * xmlIsCombiningQ: + * @c: char to validate + * + * Automatically generated by genChRanges.py + */ +#define xmlIsCombiningQ(c) (((c) < 0x100) ? \ + 0 : \ + xmlCharInRange((c), &xmlIsCombiningGroup)) + +XMLPUBVAR const xmlChRangeGroup xmlIsCombiningGroup; + +/** + * xmlIsDigit_ch: + * @c: char to validate + * + * Automatically generated by genChRanges.py + */ +#define xmlIsDigit_ch(c) (((0x30 <= (c)) && ((c) <= 0x39))) + +/** + * xmlIsDigitQ: + * @c: char to validate + * + * Automatically generated by genChRanges.py + */ +#define xmlIsDigitQ(c) (((c) < 0x100) ? \ + xmlIsDigit_ch((c)) : \ + xmlCharInRange((c), &xmlIsDigitGroup)) + +XMLPUBVAR const xmlChRangeGroup xmlIsDigitGroup; + +/** + * xmlIsExtender_ch: + * @c: char to validate + * + * Automatically generated by genChRanges.py + */ +#define xmlIsExtender_ch(c) (((c) == 0xb7)) + +/** + * xmlIsExtenderQ: + * @c: char to validate + * + * Automatically generated by genChRanges.py + */ +#define xmlIsExtenderQ(c) (((c) < 0x100) ? \ + xmlIsExtender_ch((c)) : \ + xmlCharInRange((c), &xmlIsExtenderGroup)) + +XMLPUBVAR const xmlChRangeGroup xmlIsExtenderGroup; + +/** + * xmlIsIdeographicQ: + * @c: char to validate + * + * Automatically generated by genChRanges.py + */ +#define xmlIsIdeographicQ(c) (((c) < 0x100) ? \ + 0 :\ + (((0x4e00 <= (c)) && ((c) <= 0x9fa5)) || \ + ((c) == 0x3007) || \ + ((0x3021 <= (c)) && ((c) <= 0x3029)))) + +XMLPUBVAR const xmlChRangeGroup xmlIsIdeographicGroup; +XMLPUBVAR const unsigned char xmlIsPubidChar_tab[256]; + +/** + * xmlIsPubidChar_ch: + * @c: char to validate + * + * Automatically generated by genChRanges.py + */ +#define xmlIsPubidChar_ch(c) (xmlIsPubidChar_tab[(c)]) + +/** + * xmlIsPubidCharQ: + * @c: char to validate + * + * Automatically generated by genChRanges.py + */ +#define xmlIsPubidCharQ(c) (((c) < 0x100) ? \ + xmlIsPubidChar_ch((c)) : 0) + +XMLPUBFUN int + xmlIsBaseChar(unsigned int ch); +XMLPUBFUN int + xmlIsBlank(unsigned int ch); +XMLPUBFUN int + xmlIsChar(unsigned int ch); +XMLPUBFUN int + xmlIsCombining(unsigned int ch); +XMLPUBFUN int + xmlIsDigit(unsigned int ch); +XMLPUBFUN int + xmlIsExtender(unsigned int ch); +XMLPUBFUN int + xmlIsIdeographic(unsigned int ch); +XMLPUBFUN int + xmlIsPubidChar(unsigned int ch); + +#ifdef __cplusplus +} +#endif +#endif /* __XML_CHVALID_H__ */ diff --git a/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/include/libxml2/libxml/debugXML.h b/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/include/libxml2/libxml/debugXML.h new file mode 100644 index 0000000000000000000000000000000000000000..1332dd73d9c774625c00560e9962cffc995f6059 --- /dev/null +++ b/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/include/libxml2/libxml/debugXML.h @@ -0,0 +1,217 @@ +/* + * Summary: Tree debugging APIs + * Description: Interfaces to a set of routines used for debugging the tree + * produced by the XML parser. + * + * Copy: See Copyright for the status of this software. + * + * Author: Daniel Veillard + */ + +#ifndef __DEBUG_XML__ +#define __DEBUG_XML__ +#include +#include +#include + +#ifdef LIBXML_DEBUG_ENABLED + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * The standard Dump routines. + */ +XMLPUBFUN void + xmlDebugDumpString (FILE *output, + const xmlChar *str); +XMLPUBFUN void + xmlDebugDumpAttr (FILE *output, + xmlAttrPtr attr, + int depth); +XMLPUBFUN void + xmlDebugDumpAttrList (FILE *output, + xmlAttrPtr attr, + int depth); +XMLPUBFUN void + xmlDebugDumpOneNode (FILE *output, + xmlNodePtr node, + int depth); +XMLPUBFUN void + xmlDebugDumpNode (FILE *output, + xmlNodePtr node, + int depth); +XMLPUBFUN void + xmlDebugDumpNodeList (FILE *output, + xmlNodePtr node, + int depth); +XMLPUBFUN void + xmlDebugDumpDocumentHead(FILE *output, + xmlDocPtr doc); +XMLPUBFUN void + xmlDebugDumpDocument (FILE *output, + xmlDocPtr doc); +XMLPUBFUN void + xmlDebugDumpDTD (FILE *output, + xmlDtdPtr dtd); +XMLPUBFUN void + xmlDebugDumpEntities (FILE *output, + xmlDocPtr doc); + +/**************************************************************** + * * + * Checking routines * + * * + ****************************************************************/ + +XMLPUBFUN int + xmlDebugCheckDocument (FILE * output, + xmlDocPtr doc); + +/**************************************************************** + * * + * XML shell helpers * + * * + ****************************************************************/ + +XMLPUBFUN void + xmlLsOneNode (FILE *output, xmlNodePtr node); +XMLPUBFUN int + xmlLsCountNode (xmlNodePtr node); + +XMLPUBFUN const char * + xmlBoolToText (int boolval); + +/**************************************************************** + * * + * The XML shell related structures and functions * + * * + ****************************************************************/ + +#ifdef LIBXML_XPATH_ENABLED +/** + * xmlShellReadlineFunc: + * @prompt: a string prompt + * + * This is a generic signature for the XML shell input function. + * + * Returns a string which will be freed by the Shell. + */ +typedef char * (* xmlShellReadlineFunc)(char *prompt); + +/** + * xmlShellCtxt: + * + * A debugging shell context. + * TODO: add the defined function tables. + */ +typedef struct _xmlShellCtxt xmlShellCtxt; +typedef xmlShellCtxt *xmlShellCtxtPtr; +struct _xmlShellCtxt { + char *filename; + xmlDocPtr doc; + xmlNodePtr node; + xmlXPathContextPtr pctxt; + int loaded; + FILE *output; + xmlShellReadlineFunc input; +}; + +/** + * xmlShellCmd: + * @ctxt: a shell context + * @arg: a string argument + * @node: a first node + * @node2: a second node + * + * This is a generic signature for the XML shell functions. + * + * Returns an int, negative returns indicating errors. + */ +typedef int (* xmlShellCmd) (xmlShellCtxtPtr ctxt, + char *arg, + xmlNodePtr node, + xmlNodePtr node2); + +XMLPUBFUN void + xmlShellPrintXPathError (int errorType, + const char *arg); +XMLPUBFUN void + xmlShellPrintXPathResult(xmlXPathObjectPtr list); +XMLPUBFUN int + xmlShellList (xmlShellCtxtPtr ctxt, + char *arg, + xmlNodePtr node, + xmlNodePtr node2); +XMLPUBFUN int + xmlShellBase (xmlShellCtxtPtr ctxt, + char *arg, + xmlNodePtr node, + xmlNodePtr node2); +XMLPUBFUN int + xmlShellDir (xmlShellCtxtPtr ctxt, + char *arg, + xmlNodePtr node, + xmlNodePtr node2); +XMLPUBFUN int + xmlShellLoad (xmlShellCtxtPtr ctxt, + char *filename, + xmlNodePtr node, + xmlNodePtr node2); +#ifdef LIBXML_OUTPUT_ENABLED +XMLPUBFUN void + xmlShellPrintNode (xmlNodePtr node); +XMLPUBFUN int + xmlShellCat (xmlShellCtxtPtr ctxt, + char *arg, + xmlNodePtr node, + xmlNodePtr node2); +XMLPUBFUN int + xmlShellWrite (xmlShellCtxtPtr ctxt, + char *filename, + xmlNodePtr node, + xmlNodePtr node2); +XMLPUBFUN int + xmlShellSave (xmlShellCtxtPtr ctxt, + char *filename, + xmlNodePtr node, + xmlNodePtr node2); +#endif /* LIBXML_OUTPUT_ENABLED */ +#ifdef LIBXML_VALID_ENABLED +XMLPUBFUN int + xmlShellValidate (xmlShellCtxtPtr ctxt, + char *dtd, + xmlNodePtr node, + xmlNodePtr node2); +#endif /* LIBXML_VALID_ENABLED */ +XMLPUBFUN int + xmlShellDu (xmlShellCtxtPtr ctxt, + char *arg, + xmlNodePtr tree, + xmlNodePtr node2); +XMLPUBFUN int + xmlShellPwd (xmlShellCtxtPtr ctxt, + char *buffer, + xmlNodePtr node, + xmlNodePtr node2); + +/* + * The Shell interface. + */ +XMLPUBFUN void + xmlShell (xmlDocPtr doc, + const char *filename, + xmlShellReadlineFunc input, + FILE *output); + +#endif /* LIBXML_XPATH_ENABLED */ + +#ifdef __cplusplus +} +#endif + +#endif /* LIBXML_DEBUG_ENABLED */ +#endif /* __DEBUG_XML__ */ diff --git a/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/include/libxml2/libxml/dict.h b/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/include/libxml2/libxml/dict.h new file mode 100644 index 0000000000000000000000000000000000000000..22aa3d9db8b56b252b28c3ef17b814f6c6df44c0 --- /dev/null +++ b/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/include/libxml2/libxml/dict.h @@ -0,0 +1,82 @@ +/* + * Summary: string dictionary + * Description: dictionary of reusable strings, just used to avoid allocation + * and freeing operations. + * + * Copy: See Copyright for the status of this software. + * + * Author: Daniel Veillard + */ + +#ifndef __XML_DICT_H__ +#define __XML_DICT_H__ + +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * The dictionary. + */ +typedef struct _xmlDict xmlDict; +typedef xmlDict *xmlDictPtr; + +/* + * Initializer + */ +XML_DEPRECATED +XMLPUBFUN int xmlInitializeDict(void); + +/* + * Constructor and destructor. + */ +XMLPUBFUN xmlDictPtr + xmlDictCreate (void); +XMLPUBFUN size_t + xmlDictSetLimit (xmlDictPtr dict, + size_t limit); +XMLPUBFUN size_t + xmlDictGetUsage (xmlDictPtr dict); +XMLPUBFUN xmlDictPtr + xmlDictCreateSub(xmlDictPtr sub); +XMLPUBFUN int + xmlDictReference(xmlDictPtr dict); +XMLPUBFUN void + xmlDictFree (xmlDictPtr dict); + +/* + * Lookup of entry in the dictionary. + */ +XMLPUBFUN const xmlChar * + xmlDictLookup (xmlDictPtr dict, + const xmlChar *name, + int len); +XMLPUBFUN const xmlChar * + xmlDictExists (xmlDictPtr dict, + const xmlChar *name, + int len); +XMLPUBFUN const xmlChar * + xmlDictQLookup (xmlDictPtr dict, + const xmlChar *prefix, + const xmlChar *name); +XMLPUBFUN int + xmlDictOwns (xmlDictPtr dict, + const xmlChar *str); +XMLPUBFUN int + xmlDictSize (xmlDictPtr dict); + +/* + * Cleanup function + */ +XML_DEPRECATED +XMLPUBFUN void + xmlDictCleanup (void); + +#ifdef __cplusplus +} +#endif +#endif /* ! __XML_DICT_H__ */ diff --git a/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/include/libxml2/libxml/encoding.h b/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/include/libxml2/libxml/encoding.h new file mode 100644 index 0000000000000000000000000000000000000000..599a03e12cd5c47d181500371ebe1e6579d4e02d --- /dev/null +++ b/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/include/libxml2/libxml/encoding.h @@ -0,0 +1,244 @@ +/* + * Summary: interface for the encoding conversion functions + * Description: interface for the encoding conversion functions needed for + * XML basic encoding and iconv() support. + * + * Related specs are + * rfc2044 (UTF-8 and UTF-16) F. Yergeau Alis Technologies + * [ISO-10646] UTF-8 and UTF-16 in Annexes + * [ISO-8859-1] ISO Latin-1 characters codes. + * [UNICODE] The Unicode Consortium, "The Unicode Standard -- + * Worldwide Character Encoding -- Version 1.0", Addison- + * Wesley, Volume 1, 1991, Volume 2, 1992. UTF-8 is + * described in Unicode Technical Report #4. + * [US-ASCII] Coded Character Set--7-bit American Standard Code for + * Information Interchange, ANSI X3.4-1986. + * + * Copy: See Copyright for the status of this software. + * + * Author: Daniel Veillard + */ + +#ifndef __XML_CHAR_ENCODING_H__ +#define __XML_CHAR_ENCODING_H__ + +#include + +#ifdef LIBXML_ICONV_ENABLED +#include +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +typedef enum { + XML_ENC_ERR_SUCCESS = 0, + XML_ENC_ERR_SPACE = -1, + XML_ENC_ERR_INPUT = -2, + XML_ENC_ERR_PARTIAL = -3, + XML_ENC_ERR_INTERNAL = -4, + XML_ENC_ERR_MEMORY = -5 +} xmlCharEncError; + +/* + * xmlCharEncoding: + * + * Predefined values for some standard encodings. + * Libxml does not do beforehand translation on UTF8 and ISOLatinX. + * It also supports ASCII, ISO-8859-1, and UTF16 (LE and BE) by default. + * + * Anything else would have to be translated to UTF8 before being + * given to the parser itself. The BOM for UTF16 and the encoding + * declaration are looked at and a converter is looked for at that + * point. If not found the parser stops here as asked by the XML REC. A + * converter can be registered by the user using xmlRegisterCharEncodingHandler + * but the current form doesn't allow stateful transcoding (a serious + * problem agreed !). If iconv has been found it will be used + * automatically and allow stateful transcoding, the simplest is then + * to be sure to enable iconv and to provide iconv libs for the encoding + * support needed. + * + * Note that the generic "UTF-16" is not a predefined value. Instead, only + * the specific UTF-16LE and UTF-16BE are present. + */ +typedef enum { + XML_CHAR_ENCODING_ERROR= -1, /* No char encoding detected */ + XML_CHAR_ENCODING_NONE= 0, /* No char encoding detected */ + XML_CHAR_ENCODING_UTF8= 1, /* UTF-8 */ + XML_CHAR_ENCODING_UTF16LE= 2, /* UTF-16 little endian */ + XML_CHAR_ENCODING_UTF16BE= 3, /* UTF-16 big endian */ + XML_CHAR_ENCODING_UCS4LE= 4, /* UCS-4 little endian */ + XML_CHAR_ENCODING_UCS4BE= 5, /* UCS-4 big endian */ + XML_CHAR_ENCODING_EBCDIC= 6, /* EBCDIC uh! */ + XML_CHAR_ENCODING_UCS4_2143=7, /* UCS-4 unusual ordering */ + XML_CHAR_ENCODING_UCS4_3412=8, /* UCS-4 unusual ordering */ + XML_CHAR_ENCODING_UCS2= 9, /* UCS-2 */ + XML_CHAR_ENCODING_8859_1= 10,/* ISO-8859-1 ISO Latin 1 */ + XML_CHAR_ENCODING_8859_2= 11,/* ISO-8859-2 ISO Latin 2 */ + XML_CHAR_ENCODING_8859_3= 12,/* ISO-8859-3 */ + XML_CHAR_ENCODING_8859_4= 13,/* ISO-8859-4 */ + XML_CHAR_ENCODING_8859_5= 14,/* ISO-8859-5 */ + XML_CHAR_ENCODING_8859_6= 15,/* ISO-8859-6 */ + XML_CHAR_ENCODING_8859_7= 16,/* ISO-8859-7 */ + XML_CHAR_ENCODING_8859_8= 17,/* ISO-8859-8 */ + XML_CHAR_ENCODING_8859_9= 18,/* ISO-8859-9 */ + XML_CHAR_ENCODING_2022_JP= 19,/* ISO-2022-JP */ + XML_CHAR_ENCODING_SHIFT_JIS=20,/* Shift_JIS */ + XML_CHAR_ENCODING_EUC_JP= 21,/* EUC-JP */ + XML_CHAR_ENCODING_ASCII= 22 /* pure ASCII */ +} xmlCharEncoding; + +/** + * xmlCharEncodingInputFunc: + * @out: a pointer to an array of bytes to store the UTF-8 result + * @outlen: the length of @out + * @in: a pointer to an array of chars in the original encoding + * @inlen: the length of @in + * + * Take a block of chars in the original encoding and try to convert + * it to an UTF-8 block of chars out. + * + * Returns the number of bytes written, -1 if lack of space, or -2 + * if the transcoding failed. + * The value of @inlen after return is the number of octets consumed + * if the return value is positive, else unpredictiable. + * The value of @outlen after return is the number of octets consumed. + */ +typedef int (* xmlCharEncodingInputFunc)(unsigned char *out, int *outlen, + const unsigned char *in, int *inlen); + + +/** + * xmlCharEncodingOutputFunc: + * @out: a pointer to an array of bytes to store the result + * @outlen: the length of @out + * @in: a pointer to an array of UTF-8 chars + * @inlen: the length of @in + * + * Take a block of UTF-8 chars in and try to convert it to another + * encoding. + * Note: a first call designed to produce heading info is called with + * in = NULL. If stateful this should also initialize the encoder state. + * + * Returns the number of bytes written, -1 if lack of space, or -2 + * if the transcoding failed. + * The value of @inlen after return is the number of octets consumed + * if the return value is positive, else unpredictiable. + * The value of @outlen after return is the number of octets produced. + */ +typedef int (* xmlCharEncodingOutputFunc)(unsigned char *out, int *outlen, + const unsigned char *in, int *inlen); + + +/* + * Block defining the handlers for non UTF-8 encodings. + * If iconv is supported, there are two extra fields. + */ +typedef struct _xmlCharEncodingHandler xmlCharEncodingHandler; +typedef xmlCharEncodingHandler *xmlCharEncodingHandlerPtr; +struct _xmlCharEncodingHandler { + char *name; + xmlCharEncodingInputFunc input; + xmlCharEncodingOutputFunc output; +#ifdef LIBXML_ICONV_ENABLED + iconv_t iconv_in; + iconv_t iconv_out; +#endif /* LIBXML_ICONV_ENABLED */ +#ifdef LIBXML_ICU_ENABLED + struct _uconv_t *uconv_in; + struct _uconv_t *uconv_out; +#endif /* LIBXML_ICU_ENABLED */ +}; + +/* + * Interfaces for encoding handlers. + */ +XML_DEPRECATED +XMLPUBFUN void + xmlInitCharEncodingHandlers (void); +XML_DEPRECATED +XMLPUBFUN void + xmlCleanupCharEncodingHandlers (void); +XMLPUBFUN void + xmlRegisterCharEncodingHandler (xmlCharEncodingHandlerPtr handler); +XMLPUBFUN int + xmlLookupCharEncodingHandler (xmlCharEncoding enc, + xmlCharEncodingHandlerPtr *out); +XMLPUBFUN int + xmlOpenCharEncodingHandler (const char *name, + int output, + xmlCharEncodingHandlerPtr *out); +XMLPUBFUN xmlCharEncodingHandlerPtr + xmlGetCharEncodingHandler (xmlCharEncoding enc); +XMLPUBFUN xmlCharEncodingHandlerPtr + xmlFindCharEncodingHandler (const char *name); +XMLPUBFUN xmlCharEncodingHandlerPtr + xmlNewCharEncodingHandler (const char *name, + xmlCharEncodingInputFunc input, + xmlCharEncodingOutputFunc output); + +/* + * Interfaces for encoding names and aliases. + */ +XMLPUBFUN int + xmlAddEncodingAlias (const char *name, + const char *alias); +XMLPUBFUN int + xmlDelEncodingAlias (const char *alias); +XMLPUBFUN const char * + xmlGetEncodingAlias (const char *alias); +XMLPUBFUN void + xmlCleanupEncodingAliases (void); +XMLPUBFUN xmlCharEncoding + xmlParseCharEncoding (const char *name); +XMLPUBFUN const char * + xmlGetCharEncodingName (xmlCharEncoding enc); + +/* + * Interfaces directly used by the parsers. + */ +XMLPUBFUN xmlCharEncoding + xmlDetectCharEncoding (const unsigned char *in, + int len); + +/** DOC_DISABLE */ +struct _xmlBuffer; +/** DOC_ENABLE */ +XMLPUBFUN int + xmlCharEncOutFunc (xmlCharEncodingHandler *handler, + struct _xmlBuffer *out, + struct _xmlBuffer *in); + +XMLPUBFUN int + xmlCharEncInFunc (xmlCharEncodingHandler *handler, + struct _xmlBuffer *out, + struct _xmlBuffer *in); +XML_DEPRECATED +XMLPUBFUN int + xmlCharEncFirstLine (xmlCharEncodingHandler *handler, + struct _xmlBuffer *out, + struct _xmlBuffer *in); +XMLPUBFUN int + xmlCharEncCloseFunc (xmlCharEncodingHandler *handler); + +/* + * Export a few useful functions + */ +#ifdef LIBXML_OUTPUT_ENABLED +XMLPUBFUN int + UTF8Toisolat1 (unsigned char *out, + int *outlen, + const unsigned char *in, + int *inlen); +#endif /* LIBXML_OUTPUT_ENABLED */ +XMLPUBFUN int + isolat1ToUTF8 (unsigned char *out, + int *outlen, + const unsigned char *in, + int *inlen); +#ifdef __cplusplus +} +#endif + +#endif /* __XML_CHAR_ENCODING_H__ */ diff --git a/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/include/libxml2/libxml/entities.h b/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/include/libxml2/libxml/entities.h new file mode 100644 index 0000000000000000000000000000000000000000..a0cfca8133f660b2b93d069003c0f69ca36c34fc --- /dev/null +++ b/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/include/libxml2/libxml/entities.h @@ -0,0 +1,166 @@ +/* + * Summary: interface for the XML entities handling + * Description: this module provides some of the entity API needed + * for the parser and applications. + * + * Copy: See Copyright for the status of this software. + * + * Author: Daniel Veillard + */ + +#ifndef __XML_ENTITIES_H__ +#define __XML_ENTITIES_H__ + +/** DOC_DISABLE */ +#include +#define XML_TREE_INTERNALS +#include +#undef XML_TREE_INTERNALS +/** DOC_ENABLE */ + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * The different valid entity types. + */ +typedef enum { + XML_INTERNAL_GENERAL_ENTITY = 1, + XML_EXTERNAL_GENERAL_PARSED_ENTITY = 2, + XML_EXTERNAL_GENERAL_UNPARSED_ENTITY = 3, + XML_INTERNAL_PARAMETER_ENTITY = 4, + XML_EXTERNAL_PARAMETER_ENTITY = 5, + XML_INTERNAL_PREDEFINED_ENTITY = 6 +} xmlEntityType; + +/* + * An unit of storage for an entity, contains the string, the value + * and the linkind data needed for the linking in the hash table. + */ + +struct _xmlEntity { + void *_private; /* application data */ + xmlElementType type; /* XML_ENTITY_DECL, must be second ! */ + const xmlChar *name; /* Entity name */ + struct _xmlNode *children; /* First child link */ + struct _xmlNode *last; /* Last child link */ + struct _xmlDtd *parent; /* -> DTD */ + struct _xmlNode *next; /* next sibling link */ + struct _xmlNode *prev; /* previous sibling link */ + struct _xmlDoc *doc; /* the containing document */ + + xmlChar *orig; /* content without ref substitution */ + xmlChar *content; /* content or ndata if unparsed */ + int length; /* the content length */ + xmlEntityType etype; /* The entity type */ + const xmlChar *ExternalID; /* External identifier for PUBLIC */ + const xmlChar *SystemID; /* URI for a SYSTEM or PUBLIC Entity */ + + struct _xmlEntity *nexte; /* unused */ + const xmlChar *URI; /* the full URI as computed */ + int owner; /* unused */ + int flags; /* various flags */ + unsigned long expandedSize; /* expanded size */ +}; + +/* + * All entities are stored in an hash table. + * There is 2 separate hash tables for global and parameter entities. + */ + +typedef struct _xmlHashTable xmlEntitiesTable; +typedef xmlEntitiesTable *xmlEntitiesTablePtr; + +/* + * External functions: + */ + +#ifdef LIBXML_LEGACY_ENABLED +XML_DEPRECATED +XMLPUBFUN void + xmlInitializePredefinedEntities (void); +#endif /* LIBXML_LEGACY_ENABLED */ + +XMLPUBFUN xmlEntityPtr + xmlNewEntity (xmlDocPtr doc, + const xmlChar *name, + int type, + const xmlChar *ExternalID, + const xmlChar *SystemID, + const xmlChar *content); +XMLPUBFUN void + xmlFreeEntity (xmlEntityPtr entity); +XMLPUBFUN int + xmlAddEntity (xmlDocPtr doc, + int extSubset, + const xmlChar *name, + int type, + const xmlChar *ExternalID, + const xmlChar *SystemID, + const xmlChar *content, + xmlEntityPtr *out); +XMLPUBFUN xmlEntityPtr + xmlAddDocEntity (xmlDocPtr doc, + const xmlChar *name, + int type, + const xmlChar *ExternalID, + const xmlChar *SystemID, + const xmlChar *content); +XMLPUBFUN xmlEntityPtr + xmlAddDtdEntity (xmlDocPtr doc, + const xmlChar *name, + int type, + const xmlChar *ExternalID, + const xmlChar *SystemID, + const xmlChar *content); +XMLPUBFUN xmlEntityPtr + xmlGetPredefinedEntity (const xmlChar *name); +XMLPUBFUN xmlEntityPtr + xmlGetDocEntity (const xmlDoc *doc, + const xmlChar *name); +XMLPUBFUN xmlEntityPtr + xmlGetDtdEntity (xmlDocPtr doc, + const xmlChar *name); +XMLPUBFUN xmlEntityPtr + xmlGetParameterEntity (xmlDocPtr doc, + const xmlChar *name); +#ifdef LIBXML_LEGACY_ENABLED +XML_DEPRECATED +XMLPUBFUN const xmlChar * + xmlEncodeEntities (xmlDocPtr doc, + const xmlChar *input); +#endif /* LIBXML_LEGACY_ENABLED */ +XMLPUBFUN xmlChar * + xmlEncodeEntitiesReentrant(xmlDocPtr doc, + const xmlChar *input); +XMLPUBFUN xmlChar * + xmlEncodeSpecialChars (const xmlDoc *doc, + const xmlChar *input); +XMLPUBFUN xmlEntitiesTablePtr + xmlCreateEntitiesTable (void); +#ifdef LIBXML_TREE_ENABLED +XMLPUBFUN xmlEntitiesTablePtr + xmlCopyEntitiesTable (xmlEntitiesTablePtr table); +#endif /* LIBXML_TREE_ENABLED */ +XMLPUBFUN void + xmlFreeEntitiesTable (xmlEntitiesTablePtr table); +#ifdef LIBXML_OUTPUT_ENABLED +XMLPUBFUN void + xmlDumpEntitiesTable (xmlBufferPtr buf, + xmlEntitiesTablePtr table); +XMLPUBFUN void + xmlDumpEntityDecl (xmlBufferPtr buf, + xmlEntityPtr ent); +#endif /* LIBXML_OUTPUT_ENABLED */ +#ifdef LIBXML_LEGACY_ENABLED +XMLPUBFUN void + xmlCleanupPredefinedEntities(void); +#endif /* LIBXML_LEGACY_ENABLED */ + + +#ifdef __cplusplus +} +#endif + +# endif /* __XML_ENTITIES_H__ */ diff --git a/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/include/libxml2/libxml/globals.h b/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/include/libxml2/libxml/globals.h new file mode 100644 index 0000000000000000000000000000000000000000..92f41312f549efa176e48dd719c1652cfc21ef34 --- /dev/null +++ b/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/include/libxml2/libxml/globals.h @@ -0,0 +1,41 @@ +/* + * Summary: interface for all global variables of the library + * Description: Deprecated, don't use + * + * Copy: See Copyright for the status of this software. + */ + +#ifndef __XML_GLOBALS_H +#define __XML_GLOBALS_H + +#include + +/* + * This file was required to access global variables until version v2.12.0. + * + * These includes are for backward compatibility. + */ +#include +#include +#include +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +typedef struct _xmlGlobalState xmlGlobalState; +typedef xmlGlobalState *xmlGlobalStatePtr; + +XML_DEPRECATED XMLPUBFUN void +xmlInitializeGlobalState(xmlGlobalStatePtr gs); +XML_DEPRECATED XMLPUBFUN +xmlGlobalStatePtr xmlGetGlobalState(void); + +#ifdef __cplusplus +} +#endif + +#endif /* __XML_GLOBALS_H */ diff --git a/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/include/libxml2/libxml/hash.h b/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/include/libxml2/libxml/hash.h new file mode 100644 index 0000000000000000000000000000000000000000..135b69669b38b65abc7ef51476ad532f2923042e --- /dev/null +++ b/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/include/libxml2/libxml/hash.h @@ -0,0 +1,251 @@ +/* + * Summary: Chained hash tables + * Description: This module implements the hash table support used in + * various places in the library. + * + * Copy: See Copyright for the status of this software. + * + * Author: Bjorn Reese + */ + +#ifndef __XML_HASH_H__ +#define __XML_HASH_H__ + +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * The hash table. + */ +typedef struct _xmlHashTable xmlHashTable; +typedef xmlHashTable *xmlHashTablePtr; + +/* + * Recent version of gcc produce a warning when a function pointer is assigned + * to an object pointer, or vice versa. The following macro is a dirty hack + * to allow suppression of the warning. If your architecture has function + * pointers which are a different size than a void pointer, there may be some + * serious trouble within the library. + */ +/** + * XML_CAST_FPTR: + * @fptr: pointer to a function + * + * Macro to do a casting from an object pointer to a + * function pointer without encountering a warning from + * gcc + * + * #define XML_CAST_FPTR(fptr) (*(void **)(&fptr)) + * This macro violated ISO C aliasing rules (gcc4 on s390 broke) + * so it is disabled now + */ + +#define XML_CAST_FPTR(fptr) fptr + +/* + * function types: + */ +/** + * xmlHashDeallocator: + * @payload: the data in the hash + * @name: the name associated + * + * Callback to free data from a hash. + */ +typedef void (*xmlHashDeallocator)(void *payload, const xmlChar *name); +/** + * xmlHashCopier: + * @payload: the data in the hash + * @name: the name associated + * + * Callback to copy data from a hash. + * + * Returns a copy of the data or NULL in case of error. + */ +typedef void *(*xmlHashCopier)(void *payload, const xmlChar *name); +/** + * xmlHashScanner: + * @payload: the data in the hash + * @data: extra scanner data + * @name: the name associated + * + * Callback when scanning data in a hash with the simple scanner. + */ +typedef void (*xmlHashScanner)(void *payload, void *data, const xmlChar *name); +/** + * xmlHashScannerFull: + * @payload: the data in the hash + * @data: extra scanner data + * @name: the name associated + * @name2: the second name associated + * @name3: the third name associated + * + * Callback when scanning data in a hash with the full scanner. + */ +typedef void (*xmlHashScannerFull)(void *payload, void *data, + const xmlChar *name, const xmlChar *name2, + const xmlChar *name3); + +/* + * Constructor and destructor. + */ +XMLPUBFUN xmlHashTablePtr + xmlHashCreate (int size); +XMLPUBFUN xmlHashTablePtr + xmlHashCreateDict (int size, + xmlDictPtr dict); +XMLPUBFUN void + xmlHashFree (xmlHashTablePtr hash, + xmlHashDeallocator dealloc); +XMLPUBFUN void + xmlHashDefaultDeallocator(void *entry, + const xmlChar *name); + +/* + * Add a new entry to the hash table. + */ +XMLPUBFUN int + xmlHashAdd (xmlHashTablePtr hash, + const xmlChar *name, + void *userdata); +XMLPUBFUN int + xmlHashAddEntry (xmlHashTablePtr hash, + const xmlChar *name, + void *userdata); +XMLPUBFUN int + xmlHashUpdateEntry (xmlHashTablePtr hash, + const xmlChar *name, + void *userdata, + xmlHashDeallocator dealloc); +XMLPUBFUN int + xmlHashAdd2 (xmlHashTablePtr hash, + const xmlChar *name, + const xmlChar *name2, + void *userdata); +XMLPUBFUN int + xmlHashAddEntry2 (xmlHashTablePtr hash, + const xmlChar *name, + const xmlChar *name2, + void *userdata); +XMLPUBFUN int + xmlHashUpdateEntry2 (xmlHashTablePtr hash, + const xmlChar *name, + const xmlChar *name2, + void *userdata, + xmlHashDeallocator dealloc); +XMLPUBFUN int + xmlHashAdd3 (xmlHashTablePtr hash, + const xmlChar *name, + const xmlChar *name2, + const xmlChar *name3, + void *userdata); +XMLPUBFUN int + xmlHashAddEntry3 (xmlHashTablePtr hash, + const xmlChar *name, + const xmlChar *name2, + const xmlChar *name3, + void *userdata); +XMLPUBFUN int + xmlHashUpdateEntry3 (xmlHashTablePtr hash, + const xmlChar *name, + const xmlChar *name2, + const xmlChar *name3, + void *userdata, + xmlHashDeallocator dealloc); + +/* + * Remove an entry from the hash table. + */ +XMLPUBFUN int + xmlHashRemoveEntry (xmlHashTablePtr hash, + const xmlChar *name, + xmlHashDeallocator dealloc); +XMLPUBFUN int + xmlHashRemoveEntry2 (xmlHashTablePtr hash, + const xmlChar *name, + const xmlChar *name2, + xmlHashDeallocator dealloc); +XMLPUBFUN int + xmlHashRemoveEntry3 (xmlHashTablePtr hash, + const xmlChar *name, + const xmlChar *name2, + const xmlChar *name3, + xmlHashDeallocator dealloc); + +/* + * Retrieve the payload. + */ +XMLPUBFUN void * + xmlHashLookup (xmlHashTablePtr hash, + const xmlChar *name); +XMLPUBFUN void * + xmlHashLookup2 (xmlHashTablePtr hash, + const xmlChar *name, + const xmlChar *name2); +XMLPUBFUN void * + xmlHashLookup3 (xmlHashTablePtr hash, + const xmlChar *name, + const xmlChar *name2, + const xmlChar *name3); +XMLPUBFUN void * + xmlHashQLookup (xmlHashTablePtr hash, + const xmlChar *prefix, + const xmlChar *name); +XMLPUBFUN void * + xmlHashQLookup2 (xmlHashTablePtr hash, + const xmlChar *prefix, + const xmlChar *name, + const xmlChar *prefix2, + const xmlChar *name2); +XMLPUBFUN void * + xmlHashQLookup3 (xmlHashTablePtr hash, + const xmlChar *prefix, + const xmlChar *name, + const xmlChar *prefix2, + const xmlChar *name2, + const xmlChar *prefix3, + const xmlChar *name3); + +/* + * Helpers. + */ +XMLPUBFUN xmlHashTablePtr + xmlHashCopySafe (xmlHashTablePtr hash, + xmlHashCopier copy, + xmlHashDeallocator dealloc); +XMLPUBFUN xmlHashTablePtr + xmlHashCopy (xmlHashTablePtr hash, + xmlHashCopier copy); +XMLPUBFUN int + xmlHashSize (xmlHashTablePtr hash); +XMLPUBFUN void + xmlHashScan (xmlHashTablePtr hash, + xmlHashScanner scan, + void *data); +XMLPUBFUN void + xmlHashScan3 (xmlHashTablePtr hash, + const xmlChar *name, + const xmlChar *name2, + const xmlChar *name3, + xmlHashScanner scan, + void *data); +XMLPUBFUN void + xmlHashScanFull (xmlHashTablePtr hash, + xmlHashScannerFull scan, + void *data); +XMLPUBFUN void + xmlHashScanFull3 (xmlHashTablePtr hash, + const xmlChar *name, + const xmlChar *name2, + const xmlChar *name3, + xmlHashScannerFull scan, + void *data); +#ifdef __cplusplus +} +#endif +#endif /* ! __XML_HASH_H__ */ diff --git a/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/include/libxml2/libxml/list.h b/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/include/libxml2/libxml/list.h new file mode 100644 index 0000000000000000000000000000000000000000..1fa76aff0847fd3de18c942f5037bf6f12bbbb56 --- /dev/null +++ b/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/include/libxml2/libxml/list.h @@ -0,0 +1,137 @@ +/* + * Summary: lists interfaces + * Description: this module implement the list support used in + * various place in the library. + * + * Copy: See Copyright for the status of this software. + * + * Author: Gary Pennington + */ + +#ifndef __XML_LINK_INCLUDE__ +#define __XML_LINK_INCLUDE__ + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +typedef struct _xmlLink xmlLink; +typedef xmlLink *xmlLinkPtr; + +typedef struct _xmlList xmlList; +typedef xmlList *xmlListPtr; + +/** + * xmlListDeallocator: + * @lk: the data to deallocate + * + * Callback function used to free data from a list. + */ +typedef void (*xmlListDeallocator) (xmlLinkPtr lk); +/** + * xmlListDataCompare: + * @data0: the first data + * @data1: the second data + * + * Callback function used to compare 2 data. + * + * Returns 0 is equality, -1 or 1 otherwise depending on the ordering. + */ +typedef int (*xmlListDataCompare) (const void *data0, const void *data1); +/** + * xmlListWalker: + * @data: the data found in the list + * @user: extra user provided data to the walker + * + * Callback function used when walking a list with xmlListWalk(). + * + * Returns 0 to stop walking the list, 1 otherwise. + */ +typedef int (*xmlListWalker) (const void *data, void *user); + +/* Creation/Deletion */ +XMLPUBFUN xmlListPtr + xmlListCreate (xmlListDeallocator deallocator, + xmlListDataCompare compare); +XMLPUBFUN void + xmlListDelete (xmlListPtr l); + +/* Basic Operators */ +XMLPUBFUN void * + xmlListSearch (xmlListPtr l, + void *data); +XMLPUBFUN void * + xmlListReverseSearch (xmlListPtr l, + void *data); +XMLPUBFUN int + xmlListInsert (xmlListPtr l, + void *data) ; +XMLPUBFUN int + xmlListAppend (xmlListPtr l, + void *data) ; +XMLPUBFUN int + xmlListRemoveFirst (xmlListPtr l, + void *data); +XMLPUBFUN int + xmlListRemoveLast (xmlListPtr l, + void *data); +XMLPUBFUN int + xmlListRemoveAll (xmlListPtr l, + void *data); +XMLPUBFUN void + xmlListClear (xmlListPtr l); +XMLPUBFUN int + xmlListEmpty (xmlListPtr l); +XMLPUBFUN xmlLinkPtr + xmlListFront (xmlListPtr l); +XMLPUBFUN xmlLinkPtr + xmlListEnd (xmlListPtr l); +XMLPUBFUN int + xmlListSize (xmlListPtr l); + +XMLPUBFUN void + xmlListPopFront (xmlListPtr l); +XMLPUBFUN void + xmlListPopBack (xmlListPtr l); +XMLPUBFUN int + xmlListPushFront (xmlListPtr l, + void *data); +XMLPUBFUN int + xmlListPushBack (xmlListPtr l, + void *data); + +/* Advanced Operators */ +XMLPUBFUN void + xmlListReverse (xmlListPtr l); +XMLPUBFUN void + xmlListSort (xmlListPtr l); +XMLPUBFUN void + xmlListWalk (xmlListPtr l, + xmlListWalker walker, + void *user); +XMLPUBFUN void + xmlListReverseWalk (xmlListPtr l, + xmlListWalker walker, + void *user); +XMLPUBFUN void + xmlListMerge (xmlListPtr l1, + xmlListPtr l2); +XMLPUBFUN xmlListPtr + xmlListDup (xmlListPtr old); +XMLPUBFUN int + xmlListCopy (xmlListPtr cur, + xmlListPtr old); +/* Link operators */ +XMLPUBFUN void * + xmlLinkGetData (xmlLinkPtr lk); + +/* xmlListUnique() */ +/* xmlListSwap */ + +#ifdef __cplusplus +} +#endif + +#endif /* __XML_LINK_INCLUDE__ */ diff --git a/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/include/libxml2/libxml/nanoftp.h b/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/include/libxml2/libxml/nanoftp.h new file mode 100644 index 0000000000000000000000000000000000000000..ed3ac4f1fd2d68901d0066a5eae3dd904a8634ea --- /dev/null +++ b/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/include/libxml2/libxml/nanoftp.h @@ -0,0 +1,186 @@ +/* + * Summary: minimal FTP implementation + * Description: minimal FTP implementation allowing to fetch resources + * like external subset. This module is DEPRECATED, do not + * use any of its functions. + * + * Copy: See Copyright for the status of this software. + * + * Author: Daniel Veillard + */ + +#ifndef __NANO_FTP_H__ +#define __NANO_FTP_H__ + +#include + +#if defined(LIBXML_FTP_ENABLED) + +/* Needed for portability to Windows 64 bits */ +#if defined(_WIN32) +#include +#else +/** + * SOCKET: + * + * macro used to provide portability of code to windows sockets + */ +#define SOCKET int +/** + * INVALID_SOCKET: + * + * macro used to provide portability of code to windows sockets + * the value to be used when the socket is not valid + */ +#undef INVALID_SOCKET +#define INVALID_SOCKET (-1) +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * ftpListCallback: + * @userData: user provided data for the callback + * @filename: the file name (including "->" when links are shown) + * @attrib: the attribute string + * @owner: the owner string + * @group: the group string + * @size: the file size + * @links: the link count + * @year: the year + * @month: the month + * @day: the day + * @hour: the hour + * @minute: the minute + * + * A callback for the xmlNanoFTPList command. + * Note that only one of year and day:minute are specified. + */ +typedef void (*ftpListCallback) (void *userData, + const char *filename, const char *attrib, + const char *owner, const char *group, + unsigned long size, int links, int year, + const char *month, int day, int hour, + int minute); +/** + * ftpDataCallback: + * @userData: the user provided context + * @data: the data received + * @len: its size in bytes + * + * A callback for the xmlNanoFTPGet command. + */ +typedef void (*ftpDataCallback) (void *userData, + const char *data, + int len); + +/* + * Init + */ +XML_DEPRECATED +XMLPUBFUN void + xmlNanoFTPInit (void); +XML_DEPRECATED +XMLPUBFUN void + xmlNanoFTPCleanup (void); + +/* + * Creating/freeing contexts. + */ +XML_DEPRECATED +XMLPUBFUN void * + xmlNanoFTPNewCtxt (const char *URL); +XML_DEPRECATED +XMLPUBFUN void + xmlNanoFTPFreeCtxt (void * ctx); +XML_DEPRECATED +XMLPUBFUN void * + xmlNanoFTPConnectTo (const char *server, + int port); +/* + * Opening/closing session connections. + */ +XML_DEPRECATED +XMLPUBFUN void * + xmlNanoFTPOpen (const char *URL); +XML_DEPRECATED +XMLPUBFUN int + xmlNanoFTPConnect (void *ctx); +XML_DEPRECATED +XMLPUBFUN int + xmlNanoFTPClose (void *ctx); +XML_DEPRECATED +XMLPUBFUN int + xmlNanoFTPQuit (void *ctx); +XML_DEPRECATED +XMLPUBFUN void + xmlNanoFTPScanProxy (const char *URL); +XML_DEPRECATED +XMLPUBFUN void + xmlNanoFTPProxy (const char *host, + int port, + const char *user, + const char *passwd, + int type); +XML_DEPRECATED +XMLPUBFUN int + xmlNanoFTPUpdateURL (void *ctx, + const char *URL); + +/* + * Rather internal commands. + */ +XML_DEPRECATED +XMLPUBFUN int + xmlNanoFTPGetResponse (void *ctx); +XML_DEPRECATED +XMLPUBFUN int + xmlNanoFTPCheckResponse (void *ctx); + +/* + * CD/DIR/GET handlers. + */ +XML_DEPRECATED +XMLPUBFUN int + xmlNanoFTPCwd (void *ctx, + const char *directory); +XML_DEPRECATED +XMLPUBFUN int + xmlNanoFTPDele (void *ctx, + const char *file); + +XML_DEPRECATED +XMLPUBFUN SOCKET + xmlNanoFTPGetConnection (void *ctx); +XML_DEPRECATED +XMLPUBFUN int + xmlNanoFTPCloseConnection(void *ctx); +XML_DEPRECATED +XMLPUBFUN int + xmlNanoFTPList (void *ctx, + ftpListCallback callback, + void *userData, + const char *filename); +XML_DEPRECATED +XMLPUBFUN SOCKET + xmlNanoFTPGetSocket (void *ctx, + const char *filename); +XML_DEPRECATED +XMLPUBFUN int + xmlNanoFTPGet (void *ctx, + ftpDataCallback callback, + void *userData, + const char *filename); +XML_DEPRECATED +XMLPUBFUN int + xmlNanoFTPRead (void *ctx, + void *dest, + int len); + +#ifdef __cplusplus +} +#endif +#endif /* defined(LIBXML_FTP_ENABLED) || defined(LIBXML_LEGACY_ENABLED) */ +#endif /* __NANO_FTP_H__ */ diff --git a/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/include/libxml2/libxml/nanohttp.h b/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/include/libxml2/libxml/nanohttp.h new file mode 100644 index 0000000000000000000000000000000000000000..c70d1c26bb880ccdfcee16d2c79f69d1d3472518 --- /dev/null +++ b/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/include/libxml2/libxml/nanohttp.h @@ -0,0 +1,98 @@ +/* + * Summary: minimal HTTP implementation + * Description: minimal HTTP implementation allowing to fetch resources + * like external subset. + * + * Copy: See Copyright for the status of this software. + * + * Author: Daniel Veillard + */ + +#ifndef __NANO_HTTP_H__ +#define __NANO_HTTP_H__ + +#include + +#ifdef LIBXML_HTTP_ENABLED + +#ifdef __cplusplus +extern "C" { +#endif +XML_DEPRECATED +XMLPUBFUN void + xmlNanoHTTPInit (void); +XML_DEPRECATED +XMLPUBFUN void + xmlNanoHTTPCleanup (void); +XML_DEPRECATED +XMLPUBFUN void + xmlNanoHTTPScanProxy (const char *URL); +XML_DEPRECATED +XMLPUBFUN int + xmlNanoHTTPFetch (const char *URL, + const char *filename, + char **contentType); +XML_DEPRECATED +XMLPUBFUN void * + xmlNanoHTTPMethod (const char *URL, + const char *method, + const char *input, + char **contentType, + const char *headers, + int ilen); +XML_DEPRECATED +XMLPUBFUN void * + xmlNanoHTTPMethodRedir (const char *URL, + const char *method, + const char *input, + char **contentType, + char **redir, + const char *headers, + int ilen); +XML_DEPRECATED +XMLPUBFUN void * + xmlNanoHTTPOpen (const char *URL, + char **contentType); +XML_DEPRECATED +XMLPUBFUN void * + xmlNanoHTTPOpenRedir (const char *URL, + char **contentType, + char **redir); +XML_DEPRECATED +XMLPUBFUN int + xmlNanoHTTPReturnCode (void *ctx); +XML_DEPRECATED +XMLPUBFUN const char * + xmlNanoHTTPAuthHeader (void *ctx); +XML_DEPRECATED +XMLPUBFUN const char * + xmlNanoHTTPRedir (void *ctx); +XML_DEPRECATED +XMLPUBFUN int + xmlNanoHTTPContentLength( void * ctx ); +XML_DEPRECATED +XMLPUBFUN const char * + xmlNanoHTTPEncoding (void *ctx); +XML_DEPRECATED +XMLPUBFUN const char * + xmlNanoHTTPMimeType (void *ctx); +XML_DEPRECATED +XMLPUBFUN int + xmlNanoHTTPRead (void *ctx, + void *dest, + int len); +#ifdef LIBXML_OUTPUT_ENABLED +XML_DEPRECATED +XMLPUBFUN int + xmlNanoHTTPSave (void *ctxt, + const char *filename); +#endif /* LIBXML_OUTPUT_ENABLED */ +XML_DEPRECATED +XMLPUBFUN void + xmlNanoHTTPClose (void *ctx); +#ifdef __cplusplus +} +#endif + +#endif /* LIBXML_HTTP_ENABLED */ +#endif /* __NANO_HTTP_H__ */ diff --git a/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/include/libxml2/libxml/parser.h b/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/include/libxml2/libxml/parser.h new file mode 100644 index 0000000000000000000000000000000000000000..78d29cada2a41d1e7d8d3d58de4d8a9c8d395093 --- /dev/null +++ b/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/include/libxml2/libxml/parser.h @@ -0,0 +1,1390 @@ +/* + * Summary: the core parser module + * Description: Interfaces, constants and types related to the XML parser + * + * Copy: See Copyright for the status of this software. + * + * Author: Daniel Veillard + */ + +#ifndef __XML_PARSER_H__ +#define __XML_PARSER_H__ + +/** DOC_DISABLE */ +#include +#define XML_TREE_INTERNALS +#include +#undef XML_TREE_INTERNALS +#include +#include +#include +#include +#include +#include +#include +#include +#include +/* for compatibility */ +#include +#include +/** DOC_ENABLE */ + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * XML_DEFAULT_VERSION: + * + * The default version of XML used: 1.0 + */ +#define XML_DEFAULT_VERSION "1.0" + +/** + * xmlParserInput: + * + * An xmlParserInput is an input flow for the XML processor. + * Each entity parsed is associated an xmlParserInput (except the + * few predefined ones). This is the case both for internal entities + * - in which case the flow is already completely in memory - or + * external entities - in which case we use the buf structure for + * progressive reading and I18N conversions to the internal UTF-8 format. + */ + +/** + * xmlParserInputDeallocate: + * @str: the string to deallocate + * + * Callback for freeing some parser input allocations. + */ +typedef void (* xmlParserInputDeallocate)(xmlChar *str); + +struct _xmlParserInput { + /* Input buffer */ + xmlParserInputBufferPtr buf; /* UTF-8 encoded buffer */ + + const char *filename; /* The file analyzed, if any */ + const char *directory; /* unused */ + const xmlChar *base; /* Base of the array to parse */ + const xmlChar *cur; /* Current char being parsed */ + const xmlChar *end; /* end of the array to parse */ + int length; /* unused */ + int line; /* Current line */ + int col; /* Current column */ + unsigned long consumed; /* How many xmlChars already consumed */ + xmlParserInputDeallocate free; /* function to deallocate the base */ + const xmlChar *encoding; /* unused */ + const xmlChar *version; /* the version string for entity */ + int flags; /* Flags */ + int id; /* an unique identifier for the entity */ + unsigned long parentConsumed; /* unused */ + xmlEntityPtr entity; /* entity, if any */ +}; + +/** + * xmlParserNodeInfo: + * + * The parser can be asked to collect Node information, i.e. at what + * place in the file they were detected. + * NOTE: This is off by default and not very well tested. + */ +typedef struct _xmlParserNodeInfo xmlParserNodeInfo; +typedef xmlParserNodeInfo *xmlParserNodeInfoPtr; + +struct _xmlParserNodeInfo { + const struct _xmlNode* node; + /* Position & line # that text that created the node begins & ends on */ + unsigned long begin_pos; + unsigned long begin_line; + unsigned long end_pos; + unsigned long end_line; +}; + +typedef struct _xmlParserNodeInfoSeq xmlParserNodeInfoSeq; +typedef xmlParserNodeInfoSeq *xmlParserNodeInfoSeqPtr; +struct _xmlParserNodeInfoSeq { + unsigned long maximum; + unsigned long length; + xmlParserNodeInfo* buffer; +}; + +/** + * xmlParserInputState: + * + * The parser is now working also as a state based parser. + * The recursive one use the state info for entities processing. + */ +typedef enum { + XML_PARSER_EOF = -1, /* nothing is to be parsed */ + XML_PARSER_START = 0, /* nothing has been parsed */ + XML_PARSER_MISC, /* Misc* before int subset */ + XML_PARSER_PI, /* Within a processing instruction */ + XML_PARSER_DTD, /* within some DTD content */ + XML_PARSER_PROLOG, /* Misc* after internal subset */ + XML_PARSER_COMMENT, /* within a comment */ + XML_PARSER_START_TAG, /* within a start tag */ + XML_PARSER_CONTENT, /* within the content */ + XML_PARSER_CDATA_SECTION, /* within a CDATA section */ + XML_PARSER_END_TAG, /* within a closing tag */ + XML_PARSER_ENTITY_DECL, /* within an entity declaration */ + XML_PARSER_ENTITY_VALUE, /* within an entity value in a decl */ + XML_PARSER_ATTRIBUTE_VALUE, /* within an attribute value */ + XML_PARSER_SYSTEM_LITERAL, /* within a SYSTEM value */ + XML_PARSER_EPILOG, /* the Misc* after the last end tag */ + XML_PARSER_IGNORE, /* within an IGNORED section */ + XML_PARSER_PUBLIC_LITERAL, /* within a PUBLIC value */ + XML_PARSER_XML_DECL /* before XML decl (but after BOM) */ +} xmlParserInputState; + +/** DOC_DISABLE */ +/* + * Internal bits in the 'loadsubset' context member + */ +#define XML_DETECT_IDS 2 +#define XML_COMPLETE_ATTRS 4 +#define XML_SKIP_IDS 8 +/** DOC_ENABLE */ + +/** + * xmlParserMode: + * + * A parser can operate in various modes + */ +typedef enum { + XML_PARSE_UNKNOWN = 0, + XML_PARSE_DOM = 1, + XML_PARSE_SAX = 2, + XML_PARSE_PUSH_DOM = 3, + XML_PARSE_PUSH_SAX = 4, + XML_PARSE_READER = 5 +} xmlParserMode; + +typedef struct _xmlStartTag xmlStartTag; +typedef struct _xmlParserNsData xmlParserNsData; +typedef struct _xmlAttrHashBucket xmlAttrHashBucket; + +/** + * xmlParserCtxt: + * + * The parser context. + * NOTE This doesn't completely define the parser state, the (current ?) + * design of the parser uses recursive function calls since this allow + * and easy mapping from the production rules of the specification + * to the actual code. The drawback is that the actual function call + * also reflect the parser state. However most of the parsing routines + * takes as the only argument the parser context pointer, so migrating + * to a state based parser for progressive parsing shouldn't be too hard. + */ +struct _xmlParserCtxt { + struct _xmlSAXHandler *sax; /* The SAX handler */ + void *userData; /* For SAX interface only, used by DOM build */ + xmlDocPtr myDoc; /* the document being built */ + int wellFormed; /* is the document well formed */ + int replaceEntities; /* shall we replace entities ? */ + const xmlChar *version; /* the XML version string */ + const xmlChar *encoding; /* the declared encoding, if any */ + int standalone; /* standalone document */ + int html; /* an HTML(1) document + * 3 is HTML after + * 10 is HTML after + */ + + /* Input stream stack */ + xmlParserInputPtr input; /* Current input stream */ + int inputNr; /* Number of current input streams */ + int inputMax; /* Max number of input streams */ + xmlParserInputPtr *inputTab; /* stack of inputs */ + + /* Node analysis stack only used for DOM building */ + xmlNodePtr node; /* Current parsed Node */ + int nodeNr; /* Depth of the parsing stack */ + int nodeMax; /* Max depth of the parsing stack */ + xmlNodePtr *nodeTab; /* array of nodes */ + + int record_info; /* Whether node info should be kept */ + xmlParserNodeInfoSeq node_seq; /* info about each node parsed */ + + int errNo; /* error code */ + + int hasExternalSubset; /* reference and external subset */ + int hasPErefs; /* the internal subset has PE refs */ + int external; /* unused */ + + int valid; /* is the document valid */ + int validate; /* shall we try to validate ? */ + xmlValidCtxt vctxt; /* The validity context */ + + xmlParserInputState instate; /* push parser state */ + int token; /* unused */ + + char *directory; /* unused */ + + /* Node name stack */ + const xmlChar *name; /* Current parsed Node */ + int nameNr; /* Depth of the parsing stack */ + int nameMax; /* Max depth of the parsing stack */ + const xmlChar * *nameTab; /* array of nodes */ + + long nbChars; /* unused */ + long checkIndex; /* used by progressive parsing lookup */ + int keepBlanks; /* ugly but ... */ + int disableSAX; /* SAX callbacks are disabled */ + int inSubset; /* Parsing is in int 1/ext 2 subset */ + const xmlChar * intSubName; /* name of subset */ + xmlChar * extSubURI; /* URI of external subset */ + xmlChar * extSubSystem; /* SYSTEM ID of external subset */ + + /* xml:space values */ + int * space; /* Should the parser preserve spaces */ + int spaceNr; /* Depth of the parsing stack */ + int spaceMax; /* Max depth of the parsing stack */ + int * spaceTab; /* array of space infos */ + + int depth; /* to prevent entity substitution loops */ + xmlParserInputPtr entity; /* unused */ + int charset; /* unused */ + int nodelen; /* Those two fields are there to */ + int nodemem; /* Speed up large node parsing */ + int pedantic; /* signal pedantic warnings */ + void *_private; /* For user data, libxml won't touch it */ + + int loadsubset; /* should the external subset be loaded */ + int linenumbers; /* set line number in element content */ + void *catalogs; /* document's own catalog */ + int recovery; /* run in recovery mode */ + int progressive; /* unused */ + xmlDictPtr dict; /* dictionary for the parser */ + const xmlChar * *atts; /* array for the attributes callbacks */ + int maxatts; /* the size of the array */ + int docdict; /* unused */ + + /* + * pre-interned strings + */ + const xmlChar *str_xml; + const xmlChar *str_xmlns; + const xmlChar *str_xml_ns; + + /* + * Everything below is used only by the new SAX mode + */ + int sax2; /* operating in the new SAX mode */ + int nsNr; /* the number of inherited namespaces */ + int nsMax; /* the size of the arrays */ + const xmlChar * *nsTab; /* the array of prefix/namespace name */ + unsigned *attallocs; /* which attribute were allocated */ + xmlStartTag *pushTab; /* array of data for push */ + xmlHashTablePtr attsDefault; /* defaulted attributes if any */ + xmlHashTablePtr attsSpecial; /* non-CDATA attributes if any */ + int nsWellFormed; /* is the document XML Namespace okay */ + int options; /* Extra options */ + + /* + * Those fields are needed only for streaming parsing so far + */ + int dictNames; /* Use dictionary names for the tree */ + int freeElemsNr; /* number of freed element nodes */ + xmlNodePtr freeElems; /* List of freed element nodes */ + int freeAttrsNr; /* number of freed attributes nodes */ + xmlAttrPtr freeAttrs; /* List of freed attributes nodes */ + + /* + * the complete error information for the last error. + */ + xmlError lastError; + xmlParserMode parseMode; /* the parser mode */ + unsigned long nbentities; /* unused */ + unsigned long sizeentities; /* size of external entities */ + + /* for use by HTML non-recursive parser */ + xmlParserNodeInfo *nodeInfo; /* Current NodeInfo */ + int nodeInfoNr; /* Depth of the parsing stack */ + int nodeInfoMax; /* Max depth of the parsing stack */ + xmlParserNodeInfo *nodeInfoTab; /* array of nodeInfos */ + + int input_id; /* we need to label inputs */ + unsigned long sizeentcopy; /* volume of entity copy */ + + int endCheckState; /* quote state for push parser */ + unsigned short nbErrors; /* number of errors */ + unsigned short nbWarnings; /* number of warnings */ + unsigned maxAmpl; /* maximum amplification factor */ + + xmlParserNsData *nsdb; /* namespace database */ + unsigned attrHashMax; /* allocated size */ + xmlAttrHashBucket *attrHash; /* atttribute hash table */ + + xmlStructuredErrorFunc errorHandler; + void *errorCtxt; +}; + +/** + * xmlSAXLocator: + * + * A SAX Locator. + */ +struct _xmlSAXLocator { + const xmlChar *(*getPublicId)(void *ctx); + const xmlChar *(*getSystemId)(void *ctx); + int (*getLineNumber)(void *ctx); + int (*getColumnNumber)(void *ctx); +}; + +/** + * xmlSAXHandler: + * + * A SAX handler is bunch of callbacks called by the parser when processing + * of the input generate data or structure information. + */ + +/** + * resolveEntitySAXFunc: + * @ctx: the user data (XML parser context) + * @publicId: The public ID of the entity + * @systemId: The system ID of the entity + * + * Callback: + * The entity loader, to control the loading of external entities, + * the application can either: + * - override this resolveEntity() callback in the SAX block + * - or better use the xmlSetExternalEntityLoader() function to + * set up it's own entity resolution routine + * + * Returns the xmlParserInputPtr if inlined or NULL for DOM behaviour. + */ +typedef xmlParserInputPtr (*resolveEntitySAXFunc) (void *ctx, + const xmlChar *publicId, + const xmlChar *systemId); +/** + * internalSubsetSAXFunc: + * @ctx: the user data (XML parser context) + * @name: the root element name + * @ExternalID: the external ID + * @SystemID: the SYSTEM ID (e.g. filename or URL) + * + * Callback on internal subset declaration. + */ +typedef void (*internalSubsetSAXFunc) (void *ctx, + const xmlChar *name, + const xmlChar *ExternalID, + const xmlChar *SystemID); +/** + * externalSubsetSAXFunc: + * @ctx: the user data (XML parser context) + * @name: the root element name + * @ExternalID: the external ID + * @SystemID: the SYSTEM ID (e.g. filename or URL) + * + * Callback on external subset declaration. + */ +typedef void (*externalSubsetSAXFunc) (void *ctx, + const xmlChar *name, + const xmlChar *ExternalID, + const xmlChar *SystemID); +/** + * getEntitySAXFunc: + * @ctx: the user data (XML parser context) + * @name: The entity name + * + * Get an entity by name. + * + * Returns the xmlEntityPtr if found. + */ +typedef xmlEntityPtr (*getEntitySAXFunc) (void *ctx, + const xmlChar *name); +/** + * getParameterEntitySAXFunc: + * @ctx: the user data (XML parser context) + * @name: The entity name + * + * Get a parameter entity by name. + * + * Returns the xmlEntityPtr if found. + */ +typedef xmlEntityPtr (*getParameterEntitySAXFunc) (void *ctx, + const xmlChar *name); +/** + * entityDeclSAXFunc: + * @ctx: the user data (XML parser context) + * @name: the entity name + * @type: the entity type + * @publicId: The public ID of the entity + * @systemId: The system ID of the entity + * @content: the entity value (without processing). + * + * An entity definition has been parsed. + */ +typedef void (*entityDeclSAXFunc) (void *ctx, + const xmlChar *name, + int type, + const xmlChar *publicId, + const xmlChar *systemId, + xmlChar *content); +/** + * notationDeclSAXFunc: + * @ctx: the user data (XML parser context) + * @name: The name of the notation + * @publicId: The public ID of the entity + * @systemId: The system ID of the entity + * + * What to do when a notation declaration has been parsed. + */ +typedef void (*notationDeclSAXFunc)(void *ctx, + const xmlChar *name, + const xmlChar *publicId, + const xmlChar *systemId); +/** + * attributeDeclSAXFunc: + * @ctx: the user data (XML parser context) + * @elem: the name of the element + * @fullname: the attribute name + * @type: the attribute type + * @def: the type of default value + * @defaultValue: the attribute default value + * @tree: the tree of enumerated value set + * + * An attribute definition has been parsed. + */ +typedef void (*attributeDeclSAXFunc)(void *ctx, + const xmlChar *elem, + const xmlChar *fullname, + int type, + int def, + const xmlChar *defaultValue, + xmlEnumerationPtr tree); +/** + * elementDeclSAXFunc: + * @ctx: the user data (XML parser context) + * @name: the element name + * @type: the element type + * @content: the element value tree + * + * An element definition has been parsed. + */ +typedef void (*elementDeclSAXFunc)(void *ctx, + const xmlChar *name, + int type, + xmlElementContentPtr content); +/** + * unparsedEntityDeclSAXFunc: + * @ctx: the user data (XML parser context) + * @name: The name of the entity + * @publicId: The public ID of the entity + * @systemId: The system ID of the entity + * @notationName: the name of the notation + * + * What to do when an unparsed entity declaration is parsed. + */ +typedef void (*unparsedEntityDeclSAXFunc)(void *ctx, + const xmlChar *name, + const xmlChar *publicId, + const xmlChar *systemId, + const xmlChar *notationName); +/** + * setDocumentLocatorSAXFunc: + * @ctx: the user data (XML parser context) + * @loc: A SAX Locator + * + * Receive the document locator at startup, actually xmlDefaultSAXLocator. + * Everything is available on the context, so this is useless in our case. + */ +typedef void (*setDocumentLocatorSAXFunc) (void *ctx, + xmlSAXLocatorPtr loc); +/** + * startDocumentSAXFunc: + * @ctx: the user data (XML parser context) + * + * Called when the document start being processed. + */ +typedef void (*startDocumentSAXFunc) (void *ctx); +/** + * endDocumentSAXFunc: + * @ctx: the user data (XML parser context) + * + * Called when the document end has been detected. + */ +typedef void (*endDocumentSAXFunc) (void *ctx); +/** + * startElementSAXFunc: + * @ctx: the user data (XML parser context) + * @name: The element name, including namespace prefix + * @atts: An array of name/value attributes pairs, NULL terminated + * + * Called when an opening tag has been processed. + */ +typedef void (*startElementSAXFunc) (void *ctx, + const xmlChar *name, + const xmlChar **atts); +/** + * endElementSAXFunc: + * @ctx: the user data (XML parser context) + * @name: The element name + * + * Called when the end of an element has been detected. + */ +typedef void (*endElementSAXFunc) (void *ctx, + const xmlChar *name); +/** + * attributeSAXFunc: + * @ctx: the user data (XML parser context) + * @name: The attribute name, including namespace prefix + * @value: The attribute value + * + * Handle an attribute that has been read by the parser. + * The default handling is to convert the attribute into an + * DOM subtree and past it in a new xmlAttr element added to + * the element. + */ +typedef void (*attributeSAXFunc) (void *ctx, + const xmlChar *name, + const xmlChar *value); +/** + * referenceSAXFunc: + * @ctx: the user data (XML parser context) + * @name: The entity name + * + * Called when an entity reference is detected. + */ +typedef void (*referenceSAXFunc) (void *ctx, + const xmlChar *name); +/** + * charactersSAXFunc: + * @ctx: the user data (XML parser context) + * @ch: a xmlChar string + * @len: the number of xmlChar + * + * Receiving some chars from the parser. + */ +typedef void (*charactersSAXFunc) (void *ctx, + const xmlChar *ch, + int len); +/** + * ignorableWhitespaceSAXFunc: + * @ctx: the user data (XML parser context) + * @ch: a xmlChar string + * @len: the number of xmlChar + * + * Receiving some ignorable whitespaces from the parser. + * UNUSED: by default the DOM building will use characters. + */ +typedef void (*ignorableWhitespaceSAXFunc) (void *ctx, + const xmlChar *ch, + int len); +/** + * processingInstructionSAXFunc: + * @ctx: the user data (XML parser context) + * @target: the target name + * @data: the PI data's + * + * A processing instruction has been parsed. + */ +typedef void (*processingInstructionSAXFunc) (void *ctx, + const xmlChar *target, + const xmlChar *data); +/** + * commentSAXFunc: + * @ctx: the user data (XML parser context) + * @value: the comment content + * + * A comment has been parsed. + */ +typedef void (*commentSAXFunc) (void *ctx, + const xmlChar *value); +/** + * cdataBlockSAXFunc: + * @ctx: the user data (XML parser context) + * @value: The pcdata content + * @len: the block length + * + * Called when a pcdata block has been parsed. + */ +typedef void (*cdataBlockSAXFunc) ( + void *ctx, + const xmlChar *value, + int len); +/** + * warningSAXFunc: + * @ctx: an XML parser context + * @msg: the message to display/transmit + * @...: extra parameters for the message display + * + * Display and format a warning messages, callback. + */ +typedef void (*warningSAXFunc) (void *ctx, + const char *msg, ...) LIBXML_ATTR_FORMAT(2,3); +/** + * errorSAXFunc: + * @ctx: an XML parser context + * @msg: the message to display/transmit + * @...: extra parameters for the message display + * + * Display and format an error messages, callback. + */ +typedef void (*errorSAXFunc) (void *ctx, + const char *msg, ...) LIBXML_ATTR_FORMAT(2,3); +/** + * fatalErrorSAXFunc: + * @ctx: an XML parser context + * @msg: the message to display/transmit + * @...: extra parameters for the message display + * + * Display and format fatal error messages, callback. + * Note: so far fatalError() SAX callbacks are not used, error() + * get all the callbacks for errors. + */ +typedef void (*fatalErrorSAXFunc) (void *ctx, + const char *msg, ...) LIBXML_ATTR_FORMAT(2,3); +/** + * isStandaloneSAXFunc: + * @ctx: the user data (XML parser context) + * + * Is this document tagged standalone? + * + * Returns 1 if true + */ +typedef int (*isStandaloneSAXFunc) (void *ctx); +/** + * hasInternalSubsetSAXFunc: + * @ctx: the user data (XML parser context) + * + * Does this document has an internal subset. + * + * Returns 1 if true + */ +typedef int (*hasInternalSubsetSAXFunc) (void *ctx); + +/** + * hasExternalSubsetSAXFunc: + * @ctx: the user data (XML parser context) + * + * Does this document has an external subset? + * + * Returns 1 if true + */ +typedef int (*hasExternalSubsetSAXFunc) (void *ctx); + +/************************************************************************ + * * + * The SAX version 2 API extensions * + * * + ************************************************************************/ +/** + * XML_SAX2_MAGIC: + * + * Special constant found in SAX2 blocks initialized fields + */ +#define XML_SAX2_MAGIC 0xDEEDBEAF + +/** + * startElementNsSAX2Func: + * @ctx: the user data (XML parser context) + * @localname: the local name of the element + * @prefix: the element namespace prefix if available + * @URI: the element namespace name if available + * @nb_namespaces: number of namespace definitions on that node + * @namespaces: pointer to the array of prefix/URI pairs namespace definitions + * @nb_attributes: the number of attributes on that node + * @nb_defaulted: the number of defaulted attributes. The defaulted + * ones are at the end of the array + * @attributes: pointer to the array of (localname/prefix/URI/value/end) + * attribute values. + * + * SAX2 callback when an element start has been detected by the parser. + * It provides the namespace information for the element, as well as + * the new namespace declarations on the element. + */ + +typedef void (*startElementNsSAX2Func) (void *ctx, + const xmlChar *localname, + const xmlChar *prefix, + const xmlChar *URI, + int nb_namespaces, + const xmlChar **namespaces, + int nb_attributes, + int nb_defaulted, + const xmlChar **attributes); + +/** + * endElementNsSAX2Func: + * @ctx: the user data (XML parser context) + * @localname: the local name of the element + * @prefix: the element namespace prefix if available + * @URI: the element namespace name if available + * + * SAX2 callback when an element end has been detected by the parser. + * It provides the namespace information for the element. + */ + +typedef void (*endElementNsSAX2Func) (void *ctx, + const xmlChar *localname, + const xmlChar *prefix, + const xmlChar *URI); + + +struct _xmlSAXHandler { + internalSubsetSAXFunc internalSubset; + isStandaloneSAXFunc isStandalone; + hasInternalSubsetSAXFunc hasInternalSubset; + hasExternalSubsetSAXFunc hasExternalSubset; + resolveEntitySAXFunc resolveEntity; + getEntitySAXFunc getEntity; + entityDeclSAXFunc entityDecl; + notationDeclSAXFunc notationDecl; + attributeDeclSAXFunc attributeDecl; + elementDeclSAXFunc elementDecl; + unparsedEntityDeclSAXFunc unparsedEntityDecl; + setDocumentLocatorSAXFunc setDocumentLocator; + startDocumentSAXFunc startDocument; + endDocumentSAXFunc endDocument; + /* + * `startElement` and `endElement` are only used by the legacy SAX1 + * interface and should not be used in new software. If you really + * have to enable SAX1, the preferred way is set the `initialized` + * member to 1 instead of XML_SAX2_MAGIC. + * + * For backward compatibility, it's also possible to set the + * `startElementNs` and `endElementNs` handlers to NULL. + * + * You can also set the XML_PARSE_SAX1 parser option, but versions + * older than 2.12.0 will probably crash if this option is provided + * together with custom SAX callbacks. + */ + startElementSAXFunc startElement; + endElementSAXFunc endElement; + referenceSAXFunc reference; + charactersSAXFunc characters; + ignorableWhitespaceSAXFunc ignorableWhitespace; + processingInstructionSAXFunc processingInstruction; + commentSAXFunc comment; + warningSAXFunc warning; + errorSAXFunc error; + fatalErrorSAXFunc fatalError; /* unused error() get all the errors */ + getParameterEntitySAXFunc getParameterEntity; + cdataBlockSAXFunc cdataBlock; + externalSubsetSAXFunc externalSubset; + /* + * `initialized` should always be set to XML_SAX2_MAGIC to enable the + * modern SAX2 interface. + */ + unsigned int initialized; + /* + * The following members are only used by the SAX2 interface. + */ + void *_private; + startElementNsSAX2Func startElementNs; + endElementNsSAX2Func endElementNs; + xmlStructuredErrorFunc serror; +}; + +/* + * SAX Version 1 + */ +typedef struct _xmlSAXHandlerV1 xmlSAXHandlerV1; +typedef xmlSAXHandlerV1 *xmlSAXHandlerV1Ptr; +struct _xmlSAXHandlerV1 { + internalSubsetSAXFunc internalSubset; + isStandaloneSAXFunc isStandalone; + hasInternalSubsetSAXFunc hasInternalSubset; + hasExternalSubsetSAXFunc hasExternalSubset; + resolveEntitySAXFunc resolveEntity; + getEntitySAXFunc getEntity; + entityDeclSAXFunc entityDecl; + notationDeclSAXFunc notationDecl; + attributeDeclSAXFunc attributeDecl; + elementDeclSAXFunc elementDecl; + unparsedEntityDeclSAXFunc unparsedEntityDecl; + setDocumentLocatorSAXFunc setDocumentLocator; + startDocumentSAXFunc startDocument; + endDocumentSAXFunc endDocument; + startElementSAXFunc startElement; + endElementSAXFunc endElement; + referenceSAXFunc reference; + charactersSAXFunc characters; + ignorableWhitespaceSAXFunc ignorableWhitespace; + processingInstructionSAXFunc processingInstruction; + commentSAXFunc comment; + warningSAXFunc warning; + errorSAXFunc error; + fatalErrorSAXFunc fatalError; /* unused error() get all the errors */ + getParameterEntitySAXFunc getParameterEntity; + cdataBlockSAXFunc cdataBlock; + externalSubsetSAXFunc externalSubset; + unsigned int initialized; +}; + + +/** + * xmlExternalEntityLoader: + * @URL: The System ID of the resource requested + * @ID: The Public ID of the resource requested + * @context: the XML parser context + * + * External entity loaders types. + * + * Returns the entity input parser. + */ +typedef xmlParserInputPtr (*xmlExternalEntityLoader) (const char *URL, + const char *ID, + xmlParserCtxtPtr context); + +/* + * Variables + */ + +XMLPUBVAR const char *const xmlParserVersion; +XML_DEPRECATED +XMLPUBVAR const int oldXMLWDcompatibility; +XML_DEPRECATED +XMLPUBVAR const int xmlParserDebugEntities; +XML_DEPRECATED +XMLPUBVAR const xmlSAXLocator xmlDefaultSAXLocator; +#ifdef LIBXML_SAX1_ENABLED +XML_DEPRECATED +XMLPUBVAR const xmlSAXHandlerV1 xmlDefaultSAXHandler; +#endif + +#ifdef LIBXML_THREAD_ENABLED +/* backward compatibility */ +XMLPUBFUN const char *const *__xmlParserVersion(void); +XML_DEPRECATED +XMLPUBFUN const int *__oldXMLWDcompatibility(void); +XML_DEPRECATED +XMLPUBFUN const int *__xmlParserDebugEntities(void); +XML_DEPRECATED +XMLPUBFUN const xmlSAXLocator *__xmlDefaultSAXLocator(void); +#ifdef LIBXML_SAX1_ENABLED +XML_DEPRECATED +XMLPUBFUN const xmlSAXHandlerV1 *__xmlDefaultSAXHandler(void); +#endif +#endif + +/** DOC_DISABLE */ +#define XML_GLOBALS_PARSER_CORE \ + XML_OP(xmlDoValidityCheckingDefaultValue, int, XML_DEPRECATED) \ + XML_OP(xmlGetWarningsDefaultValue, int, XML_DEPRECATED) \ + XML_OP(xmlKeepBlanksDefaultValue, int, XML_DEPRECATED) \ + XML_OP(xmlLineNumbersDefaultValue, int, XML_DEPRECATED) \ + XML_OP(xmlLoadExtDtdDefaultValue, int, XML_DEPRECATED) \ + XML_OP(xmlPedanticParserDefaultValue, int, XML_DEPRECATED) \ + XML_OP(xmlSubstituteEntitiesDefaultValue, int, XML_DEPRECATED) + +#ifdef LIBXML_OUTPUT_ENABLED + #define XML_GLOBALS_PARSER_OUTPUT \ + XML_OP(xmlIndentTreeOutput, int, XML_NO_ATTR) \ + XML_OP(xmlTreeIndentString, const char *, XML_NO_ATTR) \ + XML_OP(xmlSaveNoEmptyTags, int, XML_NO_ATTR) +#else + #define XML_GLOBALS_PARSER_OUTPUT +#endif + +#define XML_GLOBALS_PARSER \ + XML_GLOBALS_PARSER_CORE \ + XML_GLOBALS_PARSER_OUTPUT + +#define XML_OP XML_DECLARE_GLOBAL +XML_GLOBALS_PARSER +#undef XML_OP + +#if defined(LIBXML_THREAD_ENABLED) && !defined(XML_GLOBALS_NO_REDEFINITION) + #define xmlDoValidityCheckingDefaultValue \ + XML_GLOBAL_MACRO(xmlDoValidityCheckingDefaultValue) + #define xmlGetWarningsDefaultValue \ + XML_GLOBAL_MACRO(xmlGetWarningsDefaultValue) + #define xmlKeepBlanksDefaultValue XML_GLOBAL_MACRO(xmlKeepBlanksDefaultValue) + #define xmlLineNumbersDefaultValue \ + XML_GLOBAL_MACRO(xmlLineNumbersDefaultValue) + #define xmlLoadExtDtdDefaultValue XML_GLOBAL_MACRO(xmlLoadExtDtdDefaultValue) + #define xmlPedanticParserDefaultValue \ + XML_GLOBAL_MACRO(xmlPedanticParserDefaultValue) + #define xmlSubstituteEntitiesDefaultValue \ + XML_GLOBAL_MACRO(xmlSubstituteEntitiesDefaultValue) + #ifdef LIBXML_OUTPUT_ENABLED + #define xmlIndentTreeOutput XML_GLOBAL_MACRO(xmlIndentTreeOutput) + #define xmlTreeIndentString XML_GLOBAL_MACRO(xmlTreeIndentString) + #define xmlSaveNoEmptyTags XML_GLOBAL_MACRO(xmlSaveNoEmptyTags) + #endif +#endif +/** DOC_ENABLE */ + +/* + * Init/Cleanup + */ +XMLPUBFUN void + xmlInitParser (void); +XMLPUBFUN void + xmlCleanupParser (void); +XML_DEPRECATED +XMLPUBFUN void + xmlInitGlobals (void); +XML_DEPRECATED +XMLPUBFUN void + xmlCleanupGlobals (void); + +/* + * Input functions + */ +XML_DEPRECATED +XMLPUBFUN int + xmlParserInputRead (xmlParserInputPtr in, + int len); +XML_DEPRECATED +XMLPUBFUN int + xmlParserInputGrow (xmlParserInputPtr in, + int len); + +/* + * Basic parsing Interfaces + */ +#ifdef LIBXML_SAX1_ENABLED +XMLPUBFUN xmlDocPtr + xmlParseDoc (const xmlChar *cur); +XMLPUBFUN xmlDocPtr + xmlParseFile (const char *filename); +XMLPUBFUN xmlDocPtr + xmlParseMemory (const char *buffer, + int size); +#endif /* LIBXML_SAX1_ENABLED */ +XML_DEPRECATED XMLPUBFUN int + xmlSubstituteEntitiesDefault(int val); +XML_DEPRECATED XMLPUBFUN int + xmlThrDefSubstituteEntitiesDefaultValue(int v); +XMLPUBFUN int + xmlKeepBlanksDefault (int val); +XML_DEPRECATED XMLPUBFUN int + xmlThrDefKeepBlanksDefaultValue(int v); +XMLPUBFUN void + xmlStopParser (xmlParserCtxtPtr ctxt); +XML_DEPRECATED XMLPUBFUN int + xmlPedanticParserDefault(int val); +XML_DEPRECATED XMLPUBFUN int + xmlThrDefPedanticParserDefaultValue(int v); +XML_DEPRECATED XMLPUBFUN int + xmlLineNumbersDefault (int val); +XML_DEPRECATED XMLPUBFUN int + xmlThrDefLineNumbersDefaultValue(int v); +XML_DEPRECATED XMLPUBFUN int + xmlThrDefDoValidityCheckingDefaultValue(int v); +XML_DEPRECATED XMLPUBFUN int + xmlThrDefGetWarningsDefaultValue(int v); +XML_DEPRECATED XMLPUBFUN int + xmlThrDefLoadExtDtdDefaultValue(int v); +XML_DEPRECATED XMLPUBFUN int + xmlThrDefParserDebugEntities(int v); + +#ifdef LIBXML_SAX1_ENABLED +/* + * Recovery mode + */ +XML_DEPRECATED +XMLPUBFUN xmlDocPtr + xmlRecoverDoc (const xmlChar *cur); +XML_DEPRECATED +XMLPUBFUN xmlDocPtr + xmlRecoverMemory (const char *buffer, + int size); +XML_DEPRECATED +XMLPUBFUN xmlDocPtr + xmlRecoverFile (const char *filename); +#endif /* LIBXML_SAX1_ENABLED */ + +/* + * Less common routines and SAX interfaces + */ +XMLPUBFUN int + xmlParseDocument (xmlParserCtxtPtr ctxt); +XMLPUBFUN int + xmlParseExtParsedEnt (xmlParserCtxtPtr ctxt); +#ifdef LIBXML_SAX1_ENABLED +XML_DEPRECATED +XMLPUBFUN int + xmlSAXUserParseFile (xmlSAXHandlerPtr sax, + void *user_data, + const char *filename); +XML_DEPRECATED +XMLPUBFUN int + xmlSAXUserParseMemory (xmlSAXHandlerPtr sax, + void *user_data, + const char *buffer, + int size); +XML_DEPRECATED +XMLPUBFUN xmlDocPtr + xmlSAXParseDoc (xmlSAXHandlerPtr sax, + const xmlChar *cur, + int recovery); +XML_DEPRECATED +XMLPUBFUN xmlDocPtr + xmlSAXParseMemory (xmlSAXHandlerPtr sax, + const char *buffer, + int size, + int recovery); +XML_DEPRECATED +XMLPUBFUN xmlDocPtr + xmlSAXParseMemoryWithData (xmlSAXHandlerPtr sax, + const char *buffer, + int size, + int recovery, + void *data); +XML_DEPRECATED +XMLPUBFUN xmlDocPtr + xmlSAXParseFile (xmlSAXHandlerPtr sax, + const char *filename, + int recovery); +XML_DEPRECATED +XMLPUBFUN xmlDocPtr + xmlSAXParseFileWithData (xmlSAXHandlerPtr sax, + const char *filename, + int recovery, + void *data); +XML_DEPRECATED +XMLPUBFUN xmlDocPtr + xmlSAXParseEntity (xmlSAXHandlerPtr sax, + const char *filename); +XML_DEPRECATED +XMLPUBFUN xmlDocPtr + xmlParseEntity (const char *filename); +#endif /* LIBXML_SAX1_ENABLED */ + +#ifdef LIBXML_VALID_ENABLED +XML_DEPRECATED +XMLPUBFUN xmlDtdPtr + xmlSAXParseDTD (xmlSAXHandlerPtr sax, + const xmlChar *ExternalID, + const xmlChar *SystemID); +XMLPUBFUN xmlDtdPtr + xmlParseDTD (const xmlChar *ExternalID, + const xmlChar *SystemID); +XMLPUBFUN xmlDtdPtr + xmlIOParseDTD (xmlSAXHandlerPtr sax, + xmlParserInputBufferPtr input, + xmlCharEncoding enc); +#endif /* LIBXML_VALID_ENABLE */ +#ifdef LIBXML_SAX1_ENABLED +XMLPUBFUN int + xmlParseBalancedChunkMemory(xmlDocPtr doc, + xmlSAXHandlerPtr sax, + void *user_data, + int depth, + const xmlChar *string, + xmlNodePtr *lst); +#endif /* LIBXML_SAX1_ENABLED */ +XMLPUBFUN xmlParserErrors + xmlParseInNodeContext (xmlNodePtr node, + const char *data, + int datalen, + int options, + xmlNodePtr *lst); +#ifdef LIBXML_SAX1_ENABLED +XMLPUBFUN int + xmlParseBalancedChunkMemoryRecover(xmlDocPtr doc, + xmlSAXHandlerPtr sax, + void *user_data, + int depth, + const xmlChar *string, + xmlNodePtr *lst, + int recover); +XML_DEPRECATED +XMLPUBFUN int + xmlParseExternalEntity (xmlDocPtr doc, + xmlSAXHandlerPtr sax, + void *user_data, + int depth, + const xmlChar *URL, + const xmlChar *ID, + xmlNodePtr *lst); +#endif /* LIBXML_SAX1_ENABLED */ +XMLPUBFUN int + xmlParseCtxtExternalEntity(xmlParserCtxtPtr ctx, + const xmlChar *URL, + const xmlChar *ID, + xmlNodePtr *lst); + +/* + * Parser contexts handling. + */ +XMLPUBFUN xmlParserCtxtPtr + xmlNewParserCtxt (void); +XMLPUBFUN xmlParserCtxtPtr + xmlNewSAXParserCtxt (const xmlSAXHandler *sax, + void *userData); +XMLPUBFUN int + xmlInitParserCtxt (xmlParserCtxtPtr ctxt); +XMLPUBFUN void + xmlClearParserCtxt (xmlParserCtxtPtr ctxt); +XMLPUBFUN void + xmlFreeParserCtxt (xmlParserCtxtPtr ctxt); +#ifdef LIBXML_SAX1_ENABLED +XML_DEPRECATED +XMLPUBFUN void + xmlSetupParserForBuffer (xmlParserCtxtPtr ctxt, + const xmlChar* buffer, + const char *filename); +#endif /* LIBXML_SAX1_ENABLED */ +XMLPUBFUN xmlParserCtxtPtr + xmlCreateDocParserCtxt (const xmlChar *cur); + +#ifdef LIBXML_LEGACY_ENABLED +/* + * Reading/setting optional parsing features. + */ +XML_DEPRECATED +XMLPUBFUN int + xmlGetFeaturesList (int *len, + const char **result); +XML_DEPRECATED +XMLPUBFUN int + xmlGetFeature (xmlParserCtxtPtr ctxt, + const char *name, + void *result); +XML_DEPRECATED +XMLPUBFUN int + xmlSetFeature (xmlParserCtxtPtr ctxt, + const char *name, + void *value); +#endif /* LIBXML_LEGACY_ENABLED */ + +#ifdef LIBXML_PUSH_ENABLED +/* + * Interfaces for the Push mode. + */ +XMLPUBFUN xmlParserCtxtPtr + xmlCreatePushParserCtxt(xmlSAXHandlerPtr sax, + void *user_data, + const char *chunk, + int size, + const char *filename); +XMLPUBFUN int + xmlParseChunk (xmlParserCtxtPtr ctxt, + const char *chunk, + int size, + int terminate); +#endif /* LIBXML_PUSH_ENABLED */ + +/* + * Special I/O mode. + */ + +XMLPUBFUN xmlParserCtxtPtr + xmlCreateIOParserCtxt (xmlSAXHandlerPtr sax, + void *user_data, + xmlInputReadCallback ioread, + xmlInputCloseCallback ioclose, + void *ioctx, + xmlCharEncoding enc); + +XMLPUBFUN xmlParserInputPtr + xmlNewIOInputStream (xmlParserCtxtPtr ctxt, + xmlParserInputBufferPtr input, + xmlCharEncoding enc); + +/* + * Node infos. + */ +XMLPUBFUN const xmlParserNodeInfo* + xmlParserFindNodeInfo (xmlParserCtxtPtr ctxt, + xmlNodePtr node); +XMLPUBFUN void + xmlInitNodeInfoSeq (xmlParserNodeInfoSeqPtr seq); +XMLPUBFUN void + xmlClearNodeInfoSeq (xmlParserNodeInfoSeqPtr seq); +XMLPUBFUN unsigned long + xmlParserFindNodeInfoIndex(xmlParserNodeInfoSeqPtr seq, + xmlNodePtr node); +XMLPUBFUN void + xmlParserAddNodeInfo (xmlParserCtxtPtr ctxt, + xmlParserNodeInfoPtr info); + +/* + * External entities handling actually implemented in xmlIO. + */ + +XMLPUBFUN void + xmlSetExternalEntityLoader(xmlExternalEntityLoader f); +XMLPUBFUN xmlExternalEntityLoader + xmlGetExternalEntityLoader(void); +XMLPUBFUN xmlParserInputPtr + xmlLoadExternalEntity (const char *URL, + const char *ID, + xmlParserCtxtPtr ctxt); + +/* + * Index lookup, actually implemented in the encoding module + */ +XMLPUBFUN long + xmlByteConsumed (xmlParserCtxtPtr ctxt); + +/* + * New set of simpler/more flexible APIs + */ +/** + * xmlParserOption: + * + * This is the set of XML parser options that can be passed down + * to the xmlReadDoc() and similar calls. + */ +typedef enum { + XML_PARSE_RECOVER = 1<<0, /* recover on errors */ + XML_PARSE_NOENT = 1<<1, /* substitute entities */ + XML_PARSE_DTDLOAD = 1<<2, /* load the external subset */ + XML_PARSE_DTDATTR = 1<<3, /* default DTD attributes */ + XML_PARSE_DTDVALID = 1<<4, /* validate with the DTD */ + XML_PARSE_NOERROR = 1<<5, /* suppress error reports */ + XML_PARSE_NOWARNING = 1<<6, /* suppress warning reports */ + XML_PARSE_PEDANTIC = 1<<7, /* pedantic error reporting */ + XML_PARSE_NOBLANKS = 1<<8, /* remove blank nodes */ + XML_PARSE_SAX1 = 1<<9, /* use the SAX1 interface internally */ + XML_PARSE_XINCLUDE = 1<<10,/* Implement XInclude substitution */ + XML_PARSE_NONET = 1<<11,/* Forbid network access */ + XML_PARSE_NODICT = 1<<12,/* Do not reuse the context dictionary */ + XML_PARSE_NSCLEAN = 1<<13,/* remove redundant namespaces declarations */ + XML_PARSE_NOCDATA = 1<<14,/* merge CDATA as text nodes */ + XML_PARSE_NOXINCNODE= 1<<15,/* do not generate XINCLUDE START/END nodes */ + XML_PARSE_COMPACT = 1<<16,/* compact small text nodes; no modification of + the tree allowed afterwards (will possibly + crash if you try to modify the tree) */ + XML_PARSE_OLD10 = 1<<17,/* parse using XML-1.0 before update 5 */ + XML_PARSE_NOBASEFIX = 1<<18,/* do not fixup XINCLUDE xml:base uris */ + XML_PARSE_HUGE = 1<<19,/* relax any hardcoded limit from the parser */ + XML_PARSE_OLDSAX = 1<<20,/* parse using SAX2 interface before 2.7.0 */ + XML_PARSE_IGNORE_ENC= 1<<21,/* ignore internal document encoding hint */ + XML_PARSE_BIG_LINES = 1<<22,/* Store big lines numbers in text PSVI field */ + XML_PARSE_NO_XXE = 1<<23 /* disable loading of external content */ +} xmlParserOption; + +XMLPUBFUN void + xmlCtxtReset (xmlParserCtxtPtr ctxt); +XMLPUBFUN int + xmlCtxtResetPush (xmlParserCtxtPtr ctxt, + const char *chunk, + int size, + const char *filename, + const char *encoding); +XMLPUBFUN int + xmlCtxtSetOptions (xmlParserCtxtPtr ctxt, + int options); +XMLPUBFUN int + xmlCtxtUseOptions (xmlParserCtxtPtr ctxt, + int options); +XMLPUBFUN void + xmlCtxtSetErrorHandler (xmlParserCtxtPtr ctxt, + xmlStructuredErrorFunc handler, + void *data); +XMLPUBFUN void + xmlCtxtSetMaxAmplification(xmlParserCtxtPtr ctxt, + unsigned maxAmpl); +XMLPUBFUN xmlDocPtr + xmlReadDoc (const xmlChar *cur, + const char *URL, + const char *encoding, + int options); +XMLPUBFUN xmlDocPtr + xmlReadFile (const char *URL, + const char *encoding, + int options); +XMLPUBFUN xmlDocPtr + xmlReadMemory (const char *buffer, + int size, + const char *URL, + const char *encoding, + int options); +XMLPUBFUN xmlDocPtr + xmlReadFd (int fd, + const char *URL, + const char *encoding, + int options); +XMLPUBFUN xmlDocPtr + xmlReadIO (xmlInputReadCallback ioread, + xmlInputCloseCallback ioclose, + void *ioctx, + const char *URL, + const char *encoding, + int options); +XMLPUBFUN xmlDocPtr + xmlCtxtParseDocument (xmlParserCtxtPtr ctxt, + xmlParserInputPtr input); +XMLPUBFUN xmlDocPtr + xmlCtxtReadDoc (xmlParserCtxtPtr ctxt, + const xmlChar *cur, + const char *URL, + const char *encoding, + int options); +XMLPUBFUN xmlDocPtr + xmlCtxtReadFile (xmlParserCtxtPtr ctxt, + const char *filename, + const char *encoding, + int options); +XMLPUBFUN xmlDocPtr + xmlCtxtReadMemory (xmlParserCtxtPtr ctxt, + const char *buffer, + int size, + const char *URL, + const char *encoding, + int options); +XMLPUBFUN xmlDocPtr + xmlCtxtReadFd (xmlParserCtxtPtr ctxt, + int fd, + const char *URL, + const char *encoding, + int options); +XMLPUBFUN xmlDocPtr + xmlCtxtReadIO (xmlParserCtxtPtr ctxt, + xmlInputReadCallback ioread, + xmlInputCloseCallback ioclose, + void *ioctx, + const char *URL, + const char *encoding, + int options); + +/* + * Library wide options + */ +/** + * xmlFeature: + * + * Used to examine the existence of features that can be enabled + * or disabled at compile-time. + * They used to be called XML_FEATURE_xxx but this clashed with Expat + */ +typedef enum { + XML_WITH_THREAD = 1, + XML_WITH_TREE = 2, + XML_WITH_OUTPUT = 3, + XML_WITH_PUSH = 4, + XML_WITH_READER = 5, + XML_WITH_PATTERN = 6, + XML_WITH_WRITER = 7, + XML_WITH_SAX1 = 8, + XML_WITH_FTP = 9, + XML_WITH_HTTP = 10, + XML_WITH_VALID = 11, + XML_WITH_HTML = 12, + XML_WITH_LEGACY = 13, + XML_WITH_C14N = 14, + XML_WITH_CATALOG = 15, + XML_WITH_XPATH = 16, + XML_WITH_XPTR = 17, + XML_WITH_XINCLUDE = 18, + XML_WITH_ICONV = 19, + XML_WITH_ISO8859X = 20, + XML_WITH_UNICODE = 21, + XML_WITH_REGEXP = 22, + XML_WITH_AUTOMATA = 23, + XML_WITH_EXPR = 24, + XML_WITH_SCHEMAS = 25, + XML_WITH_SCHEMATRON = 26, + XML_WITH_MODULES = 27, + XML_WITH_DEBUG = 28, + XML_WITH_DEBUG_MEM = 29, + XML_WITH_DEBUG_RUN = 30, /* unused */ + XML_WITH_ZLIB = 31, + XML_WITH_ICU = 32, + XML_WITH_LZMA = 33, + XML_WITH_NONE = 99999 /* just to be sure of allocation size */ +} xmlFeature; + +XMLPUBFUN int + xmlHasFeature (xmlFeature feature); + +#ifdef __cplusplus +} +#endif +#endif /* __XML_PARSER_H__ */ diff --git a/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/include/libxml2/libxml/parserInternals.h b/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/include/libxml2/libxml/parserInternals.h new file mode 100644 index 0000000000000000000000000000000000000000..c4d4363b53aa04269ac55c186c1d447494fded68 --- /dev/null +++ b/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/include/libxml2/libxml/parserInternals.h @@ -0,0 +1,671 @@ +/* + * Summary: internals routines and limits exported by the parser. + * Description: this module exports a number of internal parsing routines + * they are not really all intended for applications but + * can prove useful doing low level processing. + * + * Copy: See Copyright for the status of this software. + * + * Author: Daniel Veillard + */ + +#ifndef __XML_PARSER_INTERNALS_H__ +#define __XML_PARSER_INTERNALS_H__ + +#include +#include +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * xmlParserMaxDepth: + * + * DEPRECATED: has no effect + * + * arbitrary depth limit for the XML documents that we allow to + * process. This is not a limitation of the parser but a safety + * boundary feature, use XML_PARSE_HUGE option to override it. + */ +XML_DEPRECATED +XMLPUBVAR const unsigned int xmlParserMaxDepth; + +/** + * XML_MAX_TEXT_LENGTH: + * + * Maximum size allowed for a single text node when building a tree. + * This is not a limitation of the parser but a safety boundary feature, + * use XML_PARSE_HUGE option to override it. + * Introduced in 2.9.0 + */ +#define XML_MAX_TEXT_LENGTH 10000000 + +/** + * XML_MAX_HUGE_LENGTH: + * + * Maximum size allowed when XML_PARSE_HUGE is set. + */ +#define XML_MAX_HUGE_LENGTH 1000000000 + +/** + * XML_MAX_NAME_LENGTH: + * + * Maximum size allowed for a markup identifier. + * This is not a limitation of the parser but a safety boundary feature, + * use XML_PARSE_HUGE option to override it. + * Note that with the use of parsing dictionaries overriding the limit + * may result in more runtime memory usage in face of "unfriendly' content + * Introduced in 2.9.0 + */ +#define XML_MAX_NAME_LENGTH 50000 + +/** + * XML_MAX_DICTIONARY_LIMIT: + * + * Maximum size allowed by the parser for a dictionary by default + * This is not a limitation of the parser but a safety boundary feature, + * use XML_PARSE_HUGE option to override it. + * Introduced in 2.9.0 + */ +#define XML_MAX_DICTIONARY_LIMIT 10000000 + +/** + * XML_MAX_LOOKUP_LIMIT: + * + * Maximum size allowed by the parser for ahead lookup + * This is an upper boundary enforced by the parser to avoid bad + * behaviour on "unfriendly' content + * Introduced in 2.9.0 + */ +#define XML_MAX_LOOKUP_LIMIT 10000000 + +/** + * XML_MAX_NAMELEN: + * + * Identifiers can be longer, but this will be more costly + * at runtime. + */ +#define XML_MAX_NAMELEN 100 + +/** + * INPUT_CHUNK: + * + * The parser tries to always have that amount of input ready. + * One of the point is providing context when reporting errors. + */ +#define INPUT_CHUNK 250 + +/************************************************************************ + * * + * UNICODE version of the macros. * + * * + ************************************************************************/ +/** + * IS_BYTE_CHAR: + * @c: an byte value (int) + * + * Macro to check the following production in the XML spec: + * + * [2] Char ::= #x9 | #xA | #xD | [#x20...] + * any byte character in the accepted range + */ +#define IS_BYTE_CHAR(c) xmlIsChar_ch(c) + +/** + * IS_CHAR: + * @c: an UNICODE value (int) + * + * Macro to check the following production in the XML spec: + * + * [2] Char ::= #x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] + * | [#x10000-#x10FFFF] + * any Unicode character, excluding the surrogate blocks, FFFE, and FFFF. + */ +#define IS_CHAR(c) xmlIsCharQ(c) + +/** + * IS_CHAR_CH: + * @c: an xmlChar (usually an unsigned char) + * + * Behaves like IS_CHAR on single-byte value + */ +#define IS_CHAR_CH(c) xmlIsChar_ch(c) + +/** + * IS_BLANK: + * @c: an UNICODE value (int) + * + * Macro to check the following production in the XML spec: + * + * [3] S ::= (#x20 | #x9 | #xD | #xA)+ + */ +#define IS_BLANK(c) xmlIsBlankQ(c) + +/** + * IS_BLANK_CH: + * @c: an xmlChar value (normally unsigned char) + * + * Behaviour same as IS_BLANK + */ +#define IS_BLANK_CH(c) xmlIsBlank_ch(c) + +/** + * IS_BASECHAR: + * @c: an UNICODE value (int) + * + * Macro to check the following production in the XML spec: + * + * [85] BaseChar ::= ... long list see REC ... + */ +#define IS_BASECHAR(c) xmlIsBaseCharQ(c) + +/** + * IS_DIGIT: + * @c: an UNICODE value (int) + * + * Macro to check the following production in the XML spec: + * + * [88] Digit ::= ... long list see REC ... + */ +#define IS_DIGIT(c) xmlIsDigitQ(c) + +/** + * IS_DIGIT_CH: + * @c: an xmlChar value (usually an unsigned char) + * + * Behaves like IS_DIGIT but with a single byte argument + */ +#define IS_DIGIT_CH(c) xmlIsDigit_ch(c) + +/** + * IS_COMBINING: + * @c: an UNICODE value (int) + * + * Macro to check the following production in the XML spec: + * + * [87] CombiningChar ::= ... long list see REC ... + */ +#define IS_COMBINING(c) xmlIsCombiningQ(c) + +/** + * IS_COMBINING_CH: + * @c: an xmlChar (usually an unsigned char) + * + * Always false (all combining chars > 0xff) + */ +#define IS_COMBINING_CH(c) 0 + +/** + * IS_EXTENDER: + * @c: an UNICODE value (int) + * + * Macro to check the following production in the XML spec: + * + * + * [89] Extender ::= #x00B7 | #x02D0 | #x02D1 | #x0387 | #x0640 | + * #x0E46 | #x0EC6 | #x3005 | [#x3031-#x3035] | + * [#x309D-#x309E] | [#x30FC-#x30FE] + */ +#define IS_EXTENDER(c) xmlIsExtenderQ(c) + +/** + * IS_EXTENDER_CH: + * @c: an xmlChar value (usually an unsigned char) + * + * Behaves like IS_EXTENDER but with a single-byte argument + */ +#define IS_EXTENDER_CH(c) xmlIsExtender_ch(c) + +/** + * IS_IDEOGRAPHIC: + * @c: an UNICODE value (int) + * + * Macro to check the following production in the XML spec: + * + * + * [86] Ideographic ::= [#x4E00-#x9FA5] | #x3007 | [#x3021-#x3029] + */ +#define IS_IDEOGRAPHIC(c) xmlIsIdeographicQ(c) + +/** + * IS_LETTER: + * @c: an UNICODE value (int) + * + * Macro to check the following production in the XML spec: + * + * + * [84] Letter ::= BaseChar | Ideographic + */ +#define IS_LETTER(c) (IS_BASECHAR(c) || IS_IDEOGRAPHIC(c)) + +/** + * IS_LETTER_CH: + * @c: an xmlChar value (normally unsigned char) + * + * Macro behaves like IS_LETTER, but only check base chars + * + */ +#define IS_LETTER_CH(c) xmlIsBaseChar_ch(c) + +/** + * IS_ASCII_LETTER: + * @c: an xmlChar value + * + * Macro to check [a-zA-Z] + * + */ +#define IS_ASCII_LETTER(c) (((0x41 <= (c)) && ((c) <= 0x5a)) || \ + ((0x61 <= (c)) && ((c) <= 0x7a))) + +/** + * IS_ASCII_DIGIT: + * @c: an xmlChar value + * + * Macro to check [0-9] + * + */ +#define IS_ASCII_DIGIT(c) ((0x30 <= (c)) && ((c) <= 0x39)) + +/** + * IS_PUBIDCHAR: + * @c: an UNICODE value (int) + * + * Macro to check the following production in the XML spec: + * + * + * [13] PubidChar ::= #x20 | #xD | #xA | [a-zA-Z0-9] | [-'()+,./:=?;!*#@$_%] + */ +#define IS_PUBIDCHAR(c) xmlIsPubidCharQ(c) + +/** + * IS_PUBIDCHAR_CH: + * @c: an xmlChar value (normally unsigned char) + * + * Same as IS_PUBIDCHAR but for single-byte value + */ +#define IS_PUBIDCHAR_CH(c) xmlIsPubidChar_ch(c) + +/** + * Global variables used for predefined strings. + */ +XMLPUBVAR const xmlChar xmlStringText[]; +XMLPUBVAR const xmlChar xmlStringTextNoenc[]; +XMLPUBVAR const xmlChar xmlStringComment[]; + +/* + * Function to finish the work of the macros where needed. + */ +XMLPUBFUN int xmlIsLetter (int c); + +/** + * Parser context. + */ +XMLPUBFUN xmlParserCtxtPtr + xmlCreateFileParserCtxt (const char *filename); +XMLPUBFUN xmlParserCtxtPtr + xmlCreateURLParserCtxt (const char *filename, + int options); +XMLPUBFUN xmlParserCtxtPtr + xmlCreateMemoryParserCtxt(const char *buffer, + int size); +XMLPUBFUN xmlParserCtxtPtr + xmlCreateEntityParserCtxt(const xmlChar *URL, + const xmlChar *ID, + const xmlChar *base); +XMLPUBFUN void + xmlCtxtErrMemory (xmlParserCtxtPtr ctxt); +XMLPUBFUN int + xmlSwitchEncoding (xmlParserCtxtPtr ctxt, + xmlCharEncoding enc); +XMLPUBFUN int + xmlSwitchEncodingName (xmlParserCtxtPtr ctxt, + const char *encoding); +XMLPUBFUN int + xmlSwitchToEncoding (xmlParserCtxtPtr ctxt, + xmlCharEncodingHandlerPtr handler); +XML_DEPRECATED +XMLPUBFUN int + xmlSwitchInputEncoding (xmlParserCtxtPtr ctxt, + xmlParserInputPtr input, + xmlCharEncodingHandlerPtr handler); + +/** + * Input Streams. + */ +XMLPUBFUN xmlParserInputPtr + xmlNewStringInputStream (xmlParserCtxtPtr ctxt, + const xmlChar *buffer); +XML_DEPRECATED +XMLPUBFUN xmlParserInputPtr + xmlNewEntityInputStream (xmlParserCtxtPtr ctxt, + xmlEntityPtr entity); +XMLPUBFUN int + xmlPushInput (xmlParserCtxtPtr ctxt, + xmlParserInputPtr input); +XMLPUBFUN xmlChar + xmlPopInput (xmlParserCtxtPtr ctxt); +XMLPUBFUN void + xmlFreeInputStream (xmlParserInputPtr input); +XMLPUBFUN xmlParserInputPtr + xmlNewInputFromFile (xmlParserCtxtPtr ctxt, + const char *filename); +XMLPUBFUN xmlParserInputPtr + xmlNewInputStream (xmlParserCtxtPtr ctxt); + +/** + * Namespaces. + */ +XMLPUBFUN xmlChar * + xmlSplitQName (xmlParserCtxtPtr ctxt, + const xmlChar *name, + xmlChar **prefix); + +/** + * Generic production rules. + */ +XML_DEPRECATED +XMLPUBFUN const xmlChar * + xmlParseName (xmlParserCtxtPtr ctxt); +XML_DEPRECATED +XMLPUBFUN xmlChar * + xmlParseNmtoken (xmlParserCtxtPtr ctxt); +XML_DEPRECATED +XMLPUBFUN xmlChar * + xmlParseEntityValue (xmlParserCtxtPtr ctxt, + xmlChar **orig); +XML_DEPRECATED +XMLPUBFUN xmlChar * + xmlParseAttValue (xmlParserCtxtPtr ctxt); +XML_DEPRECATED +XMLPUBFUN xmlChar * + xmlParseSystemLiteral (xmlParserCtxtPtr ctxt); +XML_DEPRECATED +XMLPUBFUN xmlChar * + xmlParsePubidLiteral (xmlParserCtxtPtr ctxt); +XML_DEPRECATED +XMLPUBFUN void + xmlParseCharData (xmlParserCtxtPtr ctxt, + int cdata); +XML_DEPRECATED +XMLPUBFUN xmlChar * + xmlParseExternalID (xmlParserCtxtPtr ctxt, + xmlChar **publicID, + int strict); +XML_DEPRECATED +XMLPUBFUN void + xmlParseComment (xmlParserCtxtPtr ctxt); +XML_DEPRECATED +XMLPUBFUN const xmlChar * + xmlParsePITarget (xmlParserCtxtPtr ctxt); +XML_DEPRECATED +XMLPUBFUN void + xmlParsePI (xmlParserCtxtPtr ctxt); +XML_DEPRECATED +XMLPUBFUN void + xmlParseNotationDecl (xmlParserCtxtPtr ctxt); +XML_DEPRECATED +XMLPUBFUN void + xmlParseEntityDecl (xmlParserCtxtPtr ctxt); +XML_DEPRECATED +XMLPUBFUN int + xmlParseDefaultDecl (xmlParserCtxtPtr ctxt, + xmlChar **value); +XML_DEPRECATED +XMLPUBFUN xmlEnumerationPtr + xmlParseNotationType (xmlParserCtxtPtr ctxt); +XML_DEPRECATED +XMLPUBFUN xmlEnumerationPtr + xmlParseEnumerationType (xmlParserCtxtPtr ctxt); +XML_DEPRECATED +XMLPUBFUN int + xmlParseEnumeratedType (xmlParserCtxtPtr ctxt, + xmlEnumerationPtr *tree); +XML_DEPRECATED +XMLPUBFUN int + xmlParseAttributeType (xmlParserCtxtPtr ctxt, + xmlEnumerationPtr *tree); +XML_DEPRECATED +XMLPUBFUN void + xmlParseAttributeListDecl(xmlParserCtxtPtr ctxt); +XML_DEPRECATED +XMLPUBFUN xmlElementContentPtr + xmlParseElementMixedContentDecl + (xmlParserCtxtPtr ctxt, + int inputchk); +XML_DEPRECATED +XMLPUBFUN xmlElementContentPtr + xmlParseElementChildrenContentDecl + (xmlParserCtxtPtr ctxt, + int inputchk); +XML_DEPRECATED +XMLPUBFUN int + xmlParseElementContentDecl(xmlParserCtxtPtr ctxt, + const xmlChar *name, + xmlElementContentPtr *result); +XML_DEPRECATED +XMLPUBFUN int + xmlParseElementDecl (xmlParserCtxtPtr ctxt); +XML_DEPRECATED +XMLPUBFUN void + xmlParseMarkupDecl (xmlParserCtxtPtr ctxt); +XML_DEPRECATED +XMLPUBFUN int + xmlParseCharRef (xmlParserCtxtPtr ctxt); +XML_DEPRECATED +XMLPUBFUN xmlEntityPtr + xmlParseEntityRef (xmlParserCtxtPtr ctxt); +XML_DEPRECATED +XMLPUBFUN void + xmlParseReference (xmlParserCtxtPtr ctxt); +XML_DEPRECATED +XMLPUBFUN void + xmlParsePEReference (xmlParserCtxtPtr ctxt); +XML_DEPRECATED +XMLPUBFUN void + xmlParseDocTypeDecl (xmlParserCtxtPtr ctxt); +#ifdef LIBXML_SAX1_ENABLED +XML_DEPRECATED +XMLPUBFUN const xmlChar * + xmlParseAttribute (xmlParserCtxtPtr ctxt, + xmlChar **value); +XML_DEPRECATED +XMLPUBFUN const xmlChar * + xmlParseStartTag (xmlParserCtxtPtr ctxt); +XML_DEPRECATED +XMLPUBFUN void + xmlParseEndTag (xmlParserCtxtPtr ctxt); +#endif /* LIBXML_SAX1_ENABLED */ +XML_DEPRECATED +XMLPUBFUN void + xmlParseCDSect (xmlParserCtxtPtr ctxt); +XMLPUBFUN void + xmlParseContent (xmlParserCtxtPtr ctxt); +XML_DEPRECATED +XMLPUBFUN void + xmlParseElement (xmlParserCtxtPtr ctxt); +XML_DEPRECATED +XMLPUBFUN xmlChar * + xmlParseVersionNum (xmlParserCtxtPtr ctxt); +XML_DEPRECATED +XMLPUBFUN xmlChar * + xmlParseVersionInfo (xmlParserCtxtPtr ctxt); +XML_DEPRECATED +XMLPUBFUN xmlChar * + xmlParseEncName (xmlParserCtxtPtr ctxt); +XML_DEPRECATED +XMLPUBFUN const xmlChar * + xmlParseEncodingDecl (xmlParserCtxtPtr ctxt); +XML_DEPRECATED +XMLPUBFUN int + xmlParseSDDecl (xmlParserCtxtPtr ctxt); +XML_DEPRECATED +XMLPUBFUN void + xmlParseXMLDecl (xmlParserCtxtPtr ctxt); +XML_DEPRECATED +XMLPUBFUN void + xmlParseTextDecl (xmlParserCtxtPtr ctxt); +XML_DEPRECATED +XMLPUBFUN void + xmlParseMisc (xmlParserCtxtPtr ctxt); +XMLPUBFUN void + xmlParseExternalSubset (xmlParserCtxtPtr ctxt, + const xmlChar *ExternalID, + const xmlChar *SystemID); +/** + * XML_SUBSTITUTE_NONE: + * + * If no entities need to be substituted. + */ +#define XML_SUBSTITUTE_NONE 0 +/** + * XML_SUBSTITUTE_REF: + * + * Whether general entities need to be substituted. + */ +#define XML_SUBSTITUTE_REF 1 +/** + * XML_SUBSTITUTE_PEREF: + * + * Whether parameter entities need to be substituted. + */ +#define XML_SUBSTITUTE_PEREF 2 +/** + * XML_SUBSTITUTE_BOTH: + * + * Both general and parameter entities need to be substituted. + */ +#define XML_SUBSTITUTE_BOTH 3 + +XML_DEPRECATED +XMLPUBFUN xmlChar * + xmlStringDecodeEntities (xmlParserCtxtPtr ctxt, + const xmlChar *str, + int what, + xmlChar end, + xmlChar end2, + xmlChar end3); +XML_DEPRECATED +XMLPUBFUN xmlChar * + xmlStringLenDecodeEntities (xmlParserCtxtPtr ctxt, + const xmlChar *str, + int len, + int what, + xmlChar end, + xmlChar end2, + xmlChar end3); + +/* + * Generated by MACROS on top of parser.c c.f. PUSH_AND_POP. + */ +XML_DEPRECATED +XMLPUBFUN int nodePush (xmlParserCtxtPtr ctxt, + xmlNodePtr value); +XML_DEPRECATED +XMLPUBFUN xmlNodePtr nodePop (xmlParserCtxtPtr ctxt); +XMLPUBFUN int inputPush (xmlParserCtxtPtr ctxt, + xmlParserInputPtr value); +XMLPUBFUN xmlParserInputPtr inputPop (xmlParserCtxtPtr ctxt); +XML_DEPRECATED +XMLPUBFUN const xmlChar * namePop (xmlParserCtxtPtr ctxt); +XML_DEPRECATED +XMLPUBFUN int namePush (xmlParserCtxtPtr ctxt, + const xmlChar *value); + +/* + * other commodities shared between parser.c and parserInternals. + */ +XML_DEPRECATED +XMLPUBFUN int xmlSkipBlankChars (xmlParserCtxtPtr ctxt); +XML_DEPRECATED +XMLPUBFUN int xmlStringCurrentChar (xmlParserCtxtPtr ctxt, + const xmlChar *cur, + int *len); +XML_DEPRECATED +XMLPUBFUN void xmlParserHandlePEReference(xmlParserCtxtPtr ctxt); +XML_DEPRECATED +XMLPUBFUN int xmlCheckLanguageID (const xmlChar *lang); + +/* + * Really core function shared with HTML parser. + */ +XML_DEPRECATED +XMLPUBFUN int xmlCurrentChar (xmlParserCtxtPtr ctxt, + int *len); +XMLPUBFUN int xmlCopyCharMultiByte (xmlChar *out, + int val); +XMLPUBFUN int xmlCopyChar (int len, + xmlChar *out, + int val); +XML_DEPRECATED +XMLPUBFUN void xmlNextChar (xmlParserCtxtPtr ctxt); +XML_DEPRECATED +XMLPUBFUN void xmlParserInputShrink (xmlParserInputPtr in); + +/* + * Specific function to keep track of entities references + * and used by the XSLT debugger. + */ +#ifdef LIBXML_LEGACY_ENABLED +/** + * xmlEntityReferenceFunc: + * @ent: the entity + * @firstNode: the fist node in the chunk + * @lastNode: the last nod in the chunk + * + * Callback function used when one needs to be able to track back the + * provenance of a chunk of nodes inherited from an entity replacement. + */ +typedef void (*xmlEntityReferenceFunc) (xmlEntityPtr ent, + xmlNodePtr firstNode, + xmlNodePtr lastNode); + +XML_DEPRECATED +XMLPUBFUN void xmlSetEntityReferenceFunc (xmlEntityReferenceFunc func); + +XML_DEPRECATED +XMLPUBFUN xmlChar * + xmlParseQuotedString (xmlParserCtxtPtr ctxt); +XML_DEPRECATED +XMLPUBFUN void + xmlParseNamespace (xmlParserCtxtPtr ctxt); +XML_DEPRECATED +XMLPUBFUN xmlChar * + xmlNamespaceParseNSDef (xmlParserCtxtPtr ctxt); +XML_DEPRECATED +XMLPUBFUN xmlChar * + xmlScanName (xmlParserCtxtPtr ctxt); +XML_DEPRECATED +XMLPUBFUN xmlChar * + xmlNamespaceParseNCName (xmlParserCtxtPtr ctxt); +XML_DEPRECATED +XMLPUBFUN void xmlParserHandleReference(xmlParserCtxtPtr ctxt); +XML_DEPRECATED +XMLPUBFUN xmlChar * + xmlNamespaceParseQName (xmlParserCtxtPtr ctxt, + xmlChar **prefix); +/** + * Entities + */ +XML_DEPRECATED +XMLPUBFUN xmlChar * + xmlDecodeEntities (xmlParserCtxtPtr ctxt, + int len, + int what, + xmlChar end, + xmlChar end2, + xmlChar end3); +XML_DEPRECATED +XMLPUBFUN void + xmlHandleEntity (xmlParserCtxtPtr ctxt, + xmlEntityPtr entity); + +#endif /* LIBXML_LEGACY_ENABLED */ + +#ifdef __cplusplus +} +#endif +#endif /* __XML_PARSER_INTERNALS_H__ */ diff --git a/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/include/libxml2/libxml/pattern.h b/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/include/libxml2/libxml/pattern.h new file mode 100644 index 0000000000000000000000000000000000000000..947f0900a23e0a7fb424d73fb31ddd9abaaf1656 --- /dev/null +++ b/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/include/libxml2/libxml/pattern.h @@ -0,0 +1,106 @@ +/* + * Summary: pattern expression handling + * Description: allows to compile and test pattern expressions for nodes + * either in a tree or based on a parser state. + * + * Copy: See Copyright for the status of this software. + * + * Author: Daniel Veillard + */ + +#ifndef __XML_PATTERN_H__ +#define __XML_PATTERN_H__ + +#include +#include +#include + +#ifdef LIBXML_PATTERN_ENABLED + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * xmlPattern: + * + * A compiled (XPath based) pattern to select nodes + */ +typedef struct _xmlPattern xmlPattern; +typedef xmlPattern *xmlPatternPtr; + +/** + * xmlPatternFlags: + * + * This is the set of options affecting the behaviour of pattern + * matching with this module + * + */ +typedef enum { + XML_PATTERN_DEFAULT = 0, /* simple pattern match */ + XML_PATTERN_XPATH = 1<<0, /* standard XPath pattern */ + XML_PATTERN_XSSEL = 1<<1, /* XPath subset for schema selector */ + XML_PATTERN_XSFIELD = 1<<2 /* XPath subset for schema field */ +} xmlPatternFlags; + +XMLPUBFUN void + xmlFreePattern (xmlPatternPtr comp); + +XMLPUBFUN void + xmlFreePatternList (xmlPatternPtr comp); + +XMLPUBFUN xmlPatternPtr + xmlPatterncompile (const xmlChar *pattern, + xmlDict *dict, + int flags, + const xmlChar **namespaces); +XMLPUBFUN int + xmlPatternCompileSafe (const xmlChar *pattern, + xmlDict *dict, + int flags, + const xmlChar **namespaces, + xmlPatternPtr *patternOut); +XMLPUBFUN int + xmlPatternMatch (xmlPatternPtr comp, + xmlNodePtr node); + +/* streaming interfaces */ +typedef struct _xmlStreamCtxt xmlStreamCtxt; +typedef xmlStreamCtxt *xmlStreamCtxtPtr; + +XMLPUBFUN int + xmlPatternStreamable (xmlPatternPtr comp); +XMLPUBFUN int + xmlPatternMaxDepth (xmlPatternPtr comp); +XMLPUBFUN int + xmlPatternMinDepth (xmlPatternPtr comp); +XMLPUBFUN int + xmlPatternFromRoot (xmlPatternPtr comp); +XMLPUBFUN xmlStreamCtxtPtr + xmlPatternGetStreamCtxt (xmlPatternPtr comp); +XMLPUBFUN void + xmlFreeStreamCtxt (xmlStreamCtxtPtr stream); +XMLPUBFUN int + xmlStreamPushNode (xmlStreamCtxtPtr stream, + const xmlChar *name, + const xmlChar *ns, + int nodeType); +XMLPUBFUN int + xmlStreamPush (xmlStreamCtxtPtr stream, + const xmlChar *name, + const xmlChar *ns); +XMLPUBFUN int + xmlStreamPushAttr (xmlStreamCtxtPtr stream, + const xmlChar *name, + const xmlChar *ns); +XMLPUBFUN int + xmlStreamPop (xmlStreamCtxtPtr stream); +XMLPUBFUN int + xmlStreamWantsAnyNode (xmlStreamCtxtPtr stream); +#ifdef __cplusplus +} +#endif + +#endif /* LIBXML_PATTERN_ENABLED */ + +#endif /* __XML_PATTERN_H__ */ diff --git a/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/include/libxml2/libxml/relaxng.h b/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/include/libxml2/libxml/relaxng.h new file mode 100644 index 0000000000000000000000000000000000000000..079b7f125d0d2d31b740faecd146bbd85705868e --- /dev/null +++ b/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/include/libxml2/libxml/relaxng.h @@ -0,0 +1,219 @@ +/* + * Summary: implementation of the Relax-NG validation + * Description: implementation of the Relax-NG validation + * + * Copy: See Copyright for the status of this software. + * + * Author: Daniel Veillard + */ + +#ifndef __XML_RELAX_NG__ +#define __XML_RELAX_NG__ + +#include +#include +#include +#include + +#ifdef LIBXML_SCHEMAS_ENABLED + +#ifdef __cplusplus +extern "C" { +#endif + +typedef struct _xmlRelaxNG xmlRelaxNG; +typedef xmlRelaxNG *xmlRelaxNGPtr; + + +/** + * xmlRelaxNGValidityErrorFunc: + * @ctx: the validation context + * @msg: the message + * @...: extra arguments + * + * Signature of an error callback from a Relax-NG validation + */ +typedef void (*xmlRelaxNGValidityErrorFunc) (void *ctx, + const char *msg, + ...) LIBXML_ATTR_FORMAT(2,3); + +/** + * xmlRelaxNGValidityWarningFunc: + * @ctx: the validation context + * @msg: the message + * @...: extra arguments + * + * Signature of a warning callback from a Relax-NG validation + */ +typedef void (*xmlRelaxNGValidityWarningFunc) (void *ctx, + const char *msg, + ...) LIBXML_ATTR_FORMAT(2,3); + +/** + * A schemas validation context + */ +typedef struct _xmlRelaxNGParserCtxt xmlRelaxNGParserCtxt; +typedef xmlRelaxNGParserCtxt *xmlRelaxNGParserCtxtPtr; + +typedef struct _xmlRelaxNGValidCtxt xmlRelaxNGValidCtxt; +typedef xmlRelaxNGValidCtxt *xmlRelaxNGValidCtxtPtr; + +/* + * xmlRelaxNGValidErr: + * + * List of possible Relax NG validation errors + */ +typedef enum { + XML_RELAXNG_OK = 0, + XML_RELAXNG_ERR_MEMORY, + XML_RELAXNG_ERR_TYPE, + XML_RELAXNG_ERR_TYPEVAL, + XML_RELAXNG_ERR_DUPID, + XML_RELAXNG_ERR_TYPECMP, + XML_RELAXNG_ERR_NOSTATE, + XML_RELAXNG_ERR_NODEFINE, + XML_RELAXNG_ERR_LISTEXTRA, + XML_RELAXNG_ERR_LISTEMPTY, + XML_RELAXNG_ERR_INTERNODATA, + XML_RELAXNG_ERR_INTERSEQ, + XML_RELAXNG_ERR_INTEREXTRA, + XML_RELAXNG_ERR_ELEMNAME, + XML_RELAXNG_ERR_ATTRNAME, + XML_RELAXNG_ERR_ELEMNONS, + XML_RELAXNG_ERR_ATTRNONS, + XML_RELAXNG_ERR_ELEMWRONGNS, + XML_RELAXNG_ERR_ATTRWRONGNS, + XML_RELAXNG_ERR_ELEMEXTRANS, + XML_RELAXNG_ERR_ATTREXTRANS, + XML_RELAXNG_ERR_ELEMNOTEMPTY, + XML_RELAXNG_ERR_NOELEM, + XML_RELAXNG_ERR_NOTELEM, + XML_RELAXNG_ERR_ATTRVALID, + XML_RELAXNG_ERR_CONTENTVALID, + XML_RELAXNG_ERR_EXTRACONTENT, + XML_RELAXNG_ERR_INVALIDATTR, + XML_RELAXNG_ERR_DATAELEM, + XML_RELAXNG_ERR_VALELEM, + XML_RELAXNG_ERR_LISTELEM, + XML_RELAXNG_ERR_DATATYPE, + XML_RELAXNG_ERR_VALUE, + XML_RELAXNG_ERR_LIST, + XML_RELAXNG_ERR_NOGRAMMAR, + XML_RELAXNG_ERR_EXTRADATA, + XML_RELAXNG_ERR_LACKDATA, + XML_RELAXNG_ERR_INTERNAL, + XML_RELAXNG_ERR_ELEMWRONG, + XML_RELAXNG_ERR_TEXTWRONG +} xmlRelaxNGValidErr; + +/* + * xmlRelaxNGParserFlags: + * + * List of possible Relax NG Parser flags + */ +typedef enum { + XML_RELAXNGP_NONE = 0, + XML_RELAXNGP_FREE_DOC = 1, + XML_RELAXNGP_CRNG = 2 +} xmlRelaxNGParserFlag; + +XMLPUBFUN int + xmlRelaxNGInitTypes (void); +XML_DEPRECATED +XMLPUBFUN void + xmlRelaxNGCleanupTypes (void); + +/* + * Interfaces for parsing. + */ +XMLPUBFUN xmlRelaxNGParserCtxtPtr + xmlRelaxNGNewParserCtxt (const char *URL); +XMLPUBFUN xmlRelaxNGParserCtxtPtr + xmlRelaxNGNewMemParserCtxt (const char *buffer, + int size); +XMLPUBFUN xmlRelaxNGParserCtxtPtr + xmlRelaxNGNewDocParserCtxt (xmlDocPtr doc); + +XMLPUBFUN int + xmlRelaxParserSetFlag (xmlRelaxNGParserCtxtPtr ctxt, + int flag); + +XMLPUBFUN void + xmlRelaxNGFreeParserCtxt (xmlRelaxNGParserCtxtPtr ctxt); +XMLPUBFUN void + xmlRelaxNGSetParserErrors(xmlRelaxNGParserCtxtPtr ctxt, + xmlRelaxNGValidityErrorFunc err, + xmlRelaxNGValidityWarningFunc warn, + void *ctx); +XMLPUBFUN int + xmlRelaxNGGetParserErrors(xmlRelaxNGParserCtxtPtr ctxt, + xmlRelaxNGValidityErrorFunc *err, + xmlRelaxNGValidityWarningFunc *warn, + void **ctx); +XMLPUBFUN void + xmlRelaxNGSetParserStructuredErrors( + xmlRelaxNGParserCtxtPtr ctxt, + xmlStructuredErrorFunc serror, + void *ctx); +XMLPUBFUN xmlRelaxNGPtr + xmlRelaxNGParse (xmlRelaxNGParserCtxtPtr ctxt); +XMLPUBFUN void + xmlRelaxNGFree (xmlRelaxNGPtr schema); +#ifdef LIBXML_OUTPUT_ENABLED +XMLPUBFUN void + xmlRelaxNGDump (FILE *output, + xmlRelaxNGPtr schema); +XMLPUBFUN void + xmlRelaxNGDumpTree (FILE * output, + xmlRelaxNGPtr schema); +#endif /* LIBXML_OUTPUT_ENABLED */ +/* + * Interfaces for validating + */ +XMLPUBFUN void + xmlRelaxNGSetValidErrors(xmlRelaxNGValidCtxtPtr ctxt, + xmlRelaxNGValidityErrorFunc err, + xmlRelaxNGValidityWarningFunc warn, + void *ctx); +XMLPUBFUN int + xmlRelaxNGGetValidErrors(xmlRelaxNGValidCtxtPtr ctxt, + xmlRelaxNGValidityErrorFunc *err, + xmlRelaxNGValidityWarningFunc *warn, + void **ctx); +XMLPUBFUN void + xmlRelaxNGSetValidStructuredErrors(xmlRelaxNGValidCtxtPtr ctxt, + xmlStructuredErrorFunc serror, void *ctx); +XMLPUBFUN xmlRelaxNGValidCtxtPtr + xmlRelaxNGNewValidCtxt (xmlRelaxNGPtr schema); +XMLPUBFUN void + xmlRelaxNGFreeValidCtxt (xmlRelaxNGValidCtxtPtr ctxt); +XMLPUBFUN int + xmlRelaxNGValidateDoc (xmlRelaxNGValidCtxtPtr ctxt, + xmlDocPtr doc); +/* + * Interfaces for progressive validation when possible + */ +XMLPUBFUN int + xmlRelaxNGValidatePushElement (xmlRelaxNGValidCtxtPtr ctxt, + xmlDocPtr doc, + xmlNodePtr elem); +XMLPUBFUN int + xmlRelaxNGValidatePushCData (xmlRelaxNGValidCtxtPtr ctxt, + const xmlChar *data, + int len); +XMLPUBFUN int + xmlRelaxNGValidatePopElement (xmlRelaxNGValidCtxtPtr ctxt, + xmlDocPtr doc, + xmlNodePtr elem); +XMLPUBFUN int + xmlRelaxNGValidateFullElement (xmlRelaxNGValidCtxtPtr ctxt, + xmlDocPtr doc, + xmlNodePtr elem); + +#ifdef __cplusplus +} +#endif + +#endif /* LIBXML_SCHEMAS_ENABLED */ + +#endif /* __XML_RELAX_NG__ */ diff --git a/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/include/libxml2/libxml/schemasInternals.h b/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/include/libxml2/libxml/schemasInternals.h new file mode 100644 index 0000000000000000000000000000000000000000..e9d3b3c7abb1e5b6fa1b1f25fb9bc2ee5e46d56f --- /dev/null +++ b/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/include/libxml2/libxml/schemasInternals.h @@ -0,0 +1,959 @@ +/* + * Summary: internal interfaces for XML Schemas + * Description: internal interfaces for the XML Schemas handling + * and schema validity checking + * The Schemas development is a Work In Progress. + * Some of those interfaces are not guaranteed to be API or ABI stable ! + * + * Copy: See Copyright for the status of this software. + * + * Author: Daniel Veillard + */ + + +#ifndef __XML_SCHEMA_INTERNALS_H__ +#define __XML_SCHEMA_INTERNALS_H__ + +#include + +#ifdef LIBXML_SCHEMAS_ENABLED + +#include +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +typedef enum { + XML_SCHEMAS_UNKNOWN = 0, + XML_SCHEMAS_STRING = 1, + XML_SCHEMAS_NORMSTRING = 2, + XML_SCHEMAS_DECIMAL = 3, + XML_SCHEMAS_TIME = 4, + XML_SCHEMAS_GDAY = 5, + XML_SCHEMAS_GMONTH = 6, + XML_SCHEMAS_GMONTHDAY = 7, + XML_SCHEMAS_GYEAR = 8, + XML_SCHEMAS_GYEARMONTH = 9, + XML_SCHEMAS_DATE = 10, + XML_SCHEMAS_DATETIME = 11, + XML_SCHEMAS_DURATION = 12, + XML_SCHEMAS_FLOAT = 13, + XML_SCHEMAS_DOUBLE = 14, + XML_SCHEMAS_BOOLEAN = 15, + XML_SCHEMAS_TOKEN = 16, + XML_SCHEMAS_LANGUAGE = 17, + XML_SCHEMAS_NMTOKEN = 18, + XML_SCHEMAS_NMTOKENS = 19, + XML_SCHEMAS_NAME = 20, + XML_SCHEMAS_QNAME = 21, + XML_SCHEMAS_NCNAME = 22, + XML_SCHEMAS_ID = 23, + XML_SCHEMAS_IDREF = 24, + XML_SCHEMAS_IDREFS = 25, + XML_SCHEMAS_ENTITY = 26, + XML_SCHEMAS_ENTITIES = 27, + XML_SCHEMAS_NOTATION = 28, + XML_SCHEMAS_ANYURI = 29, + XML_SCHEMAS_INTEGER = 30, + XML_SCHEMAS_NPINTEGER = 31, + XML_SCHEMAS_NINTEGER = 32, + XML_SCHEMAS_NNINTEGER = 33, + XML_SCHEMAS_PINTEGER = 34, + XML_SCHEMAS_INT = 35, + XML_SCHEMAS_UINT = 36, + XML_SCHEMAS_LONG = 37, + XML_SCHEMAS_ULONG = 38, + XML_SCHEMAS_SHORT = 39, + XML_SCHEMAS_USHORT = 40, + XML_SCHEMAS_BYTE = 41, + XML_SCHEMAS_UBYTE = 42, + XML_SCHEMAS_HEXBINARY = 43, + XML_SCHEMAS_BASE64BINARY = 44, + XML_SCHEMAS_ANYTYPE = 45, + XML_SCHEMAS_ANYSIMPLETYPE = 46 +} xmlSchemaValType; + +/* + * XML Schemas defines multiple type of types. + */ +typedef enum { + XML_SCHEMA_TYPE_BASIC = 1, /* A built-in datatype */ + XML_SCHEMA_TYPE_ANY, + XML_SCHEMA_TYPE_FACET, + XML_SCHEMA_TYPE_SIMPLE, + XML_SCHEMA_TYPE_COMPLEX, + XML_SCHEMA_TYPE_SEQUENCE = 6, + XML_SCHEMA_TYPE_CHOICE, + XML_SCHEMA_TYPE_ALL, + XML_SCHEMA_TYPE_SIMPLE_CONTENT, + XML_SCHEMA_TYPE_COMPLEX_CONTENT, + XML_SCHEMA_TYPE_UR, + XML_SCHEMA_TYPE_RESTRICTION, + XML_SCHEMA_TYPE_EXTENSION, + XML_SCHEMA_TYPE_ELEMENT, + XML_SCHEMA_TYPE_ATTRIBUTE, + XML_SCHEMA_TYPE_ATTRIBUTEGROUP, + XML_SCHEMA_TYPE_GROUP, + XML_SCHEMA_TYPE_NOTATION, + XML_SCHEMA_TYPE_LIST, + XML_SCHEMA_TYPE_UNION, + XML_SCHEMA_TYPE_ANY_ATTRIBUTE, + XML_SCHEMA_TYPE_IDC_UNIQUE, + XML_SCHEMA_TYPE_IDC_KEY, + XML_SCHEMA_TYPE_IDC_KEYREF, + XML_SCHEMA_TYPE_PARTICLE = 25, + XML_SCHEMA_TYPE_ATTRIBUTE_USE, + XML_SCHEMA_FACET_MININCLUSIVE = 1000, + XML_SCHEMA_FACET_MINEXCLUSIVE, + XML_SCHEMA_FACET_MAXINCLUSIVE, + XML_SCHEMA_FACET_MAXEXCLUSIVE, + XML_SCHEMA_FACET_TOTALDIGITS, + XML_SCHEMA_FACET_FRACTIONDIGITS, + XML_SCHEMA_FACET_PATTERN, + XML_SCHEMA_FACET_ENUMERATION, + XML_SCHEMA_FACET_WHITESPACE, + XML_SCHEMA_FACET_LENGTH, + XML_SCHEMA_FACET_MAXLENGTH, + XML_SCHEMA_FACET_MINLENGTH, + XML_SCHEMA_EXTRA_QNAMEREF = 2000, + XML_SCHEMA_EXTRA_ATTR_USE_PROHIB +} xmlSchemaTypeType; + +typedef enum { + XML_SCHEMA_CONTENT_UNKNOWN = 0, + XML_SCHEMA_CONTENT_EMPTY = 1, + XML_SCHEMA_CONTENT_ELEMENTS, + XML_SCHEMA_CONTENT_MIXED, + XML_SCHEMA_CONTENT_SIMPLE, + XML_SCHEMA_CONTENT_MIXED_OR_ELEMENTS, /* Obsolete */ + XML_SCHEMA_CONTENT_BASIC, + XML_SCHEMA_CONTENT_ANY +} xmlSchemaContentType; + +typedef struct _xmlSchemaVal xmlSchemaVal; +typedef xmlSchemaVal *xmlSchemaValPtr; + +typedef struct _xmlSchemaType xmlSchemaType; +typedef xmlSchemaType *xmlSchemaTypePtr; + +typedef struct _xmlSchemaFacet xmlSchemaFacet; +typedef xmlSchemaFacet *xmlSchemaFacetPtr; + +/** + * Annotation + */ +typedef struct _xmlSchemaAnnot xmlSchemaAnnot; +typedef xmlSchemaAnnot *xmlSchemaAnnotPtr; +struct _xmlSchemaAnnot { + struct _xmlSchemaAnnot *next; + xmlNodePtr content; /* the annotation */ +}; + +/** + * XML_SCHEMAS_ANYATTR_SKIP: + * + * Skip unknown attribute from validation + * Obsolete, not used anymore. + */ +#define XML_SCHEMAS_ANYATTR_SKIP 1 +/** + * XML_SCHEMAS_ANYATTR_LAX: + * + * Ignore validation non definition on attributes + * Obsolete, not used anymore. + */ +#define XML_SCHEMAS_ANYATTR_LAX 2 +/** + * XML_SCHEMAS_ANYATTR_STRICT: + * + * Apply strict validation rules on attributes + * Obsolete, not used anymore. + */ +#define XML_SCHEMAS_ANYATTR_STRICT 3 +/** + * XML_SCHEMAS_ANY_SKIP: + * + * Skip unknown attribute from validation + */ +#define XML_SCHEMAS_ANY_SKIP 1 +/** + * XML_SCHEMAS_ANY_LAX: + * + * Used by wildcards. + * Validate if type found, don't worry if not found + */ +#define XML_SCHEMAS_ANY_LAX 2 +/** + * XML_SCHEMAS_ANY_STRICT: + * + * Used by wildcards. + * Apply strict validation rules + */ +#define XML_SCHEMAS_ANY_STRICT 3 +/** + * XML_SCHEMAS_ATTR_USE_PROHIBITED: + * + * Used by wildcards. + * The attribute is prohibited. + */ +#define XML_SCHEMAS_ATTR_USE_PROHIBITED 0 +/** + * XML_SCHEMAS_ATTR_USE_REQUIRED: + * + * The attribute is required. + */ +#define XML_SCHEMAS_ATTR_USE_REQUIRED 1 +/** + * XML_SCHEMAS_ATTR_USE_OPTIONAL: + * + * The attribute is optional. + */ +#define XML_SCHEMAS_ATTR_USE_OPTIONAL 2 +/** + * XML_SCHEMAS_ATTR_GLOBAL: + * + * allow elements in no namespace + */ +#define XML_SCHEMAS_ATTR_GLOBAL 1 << 0 +/** + * XML_SCHEMAS_ATTR_NSDEFAULT: + * + * allow elements in no namespace + */ +#define XML_SCHEMAS_ATTR_NSDEFAULT 1 << 7 +/** + * XML_SCHEMAS_ATTR_INTERNAL_RESOLVED: + * + * this is set when the "type" and "ref" references + * have been resolved. + */ +#define XML_SCHEMAS_ATTR_INTERNAL_RESOLVED 1 << 8 +/** + * XML_SCHEMAS_ATTR_FIXED: + * + * the attribute has a fixed value + */ +#define XML_SCHEMAS_ATTR_FIXED 1 << 9 + +/** + * xmlSchemaAttribute: + * An attribute definition. + */ + +typedef struct _xmlSchemaAttribute xmlSchemaAttribute; +typedef xmlSchemaAttribute *xmlSchemaAttributePtr; +struct _xmlSchemaAttribute { + xmlSchemaTypeType type; + struct _xmlSchemaAttribute *next; /* the next attribute (not used?) */ + const xmlChar *name; /* the name of the declaration */ + const xmlChar *id; /* Deprecated; not used */ + const xmlChar *ref; /* Deprecated; not used */ + const xmlChar *refNs; /* Deprecated; not used */ + const xmlChar *typeName; /* the local name of the type definition */ + const xmlChar *typeNs; /* the ns URI of the type definition */ + xmlSchemaAnnotPtr annot; + + xmlSchemaTypePtr base; /* Deprecated; not used */ + int occurs; /* Deprecated; not used */ + const xmlChar *defValue; /* The initial value of the value constraint */ + xmlSchemaTypePtr subtypes; /* the type definition */ + xmlNodePtr node; + const xmlChar *targetNamespace; + int flags; + const xmlChar *refPrefix; /* Deprecated; not used */ + xmlSchemaValPtr defVal; /* The compiled value constraint */ + xmlSchemaAttributePtr refDecl; /* Deprecated; not used */ +}; + +/** + * xmlSchemaAttributeLink: + * Used to build a list of attribute uses on complexType definitions. + * WARNING: Deprecated; not used. + */ +typedef struct _xmlSchemaAttributeLink xmlSchemaAttributeLink; +typedef xmlSchemaAttributeLink *xmlSchemaAttributeLinkPtr; +struct _xmlSchemaAttributeLink { + struct _xmlSchemaAttributeLink *next;/* the next attribute link ... */ + struct _xmlSchemaAttribute *attr;/* the linked attribute */ +}; + +/** + * XML_SCHEMAS_WILDCARD_COMPLETE: + * + * If the wildcard is complete. + */ +#define XML_SCHEMAS_WILDCARD_COMPLETE 1 << 0 + +/** + * xmlSchemaCharValueLink: + * Used to build a list of namespaces on wildcards. + */ +typedef struct _xmlSchemaWildcardNs xmlSchemaWildcardNs; +typedef xmlSchemaWildcardNs *xmlSchemaWildcardNsPtr; +struct _xmlSchemaWildcardNs { + struct _xmlSchemaWildcardNs *next;/* the next constraint link ... */ + const xmlChar *value;/* the value */ +}; + +/** + * xmlSchemaWildcard. + * A wildcard. + */ +typedef struct _xmlSchemaWildcard xmlSchemaWildcard; +typedef xmlSchemaWildcard *xmlSchemaWildcardPtr; +struct _xmlSchemaWildcard { + xmlSchemaTypeType type; /* The kind of type */ + const xmlChar *id; /* Deprecated; not used */ + xmlSchemaAnnotPtr annot; + xmlNodePtr node; + int minOccurs; /* Deprecated; not used */ + int maxOccurs; /* Deprecated; not used */ + int processContents; + int any; /* Indicates if the ns constraint is of ##any */ + xmlSchemaWildcardNsPtr nsSet; /* The list of allowed namespaces */ + xmlSchemaWildcardNsPtr negNsSet; /* The negated namespace */ + int flags; +}; + +/** + * XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED: + * + * The attribute wildcard has been built. + */ +#define XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED 1 << 0 +/** + * XML_SCHEMAS_ATTRGROUP_GLOBAL: + * + * The attribute group has been defined. + */ +#define XML_SCHEMAS_ATTRGROUP_GLOBAL 1 << 1 +/** + * XML_SCHEMAS_ATTRGROUP_MARKED: + * + * Marks the attr group as marked; used for circular checks. + */ +#define XML_SCHEMAS_ATTRGROUP_MARKED 1 << 2 + +/** + * XML_SCHEMAS_ATTRGROUP_REDEFINED: + * + * The attr group was redefined. + */ +#define XML_SCHEMAS_ATTRGROUP_REDEFINED 1 << 3 +/** + * XML_SCHEMAS_ATTRGROUP_HAS_REFS: + * + * Whether this attr. group contains attr. group references. + */ +#define XML_SCHEMAS_ATTRGROUP_HAS_REFS 1 << 4 + +/** + * An attribute group definition. + * + * xmlSchemaAttribute and xmlSchemaAttributeGroup start of structures + * must be kept similar + */ +typedef struct _xmlSchemaAttributeGroup xmlSchemaAttributeGroup; +typedef xmlSchemaAttributeGroup *xmlSchemaAttributeGroupPtr; +struct _xmlSchemaAttributeGroup { + xmlSchemaTypeType type; /* The kind of type */ + struct _xmlSchemaAttribute *next;/* the next attribute if in a group ... */ + const xmlChar *name; + const xmlChar *id; + const xmlChar *ref; /* Deprecated; not used */ + const xmlChar *refNs; /* Deprecated; not used */ + xmlSchemaAnnotPtr annot; + + xmlSchemaAttributePtr attributes; /* Deprecated; not used */ + xmlNodePtr node; + int flags; + xmlSchemaWildcardPtr attributeWildcard; + const xmlChar *refPrefix; /* Deprecated; not used */ + xmlSchemaAttributeGroupPtr refItem; /* Deprecated; not used */ + const xmlChar *targetNamespace; + void *attrUses; +}; + +/** + * xmlSchemaTypeLink: + * Used to build a list of types (e.g. member types of + * simpleType with variety "union"). + */ +typedef struct _xmlSchemaTypeLink xmlSchemaTypeLink; +typedef xmlSchemaTypeLink *xmlSchemaTypeLinkPtr; +struct _xmlSchemaTypeLink { + struct _xmlSchemaTypeLink *next;/* the next type link ... */ + xmlSchemaTypePtr type;/* the linked type */ +}; + +/** + * xmlSchemaFacetLink: + * Used to build a list of facets. + */ +typedef struct _xmlSchemaFacetLink xmlSchemaFacetLink; +typedef xmlSchemaFacetLink *xmlSchemaFacetLinkPtr; +struct _xmlSchemaFacetLink { + struct _xmlSchemaFacetLink *next;/* the next facet link ... */ + xmlSchemaFacetPtr facet;/* the linked facet */ +}; + +/** + * XML_SCHEMAS_TYPE_MIXED: + * + * the element content type is mixed + */ +#define XML_SCHEMAS_TYPE_MIXED 1 << 0 +/** + * XML_SCHEMAS_TYPE_DERIVATION_METHOD_EXTENSION: + * + * the simple or complex type has a derivation method of "extension". + */ +#define XML_SCHEMAS_TYPE_DERIVATION_METHOD_EXTENSION 1 << 1 +/** + * XML_SCHEMAS_TYPE_DERIVATION_METHOD_RESTRICTION: + * + * the simple or complex type has a derivation method of "restriction". + */ +#define XML_SCHEMAS_TYPE_DERIVATION_METHOD_RESTRICTION 1 << 2 +/** + * XML_SCHEMAS_TYPE_GLOBAL: + * + * the type is global + */ +#define XML_SCHEMAS_TYPE_GLOBAL 1 << 3 +/** + * XML_SCHEMAS_TYPE_OWNED_ATTR_WILDCARD: + * + * the complexType owns an attribute wildcard, i.e. + * it can be freed by the complexType + */ +#define XML_SCHEMAS_TYPE_OWNED_ATTR_WILDCARD 1 << 4 /* Obsolete. */ +/** + * XML_SCHEMAS_TYPE_VARIETY_ABSENT: + * + * the simpleType has a variety of "absent". + * TODO: Actually not necessary :-/, since if + * none of the variety flags occur then it's + * automatically absent. + */ +#define XML_SCHEMAS_TYPE_VARIETY_ABSENT 1 << 5 +/** + * XML_SCHEMAS_TYPE_VARIETY_LIST: + * + * the simpleType has a variety of "list". + */ +#define XML_SCHEMAS_TYPE_VARIETY_LIST 1 << 6 +/** + * XML_SCHEMAS_TYPE_VARIETY_UNION: + * + * the simpleType has a variety of "union". + */ +#define XML_SCHEMAS_TYPE_VARIETY_UNION 1 << 7 +/** + * XML_SCHEMAS_TYPE_VARIETY_ATOMIC: + * + * the simpleType has a variety of "union". + */ +#define XML_SCHEMAS_TYPE_VARIETY_ATOMIC 1 << 8 +/** + * XML_SCHEMAS_TYPE_FINAL_EXTENSION: + * + * the complexType has a final of "extension". + */ +#define XML_SCHEMAS_TYPE_FINAL_EXTENSION 1 << 9 +/** + * XML_SCHEMAS_TYPE_FINAL_RESTRICTION: + * + * the simpleType/complexType has a final of "restriction". + */ +#define XML_SCHEMAS_TYPE_FINAL_RESTRICTION 1 << 10 +/** + * XML_SCHEMAS_TYPE_FINAL_LIST: + * + * the simpleType has a final of "list". + */ +#define XML_SCHEMAS_TYPE_FINAL_LIST 1 << 11 +/** + * XML_SCHEMAS_TYPE_FINAL_UNION: + * + * the simpleType has a final of "union". + */ +#define XML_SCHEMAS_TYPE_FINAL_UNION 1 << 12 +/** + * XML_SCHEMAS_TYPE_FINAL_DEFAULT: + * + * the simpleType has a final of "default". + */ +#define XML_SCHEMAS_TYPE_FINAL_DEFAULT 1 << 13 +/** + * XML_SCHEMAS_TYPE_BUILTIN_PRIMITIVE: + * + * Marks the item as a builtin primitive. + */ +#define XML_SCHEMAS_TYPE_BUILTIN_PRIMITIVE 1 << 14 +/** + * XML_SCHEMAS_TYPE_MARKED: + * + * Marks the item as marked; used for circular checks. + */ +#define XML_SCHEMAS_TYPE_MARKED 1 << 16 +/** + * XML_SCHEMAS_TYPE_BLOCK_DEFAULT: + * + * the complexType did not specify 'block' so use the default of the + * item. + */ +#define XML_SCHEMAS_TYPE_BLOCK_DEFAULT 1 << 17 +/** + * XML_SCHEMAS_TYPE_BLOCK_EXTENSION: + * + * the complexType has a 'block' of "extension". + */ +#define XML_SCHEMAS_TYPE_BLOCK_EXTENSION 1 << 18 +/** + * XML_SCHEMAS_TYPE_BLOCK_RESTRICTION: + * + * the complexType has a 'block' of "restriction". + */ +#define XML_SCHEMAS_TYPE_BLOCK_RESTRICTION 1 << 19 +/** + * XML_SCHEMAS_TYPE_ABSTRACT: + * + * the simple/complexType is abstract. + */ +#define XML_SCHEMAS_TYPE_ABSTRACT 1 << 20 +/** + * XML_SCHEMAS_TYPE_FACETSNEEDVALUE: + * + * indicates if the facets need a computed value + */ +#define XML_SCHEMAS_TYPE_FACETSNEEDVALUE 1 << 21 +/** + * XML_SCHEMAS_TYPE_INTERNAL_RESOLVED: + * + * indicates that the type was typefixed + */ +#define XML_SCHEMAS_TYPE_INTERNAL_RESOLVED 1 << 22 +/** + * XML_SCHEMAS_TYPE_INTERNAL_INVALID: + * + * indicates that the type is invalid + */ +#define XML_SCHEMAS_TYPE_INTERNAL_INVALID 1 << 23 +/** + * XML_SCHEMAS_TYPE_WHITESPACE_PRESERVE: + * + * a whitespace-facet value of "preserve" + */ +#define XML_SCHEMAS_TYPE_WHITESPACE_PRESERVE 1 << 24 +/** + * XML_SCHEMAS_TYPE_WHITESPACE_REPLACE: + * + * a whitespace-facet value of "replace" + */ +#define XML_SCHEMAS_TYPE_WHITESPACE_REPLACE 1 << 25 +/** + * XML_SCHEMAS_TYPE_WHITESPACE_COLLAPSE: + * + * a whitespace-facet value of "collapse" + */ +#define XML_SCHEMAS_TYPE_WHITESPACE_COLLAPSE 1 << 26 +/** + * XML_SCHEMAS_TYPE_HAS_FACETS: + * + * has facets + */ +#define XML_SCHEMAS_TYPE_HAS_FACETS 1 << 27 +/** + * XML_SCHEMAS_TYPE_NORMVALUENEEDED: + * + * indicates if the facets (pattern) need a normalized value + */ +#define XML_SCHEMAS_TYPE_NORMVALUENEEDED 1 << 28 + +/** + * XML_SCHEMAS_TYPE_FIXUP_1: + * + * First stage of fixup was done. + */ +#define XML_SCHEMAS_TYPE_FIXUP_1 1 << 29 + +/** + * XML_SCHEMAS_TYPE_REDEFINED: + * + * The type was redefined. + */ +#define XML_SCHEMAS_TYPE_REDEFINED 1 << 30 +/** + * XML_SCHEMAS_TYPE_REDEFINING: + * + * The type redefines an other type. + */ +/* #define XML_SCHEMAS_TYPE_REDEFINING 1 << 31 */ + +/** + * _xmlSchemaType: + * + * Schemas type definition. + */ +struct _xmlSchemaType { + xmlSchemaTypeType type; /* The kind of type */ + struct _xmlSchemaType *next; /* the next type if in a sequence ... */ + const xmlChar *name; + const xmlChar *id ; /* Deprecated; not used */ + const xmlChar *ref; /* Deprecated; not used */ + const xmlChar *refNs; /* Deprecated; not used */ + xmlSchemaAnnotPtr annot; + xmlSchemaTypePtr subtypes; + xmlSchemaAttributePtr attributes; /* Deprecated; not used */ + xmlNodePtr node; + int minOccurs; /* Deprecated; not used */ + int maxOccurs; /* Deprecated; not used */ + + int flags; + xmlSchemaContentType contentType; + const xmlChar *base; /* Base type's local name */ + const xmlChar *baseNs; /* Base type's target namespace */ + xmlSchemaTypePtr baseType; /* The base type component */ + xmlSchemaFacetPtr facets; /* Local facets */ + struct _xmlSchemaType *redef; /* Deprecated; not used */ + int recurse; /* Obsolete */ + xmlSchemaAttributeLinkPtr *attributeUses; /* Deprecated; not used */ + xmlSchemaWildcardPtr attributeWildcard; + int builtInType; /* Type of built-in types. */ + xmlSchemaTypeLinkPtr memberTypes; /* member-types if a union type. */ + xmlSchemaFacetLinkPtr facetSet; /* All facets (incl. inherited) */ + const xmlChar *refPrefix; /* Deprecated; not used */ + xmlSchemaTypePtr contentTypeDef; /* Used for the simple content of complex types. + Could we use @subtypes for this? */ + xmlRegexpPtr contModel; /* Holds the automaton of the content model */ + const xmlChar *targetNamespace; + void *attrUses; +}; + +/* + * xmlSchemaElement: + * An element definition. + * + * xmlSchemaType, xmlSchemaFacet and xmlSchemaElement start of + * structures must be kept similar + */ +/** + * XML_SCHEMAS_ELEM_NILLABLE: + * + * the element is nillable + */ +#define XML_SCHEMAS_ELEM_NILLABLE 1 << 0 +/** + * XML_SCHEMAS_ELEM_GLOBAL: + * + * the element is global + */ +#define XML_SCHEMAS_ELEM_GLOBAL 1 << 1 +/** + * XML_SCHEMAS_ELEM_DEFAULT: + * + * the element has a default value + */ +#define XML_SCHEMAS_ELEM_DEFAULT 1 << 2 +/** + * XML_SCHEMAS_ELEM_FIXED: + * + * the element has a fixed value + */ +#define XML_SCHEMAS_ELEM_FIXED 1 << 3 +/** + * XML_SCHEMAS_ELEM_ABSTRACT: + * + * the element is abstract + */ +#define XML_SCHEMAS_ELEM_ABSTRACT 1 << 4 +/** + * XML_SCHEMAS_ELEM_TOPLEVEL: + * + * the element is top level + * obsolete: use XML_SCHEMAS_ELEM_GLOBAL instead + */ +#define XML_SCHEMAS_ELEM_TOPLEVEL 1 << 5 +/** + * XML_SCHEMAS_ELEM_REF: + * + * the element is a reference to a type + */ +#define XML_SCHEMAS_ELEM_REF 1 << 6 +/** + * XML_SCHEMAS_ELEM_NSDEFAULT: + * + * allow elements in no namespace + * Obsolete, not used anymore. + */ +#define XML_SCHEMAS_ELEM_NSDEFAULT 1 << 7 +/** + * XML_SCHEMAS_ELEM_INTERNAL_RESOLVED: + * + * this is set when "type", "ref", "substitutionGroup" + * references have been resolved. + */ +#define XML_SCHEMAS_ELEM_INTERNAL_RESOLVED 1 << 8 + /** + * XML_SCHEMAS_ELEM_CIRCULAR: + * + * a helper flag for the search of circular references. + */ +#define XML_SCHEMAS_ELEM_CIRCULAR 1 << 9 +/** + * XML_SCHEMAS_ELEM_BLOCK_ABSENT: + * + * the "block" attribute is absent + */ +#define XML_SCHEMAS_ELEM_BLOCK_ABSENT 1 << 10 +/** + * XML_SCHEMAS_ELEM_BLOCK_EXTENSION: + * + * disallowed substitutions are absent + */ +#define XML_SCHEMAS_ELEM_BLOCK_EXTENSION 1 << 11 +/** + * XML_SCHEMAS_ELEM_BLOCK_RESTRICTION: + * + * disallowed substitutions: "restriction" + */ +#define XML_SCHEMAS_ELEM_BLOCK_RESTRICTION 1 << 12 +/** + * XML_SCHEMAS_ELEM_BLOCK_SUBSTITUTION: + * + * disallowed substitutions: "substitution" + */ +#define XML_SCHEMAS_ELEM_BLOCK_SUBSTITUTION 1 << 13 +/** + * XML_SCHEMAS_ELEM_FINAL_ABSENT: + * + * substitution group exclusions are absent + */ +#define XML_SCHEMAS_ELEM_FINAL_ABSENT 1 << 14 +/** + * XML_SCHEMAS_ELEM_FINAL_EXTENSION: + * + * substitution group exclusions: "extension" + */ +#define XML_SCHEMAS_ELEM_FINAL_EXTENSION 1 << 15 +/** + * XML_SCHEMAS_ELEM_FINAL_RESTRICTION: + * + * substitution group exclusions: "restriction" + */ +#define XML_SCHEMAS_ELEM_FINAL_RESTRICTION 1 << 16 +/** + * XML_SCHEMAS_ELEM_SUBST_GROUP_HEAD: + * + * the declaration is a substitution group head + */ +#define XML_SCHEMAS_ELEM_SUBST_GROUP_HEAD 1 << 17 +/** + * XML_SCHEMAS_ELEM_INTERNAL_CHECKED: + * + * this is set when the elem decl has been checked against + * all constraints + */ +#define XML_SCHEMAS_ELEM_INTERNAL_CHECKED 1 << 18 + +typedef struct _xmlSchemaElement xmlSchemaElement; +typedef xmlSchemaElement *xmlSchemaElementPtr; +struct _xmlSchemaElement { + xmlSchemaTypeType type; /* The kind of type */ + struct _xmlSchemaType *next; /* Not used? */ + const xmlChar *name; + const xmlChar *id; /* Deprecated; not used */ + const xmlChar *ref; /* Deprecated; not used */ + const xmlChar *refNs; /* Deprecated; not used */ + xmlSchemaAnnotPtr annot; + xmlSchemaTypePtr subtypes; /* the type definition */ + xmlSchemaAttributePtr attributes; + xmlNodePtr node; + int minOccurs; /* Deprecated; not used */ + int maxOccurs; /* Deprecated; not used */ + + int flags; + const xmlChar *targetNamespace; + const xmlChar *namedType; + const xmlChar *namedTypeNs; + const xmlChar *substGroup; + const xmlChar *substGroupNs; + const xmlChar *scope; + const xmlChar *value; /* The original value of the value constraint. */ + struct _xmlSchemaElement *refDecl; /* This will now be used for the + substitution group affiliation */ + xmlRegexpPtr contModel; /* Obsolete for WXS, maybe used for RelaxNG */ + xmlSchemaContentType contentType; + const xmlChar *refPrefix; /* Deprecated; not used */ + xmlSchemaValPtr defVal; /* The compiled value constraint. */ + void *idcs; /* The identity-constraint defs */ +}; + +/* + * XML_SCHEMAS_FACET_UNKNOWN: + * + * unknown facet handling + */ +#define XML_SCHEMAS_FACET_UNKNOWN 0 +/* + * XML_SCHEMAS_FACET_PRESERVE: + * + * preserve the type of the facet + */ +#define XML_SCHEMAS_FACET_PRESERVE 1 +/* + * XML_SCHEMAS_FACET_REPLACE: + * + * replace the type of the facet + */ +#define XML_SCHEMAS_FACET_REPLACE 2 +/* + * XML_SCHEMAS_FACET_COLLAPSE: + * + * collapse the types of the facet + */ +#define XML_SCHEMAS_FACET_COLLAPSE 3 +/** + * A facet definition. + */ +struct _xmlSchemaFacet { + xmlSchemaTypeType type; /* The kind of type */ + struct _xmlSchemaFacet *next;/* the next type if in a sequence ... */ + const xmlChar *value; /* The original value */ + const xmlChar *id; /* Obsolete */ + xmlSchemaAnnotPtr annot; + xmlNodePtr node; + int fixed; /* XML_SCHEMAS_FACET_PRESERVE, etc. */ + int whitespace; + xmlSchemaValPtr val; /* The compiled value */ + xmlRegexpPtr regexp; /* The regex for patterns */ +}; + +/** + * A notation definition. + */ +typedef struct _xmlSchemaNotation xmlSchemaNotation; +typedef xmlSchemaNotation *xmlSchemaNotationPtr; +struct _xmlSchemaNotation { + xmlSchemaTypeType type; /* The kind of type */ + const xmlChar *name; + xmlSchemaAnnotPtr annot; + const xmlChar *identifier; + const xmlChar *targetNamespace; +}; + +/* +* TODO: Actually all those flags used for the schema should sit +* on the schema parser context, since they are used only +* during parsing an XML schema document, and not available +* on the component level as per spec. +*/ +/** + * XML_SCHEMAS_QUALIF_ELEM: + * + * Reflects elementFormDefault == qualified in + * an XML schema document. + */ +#define XML_SCHEMAS_QUALIF_ELEM 1 << 0 +/** + * XML_SCHEMAS_QUALIF_ATTR: + * + * Reflects attributeFormDefault == qualified in + * an XML schema document. + */ +#define XML_SCHEMAS_QUALIF_ATTR 1 << 1 +/** + * XML_SCHEMAS_FINAL_DEFAULT_EXTENSION: + * + * the schema has "extension" in the set of finalDefault. + */ +#define XML_SCHEMAS_FINAL_DEFAULT_EXTENSION 1 << 2 +/** + * XML_SCHEMAS_FINAL_DEFAULT_RESTRICTION: + * + * the schema has "restriction" in the set of finalDefault. + */ +#define XML_SCHEMAS_FINAL_DEFAULT_RESTRICTION 1 << 3 +/** + * XML_SCHEMAS_FINAL_DEFAULT_LIST: + * + * the schema has "list" in the set of finalDefault. + */ +#define XML_SCHEMAS_FINAL_DEFAULT_LIST 1 << 4 +/** + * XML_SCHEMAS_FINAL_DEFAULT_UNION: + * + * the schema has "union" in the set of finalDefault. + */ +#define XML_SCHEMAS_FINAL_DEFAULT_UNION 1 << 5 +/** + * XML_SCHEMAS_BLOCK_DEFAULT_EXTENSION: + * + * the schema has "extension" in the set of blockDefault. + */ +#define XML_SCHEMAS_BLOCK_DEFAULT_EXTENSION 1 << 6 +/** + * XML_SCHEMAS_BLOCK_DEFAULT_RESTRICTION: + * + * the schema has "restriction" in the set of blockDefault. + */ +#define XML_SCHEMAS_BLOCK_DEFAULT_RESTRICTION 1 << 7 +/** + * XML_SCHEMAS_BLOCK_DEFAULT_SUBSTITUTION: + * + * the schema has "substitution" in the set of blockDefault. + */ +#define XML_SCHEMAS_BLOCK_DEFAULT_SUBSTITUTION 1 << 8 +/** + * XML_SCHEMAS_INCLUDING_CONVERT_NS: + * + * the schema is currently including an other schema with + * no target namespace. + */ +#define XML_SCHEMAS_INCLUDING_CONVERT_NS 1 << 9 +/** + * _xmlSchema: + * + * A Schemas definition + */ +struct _xmlSchema { + const xmlChar *name; /* schema name */ + const xmlChar *targetNamespace; /* the target namespace */ + const xmlChar *version; + const xmlChar *id; /* Obsolete */ + xmlDocPtr doc; + xmlSchemaAnnotPtr annot; + int flags; + + xmlHashTablePtr typeDecl; + xmlHashTablePtr attrDecl; + xmlHashTablePtr attrgrpDecl; + xmlHashTablePtr elemDecl; + xmlHashTablePtr notaDecl; + + xmlHashTablePtr schemasImports; + + void *_private; /* unused by the library for users or bindings */ + xmlHashTablePtr groupDecl; + xmlDictPtr dict; + void *includes; /* the includes, this is opaque for now */ + int preserve; /* whether to free the document */ + int counter; /* used to give anonymous components unique names */ + xmlHashTablePtr idcDef; /* All identity-constraint defs. */ + void *volatiles; /* Obsolete */ +}; + +XMLPUBFUN void xmlSchemaFreeType (xmlSchemaTypePtr type); +XMLPUBFUN void xmlSchemaFreeWildcard(xmlSchemaWildcardPtr wildcard); + +#ifdef __cplusplus +} +#endif + +#endif /* LIBXML_SCHEMAS_ENABLED */ +#endif /* __XML_SCHEMA_INTERNALS_H__ */ diff --git a/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/include/libxml2/libxml/schematron.h b/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/include/libxml2/libxml/schematron.h new file mode 100644 index 0000000000000000000000000000000000000000..8dd8d25c451c3ee2fb988cc32f6d7f24492eb589 --- /dev/null +++ b/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/include/libxml2/libxml/schematron.h @@ -0,0 +1,143 @@ +/* + * Summary: XML Schematron implementation + * Description: interface to the XML Schematron validity checking. + * + * Copy: See Copyright for the status of this software. + * + * Author: Daniel Veillard + */ + + +#ifndef __XML_SCHEMATRON_H__ +#define __XML_SCHEMATRON_H__ + +#include + +#ifdef LIBXML_SCHEMATRON_ENABLED + +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +typedef enum { + XML_SCHEMATRON_OUT_QUIET = 1 << 0, /* quiet no report */ + XML_SCHEMATRON_OUT_TEXT = 1 << 1, /* build a textual report */ + XML_SCHEMATRON_OUT_XML = 1 << 2, /* output SVRL */ + XML_SCHEMATRON_OUT_ERROR = 1 << 3, /* output via xmlStructuredErrorFunc */ + XML_SCHEMATRON_OUT_FILE = 1 << 8, /* output to a file descriptor */ + XML_SCHEMATRON_OUT_BUFFER = 1 << 9, /* output to a buffer */ + XML_SCHEMATRON_OUT_IO = 1 << 10 /* output to I/O mechanism */ +} xmlSchematronValidOptions; + +/** + * The schemas related types are kept internal + */ +typedef struct _xmlSchematron xmlSchematron; +typedef xmlSchematron *xmlSchematronPtr; + +/** + * xmlSchematronValidityErrorFunc: + * @ctx: the validation context + * @msg: the message + * @...: extra arguments + * + * Signature of an error callback from a Schematron validation + */ +typedef void (*xmlSchematronValidityErrorFunc) (void *ctx, const char *msg, ...); + +/** + * xmlSchematronValidityWarningFunc: + * @ctx: the validation context + * @msg: the message + * @...: extra arguments + * + * Signature of a warning callback from a Schematron validation + */ +typedef void (*xmlSchematronValidityWarningFunc) (void *ctx, const char *msg, ...); + +/** + * A schemas validation context + */ +typedef struct _xmlSchematronParserCtxt xmlSchematronParserCtxt; +typedef xmlSchematronParserCtxt *xmlSchematronParserCtxtPtr; + +typedef struct _xmlSchematronValidCtxt xmlSchematronValidCtxt; +typedef xmlSchematronValidCtxt *xmlSchematronValidCtxtPtr; + +/* + * Interfaces for parsing. + */ +XMLPUBFUN xmlSchematronParserCtxtPtr + xmlSchematronNewParserCtxt (const char *URL); +XMLPUBFUN xmlSchematronParserCtxtPtr + xmlSchematronNewMemParserCtxt(const char *buffer, + int size); +XMLPUBFUN xmlSchematronParserCtxtPtr + xmlSchematronNewDocParserCtxt(xmlDocPtr doc); +XMLPUBFUN void + xmlSchematronFreeParserCtxt (xmlSchematronParserCtxtPtr ctxt); +/***** +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); + *****/ +XMLPUBFUN xmlSchematronPtr + xmlSchematronParse (xmlSchematronParserCtxtPtr ctxt); +XMLPUBFUN void + xmlSchematronFree (xmlSchematronPtr schema); +/* + * Interfaces for validating + */ +XMLPUBFUN void + xmlSchematronSetValidStructuredErrors( + xmlSchematronValidCtxtPtr ctxt, + xmlStructuredErrorFunc serror, + void *ctx); +/****** +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); + *******/ + +XMLPUBFUN xmlSchematronValidCtxtPtr + xmlSchematronNewValidCtxt (xmlSchematronPtr schema, + int options); +XMLPUBFUN void + xmlSchematronFreeValidCtxt (xmlSchematronValidCtxtPtr ctxt); +XMLPUBFUN int + xmlSchematronValidateDoc (xmlSchematronValidCtxtPtr ctxt, + xmlDocPtr instance); + +#ifdef __cplusplus +} +#endif + +#endif /* LIBXML_SCHEMATRON_ENABLED */ +#endif /* __XML_SCHEMATRON_H__ */ diff --git a/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/include/libxml2/libxml/threads.h b/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/include/libxml2/libxml/threads.h new file mode 100644 index 0000000000000000000000000000000000000000..8f4b6e174fbac6e724e5a8da4ed65a8a297c0373 --- /dev/null +++ b/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/include/libxml2/libxml/threads.h @@ -0,0 +1,87 @@ +/** + * Summary: interfaces for thread handling + * Description: set of generic threading related routines + * should work with pthreads, Windows native or TLS threads + * + * Copy: See Copyright for the status of this software. + * + * Author: Daniel Veillard + */ + +#ifndef __XML_THREADS_H__ +#define __XML_THREADS_H__ + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * xmlMutex are a simple mutual exception locks. + */ +typedef struct _xmlMutex xmlMutex; +typedef xmlMutex *xmlMutexPtr; + +/* + * xmlRMutex are reentrant mutual exception locks. + */ +typedef struct _xmlRMutex xmlRMutex; +typedef xmlRMutex *xmlRMutexPtr; + +XMLPUBFUN int + xmlCheckThreadLocalStorage(void); + +XMLPUBFUN xmlMutexPtr + xmlNewMutex (void); +XMLPUBFUN void + xmlMutexLock (xmlMutexPtr tok); +XMLPUBFUN void + xmlMutexUnlock (xmlMutexPtr tok); +XMLPUBFUN void + xmlFreeMutex (xmlMutexPtr tok); + +XMLPUBFUN xmlRMutexPtr + xmlNewRMutex (void); +XMLPUBFUN void + xmlRMutexLock (xmlRMutexPtr tok); +XMLPUBFUN void + xmlRMutexUnlock (xmlRMutexPtr tok); +XMLPUBFUN void + xmlFreeRMutex (xmlRMutexPtr tok); + +/* + * Library wide APIs. + */ +XML_DEPRECATED +XMLPUBFUN void + xmlInitThreads (void); +XMLPUBFUN void + xmlLockLibrary (void); +XMLPUBFUN void + xmlUnlockLibrary(void); +XML_DEPRECATED +XMLPUBFUN int + xmlGetThreadId (void); +XML_DEPRECATED +XMLPUBFUN int + xmlIsMainThread (void); +XML_DEPRECATED +XMLPUBFUN void + xmlCleanupThreads(void); + +/** DOC_DISABLE */ +#if defined(LIBXML_THREAD_ENABLED) && defined(_WIN32) && \ + defined(LIBXML_STATIC_FOR_DLL) +int +xmlDllMain(void *hinstDLL, unsigned long fdwReason, + void *lpvReserved); +#endif +/** DOC_ENABLE */ + +#ifdef __cplusplus +} +#endif + + +#endif /* __XML_THREADS_H__ */ diff --git a/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/include/libxml2/libxml/tree.h b/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/include/libxml2/libxml/tree.h new file mode 100644 index 0000000000000000000000000000000000000000..4070375b9cc8f4a44d8079eeced8ccba93ee816b --- /dev/null +++ b/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/include/libxml2/libxml/tree.h @@ -0,0 +1,1382 @@ +/* + * Summary: interfaces for tree manipulation + * Description: this module describes the structures found in an tree resulting + * from an XML or HTML parsing, as well as the API provided for + * various processing on that tree + * + * Copy: See Copyright for the status of this software. + * + * Author: Daniel Veillard + */ + +#ifndef XML_TREE_INTERNALS + +/* + * Emulate circular dependency for backward compatibility + */ +#include + +#else /* XML_TREE_INTERNALS */ + +#ifndef __XML_TREE_H__ +#define __XML_TREE_H__ + +#include +#include +#include +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * Some of the basic types pointer to structures: + */ +/* xmlIO.h */ +typedef struct _xmlParserInputBuffer xmlParserInputBuffer; +typedef xmlParserInputBuffer *xmlParserInputBufferPtr; + +typedef struct _xmlOutputBuffer xmlOutputBuffer; +typedef xmlOutputBuffer *xmlOutputBufferPtr; + +/* parser.h */ +typedef struct _xmlParserInput xmlParserInput; +typedef xmlParserInput *xmlParserInputPtr; + +typedef struct _xmlParserCtxt xmlParserCtxt; +typedef xmlParserCtxt *xmlParserCtxtPtr; + +typedef struct _xmlSAXLocator xmlSAXLocator; +typedef xmlSAXLocator *xmlSAXLocatorPtr; + +typedef struct _xmlSAXHandler xmlSAXHandler; +typedef xmlSAXHandler *xmlSAXHandlerPtr; + +/* entities.h */ +typedef struct _xmlEntity xmlEntity; +typedef xmlEntity *xmlEntityPtr; + +/** + * BASE_BUFFER_SIZE: + * + * default buffer size 4000. + */ +#define BASE_BUFFER_SIZE 4096 + +/** + * LIBXML_NAMESPACE_DICT: + * + * Defines experimental behaviour: + * 1) xmlNs gets an additional field @context (a xmlDoc) + * 2) when creating a tree, xmlNs->href is stored in the dict of xmlDoc. + */ +/* #define LIBXML_NAMESPACE_DICT */ + +/** + * xmlBufferAllocationScheme: + * + * A buffer allocation scheme can be defined to either match exactly the + * need or double it's allocated size each time it is found too small. + */ + +typedef enum { + XML_BUFFER_ALLOC_DOUBLEIT, /* double each time one need to grow */ + XML_BUFFER_ALLOC_EXACT, /* grow only to the minimal size */ + XML_BUFFER_ALLOC_IMMUTABLE, /* immutable buffer, deprecated */ + XML_BUFFER_ALLOC_IO, /* special allocation scheme used for I/O */ + XML_BUFFER_ALLOC_HYBRID, /* exact up to a threshold, and doubleit thereafter */ + XML_BUFFER_ALLOC_BOUNDED /* limit the upper size of the buffer */ +} xmlBufferAllocationScheme; + +/** + * xmlBuffer: + * + * A buffer structure, this old construct is limited to 2GB and + * is being deprecated, use API with xmlBuf instead + */ +typedef struct _xmlBuffer xmlBuffer; +typedef xmlBuffer *xmlBufferPtr; +struct _xmlBuffer { + xmlChar *content; /* The buffer content UTF8 */ + unsigned int use; /* The buffer size used */ + unsigned int size; /* The buffer size */ + xmlBufferAllocationScheme alloc; /* The realloc method */ + xmlChar *contentIO; /* in IO mode we may have a different base */ +}; + +/** + * xmlBuf: + * + * A buffer structure, new one, the actual structure internals are not public + */ + +typedef struct _xmlBuf xmlBuf; + +/** + * xmlBufPtr: + * + * A pointer to a buffer structure, the actual structure internals are not + * public + */ + +typedef xmlBuf *xmlBufPtr; + +/* + * 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 + */ +XMLPUBFUN xmlChar* xmlBufContent (const xmlBuf* buf); +XMLPUBFUN xmlChar* xmlBufEnd (xmlBufPtr buf); +XMLPUBFUN size_t xmlBufUse (const xmlBufPtr buf); +XMLPUBFUN size_t xmlBufShrink (xmlBufPtr buf, size_t len); + +/* + * LIBXML2_NEW_BUFFER: + * + * Macro used to express that the API use the new buffers for + * xmlParserInputBuffer and xmlOutputBuffer. The change was + * introduced in 2.9.0. + */ +#define LIBXML2_NEW_BUFFER + +/** + * XML_XML_NAMESPACE: + * + * This is the namespace for the special xml: prefix predefined in the + * XML Namespace specification. + */ +#define XML_XML_NAMESPACE \ + (const xmlChar *) "http://www.w3.org/XML/1998/namespace" + +/** + * XML_XML_ID: + * + * This is the name for the special xml:id attribute + */ +#define XML_XML_ID (const xmlChar *) "xml:id" + +/* + * The different element types carried by an XML tree. + * + * NOTE: This is synchronized with DOM Level1 values + * See http://www.w3.org/TR/REC-DOM-Level-1/ + * + * Actually this had diverged a bit, and now XML_DOCUMENT_TYPE_NODE should + * be deprecated to use an XML_DTD_NODE. + */ +typedef enum { + XML_ELEMENT_NODE= 1, + XML_ATTRIBUTE_NODE= 2, + XML_TEXT_NODE= 3, + XML_CDATA_SECTION_NODE= 4, + XML_ENTITY_REF_NODE= 5, + XML_ENTITY_NODE= 6, /* unused */ + XML_PI_NODE= 7, + XML_COMMENT_NODE= 8, + XML_DOCUMENT_NODE= 9, + XML_DOCUMENT_TYPE_NODE= 10, /* unused */ + XML_DOCUMENT_FRAG_NODE= 11, + XML_NOTATION_NODE= 12, /* unused */ + XML_HTML_DOCUMENT_NODE= 13, + XML_DTD_NODE= 14, + XML_ELEMENT_DECL= 15, + XML_ATTRIBUTE_DECL= 16, + XML_ENTITY_DECL= 17, + XML_NAMESPACE_DECL= 18, + XML_XINCLUDE_START= 19, + XML_XINCLUDE_END= 20 + /* XML_DOCB_DOCUMENT_NODE= 21 */ /* removed */ +} xmlElementType; + +/** DOC_DISABLE */ +/* For backward compatibility */ +#define XML_DOCB_DOCUMENT_NODE 21 +/** DOC_ENABLE */ + +/** + * xmlNotation: + * + * A DTD Notation definition. + */ + +typedef struct _xmlNotation xmlNotation; +typedef xmlNotation *xmlNotationPtr; +struct _xmlNotation { + const xmlChar *name; /* Notation name */ + const xmlChar *PublicID; /* Public identifier, if any */ + const xmlChar *SystemID; /* System identifier, if any */ +}; + +/** + * xmlAttributeType: + * + * A DTD Attribute type definition. + */ + +typedef enum { + XML_ATTRIBUTE_CDATA = 1, + XML_ATTRIBUTE_ID, + XML_ATTRIBUTE_IDREF , + XML_ATTRIBUTE_IDREFS, + XML_ATTRIBUTE_ENTITY, + XML_ATTRIBUTE_ENTITIES, + XML_ATTRIBUTE_NMTOKEN, + XML_ATTRIBUTE_NMTOKENS, + XML_ATTRIBUTE_ENUMERATION, + XML_ATTRIBUTE_NOTATION +} xmlAttributeType; + +/** + * xmlAttributeDefault: + * + * A DTD Attribute default definition. + */ + +typedef enum { + XML_ATTRIBUTE_NONE = 1, + XML_ATTRIBUTE_REQUIRED, + XML_ATTRIBUTE_IMPLIED, + XML_ATTRIBUTE_FIXED +} xmlAttributeDefault; + +/** + * xmlEnumeration: + * + * List structure used when there is an enumeration in DTDs. + */ + +typedef struct _xmlEnumeration xmlEnumeration; +typedef xmlEnumeration *xmlEnumerationPtr; +struct _xmlEnumeration { + struct _xmlEnumeration *next; /* next one */ + const xmlChar *name; /* Enumeration name */ +}; + +/** + * xmlAttribute: + * + * An Attribute declaration in a DTD. + */ + +typedef struct _xmlAttribute xmlAttribute; +typedef xmlAttribute *xmlAttributePtr; +struct _xmlAttribute { + void *_private; /* application data */ + xmlElementType type; /* XML_ATTRIBUTE_DECL, must be second ! */ + const xmlChar *name; /* Attribute name */ + struct _xmlNode *children; /* NULL */ + struct _xmlNode *last; /* NULL */ + struct _xmlDtd *parent; /* -> DTD */ + struct _xmlNode *next; /* next sibling link */ + struct _xmlNode *prev; /* previous sibling link */ + struct _xmlDoc *doc; /* the containing document */ + + struct _xmlAttribute *nexth; /* next in hash table */ + xmlAttributeType atype; /* The attribute type */ + xmlAttributeDefault def; /* the default */ + const xmlChar *defaultValue; /* or the default value */ + xmlEnumerationPtr tree; /* or the enumeration tree if any */ + const xmlChar *prefix; /* the namespace prefix if any */ + const xmlChar *elem; /* Element holding the attribute */ +}; + +/** + * xmlElementContentType: + * + * Possible definitions of element content types. + */ +typedef enum { + XML_ELEMENT_CONTENT_PCDATA = 1, + XML_ELEMENT_CONTENT_ELEMENT, + XML_ELEMENT_CONTENT_SEQ, + XML_ELEMENT_CONTENT_OR +} xmlElementContentType; + +/** + * xmlElementContentOccur: + * + * Possible definitions of element content occurrences. + */ +typedef enum { + XML_ELEMENT_CONTENT_ONCE = 1, + XML_ELEMENT_CONTENT_OPT, + XML_ELEMENT_CONTENT_MULT, + XML_ELEMENT_CONTENT_PLUS +} xmlElementContentOccur; + +/** + * xmlElementContent: + * + * An XML Element content as stored after parsing an element definition + * in a DTD. + */ + +typedef struct _xmlElementContent xmlElementContent; +typedef xmlElementContent *xmlElementContentPtr; +struct _xmlElementContent { + xmlElementContentType type; /* PCDATA, ELEMENT, SEQ or OR */ + xmlElementContentOccur ocur; /* ONCE, OPT, MULT or PLUS */ + const xmlChar *name; /* Element name */ + struct _xmlElementContent *c1; /* first child */ + struct _xmlElementContent *c2; /* second child */ + struct _xmlElementContent *parent; /* parent */ + const xmlChar *prefix; /* Namespace prefix */ +}; + +/** + * xmlElementTypeVal: + * + * The different possibilities for an element content type. + */ + +typedef enum { + XML_ELEMENT_TYPE_UNDEFINED = 0, + XML_ELEMENT_TYPE_EMPTY = 1, + XML_ELEMENT_TYPE_ANY, + XML_ELEMENT_TYPE_MIXED, + XML_ELEMENT_TYPE_ELEMENT +} xmlElementTypeVal; + +/** + * xmlElement: + * + * An XML Element declaration from a DTD. + */ + +typedef struct _xmlElement xmlElement; +typedef xmlElement *xmlElementPtr; +struct _xmlElement { + void *_private; /* application data */ + xmlElementType type; /* XML_ELEMENT_DECL, must be second ! */ + const xmlChar *name; /* Element name */ + struct _xmlNode *children; /* NULL */ + struct _xmlNode *last; /* NULL */ + struct _xmlDtd *parent; /* -> DTD */ + struct _xmlNode *next; /* next sibling link */ + struct _xmlNode *prev; /* previous sibling link */ + struct _xmlDoc *doc; /* the containing document */ + + xmlElementTypeVal etype; /* The type */ + xmlElementContentPtr content; /* the allowed element content */ + xmlAttributePtr attributes; /* List of the declared attributes */ + const xmlChar *prefix; /* the namespace prefix if any */ +#ifdef LIBXML_REGEXP_ENABLED + xmlRegexpPtr contModel; /* the validating regexp */ +#else + void *contModel; +#endif +}; + + +/** + * XML_LOCAL_NAMESPACE: + * + * A namespace declaration node. + */ +#define XML_LOCAL_NAMESPACE XML_NAMESPACE_DECL +typedef xmlElementType xmlNsType; + +/** + * xmlNs: + * + * An XML namespace. + * Note that prefix == NULL is valid, it defines the default namespace + * within the subtree (until overridden). + * + * xmlNsType is unified with xmlElementType. + */ + +typedef struct _xmlNs xmlNs; +typedef xmlNs *xmlNsPtr; +struct _xmlNs { + struct _xmlNs *next; /* next Ns link for this node */ + xmlNsType type; /* global or local */ + const xmlChar *href; /* URL for the namespace */ + const xmlChar *prefix; /* prefix for the namespace */ + void *_private; /* application data */ + struct _xmlDoc *context; /* normally an xmlDoc */ +}; + +/** + * xmlDtd: + * + * An XML DTD, as defined by parent link */ + struct _xmlNode *next; /* next sibling link */ + struct _xmlNode *prev; /* previous sibling link */ + struct _xmlDoc *doc; /* the containing document */ + + /* End of common part */ + void *notations; /* Hash table for notations if any */ + void *elements; /* Hash table for elements if any */ + void *attributes; /* Hash table for attributes if any */ + void *entities; /* Hash table for entities if any */ + const xmlChar *ExternalID; /* External identifier for PUBLIC DTD */ + const xmlChar *SystemID; /* URI for a SYSTEM or PUBLIC DTD */ + void *pentities; /* Hash table for param entities if any */ +}; + +/** + * xmlAttr: + * + * An attribute on an XML node. + */ +typedef struct _xmlAttr xmlAttr; +typedef xmlAttr *xmlAttrPtr; +struct _xmlAttr { + void *_private; /* application data */ + xmlElementType type; /* XML_ATTRIBUTE_NODE, must be second ! */ + const xmlChar *name; /* the name of the property */ + struct _xmlNode *children; /* the value of the property */ + struct _xmlNode *last; /* NULL */ + struct _xmlNode *parent; /* child->parent link */ + struct _xmlAttr *next; /* next sibling link */ + struct _xmlAttr *prev; /* previous sibling link */ + struct _xmlDoc *doc; /* the containing document */ + xmlNs *ns; /* pointer to the associated namespace */ + xmlAttributeType atype; /* the attribute type if validating */ + void *psvi; /* for type/PSVI information */ + struct _xmlID *id; /* the ID struct */ +}; + +/** + * xmlID: + * + * An XML ID instance. + */ + +typedef struct _xmlID xmlID; +typedef xmlID *xmlIDPtr; +struct _xmlID { + struct _xmlID *next; /* next ID */ + const xmlChar *value; /* The ID name */ + xmlAttrPtr attr; /* The attribute holding it */ + const xmlChar *name; /* The attribute if attr is not available */ + int lineno; /* The line number if attr is not available */ + struct _xmlDoc *doc; /* The document holding the ID */ +}; + +/** + * xmlRef: + * + * An XML IDREF instance. + */ + +typedef struct _xmlRef xmlRef; +typedef xmlRef *xmlRefPtr; +struct _xmlRef { + struct _xmlRef *next; /* next Ref */ + const xmlChar *value; /* The Ref name */ + xmlAttrPtr attr; /* The attribute holding it */ + const xmlChar *name; /* The attribute if attr is not available */ + int lineno; /* The line number if attr is not available */ +}; + +/** + * xmlNode: + * + * A node in an XML tree. + */ +typedef struct _xmlNode xmlNode; +typedef xmlNode *xmlNodePtr; +struct _xmlNode { + void *_private; /* application data */ + xmlElementType type; /* type number, must be second ! */ + const xmlChar *name; /* the name of the node, or the entity */ + struct _xmlNode *children; /* parent->childs link */ + struct _xmlNode *last; /* last child link */ + struct _xmlNode *parent; /* child->parent link */ + struct _xmlNode *next; /* next sibling link */ + struct _xmlNode *prev; /* previous sibling link */ + struct _xmlDoc *doc; /* the containing document */ + + /* End of common part */ + xmlNs *ns; /* pointer to the associated namespace */ + xmlChar *content; /* the content */ + struct _xmlAttr *properties;/* properties list */ + xmlNs *nsDef; /* namespace definitions on this node */ + void *psvi; /* for type/PSVI information */ + unsigned short line; /* line number */ + unsigned short extra; /* extra data for XPath/XSLT */ +}; + +/** + * XML_GET_CONTENT: + * + * Macro to extract the content pointer of a node. + */ +#define XML_GET_CONTENT(n) \ + ((n)->type == XML_ELEMENT_NODE ? NULL : (n)->content) + +/** + * XML_GET_LINE: + * + * Macro to extract the line number of an element node. + */ +#define XML_GET_LINE(n) \ + (xmlGetLineNo(n)) + +/** + * xmlDocProperty + * + * Set of properties of the document as found by the parser + * Some of them are linked to similarly named xmlParserOption + */ +typedef enum { + XML_DOC_WELLFORMED = 1<<0, /* document is XML well formed */ + XML_DOC_NSVALID = 1<<1, /* document is Namespace valid */ + XML_DOC_OLD10 = 1<<2, /* parsed with old XML-1.0 parser */ + XML_DOC_DTDVALID = 1<<3, /* DTD validation was successful */ + XML_DOC_XINCLUDE = 1<<4, /* XInclude substitution was done */ + XML_DOC_USERBUILT = 1<<5, /* Document was built using the API + and not by parsing an instance */ + XML_DOC_INTERNAL = 1<<6, /* built for internal processing */ + XML_DOC_HTML = 1<<7 /* parsed or built HTML document */ +} xmlDocProperties; + +/** + * xmlDoc: + * + * An XML document. + */ +typedef struct _xmlDoc xmlDoc; +typedef xmlDoc *xmlDocPtr; +struct _xmlDoc { + void *_private; /* application data */ + xmlElementType type; /* XML_DOCUMENT_NODE, must be second ! */ + char *name; /* name/filename/URI of the document */ + struct _xmlNode *children; /* the document tree */ + struct _xmlNode *last; /* last child link */ + struct _xmlNode *parent; /* child->parent link */ + struct _xmlNode *next; /* next sibling link */ + struct _xmlNode *prev; /* previous sibling link */ + struct _xmlDoc *doc; /* autoreference to itself */ + + /* End of common part */ + int compression;/* level of zlib compression */ + int standalone; /* standalone document (no external refs) + 1 if standalone="yes" + 0 if standalone="no" + -1 if there is no XML declaration + -2 if there is an XML declaration, but no + standalone attribute was specified */ + struct _xmlDtd *intSubset; /* the document internal subset */ + struct _xmlDtd *extSubset; /* the document external subset */ + struct _xmlNs *oldNs; /* Global namespace, the old way */ + const xmlChar *version; /* the XML version string */ + const xmlChar *encoding; /* actual encoding, if any */ + void *ids; /* Hash table for ID attributes if any */ + void *refs; /* Hash table for IDREFs attributes if any */ + const xmlChar *URL; /* The URI for that document */ + int charset; /* unused */ + struct _xmlDict *dict; /* dict used to allocate names or NULL */ + void *psvi; /* for type/PSVI information */ + int parseFlags; /* set of xmlParserOption used to parse the + document */ + int properties; /* set of xmlDocProperties for this document + set at the end of parsing */ +}; + + +typedef struct _xmlDOMWrapCtxt xmlDOMWrapCtxt; +typedef xmlDOMWrapCtxt *xmlDOMWrapCtxtPtr; + +/** + * xmlDOMWrapAcquireNsFunction: + * @ctxt: a DOM wrapper context + * @node: the context node (element or attribute) + * @nsName: the requested namespace name + * @nsPrefix: the requested namespace prefix + * + * A function called to acquire namespaces (xmlNs) from the wrapper. + * + * Returns an xmlNsPtr or NULL in case of an error. + */ +typedef xmlNsPtr (*xmlDOMWrapAcquireNsFunction) (xmlDOMWrapCtxtPtr ctxt, + xmlNodePtr node, + const xmlChar *nsName, + const xmlChar *nsPrefix); + +/** + * xmlDOMWrapCtxt: + * + * Context for DOM wrapper-operations. + */ +struct _xmlDOMWrapCtxt { + void * _private; + /* + * The type of this context, just in case we need specialized + * contexts in the future. + */ + int type; + /* + * Internal namespace map used for various operations. + */ + void * namespaceMap; + /* + * Use this one to acquire an xmlNsPtr intended for node->ns. + * (Note that this is not intended for elem->nsDef). + */ + xmlDOMWrapAcquireNsFunction getNsForNodeFunc; +}; + +/** + * xmlRegisterNodeFunc: + * @node: the current node + * + * Signature for the registration callback of a created node + */ +typedef void (*xmlRegisterNodeFunc) (xmlNodePtr node); + +/** + * xmlDeregisterNodeFunc: + * @node: the current node + * + * Signature for the deregistration callback of a discarded node + */ +typedef void (*xmlDeregisterNodeFunc) (xmlNodePtr node); + +/** + * xmlChildrenNode: + * + * Macro for compatibility naming layer with libxml1. Maps + * to "children." + */ +#ifndef xmlChildrenNode +#define xmlChildrenNode children +#endif + +/** + * xmlRootNode: + * + * Macro for compatibility naming layer with libxml1. Maps + * to "children". + */ +#ifndef xmlRootNode +#define xmlRootNode children +#endif + +/* + * Variables. + */ + +/** DOC_DISABLE */ +#define XML_GLOBALS_TREE \ + XML_OP(xmlBufferAllocScheme, xmlBufferAllocationScheme, XML_DEPRECATED) \ + XML_OP(xmlDefaultBufferSize, int, XML_DEPRECATED) \ + XML_OP(xmlRegisterNodeDefaultValue, xmlRegisterNodeFunc, XML_DEPRECATED) \ + XML_OP(xmlDeregisterNodeDefaultValue, xmlDeregisterNodeFunc, \ + XML_DEPRECATED) + +#define XML_OP XML_DECLARE_GLOBAL +XML_GLOBALS_TREE +#undef XML_OP + +#if defined(LIBXML_THREAD_ENABLED) && !defined(XML_GLOBALS_NO_REDEFINITION) + #define xmlBufferAllocScheme XML_GLOBAL_MACRO(xmlBufferAllocScheme) + #define xmlDefaultBufferSize XML_GLOBAL_MACRO(xmlDefaultBufferSize) + #define xmlRegisterNodeDefaultValue \ + XML_GLOBAL_MACRO(xmlRegisterNodeDefaultValue) + #define xmlDeregisterNodeDefaultValue \ + XML_GLOBAL_MACRO(xmlDeregisterNodeDefaultValue) +#endif +/** DOC_ENABLE */ + +/* + * Some helper functions + */ +XMLPUBFUN int + xmlValidateNCName (const xmlChar *value, + int space); + +#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) +XMLPUBFUN int + xmlValidateQName (const xmlChar *value, + int space); +XMLPUBFUN int + xmlValidateName (const xmlChar *value, + int space); +XMLPUBFUN int + xmlValidateNMToken (const xmlChar *value, + int space); +#endif + +XMLPUBFUN xmlChar * + xmlBuildQName (const xmlChar *ncname, + const xmlChar *prefix, + xmlChar *memory, + int len); +XMLPUBFUN xmlChar * + xmlSplitQName2 (const xmlChar *name, + xmlChar **prefix); +XMLPUBFUN const xmlChar * + xmlSplitQName3 (const xmlChar *name, + int *len); + +/* + * Handling Buffers, the old ones see @xmlBuf for the new ones. + */ + +XMLPUBFUN void + xmlSetBufferAllocationScheme(xmlBufferAllocationScheme scheme); +XMLPUBFUN xmlBufferAllocationScheme + xmlGetBufferAllocationScheme(void); + +XMLPUBFUN xmlBufferPtr + xmlBufferCreate (void); +XMLPUBFUN xmlBufferPtr + xmlBufferCreateSize (size_t size); +XMLPUBFUN xmlBufferPtr + xmlBufferCreateStatic (void *mem, + size_t size); +XMLPUBFUN int + xmlBufferResize (xmlBufferPtr buf, + unsigned int size); +XMLPUBFUN void + xmlBufferFree (xmlBufferPtr buf); +XMLPUBFUN int + xmlBufferDump (FILE *file, + xmlBufferPtr buf); +XMLPUBFUN int + xmlBufferAdd (xmlBufferPtr buf, + const xmlChar *str, + int len); +XMLPUBFUN int + xmlBufferAddHead (xmlBufferPtr buf, + const xmlChar *str, + int len); +XMLPUBFUN int + xmlBufferCat (xmlBufferPtr buf, + const xmlChar *str); +XMLPUBFUN int + xmlBufferCCat (xmlBufferPtr buf, + const char *str); +XMLPUBFUN int + xmlBufferShrink (xmlBufferPtr buf, + unsigned int len); +XMLPUBFUN int + xmlBufferGrow (xmlBufferPtr buf, + unsigned int len); +XMLPUBFUN void + xmlBufferEmpty (xmlBufferPtr buf); +XMLPUBFUN const xmlChar* + xmlBufferContent (const xmlBuffer *buf); +XMLPUBFUN xmlChar* + xmlBufferDetach (xmlBufferPtr buf); +XMLPUBFUN void + xmlBufferSetAllocationScheme(xmlBufferPtr buf, + xmlBufferAllocationScheme scheme); +XMLPUBFUN int + xmlBufferLength (const xmlBuffer *buf); + +/* + * Creating/freeing new structures. + */ +XMLPUBFUN xmlDtdPtr + xmlCreateIntSubset (xmlDocPtr doc, + const xmlChar *name, + const xmlChar *ExternalID, + const xmlChar *SystemID); +XMLPUBFUN xmlDtdPtr + xmlNewDtd (xmlDocPtr doc, + const xmlChar *name, + const xmlChar *ExternalID, + const xmlChar *SystemID); +XMLPUBFUN xmlDtdPtr + xmlGetIntSubset (const xmlDoc *doc); +XMLPUBFUN void + xmlFreeDtd (xmlDtdPtr cur); +#ifdef LIBXML_LEGACY_ENABLED +XML_DEPRECATED +XMLPUBFUN xmlNsPtr + xmlNewGlobalNs (xmlDocPtr doc, + const xmlChar *href, + const xmlChar *prefix); +#endif /* LIBXML_LEGACY_ENABLED */ +XMLPUBFUN xmlNsPtr + xmlNewNs (xmlNodePtr node, + const xmlChar *href, + const xmlChar *prefix); +XMLPUBFUN void + xmlFreeNs (xmlNsPtr cur); +XMLPUBFUN void + xmlFreeNsList (xmlNsPtr cur); +XMLPUBFUN xmlDocPtr + xmlNewDoc (const xmlChar *version); +XMLPUBFUN void + xmlFreeDoc (xmlDocPtr cur); +XMLPUBFUN xmlAttrPtr + xmlNewDocProp (xmlDocPtr doc, + const xmlChar *name, + const xmlChar *value); +#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_HTML_ENABLED) || \ + defined(LIBXML_SCHEMAS_ENABLED) +XMLPUBFUN xmlAttrPtr + xmlNewProp (xmlNodePtr node, + const xmlChar *name, + const xmlChar *value); +#endif +XMLPUBFUN xmlAttrPtr + xmlNewNsProp (xmlNodePtr node, + xmlNsPtr ns, + const xmlChar *name, + const xmlChar *value); +XMLPUBFUN xmlAttrPtr + xmlNewNsPropEatName (xmlNodePtr node, + xmlNsPtr ns, + xmlChar *name, + const xmlChar *value); +XMLPUBFUN void + xmlFreePropList (xmlAttrPtr cur); +XMLPUBFUN void + xmlFreeProp (xmlAttrPtr cur); +XMLPUBFUN xmlAttrPtr + xmlCopyProp (xmlNodePtr target, + xmlAttrPtr cur); +XMLPUBFUN xmlAttrPtr + xmlCopyPropList (xmlNodePtr target, + xmlAttrPtr cur); +#ifdef LIBXML_TREE_ENABLED +XMLPUBFUN xmlDtdPtr + xmlCopyDtd (xmlDtdPtr dtd); +#endif /* LIBXML_TREE_ENABLED */ +#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) +XMLPUBFUN xmlDocPtr + xmlCopyDoc (xmlDocPtr doc, + int recursive); +#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) */ +/* + * Creating new nodes. + */ +XMLPUBFUN xmlNodePtr + xmlNewDocNode (xmlDocPtr doc, + xmlNsPtr ns, + const xmlChar *name, + const xmlChar *content); +XMLPUBFUN xmlNodePtr + xmlNewDocNodeEatName (xmlDocPtr doc, + xmlNsPtr ns, + xmlChar *name, + const xmlChar *content); +XMLPUBFUN xmlNodePtr + xmlNewNode (xmlNsPtr ns, + const xmlChar *name); +XMLPUBFUN xmlNodePtr + xmlNewNodeEatName (xmlNsPtr ns, + xmlChar *name); +#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) +XMLPUBFUN xmlNodePtr + xmlNewChild (xmlNodePtr parent, + xmlNsPtr ns, + const xmlChar *name, + const xmlChar *content); +#endif +XMLPUBFUN xmlNodePtr + xmlNewDocText (const xmlDoc *doc, + const xmlChar *content); +XMLPUBFUN xmlNodePtr + xmlNewText (const xmlChar *content); +XMLPUBFUN xmlNodePtr + xmlNewDocPI (xmlDocPtr doc, + const xmlChar *name, + const xmlChar *content); +XMLPUBFUN xmlNodePtr + xmlNewPI (const xmlChar *name, + const xmlChar *content); +XMLPUBFUN xmlNodePtr + xmlNewDocTextLen (xmlDocPtr doc, + const xmlChar *content, + int len); +XMLPUBFUN xmlNodePtr + xmlNewTextLen (const xmlChar *content, + int len); +XMLPUBFUN xmlNodePtr + xmlNewDocComment (xmlDocPtr doc, + const xmlChar *content); +XMLPUBFUN xmlNodePtr + xmlNewComment (const xmlChar *content); +XMLPUBFUN xmlNodePtr + xmlNewCDataBlock (xmlDocPtr doc, + const xmlChar *content, + int len); +XMLPUBFUN xmlNodePtr + xmlNewCharRef (xmlDocPtr doc, + const xmlChar *name); +XMLPUBFUN xmlNodePtr + xmlNewReference (const xmlDoc *doc, + const xmlChar *name); +XMLPUBFUN xmlNodePtr + xmlCopyNode (xmlNodePtr node, + int recursive); +XMLPUBFUN xmlNodePtr + xmlDocCopyNode (xmlNodePtr node, + xmlDocPtr doc, + int recursive); +XMLPUBFUN xmlNodePtr + xmlDocCopyNodeList (xmlDocPtr doc, + xmlNodePtr node); +XMLPUBFUN xmlNodePtr + xmlCopyNodeList (xmlNodePtr node); +#ifdef LIBXML_TREE_ENABLED +XMLPUBFUN xmlNodePtr + xmlNewTextChild (xmlNodePtr parent, + xmlNsPtr ns, + const xmlChar *name, + const xmlChar *content); +XMLPUBFUN xmlNodePtr + xmlNewDocRawNode (xmlDocPtr doc, + xmlNsPtr ns, + const xmlChar *name, + const xmlChar *content); +XMLPUBFUN xmlNodePtr + xmlNewDocFragment (xmlDocPtr doc); +#endif /* LIBXML_TREE_ENABLED */ + +/* + * Navigating. + */ +XMLPUBFUN long + xmlGetLineNo (const xmlNode *node); +#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_DEBUG_ENABLED) +XMLPUBFUN xmlChar * + xmlGetNodePath (const xmlNode *node); +#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_DEBUG_ENABLED) */ +XMLPUBFUN xmlNodePtr + xmlDocGetRootElement (const xmlDoc *doc); +XMLPUBFUN xmlNodePtr + xmlGetLastChild (const xmlNode *parent); +XMLPUBFUN int + xmlNodeIsText (const xmlNode *node); +XMLPUBFUN int + xmlIsBlankNode (const xmlNode *node); + +/* + * Changing the structure. + */ +#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_WRITER_ENABLED) +XMLPUBFUN xmlNodePtr + xmlDocSetRootElement (xmlDocPtr doc, + xmlNodePtr root); +#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_WRITER_ENABLED) */ +#ifdef LIBXML_TREE_ENABLED +XMLPUBFUN void + xmlNodeSetName (xmlNodePtr cur, + const xmlChar *name); +#endif /* LIBXML_TREE_ENABLED */ +XMLPUBFUN xmlNodePtr + xmlAddChild (xmlNodePtr parent, + xmlNodePtr cur); +XMLPUBFUN xmlNodePtr + xmlAddChildList (xmlNodePtr parent, + xmlNodePtr cur); +#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_WRITER_ENABLED) +XMLPUBFUN xmlNodePtr + xmlReplaceNode (xmlNodePtr old, + xmlNodePtr cur); +#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_WRITER_ENABLED) */ +#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_HTML_ENABLED) || \ + defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED) +XMLPUBFUN xmlNodePtr + xmlAddPrevSibling (xmlNodePtr cur, + xmlNodePtr elem); +#endif /* LIBXML_TREE_ENABLED || LIBXML_HTML_ENABLED || LIBXML_SCHEMAS_ENABLED */ +XMLPUBFUN xmlNodePtr + xmlAddSibling (xmlNodePtr cur, + xmlNodePtr elem); +XMLPUBFUN xmlNodePtr + xmlAddNextSibling (xmlNodePtr cur, + xmlNodePtr elem); +XMLPUBFUN void + xmlUnlinkNode (xmlNodePtr cur); +XMLPUBFUN xmlNodePtr + xmlTextMerge (xmlNodePtr first, + xmlNodePtr second); +XMLPUBFUN int + xmlTextConcat (xmlNodePtr node, + const xmlChar *content, + int len); +XMLPUBFUN void + xmlFreeNodeList (xmlNodePtr cur); +XMLPUBFUN void + xmlFreeNode (xmlNodePtr cur); +XMLPUBFUN int + xmlSetTreeDoc (xmlNodePtr tree, + xmlDocPtr doc); +XMLPUBFUN int + xmlSetListDoc (xmlNodePtr list, + xmlDocPtr doc); +/* + * Namespaces. + */ +XMLPUBFUN xmlNsPtr + xmlSearchNs (xmlDocPtr doc, + xmlNodePtr node, + const xmlChar *nameSpace); +XMLPUBFUN xmlNsPtr + xmlSearchNsByHref (xmlDocPtr doc, + xmlNodePtr node, + const xmlChar *href); +#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XPATH_ENABLED) || \ + defined(LIBXML_SCHEMAS_ENABLED) +XMLPUBFUN int + xmlGetNsListSafe (const xmlDoc *doc, + const xmlNode *node, + xmlNsPtr **out); +XMLPUBFUN xmlNsPtr * + xmlGetNsList (const xmlDoc *doc, + const xmlNode *node); +#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XPATH_ENABLED) */ + +XMLPUBFUN void + xmlSetNs (xmlNodePtr node, + xmlNsPtr ns); +XMLPUBFUN xmlNsPtr + xmlCopyNamespace (xmlNsPtr cur); +XMLPUBFUN xmlNsPtr + xmlCopyNamespaceList (xmlNsPtr cur); + +/* + * Changing the content. + */ +#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED) || \ + defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_HTML_ENABLED) +XMLPUBFUN xmlAttrPtr + xmlSetProp (xmlNodePtr node, + const xmlChar *name, + const xmlChar *value); +XMLPUBFUN xmlAttrPtr + xmlSetNsProp (xmlNodePtr node, + xmlNsPtr ns, + const xmlChar *name, + const xmlChar *value); +#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED) || \ + defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_HTML_ENABLED) */ +XMLPUBFUN int + xmlNodeGetAttrValue (const xmlNode *node, + const xmlChar *name, + const xmlChar *nsUri, + xmlChar **out); +XMLPUBFUN xmlChar * + xmlGetNoNsProp (const xmlNode *node, + const xmlChar *name); +XMLPUBFUN xmlChar * + xmlGetProp (const xmlNode *node, + const xmlChar *name); +XMLPUBFUN xmlAttrPtr + xmlHasProp (const xmlNode *node, + const xmlChar *name); +XMLPUBFUN xmlAttrPtr + xmlHasNsProp (const xmlNode *node, + const xmlChar *name, + const xmlChar *nameSpace); +XMLPUBFUN xmlChar * + xmlGetNsProp (const xmlNode *node, + const xmlChar *name, + const xmlChar *nameSpace); +XMLPUBFUN xmlNodePtr + xmlStringGetNodeList (const xmlDoc *doc, + const xmlChar *value); +XMLPUBFUN xmlNodePtr + xmlStringLenGetNodeList (const xmlDoc *doc, + const xmlChar *value, + int len); +XMLPUBFUN xmlChar * + xmlNodeListGetString (xmlDocPtr doc, + const xmlNode *list, + int inLine); +#ifdef LIBXML_TREE_ENABLED +XMLPUBFUN xmlChar * + xmlNodeListGetRawString (const xmlDoc *doc, + const xmlNode *list, + int inLine); +#endif /* LIBXML_TREE_ENABLED */ +XMLPUBFUN int + xmlNodeSetContent (xmlNodePtr cur, + const xmlChar *content); +#ifdef LIBXML_TREE_ENABLED +XMLPUBFUN int + xmlNodeSetContentLen (xmlNodePtr cur, + const xmlChar *content, + int len); +#endif /* LIBXML_TREE_ENABLED */ +XMLPUBFUN int + xmlNodeAddContent (xmlNodePtr cur, + const xmlChar *content); +XMLPUBFUN int + xmlNodeAddContentLen (xmlNodePtr cur, + const xmlChar *content, + int len); +XMLPUBFUN xmlChar * + xmlNodeGetContent (const xmlNode *cur); + +XMLPUBFUN int + xmlNodeBufGetContent (xmlBufferPtr buffer, + const xmlNode *cur); +XMLPUBFUN int + xmlBufGetNodeContent (xmlBufPtr buf, + const xmlNode *cur); + +XMLPUBFUN xmlChar * + xmlNodeGetLang (const xmlNode *cur); +XMLPUBFUN int + xmlNodeGetSpacePreserve (const xmlNode *cur); +#ifdef LIBXML_TREE_ENABLED +XMLPUBFUN int + xmlNodeSetLang (xmlNodePtr cur, + const xmlChar *lang); +XMLPUBFUN int + xmlNodeSetSpacePreserve (xmlNodePtr cur, + int val); +#endif /* LIBXML_TREE_ENABLED */ +XMLPUBFUN int + xmlNodeGetBaseSafe (const xmlDoc *doc, + const xmlNode *cur, + xmlChar **baseOut); +XMLPUBFUN xmlChar * + xmlNodeGetBase (const xmlDoc *doc, + const xmlNode *cur); +#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED) +XMLPUBFUN int + xmlNodeSetBase (xmlNodePtr cur, + const xmlChar *uri); +#endif + +/* + * Removing content. + */ +XMLPUBFUN int + xmlRemoveProp (xmlAttrPtr cur); +#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) +XMLPUBFUN int + xmlUnsetNsProp (xmlNodePtr node, + xmlNsPtr ns, + const xmlChar *name); +XMLPUBFUN int + xmlUnsetProp (xmlNodePtr node, + const xmlChar *name); +#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) */ + +/* + * Internal, don't use. + */ +XMLPUBFUN void + xmlBufferWriteCHAR (xmlBufferPtr buf, + const xmlChar *string); +XMLPUBFUN void + xmlBufferWriteChar (xmlBufferPtr buf, + const char *string); +XMLPUBFUN void + xmlBufferWriteQuotedString(xmlBufferPtr buf, + const xmlChar *string); + +#ifdef LIBXML_OUTPUT_ENABLED +XMLPUBFUN void xmlAttrSerializeTxtContent(xmlBufferPtr buf, + xmlDocPtr doc, + xmlAttrPtr attr, + const xmlChar *string); +#endif /* LIBXML_OUTPUT_ENABLED */ + +#ifdef LIBXML_TREE_ENABLED +/* + * Namespace handling. + */ +XMLPUBFUN int + xmlReconciliateNs (xmlDocPtr doc, + xmlNodePtr tree); +#endif + +#ifdef LIBXML_OUTPUT_ENABLED +/* + * Saving. + */ +XMLPUBFUN void + xmlDocDumpFormatMemory (xmlDocPtr cur, + xmlChar **mem, + int *size, + int format); +XMLPUBFUN void + xmlDocDumpMemory (xmlDocPtr cur, + xmlChar **mem, + int *size); +XMLPUBFUN void + xmlDocDumpMemoryEnc (xmlDocPtr out_doc, + xmlChar **doc_txt_ptr, + int * doc_txt_len, + const char *txt_encoding); +XMLPUBFUN void + xmlDocDumpFormatMemoryEnc(xmlDocPtr out_doc, + xmlChar **doc_txt_ptr, + int * doc_txt_len, + const char *txt_encoding, + int format); +XMLPUBFUN int + xmlDocFormatDump (FILE *f, + xmlDocPtr cur, + int format); +XMLPUBFUN int + xmlDocDump (FILE *f, + xmlDocPtr cur); +XMLPUBFUN void + xmlElemDump (FILE *f, + xmlDocPtr doc, + xmlNodePtr cur); +XMLPUBFUN int + xmlSaveFile (const char *filename, + xmlDocPtr cur); +XMLPUBFUN int + xmlSaveFormatFile (const char *filename, + xmlDocPtr cur, + int format); +XMLPUBFUN size_t + xmlBufNodeDump (xmlBufPtr buf, + xmlDocPtr doc, + xmlNodePtr cur, + int level, + int format); +XMLPUBFUN int + xmlNodeDump (xmlBufferPtr buf, + xmlDocPtr doc, + xmlNodePtr cur, + int level, + int format); + +XMLPUBFUN int + xmlSaveFileTo (xmlOutputBufferPtr buf, + xmlDocPtr cur, + const char *encoding); +XMLPUBFUN int + xmlSaveFormatFileTo (xmlOutputBufferPtr buf, + xmlDocPtr cur, + const char *encoding, + int format); +XMLPUBFUN void + xmlNodeDumpOutput (xmlOutputBufferPtr buf, + xmlDocPtr doc, + xmlNodePtr cur, + int level, + int format, + const char *encoding); + +XMLPUBFUN int + xmlSaveFormatFileEnc (const char *filename, + xmlDocPtr cur, + const char *encoding, + int format); + +XMLPUBFUN int + xmlSaveFileEnc (const char *filename, + xmlDocPtr cur, + const char *encoding); + +#endif /* LIBXML_OUTPUT_ENABLED */ +/* + * XHTML + */ +XMLPUBFUN int + xmlIsXHTML (const xmlChar *systemID, + const xmlChar *publicID); + +/* + * Compression. + */ +XMLPUBFUN int + xmlGetDocCompressMode (const xmlDoc *doc); +XMLPUBFUN void + xmlSetDocCompressMode (xmlDocPtr doc, + int mode); +XML_DEPRECATED +XMLPUBFUN int + xmlGetCompressMode (void); +XML_DEPRECATED +XMLPUBFUN void + xmlSetCompressMode (int mode); + +/* +* DOM-wrapper helper functions. +*/ +XMLPUBFUN xmlDOMWrapCtxtPtr + xmlDOMWrapNewCtxt (void); +XMLPUBFUN void + xmlDOMWrapFreeCtxt (xmlDOMWrapCtxtPtr ctxt); +XMLPUBFUN int + xmlDOMWrapReconcileNamespaces(xmlDOMWrapCtxtPtr ctxt, + xmlNodePtr elem, + int options); +XMLPUBFUN int + xmlDOMWrapAdoptNode (xmlDOMWrapCtxtPtr ctxt, + xmlDocPtr sourceDoc, + xmlNodePtr node, + xmlDocPtr destDoc, + xmlNodePtr destParent, + int options); +XMLPUBFUN int + xmlDOMWrapRemoveNode (xmlDOMWrapCtxtPtr ctxt, + xmlDocPtr doc, + xmlNodePtr node, + int options); +XMLPUBFUN int + xmlDOMWrapCloneNode (xmlDOMWrapCtxtPtr ctxt, + xmlDocPtr sourceDoc, + xmlNodePtr node, + xmlNodePtr *clonedNode, + xmlDocPtr destDoc, + xmlNodePtr destParent, + int deep, + int options); + +#ifdef LIBXML_TREE_ENABLED +/* + * 5 interfaces from DOM ElementTraversal, but different in entities + * traversal. + */ +XMLPUBFUN unsigned long + xmlChildElementCount (xmlNodePtr parent); +XMLPUBFUN xmlNodePtr + xmlNextElementSibling (xmlNodePtr node); +XMLPUBFUN xmlNodePtr + xmlFirstElementChild (xmlNodePtr parent); +XMLPUBFUN xmlNodePtr + xmlLastElementChild (xmlNodePtr parent); +XMLPUBFUN xmlNodePtr + xmlPreviousElementSibling (xmlNodePtr node); +#endif + +XML_DEPRECATED +XMLPUBFUN xmlRegisterNodeFunc + xmlRegisterNodeDefault (xmlRegisterNodeFunc func); +XML_DEPRECATED +XMLPUBFUN xmlDeregisterNodeFunc + xmlDeregisterNodeDefault (xmlDeregisterNodeFunc func); +XML_DEPRECATED +XMLPUBFUN xmlRegisterNodeFunc + xmlThrDefRegisterNodeDefault(xmlRegisterNodeFunc func); +XML_DEPRECATED +XMLPUBFUN xmlDeregisterNodeFunc + xmlThrDefDeregisterNodeDefault(xmlDeregisterNodeFunc func); + +XML_DEPRECATED XMLPUBFUN xmlBufferAllocationScheme + xmlThrDefBufferAllocScheme (xmlBufferAllocationScheme v); +XML_DEPRECATED XMLPUBFUN int + xmlThrDefDefaultBufferSize (int v); + +#ifdef __cplusplus +} +#endif + +#endif /* __XML_TREE_H__ */ + +#endif /* XML_TREE_INTERNALS */ + diff --git a/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/include/libxml2/libxml/uri.h b/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/include/libxml2/libxml/uri.h new file mode 100644 index 0000000000000000000000000000000000000000..19980b711c56ef9c4b56c1f9f58e1c599d874008 --- /dev/null +++ b/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/include/libxml2/libxml/uri.h @@ -0,0 +1,106 @@ +/** + * Summary: library of generic URI related routines + * Description: library of generic URI related routines + * Implements RFC 2396 + * + * Copy: See Copyright for the status of this software. + * + * Author: Daniel Veillard + */ + +#ifndef __XML_URI_H__ +#define __XML_URI_H__ + +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * xmlURI: + * + * A parsed URI reference. This is a struct containing the various fields + * as described in RFC 2396 but separated for further processing. + * + * Note: query is a deprecated field which is incorrectly unescaped. + * query_raw takes precedence over query if the former is set. + * See: http://mail.gnome.org/archives/xml/2007-April/thread.html#00127 + */ +typedef struct _xmlURI xmlURI; +typedef xmlURI *xmlURIPtr; +struct _xmlURI { + char *scheme; /* the URI scheme */ + char *opaque; /* opaque part */ + char *authority; /* the authority part */ + char *server; /* the server part */ + char *user; /* the user part */ + int port; /* the port number */ + char *path; /* the path string */ + char *query; /* the query string (deprecated - use with caution) */ + char *fragment; /* the fragment identifier */ + int cleanup; /* parsing potentially unclean URI */ + char *query_raw; /* the query string (as it appears in the URI) */ +}; + +/* + * This function is in tree.h: + * xmlChar * xmlNodeGetBase (xmlDocPtr doc, + * xmlNodePtr cur); + */ +XMLPUBFUN xmlURIPtr + xmlCreateURI (void); +XMLPUBFUN int + xmlBuildURISafe (const xmlChar *URI, + const xmlChar *base, + xmlChar **out); +XMLPUBFUN xmlChar * + xmlBuildURI (const xmlChar *URI, + const xmlChar *base); +XMLPUBFUN int + xmlBuildRelativeURISafe (const xmlChar *URI, + const xmlChar *base, + xmlChar **out); +XMLPUBFUN xmlChar * + xmlBuildRelativeURI (const xmlChar *URI, + const xmlChar *base); +XMLPUBFUN xmlURIPtr + xmlParseURI (const char *str); +XMLPUBFUN int + xmlParseURISafe (const char *str, + xmlURIPtr *uri); +XMLPUBFUN xmlURIPtr + xmlParseURIRaw (const char *str, + int raw); +XMLPUBFUN int + xmlParseURIReference (xmlURIPtr uri, + const char *str); +XMLPUBFUN xmlChar * + xmlSaveUri (xmlURIPtr uri); +XMLPUBFUN void + xmlPrintURI (FILE *stream, + xmlURIPtr uri); +XMLPUBFUN xmlChar * + xmlURIEscapeStr (const xmlChar *str, + const xmlChar *list); +XMLPUBFUN char * + xmlURIUnescapeString (const char *str, + int len, + char *target); +XMLPUBFUN int + xmlNormalizeURIPath (char *path); +XMLPUBFUN xmlChar * + xmlURIEscape (const xmlChar *str); +XMLPUBFUN void + xmlFreeURI (xmlURIPtr uri); +XMLPUBFUN xmlChar* + xmlCanonicPath (const xmlChar *path); +XMLPUBFUN xmlChar* + xmlPathToURI (const xmlChar *path); + +#ifdef __cplusplus +} +#endif +#endif /* __XML_URI_H__ */ diff --git a/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/include/libxml2/libxml/valid.h b/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/include/libxml2/libxml/valid.h new file mode 100644 index 0000000000000000000000000000000000000000..e1698d7a34025fe05b86d76ff1bd0ea873108523 --- /dev/null +++ b/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/include/libxml2/libxml/valid.h @@ -0,0 +1,477 @@ +/* + * Summary: The DTD validation + * Description: API for the DTD handling and the validity checking + * + * Copy: See Copyright for the status of this software. + * + * Author: Daniel Veillard + */ + + +#ifndef __XML_VALID_H__ +#define __XML_VALID_H__ + +/** DOC_DISABLE */ +#include +#include +#define XML_TREE_INTERNALS +#include +#undef XML_TREE_INTERNALS +#include +#include +#include +/** DOC_ENABLE */ + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * Validation state added for non-determinist content model. + */ +typedef struct _xmlValidState xmlValidState; +typedef xmlValidState *xmlValidStatePtr; + +/** + * xmlValidityErrorFunc: + * @ctx: usually an xmlValidCtxtPtr to a validity error context, + * but comes from ctxt->userData (which normally contains such + * a pointer); ctxt->userData can be changed by the user. + * @msg: the string to format *printf like vararg + * @...: remaining arguments to the format + * + * Callback called when a validity error is found. This is a message + * oriented function similar to an *printf function. + */ +typedef void (*xmlValidityErrorFunc) (void *ctx, + const char *msg, + ...) LIBXML_ATTR_FORMAT(2,3); + +/** + * xmlValidityWarningFunc: + * @ctx: usually an xmlValidCtxtPtr to a validity error context, + * but comes from ctxt->userData (which normally contains such + * a pointer); ctxt->userData can be changed by the user. + * @msg: the string to format *printf like vararg + * @...: remaining arguments to the format + * + * Callback called when a validity warning is found. This is a message + * oriented function similar to an *printf function. + */ +typedef void (*xmlValidityWarningFunc) (void *ctx, + const char *msg, + ...) LIBXML_ATTR_FORMAT(2,3); + +/* + * xmlValidCtxt: + * An xmlValidCtxt is used for error reporting when validating. + */ +typedef struct _xmlValidCtxt xmlValidCtxt; +typedef xmlValidCtxt *xmlValidCtxtPtr; +struct _xmlValidCtxt { + void *userData; /* user specific data block */ + xmlValidityErrorFunc error; /* the callback in case of errors */ + xmlValidityWarningFunc warning; /* the callback in case of warning */ + + /* Node analysis stack used when validating within entities */ + xmlNodePtr node; /* Current parsed Node */ + int nodeNr; /* Depth of the parsing stack */ + int nodeMax; /* Max depth of the parsing stack */ + xmlNodePtr *nodeTab; /* array of nodes */ + + unsigned int flags; /* internal flags */ + xmlDocPtr doc; /* the document */ + int valid; /* temporary validity check result */ + + /* state state used for non-determinist content validation */ + xmlValidState *vstate; /* current state */ + int vstateNr; /* Depth of the validation stack */ + int vstateMax; /* Max depth of the validation stack */ + xmlValidState *vstateTab; /* array of validation states */ + +#ifdef LIBXML_REGEXP_ENABLED + xmlAutomataPtr am; /* the automata */ + xmlAutomataStatePtr state; /* used to build the automata */ +#else + void *am; + void *state; +#endif +}; + +/* + * ALL notation declarations are stored in a table. + * There is one table per DTD. + */ + +typedef struct _xmlHashTable xmlNotationTable; +typedef xmlNotationTable *xmlNotationTablePtr; + +/* + * ALL element declarations are stored in a table. + * There is one table per DTD. + */ + +typedef struct _xmlHashTable xmlElementTable; +typedef xmlElementTable *xmlElementTablePtr; + +/* + * ALL attribute declarations are stored in a table. + * There is one table per DTD. + */ + +typedef struct _xmlHashTable xmlAttributeTable; +typedef xmlAttributeTable *xmlAttributeTablePtr; + +/* + * ALL IDs attributes are stored in a table. + * There is one table per document. + */ + +typedef struct _xmlHashTable xmlIDTable; +typedef xmlIDTable *xmlIDTablePtr; + +/* + * ALL Refs attributes are stored in a table. + * There is one table per document. + */ + +typedef struct _xmlHashTable xmlRefTable; +typedef xmlRefTable *xmlRefTablePtr; + +/* Notation */ +XMLPUBFUN xmlNotationPtr + xmlAddNotationDecl (xmlValidCtxtPtr ctxt, + xmlDtdPtr dtd, + const xmlChar *name, + const xmlChar *PublicID, + const xmlChar *SystemID); +#ifdef LIBXML_TREE_ENABLED +XMLPUBFUN xmlNotationTablePtr + xmlCopyNotationTable (xmlNotationTablePtr table); +#endif /* LIBXML_TREE_ENABLED */ +XMLPUBFUN void + xmlFreeNotationTable (xmlNotationTablePtr table); +#ifdef LIBXML_OUTPUT_ENABLED +XML_DEPRECATED +XMLPUBFUN void + xmlDumpNotationDecl (xmlBufferPtr buf, + xmlNotationPtr nota); +/* XML_DEPRECATED, still used in lxml */ +XMLPUBFUN void + xmlDumpNotationTable (xmlBufferPtr buf, + xmlNotationTablePtr table); +#endif /* LIBXML_OUTPUT_ENABLED */ + +/* Element Content */ +/* the non Doc version are being deprecated */ +XMLPUBFUN xmlElementContentPtr + xmlNewElementContent (const xmlChar *name, + xmlElementContentType type); +XMLPUBFUN xmlElementContentPtr + xmlCopyElementContent (xmlElementContentPtr content); +XMLPUBFUN void + xmlFreeElementContent (xmlElementContentPtr cur); +/* the new versions with doc argument */ +XMLPUBFUN xmlElementContentPtr + xmlNewDocElementContent (xmlDocPtr doc, + const xmlChar *name, + xmlElementContentType type); +XMLPUBFUN xmlElementContentPtr + xmlCopyDocElementContent(xmlDocPtr doc, + xmlElementContentPtr content); +XMLPUBFUN void + xmlFreeDocElementContent(xmlDocPtr doc, + xmlElementContentPtr cur); +XMLPUBFUN void + xmlSnprintfElementContent(char *buf, + int size, + xmlElementContentPtr content, + int englob); +#ifdef LIBXML_OUTPUT_ENABLED +XML_DEPRECATED +XMLPUBFUN void + xmlSprintfElementContent(char *buf, + xmlElementContentPtr content, + int englob); +#endif /* LIBXML_OUTPUT_ENABLED */ + +/* Element */ +XMLPUBFUN xmlElementPtr + xmlAddElementDecl (xmlValidCtxtPtr ctxt, + xmlDtdPtr dtd, + const xmlChar *name, + xmlElementTypeVal type, + xmlElementContentPtr content); +#ifdef LIBXML_TREE_ENABLED +XMLPUBFUN xmlElementTablePtr + xmlCopyElementTable (xmlElementTablePtr table); +#endif /* LIBXML_TREE_ENABLED */ +XMLPUBFUN void + xmlFreeElementTable (xmlElementTablePtr table); +#ifdef LIBXML_OUTPUT_ENABLED +XML_DEPRECATED +XMLPUBFUN void + xmlDumpElementTable (xmlBufferPtr buf, + xmlElementTablePtr table); +XML_DEPRECATED +XMLPUBFUN void + xmlDumpElementDecl (xmlBufferPtr buf, + xmlElementPtr elem); +#endif /* LIBXML_OUTPUT_ENABLED */ + +/* Enumeration */ +XMLPUBFUN xmlEnumerationPtr + xmlCreateEnumeration (const xmlChar *name); +XMLPUBFUN void + xmlFreeEnumeration (xmlEnumerationPtr cur); +#ifdef LIBXML_TREE_ENABLED +XMLPUBFUN xmlEnumerationPtr + xmlCopyEnumeration (xmlEnumerationPtr cur); +#endif /* LIBXML_TREE_ENABLED */ + +/* Attribute */ +XMLPUBFUN xmlAttributePtr + xmlAddAttributeDecl (xmlValidCtxtPtr ctxt, + xmlDtdPtr dtd, + const xmlChar *elem, + const xmlChar *name, + const xmlChar *ns, + xmlAttributeType type, + xmlAttributeDefault def, + const xmlChar *defaultValue, + xmlEnumerationPtr tree); +#ifdef LIBXML_TREE_ENABLED +XMLPUBFUN xmlAttributeTablePtr + xmlCopyAttributeTable (xmlAttributeTablePtr table); +#endif /* LIBXML_TREE_ENABLED */ +XMLPUBFUN void + xmlFreeAttributeTable (xmlAttributeTablePtr table); +#ifdef LIBXML_OUTPUT_ENABLED +XML_DEPRECATED +XMLPUBFUN void + xmlDumpAttributeTable (xmlBufferPtr buf, + xmlAttributeTablePtr table); +XML_DEPRECATED +XMLPUBFUN void + xmlDumpAttributeDecl (xmlBufferPtr buf, + xmlAttributePtr attr); +#endif /* LIBXML_OUTPUT_ENABLED */ + +/* IDs */ +XMLPUBFUN int + xmlAddIDSafe (xmlAttrPtr attr, + const xmlChar *value); +XMLPUBFUN xmlIDPtr + xmlAddID (xmlValidCtxtPtr ctxt, + xmlDocPtr doc, + const xmlChar *value, + xmlAttrPtr attr); +XMLPUBFUN void + xmlFreeIDTable (xmlIDTablePtr table); +XMLPUBFUN xmlAttrPtr + xmlGetID (xmlDocPtr doc, + const xmlChar *ID); +XMLPUBFUN int + xmlIsID (xmlDocPtr doc, + xmlNodePtr elem, + xmlAttrPtr attr); +XMLPUBFUN int + xmlRemoveID (xmlDocPtr doc, + xmlAttrPtr attr); + +/* IDREFs */ +XML_DEPRECATED +XMLPUBFUN xmlRefPtr + xmlAddRef (xmlValidCtxtPtr ctxt, + xmlDocPtr doc, + const xmlChar *value, + xmlAttrPtr attr); +XML_DEPRECATED +XMLPUBFUN void + xmlFreeRefTable (xmlRefTablePtr table); +XML_DEPRECATED +XMLPUBFUN int + xmlIsRef (xmlDocPtr doc, + xmlNodePtr elem, + xmlAttrPtr attr); +XML_DEPRECATED +XMLPUBFUN int + xmlRemoveRef (xmlDocPtr doc, + xmlAttrPtr attr); +XML_DEPRECATED +XMLPUBFUN xmlListPtr + xmlGetRefs (xmlDocPtr doc, + const xmlChar *ID); + +/** + * The public function calls related to validity checking. + */ +#ifdef LIBXML_VALID_ENABLED +/* Allocate/Release Validation Contexts */ +XMLPUBFUN xmlValidCtxtPtr + xmlNewValidCtxt(void); +XMLPUBFUN void + xmlFreeValidCtxt(xmlValidCtxtPtr); + +XML_DEPRECATED +XMLPUBFUN int + xmlValidateRoot (xmlValidCtxtPtr ctxt, + xmlDocPtr doc); +XML_DEPRECATED +XMLPUBFUN int + xmlValidateElementDecl (xmlValidCtxtPtr ctxt, + xmlDocPtr doc, + xmlElementPtr elem); +XML_DEPRECATED +XMLPUBFUN xmlChar * + xmlValidNormalizeAttributeValue(xmlDocPtr doc, + xmlNodePtr elem, + const xmlChar *name, + const xmlChar *value); +XML_DEPRECATED +XMLPUBFUN xmlChar * + xmlValidCtxtNormalizeAttributeValue(xmlValidCtxtPtr ctxt, + xmlDocPtr doc, + xmlNodePtr elem, + const xmlChar *name, + const xmlChar *value); +XML_DEPRECATED +XMLPUBFUN int + xmlValidateAttributeDecl(xmlValidCtxtPtr ctxt, + xmlDocPtr doc, + xmlAttributePtr attr); +XML_DEPRECATED +XMLPUBFUN int + xmlValidateAttributeValue(xmlAttributeType type, + const xmlChar *value); +XML_DEPRECATED +XMLPUBFUN int + xmlValidateNotationDecl (xmlValidCtxtPtr ctxt, + xmlDocPtr doc, + xmlNotationPtr nota); +XMLPUBFUN int + xmlValidateDtd (xmlValidCtxtPtr ctxt, + xmlDocPtr doc, + xmlDtdPtr dtd); +XML_DEPRECATED +XMLPUBFUN int + xmlValidateDtdFinal (xmlValidCtxtPtr ctxt, + xmlDocPtr doc); +XMLPUBFUN int + xmlValidateDocument (xmlValidCtxtPtr ctxt, + xmlDocPtr doc); +XMLPUBFUN int + xmlValidateElement (xmlValidCtxtPtr ctxt, + xmlDocPtr doc, + xmlNodePtr elem); +XML_DEPRECATED +XMLPUBFUN int + xmlValidateOneElement (xmlValidCtxtPtr ctxt, + xmlDocPtr doc, + xmlNodePtr elem); +XML_DEPRECATED +XMLPUBFUN int + xmlValidateOneAttribute (xmlValidCtxtPtr ctxt, + xmlDocPtr doc, + xmlNodePtr elem, + xmlAttrPtr attr, + const xmlChar *value); +XML_DEPRECATED +XMLPUBFUN int + xmlValidateOneNamespace (xmlValidCtxtPtr ctxt, + xmlDocPtr doc, + xmlNodePtr elem, + const xmlChar *prefix, + xmlNsPtr ns, + const xmlChar *value); +XML_DEPRECATED +XMLPUBFUN int + xmlValidateDocumentFinal(xmlValidCtxtPtr ctxt, + xmlDocPtr doc); +#endif /* LIBXML_VALID_ENABLED */ + +#if defined(LIBXML_VALID_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) +XML_DEPRECATED +XMLPUBFUN int + xmlValidateNotationUse (xmlValidCtxtPtr ctxt, + xmlDocPtr doc, + const xmlChar *notationName); +#endif /* LIBXML_VALID_ENABLED or LIBXML_SCHEMAS_ENABLED */ + +XMLPUBFUN int + xmlIsMixedElement (xmlDocPtr doc, + const xmlChar *name); +XMLPUBFUN xmlAttributePtr + xmlGetDtdAttrDesc (xmlDtdPtr dtd, + const xmlChar *elem, + const xmlChar *name); +XMLPUBFUN xmlAttributePtr + xmlGetDtdQAttrDesc (xmlDtdPtr dtd, + const xmlChar *elem, + const xmlChar *name, + const xmlChar *prefix); +XMLPUBFUN xmlNotationPtr + xmlGetDtdNotationDesc (xmlDtdPtr dtd, + const xmlChar *name); +XMLPUBFUN xmlElementPtr + xmlGetDtdQElementDesc (xmlDtdPtr dtd, + const xmlChar *name, + const xmlChar *prefix); +XMLPUBFUN xmlElementPtr + xmlGetDtdElementDesc (xmlDtdPtr dtd, + const xmlChar *name); + +#ifdef LIBXML_VALID_ENABLED + +XMLPUBFUN int + xmlValidGetPotentialChildren(xmlElementContent *ctree, + const xmlChar **names, + int *len, + int max); + +XMLPUBFUN int + xmlValidGetValidElements(xmlNode *prev, + xmlNode *next, + const xmlChar **names, + int max); +XMLPUBFUN int + xmlValidateNameValue (const xmlChar *value); +XMLPUBFUN int + xmlValidateNamesValue (const xmlChar *value); +XMLPUBFUN int + xmlValidateNmtokenValue (const xmlChar *value); +XMLPUBFUN int + xmlValidateNmtokensValue(const xmlChar *value); + +#ifdef LIBXML_REGEXP_ENABLED +/* + * Validation based on the regexp support + */ +XML_DEPRECATED +XMLPUBFUN int + xmlValidBuildContentModel(xmlValidCtxtPtr ctxt, + xmlElementPtr elem); + +XML_DEPRECATED +XMLPUBFUN int + xmlValidatePushElement (xmlValidCtxtPtr ctxt, + xmlDocPtr doc, + xmlNodePtr elem, + const xmlChar *qname); +XML_DEPRECATED +XMLPUBFUN int + xmlValidatePushCData (xmlValidCtxtPtr ctxt, + const xmlChar *data, + int len); +XML_DEPRECATED +XMLPUBFUN int + xmlValidatePopElement (xmlValidCtxtPtr ctxt, + xmlDocPtr doc, + xmlNodePtr elem, + const xmlChar *qname); +#endif /* LIBXML_REGEXP_ENABLED */ +#endif /* LIBXML_VALID_ENABLED */ +#ifdef __cplusplus +} +#endif +#endif /* __XML_VALID_H__ */ diff --git a/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/include/libxml2/libxml/xinclude.h b/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/include/libxml2/libxml/xinclude.h new file mode 100644 index 0000000000000000000000000000000000000000..71fa4c20dc2507242b50415f854c0362f913734c --- /dev/null +++ b/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/include/libxml2/libxml/xinclude.h @@ -0,0 +1,136 @@ +/* + * Summary: implementation of XInclude + * Description: API to handle XInclude processing, + * implements the + * World Wide Web Consortium Last Call Working Draft 10 November 2003 + * http://www.w3.org/TR/2003/WD-xinclude-20031110 + * + * Copy: See Copyright for the status of this software. + * + * Author: Daniel Veillard + */ + +#ifndef __XML_XINCLUDE_H__ +#define __XML_XINCLUDE_H__ + +#include +#include +#include + +#ifdef LIBXML_XINCLUDE_ENABLED + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * XINCLUDE_NS: + * + * Macro defining the Xinclude namespace: http://www.w3.org/2003/XInclude + */ +#define XINCLUDE_NS (const xmlChar *) "http://www.w3.org/2003/XInclude" +/** + * XINCLUDE_OLD_NS: + * + * Macro defining the draft Xinclude namespace: http://www.w3.org/2001/XInclude + */ +#define XINCLUDE_OLD_NS (const xmlChar *) "http://www.w3.org/2001/XInclude" +/** + * XINCLUDE_NODE: + * + * Macro defining "include" + */ +#define XINCLUDE_NODE (const xmlChar *) "include" +/** + * XINCLUDE_FALLBACK: + * + * Macro defining "fallback" + */ +#define XINCLUDE_FALLBACK (const xmlChar *) "fallback" +/** + * XINCLUDE_HREF: + * + * Macro defining "href" + */ +#define XINCLUDE_HREF (const xmlChar *) "href" +/** + * XINCLUDE_PARSE: + * + * Macro defining "parse" + */ +#define XINCLUDE_PARSE (const xmlChar *) "parse" +/** + * XINCLUDE_PARSE_XML: + * + * Macro defining "xml" + */ +#define XINCLUDE_PARSE_XML (const xmlChar *) "xml" +/** + * XINCLUDE_PARSE_TEXT: + * + * Macro defining "text" + */ +#define XINCLUDE_PARSE_TEXT (const xmlChar *) "text" +/** + * XINCLUDE_PARSE_ENCODING: + * + * Macro defining "encoding" + */ +#define XINCLUDE_PARSE_ENCODING (const xmlChar *) "encoding" +/** + * XINCLUDE_PARSE_XPOINTER: + * + * Macro defining "xpointer" + */ +#define XINCLUDE_PARSE_XPOINTER (const xmlChar *) "xpointer" + +typedef struct _xmlXIncludeCtxt xmlXIncludeCtxt; +typedef xmlXIncludeCtxt *xmlXIncludeCtxtPtr; + +/* + * standalone processing + */ +XMLPUBFUN int + xmlXIncludeProcess (xmlDocPtr doc); +XMLPUBFUN int + xmlXIncludeProcessFlags (xmlDocPtr doc, + int flags); +XMLPUBFUN int + xmlXIncludeProcessFlagsData(xmlDocPtr doc, + int flags, + void *data); +XMLPUBFUN int + xmlXIncludeProcessTreeFlagsData(xmlNodePtr tree, + int flags, + void *data); +XMLPUBFUN int + xmlXIncludeProcessTree (xmlNodePtr tree); +XMLPUBFUN int + xmlXIncludeProcessTreeFlags(xmlNodePtr tree, + int flags); +/* + * contextual processing + */ +XMLPUBFUN xmlXIncludeCtxtPtr + xmlXIncludeNewContext (xmlDocPtr doc); +XMLPUBFUN int + xmlXIncludeSetFlags (xmlXIncludeCtxtPtr ctxt, + int flags); +XMLPUBFUN void + xmlXIncludeSetErrorHandler(xmlXIncludeCtxtPtr ctxt, + xmlStructuredErrorFunc handler, + void *data); +XMLPUBFUN int + xmlXIncludeGetLastError (xmlXIncludeCtxtPtr ctxt); +XMLPUBFUN void + xmlXIncludeFreeContext (xmlXIncludeCtxtPtr ctxt); +XMLPUBFUN int + xmlXIncludeProcessNode (xmlXIncludeCtxtPtr ctxt, + xmlNodePtr tree); +#ifdef __cplusplus +} +#endif + +#endif /* LIBXML_XINCLUDE_ENABLED */ + +#endif /* __XML_XINCLUDE_H__ */ diff --git a/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/include/libxml2/libxml/xlink.h b/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/include/libxml2/libxml/xlink.h new file mode 100644 index 0000000000000000000000000000000000000000..106573666ae462f2b4c1dafe86b39b1afb84530e --- /dev/null +++ b/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/include/libxml2/libxml/xlink.h @@ -0,0 +1,189 @@ +/* + * Summary: unfinished XLink detection module + * Description: unfinished XLink detection module + * + * Copy: See Copyright for the status of this software. + * + * Author: Daniel Veillard + */ + +#ifndef __XML_XLINK_H__ +#define __XML_XLINK_H__ + +#include +#include + +#ifdef LIBXML_XPTR_ENABLED + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * Various defines for the various Link properties. + * + * NOTE: the link detection layer will try to resolve QName expansion + * of namespaces. If "foo" is the prefix for "http://foo.com/" + * then the link detection layer will expand role="foo:myrole" + * to "http://foo.com/:myrole". + * NOTE: the link detection layer will expand URI-References found on + * href attributes by using the base mechanism if found. + */ +typedef xmlChar *xlinkHRef; +typedef xmlChar *xlinkRole; +typedef xmlChar *xlinkTitle; + +typedef enum { + XLINK_TYPE_NONE = 0, + XLINK_TYPE_SIMPLE, + XLINK_TYPE_EXTENDED, + XLINK_TYPE_EXTENDED_SET +} xlinkType; + +typedef enum { + XLINK_SHOW_NONE = 0, + XLINK_SHOW_NEW, + XLINK_SHOW_EMBED, + XLINK_SHOW_REPLACE +} xlinkShow; + +typedef enum { + XLINK_ACTUATE_NONE = 0, + XLINK_ACTUATE_AUTO, + XLINK_ACTUATE_ONREQUEST +} xlinkActuate; + +/** + * xlinkNodeDetectFunc: + * @ctx: user data pointer + * @node: the node to check + * + * This is the prototype for the link detection routine. + * It calls the default link detection callbacks upon link detection. + */ +typedef void (*xlinkNodeDetectFunc) (void *ctx, xmlNodePtr node); + +/* + * The link detection module interact with the upper layers using + * a set of callback registered at parsing time. + */ + +/** + * xlinkSimpleLinkFunk: + * @ctx: user data pointer + * @node: the node carrying the link + * @href: the target of the link + * @role: the role string + * @title: the link title + * + * This is the prototype for a simple link detection callback. + */ +typedef void +(*xlinkSimpleLinkFunk) (void *ctx, + xmlNodePtr node, + const xlinkHRef href, + const xlinkRole role, + const xlinkTitle title); + +/** + * xlinkExtendedLinkFunk: + * @ctx: user data pointer + * @node: the node carrying the link + * @nbLocators: the number of locators detected on the link + * @hrefs: pointer to the array of locator hrefs + * @roles: pointer to the array of locator roles + * @nbArcs: the number of arcs detected on the link + * @from: pointer to the array of source roles found on the arcs + * @to: pointer to the array of target roles found on the arcs + * @show: array of values for the show attributes found on the arcs + * @actuate: array of values for the actuate attributes found on the arcs + * @nbTitles: the number of titles detected on the link + * @title: array of titles detected on the link + * @langs: array of xml:lang values for the titles + * + * This is the prototype for a extended link detection callback. + */ +typedef void +(*xlinkExtendedLinkFunk)(void *ctx, + xmlNodePtr node, + int nbLocators, + const xlinkHRef *hrefs, + const xlinkRole *roles, + int nbArcs, + const xlinkRole *from, + const xlinkRole *to, + xlinkShow *show, + xlinkActuate *actuate, + int nbTitles, + const xlinkTitle *titles, + const xmlChar **langs); + +/** + * xlinkExtendedLinkSetFunk: + * @ctx: user data pointer + * @node: the node carrying the link + * @nbLocators: the number of locators detected on the link + * @hrefs: pointer to the array of locator hrefs + * @roles: pointer to the array of locator roles + * @nbTitles: the number of titles detected on the link + * @title: array of titles detected on the link + * @langs: array of xml:lang values for the titles + * + * This is the prototype for a extended link set detection callback. + */ +typedef void +(*xlinkExtendedLinkSetFunk) (void *ctx, + xmlNodePtr node, + int nbLocators, + const xlinkHRef *hrefs, + const xlinkRole *roles, + int nbTitles, + const xlinkTitle *titles, + const xmlChar **langs); + +/** + * This is the structure containing a set of Links detection callbacks. + * + * There is no default xlink callbacks, if one want to get link + * recognition activated, those call backs must be provided before parsing. + */ +typedef struct _xlinkHandler xlinkHandler; +typedef xlinkHandler *xlinkHandlerPtr; +struct _xlinkHandler { + xlinkSimpleLinkFunk simple; + xlinkExtendedLinkFunk extended; + xlinkExtendedLinkSetFunk set; +}; + +/* + * The default detection routine, can be overridden, they call the default + * detection callbacks. + */ + +XMLPUBFUN xlinkNodeDetectFunc + xlinkGetDefaultDetect (void); +XMLPUBFUN void + xlinkSetDefaultDetect (xlinkNodeDetectFunc func); + +/* + * Routines to set/get the default handlers. + */ +XMLPUBFUN xlinkHandlerPtr + xlinkGetDefaultHandler (void); +XMLPUBFUN void + xlinkSetDefaultHandler (xlinkHandlerPtr handler); + +/* + * Link detection module itself. + */ +XMLPUBFUN xlinkType + xlinkIsLink (xmlDocPtr doc, + xmlNodePtr node); + +#ifdef __cplusplus +} +#endif + +#endif /* LIBXML_XPTR_ENABLED */ + +#endif /* __XML_XLINK_H__ */ diff --git a/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/include/libxml2/libxml/xmlIO.h b/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/include/libxml2/libxml/xmlIO.h new file mode 100644 index 0000000000000000000000000000000000000000..e950773af872ec7c0f55d36ec5905123c1eb6074 --- /dev/null +++ b/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/include/libxml2/libxml/xmlIO.h @@ -0,0 +1,438 @@ +/* + * Summary: interface for the I/O interfaces used by the parser + * Description: interface for the I/O interfaces used by the parser + * + * Copy: See Copyright for the status of this software. + * + * Author: Daniel Veillard + */ + +#ifndef __XML_IO_H__ +#define __XML_IO_H__ + +/** DOC_DISABLE */ +#include +#include +#include +#define XML_TREE_INTERNALS +#include +#undef XML_TREE_INTERNALS +/** DOC_ENABLE */ + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * Those are the functions and datatypes for the parser input + * I/O structures. + */ + +/** + * xmlInputMatchCallback: + * @filename: the filename or URI + * + * Callback used in the I/O Input API to detect if the current handler + * can provide input functionality for this resource. + * + * Returns 1 if yes and 0 if another Input module should be used + */ +typedef int (*xmlInputMatchCallback) (char const *filename); +/** + * xmlInputOpenCallback: + * @filename: the filename or URI + * + * Callback used in the I/O Input API to open the resource + * + * Returns an Input context or NULL in case or error + */ +typedef void * (*xmlInputOpenCallback) (char const *filename); +/** + * xmlInputReadCallback: + * @context: an Input context + * @buffer: the buffer to store data read + * @len: the length of the buffer in bytes + * + * Callback used in the I/O Input API to read the resource + * + * Returns the number of bytes read or -1 in case of error + */ +typedef int (*xmlInputReadCallback) (void * context, char * buffer, int len); +/** + * xmlInputCloseCallback: + * @context: an Input context + * + * Callback used in the I/O Input API to close the resource + * + * Returns 0 or -1 in case of error + */ +typedef int (*xmlInputCloseCallback) (void * context); + +#ifdef LIBXML_OUTPUT_ENABLED +/* + * Those are the functions and datatypes for the library output + * I/O structures. + */ + +/** + * xmlOutputMatchCallback: + * @filename: the filename or URI + * + * Callback used in the I/O Output API to detect if the current handler + * can provide output functionality for this resource. + * + * Returns 1 if yes and 0 if another Output module should be used + */ +typedef int (*xmlOutputMatchCallback) (char const *filename); +/** + * xmlOutputOpenCallback: + * @filename: the filename or URI + * + * Callback used in the I/O Output API to open the resource + * + * Returns an Output context or NULL in case or error + */ +typedef void * (*xmlOutputOpenCallback) (char const *filename); +/** + * xmlOutputWriteCallback: + * @context: an Output context + * @buffer: the buffer of data to write + * @len: the length of the buffer in bytes + * + * Callback used in the I/O Output API to write to the resource + * + * Returns the number of bytes written or -1 in case of error + */ +typedef int (*xmlOutputWriteCallback) (void * context, const char * buffer, + int len); +/** + * xmlOutputCloseCallback: + * @context: an Output context + * + * Callback used in the I/O Output API to close the resource + * + * Returns 0 or -1 in case of error + */ +typedef int (*xmlOutputCloseCallback) (void * context); +#endif /* LIBXML_OUTPUT_ENABLED */ + +/** + * xmlParserInputBufferCreateFilenameFunc: + * @URI: the URI to read from + * @enc: the requested source encoding + * + * Signature for the function doing the lookup for a suitable input method + * corresponding to an URI. + * + * Returns the new xmlParserInputBufferPtr in case of success or NULL if no + * method was found. + */ +typedef xmlParserInputBufferPtr +(*xmlParserInputBufferCreateFilenameFunc)(const char *URI, xmlCharEncoding enc); + +/** + * xmlOutputBufferCreateFilenameFunc: + * @URI: the URI to write to + * @enc: the requested target encoding + * + * Signature for the function doing the lookup for a suitable output method + * corresponding to an URI. + * + * Returns the new xmlOutputBufferPtr in case of success or NULL if no + * method was found. + */ +typedef xmlOutputBufferPtr +(*xmlOutputBufferCreateFilenameFunc)(const char *URI, + xmlCharEncodingHandlerPtr encoder, int compression); + +struct _xmlParserInputBuffer { + void* context; + xmlInputReadCallback readcallback; + xmlInputCloseCallback closecallback; + + xmlCharEncodingHandlerPtr encoder; /* I18N conversions to UTF-8 */ + + xmlBufPtr buffer; /* Local buffer encoded in UTF-8 */ + xmlBufPtr raw; /* if encoder != NULL buffer for raw input */ + int compressed; /* -1=unknown, 0=not compressed, 1=compressed */ + int error; + unsigned long rawconsumed;/* amount consumed from raw */ +}; + + +#ifdef LIBXML_OUTPUT_ENABLED +struct _xmlOutputBuffer { + void* context; + xmlOutputWriteCallback writecallback; + xmlOutputCloseCallback closecallback; + + xmlCharEncodingHandlerPtr encoder; /* I18N conversions to UTF-8 */ + + xmlBufPtr buffer; /* Local buffer encoded in UTF-8 or ISOLatin */ + xmlBufPtr conv; /* if encoder != NULL buffer for output */ + int written; /* total number of byte written */ + int error; +}; +#endif /* LIBXML_OUTPUT_ENABLED */ + +/** DOC_DISABLE */ +#define XML_GLOBALS_IO \ + XML_OP(xmlParserInputBufferCreateFilenameValue, \ + xmlParserInputBufferCreateFilenameFunc, XML_DEPRECATED) \ + XML_OP(xmlOutputBufferCreateFilenameValue, \ + xmlOutputBufferCreateFilenameFunc, XML_DEPRECATED) + +#define XML_OP XML_DECLARE_GLOBAL +XML_GLOBALS_IO +#undef XML_OP + +#if defined(LIBXML_THREAD_ENABLED) && !defined(XML_GLOBALS_NO_REDEFINITION) + #define xmlParserInputBufferCreateFilenameValue \ + XML_GLOBAL_MACRO(xmlParserInputBufferCreateFilenameValue) + #define xmlOutputBufferCreateFilenameValue \ + XML_GLOBAL_MACRO(xmlOutputBufferCreateFilenameValue) +#endif +/** DOC_ENABLE */ + +/* + * Interfaces for input + */ +XMLPUBFUN void + xmlCleanupInputCallbacks (void); + +XMLPUBFUN int + xmlPopInputCallbacks (void); + +XMLPUBFUN void + xmlRegisterDefaultInputCallbacks (void); +XMLPUBFUN xmlParserInputBufferPtr + xmlAllocParserInputBuffer (xmlCharEncoding enc); + +XMLPUBFUN xmlParserInputBufferPtr + xmlParserInputBufferCreateFilename (const char *URI, + xmlCharEncoding enc); +XMLPUBFUN xmlParserInputBufferPtr + xmlParserInputBufferCreateFile (FILE *file, + xmlCharEncoding enc); +XMLPUBFUN xmlParserInputBufferPtr + xmlParserInputBufferCreateFd (int fd, + xmlCharEncoding enc); +XMLPUBFUN xmlParserInputBufferPtr + xmlParserInputBufferCreateMem (const char *mem, int size, + xmlCharEncoding enc); +XMLPUBFUN xmlParserInputBufferPtr + xmlParserInputBufferCreateStatic (const char *mem, int size, + xmlCharEncoding enc); +XMLPUBFUN xmlParserInputBufferPtr + xmlParserInputBufferCreateIO (xmlInputReadCallback ioread, + xmlInputCloseCallback ioclose, + void *ioctx, + xmlCharEncoding enc); +XMLPUBFUN int + xmlParserInputBufferRead (xmlParserInputBufferPtr in, + int len); +XMLPUBFUN int + xmlParserInputBufferGrow (xmlParserInputBufferPtr in, + int len); +XMLPUBFUN int + xmlParserInputBufferPush (xmlParserInputBufferPtr in, + int len, + const char *buf); +XMLPUBFUN void + xmlFreeParserInputBuffer (xmlParserInputBufferPtr in); +XMLPUBFUN char * + xmlParserGetDirectory (const char *filename); + +XMLPUBFUN int + xmlRegisterInputCallbacks (xmlInputMatchCallback matchFunc, + xmlInputOpenCallback openFunc, + xmlInputReadCallback readFunc, + xmlInputCloseCallback closeFunc); + +XMLPUBFUN xmlParserInputBufferPtr + __xmlParserInputBufferCreateFilename(const char *URI, + xmlCharEncoding enc); + +#ifdef LIBXML_OUTPUT_ENABLED +/* + * Interfaces for output + */ +XMLPUBFUN void + xmlCleanupOutputCallbacks (void); +XMLPUBFUN int + xmlPopOutputCallbacks (void); +XMLPUBFUN void + xmlRegisterDefaultOutputCallbacks(void); +XMLPUBFUN xmlOutputBufferPtr + xmlAllocOutputBuffer (xmlCharEncodingHandlerPtr encoder); + +XMLPUBFUN xmlOutputBufferPtr + xmlOutputBufferCreateFilename (const char *URI, + xmlCharEncodingHandlerPtr encoder, + int compression); + +XMLPUBFUN xmlOutputBufferPtr + xmlOutputBufferCreateFile (FILE *file, + xmlCharEncodingHandlerPtr encoder); + +XMLPUBFUN xmlOutputBufferPtr + xmlOutputBufferCreateBuffer (xmlBufferPtr buffer, + xmlCharEncodingHandlerPtr encoder); + +XMLPUBFUN xmlOutputBufferPtr + xmlOutputBufferCreateFd (int fd, + xmlCharEncodingHandlerPtr encoder); + +XMLPUBFUN xmlOutputBufferPtr + xmlOutputBufferCreateIO (xmlOutputWriteCallback iowrite, + xmlOutputCloseCallback ioclose, + void *ioctx, + xmlCharEncodingHandlerPtr encoder); + +/* Couple of APIs to get the output without digging into the buffers */ +XMLPUBFUN const xmlChar * + xmlOutputBufferGetContent (xmlOutputBufferPtr out); +XMLPUBFUN size_t + xmlOutputBufferGetSize (xmlOutputBufferPtr out); + +XMLPUBFUN int + xmlOutputBufferWrite (xmlOutputBufferPtr out, + int len, + const char *buf); +XMLPUBFUN int + xmlOutputBufferWriteString (xmlOutputBufferPtr out, + const char *str); +XMLPUBFUN int + xmlOutputBufferWriteEscape (xmlOutputBufferPtr out, + const xmlChar *str, + xmlCharEncodingOutputFunc escaping); + +XMLPUBFUN int + xmlOutputBufferFlush (xmlOutputBufferPtr out); +XMLPUBFUN int + xmlOutputBufferClose (xmlOutputBufferPtr out); + +XMLPUBFUN int + xmlRegisterOutputCallbacks (xmlOutputMatchCallback matchFunc, + xmlOutputOpenCallback openFunc, + xmlOutputWriteCallback writeFunc, + xmlOutputCloseCallback closeFunc); + +XMLPUBFUN xmlOutputBufferPtr + __xmlOutputBufferCreateFilename(const char *URI, + xmlCharEncodingHandlerPtr encoder, + int compression); + +#ifdef LIBXML_HTTP_ENABLED +/* This function only exists if HTTP support built into the library */ +XML_DEPRECATED +XMLPUBFUN void + xmlRegisterHTTPPostCallbacks (void ); +#endif /* LIBXML_HTTP_ENABLED */ + +#endif /* LIBXML_OUTPUT_ENABLED */ + +XML_DEPRECATED +XMLPUBFUN xmlParserInputPtr + xmlCheckHTTPInput (xmlParserCtxtPtr ctxt, + xmlParserInputPtr ret); + +/* + * A predefined entity loader disabling network accesses + */ +XMLPUBFUN xmlParserInputPtr + xmlNoNetExternalEntityLoader (const char *URL, + const char *ID, + xmlParserCtxtPtr ctxt); + +XML_DEPRECATED +XMLPUBFUN xmlChar * + xmlNormalizeWindowsPath (const xmlChar *path); + +XML_DEPRECATED +XMLPUBFUN int + xmlCheckFilename (const char *path); +/** + * Default 'file://' protocol callbacks + */ +XML_DEPRECATED +XMLPUBFUN int + xmlFileMatch (const char *filename); +XML_DEPRECATED +XMLPUBFUN void * + xmlFileOpen (const char *filename); +XML_DEPRECATED +XMLPUBFUN int + xmlFileRead (void * context, + char * buffer, + int len); +XML_DEPRECATED +XMLPUBFUN int + xmlFileClose (void * context); + +/** + * Default 'http://' protocol callbacks + */ +#ifdef LIBXML_HTTP_ENABLED +XML_DEPRECATED +XMLPUBFUN int + xmlIOHTTPMatch (const char *filename); +XML_DEPRECATED +XMLPUBFUN void * + xmlIOHTTPOpen (const char *filename); +#ifdef LIBXML_OUTPUT_ENABLED +XML_DEPRECATED +XMLPUBFUN void * + xmlIOHTTPOpenW (const char * post_uri, + int compression ); +#endif /* LIBXML_OUTPUT_ENABLED */ +XML_DEPRECATED +XMLPUBFUN int + xmlIOHTTPRead (void * context, + char * buffer, + int len); +XML_DEPRECATED +XMLPUBFUN int + xmlIOHTTPClose (void * context); +#endif /* LIBXML_HTTP_ENABLED */ + +/** + * Default 'ftp://' protocol callbacks + */ +#if defined(LIBXML_FTP_ENABLED) +XML_DEPRECATED +XMLPUBFUN int + xmlIOFTPMatch (const char *filename); +XML_DEPRECATED +XMLPUBFUN void * + xmlIOFTPOpen (const char *filename); +XML_DEPRECATED +XMLPUBFUN int + xmlIOFTPRead (void * context, + char * buffer, + int len); +XML_DEPRECATED +XMLPUBFUN int + xmlIOFTPClose (void * context); +#endif /* defined(LIBXML_FTP_ENABLED) */ + +XMLPUBFUN xmlParserInputBufferCreateFilenameFunc + xmlParserInputBufferCreateFilenameDefault( + xmlParserInputBufferCreateFilenameFunc func); +XMLPUBFUN xmlOutputBufferCreateFilenameFunc + xmlOutputBufferCreateFilenameDefault( + xmlOutputBufferCreateFilenameFunc func); +XML_DEPRECATED +XMLPUBFUN xmlOutputBufferCreateFilenameFunc + xmlThrDefOutputBufferCreateFilenameDefault( + xmlOutputBufferCreateFilenameFunc func); +XML_DEPRECATED +XMLPUBFUN xmlParserInputBufferCreateFilenameFunc + xmlThrDefParserInputBufferCreateFilenameDefault( + xmlParserInputBufferCreateFilenameFunc func); + +#ifdef __cplusplus +} +#endif + +#endif /* __XML_IO_H__ */ diff --git a/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/include/libxml2/libxml/xmlautomata.h b/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/include/libxml2/libxml/xmlautomata.h new file mode 100644 index 0000000000000000000000000000000000000000..ea38eb37f09fe43a34d0d3f6fedbb8313d9b839f --- /dev/null +++ b/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/include/libxml2/libxml/xmlautomata.h @@ -0,0 +1,146 @@ +/* + * Summary: API to build regexp automata + * Description: the API to build regexp automata + * + * Copy: See Copyright for the status of this software. + * + * Author: Daniel Veillard + */ + +#ifndef __XML_AUTOMATA_H__ +#define __XML_AUTOMATA_H__ + +#include + +#ifdef LIBXML_REGEXP_ENABLED +#ifdef LIBXML_AUTOMATA_ENABLED + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * xmlAutomataPtr: + * + * A libxml automata description, It can be compiled into a regexp + */ +typedef struct _xmlAutomata xmlAutomata; +typedef xmlAutomata *xmlAutomataPtr; + +/** + * xmlAutomataStatePtr: + * + * A state int the automata description, + */ +typedef struct _xmlAutomataState xmlAutomataState; +typedef xmlAutomataState *xmlAutomataStatePtr; + +/* + * Building API + */ +XMLPUBFUN xmlAutomataPtr + xmlNewAutomata (void); +XMLPUBFUN void + xmlFreeAutomata (xmlAutomataPtr am); + +XMLPUBFUN xmlAutomataStatePtr + xmlAutomataGetInitState (xmlAutomataPtr am); +XMLPUBFUN int + xmlAutomataSetFinalState (xmlAutomataPtr am, + xmlAutomataStatePtr state); +XMLPUBFUN xmlAutomataStatePtr + xmlAutomataNewState (xmlAutomataPtr am); +XMLPUBFUN xmlAutomataStatePtr + xmlAutomataNewTransition (xmlAutomataPtr am, + xmlAutomataStatePtr from, + xmlAutomataStatePtr to, + const xmlChar *token, + void *data); +XMLPUBFUN xmlAutomataStatePtr + xmlAutomataNewTransition2 (xmlAutomataPtr am, + xmlAutomataStatePtr from, + xmlAutomataStatePtr to, + const xmlChar *token, + const xmlChar *token2, + void *data); +XMLPUBFUN xmlAutomataStatePtr + xmlAutomataNewNegTrans (xmlAutomataPtr am, + xmlAutomataStatePtr from, + xmlAutomataStatePtr to, + const xmlChar *token, + const xmlChar *token2, + void *data); + +XMLPUBFUN xmlAutomataStatePtr + xmlAutomataNewCountTrans (xmlAutomataPtr am, + xmlAutomataStatePtr from, + xmlAutomataStatePtr to, + const xmlChar *token, + int min, + int max, + void *data); +XMLPUBFUN xmlAutomataStatePtr + xmlAutomataNewCountTrans2 (xmlAutomataPtr am, + xmlAutomataStatePtr from, + xmlAutomataStatePtr to, + const xmlChar *token, + const xmlChar *token2, + int min, + int max, + void *data); +XMLPUBFUN xmlAutomataStatePtr + xmlAutomataNewOnceTrans (xmlAutomataPtr am, + xmlAutomataStatePtr from, + xmlAutomataStatePtr to, + const xmlChar *token, + int min, + int max, + void *data); +XMLPUBFUN xmlAutomataStatePtr + xmlAutomataNewOnceTrans2 (xmlAutomataPtr am, + xmlAutomataStatePtr from, + xmlAutomataStatePtr to, + const xmlChar *token, + const xmlChar *token2, + int min, + int max, + void *data); +XMLPUBFUN xmlAutomataStatePtr + xmlAutomataNewAllTrans (xmlAutomataPtr am, + xmlAutomataStatePtr from, + xmlAutomataStatePtr to, + int lax); +XMLPUBFUN xmlAutomataStatePtr + xmlAutomataNewEpsilon (xmlAutomataPtr am, + xmlAutomataStatePtr from, + xmlAutomataStatePtr to); +XMLPUBFUN xmlAutomataStatePtr + xmlAutomataNewCountedTrans (xmlAutomataPtr am, + xmlAutomataStatePtr from, + xmlAutomataStatePtr to, + int counter); +XMLPUBFUN xmlAutomataStatePtr + xmlAutomataNewCounterTrans (xmlAutomataPtr am, + xmlAutomataStatePtr from, + xmlAutomataStatePtr to, + int counter); +XMLPUBFUN int + xmlAutomataNewCounter (xmlAutomataPtr am, + int min, + int max); + +XMLPUBFUN struct _xmlRegexp * + xmlAutomataCompile (xmlAutomataPtr am); +XMLPUBFUN int + xmlAutomataIsDeterminist (xmlAutomataPtr am); + +#ifdef __cplusplus +} +#endif + +#endif /* LIBXML_AUTOMATA_ENABLED */ +#endif /* LIBXML_REGEXP_ENABLED */ + +#endif /* __XML_AUTOMATA_H__ */ diff --git a/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/include/libxml2/libxml/xmlerror.h b/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/include/libxml2/libxml/xmlerror.h new file mode 100644 index 0000000000000000000000000000000000000000..36381bec51e6ba9f27985c8e90a6c1598ead78ee --- /dev/null +++ b/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/include/libxml2/libxml/xmlerror.h @@ -0,0 +1,962 @@ +/* + * Summary: error handling + * Description: the API used to report errors + * + * Copy: See Copyright for the status of this software. + * + * Author: Daniel Veillard + */ + +#ifndef __XML_ERROR_H__ +#define __XML_ERROR_H__ + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * xmlErrorLevel: + * + * Indicates the level of an error + */ +typedef enum { + XML_ERR_NONE = 0, + XML_ERR_WARNING = 1, /* A simple warning */ + XML_ERR_ERROR = 2, /* A recoverable error */ + XML_ERR_FATAL = 3 /* A fatal error */ +} xmlErrorLevel; + +/** + * xmlErrorDomain: + * + * Indicates where an error may have come from + */ +typedef enum { + XML_FROM_NONE = 0, + XML_FROM_PARSER, /* The XML parser */ + XML_FROM_TREE, /* The tree module */ + XML_FROM_NAMESPACE, /* The XML Namespace module */ + XML_FROM_DTD, /* The XML DTD validation with parser context*/ + XML_FROM_HTML, /* The HTML parser */ + XML_FROM_MEMORY, /* The memory allocator */ + XML_FROM_OUTPUT, /* The serialization code */ + XML_FROM_IO, /* The Input/Output stack */ + XML_FROM_FTP, /* The FTP module */ + XML_FROM_HTTP, /* The HTTP module */ + XML_FROM_XINCLUDE, /* The XInclude processing */ + XML_FROM_XPATH, /* The XPath module */ + XML_FROM_XPOINTER, /* The XPointer module */ + XML_FROM_REGEXP, /* The regular expressions module */ + XML_FROM_DATATYPE, /* The W3C XML Schemas Datatype module */ + XML_FROM_SCHEMASP, /* The W3C XML Schemas parser module */ + XML_FROM_SCHEMASV, /* The W3C XML Schemas validation module */ + XML_FROM_RELAXNGP, /* The Relax-NG parser module */ + XML_FROM_RELAXNGV, /* The Relax-NG validator module */ + XML_FROM_CATALOG, /* The Catalog module */ + XML_FROM_C14N, /* The Canonicalization module */ + XML_FROM_XSLT, /* The XSLT engine from libxslt */ + XML_FROM_VALID, /* The XML DTD validation with valid context */ + XML_FROM_CHECK, /* The error checking module */ + XML_FROM_WRITER, /* The xmlwriter module */ + XML_FROM_MODULE, /* The dynamically loaded module module*/ + XML_FROM_I18N, /* The module handling character conversion */ + XML_FROM_SCHEMATRONV,/* The Schematron validator module */ + XML_FROM_BUFFER, /* The buffers module */ + XML_FROM_URI /* The URI module */ +} xmlErrorDomain; + +/** + * xmlError: + * + * An XML Error instance. + */ + +typedef struct _xmlError xmlError; +typedef xmlError *xmlErrorPtr; +struct _xmlError { + int domain; /* What part of the library raised this error */ + int code; /* The error code, e.g. an xmlParserError */ + char *message;/* human-readable informative error message */ + xmlErrorLevel level;/* how consequent is the error */ + char *file; /* the filename */ + int line; /* the line number if available */ + char *str1; /* extra string information */ + char *str2; /* extra string information */ + char *str3; /* extra string information */ + int int1; /* extra number information */ + int int2; /* error column # or 0 if N/A (todo: rename field when we would brk ABI) */ + void *ctxt; /* the parser context if available */ + void *node; /* the node in the tree */ +}; + +/** + * xmlParserError: + * + * This is an error that the XML (or HTML) parser can generate + */ +typedef enum { + XML_ERR_OK = 0, + XML_ERR_INTERNAL_ERROR, /* 1 */ + XML_ERR_NO_MEMORY, /* 2 */ + XML_ERR_DOCUMENT_START, /* 3 */ + XML_ERR_DOCUMENT_EMPTY, /* 4 */ + XML_ERR_DOCUMENT_END, /* 5 */ + XML_ERR_INVALID_HEX_CHARREF, /* 6 */ + XML_ERR_INVALID_DEC_CHARREF, /* 7 */ + XML_ERR_INVALID_CHARREF, /* 8 */ + XML_ERR_INVALID_CHAR, /* 9 */ + XML_ERR_CHARREF_AT_EOF, /* 10 */ + XML_ERR_CHARREF_IN_PROLOG, /* 11 */ + XML_ERR_CHARREF_IN_EPILOG, /* 12 */ + XML_ERR_CHARREF_IN_DTD, /* 13 */ + XML_ERR_ENTITYREF_AT_EOF, /* 14 */ + XML_ERR_ENTITYREF_IN_PROLOG, /* 15 */ + XML_ERR_ENTITYREF_IN_EPILOG, /* 16 */ + XML_ERR_ENTITYREF_IN_DTD, /* 17 */ + XML_ERR_PEREF_AT_EOF, /* 18 */ + XML_ERR_PEREF_IN_PROLOG, /* 19 */ + XML_ERR_PEREF_IN_EPILOG, /* 20 */ + XML_ERR_PEREF_IN_INT_SUBSET, /* 21 */ + XML_ERR_ENTITYREF_NO_NAME, /* 22 */ + XML_ERR_ENTITYREF_SEMICOL_MISSING, /* 23 */ + XML_ERR_PEREF_NO_NAME, /* 24 */ + XML_ERR_PEREF_SEMICOL_MISSING, /* 25 */ + XML_ERR_UNDECLARED_ENTITY, /* 26 */ + XML_WAR_UNDECLARED_ENTITY, /* 27 */ + XML_ERR_UNPARSED_ENTITY, /* 28 */ + XML_ERR_ENTITY_IS_EXTERNAL, /* 29 */ + XML_ERR_ENTITY_IS_PARAMETER, /* 30 */ + XML_ERR_UNKNOWN_ENCODING, /* 31 */ + XML_ERR_UNSUPPORTED_ENCODING, /* 32 */ + XML_ERR_STRING_NOT_STARTED, /* 33 */ + XML_ERR_STRING_NOT_CLOSED, /* 34 */ + XML_ERR_NS_DECL_ERROR, /* 35 */ + XML_ERR_ENTITY_NOT_STARTED, /* 36 */ + XML_ERR_ENTITY_NOT_FINISHED, /* 37 */ + XML_ERR_LT_IN_ATTRIBUTE, /* 38 */ + XML_ERR_ATTRIBUTE_NOT_STARTED, /* 39 */ + XML_ERR_ATTRIBUTE_NOT_FINISHED, /* 40 */ + XML_ERR_ATTRIBUTE_WITHOUT_VALUE, /* 41 */ + XML_ERR_ATTRIBUTE_REDEFINED, /* 42 */ + XML_ERR_LITERAL_NOT_STARTED, /* 43 */ + XML_ERR_LITERAL_NOT_FINISHED, /* 44 */ + XML_ERR_COMMENT_NOT_FINISHED, /* 45 */ + XML_ERR_PI_NOT_STARTED, /* 46 */ + XML_ERR_PI_NOT_FINISHED, /* 47 */ + XML_ERR_NOTATION_NOT_STARTED, /* 48 */ + XML_ERR_NOTATION_NOT_FINISHED, /* 49 */ + XML_ERR_ATTLIST_NOT_STARTED, /* 50 */ + XML_ERR_ATTLIST_NOT_FINISHED, /* 51 */ + XML_ERR_MIXED_NOT_STARTED, /* 52 */ + XML_ERR_MIXED_NOT_FINISHED, /* 53 */ + XML_ERR_ELEMCONTENT_NOT_STARTED, /* 54 */ + XML_ERR_ELEMCONTENT_NOT_FINISHED, /* 55 */ + XML_ERR_XMLDECL_NOT_STARTED, /* 56 */ + XML_ERR_XMLDECL_NOT_FINISHED, /* 57 */ + XML_ERR_CONDSEC_NOT_STARTED, /* 58 */ + XML_ERR_CONDSEC_NOT_FINISHED, /* 59 */ + XML_ERR_EXT_SUBSET_NOT_FINISHED, /* 60 */ + XML_ERR_DOCTYPE_NOT_FINISHED, /* 61 */ + XML_ERR_MISPLACED_CDATA_END, /* 62 */ + XML_ERR_CDATA_NOT_FINISHED, /* 63 */ + XML_ERR_RESERVED_XML_NAME, /* 64 */ + XML_ERR_SPACE_REQUIRED, /* 65 */ + XML_ERR_SEPARATOR_REQUIRED, /* 66 */ + XML_ERR_NMTOKEN_REQUIRED, /* 67 */ + XML_ERR_NAME_REQUIRED, /* 68 */ + XML_ERR_PCDATA_REQUIRED, /* 69 */ + XML_ERR_URI_REQUIRED, /* 70 */ + XML_ERR_PUBID_REQUIRED, /* 71 */ + XML_ERR_LT_REQUIRED, /* 72 */ + XML_ERR_GT_REQUIRED, /* 73 */ + XML_ERR_LTSLASH_REQUIRED, /* 74 */ + XML_ERR_EQUAL_REQUIRED, /* 75 */ + XML_ERR_TAG_NAME_MISMATCH, /* 76 */ + XML_ERR_TAG_NOT_FINISHED, /* 77 */ + XML_ERR_STANDALONE_VALUE, /* 78 */ + XML_ERR_ENCODING_NAME, /* 79 */ + XML_ERR_HYPHEN_IN_COMMENT, /* 80 */ + XML_ERR_INVALID_ENCODING, /* 81 */ + XML_ERR_EXT_ENTITY_STANDALONE, /* 82 */ + XML_ERR_CONDSEC_INVALID, /* 83 */ + XML_ERR_VALUE_REQUIRED, /* 84 */ + XML_ERR_NOT_WELL_BALANCED, /* 85 */ + XML_ERR_EXTRA_CONTENT, /* 86 */ + XML_ERR_ENTITY_CHAR_ERROR, /* 87 */ + XML_ERR_ENTITY_PE_INTERNAL, /* 88 */ + XML_ERR_ENTITY_LOOP, /* 89 */ + XML_ERR_ENTITY_BOUNDARY, /* 90 */ + XML_ERR_INVALID_URI, /* 91 */ + XML_ERR_URI_FRAGMENT, /* 92 */ + XML_WAR_CATALOG_PI, /* 93 */ + XML_ERR_NO_DTD, /* 94 */ + XML_ERR_CONDSEC_INVALID_KEYWORD, /* 95 */ + XML_ERR_VERSION_MISSING, /* 96 */ + XML_WAR_UNKNOWN_VERSION, /* 97 */ + XML_WAR_LANG_VALUE, /* 98 */ + XML_WAR_NS_URI, /* 99 */ + XML_WAR_NS_URI_RELATIVE, /* 100 */ + XML_ERR_MISSING_ENCODING, /* 101 */ + XML_WAR_SPACE_VALUE, /* 102 */ + XML_ERR_NOT_STANDALONE, /* 103 */ + XML_ERR_ENTITY_PROCESSING, /* 104 */ + XML_ERR_NOTATION_PROCESSING, /* 105 */ + XML_WAR_NS_COLUMN, /* 106 */ + XML_WAR_ENTITY_REDEFINED, /* 107 */ + XML_ERR_UNKNOWN_VERSION, /* 108 */ + XML_ERR_VERSION_MISMATCH, /* 109 */ + XML_ERR_NAME_TOO_LONG, /* 110 */ + XML_ERR_USER_STOP, /* 111 */ + XML_ERR_COMMENT_ABRUPTLY_ENDED, /* 112 */ + XML_WAR_ENCODING_MISMATCH, /* 113 */ + XML_ERR_RESOURCE_LIMIT, /* 114 */ + XML_ERR_ARGUMENT, /* 115 */ + XML_ERR_SYSTEM, /* 116 */ + XML_ERR_REDECL_PREDEF_ENTITY, /* 117 */ + XML_ERR_INT_SUBSET_NOT_FINISHED, /* 118 */ + XML_NS_ERR_XML_NAMESPACE = 200, + XML_NS_ERR_UNDEFINED_NAMESPACE, /* 201 */ + XML_NS_ERR_QNAME, /* 202 */ + XML_NS_ERR_ATTRIBUTE_REDEFINED, /* 203 */ + XML_NS_ERR_EMPTY, /* 204 */ + XML_NS_ERR_COLON, /* 205 */ + XML_DTD_ATTRIBUTE_DEFAULT = 500, + XML_DTD_ATTRIBUTE_REDEFINED, /* 501 */ + XML_DTD_ATTRIBUTE_VALUE, /* 502 */ + XML_DTD_CONTENT_ERROR, /* 503 */ + XML_DTD_CONTENT_MODEL, /* 504 */ + XML_DTD_CONTENT_NOT_DETERMINIST, /* 505 */ + XML_DTD_DIFFERENT_PREFIX, /* 506 */ + XML_DTD_ELEM_DEFAULT_NAMESPACE, /* 507 */ + XML_DTD_ELEM_NAMESPACE, /* 508 */ + XML_DTD_ELEM_REDEFINED, /* 509 */ + XML_DTD_EMPTY_NOTATION, /* 510 */ + XML_DTD_ENTITY_TYPE, /* 511 */ + XML_DTD_ID_FIXED, /* 512 */ + XML_DTD_ID_REDEFINED, /* 513 */ + XML_DTD_ID_SUBSET, /* 514 */ + XML_DTD_INVALID_CHILD, /* 515 */ + XML_DTD_INVALID_DEFAULT, /* 516 */ + XML_DTD_LOAD_ERROR, /* 517 */ + XML_DTD_MISSING_ATTRIBUTE, /* 518 */ + XML_DTD_MIXED_CORRUPT, /* 519 */ + XML_DTD_MULTIPLE_ID, /* 520 */ + XML_DTD_NO_DOC, /* 521 */ + XML_DTD_NO_DTD, /* 522 */ + XML_DTD_NO_ELEM_NAME, /* 523 */ + XML_DTD_NO_PREFIX, /* 524 */ + XML_DTD_NO_ROOT, /* 525 */ + XML_DTD_NOTATION_REDEFINED, /* 526 */ + XML_DTD_NOTATION_VALUE, /* 527 */ + XML_DTD_NOT_EMPTY, /* 528 */ + XML_DTD_NOT_PCDATA, /* 529 */ + XML_DTD_NOT_STANDALONE, /* 530 */ + XML_DTD_ROOT_NAME, /* 531 */ + XML_DTD_STANDALONE_WHITE_SPACE, /* 532 */ + XML_DTD_UNKNOWN_ATTRIBUTE, /* 533 */ + XML_DTD_UNKNOWN_ELEM, /* 534 */ + XML_DTD_UNKNOWN_ENTITY, /* 535 */ + XML_DTD_UNKNOWN_ID, /* 536 */ + XML_DTD_UNKNOWN_NOTATION, /* 537 */ + XML_DTD_STANDALONE_DEFAULTED, /* 538 */ + XML_DTD_XMLID_VALUE, /* 539 */ + XML_DTD_XMLID_TYPE, /* 540 */ + XML_DTD_DUP_TOKEN, /* 541 */ + XML_HTML_STRUCURE_ERROR = 800, + XML_HTML_UNKNOWN_TAG, /* 801 */ + XML_HTML_INCORRECTLY_OPENED_COMMENT, /* 802 */ + XML_RNGP_ANYNAME_ATTR_ANCESTOR = 1000, + XML_RNGP_ATTR_CONFLICT, /* 1001 */ + XML_RNGP_ATTRIBUTE_CHILDREN, /* 1002 */ + XML_RNGP_ATTRIBUTE_CONTENT, /* 1003 */ + XML_RNGP_ATTRIBUTE_EMPTY, /* 1004 */ + XML_RNGP_ATTRIBUTE_NOOP, /* 1005 */ + XML_RNGP_CHOICE_CONTENT, /* 1006 */ + XML_RNGP_CHOICE_EMPTY, /* 1007 */ + XML_RNGP_CREATE_FAILURE, /* 1008 */ + XML_RNGP_DATA_CONTENT, /* 1009 */ + XML_RNGP_DEF_CHOICE_AND_INTERLEAVE, /* 1010 */ + XML_RNGP_DEFINE_CREATE_FAILED, /* 1011 */ + XML_RNGP_DEFINE_EMPTY, /* 1012 */ + XML_RNGP_DEFINE_MISSING, /* 1013 */ + XML_RNGP_DEFINE_NAME_MISSING, /* 1014 */ + XML_RNGP_ELEM_CONTENT_EMPTY, /* 1015 */ + XML_RNGP_ELEM_CONTENT_ERROR, /* 1016 */ + XML_RNGP_ELEMENT_EMPTY, /* 1017 */ + XML_RNGP_ELEMENT_CONTENT, /* 1018 */ + XML_RNGP_ELEMENT_NAME, /* 1019 */ + XML_RNGP_ELEMENT_NO_CONTENT, /* 1020 */ + XML_RNGP_ELEM_TEXT_CONFLICT, /* 1021 */ + XML_RNGP_EMPTY, /* 1022 */ + XML_RNGP_EMPTY_CONSTRUCT, /* 1023 */ + XML_RNGP_EMPTY_CONTENT, /* 1024 */ + XML_RNGP_EMPTY_NOT_EMPTY, /* 1025 */ + XML_RNGP_ERROR_TYPE_LIB, /* 1026 */ + XML_RNGP_EXCEPT_EMPTY, /* 1027 */ + XML_RNGP_EXCEPT_MISSING, /* 1028 */ + XML_RNGP_EXCEPT_MULTIPLE, /* 1029 */ + XML_RNGP_EXCEPT_NO_CONTENT, /* 1030 */ + XML_RNGP_EXTERNALREF_EMTPY, /* 1031 */ + XML_RNGP_EXTERNAL_REF_FAILURE, /* 1032 */ + XML_RNGP_EXTERNALREF_RECURSE, /* 1033 */ + XML_RNGP_FORBIDDEN_ATTRIBUTE, /* 1034 */ + XML_RNGP_FOREIGN_ELEMENT, /* 1035 */ + XML_RNGP_GRAMMAR_CONTENT, /* 1036 */ + XML_RNGP_GRAMMAR_EMPTY, /* 1037 */ + XML_RNGP_GRAMMAR_MISSING, /* 1038 */ + XML_RNGP_GRAMMAR_NO_START, /* 1039 */ + XML_RNGP_GROUP_ATTR_CONFLICT, /* 1040 */ + XML_RNGP_HREF_ERROR, /* 1041 */ + XML_RNGP_INCLUDE_EMPTY, /* 1042 */ + XML_RNGP_INCLUDE_FAILURE, /* 1043 */ + XML_RNGP_INCLUDE_RECURSE, /* 1044 */ + XML_RNGP_INTERLEAVE_ADD, /* 1045 */ + XML_RNGP_INTERLEAVE_CREATE_FAILED, /* 1046 */ + XML_RNGP_INTERLEAVE_EMPTY, /* 1047 */ + XML_RNGP_INTERLEAVE_NO_CONTENT, /* 1048 */ + XML_RNGP_INVALID_DEFINE_NAME, /* 1049 */ + XML_RNGP_INVALID_URI, /* 1050 */ + XML_RNGP_INVALID_VALUE, /* 1051 */ + XML_RNGP_MISSING_HREF, /* 1052 */ + XML_RNGP_NAME_MISSING, /* 1053 */ + XML_RNGP_NEED_COMBINE, /* 1054 */ + XML_RNGP_NOTALLOWED_NOT_EMPTY, /* 1055 */ + XML_RNGP_NSNAME_ATTR_ANCESTOR, /* 1056 */ + XML_RNGP_NSNAME_NO_NS, /* 1057 */ + XML_RNGP_PARAM_FORBIDDEN, /* 1058 */ + XML_RNGP_PARAM_NAME_MISSING, /* 1059 */ + XML_RNGP_PARENTREF_CREATE_FAILED, /* 1060 */ + XML_RNGP_PARENTREF_NAME_INVALID, /* 1061 */ + XML_RNGP_PARENTREF_NO_NAME, /* 1062 */ + XML_RNGP_PARENTREF_NO_PARENT, /* 1063 */ + XML_RNGP_PARENTREF_NOT_EMPTY, /* 1064 */ + XML_RNGP_PARSE_ERROR, /* 1065 */ + XML_RNGP_PAT_ANYNAME_EXCEPT_ANYNAME, /* 1066 */ + XML_RNGP_PAT_ATTR_ATTR, /* 1067 */ + XML_RNGP_PAT_ATTR_ELEM, /* 1068 */ + XML_RNGP_PAT_DATA_EXCEPT_ATTR, /* 1069 */ + XML_RNGP_PAT_DATA_EXCEPT_ELEM, /* 1070 */ + XML_RNGP_PAT_DATA_EXCEPT_EMPTY, /* 1071 */ + XML_RNGP_PAT_DATA_EXCEPT_GROUP, /* 1072 */ + XML_RNGP_PAT_DATA_EXCEPT_INTERLEAVE, /* 1073 */ + XML_RNGP_PAT_DATA_EXCEPT_LIST, /* 1074 */ + XML_RNGP_PAT_DATA_EXCEPT_ONEMORE, /* 1075 */ + XML_RNGP_PAT_DATA_EXCEPT_REF, /* 1076 */ + XML_RNGP_PAT_DATA_EXCEPT_TEXT, /* 1077 */ + XML_RNGP_PAT_LIST_ATTR, /* 1078 */ + XML_RNGP_PAT_LIST_ELEM, /* 1079 */ + XML_RNGP_PAT_LIST_INTERLEAVE, /* 1080 */ + XML_RNGP_PAT_LIST_LIST, /* 1081 */ + XML_RNGP_PAT_LIST_REF, /* 1082 */ + XML_RNGP_PAT_LIST_TEXT, /* 1083 */ + XML_RNGP_PAT_NSNAME_EXCEPT_ANYNAME, /* 1084 */ + XML_RNGP_PAT_NSNAME_EXCEPT_NSNAME, /* 1085 */ + XML_RNGP_PAT_ONEMORE_GROUP_ATTR, /* 1086 */ + XML_RNGP_PAT_ONEMORE_INTERLEAVE_ATTR, /* 1087 */ + XML_RNGP_PAT_START_ATTR, /* 1088 */ + XML_RNGP_PAT_START_DATA, /* 1089 */ + XML_RNGP_PAT_START_EMPTY, /* 1090 */ + XML_RNGP_PAT_START_GROUP, /* 1091 */ + XML_RNGP_PAT_START_INTERLEAVE, /* 1092 */ + XML_RNGP_PAT_START_LIST, /* 1093 */ + XML_RNGP_PAT_START_ONEMORE, /* 1094 */ + XML_RNGP_PAT_START_TEXT, /* 1095 */ + XML_RNGP_PAT_START_VALUE, /* 1096 */ + XML_RNGP_PREFIX_UNDEFINED, /* 1097 */ + XML_RNGP_REF_CREATE_FAILED, /* 1098 */ + XML_RNGP_REF_CYCLE, /* 1099 */ + XML_RNGP_REF_NAME_INVALID, /* 1100 */ + XML_RNGP_REF_NO_DEF, /* 1101 */ + XML_RNGP_REF_NO_NAME, /* 1102 */ + XML_RNGP_REF_NOT_EMPTY, /* 1103 */ + XML_RNGP_START_CHOICE_AND_INTERLEAVE, /* 1104 */ + XML_RNGP_START_CONTENT, /* 1105 */ + XML_RNGP_START_EMPTY, /* 1106 */ + XML_RNGP_START_MISSING, /* 1107 */ + XML_RNGP_TEXT_EXPECTED, /* 1108 */ + XML_RNGP_TEXT_HAS_CHILD, /* 1109 */ + XML_RNGP_TYPE_MISSING, /* 1110 */ + XML_RNGP_TYPE_NOT_FOUND, /* 1111 */ + XML_RNGP_TYPE_VALUE, /* 1112 */ + XML_RNGP_UNKNOWN_ATTRIBUTE, /* 1113 */ + XML_RNGP_UNKNOWN_COMBINE, /* 1114 */ + XML_RNGP_UNKNOWN_CONSTRUCT, /* 1115 */ + XML_RNGP_UNKNOWN_TYPE_LIB, /* 1116 */ + XML_RNGP_URI_FRAGMENT, /* 1117 */ + XML_RNGP_URI_NOT_ABSOLUTE, /* 1118 */ + XML_RNGP_VALUE_EMPTY, /* 1119 */ + XML_RNGP_VALUE_NO_CONTENT, /* 1120 */ + XML_RNGP_XMLNS_NAME, /* 1121 */ + XML_RNGP_XML_NS, /* 1122 */ + XML_XPATH_EXPRESSION_OK = 1200, + XML_XPATH_NUMBER_ERROR, /* 1201 */ + XML_XPATH_UNFINISHED_LITERAL_ERROR, /* 1202 */ + XML_XPATH_START_LITERAL_ERROR, /* 1203 */ + XML_XPATH_VARIABLE_REF_ERROR, /* 1204 */ + XML_XPATH_UNDEF_VARIABLE_ERROR, /* 1205 */ + XML_XPATH_INVALID_PREDICATE_ERROR, /* 1206 */ + XML_XPATH_EXPR_ERROR, /* 1207 */ + XML_XPATH_UNCLOSED_ERROR, /* 1208 */ + XML_XPATH_UNKNOWN_FUNC_ERROR, /* 1209 */ + XML_XPATH_INVALID_OPERAND, /* 1210 */ + XML_XPATH_INVALID_TYPE, /* 1211 */ + XML_XPATH_INVALID_ARITY, /* 1212 */ + XML_XPATH_INVALID_CTXT_SIZE, /* 1213 */ + XML_XPATH_INVALID_CTXT_POSITION, /* 1214 */ + XML_XPATH_MEMORY_ERROR, /* 1215 */ + XML_XPTR_SYNTAX_ERROR, /* 1216 */ + XML_XPTR_RESOURCE_ERROR, /* 1217 */ + XML_XPTR_SUB_RESOURCE_ERROR, /* 1218 */ + XML_XPATH_UNDEF_PREFIX_ERROR, /* 1219 */ + XML_XPATH_ENCODING_ERROR, /* 1220 */ + XML_XPATH_INVALID_CHAR_ERROR, /* 1221 */ + XML_TREE_INVALID_HEX = 1300, + XML_TREE_INVALID_DEC, /* 1301 */ + XML_TREE_UNTERMINATED_ENTITY, /* 1302 */ + XML_TREE_NOT_UTF8, /* 1303 */ + XML_SAVE_NOT_UTF8 = 1400, + XML_SAVE_CHAR_INVALID, /* 1401 */ + XML_SAVE_NO_DOCTYPE, /* 1402 */ + XML_SAVE_UNKNOWN_ENCODING, /* 1403 */ + XML_REGEXP_COMPILE_ERROR = 1450, + XML_IO_UNKNOWN = 1500, + XML_IO_EACCES, /* 1501 */ + XML_IO_EAGAIN, /* 1502 */ + XML_IO_EBADF, /* 1503 */ + XML_IO_EBADMSG, /* 1504 */ + XML_IO_EBUSY, /* 1505 */ + XML_IO_ECANCELED, /* 1506 */ + XML_IO_ECHILD, /* 1507 */ + XML_IO_EDEADLK, /* 1508 */ + XML_IO_EDOM, /* 1509 */ + XML_IO_EEXIST, /* 1510 */ + XML_IO_EFAULT, /* 1511 */ + XML_IO_EFBIG, /* 1512 */ + XML_IO_EINPROGRESS, /* 1513 */ + XML_IO_EINTR, /* 1514 */ + XML_IO_EINVAL, /* 1515 */ + XML_IO_EIO, /* 1516 */ + XML_IO_EISDIR, /* 1517 */ + XML_IO_EMFILE, /* 1518 */ + XML_IO_EMLINK, /* 1519 */ + XML_IO_EMSGSIZE, /* 1520 */ + XML_IO_ENAMETOOLONG, /* 1521 */ + XML_IO_ENFILE, /* 1522 */ + XML_IO_ENODEV, /* 1523 */ + XML_IO_ENOENT, /* 1524 */ + XML_IO_ENOEXEC, /* 1525 */ + XML_IO_ENOLCK, /* 1526 */ + XML_IO_ENOMEM, /* 1527 */ + XML_IO_ENOSPC, /* 1528 */ + XML_IO_ENOSYS, /* 1529 */ + XML_IO_ENOTDIR, /* 1530 */ + XML_IO_ENOTEMPTY, /* 1531 */ + XML_IO_ENOTSUP, /* 1532 */ + XML_IO_ENOTTY, /* 1533 */ + XML_IO_ENXIO, /* 1534 */ + XML_IO_EPERM, /* 1535 */ + XML_IO_EPIPE, /* 1536 */ + XML_IO_ERANGE, /* 1537 */ + XML_IO_EROFS, /* 1538 */ + XML_IO_ESPIPE, /* 1539 */ + XML_IO_ESRCH, /* 1540 */ + XML_IO_ETIMEDOUT, /* 1541 */ + XML_IO_EXDEV, /* 1542 */ + XML_IO_NETWORK_ATTEMPT, /* 1543 */ + XML_IO_ENCODER, /* 1544 */ + XML_IO_FLUSH, /* 1545 */ + XML_IO_WRITE, /* 1546 */ + XML_IO_NO_INPUT, /* 1547 */ + XML_IO_BUFFER_FULL, /* 1548 */ + XML_IO_LOAD_ERROR, /* 1549 */ + XML_IO_ENOTSOCK, /* 1550 */ + XML_IO_EISCONN, /* 1551 */ + XML_IO_ECONNREFUSED, /* 1552 */ + XML_IO_ENETUNREACH, /* 1553 */ + XML_IO_EADDRINUSE, /* 1554 */ + XML_IO_EALREADY, /* 1555 */ + XML_IO_EAFNOSUPPORT, /* 1556 */ + XML_IO_UNSUPPORTED_PROTOCOL, /* 1557 */ + XML_XINCLUDE_RECURSION=1600, + XML_XINCLUDE_PARSE_VALUE, /* 1601 */ + XML_XINCLUDE_ENTITY_DEF_MISMATCH, /* 1602 */ + XML_XINCLUDE_NO_HREF, /* 1603 */ + XML_XINCLUDE_NO_FALLBACK, /* 1604 */ + XML_XINCLUDE_HREF_URI, /* 1605 */ + XML_XINCLUDE_TEXT_FRAGMENT, /* 1606 */ + XML_XINCLUDE_TEXT_DOCUMENT, /* 1607 */ + XML_XINCLUDE_INVALID_CHAR, /* 1608 */ + XML_XINCLUDE_BUILD_FAILED, /* 1609 */ + XML_XINCLUDE_UNKNOWN_ENCODING, /* 1610 */ + XML_XINCLUDE_MULTIPLE_ROOT, /* 1611 */ + XML_XINCLUDE_XPTR_FAILED, /* 1612 */ + XML_XINCLUDE_XPTR_RESULT, /* 1613 */ + XML_XINCLUDE_INCLUDE_IN_INCLUDE, /* 1614 */ + XML_XINCLUDE_FALLBACKS_IN_INCLUDE, /* 1615 */ + XML_XINCLUDE_FALLBACK_NOT_IN_INCLUDE, /* 1616 */ + XML_XINCLUDE_DEPRECATED_NS, /* 1617 */ + XML_XINCLUDE_FRAGMENT_ID, /* 1618 */ + XML_CATALOG_MISSING_ATTR = 1650, + XML_CATALOG_ENTRY_BROKEN, /* 1651 */ + XML_CATALOG_PREFER_VALUE, /* 1652 */ + XML_CATALOG_NOT_CATALOG, /* 1653 */ + XML_CATALOG_RECURSION, /* 1654 */ + XML_SCHEMAP_PREFIX_UNDEFINED = 1700, + XML_SCHEMAP_ATTRFORMDEFAULT_VALUE, /* 1701 */ + XML_SCHEMAP_ATTRGRP_NONAME_NOREF, /* 1702 */ + XML_SCHEMAP_ATTR_NONAME_NOREF, /* 1703 */ + XML_SCHEMAP_COMPLEXTYPE_NONAME_NOREF, /* 1704 */ + XML_SCHEMAP_ELEMFORMDEFAULT_VALUE, /* 1705 */ + XML_SCHEMAP_ELEM_NONAME_NOREF, /* 1706 */ + XML_SCHEMAP_EXTENSION_NO_BASE, /* 1707 */ + XML_SCHEMAP_FACET_NO_VALUE, /* 1708 */ + XML_SCHEMAP_FAILED_BUILD_IMPORT, /* 1709 */ + XML_SCHEMAP_GROUP_NONAME_NOREF, /* 1710 */ + XML_SCHEMAP_IMPORT_NAMESPACE_NOT_URI, /* 1711 */ + XML_SCHEMAP_IMPORT_REDEFINE_NSNAME, /* 1712 */ + XML_SCHEMAP_IMPORT_SCHEMA_NOT_URI, /* 1713 */ + XML_SCHEMAP_INVALID_BOOLEAN, /* 1714 */ + XML_SCHEMAP_INVALID_ENUM, /* 1715 */ + XML_SCHEMAP_INVALID_FACET, /* 1716 */ + XML_SCHEMAP_INVALID_FACET_VALUE, /* 1717 */ + XML_SCHEMAP_INVALID_MAXOCCURS, /* 1718 */ + XML_SCHEMAP_INVALID_MINOCCURS, /* 1719 */ + XML_SCHEMAP_INVALID_REF_AND_SUBTYPE, /* 1720 */ + XML_SCHEMAP_INVALID_WHITE_SPACE, /* 1721 */ + XML_SCHEMAP_NOATTR_NOREF, /* 1722 */ + XML_SCHEMAP_NOTATION_NO_NAME, /* 1723 */ + XML_SCHEMAP_NOTYPE_NOREF, /* 1724 */ + XML_SCHEMAP_REF_AND_SUBTYPE, /* 1725 */ + XML_SCHEMAP_RESTRICTION_NONAME_NOREF, /* 1726 */ + XML_SCHEMAP_SIMPLETYPE_NONAME, /* 1727 */ + XML_SCHEMAP_TYPE_AND_SUBTYPE, /* 1728 */ + XML_SCHEMAP_UNKNOWN_ALL_CHILD, /* 1729 */ + XML_SCHEMAP_UNKNOWN_ANYATTRIBUTE_CHILD, /* 1730 */ + XML_SCHEMAP_UNKNOWN_ATTR_CHILD, /* 1731 */ + XML_SCHEMAP_UNKNOWN_ATTRGRP_CHILD, /* 1732 */ + XML_SCHEMAP_UNKNOWN_ATTRIBUTE_GROUP, /* 1733 */ + XML_SCHEMAP_UNKNOWN_BASE_TYPE, /* 1734 */ + XML_SCHEMAP_UNKNOWN_CHOICE_CHILD, /* 1735 */ + XML_SCHEMAP_UNKNOWN_COMPLEXCONTENT_CHILD, /* 1736 */ + XML_SCHEMAP_UNKNOWN_COMPLEXTYPE_CHILD, /* 1737 */ + XML_SCHEMAP_UNKNOWN_ELEM_CHILD, /* 1738 */ + XML_SCHEMAP_UNKNOWN_EXTENSION_CHILD, /* 1739 */ + XML_SCHEMAP_UNKNOWN_FACET_CHILD, /* 1740 */ + XML_SCHEMAP_UNKNOWN_FACET_TYPE, /* 1741 */ + XML_SCHEMAP_UNKNOWN_GROUP_CHILD, /* 1742 */ + XML_SCHEMAP_UNKNOWN_IMPORT_CHILD, /* 1743 */ + XML_SCHEMAP_UNKNOWN_LIST_CHILD, /* 1744 */ + XML_SCHEMAP_UNKNOWN_NOTATION_CHILD, /* 1745 */ + XML_SCHEMAP_UNKNOWN_PROCESSCONTENT_CHILD, /* 1746 */ + XML_SCHEMAP_UNKNOWN_REF, /* 1747 */ + XML_SCHEMAP_UNKNOWN_RESTRICTION_CHILD, /* 1748 */ + XML_SCHEMAP_UNKNOWN_SCHEMAS_CHILD, /* 1749 */ + XML_SCHEMAP_UNKNOWN_SEQUENCE_CHILD, /* 1750 */ + XML_SCHEMAP_UNKNOWN_SIMPLECONTENT_CHILD, /* 1751 */ + XML_SCHEMAP_UNKNOWN_SIMPLETYPE_CHILD, /* 1752 */ + XML_SCHEMAP_UNKNOWN_TYPE, /* 1753 */ + XML_SCHEMAP_UNKNOWN_UNION_CHILD, /* 1754 */ + XML_SCHEMAP_ELEM_DEFAULT_FIXED, /* 1755 */ + XML_SCHEMAP_REGEXP_INVALID, /* 1756 */ + XML_SCHEMAP_FAILED_LOAD, /* 1757 */ + XML_SCHEMAP_NOTHING_TO_PARSE, /* 1758 */ + XML_SCHEMAP_NOROOT, /* 1759 */ + XML_SCHEMAP_REDEFINED_GROUP, /* 1760 */ + XML_SCHEMAP_REDEFINED_TYPE, /* 1761 */ + XML_SCHEMAP_REDEFINED_ELEMENT, /* 1762 */ + XML_SCHEMAP_REDEFINED_ATTRGROUP, /* 1763 */ + XML_SCHEMAP_REDEFINED_ATTR, /* 1764 */ + XML_SCHEMAP_REDEFINED_NOTATION, /* 1765 */ + XML_SCHEMAP_FAILED_PARSE, /* 1766 */ + XML_SCHEMAP_UNKNOWN_PREFIX, /* 1767 */ + XML_SCHEMAP_DEF_AND_PREFIX, /* 1768 */ + XML_SCHEMAP_UNKNOWN_INCLUDE_CHILD, /* 1769 */ + XML_SCHEMAP_INCLUDE_SCHEMA_NOT_URI, /* 1770 */ + XML_SCHEMAP_INCLUDE_SCHEMA_NO_URI, /* 1771 */ + XML_SCHEMAP_NOT_SCHEMA, /* 1772 */ + XML_SCHEMAP_UNKNOWN_MEMBER_TYPE, /* 1773 */ + XML_SCHEMAP_INVALID_ATTR_USE, /* 1774 */ + XML_SCHEMAP_RECURSIVE, /* 1775 */ + XML_SCHEMAP_SUPERNUMEROUS_LIST_ITEM_TYPE, /* 1776 */ + XML_SCHEMAP_INVALID_ATTR_COMBINATION, /* 1777 */ + XML_SCHEMAP_INVALID_ATTR_INLINE_COMBINATION, /* 1778 */ + XML_SCHEMAP_MISSING_SIMPLETYPE_CHILD, /* 1779 */ + XML_SCHEMAP_INVALID_ATTR_NAME, /* 1780 */ + XML_SCHEMAP_REF_AND_CONTENT, /* 1781 */ + XML_SCHEMAP_CT_PROPS_CORRECT_1, /* 1782 */ + XML_SCHEMAP_CT_PROPS_CORRECT_2, /* 1783 */ + XML_SCHEMAP_CT_PROPS_CORRECT_3, /* 1784 */ + XML_SCHEMAP_CT_PROPS_CORRECT_4, /* 1785 */ + XML_SCHEMAP_CT_PROPS_CORRECT_5, /* 1786 */ + XML_SCHEMAP_DERIVATION_OK_RESTRICTION_1, /* 1787 */ + XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_1, /* 1788 */ + XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_2, /* 1789 */ + XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_2, /* 1790 */ + XML_SCHEMAP_DERIVATION_OK_RESTRICTION_3, /* 1791 */ + XML_SCHEMAP_WILDCARD_INVALID_NS_MEMBER, /* 1792 */ + XML_SCHEMAP_INTERSECTION_NOT_EXPRESSIBLE, /* 1793 */ + XML_SCHEMAP_UNION_NOT_EXPRESSIBLE, /* 1794 */ + XML_SCHEMAP_SRC_IMPORT_3_1, /* 1795 */ + XML_SCHEMAP_SRC_IMPORT_3_2, /* 1796 */ + XML_SCHEMAP_DERIVATION_OK_RESTRICTION_4_1, /* 1797 */ + XML_SCHEMAP_DERIVATION_OK_RESTRICTION_4_2, /* 1798 */ + XML_SCHEMAP_DERIVATION_OK_RESTRICTION_4_3, /* 1799 */ + XML_SCHEMAP_COS_CT_EXTENDS_1_3, /* 1800 */ + XML_SCHEMAV_NOROOT = 1801, + XML_SCHEMAV_UNDECLAREDELEM, /* 1802 */ + XML_SCHEMAV_NOTTOPLEVEL, /* 1803 */ + XML_SCHEMAV_MISSING, /* 1804 */ + XML_SCHEMAV_WRONGELEM, /* 1805 */ + XML_SCHEMAV_NOTYPE, /* 1806 */ + XML_SCHEMAV_NOROLLBACK, /* 1807 */ + XML_SCHEMAV_ISABSTRACT, /* 1808 */ + XML_SCHEMAV_NOTEMPTY, /* 1809 */ + XML_SCHEMAV_ELEMCONT, /* 1810 */ + XML_SCHEMAV_HAVEDEFAULT, /* 1811 */ + XML_SCHEMAV_NOTNILLABLE, /* 1812 */ + XML_SCHEMAV_EXTRACONTENT, /* 1813 */ + XML_SCHEMAV_INVALIDATTR, /* 1814 */ + XML_SCHEMAV_INVALIDELEM, /* 1815 */ + XML_SCHEMAV_NOTDETERMINIST, /* 1816 */ + XML_SCHEMAV_CONSTRUCT, /* 1817 */ + XML_SCHEMAV_INTERNAL, /* 1818 */ + XML_SCHEMAV_NOTSIMPLE, /* 1819 */ + XML_SCHEMAV_ATTRUNKNOWN, /* 1820 */ + XML_SCHEMAV_ATTRINVALID, /* 1821 */ + XML_SCHEMAV_VALUE, /* 1822 */ + XML_SCHEMAV_FACET, /* 1823 */ + XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_1, /* 1824 */ + XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_2, /* 1825 */ + XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_3, /* 1826 */ + XML_SCHEMAV_CVC_TYPE_3_1_1, /* 1827 */ + XML_SCHEMAV_CVC_TYPE_3_1_2, /* 1828 */ + XML_SCHEMAV_CVC_FACET_VALID, /* 1829 */ + XML_SCHEMAV_CVC_LENGTH_VALID, /* 1830 */ + XML_SCHEMAV_CVC_MINLENGTH_VALID, /* 1831 */ + XML_SCHEMAV_CVC_MAXLENGTH_VALID, /* 1832 */ + XML_SCHEMAV_CVC_MININCLUSIVE_VALID, /* 1833 */ + XML_SCHEMAV_CVC_MAXINCLUSIVE_VALID, /* 1834 */ + XML_SCHEMAV_CVC_MINEXCLUSIVE_VALID, /* 1835 */ + XML_SCHEMAV_CVC_MAXEXCLUSIVE_VALID, /* 1836 */ + XML_SCHEMAV_CVC_TOTALDIGITS_VALID, /* 1837 */ + XML_SCHEMAV_CVC_FRACTIONDIGITS_VALID, /* 1838 */ + XML_SCHEMAV_CVC_PATTERN_VALID, /* 1839 */ + XML_SCHEMAV_CVC_ENUMERATION_VALID, /* 1840 */ + XML_SCHEMAV_CVC_COMPLEX_TYPE_2_1, /* 1841 */ + XML_SCHEMAV_CVC_COMPLEX_TYPE_2_2, /* 1842 */ + XML_SCHEMAV_CVC_COMPLEX_TYPE_2_3, /* 1843 */ + XML_SCHEMAV_CVC_COMPLEX_TYPE_2_4, /* 1844 */ + XML_SCHEMAV_CVC_ELT_1, /* 1845 */ + XML_SCHEMAV_CVC_ELT_2, /* 1846 */ + XML_SCHEMAV_CVC_ELT_3_1, /* 1847 */ + XML_SCHEMAV_CVC_ELT_3_2_1, /* 1848 */ + XML_SCHEMAV_CVC_ELT_3_2_2, /* 1849 */ + XML_SCHEMAV_CVC_ELT_4_1, /* 1850 */ + XML_SCHEMAV_CVC_ELT_4_2, /* 1851 */ + XML_SCHEMAV_CVC_ELT_4_3, /* 1852 */ + XML_SCHEMAV_CVC_ELT_5_1_1, /* 1853 */ + XML_SCHEMAV_CVC_ELT_5_1_2, /* 1854 */ + XML_SCHEMAV_CVC_ELT_5_2_1, /* 1855 */ + XML_SCHEMAV_CVC_ELT_5_2_2_1, /* 1856 */ + XML_SCHEMAV_CVC_ELT_5_2_2_2_1, /* 1857 */ + XML_SCHEMAV_CVC_ELT_5_2_2_2_2, /* 1858 */ + XML_SCHEMAV_CVC_ELT_6, /* 1859 */ + XML_SCHEMAV_CVC_ELT_7, /* 1860 */ + XML_SCHEMAV_CVC_ATTRIBUTE_1, /* 1861 */ + XML_SCHEMAV_CVC_ATTRIBUTE_2, /* 1862 */ + XML_SCHEMAV_CVC_ATTRIBUTE_3, /* 1863 */ + XML_SCHEMAV_CVC_ATTRIBUTE_4, /* 1864 */ + XML_SCHEMAV_CVC_COMPLEX_TYPE_3_1, /* 1865 */ + XML_SCHEMAV_CVC_COMPLEX_TYPE_3_2_1, /* 1866 */ + XML_SCHEMAV_CVC_COMPLEX_TYPE_3_2_2, /* 1867 */ + XML_SCHEMAV_CVC_COMPLEX_TYPE_4, /* 1868 */ + XML_SCHEMAV_CVC_COMPLEX_TYPE_5_1, /* 1869 */ + XML_SCHEMAV_CVC_COMPLEX_TYPE_5_2, /* 1870 */ + XML_SCHEMAV_ELEMENT_CONTENT, /* 1871 */ + XML_SCHEMAV_DOCUMENT_ELEMENT_MISSING, /* 1872 */ + XML_SCHEMAV_CVC_COMPLEX_TYPE_1, /* 1873 */ + XML_SCHEMAV_CVC_AU, /* 1874 */ + XML_SCHEMAV_CVC_TYPE_1, /* 1875 */ + XML_SCHEMAV_CVC_TYPE_2, /* 1876 */ + XML_SCHEMAV_CVC_IDC, /* 1877 */ + XML_SCHEMAV_CVC_WILDCARD, /* 1878 */ + XML_SCHEMAV_MISC, /* 1879 */ + XML_XPTR_UNKNOWN_SCHEME = 1900, + XML_XPTR_CHILDSEQ_START, /* 1901 */ + XML_XPTR_EVAL_FAILED, /* 1902 */ + XML_XPTR_EXTRA_OBJECTS, /* 1903 */ + XML_C14N_CREATE_CTXT = 1950, + XML_C14N_REQUIRES_UTF8, /* 1951 */ + XML_C14N_CREATE_STACK, /* 1952 */ + XML_C14N_INVALID_NODE, /* 1953 */ + XML_C14N_UNKNOW_NODE, /* 1954 */ + XML_C14N_RELATIVE_NAMESPACE, /* 1955 */ + XML_FTP_PASV_ANSWER = 2000, + XML_FTP_EPSV_ANSWER, /* 2001 */ + XML_FTP_ACCNT, /* 2002 */ + XML_FTP_URL_SYNTAX, /* 2003 */ + XML_HTTP_URL_SYNTAX = 2020, + XML_HTTP_USE_IP, /* 2021 */ + XML_HTTP_UNKNOWN_HOST, /* 2022 */ + XML_SCHEMAP_SRC_SIMPLE_TYPE_1 = 3000, + XML_SCHEMAP_SRC_SIMPLE_TYPE_2, /* 3001 */ + XML_SCHEMAP_SRC_SIMPLE_TYPE_3, /* 3002 */ + XML_SCHEMAP_SRC_SIMPLE_TYPE_4, /* 3003 */ + XML_SCHEMAP_SRC_RESOLVE, /* 3004 */ + XML_SCHEMAP_SRC_RESTRICTION_BASE_OR_SIMPLETYPE, /* 3005 */ + XML_SCHEMAP_SRC_LIST_ITEMTYPE_OR_SIMPLETYPE, /* 3006 */ + XML_SCHEMAP_SRC_UNION_MEMBERTYPES_OR_SIMPLETYPES, /* 3007 */ + XML_SCHEMAP_ST_PROPS_CORRECT_1, /* 3008 */ + XML_SCHEMAP_ST_PROPS_CORRECT_2, /* 3009 */ + XML_SCHEMAP_ST_PROPS_CORRECT_3, /* 3010 */ + XML_SCHEMAP_COS_ST_RESTRICTS_1_1, /* 3011 */ + XML_SCHEMAP_COS_ST_RESTRICTS_1_2, /* 3012 */ + XML_SCHEMAP_COS_ST_RESTRICTS_1_3_1, /* 3013 */ + XML_SCHEMAP_COS_ST_RESTRICTS_1_3_2, /* 3014 */ + XML_SCHEMAP_COS_ST_RESTRICTS_2_1, /* 3015 */ + XML_SCHEMAP_COS_ST_RESTRICTS_2_3_1_1, /* 3016 */ + XML_SCHEMAP_COS_ST_RESTRICTS_2_3_1_2, /* 3017 */ + XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_1, /* 3018 */ + XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_2, /* 3019 */ + XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_3, /* 3020 */ + XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_4, /* 3021 */ + XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_5, /* 3022 */ + XML_SCHEMAP_COS_ST_RESTRICTS_3_1, /* 3023 */ + XML_SCHEMAP_COS_ST_RESTRICTS_3_3_1, /* 3024 */ + XML_SCHEMAP_COS_ST_RESTRICTS_3_3_1_2, /* 3025 */ + XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_2, /* 3026 */ + XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_1, /* 3027 */ + XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_3, /* 3028 */ + XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_4, /* 3029 */ + XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_5, /* 3030 */ + XML_SCHEMAP_COS_ST_DERIVED_OK_2_1, /* 3031 */ + XML_SCHEMAP_COS_ST_DERIVED_OK_2_2, /* 3032 */ + XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED, /* 3033 */ + XML_SCHEMAP_S4S_ELEM_MISSING, /* 3034 */ + XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, /* 3035 */ + XML_SCHEMAP_S4S_ATTR_MISSING, /* 3036 */ + XML_SCHEMAP_S4S_ATTR_INVALID_VALUE, /* 3037 */ + XML_SCHEMAP_SRC_ELEMENT_1, /* 3038 */ + XML_SCHEMAP_SRC_ELEMENT_2_1, /* 3039 */ + XML_SCHEMAP_SRC_ELEMENT_2_2, /* 3040 */ + XML_SCHEMAP_SRC_ELEMENT_3, /* 3041 */ + XML_SCHEMAP_P_PROPS_CORRECT_1, /* 3042 */ + XML_SCHEMAP_P_PROPS_CORRECT_2_1, /* 3043 */ + XML_SCHEMAP_P_PROPS_CORRECT_2_2, /* 3044 */ + XML_SCHEMAP_E_PROPS_CORRECT_2, /* 3045 */ + XML_SCHEMAP_E_PROPS_CORRECT_3, /* 3046 */ + XML_SCHEMAP_E_PROPS_CORRECT_4, /* 3047 */ + XML_SCHEMAP_E_PROPS_CORRECT_5, /* 3048 */ + XML_SCHEMAP_E_PROPS_CORRECT_6, /* 3049 */ + XML_SCHEMAP_SRC_INCLUDE, /* 3050 */ + XML_SCHEMAP_SRC_ATTRIBUTE_1, /* 3051 */ + XML_SCHEMAP_SRC_ATTRIBUTE_2, /* 3052 */ + XML_SCHEMAP_SRC_ATTRIBUTE_3_1, /* 3053 */ + XML_SCHEMAP_SRC_ATTRIBUTE_3_2, /* 3054 */ + XML_SCHEMAP_SRC_ATTRIBUTE_4, /* 3055 */ + XML_SCHEMAP_NO_XMLNS, /* 3056 */ + XML_SCHEMAP_NO_XSI, /* 3057 */ + XML_SCHEMAP_COS_VALID_DEFAULT_1, /* 3058 */ + XML_SCHEMAP_COS_VALID_DEFAULT_2_1, /* 3059 */ + XML_SCHEMAP_COS_VALID_DEFAULT_2_2_1, /* 3060 */ + XML_SCHEMAP_COS_VALID_DEFAULT_2_2_2, /* 3061 */ + XML_SCHEMAP_CVC_SIMPLE_TYPE, /* 3062 */ + XML_SCHEMAP_COS_CT_EXTENDS_1_1, /* 3063 */ + XML_SCHEMAP_SRC_IMPORT_1_1, /* 3064 */ + XML_SCHEMAP_SRC_IMPORT_1_2, /* 3065 */ + XML_SCHEMAP_SRC_IMPORT_2, /* 3066 */ + XML_SCHEMAP_SRC_IMPORT_2_1, /* 3067 */ + XML_SCHEMAP_SRC_IMPORT_2_2, /* 3068 */ + XML_SCHEMAP_INTERNAL, /* 3069 non-W3C */ + XML_SCHEMAP_NOT_DETERMINISTIC, /* 3070 non-W3C */ + XML_SCHEMAP_SRC_ATTRIBUTE_GROUP_1, /* 3071 */ + XML_SCHEMAP_SRC_ATTRIBUTE_GROUP_2, /* 3072 */ + XML_SCHEMAP_SRC_ATTRIBUTE_GROUP_3, /* 3073 */ + XML_SCHEMAP_MG_PROPS_CORRECT_1, /* 3074 */ + XML_SCHEMAP_MG_PROPS_CORRECT_2, /* 3075 */ + XML_SCHEMAP_SRC_CT_1, /* 3076 */ + XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_3, /* 3077 */ + XML_SCHEMAP_AU_PROPS_CORRECT_2, /* 3078 */ + XML_SCHEMAP_A_PROPS_CORRECT_2, /* 3079 */ + XML_SCHEMAP_C_PROPS_CORRECT, /* 3080 */ + XML_SCHEMAP_SRC_REDEFINE, /* 3081 */ + XML_SCHEMAP_SRC_IMPORT, /* 3082 */ + XML_SCHEMAP_WARN_SKIP_SCHEMA, /* 3083 */ + XML_SCHEMAP_WARN_UNLOCATED_SCHEMA, /* 3084 */ + XML_SCHEMAP_WARN_ATTR_REDECL_PROH, /* 3085 */ + XML_SCHEMAP_WARN_ATTR_POINTLESS_PROH, /* 3085 */ + XML_SCHEMAP_AG_PROPS_CORRECT, /* 3086 */ + XML_SCHEMAP_COS_CT_EXTENDS_1_2, /* 3087 */ + XML_SCHEMAP_AU_PROPS_CORRECT, /* 3088 */ + XML_SCHEMAP_A_PROPS_CORRECT_3, /* 3089 */ + XML_SCHEMAP_COS_ALL_LIMITED, /* 3090 */ + XML_SCHEMATRONV_ASSERT = 4000, /* 4000 */ + XML_SCHEMATRONV_REPORT, + XML_MODULE_OPEN = 4900, /* 4900 */ + XML_MODULE_CLOSE, /* 4901 */ + XML_CHECK_FOUND_ELEMENT = 5000, + XML_CHECK_FOUND_ATTRIBUTE, /* 5001 */ + XML_CHECK_FOUND_TEXT, /* 5002 */ + XML_CHECK_FOUND_CDATA, /* 5003 */ + XML_CHECK_FOUND_ENTITYREF, /* 5004 */ + XML_CHECK_FOUND_ENTITY, /* 5005 */ + XML_CHECK_FOUND_PI, /* 5006 */ + XML_CHECK_FOUND_COMMENT, /* 5007 */ + XML_CHECK_FOUND_DOCTYPE, /* 5008 */ + XML_CHECK_FOUND_FRAGMENT, /* 5009 */ + XML_CHECK_FOUND_NOTATION, /* 5010 */ + XML_CHECK_UNKNOWN_NODE, /* 5011 */ + XML_CHECK_ENTITY_TYPE, /* 5012 */ + XML_CHECK_NO_PARENT, /* 5013 */ + XML_CHECK_NO_DOC, /* 5014 */ + XML_CHECK_NO_NAME, /* 5015 */ + XML_CHECK_NO_ELEM, /* 5016 */ + XML_CHECK_WRONG_DOC, /* 5017 */ + XML_CHECK_NO_PREV, /* 5018 */ + XML_CHECK_WRONG_PREV, /* 5019 */ + XML_CHECK_NO_NEXT, /* 5020 */ + XML_CHECK_WRONG_NEXT, /* 5021 */ + XML_CHECK_NOT_DTD, /* 5022 */ + XML_CHECK_NOT_ATTR, /* 5023 */ + XML_CHECK_NOT_ATTR_DECL, /* 5024 */ + XML_CHECK_NOT_ELEM_DECL, /* 5025 */ + XML_CHECK_NOT_ENTITY_DECL, /* 5026 */ + XML_CHECK_NOT_NS_DECL, /* 5027 */ + XML_CHECK_NO_HREF, /* 5028 */ + XML_CHECK_WRONG_PARENT,/* 5029 */ + XML_CHECK_NS_SCOPE, /* 5030 */ + XML_CHECK_NS_ANCESTOR, /* 5031 */ + XML_CHECK_NOT_UTF8, /* 5032 */ + XML_CHECK_NO_DICT, /* 5033 */ + XML_CHECK_NOT_NCNAME, /* 5034 */ + XML_CHECK_OUTSIDE_DICT, /* 5035 */ + XML_CHECK_WRONG_NAME, /* 5036 */ + XML_CHECK_NAME_NOT_NULL, /* 5037 */ + XML_I18N_NO_NAME = 6000, + XML_I18N_NO_HANDLER, /* 6001 */ + XML_I18N_EXCESS_HANDLER, /* 6002 */ + XML_I18N_CONV_FAILED, /* 6003 */ + XML_I18N_NO_OUTPUT, /* 6004 */ + XML_BUF_OVERFLOW = 7000 +} xmlParserErrors; + +/** + * xmlGenericErrorFunc: + * @ctx: a parsing context + * @msg: the message + * @...: the extra arguments of the varargs to format the message + * + * Signature of the function to use when there is an error and + * no parsing or validity context available . + */ +typedef void (*xmlGenericErrorFunc) (void *ctx, + const char *msg, + ...) LIBXML_ATTR_FORMAT(2,3); +/** + * xmlStructuredErrorFunc: + * @userData: user provided data for the error callback + * @error: the error being raised. + * + * Signature of the function to use when there is an error and + * the module handles the new error reporting mechanism. + */ +typedef void (*xmlStructuredErrorFunc) (void *userData, const xmlError *error); + +/** DOC_DISABLE */ +#define XML_GLOBALS_ERROR \ + XML_OP(xmlLastError, xmlError, XML_DEPRECATED) \ + XML_OP(xmlGenericError, xmlGenericErrorFunc, XML_NO_ATTR) \ + XML_OP(xmlGenericErrorContext, void *, XML_NO_ATTR) \ + XML_OP(xmlStructuredError, xmlStructuredErrorFunc, XML_NO_ATTR) \ + XML_OP(xmlStructuredErrorContext, void *, XML_NO_ATTR) + +#define XML_OP XML_DECLARE_GLOBAL +XML_GLOBALS_ERROR +#undef XML_OP + +#if defined(LIBXML_THREAD_ENABLED) && !defined(XML_GLOBALS_NO_REDEFINITION) + #define xmlLastError XML_GLOBAL_MACRO(xmlLastError) + #define xmlGenericError XML_GLOBAL_MACRO(xmlGenericError) + #define xmlGenericErrorContext XML_GLOBAL_MACRO(xmlGenericErrorContext) + #define xmlStructuredError XML_GLOBAL_MACRO(xmlStructuredError) + #define xmlStructuredErrorContext XML_GLOBAL_MACRO(xmlStructuredErrorContext) +#endif +/** DOC_ENABLE */ + +/* + * Use the following function to reset the two global variables + * xmlGenericError and xmlGenericErrorContext. + */ +XMLPUBFUN void + xmlSetGenericErrorFunc (void *ctx, + xmlGenericErrorFunc handler); +XML_DEPRECATED +XMLPUBFUN void + xmlThrDefSetGenericErrorFunc(void *ctx, + xmlGenericErrorFunc handler); +XML_DEPRECATED +XMLPUBFUN void + initGenericErrorDefaultFunc (xmlGenericErrorFunc *handler); + +XMLPUBFUN void + xmlSetStructuredErrorFunc (void *ctx, + xmlStructuredErrorFunc handler); +XML_DEPRECATED +XMLPUBFUN void + xmlThrDefSetStructuredErrorFunc(void *ctx, + xmlStructuredErrorFunc handler); +/* + * Default message routines used by SAX and Valid context for error + * and warning reporting. + */ +XMLPUBFUN void + xmlParserError (void *ctx, + const char *msg, + ...) LIBXML_ATTR_FORMAT(2,3); +XMLPUBFUN void + xmlParserWarning (void *ctx, + const char *msg, + ...) LIBXML_ATTR_FORMAT(2,3); +XMLPUBFUN void + xmlParserValidityError (void *ctx, + const char *msg, + ...) LIBXML_ATTR_FORMAT(2,3); +XMLPUBFUN void + xmlParserValidityWarning (void *ctx, + const char *msg, + ...) LIBXML_ATTR_FORMAT(2,3); +/** DOC_DISABLE */ +struct _xmlParserInput; +/** DOC_ENABLE */ +XMLPUBFUN void + xmlParserPrintFileInfo (struct _xmlParserInput *input); +XMLPUBFUN void + xmlParserPrintFileContext (struct _xmlParserInput *input); +XMLPUBFUN void +xmlFormatError (const xmlError *err, + xmlGenericErrorFunc channel, + void *data); + +/* + * Extended error information routines + */ +XMLPUBFUN const xmlError * + xmlGetLastError (void); +XMLPUBFUN void + xmlResetLastError (void); +XMLPUBFUN const xmlError * + xmlCtxtGetLastError (void *ctx); +XMLPUBFUN void + xmlCtxtResetLastError (void *ctx); +XMLPUBFUN void + xmlResetError (xmlErrorPtr err); +XMLPUBFUN int + xmlCopyError (const xmlError *from, + xmlErrorPtr to); + +#ifdef __cplusplus +} +#endif +#endif /* __XML_ERROR_H__ */ diff --git a/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/include/libxml2/libxml/xmlexports.h b/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/include/libxml2/libxml/xmlexports.h new file mode 100644 index 0000000000000000000000000000000000000000..3c1d83f497ca5d206e450f142d82027150e18570 --- /dev/null +++ b/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/include/libxml2/libxml/xmlexports.h @@ -0,0 +1,146 @@ +/* + * Summary: macros for marking symbols as exportable/importable. + * Description: macros for marking symbols as exportable/importable. + * + * Copy: See Copyright for the status of this software. + */ + +#ifndef __XML_EXPORTS_H__ +#define __XML_EXPORTS_H__ + +/** DOC_DISABLE */ + +/* + * Symbol visibility + */ + +#if defined(_WIN32) || defined(__CYGWIN__) + #ifdef LIBXML_STATIC + #define XMLPUBLIC + #elif defined(IN_LIBXML) + #define XMLPUBLIC __declspec(dllexport) + #else + #define XMLPUBLIC __declspec(dllimport) + #endif +#else /* not Windows */ + #define XMLPUBLIC +#endif /* platform switch */ + +#define XMLPUBFUN XMLPUBLIC + +#define XMLPUBVAR XMLPUBLIC extern + +/* Compatibility */ +#define XMLCALL +#define XMLCDECL +#ifndef LIBXML_DLL_IMPORT + #define LIBXML_DLL_IMPORT XMLPUBVAR +#endif + +/* + * Attributes + */ + +#ifndef ATTRIBUTE_UNUSED + #if __GNUC__ * 100 + __GNUC_MINOR__ >= 207 || defined(__clang__) + #define ATTRIBUTE_UNUSED __attribute__((unused)) + #else + #define ATTRIBUTE_UNUSED + #endif +#endif + +#if !defined(__clang__) && (__GNUC__ * 100 + __GNUC_MINOR__ >= 403) + #define LIBXML_ATTR_ALLOC_SIZE(x) __attribute__((alloc_size(x))) +#else + #define LIBXML_ATTR_ALLOC_SIZE(x) +#endif + +#if __GNUC__ * 100 + __GNUC_MINOR__ >= 303 + #define LIBXML_ATTR_FORMAT(fmt,args) \ + __attribute__((__format__(__printf__,fmt,args))) +#else + #define LIBXML_ATTR_FORMAT(fmt,args) +#endif + +#ifndef XML_DEPRECATED + #if defined(IN_LIBXML) + #define XML_DEPRECATED + #elif __GNUC__ * 100 + __GNUC_MINOR__ >= 301 + #define XML_DEPRECATED __attribute__((deprecated)) + #elif defined(_MSC_VER) && _MSC_VER >= 1400 + /* Available since Visual Studio 2005 */ + #define XML_DEPRECATED __declspec(deprecated) + #else + #define XML_DEPRECATED + #endif +#endif + +/* + * Warnings pragmas, should be moved from public headers + */ + +#if defined(__LCC__) + + #define XML_IGNORE_FPTR_CAST_WARNINGS + #define XML_POP_WARNINGS \ + _Pragma("diag_default 1215") + +#elif defined(__clang__) || (__GNUC__ * 100 + __GNUC_MINOR__ >= 406) + + #if defined(__clang__) || (__GNUC__ * 100 + __GNUC_MINOR__ >= 800) + #define XML_IGNORE_FPTR_CAST_WARNINGS \ + _Pragma("GCC diagnostic push") \ + _Pragma("GCC diagnostic ignored \"-Wpedantic\"") \ + _Pragma("GCC diagnostic ignored \"-Wcast-function-type\"") + #else + #define XML_IGNORE_FPTR_CAST_WARNINGS \ + _Pragma("GCC diagnostic push") \ + _Pragma("GCC diagnostic ignored \"-Wpedantic\"") + #endif + #define XML_POP_WARNINGS \ + _Pragma("GCC diagnostic pop") + +#elif defined(_MSC_VER) && _MSC_VER >= 1400 + + #define XML_IGNORE_FPTR_CAST_WARNINGS __pragma(warning(push)) + #define XML_POP_WARNINGS __pragma(warning(pop)) + +#else + + #define XML_IGNORE_FPTR_CAST_WARNINGS + #define XML_POP_WARNINGS + +#endif + +/* + * Accessors for globals + */ + +#define XML_NO_ATTR + +#ifdef LIBXML_THREAD_ENABLED + #define XML_DECLARE_GLOBAL(name, type, attrs) \ + attrs XMLPUBFUN type *__##name(void); + #define XML_GLOBAL_MACRO(name) (*__##name()) +#else + #define XML_DECLARE_GLOBAL(name, type, attrs) \ + attrs XMLPUBVAR type name; +#endif + +/* + * Originally declared in xmlversion.h which is generated + */ + +#ifdef __cplusplus +extern "C" { +#endif + +XMLPUBFUN void xmlCheckVersion(int version); + +#ifdef __cplusplus +} +#endif + +#endif /* __XML_EXPORTS_H__ */ + + diff --git a/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/include/libxml2/libxml/xmlmemory.h b/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/include/libxml2/libxml/xmlmemory.h new file mode 100644 index 0000000000000000000000000000000000000000..1de3e9fce4e949ea3663376aed2afa052341f268 --- /dev/null +++ b/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/include/libxml2/libxml/xmlmemory.h @@ -0,0 +1,188 @@ +/* + * Summary: interface for the memory allocator + * Description: provides interfaces for the memory allocator, + * including debugging capabilities. + * + * Copy: See Copyright for the status of this software. + * + * Author: Daniel Veillard + */ + + +#ifndef __DEBUG_MEMORY_ALLOC__ +#define __DEBUG_MEMORY_ALLOC__ + +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * The XML memory wrapper support 4 basic overloadable functions. + */ +/** + * xmlFreeFunc: + * @mem: an already allocated block of memory + * + * Signature for a free() implementation. + */ +typedef void (*xmlFreeFunc)(void *mem); +/** + * xmlMallocFunc: + * @size: the size requested in bytes + * + * Signature for a malloc() implementation. + * + * Returns a pointer to the newly allocated block or NULL in case of error. + */ +typedef void *(LIBXML_ATTR_ALLOC_SIZE(1) *xmlMallocFunc)(size_t size); + +/** + * xmlReallocFunc: + * @mem: an already allocated block of memory + * @size: the new size requested in bytes + * + * Signature for a realloc() implementation. + * + * Returns a pointer to the newly reallocated block or NULL in case of error. + */ +typedef void *(*xmlReallocFunc)(void *mem, size_t size); + +/** + * xmlStrdupFunc: + * @str: a zero terminated string + * + * Signature for an strdup() implementation. + * + * Returns the copy of the string or NULL in case of error. + */ +typedef char *(*xmlStrdupFunc)(const char *str); + +/* + * In general the memory allocation entry points are not kept + * thread specific but this can be overridden by LIBXML_THREAD_ALLOC_ENABLED + * - xmlMalloc + * - xmlMallocAtomic + * - xmlRealloc + * - xmlMemStrdup + * - xmlFree + */ +/** DOC_DISABLE */ +#ifdef LIBXML_THREAD_ALLOC_ENABLED + #define XML_GLOBALS_ALLOC \ + XML_OP(xmlMalloc, xmlMallocFunc, XML_NO_ATTR) \ + XML_OP(xmlMallocAtomic, xmlMallocFunc, XML_NO_ATTR) \ + XML_OP(xmlRealloc, xmlReallocFunc, XML_NO_ATTR) \ + XML_OP(xmlFree, xmlFreeFunc, XML_NO_ATTR) \ + XML_OP(xmlMemStrdup, xmlStrdupFunc, XML_NO_ATTR) + #define XML_OP XML_DECLARE_GLOBAL + XML_GLOBALS_ALLOC + #undef XML_OP + #if defined(LIBXML_THREAD_ENABLED) && !defined(XML_GLOBALS_NO_REDEFINITION) + #define xmlMalloc XML_GLOBAL_MACRO(xmlMalloc) + #define xmlMallocAtomic XML_GLOBAL_MACRO(xmlMallocAtomic) + #define xmlRealloc XML_GLOBAL_MACRO(xmlRealloc) + #define xmlFree XML_GLOBAL_MACRO(xmlFree) + #define xmlMemStrdup XML_GLOBAL_MACRO(xmlMemStrdup) + #endif +#else + #define XML_GLOBALS_ALLOC +/** DOC_ENABLE */ + XMLPUBVAR xmlMallocFunc xmlMalloc; + XMLPUBVAR xmlMallocFunc xmlMallocAtomic; + XMLPUBVAR xmlReallocFunc xmlRealloc; + XMLPUBVAR xmlFreeFunc xmlFree; + XMLPUBVAR xmlStrdupFunc xmlMemStrdup; +#endif + +/* + * The way to overload the existing functions. + * The xmlGc function have an extra entry for atomic block + * allocations useful for garbage collected memory allocators + */ +XMLPUBFUN int + xmlMemSetup (xmlFreeFunc freeFunc, + xmlMallocFunc mallocFunc, + xmlReallocFunc reallocFunc, + xmlStrdupFunc strdupFunc); +XMLPUBFUN int + xmlMemGet (xmlFreeFunc *freeFunc, + xmlMallocFunc *mallocFunc, + xmlReallocFunc *reallocFunc, + xmlStrdupFunc *strdupFunc); +XMLPUBFUN int + xmlGcMemSetup (xmlFreeFunc freeFunc, + xmlMallocFunc mallocFunc, + xmlMallocFunc mallocAtomicFunc, + xmlReallocFunc reallocFunc, + xmlStrdupFunc strdupFunc); +XMLPUBFUN int + xmlGcMemGet (xmlFreeFunc *freeFunc, + xmlMallocFunc *mallocFunc, + xmlMallocFunc *mallocAtomicFunc, + xmlReallocFunc *reallocFunc, + xmlStrdupFunc *strdupFunc); + +/* + * Initialization of the memory layer. + */ +XML_DEPRECATED +XMLPUBFUN int + xmlInitMemory (void); + +/* + * Cleanup of the memory layer. + */ +XML_DEPRECATED +XMLPUBFUN void + xmlCleanupMemory (void); +/* + * These are specific to the XML debug memory wrapper. + */ +XMLPUBFUN size_t + xmlMemSize (void *ptr); +XMLPUBFUN int + xmlMemUsed (void); +XMLPUBFUN int + xmlMemBlocks (void); +XML_DEPRECATED +XMLPUBFUN void + xmlMemDisplay (FILE *fp); +XML_DEPRECATED +XMLPUBFUN void + xmlMemDisplayLast(FILE *fp, long nbBytes); +XML_DEPRECATED +XMLPUBFUN void + xmlMemShow (FILE *fp, int nr); +XML_DEPRECATED +XMLPUBFUN void + xmlMemoryDump (void); +XMLPUBFUN void * + xmlMemMalloc (size_t size) LIBXML_ATTR_ALLOC_SIZE(1); +XMLPUBFUN void * + xmlMemRealloc (void *ptr,size_t size); +XMLPUBFUN void + xmlMemFree (void *ptr); +XMLPUBFUN char * + xmlMemoryStrdup (const char *str); +XML_DEPRECATED +XMLPUBFUN void * + xmlMallocLoc (size_t size, const char *file, int line) LIBXML_ATTR_ALLOC_SIZE(1); +XML_DEPRECATED +XMLPUBFUN void * + xmlReallocLoc (void *ptr, size_t size, const char *file, int line); +XML_DEPRECATED +XMLPUBFUN void * + xmlMallocAtomicLoc (size_t size, const char *file, int line) LIBXML_ATTR_ALLOC_SIZE(1); +XML_DEPRECATED +XMLPUBFUN char * + xmlMemStrdupLoc (const char *str, const char *file, int line); + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + +#endif /* __DEBUG_MEMORY_ALLOC__ */ + diff --git a/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/include/libxml2/libxml/xmlmodule.h b/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/include/libxml2/libxml/xmlmodule.h new file mode 100644 index 0000000000000000000000000000000000000000..279986c1a9fe9c4025aa3f98cf5235018e5a22de --- /dev/null +++ b/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/include/libxml2/libxml/xmlmodule.h @@ -0,0 +1,57 @@ +/* + * Summary: dynamic module loading + * Description: basic API for dynamic module loading, used by + * libexslt added in 2.6.17 + * + * Copy: See Copyright for the status of this software. + * + * Author: Joel W. Reed + */ + +#ifndef __XML_MODULE_H__ +#define __XML_MODULE_H__ + +#include + +#ifdef LIBXML_MODULES_ENABLED + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * xmlModulePtr: + * + * A handle to a dynamically loaded module + */ +typedef struct _xmlModule xmlModule; +typedef xmlModule *xmlModulePtr; + +/** + * xmlModuleOption: + * + * enumeration of options that can be passed down to xmlModuleOpen() + */ +typedef enum { + XML_MODULE_LAZY = 1, /* lazy binding */ + XML_MODULE_LOCAL= 2 /* local binding */ +} xmlModuleOption; + +XMLPUBFUN xmlModulePtr xmlModuleOpen (const char *filename, + int options); + +XMLPUBFUN int xmlModuleSymbol (xmlModulePtr module, + const char* name, + void **result); + +XMLPUBFUN int xmlModuleClose (xmlModulePtr module); + +XMLPUBFUN int xmlModuleFree (xmlModulePtr module); + +#ifdef __cplusplus +} +#endif + +#endif /* LIBXML_MODULES_ENABLED */ + +#endif /*__XML_MODULE_H__ */ diff --git a/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/include/libxml2/libxml/xmlreader.h b/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/include/libxml2/libxml/xmlreader.h new file mode 100644 index 0000000000000000000000000000000000000000..5d4fc5d5a179fc7c128e44cf9aa9bf4b406ef8a8 --- /dev/null +++ b/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/include/libxml2/libxml/xmlreader.h @@ -0,0 +1,436 @@ +/* + * Summary: the XMLReader implementation + * Description: API of the XML streaming API based on C# interfaces. + * + * Copy: See Copyright for the status of this software. + * + * Author: Daniel Veillard + */ + +#ifndef __XML_XMLREADER_H__ +#define __XML_XMLREADER_H__ + +#include +#include +#include +#include +#ifdef LIBXML_SCHEMAS_ENABLED +#include +#include +#endif +/* for compatibility */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * xmlParserSeverities: + * + * How severe an error callback is when the per-reader error callback API + * is used. + */ +typedef enum { + XML_PARSER_SEVERITY_VALIDITY_WARNING = 1, + XML_PARSER_SEVERITY_VALIDITY_ERROR = 2, + XML_PARSER_SEVERITY_WARNING = 3, + XML_PARSER_SEVERITY_ERROR = 4 +} xmlParserSeverities; + +#ifdef LIBXML_READER_ENABLED + +/** + * xmlTextReaderMode: + * + * Internal state values for the reader. + */ +typedef enum { + XML_TEXTREADER_MODE_INITIAL = 0, + XML_TEXTREADER_MODE_INTERACTIVE = 1, + XML_TEXTREADER_MODE_ERROR = 2, + XML_TEXTREADER_MODE_EOF =3, + XML_TEXTREADER_MODE_CLOSED = 4, + XML_TEXTREADER_MODE_READING = 5 +} xmlTextReaderMode; + +/** + * xmlParserProperties: + * + * Some common options to use with xmlTextReaderSetParserProp, but it + * is better to use xmlParserOption and the xmlReaderNewxxx and + * xmlReaderForxxx APIs now. + */ +typedef enum { + XML_PARSER_LOADDTD = 1, + XML_PARSER_DEFAULTATTRS = 2, + XML_PARSER_VALIDATE = 3, + XML_PARSER_SUBST_ENTITIES = 4 +} xmlParserProperties; + +/** + * xmlReaderTypes: + * + * Predefined constants for the different types of nodes. + */ +typedef enum { + XML_READER_TYPE_NONE = 0, + XML_READER_TYPE_ELEMENT = 1, + XML_READER_TYPE_ATTRIBUTE = 2, + XML_READER_TYPE_TEXT = 3, + XML_READER_TYPE_CDATA = 4, + XML_READER_TYPE_ENTITY_REFERENCE = 5, + XML_READER_TYPE_ENTITY = 6, + XML_READER_TYPE_PROCESSING_INSTRUCTION = 7, + XML_READER_TYPE_COMMENT = 8, + XML_READER_TYPE_DOCUMENT = 9, + XML_READER_TYPE_DOCUMENT_TYPE = 10, + XML_READER_TYPE_DOCUMENT_FRAGMENT = 11, + XML_READER_TYPE_NOTATION = 12, + XML_READER_TYPE_WHITESPACE = 13, + XML_READER_TYPE_SIGNIFICANT_WHITESPACE = 14, + XML_READER_TYPE_END_ELEMENT = 15, + XML_READER_TYPE_END_ENTITY = 16, + XML_READER_TYPE_XML_DECLARATION = 17 +} xmlReaderTypes; + +/** + * xmlTextReader: + * + * Structure for an xmlReader context. + */ +typedef struct _xmlTextReader xmlTextReader; + +/** + * xmlTextReaderPtr: + * + * Pointer to an xmlReader context. + */ +typedef xmlTextReader *xmlTextReaderPtr; + +/* + * Constructors & Destructor + */ +XMLPUBFUN xmlTextReaderPtr + xmlNewTextReader (xmlParserInputBufferPtr input, + const char *URI); +XMLPUBFUN xmlTextReaderPtr + xmlNewTextReaderFilename(const char *URI); + +XMLPUBFUN void + xmlFreeTextReader (xmlTextReaderPtr reader); + +XMLPUBFUN int + xmlTextReaderSetup(xmlTextReaderPtr reader, + xmlParserInputBufferPtr input, const char *URL, + const char *encoding, int options); +XMLPUBFUN void + xmlTextReaderSetMaxAmplification(xmlTextReaderPtr reader, + unsigned maxAmpl); +XMLPUBFUN const xmlError * + xmlTextReaderGetLastError(xmlTextReaderPtr reader); + +/* + * Iterators + */ +XMLPUBFUN int + xmlTextReaderRead (xmlTextReaderPtr reader); + +#ifdef LIBXML_WRITER_ENABLED +XMLPUBFUN xmlChar * + xmlTextReaderReadInnerXml(xmlTextReaderPtr reader); + +XMLPUBFUN xmlChar * + xmlTextReaderReadOuterXml(xmlTextReaderPtr reader); +#endif + +XMLPUBFUN xmlChar * + xmlTextReaderReadString (xmlTextReaderPtr reader); +XMLPUBFUN int + xmlTextReaderReadAttributeValue(xmlTextReaderPtr reader); + +/* + * Attributes of the node + */ +XMLPUBFUN int + xmlTextReaderAttributeCount(xmlTextReaderPtr reader); +XMLPUBFUN int + xmlTextReaderDepth (xmlTextReaderPtr reader); +XMLPUBFUN int + xmlTextReaderHasAttributes(xmlTextReaderPtr reader); +XMLPUBFUN int + xmlTextReaderHasValue(xmlTextReaderPtr reader); +XMLPUBFUN int + xmlTextReaderIsDefault (xmlTextReaderPtr reader); +XMLPUBFUN int + xmlTextReaderIsEmptyElement(xmlTextReaderPtr reader); +XMLPUBFUN int + xmlTextReaderNodeType (xmlTextReaderPtr reader); +XMLPUBFUN int + xmlTextReaderQuoteChar (xmlTextReaderPtr reader); +XMLPUBFUN int + xmlTextReaderReadState (xmlTextReaderPtr reader); +XMLPUBFUN int + xmlTextReaderIsNamespaceDecl(xmlTextReaderPtr reader); + +XMLPUBFUN const xmlChar * + xmlTextReaderConstBaseUri (xmlTextReaderPtr reader); +XMLPUBFUN const xmlChar * + xmlTextReaderConstLocalName (xmlTextReaderPtr reader); +XMLPUBFUN const xmlChar * + xmlTextReaderConstName (xmlTextReaderPtr reader); +XMLPUBFUN const xmlChar * + xmlTextReaderConstNamespaceUri(xmlTextReaderPtr reader); +XMLPUBFUN const xmlChar * + xmlTextReaderConstPrefix (xmlTextReaderPtr reader); +XMLPUBFUN const xmlChar * + xmlTextReaderConstXmlLang (xmlTextReaderPtr reader); +XMLPUBFUN const xmlChar * + xmlTextReaderConstString (xmlTextReaderPtr reader, + const xmlChar *str); +XMLPUBFUN const xmlChar * + xmlTextReaderConstValue (xmlTextReaderPtr reader); + +/* + * use the Const version of the routine for + * better performance and simpler code + */ +XMLPUBFUN xmlChar * + xmlTextReaderBaseUri (xmlTextReaderPtr reader); +XMLPUBFUN xmlChar * + xmlTextReaderLocalName (xmlTextReaderPtr reader); +XMLPUBFUN xmlChar * + xmlTextReaderName (xmlTextReaderPtr reader); +XMLPUBFUN xmlChar * + xmlTextReaderNamespaceUri(xmlTextReaderPtr reader); +XMLPUBFUN xmlChar * + xmlTextReaderPrefix (xmlTextReaderPtr reader); +XMLPUBFUN xmlChar * + xmlTextReaderXmlLang (xmlTextReaderPtr reader); +XMLPUBFUN xmlChar * + xmlTextReaderValue (xmlTextReaderPtr reader); + +/* + * Methods of the XmlTextReader + */ +XMLPUBFUN int + xmlTextReaderClose (xmlTextReaderPtr reader); +XMLPUBFUN xmlChar * + xmlTextReaderGetAttributeNo (xmlTextReaderPtr reader, + int no); +XMLPUBFUN xmlChar * + xmlTextReaderGetAttribute (xmlTextReaderPtr reader, + const xmlChar *name); +XMLPUBFUN xmlChar * + xmlTextReaderGetAttributeNs (xmlTextReaderPtr reader, + const xmlChar *localName, + const xmlChar *namespaceURI); +XMLPUBFUN xmlParserInputBufferPtr + xmlTextReaderGetRemainder (xmlTextReaderPtr reader); +XMLPUBFUN xmlChar * + xmlTextReaderLookupNamespace(xmlTextReaderPtr reader, + const xmlChar *prefix); +XMLPUBFUN int + xmlTextReaderMoveToAttributeNo(xmlTextReaderPtr reader, + int no); +XMLPUBFUN int + xmlTextReaderMoveToAttribute(xmlTextReaderPtr reader, + const xmlChar *name); +XMLPUBFUN int + xmlTextReaderMoveToAttributeNs(xmlTextReaderPtr reader, + const xmlChar *localName, + const xmlChar *namespaceURI); +XMLPUBFUN int + xmlTextReaderMoveToFirstAttribute(xmlTextReaderPtr reader); +XMLPUBFUN int + xmlTextReaderMoveToNextAttribute(xmlTextReaderPtr reader); +XMLPUBFUN int + xmlTextReaderMoveToElement (xmlTextReaderPtr reader); +XMLPUBFUN int + xmlTextReaderNormalization (xmlTextReaderPtr reader); +XMLPUBFUN const xmlChar * + xmlTextReaderConstEncoding (xmlTextReaderPtr reader); + +/* + * Extensions + */ +XMLPUBFUN int + xmlTextReaderSetParserProp (xmlTextReaderPtr reader, + int prop, + int value); +XMLPUBFUN int + xmlTextReaderGetParserProp (xmlTextReaderPtr reader, + int prop); +XMLPUBFUN xmlNodePtr + xmlTextReaderCurrentNode (xmlTextReaderPtr reader); + +XMLPUBFUN int + xmlTextReaderGetParserLineNumber(xmlTextReaderPtr reader); + +XMLPUBFUN int + xmlTextReaderGetParserColumnNumber(xmlTextReaderPtr reader); + +XMLPUBFUN xmlNodePtr + xmlTextReaderPreserve (xmlTextReaderPtr reader); +#ifdef LIBXML_PATTERN_ENABLED +XMLPUBFUN int + xmlTextReaderPreservePattern(xmlTextReaderPtr reader, + const xmlChar *pattern, + const xmlChar **namespaces); +#endif /* LIBXML_PATTERN_ENABLED */ +XMLPUBFUN xmlDocPtr + xmlTextReaderCurrentDoc (xmlTextReaderPtr reader); +XMLPUBFUN xmlNodePtr + xmlTextReaderExpand (xmlTextReaderPtr reader); +XMLPUBFUN int + xmlTextReaderNext (xmlTextReaderPtr reader); +XMLPUBFUN int + xmlTextReaderNextSibling (xmlTextReaderPtr reader); +XMLPUBFUN int + xmlTextReaderIsValid (xmlTextReaderPtr reader); +#ifdef LIBXML_SCHEMAS_ENABLED +XMLPUBFUN int + xmlTextReaderRelaxNGValidate(xmlTextReaderPtr reader, + const char *rng); +XMLPUBFUN int + xmlTextReaderRelaxNGValidateCtxt(xmlTextReaderPtr reader, + xmlRelaxNGValidCtxtPtr ctxt, + int options); + +XMLPUBFUN int + xmlTextReaderRelaxNGSetSchema(xmlTextReaderPtr reader, + xmlRelaxNGPtr schema); +XMLPUBFUN int + xmlTextReaderSchemaValidate (xmlTextReaderPtr reader, + const char *xsd); +XMLPUBFUN int + xmlTextReaderSchemaValidateCtxt(xmlTextReaderPtr reader, + xmlSchemaValidCtxtPtr ctxt, + int options); +XMLPUBFUN int + xmlTextReaderSetSchema (xmlTextReaderPtr reader, + xmlSchemaPtr schema); +#endif +XMLPUBFUN const xmlChar * + xmlTextReaderConstXmlVersion(xmlTextReaderPtr reader); +XMLPUBFUN int + xmlTextReaderStandalone (xmlTextReaderPtr reader); + + +/* + * Index lookup + */ +XMLPUBFUN long + xmlTextReaderByteConsumed (xmlTextReaderPtr reader); + +/* + * New more complete APIs for simpler creation and reuse of readers + */ +XMLPUBFUN xmlTextReaderPtr + xmlReaderWalker (xmlDocPtr doc); +XMLPUBFUN xmlTextReaderPtr + xmlReaderForDoc (const xmlChar * cur, + const char *URL, + const char *encoding, + int options); +XMLPUBFUN xmlTextReaderPtr + xmlReaderForFile (const char *filename, + const char *encoding, + int options); +XMLPUBFUN xmlTextReaderPtr + xmlReaderForMemory (const char *buffer, + int size, + const char *URL, + const char *encoding, + int options); +XMLPUBFUN xmlTextReaderPtr + xmlReaderForFd (int fd, + const char *URL, + const char *encoding, + int options); +XMLPUBFUN xmlTextReaderPtr + xmlReaderForIO (xmlInputReadCallback ioread, + xmlInputCloseCallback ioclose, + void *ioctx, + const char *URL, + const char *encoding, + int options); + +XMLPUBFUN int + xmlReaderNewWalker (xmlTextReaderPtr reader, + xmlDocPtr doc); +XMLPUBFUN int + xmlReaderNewDoc (xmlTextReaderPtr reader, + const xmlChar * cur, + const char *URL, + const char *encoding, + int options); +XMLPUBFUN int + xmlReaderNewFile (xmlTextReaderPtr reader, + const char *filename, + const char *encoding, + int options); +XMLPUBFUN int + xmlReaderNewMemory (xmlTextReaderPtr reader, + const char *buffer, + int size, + const char *URL, + const char *encoding, + int options); +XMLPUBFUN int + xmlReaderNewFd (xmlTextReaderPtr reader, + int fd, + const char *URL, + const char *encoding, + int options); +XMLPUBFUN int + xmlReaderNewIO (xmlTextReaderPtr reader, + xmlInputReadCallback ioread, + xmlInputCloseCallback ioclose, + void *ioctx, + const char *URL, + const char *encoding, + int options); +/* + * Error handling extensions + */ +typedef void * xmlTextReaderLocatorPtr; + +/** + * xmlTextReaderErrorFunc: + * @arg: the user argument + * @msg: the message + * @severity: the severity of the error + * @locator: a locator indicating where the error occurred + * + * Signature of an error callback from a reader parser + */ +typedef void (*xmlTextReaderErrorFunc)(void *arg, + const char *msg, + xmlParserSeverities severity, + xmlTextReaderLocatorPtr locator); +XMLPUBFUN int + xmlTextReaderLocatorLineNumber(xmlTextReaderLocatorPtr locator); +XMLPUBFUN xmlChar * + xmlTextReaderLocatorBaseURI (xmlTextReaderLocatorPtr locator); +XMLPUBFUN void + xmlTextReaderSetErrorHandler(xmlTextReaderPtr reader, + xmlTextReaderErrorFunc f, + void *arg); +XMLPUBFUN void + xmlTextReaderSetStructuredErrorHandler(xmlTextReaderPtr reader, + xmlStructuredErrorFunc f, + void *arg); +XMLPUBFUN void + xmlTextReaderGetErrorHandler(xmlTextReaderPtr reader, + xmlTextReaderErrorFunc *f, + void **arg); + +#endif /* LIBXML_READER_ENABLED */ + +#ifdef __cplusplus +} +#endif + +#endif /* __XML_XMLREADER_H__ */ + diff --git a/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/include/libxml2/libxml/xmlregexp.h b/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/include/libxml2/libxml/xmlregexp.h new file mode 100644 index 0000000000000000000000000000000000000000..2d66437a55b547fc809941ee0a9bafec722a432d --- /dev/null +++ b/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/include/libxml2/libxml/xmlregexp.h @@ -0,0 +1,215 @@ +/* + * Summary: regular expressions handling + * Description: basic API for libxml regular expressions handling used + * for XML Schemas and validation. + * + * Copy: See Copyright for the status of this software. + * + * Author: Daniel Veillard + */ + +#ifndef __XML_REGEXP_H__ +#define __XML_REGEXP_H__ + +#include +#include +#include + +#ifdef LIBXML_REGEXP_ENABLED + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * xmlRegexpPtr: + * + * A libxml regular expression, they can actually be far more complex + * thank the POSIX regex expressions. + */ +typedef struct _xmlRegexp xmlRegexp; +typedef xmlRegexp *xmlRegexpPtr; + +/** + * xmlRegExecCtxtPtr: + * + * A libxml progressive regular expression evaluation context + */ +typedef struct _xmlRegExecCtxt xmlRegExecCtxt; +typedef xmlRegExecCtxt *xmlRegExecCtxtPtr; + +/* + * The POSIX like API + */ +XMLPUBFUN xmlRegexpPtr + xmlRegexpCompile (const xmlChar *regexp); +XMLPUBFUN void xmlRegFreeRegexp(xmlRegexpPtr regexp); +XMLPUBFUN int + xmlRegexpExec (xmlRegexpPtr comp, + const xmlChar *value); +XMLPUBFUN void + xmlRegexpPrint (FILE *output, + xmlRegexpPtr regexp); +XMLPUBFUN int + xmlRegexpIsDeterminist(xmlRegexpPtr comp); + +/** + * xmlRegExecCallbacks: + * @exec: the regular expression context + * @token: the current token string + * @transdata: transition data + * @inputdata: input data + * + * Callback function when doing a transition in the automata + */ +typedef void (*xmlRegExecCallbacks) (xmlRegExecCtxtPtr exec, + const xmlChar *token, + void *transdata, + void *inputdata); + +/* + * The progressive API + */ +XMLPUBFUN xmlRegExecCtxtPtr + xmlRegNewExecCtxt (xmlRegexpPtr comp, + xmlRegExecCallbacks callback, + void *data); +XMLPUBFUN void + xmlRegFreeExecCtxt (xmlRegExecCtxtPtr exec); +XMLPUBFUN int + xmlRegExecPushString(xmlRegExecCtxtPtr exec, + const xmlChar *value, + void *data); +XMLPUBFUN int + xmlRegExecPushString2(xmlRegExecCtxtPtr exec, + const xmlChar *value, + const xmlChar *value2, + void *data); + +XMLPUBFUN int + xmlRegExecNextValues(xmlRegExecCtxtPtr exec, + int *nbval, + int *nbneg, + xmlChar **values, + int *terminal); +XMLPUBFUN int + xmlRegExecErrInfo (xmlRegExecCtxtPtr exec, + const xmlChar **string, + int *nbval, + int *nbneg, + xmlChar **values, + int *terminal); +#ifdef LIBXML_EXPR_ENABLED +/* + * Formal regular expression handling + * Its goal is to do some formal work on content models + */ + +/* expressions are used within a context */ +typedef struct _xmlExpCtxt xmlExpCtxt; +typedef xmlExpCtxt *xmlExpCtxtPtr; + +XMLPUBFUN void + xmlExpFreeCtxt (xmlExpCtxtPtr ctxt); +XMLPUBFUN xmlExpCtxtPtr + xmlExpNewCtxt (int maxNodes, + xmlDictPtr dict); + +XMLPUBFUN int + xmlExpCtxtNbNodes(xmlExpCtxtPtr ctxt); +XMLPUBFUN int + xmlExpCtxtNbCons(xmlExpCtxtPtr ctxt); + +/* Expressions are trees but the tree is opaque */ +typedef struct _xmlExpNode xmlExpNode; +typedef xmlExpNode *xmlExpNodePtr; + +typedef enum { + XML_EXP_EMPTY = 0, + XML_EXP_FORBID = 1, + XML_EXP_ATOM = 2, + XML_EXP_SEQ = 3, + XML_EXP_OR = 4, + XML_EXP_COUNT = 5 +} xmlExpNodeType; + +/* + * 2 core expressions shared by all for the empty language set + * and for the set with just the empty token + */ +XMLPUBVAR xmlExpNodePtr forbiddenExp; +XMLPUBVAR xmlExpNodePtr emptyExp; + +/* + * Expressions are reference counted internally + */ +XMLPUBFUN void + xmlExpFree (xmlExpCtxtPtr ctxt, + xmlExpNodePtr expr); +XMLPUBFUN void + xmlExpRef (xmlExpNodePtr expr); + +/* + * constructors can be either manual or from a string + */ +XMLPUBFUN xmlExpNodePtr + xmlExpParse (xmlExpCtxtPtr ctxt, + const char *expr); +XMLPUBFUN xmlExpNodePtr + xmlExpNewAtom (xmlExpCtxtPtr ctxt, + const xmlChar *name, + int len); +XMLPUBFUN xmlExpNodePtr + xmlExpNewOr (xmlExpCtxtPtr ctxt, + xmlExpNodePtr left, + xmlExpNodePtr right); +XMLPUBFUN xmlExpNodePtr + xmlExpNewSeq (xmlExpCtxtPtr ctxt, + xmlExpNodePtr left, + xmlExpNodePtr right); +XMLPUBFUN xmlExpNodePtr + xmlExpNewRange (xmlExpCtxtPtr ctxt, + xmlExpNodePtr subset, + int min, + int max); +/* + * The really interesting APIs + */ +XMLPUBFUN int + xmlExpIsNillable(xmlExpNodePtr expr); +XMLPUBFUN int + xmlExpMaxToken (xmlExpNodePtr expr); +XMLPUBFUN int + xmlExpGetLanguage(xmlExpCtxtPtr ctxt, + xmlExpNodePtr expr, + const xmlChar**langList, + int len); +XMLPUBFUN int + xmlExpGetStart (xmlExpCtxtPtr ctxt, + xmlExpNodePtr expr, + const xmlChar**tokList, + int len); +XMLPUBFUN xmlExpNodePtr + xmlExpStringDerive(xmlExpCtxtPtr ctxt, + xmlExpNodePtr expr, + const xmlChar *str, + int len); +XMLPUBFUN xmlExpNodePtr + xmlExpExpDerive (xmlExpCtxtPtr ctxt, + xmlExpNodePtr expr, + xmlExpNodePtr sub); +XMLPUBFUN int + xmlExpSubsume (xmlExpCtxtPtr ctxt, + xmlExpNodePtr expr, + xmlExpNodePtr sub); +XMLPUBFUN void + xmlExpDump (xmlBufferPtr buf, + xmlExpNodePtr expr); +#endif /* LIBXML_EXPR_ENABLED */ +#ifdef __cplusplus +} +#endif + +#endif /* LIBXML_REGEXP_ENABLED */ + +#endif /*__XML_REGEXP_H__ */ diff --git a/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/include/libxml2/libxml/xmlsave.h b/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/include/libxml2/libxml/xmlsave.h new file mode 100644 index 0000000000000000000000000000000000000000..e266e467c24b282a17818a013035cfe473fe50d8 --- /dev/null +++ b/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/include/libxml2/libxml/xmlsave.h @@ -0,0 +1,102 @@ +/* + * Summary: the XML document serializer + * Description: API to save document or subtree of document + * + * Copy: See Copyright for the status of this software. + * + * Author: Daniel Veillard + */ + +#ifndef __XML_XMLSAVE_H__ +#define __XML_XMLSAVE_H__ + +#include +#include +#include +#include + +#ifdef LIBXML_OUTPUT_ENABLED +#ifdef __cplusplus +extern "C" { +#endif + +/** + * xmlSaveOption: + * + * This is the set of XML save options that can be passed down + * to the xmlSaveToFd() and similar calls. + */ +typedef enum { + XML_SAVE_FORMAT = 1<<0, /* format save output */ + XML_SAVE_NO_DECL = 1<<1, /* drop the xml declaration */ + XML_SAVE_NO_EMPTY = 1<<2, /* no empty tags */ + XML_SAVE_NO_XHTML = 1<<3, /* disable XHTML1 specific rules */ + XML_SAVE_XHTML = 1<<4, /* force XHTML1 specific rules */ + XML_SAVE_AS_XML = 1<<5, /* force XML serialization on HTML doc */ + XML_SAVE_AS_HTML = 1<<6, /* force HTML serialization on XML doc */ + XML_SAVE_WSNONSIG = 1<<7 /* format with non-significant whitespace */ +} xmlSaveOption; + + +typedef struct _xmlSaveCtxt xmlSaveCtxt; +typedef xmlSaveCtxt *xmlSaveCtxtPtr; + +XMLPUBFUN xmlSaveCtxtPtr + xmlSaveToFd (int fd, + const char *encoding, + int options); +XMLPUBFUN xmlSaveCtxtPtr + xmlSaveToFilename (const char *filename, + const char *encoding, + int options); + +XMLPUBFUN xmlSaveCtxtPtr + xmlSaveToBuffer (xmlBufferPtr buffer, + const char *encoding, + int options); + +XMLPUBFUN xmlSaveCtxtPtr + xmlSaveToIO (xmlOutputWriteCallback iowrite, + xmlOutputCloseCallback ioclose, + void *ioctx, + const char *encoding, + int options); + +XMLPUBFUN long + xmlSaveDoc (xmlSaveCtxtPtr ctxt, + xmlDocPtr doc); +XMLPUBFUN long + xmlSaveTree (xmlSaveCtxtPtr ctxt, + xmlNodePtr node); + +XMLPUBFUN int + xmlSaveFlush (xmlSaveCtxtPtr ctxt); +XMLPUBFUN int + xmlSaveClose (xmlSaveCtxtPtr ctxt); +XMLPUBFUN int + xmlSaveFinish (xmlSaveCtxtPtr ctxt); +XMLPUBFUN int + xmlSaveSetEscape (xmlSaveCtxtPtr ctxt, + xmlCharEncodingOutputFunc escape); +XMLPUBFUN int + xmlSaveSetAttrEscape (xmlSaveCtxtPtr ctxt, + xmlCharEncodingOutputFunc escape); + +XML_DEPRECATED +XMLPUBFUN int + xmlThrDefIndentTreeOutput(int v); +XML_DEPRECATED +XMLPUBFUN const char * + xmlThrDefTreeIndentString(const char * v); +XML_DEPRECATED +XMLPUBFUN int + xmlThrDefSaveNoEmptyTags(int v); + +#ifdef __cplusplus +} +#endif + +#endif /* LIBXML_OUTPUT_ENABLED */ +#endif /* __XML_XMLSAVE_H__ */ + + diff --git a/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/include/libxml2/libxml/xmlschemas.h b/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/include/libxml2/libxml/xmlschemas.h new file mode 100644 index 0000000000000000000000000000000000000000..c2af3d7098b924f0ed7bc0ab37299ae3e06d204b --- /dev/null +++ b/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/include/libxml2/libxml/xmlschemas.h @@ -0,0 +1,249 @@ +/* + * Summary: incomplete XML Schemas structure implementation + * Description: interface to the XML Schemas handling and schema validity + * checking, it is incomplete right now. + * + * Copy: See Copyright for the status of this software. + * + * Author: Daniel Veillard + */ + + +#ifndef __XML_SCHEMA_H__ +#define __XML_SCHEMA_H__ + +#include + +#ifdef LIBXML_SCHEMAS_ENABLED + +#include +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * This error codes are obsolete; not used any more. + */ +typedef enum { + XML_SCHEMAS_ERR_OK = 0, + XML_SCHEMAS_ERR_NOROOT = 1, + XML_SCHEMAS_ERR_UNDECLAREDELEM, + XML_SCHEMAS_ERR_NOTTOPLEVEL, + XML_SCHEMAS_ERR_MISSING, + XML_SCHEMAS_ERR_WRONGELEM, + XML_SCHEMAS_ERR_NOTYPE, + XML_SCHEMAS_ERR_NOROLLBACK, + XML_SCHEMAS_ERR_ISABSTRACT, + XML_SCHEMAS_ERR_NOTEMPTY, + XML_SCHEMAS_ERR_ELEMCONT, + XML_SCHEMAS_ERR_HAVEDEFAULT, + XML_SCHEMAS_ERR_NOTNILLABLE, + XML_SCHEMAS_ERR_EXTRACONTENT, + XML_SCHEMAS_ERR_INVALIDATTR, + XML_SCHEMAS_ERR_INVALIDELEM, + XML_SCHEMAS_ERR_NOTDETERMINIST, + XML_SCHEMAS_ERR_CONSTRUCT, + XML_SCHEMAS_ERR_INTERNAL, + XML_SCHEMAS_ERR_NOTSIMPLE, + XML_SCHEMAS_ERR_ATTRUNKNOWN, + XML_SCHEMAS_ERR_ATTRINVALID, + XML_SCHEMAS_ERR_VALUE, + XML_SCHEMAS_ERR_FACET, + XML_SCHEMAS_ERR_, + XML_SCHEMAS_ERR_XXX +} xmlSchemaValidError; + +/* +* ATTENTION: Change xmlSchemaSetValidOptions's check +* for invalid values, if adding to the validation +* options below. +*/ +/** + * xmlSchemaValidOption: + * + * This is the set of XML Schema validation options. + */ +typedef enum { + XML_SCHEMA_VAL_VC_I_CREATE = 1<<0 + /* Default/fixed: create an attribute node + * or an element's text node on the instance. + */ +} xmlSchemaValidOption; + +/* + XML_SCHEMA_VAL_XSI_ASSEMBLE = 1<<1, + * assemble schemata using + * xsi:schemaLocation and + * xsi:noNamespaceSchemaLocation +*/ + +/** + * The schemas related types are kept internal + */ +typedef struct _xmlSchema xmlSchema; +typedef xmlSchema *xmlSchemaPtr; + +/** + * xmlSchemaValidityErrorFunc: + * @ctx: the validation context + * @msg: the message + * @...: extra arguments + * + * Signature of an error callback from an XSD validation + */ +typedef void (*xmlSchemaValidityErrorFunc) + (void *ctx, const char *msg, ...) LIBXML_ATTR_FORMAT(2,3); + +/** + * xmlSchemaValidityWarningFunc: + * @ctx: the validation context + * @msg: the message + * @...: extra arguments + * + * Signature of a warning callback from an XSD validation + */ +typedef void (*xmlSchemaValidityWarningFunc) + (void *ctx, const char *msg, ...) LIBXML_ATTR_FORMAT(2,3); + +/** + * A schemas validation context + */ +typedef struct _xmlSchemaParserCtxt xmlSchemaParserCtxt; +typedef xmlSchemaParserCtxt *xmlSchemaParserCtxtPtr; + +typedef struct _xmlSchemaValidCtxt xmlSchemaValidCtxt; +typedef xmlSchemaValidCtxt *xmlSchemaValidCtxtPtr; + +/** + * xmlSchemaValidityLocatorFunc: + * @ctx: user provided context + * @file: returned file information + * @line: returned line information + * + * A schemas validation locator, a callback called by the validator. + * This is used when file or node information are not available + * to find out what file and line number are affected + * + * Returns: 0 in case of success and -1 in case of error + */ + +typedef int (*xmlSchemaValidityLocatorFunc) (void *ctx, + const char **file, unsigned long *line); + +/* + * Interfaces for parsing. + */ +XMLPUBFUN xmlSchemaParserCtxtPtr + xmlSchemaNewParserCtxt (const char *URL); +XMLPUBFUN xmlSchemaParserCtxtPtr + xmlSchemaNewMemParserCtxt (const char *buffer, + int size); +XMLPUBFUN xmlSchemaParserCtxtPtr + xmlSchemaNewDocParserCtxt (xmlDocPtr doc); +XMLPUBFUN void + xmlSchemaFreeParserCtxt (xmlSchemaParserCtxtPtr ctxt); +XMLPUBFUN void + xmlSchemaSetParserErrors (xmlSchemaParserCtxtPtr ctxt, + xmlSchemaValidityErrorFunc err, + xmlSchemaValidityWarningFunc warn, + void *ctx); +XMLPUBFUN void + xmlSchemaSetParserStructuredErrors(xmlSchemaParserCtxtPtr ctxt, + xmlStructuredErrorFunc serror, + void *ctx); +XMLPUBFUN int + xmlSchemaGetParserErrors(xmlSchemaParserCtxtPtr ctxt, + xmlSchemaValidityErrorFunc * err, + xmlSchemaValidityWarningFunc * warn, + void **ctx); +XMLPUBFUN int + xmlSchemaIsValid (xmlSchemaValidCtxtPtr ctxt); + +XMLPUBFUN xmlSchemaPtr + xmlSchemaParse (xmlSchemaParserCtxtPtr ctxt); +XMLPUBFUN void + xmlSchemaFree (xmlSchemaPtr schema); +#ifdef LIBXML_OUTPUT_ENABLED +XMLPUBFUN void + xmlSchemaDump (FILE *output, + xmlSchemaPtr schema); +#endif /* LIBXML_OUTPUT_ENABLED */ +/* + * Interfaces for validating + */ +XMLPUBFUN void + xmlSchemaSetValidErrors (xmlSchemaValidCtxtPtr ctxt, + xmlSchemaValidityErrorFunc err, + xmlSchemaValidityWarningFunc warn, + void *ctx); +XMLPUBFUN void + xmlSchemaSetValidStructuredErrors(xmlSchemaValidCtxtPtr ctxt, + xmlStructuredErrorFunc serror, + void *ctx); +XMLPUBFUN int + xmlSchemaGetValidErrors (xmlSchemaValidCtxtPtr ctxt, + xmlSchemaValidityErrorFunc *err, + xmlSchemaValidityWarningFunc *warn, + void **ctx); +XMLPUBFUN int + xmlSchemaSetValidOptions (xmlSchemaValidCtxtPtr ctxt, + int options); +XMLPUBFUN void + xmlSchemaValidateSetFilename(xmlSchemaValidCtxtPtr vctxt, + const char *filename); +XMLPUBFUN int + xmlSchemaValidCtxtGetOptions(xmlSchemaValidCtxtPtr ctxt); + +XMLPUBFUN xmlSchemaValidCtxtPtr + xmlSchemaNewValidCtxt (xmlSchemaPtr schema); +XMLPUBFUN void + xmlSchemaFreeValidCtxt (xmlSchemaValidCtxtPtr ctxt); +XMLPUBFUN int + xmlSchemaValidateDoc (xmlSchemaValidCtxtPtr ctxt, + xmlDocPtr instance); +XMLPUBFUN int + xmlSchemaValidateOneElement (xmlSchemaValidCtxtPtr ctxt, + xmlNodePtr elem); +XMLPUBFUN int + xmlSchemaValidateStream (xmlSchemaValidCtxtPtr ctxt, + xmlParserInputBufferPtr input, + xmlCharEncoding enc, + xmlSAXHandlerPtr sax, + void *user_data); +XMLPUBFUN int + xmlSchemaValidateFile (xmlSchemaValidCtxtPtr ctxt, + const char * filename, + int options); + +XMLPUBFUN xmlParserCtxtPtr + xmlSchemaValidCtxtGetParserCtxt(xmlSchemaValidCtxtPtr ctxt); + +/* + * Interface to insert Schemas SAX validation in a SAX stream + */ +typedef struct _xmlSchemaSAXPlug xmlSchemaSAXPlugStruct; +typedef xmlSchemaSAXPlugStruct *xmlSchemaSAXPlugPtr; + +XMLPUBFUN xmlSchemaSAXPlugPtr + xmlSchemaSAXPlug (xmlSchemaValidCtxtPtr ctxt, + xmlSAXHandlerPtr *sax, + void **user_data); +XMLPUBFUN int + xmlSchemaSAXUnplug (xmlSchemaSAXPlugPtr plug); + + +XMLPUBFUN void + xmlSchemaValidateSetLocator (xmlSchemaValidCtxtPtr vctxt, + xmlSchemaValidityLocatorFunc f, + void *ctxt); + +#ifdef __cplusplus +} +#endif + +#endif /* LIBXML_SCHEMAS_ENABLED */ +#endif /* __XML_SCHEMA_H__ */ diff --git a/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/include/libxml2/libxml/xmlschemastypes.h b/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/include/libxml2/libxml/xmlschemastypes.h new file mode 100644 index 0000000000000000000000000000000000000000..e2cde35707c5d14f4bdab4d0a6750719d52edda6 --- /dev/null +++ b/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/include/libxml2/libxml/xmlschemastypes.h @@ -0,0 +1,152 @@ +/* + * Summary: implementation of XML Schema Datatypes + * Description: module providing the XML Schema Datatypes implementation + * both definition and validity checking + * + * Copy: See Copyright for the status of this software. + * + * Author: Daniel Veillard + */ + + +#ifndef __XML_SCHEMA_TYPES_H__ +#define __XML_SCHEMA_TYPES_H__ + +#include + +#ifdef LIBXML_SCHEMAS_ENABLED + +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +typedef enum { + XML_SCHEMA_WHITESPACE_UNKNOWN = 0, + XML_SCHEMA_WHITESPACE_PRESERVE = 1, + XML_SCHEMA_WHITESPACE_REPLACE = 2, + XML_SCHEMA_WHITESPACE_COLLAPSE = 3 +} xmlSchemaWhitespaceValueType; + +XMLPUBFUN int + xmlSchemaInitTypes (void); +XML_DEPRECATED +XMLPUBFUN void + xmlSchemaCleanupTypes (void); +XMLPUBFUN xmlSchemaTypePtr + xmlSchemaGetPredefinedType (const xmlChar *name, + const xmlChar *ns); +XMLPUBFUN int + xmlSchemaValidatePredefinedType (xmlSchemaTypePtr type, + const xmlChar *value, + xmlSchemaValPtr *val); +XMLPUBFUN int + xmlSchemaValPredefTypeNode (xmlSchemaTypePtr type, + const xmlChar *value, + xmlSchemaValPtr *val, + xmlNodePtr node); +XMLPUBFUN int + xmlSchemaValidateFacet (xmlSchemaTypePtr base, + xmlSchemaFacetPtr facet, + const xmlChar *value, + xmlSchemaValPtr val); +XMLPUBFUN int + xmlSchemaValidateFacetWhtsp (xmlSchemaFacetPtr facet, + xmlSchemaWhitespaceValueType fws, + xmlSchemaValType valType, + const xmlChar *value, + xmlSchemaValPtr val, + xmlSchemaWhitespaceValueType ws); +XMLPUBFUN void + xmlSchemaFreeValue (xmlSchemaValPtr val); +XMLPUBFUN xmlSchemaFacetPtr + xmlSchemaNewFacet (void); +XMLPUBFUN int + xmlSchemaCheckFacet (xmlSchemaFacetPtr facet, + xmlSchemaTypePtr typeDecl, + xmlSchemaParserCtxtPtr ctxt, + const xmlChar *name); +XMLPUBFUN void + xmlSchemaFreeFacet (xmlSchemaFacetPtr facet); +XMLPUBFUN int + xmlSchemaCompareValues (xmlSchemaValPtr x, + xmlSchemaValPtr y); +XMLPUBFUN xmlSchemaTypePtr + xmlSchemaGetBuiltInListSimpleTypeItemType (xmlSchemaTypePtr type); +XMLPUBFUN int + xmlSchemaValidateListSimpleTypeFacet (xmlSchemaFacetPtr facet, + const xmlChar *value, + unsigned long actualLen, + unsigned long *expectedLen); +XMLPUBFUN xmlSchemaTypePtr + xmlSchemaGetBuiltInType (xmlSchemaValType type); +XMLPUBFUN int + xmlSchemaIsBuiltInTypeFacet (xmlSchemaTypePtr type, + int facetType); +XMLPUBFUN xmlChar * + xmlSchemaCollapseString (const xmlChar *value); +XMLPUBFUN xmlChar * + xmlSchemaWhiteSpaceReplace (const xmlChar *value); +XMLPUBFUN unsigned long + xmlSchemaGetFacetValueAsULong (xmlSchemaFacetPtr facet); +XMLPUBFUN int + xmlSchemaValidateLengthFacet (xmlSchemaTypePtr type, + xmlSchemaFacetPtr facet, + const xmlChar *value, + xmlSchemaValPtr val, + unsigned long *length); +XMLPUBFUN int + xmlSchemaValidateLengthFacetWhtsp(xmlSchemaFacetPtr facet, + xmlSchemaValType valType, + const xmlChar *value, + xmlSchemaValPtr val, + unsigned long *length, + xmlSchemaWhitespaceValueType ws); +XMLPUBFUN int + xmlSchemaValPredefTypeNodeNoNorm(xmlSchemaTypePtr type, + const xmlChar *value, + xmlSchemaValPtr *val, + xmlNodePtr node); +XMLPUBFUN int + xmlSchemaGetCanonValue (xmlSchemaValPtr val, + const xmlChar **retValue); +XMLPUBFUN int + xmlSchemaGetCanonValueWhtsp (xmlSchemaValPtr val, + const xmlChar **retValue, + xmlSchemaWhitespaceValueType ws); +XMLPUBFUN int + xmlSchemaValueAppend (xmlSchemaValPtr prev, + xmlSchemaValPtr cur); +XMLPUBFUN xmlSchemaValPtr + xmlSchemaValueGetNext (xmlSchemaValPtr cur); +XMLPUBFUN const xmlChar * + xmlSchemaValueGetAsString (xmlSchemaValPtr val); +XMLPUBFUN int + xmlSchemaValueGetAsBoolean (xmlSchemaValPtr val); +XMLPUBFUN xmlSchemaValPtr + xmlSchemaNewStringValue (xmlSchemaValType type, + const xmlChar *value); +XMLPUBFUN xmlSchemaValPtr + xmlSchemaNewNOTATIONValue (const xmlChar *name, + const xmlChar *ns); +XMLPUBFUN xmlSchemaValPtr + xmlSchemaNewQNameValue (const xmlChar *namespaceName, + const xmlChar *localName); +XMLPUBFUN int + xmlSchemaCompareValuesWhtsp (xmlSchemaValPtr x, + xmlSchemaWhitespaceValueType xws, + xmlSchemaValPtr y, + xmlSchemaWhitespaceValueType yws); +XMLPUBFUN xmlSchemaValPtr + xmlSchemaCopyValue (xmlSchemaValPtr val); +XMLPUBFUN xmlSchemaValType + xmlSchemaGetValType (xmlSchemaValPtr val); + +#ifdef __cplusplus +} +#endif + +#endif /* LIBXML_SCHEMAS_ENABLED */ +#endif /* __XML_SCHEMA_TYPES_H__ */ diff --git a/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/include/libxml2/libxml/xmlstring.h b/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/include/libxml2/libxml/xmlstring.h new file mode 100644 index 0000000000000000000000000000000000000000..db11a0b0e50482acf67efd6b9c7ca03879648d45 --- /dev/null +++ b/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/include/libxml2/libxml/xmlstring.h @@ -0,0 +1,140 @@ +/* + * Summary: set of routines to process strings + * Description: type and interfaces needed for the internal string handling + * of the library, especially UTF8 processing. + * + * Copy: See Copyright for the status of this software. + * + * Author: Daniel Veillard + */ + +#ifndef __XML_STRING_H__ +#define __XML_STRING_H__ + +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * xmlChar: + * + * This is a basic byte in an UTF-8 encoded string. + * It's unsigned allowing to pinpoint case where char * are assigned + * to xmlChar * (possibly making serialization back impossible). + */ +typedef unsigned char xmlChar; + +/** + * BAD_CAST: + * + * Macro to cast a string to an xmlChar * when one know its safe. + */ +#define BAD_CAST (xmlChar *) + +/* + * xmlChar handling + */ +XMLPUBFUN xmlChar * + xmlStrdup (const xmlChar *cur); +XMLPUBFUN xmlChar * + xmlStrndup (const xmlChar *cur, + int len); +XMLPUBFUN xmlChar * + xmlCharStrndup (const char *cur, + int len); +XMLPUBFUN xmlChar * + xmlCharStrdup (const char *cur); +XMLPUBFUN xmlChar * + xmlStrsub (const xmlChar *str, + int start, + int len); +XMLPUBFUN const xmlChar * + xmlStrchr (const xmlChar *str, + xmlChar val); +XMLPUBFUN const xmlChar * + xmlStrstr (const xmlChar *str, + const xmlChar *val); +XMLPUBFUN const xmlChar * + xmlStrcasestr (const xmlChar *str, + const xmlChar *val); +XMLPUBFUN int + xmlStrcmp (const xmlChar *str1, + const xmlChar *str2); +XMLPUBFUN int + xmlStrncmp (const xmlChar *str1, + const xmlChar *str2, + int len); +XMLPUBFUN int + xmlStrcasecmp (const xmlChar *str1, + const xmlChar *str2); +XMLPUBFUN int + xmlStrncasecmp (const xmlChar *str1, + const xmlChar *str2, + int len); +XMLPUBFUN int + xmlStrEqual (const xmlChar *str1, + const xmlChar *str2); +XMLPUBFUN int + xmlStrQEqual (const xmlChar *pref, + const xmlChar *name, + const xmlChar *str); +XMLPUBFUN int + xmlStrlen (const xmlChar *str); +XMLPUBFUN xmlChar * + xmlStrcat (xmlChar *cur, + const xmlChar *add); +XMLPUBFUN xmlChar * + xmlStrncat (xmlChar *cur, + const xmlChar *add, + int len); +XMLPUBFUN xmlChar * + xmlStrncatNew (const xmlChar *str1, + const xmlChar *str2, + int len); +XMLPUBFUN int + xmlStrPrintf (xmlChar *buf, + int len, + const char *msg, + ...) LIBXML_ATTR_FORMAT(3,4); +XMLPUBFUN int + xmlStrVPrintf (xmlChar *buf, + int len, + const char *msg, + va_list ap) LIBXML_ATTR_FORMAT(3,0); + +XMLPUBFUN int + xmlGetUTF8Char (const unsigned char *utf, + int *len); +XMLPUBFUN int + xmlCheckUTF8 (const unsigned char *utf); +XMLPUBFUN int + xmlUTF8Strsize (const xmlChar *utf, + int len); +XMLPUBFUN xmlChar * + xmlUTF8Strndup (const xmlChar *utf, + int len); +XMLPUBFUN const xmlChar * + xmlUTF8Strpos (const xmlChar *utf, + int pos); +XMLPUBFUN int + xmlUTF8Strloc (const xmlChar *utf, + const xmlChar *utfchar); +XMLPUBFUN xmlChar * + xmlUTF8Strsub (const xmlChar *utf, + int start, + int len); +XMLPUBFUN int + xmlUTF8Strlen (const xmlChar *utf); +XMLPUBFUN int + xmlUTF8Size (const xmlChar *utf); +XMLPUBFUN int + xmlUTF8Charcmp (const xmlChar *utf1, + const xmlChar *utf2); + +#ifdef __cplusplus +} +#endif +#endif /* __XML_STRING_H__ */ diff --git a/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/include/libxml2/libxml/xmlunicode.h b/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/include/libxml2/libxml/xmlunicode.h new file mode 100644 index 0000000000000000000000000000000000000000..b6d795b267d50c22553caed286ec2aea1803a336 --- /dev/null +++ b/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/include/libxml2/libxml/xmlunicode.h @@ -0,0 +1,366 @@ +/* + * Summary: Unicode character APIs + * Description: API for the Unicode character APIs + * + * This file is automatically generated from the + * UCS description files of the Unicode Character Database + * http://www.unicode.org/Public/4.0-Update1/UCD-4.0.1.html + * using the genUnicode.py Python script. + * + * Generation date: Tue Apr 30 17:30:38 2024 + * Sources: Blocks-4.0.1.txt UnicodeData-4.0.1.txt + * Author: Daniel Veillard + */ + +#ifndef __XML_UNICODE_H__ +#define __XML_UNICODE_H__ + +#include + +#ifdef LIBXML_UNICODE_ENABLED + +#ifdef __cplusplus +extern "C" { +#endif + +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsAegeanNumbers (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsAlphabeticPresentationForms (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsArabic (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsArabicPresentationFormsA (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsArabicPresentationFormsB (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsArmenian (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsArrows (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsBasicLatin (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsBengali (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsBlockElements (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsBopomofo (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsBopomofoExtended (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsBoxDrawing (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsBraillePatterns (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsBuhid (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsByzantineMusicalSymbols (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsCJKCompatibility (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsCJKCompatibilityForms (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsCJKCompatibilityIdeographs (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsCJKCompatibilityIdeographsSupplement (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsCJKRadicalsSupplement (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsCJKSymbolsandPunctuation (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsCJKUnifiedIdeographs (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsCJKUnifiedIdeographsExtensionA (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsCJKUnifiedIdeographsExtensionB (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsCherokee (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsCombiningDiacriticalMarks (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsCombiningDiacriticalMarksforSymbols (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsCombiningHalfMarks (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsCombiningMarksforSymbols (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsControlPictures (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsCurrencySymbols (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsCypriotSyllabary (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsCyrillic (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsCyrillicSupplement (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsDeseret (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsDevanagari (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsDingbats (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsEnclosedAlphanumerics (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsEnclosedCJKLettersandMonths (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsEthiopic (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsGeneralPunctuation (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsGeometricShapes (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsGeorgian (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsGothic (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsGreek (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsGreekExtended (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsGreekandCoptic (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsGujarati (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsGurmukhi (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsHalfwidthandFullwidthForms (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsHangulCompatibilityJamo (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsHangulJamo (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsHangulSyllables (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsHanunoo (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsHebrew (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsHighPrivateUseSurrogates (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsHighSurrogates (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsHiragana (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsIPAExtensions (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsIdeographicDescriptionCharacters (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsKanbun (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsKangxiRadicals (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsKannada (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsKatakana (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsKatakanaPhoneticExtensions (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsKhmer (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsKhmerSymbols (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsLao (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsLatin1Supplement (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsLatinExtendedA (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsLatinExtendedB (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsLatinExtendedAdditional (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsLetterlikeSymbols (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsLimbu (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsLinearBIdeograms (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsLinearBSyllabary (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsLowSurrogates (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsMalayalam (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsMathematicalAlphanumericSymbols (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsMathematicalOperators (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsMiscellaneousMathematicalSymbolsA (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsMiscellaneousMathematicalSymbolsB (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsMiscellaneousSymbols (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsMiscellaneousSymbolsandArrows (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsMiscellaneousTechnical (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsMongolian (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsMusicalSymbols (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsMyanmar (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsNumberForms (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsOgham (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsOldItalic (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsOpticalCharacterRecognition (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsOriya (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsOsmanya (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsPhoneticExtensions (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsPrivateUse (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsPrivateUseArea (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsRunic (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsShavian (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsSinhala (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsSmallFormVariants (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsSpacingModifierLetters (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsSpecials (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsSuperscriptsandSubscripts (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsSupplementalArrowsA (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsSupplementalArrowsB (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsSupplementalMathematicalOperators (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsSupplementaryPrivateUseAreaA (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsSupplementaryPrivateUseAreaB (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsSyriac (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsTagalog (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsTagbanwa (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsTags (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsTaiLe (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsTaiXuanJingSymbols (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsTamil (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsTelugu (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsThaana (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsThai (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsTibetan (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsUgaritic (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsUnifiedCanadianAboriginalSyllabics (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsVariationSelectors (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsVariationSelectorsSupplement (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsYiRadicals (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsYiSyllables (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsYijingHexagramSymbols (int code); + +XMLPUBFUN int xmlUCSIsBlock (int code, const char *block); + +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsCatC (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsCatCc (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsCatCf (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsCatCo (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsCatCs (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsCatL (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsCatLl (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsCatLm (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsCatLo (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsCatLt (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsCatLu (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsCatM (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsCatMc (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsCatMe (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsCatMn (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsCatN (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsCatNd (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsCatNl (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsCatNo (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsCatP (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsCatPc (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsCatPd (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsCatPe (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsCatPf (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsCatPi (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsCatPo (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsCatPs (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsCatS (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsCatSc (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsCatSk (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsCatSm (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsCatSo (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsCatZ (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsCatZl (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsCatZp (int code); +XML_DEPRECATED +XMLPUBFUN int xmlUCSIsCatZs (int code); + +XMLPUBFUN int xmlUCSIsCat (int code, const char *cat); + +#ifdef __cplusplus +} +#endif + +#endif /* LIBXML_UNICODE_ENABLED */ + +#endif /* __XML_UNICODE_H__ */ diff --git a/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/include/libxml2/libxml/xmlversion.h b/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/include/libxml2/libxml/xmlversion.h new file mode 100644 index 0000000000000000000000000000000000000000..3793cee26e095f9edd53c48b741a53259fabe2d0 --- /dev/null +++ b/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/include/libxml2/libxml/xmlversion.h @@ -0,0 +1,347 @@ +/* + * Summary: compile-time version information + * Description: compile-time version information for the XML library + * + * Copy: See Copyright for the status of this software. + * + * Author: Daniel Veillard + */ + +#ifndef __XML_VERSION_H__ +#define __XML_VERSION_H__ + +/** + * LIBXML_DOTTED_VERSION: + * + * the version string like "1.2.3" + */ +#define LIBXML_DOTTED_VERSION "2.13.9" + +/** + * LIBXML_VERSION: + * + * the version number: 1.2.3 value is 10203 + */ +#define LIBXML_VERSION 21309 + +/** + * LIBXML_VERSION_STRING: + * + * the version number string, 1.2.3 value is "10203" + */ +#define LIBXML_VERSION_STRING "21309" + +/** + * LIBXML_VERSION_EXTRA: + * + * extra version information, used to show a git commit description + */ +#define LIBXML_VERSION_EXTRA "" + +/** + * LIBXML_TEST_VERSION: + * + * Macro to check that the libxml version in use is compatible with + * the version the software has been compiled against + */ +#define LIBXML_TEST_VERSION xmlCheckVersion(21309); + +/** + * LIBXML_THREAD_ENABLED: + * + * Whether the thread support is configured in + */ +#if 1 +#define LIBXML_THREAD_ENABLED +#endif + +/** + * LIBXML_THREAD_ALLOC_ENABLED: + * + * Whether the allocation hooks are per-thread + */ +#if 0 +#define LIBXML_THREAD_ALLOC_ENABLED +#endif + +/** + * LIBXML_TREE_ENABLED: + * + * Whether the DOM like tree manipulation API support is configured in + */ +#if 1 +#define LIBXML_TREE_ENABLED +#endif + +/** + * LIBXML_OUTPUT_ENABLED: + * + * Whether the serialization/saving support is configured in + */ +#if 1 +#define LIBXML_OUTPUT_ENABLED +#endif + +/** + * LIBXML_PUSH_ENABLED: + * + * Whether the push parsing interfaces are configured in + */ +#if 1 +#define LIBXML_PUSH_ENABLED +#endif + +/** + * LIBXML_READER_ENABLED: + * + * Whether the xmlReader parsing interface is configured in + */ +#if 1 +#define LIBXML_READER_ENABLED +#endif + +/** + * LIBXML_PATTERN_ENABLED: + * + * Whether the xmlPattern node selection interface is configured in + */ +#if 1 +#define LIBXML_PATTERN_ENABLED +#endif + +/** + * LIBXML_WRITER_ENABLED: + * + * Whether the xmlWriter saving interface is configured in + */ +#if 1 +#define LIBXML_WRITER_ENABLED +#endif + +/** + * LIBXML_SAX1_ENABLED: + * + * Whether the older SAX1 interface is configured in + */ +#if 1 +#define LIBXML_SAX1_ENABLED +#endif + +/** + * LIBXML_FTP_ENABLED: + * + * Whether the FTP support is configured in + */ +#if 0 +#define LIBXML_FTP_ENABLED +#endif + +/** + * LIBXML_HTTP_ENABLED: + * + * Whether the HTTP support is configured in + */ +#if 1 +#define LIBXML_HTTP_ENABLED +#endif + +/** + * LIBXML_VALID_ENABLED: + * + * Whether the DTD validation support is configured in + */ +#if 1 +#define LIBXML_VALID_ENABLED +#endif + +/** + * LIBXML_HTML_ENABLED: + * + * Whether the HTML support is configured in + */ +#if 1 +#define LIBXML_HTML_ENABLED +#endif + +/** + * LIBXML_LEGACY_ENABLED: + * + * Whether the deprecated APIs are compiled in for compatibility + */ +#if 1 +#define LIBXML_LEGACY_ENABLED +#endif + +/** + * LIBXML_C14N_ENABLED: + * + * Whether the Canonicalization support is configured in + */ +#if 1 +#define LIBXML_C14N_ENABLED +#endif + +/** + * LIBXML_CATALOG_ENABLED: + * + * Whether the Catalog support is configured in + */ +#if 1 +#define LIBXML_CATALOG_ENABLED +#endif + +/** + * LIBXML_XPATH_ENABLED: + * + * Whether XPath is configured in + */ +#if 1 +#define LIBXML_XPATH_ENABLED +#endif + +/** + * LIBXML_XPTR_ENABLED: + * + * Whether XPointer is configured in + */ +#if 1 +#define LIBXML_XPTR_ENABLED +#endif + +/** + * LIBXML_XPTR_LOCS_ENABLED: + * + * Whether support for XPointer locations is configured in + */ +#if 0 +#define LIBXML_XPTR_LOCS_ENABLED +#endif + +/** + * LIBXML_XINCLUDE_ENABLED: + * + * Whether XInclude is configured in + */ +#if 1 +#define LIBXML_XINCLUDE_ENABLED +#endif + +/** + * LIBXML_ICONV_ENABLED: + * + * Whether iconv support is available + */ +#if 1 +#define LIBXML_ICONV_ENABLED +#endif + +/** + * LIBXML_ICU_ENABLED: + * + * Whether icu support is available + */ +#if 1 +#define LIBXML_ICU_ENABLED +#endif + +/** + * LIBXML_ISO8859X_ENABLED: + * + * Whether ISO-8859-* support is made available in case iconv is not + */ +#if 1 +#define LIBXML_ISO8859X_ENABLED +#endif + +/** + * LIBXML_DEBUG_ENABLED: + * + * Whether Debugging module is configured in + */ +#if 1 +#define LIBXML_DEBUG_ENABLED +#endif + +/** + * LIBXML_UNICODE_ENABLED: + * + * Whether the Unicode related interfaces are compiled in + */ +#if 1 +#define LIBXML_UNICODE_ENABLED +#endif + +/** + * LIBXML_REGEXP_ENABLED: + * + * Whether the regular expressions interfaces are compiled in + */ +#if 1 +#define LIBXML_REGEXP_ENABLED +#endif + +/** + * LIBXML_AUTOMATA_ENABLED: + * + * Whether the automata interfaces are compiled in + */ +#if 1 +#define LIBXML_AUTOMATA_ENABLED +#endif + +/** + * LIBXML_SCHEMAS_ENABLED: + * + * Whether the Schemas validation interfaces are compiled in + */ +#if 1 +#define LIBXML_SCHEMAS_ENABLED +#endif + +/** + * LIBXML_SCHEMATRON_ENABLED: + * + * Whether the Schematron validation interfaces are compiled in + */ +#if 1 +#define LIBXML_SCHEMATRON_ENABLED +#endif + +/** + * LIBXML_MODULES_ENABLED: + * + * Whether the module interfaces are compiled in + */ +#if 1 +#define LIBXML_MODULES_ENABLED +/** + * LIBXML_MODULE_EXTENSION: + * + * the string suffix used by dynamic modules (usually shared libraries) + */ +#define LIBXML_MODULE_EXTENSION ".so" +#endif + +/** + * LIBXML_ZLIB_ENABLED: + * + * Whether the Zlib support is compiled in + */ +#if 1 +#define LIBXML_ZLIB_ENABLED +#endif + +/** + * LIBXML_LZMA_ENABLED: + * + * Whether the Lzma support is compiled in + */ +#if 1 +#define LIBXML_LZMA_ENABLED +#endif + +#include + +#endif + + diff --git a/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/include/libxml2/libxml/xmlwriter.h b/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/include/libxml2/libxml/xmlwriter.h new file mode 100644 index 0000000000000000000000000000000000000000..55f88bc71f0c55d0d162a398bc5300dc87290f1b --- /dev/null +++ b/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/include/libxml2/libxml/xmlwriter.h @@ -0,0 +1,489 @@ +/* + * Summary: text writing API for XML + * Description: text writing API for XML + * + * Copy: See Copyright for the status of this software. + * + * Author: Alfred Mickautsch + */ + +#ifndef __XML_XMLWRITER_H__ +#define __XML_XMLWRITER_H__ + +#include + +#ifdef LIBXML_WRITER_ENABLED + +#include +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + + typedef struct _xmlTextWriter xmlTextWriter; + typedef xmlTextWriter *xmlTextWriterPtr; + +/* + * Constructors & Destructor + */ + XMLPUBFUN xmlTextWriterPtr + xmlNewTextWriter(xmlOutputBufferPtr out); + XMLPUBFUN xmlTextWriterPtr + xmlNewTextWriterFilename(const char *uri, int compression); + XMLPUBFUN xmlTextWriterPtr + xmlNewTextWriterMemory(xmlBufferPtr buf, int compression); + XMLPUBFUN xmlTextWriterPtr + xmlNewTextWriterPushParser(xmlParserCtxtPtr ctxt, int compression); + XMLPUBFUN xmlTextWriterPtr + xmlNewTextWriterDoc(xmlDocPtr * doc, int compression); + XMLPUBFUN xmlTextWriterPtr + xmlNewTextWriterTree(xmlDocPtr doc, xmlNodePtr node, + int compression); + XMLPUBFUN void xmlFreeTextWriter(xmlTextWriterPtr writer); + +/* + * Functions + */ + + +/* + * Document + */ + XMLPUBFUN int + xmlTextWriterStartDocument(xmlTextWriterPtr writer, + const char *version, + const char *encoding, + const char *standalone); + XMLPUBFUN int xmlTextWriterEndDocument(xmlTextWriterPtr + writer); + +/* + * Comments + */ + XMLPUBFUN int xmlTextWriterStartComment(xmlTextWriterPtr + writer); + XMLPUBFUN int xmlTextWriterEndComment(xmlTextWriterPtr writer); + XMLPUBFUN int + xmlTextWriterWriteFormatComment(xmlTextWriterPtr writer, + const char *format, ...) + LIBXML_ATTR_FORMAT(2,3); + XMLPUBFUN int + xmlTextWriterWriteVFormatComment(xmlTextWriterPtr writer, + const char *format, + va_list argptr) + LIBXML_ATTR_FORMAT(2,0); + XMLPUBFUN int xmlTextWriterWriteComment(xmlTextWriterPtr + writer, + const xmlChar * + content); + +/* + * Elements + */ + XMLPUBFUN int + xmlTextWriterStartElement(xmlTextWriterPtr writer, + const xmlChar * name); + XMLPUBFUN int xmlTextWriterStartElementNS(xmlTextWriterPtr + writer, + const xmlChar * + prefix, + const xmlChar * name, + const xmlChar * + namespaceURI); + XMLPUBFUN int xmlTextWriterEndElement(xmlTextWriterPtr writer); + XMLPUBFUN int xmlTextWriterFullEndElement(xmlTextWriterPtr + writer); + +/* + * Elements conveniency functions + */ + XMLPUBFUN int + xmlTextWriterWriteFormatElement(xmlTextWriterPtr writer, + const xmlChar * name, + const char *format, ...) + LIBXML_ATTR_FORMAT(3,4); + XMLPUBFUN int + xmlTextWriterWriteVFormatElement(xmlTextWriterPtr writer, + const xmlChar * name, + const char *format, + va_list argptr) + LIBXML_ATTR_FORMAT(3,0); + XMLPUBFUN int xmlTextWriterWriteElement(xmlTextWriterPtr + writer, + const xmlChar * name, + const xmlChar * + content); + XMLPUBFUN int + xmlTextWriterWriteFormatElementNS(xmlTextWriterPtr writer, + const xmlChar * prefix, + const xmlChar * name, + const xmlChar * namespaceURI, + const char *format, ...) + LIBXML_ATTR_FORMAT(5,6); + XMLPUBFUN int + xmlTextWriterWriteVFormatElementNS(xmlTextWriterPtr writer, + const xmlChar * prefix, + const xmlChar * name, + const xmlChar * namespaceURI, + const char *format, + va_list argptr) + LIBXML_ATTR_FORMAT(5,0); + XMLPUBFUN int xmlTextWriterWriteElementNS(xmlTextWriterPtr + writer, + const xmlChar * + prefix, + const xmlChar * name, + const xmlChar * + namespaceURI, + const xmlChar * + content); + +/* + * Text + */ + XMLPUBFUN int + xmlTextWriterWriteFormatRaw(xmlTextWriterPtr writer, + const char *format, ...) + LIBXML_ATTR_FORMAT(2,3); + XMLPUBFUN int + xmlTextWriterWriteVFormatRaw(xmlTextWriterPtr writer, + const char *format, va_list argptr) + LIBXML_ATTR_FORMAT(2,0); + XMLPUBFUN int + xmlTextWriterWriteRawLen(xmlTextWriterPtr writer, + const xmlChar * content, int len); + XMLPUBFUN int + xmlTextWriterWriteRaw(xmlTextWriterPtr writer, + const xmlChar * content); + XMLPUBFUN int xmlTextWriterWriteFormatString(xmlTextWriterPtr + writer, + const char + *format, ...) + LIBXML_ATTR_FORMAT(2,3); + XMLPUBFUN int xmlTextWriterWriteVFormatString(xmlTextWriterPtr + writer, + const char + *format, + va_list argptr) + LIBXML_ATTR_FORMAT(2,0); + XMLPUBFUN int xmlTextWriterWriteString(xmlTextWriterPtr writer, + const xmlChar * + content); + XMLPUBFUN int xmlTextWriterWriteBase64(xmlTextWriterPtr writer, + const char *data, + int start, int len); + XMLPUBFUN int xmlTextWriterWriteBinHex(xmlTextWriterPtr writer, + const char *data, + int start, int len); + +/* + * Attributes + */ + XMLPUBFUN int + xmlTextWriterStartAttribute(xmlTextWriterPtr writer, + const xmlChar * name); + XMLPUBFUN int xmlTextWriterStartAttributeNS(xmlTextWriterPtr + writer, + const xmlChar * + prefix, + const xmlChar * + name, + const xmlChar * + namespaceURI); + XMLPUBFUN int xmlTextWriterEndAttribute(xmlTextWriterPtr + writer); + +/* + * Attributes conveniency functions + */ + XMLPUBFUN int + xmlTextWriterWriteFormatAttribute(xmlTextWriterPtr writer, + const xmlChar * name, + const char *format, ...) + LIBXML_ATTR_FORMAT(3,4); + XMLPUBFUN int + xmlTextWriterWriteVFormatAttribute(xmlTextWriterPtr writer, + const xmlChar * name, + const char *format, + va_list argptr) + LIBXML_ATTR_FORMAT(3,0); + XMLPUBFUN int xmlTextWriterWriteAttribute(xmlTextWriterPtr + writer, + const xmlChar * name, + const xmlChar * + content); + XMLPUBFUN int + xmlTextWriterWriteFormatAttributeNS(xmlTextWriterPtr writer, + const xmlChar * prefix, + const xmlChar * name, + const xmlChar * namespaceURI, + const char *format, ...) + LIBXML_ATTR_FORMAT(5,6); + XMLPUBFUN int + xmlTextWriterWriteVFormatAttributeNS(xmlTextWriterPtr writer, + const xmlChar * prefix, + const xmlChar * name, + const xmlChar * namespaceURI, + const char *format, + va_list argptr) + LIBXML_ATTR_FORMAT(5,0); + XMLPUBFUN int xmlTextWriterWriteAttributeNS(xmlTextWriterPtr + writer, + const xmlChar * + prefix, + const xmlChar * + name, + const xmlChar * + namespaceURI, + const xmlChar * + content); + +/* + * PI's + */ + XMLPUBFUN int + xmlTextWriterStartPI(xmlTextWriterPtr writer, + const xmlChar * target); + XMLPUBFUN int xmlTextWriterEndPI(xmlTextWriterPtr writer); + +/* + * PI conveniency functions + */ + XMLPUBFUN int + xmlTextWriterWriteFormatPI(xmlTextWriterPtr writer, + const xmlChar * target, + const char *format, ...) + LIBXML_ATTR_FORMAT(3,4); + XMLPUBFUN int + xmlTextWriterWriteVFormatPI(xmlTextWriterPtr writer, + const xmlChar * target, + const char *format, va_list argptr) + LIBXML_ATTR_FORMAT(3,0); + XMLPUBFUN int + xmlTextWriterWritePI(xmlTextWriterPtr writer, + const xmlChar * target, + const xmlChar * content); + +/** + * xmlTextWriterWriteProcessingInstruction: + * + * This macro maps to xmlTextWriterWritePI + */ +#define xmlTextWriterWriteProcessingInstruction xmlTextWriterWritePI + +/* + * CDATA + */ + XMLPUBFUN int xmlTextWriterStartCDATA(xmlTextWriterPtr writer); + XMLPUBFUN int xmlTextWriterEndCDATA(xmlTextWriterPtr writer); + +/* + * CDATA conveniency functions + */ + XMLPUBFUN int + xmlTextWriterWriteFormatCDATA(xmlTextWriterPtr writer, + const char *format, ...) + LIBXML_ATTR_FORMAT(2,3); + XMLPUBFUN int + xmlTextWriterWriteVFormatCDATA(xmlTextWriterPtr writer, + const char *format, va_list argptr) + LIBXML_ATTR_FORMAT(2,0); + XMLPUBFUN int + xmlTextWriterWriteCDATA(xmlTextWriterPtr writer, + const xmlChar * content); + +/* + * DTD + */ + XMLPUBFUN int + xmlTextWriterStartDTD(xmlTextWriterPtr writer, + const xmlChar * name, + const xmlChar * pubid, + const xmlChar * sysid); + XMLPUBFUN int xmlTextWriterEndDTD(xmlTextWriterPtr writer); + +/* + * DTD conveniency functions + */ + XMLPUBFUN int + xmlTextWriterWriteFormatDTD(xmlTextWriterPtr writer, + const xmlChar * name, + const xmlChar * pubid, + const xmlChar * sysid, + const char *format, ...) + LIBXML_ATTR_FORMAT(5,6); + XMLPUBFUN int + xmlTextWriterWriteVFormatDTD(xmlTextWriterPtr writer, + const xmlChar * name, + const xmlChar * pubid, + const xmlChar * sysid, + const char *format, va_list argptr) + LIBXML_ATTR_FORMAT(5,0); + XMLPUBFUN int + xmlTextWriterWriteDTD(xmlTextWriterPtr writer, + const xmlChar * name, + const xmlChar * pubid, + const xmlChar * sysid, + const xmlChar * subset); + +/** + * xmlTextWriterWriteDocType: + * + * this macro maps to xmlTextWriterWriteDTD + */ +#define xmlTextWriterWriteDocType xmlTextWriterWriteDTD + +/* + * DTD element definition + */ + XMLPUBFUN int + xmlTextWriterStartDTDElement(xmlTextWriterPtr writer, + const xmlChar * name); + XMLPUBFUN int xmlTextWriterEndDTDElement(xmlTextWriterPtr + writer); + +/* + * DTD element definition conveniency functions + */ + XMLPUBFUN int + xmlTextWriterWriteFormatDTDElement(xmlTextWriterPtr writer, + const xmlChar * name, + const char *format, ...) + LIBXML_ATTR_FORMAT(3,4); + XMLPUBFUN int + xmlTextWriterWriteVFormatDTDElement(xmlTextWriterPtr writer, + const xmlChar * name, + const char *format, + va_list argptr) + LIBXML_ATTR_FORMAT(3,0); + XMLPUBFUN int xmlTextWriterWriteDTDElement(xmlTextWriterPtr + writer, + const xmlChar * + name, + const xmlChar * + content); + +/* + * DTD attribute list definition + */ + XMLPUBFUN int + xmlTextWriterStartDTDAttlist(xmlTextWriterPtr writer, + const xmlChar * name); + XMLPUBFUN int xmlTextWriterEndDTDAttlist(xmlTextWriterPtr + writer); + +/* + * DTD attribute list definition conveniency functions + */ + XMLPUBFUN int + xmlTextWriterWriteFormatDTDAttlist(xmlTextWriterPtr writer, + const xmlChar * name, + const char *format, ...) + LIBXML_ATTR_FORMAT(3,4); + XMLPUBFUN int + xmlTextWriterWriteVFormatDTDAttlist(xmlTextWriterPtr writer, + const xmlChar * name, + const char *format, + va_list argptr) + LIBXML_ATTR_FORMAT(3,0); + XMLPUBFUN int xmlTextWriterWriteDTDAttlist(xmlTextWriterPtr + writer, + const xmlChar * + name, + const xmlChar * + content); + +/* + * DTD entity definition + */ + XMLPUBFUN int + xmlTextWriterStartDTDEntity(xmlTextWriterPtr writer, + int pe, const xmlChar * name); + XMLPUBFUN int xmlTextWriterEndDTDEntity(xmlTextWriterPtr + writer); + +/* + * DTD entity definition conveniency functions + */ + XMLPUBFUN int + xmlTextWriterWriteFormatDTDInternalEntity(xmlTextWriterPtr writer, + int pe, + const xmlChar * name, + const char *format, ...) + LIBXML_ATTR_FORMAT(4,5); + XMLPUBFUN int + xmlTextWriterWriteVFormatDTDInternalEntity(xmlTextWriterPtr writer, + int pe, + const xmlChar * name, + const char *format, + va_list argptr) + LIBXML_ATTR_FORMAT(4,0); + XMLPUBFUN int + xmlTextWriterWriteDTDInternalEntity(xmlTextWriterPtr writer, + int pe, + const xmlChar * name, + const xmlChar * content); + XMLPUBFUN int + xmlTextWriterWriteDTDExternalEntity(xmlTextWriterPtr writer, + int pe, + const xmlChar * name, + const xmlChar * pubid, + const xmlChar * sysid, + const xmlChar * ndataid); + XMLPUBFUN int + xmlTextWriterWriteDTDExternalEntityContents(xmlTextWriterPtr + writer, + const xmlChar * pubid, + const xmlChar * sysid, + const xmlChar * + ndataid); + XMLPUBFUN int xmlTextWriterWriteDTDEntity(xmlTextWriterPtr + writer, int pe, + const xmlChar * name, + const xmlChar * + pubid, + const xmlChar * + sysid, + const xmlChar * + ndataid, + const xmlChar * + content); + +/* + * DTD notation definition + */ + XMLPUBFUN int + xmlTextWriterWriteDTDNotation(xmlTextWriterPtr writer, + const xmlChar * name, + const xmlChar * pubid, + const xmlChar * sysid); + +/* + * Indentation + */ + XMLPUBFUN int + xmlTextWriterSetIndent(xmlTextWriterPtr writer, int indent); + XMLPUBFUN int + xmlTextWriterSetIndentString(xmlTextWriterPtr writer, + const xmlChar * str); + + XMLPUBFUN int + xmlTextWriterSetQuoteChar(xmlTextWriterPtr writer, xmlChar quotechar); + + +/* + * misc + */ + XMLPUBFUN int xmlTextWriterFlush(xmlTextWriterPtr writer); + XMLPUBFUN int xmlTextWriterClose(xmlTextWriterPtr writer); + +#ifdef __cplusplus +} +#endif + +#endif /* LIBXML_WRITER_ENABLED */ + +#endif /* __XML_XMLWRITER_H__ */ diff --git a/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/include/libxml2/libxml/xpath.h b/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/include/libxml2/libxml/xpath.h new file mode 100644 index 0000000000000000000000000000000000000000..b89e105c08f8d0b815302aec689059306903f96f --- /dev/null +++ b/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/include/libxml2/libxml/xpath.h @@ -0,0 +1,579 @@ +/* + * Summary: XML Path Language implementation + * Description: API for the XML Path Language implementation + * + * XML Path Language implementation + * XPath is a language for addressing parts of an XML document, + * designed to be used by both XSLT and XPointer + * http://www.w3.org/TR/xpath + * + * Implements + * W3C Recommendation 16 November 1999 + * http://www.w3.org/TR/1999/REC-xpath-19991116 + * + * Copy: See Copyright for the status of this software. + * + * Author: Daniel Veillard + */ + +#ifndef __XML_XPATH_H__ +#define __XML_XPATH_H__ + +#include + +#ifdef LIBXML_XPATH_ENABLED + +#include +#include +#include +#endif /* LIBXML_XPATH_ENABLED */ + +#if defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) +#ifdef __cplusplus +extern "C" { +#endif +#endif /* LIBXML_XPATH_ENABLED or LIBXML_SCHEMAS_ENABLED */ + +#ifdef LIBXML_XPATH_ENABLED + +typedef struct _xmlXPathContext xmlXPathContext; +typedef xmlXPathContext *xmlXPathContextPtr; +typedef struct _xmlXPathParserContext xmlXPathParserContext; +typedef xmlXPathParserContext *xmlXPathParserContextPtr; + +/** + * The set of XPath error codes. + */ + +typedef enum { + XPATH_EXPRESSION_OK = 0, + XPATH_NUMBER_ERROR, + XPATH_UNFINISHED_LITERAL_ERROR, + XPATH_START_LITERAL_ERROR, + XPATH_VARIABLE_REF_ERROR, + XPATH_UNDEF_VARIABLE_ERROR, + XPATH_INVALID_PREDICATE_ERROR, + XPATH_EXPR_ERROR, + XPATH_UNCLOSED_ERROR, + XPATH_UNKNOWN_FUNC_ERROR, + XPATH_INVALID_OPERAND, + XPATH_INVALID_TYPE, + XPATH_INVALID_ARITY, + XPATH_INVALID_CTXT_SIZE, + XPATH_INVALID_CTXT_POSITION, + XPATH_MEMORY_ERROR, + XPTR_SYNTAX_ERROR, + XPTR_RESOURCE_ERROR, + XPTR_SUB_RESOURCE_ERROR, + XPATH_UNDEF_PREFIX_ERROR, + XPATH_ENCODING_ERROR, + XPATH_INVALID_CHAR_ERROR, + XPATH_INVALID_CTXT, + XPATH_STACK_ERROR, + XPATH_FORBID_VARIABLE_ERROR, + XPATH_OP_LIMIT_EXCEEDED, + XPATH_RECURSION_LIMIT_EXCEEDED +} xmlXPathError; + +/* + * A node-set (an unordered collection of nodes without duplicates). + */ +typedef struct _xmlNodeSet xmlNodeSet; +typedef xmlNodeSet *xmlNodeSetPtr; +struct _xmlNodeSet { + int nodeNr; /* number of nodes in the set */ + int nodeMax; /* size of the array as allocated */ + xmlNodePtr *nodeTab; /* array of nodes in no particular order */ + /* @@ with_ns to check whether namespace nodes should be looked at @@ */ +}; + +/* + * An expression is evaluated to yield an object, which + * has one of the following four basic types: + * - node-set + * - boolean + * - number + * - string + * + * @@ XPointer will add more types ! + */ + +typedef enum { + XPATH_UNDEFINED = 0, + XPATH_NODESET = 1, + XPATH_BOOLEAN = 2, + XPATH_NUMBER = 3, + XPATH_STRING = 4, +#ifdef LIBXML_XPTR_LOCS_ENABLED + XPATH_POINT = 5, + XPATH_RANGE = 6, + XPATH_LOCATIONSET = 7, +#endif + XPATH_USERS = 8, + XPATH_XSLT_TREE = 9 /* An XSLT value tree, non modifiable */ +} xmlXPathObjectType; + +#ifndef LIBXML_XPTR_LOCS_ENABLED +/** DOC_DISABLE */ +#define XPATH_POINT 5 +#define XPATH_RANGE 6 +#define XPATH_LOCATIONSET 7 +/** DOC_ENABLE */ +#endif + +typedef struct _xmlXPathObject xmlXPathObject; +typedef xmlXPathObject *xmlXPathObjectPtr; +struct _xmlXPathObject { + xmlXPathObjectType type; + xmlNodeSetPtr nodesetval; + int boolval; + double floatval; + xmlChar *stringval; + void *user; + int index; + void *user2; + int index2; +}; + +/** + * xmlXPathConvertFunc: + * @obj: an XPath object + * @type: the number of the target type + * + * A conversion function is associated to a type and used to cast + * the new type to primitive values. + * + * Returns -1 in case of error, 0 otherwise + */ +typedef int (*xmlXPathConvertFunc) (xmlXPathObjectPtr obj, int type); + +/* + * Extra type: a name and a conversion function. + */ + +typedef struct _xmlXPathType xmlXPathType; +typedef xmlXPathType *xmlXPathTypePtr; +struct _xmlXPathType { + const xmlChar *name; /* the type name */ + xmlXPathConvertFunc func; /* the conversion function */ +}; + +/* + * Extra variable: a name and a value. + */ + +typedef struct _xmlXPathVariable xmlXPathVariable; +typedef xmlXPathVariable *xmlXPathVariablePtr; +struct _xmlXPathVariable { + const xmlChar *name; /* the variable name */ + xmlXPathObjectPtr value; /* the value */ +}; + +/** + * xmlXPathEvalFunc: + * @ctxt: an XPath parser context + * @nargs: the number of arguments passed to the function + * + * An XPath evaluation function, the parameters are on the XPath context stack. + */ + +typedef void (*xmlXPathEvalFunc)(xmlXPathParserContextPtr ctxt, + int nargs); + +/* + * Extra function: a name and a evaluation function. + */ + +typedef struct _xmlXPathFunct xmlXPathFunct; +typedef xmlXPathFunct *xmlXPathFuncPtr; +struct _xmlXPathFunct { + const xmlChar *name; /* the function name */ + xmlXPathEvalFunc func; /* the evaluation function */ +}; + +/** + * xmlXPathAxisFunc: + * @ctxt: the XPath interpreter context + * @cur: the previous node being explored on that axis + * + * An axis traversal function. To traverse an axis, the engine calls + * the first time with cur == NULL and repeat until the function returns + * NULL indicating the end of the axis traversal. + * + * Returns the next node in that axis or NULL if at the end of the axis. + */ + +typedef xmlXPathObjectPtr (*xmlXPathAxisFunc) (xmlXPathParserContextPtr ctxt, + xmlXPathObjectPtr cur); + +/* + * Extra axis: a name and an axis function. + */ + +typedef struct _xmlXPathAxis xmlXPathAxis; +typedef xmlXPathAxis *xmlXPathAxisPtr; +struct _xmlXPathAxis { + const xmlChar *name; /* the axis name */ + xmlXPathAxisFunc func; /* the search function */ +}; + +/** + * xmlXPathFunction: + * @ctxt: the XPath interprestation context + * @nargs: the number of arguments + * + * An XPath function. + * The arguments (if any) are popped out from the context stack + * and the result is pushed on the stack. + */ + +typedef void (*xmlXPathFunction) (xmlXPathParserContextPtr ctxt, int nargs); + +/* + * Function and Variable Lookup. + */ + +/** + * xmlXPathVariableLookupFunc: + * @ctxt: an XPath context + * @name: name of the variable + * @ns_uri: the namespace name hosting this variable + * + * Prototype for callbacks used to plug variable lookup in the XPath + * engine. + * + * Returns the XPath object value or NULL if not found. + */ +typedef xmlXPathObjectPtr (*xmlXPathVariableLookupFunc) (void *ctxt, + const xmlChar *name, + const xmlChar *ns_uri); + +/** + * xmlXPathFuncLookupFunc: + * @ctxt: an XPath context + * @name: name of the function + * @ns_uri: the namespace name hosting this function + * + * Prototype for callbacks used to plug function lookup in the XPath + * engine. + * + * Returns the XPath function or NULL if not found. + */ +typedef xmlXPathFunction (*xmlXPathFuncLookupFunc) (void *ctxt, + const xmlChar *name, + const xmlChar *ns_uri); + +/** + * xmlXPathFlags: + * Flags for XPath engine compilation and runtime + */ +/** + * XML_XPATH_CHECKNS: + * + * check namespaces at compilation + */ +#define XML_XPATH_CHECKNS (1<<0) +/** + * XML_XPATH_NOVAR: + * + * forbid variables in expression + */ +#define XML_XPATH_NOVAR (1<<1) + +/** + * xmlXPathContext: + * + * Expression evaluation occurs with respect to a context. + * he context consists of: + * - a node (the context node) + * - a node list (the context node list) + * - a set of variable bindings + * - a function library + * - the set of namespace declarations in scope for the expression + * Following the switch to hash tables, this need to be trimmed up at + * the next binary incompatible release. + * The node may be modified when the context is passed to libxml2 + * for an XPath evaluation so you may need to initialize it again + * before the next call. + */ + +struct _xmlXPathContext { + xmlDocPtr doc; /* The current document */ + xmlNodePtr node; /* The current node */ + + int nb_variables_unused; /* unused (hash table) */ + int max_variables_unused; /* unused (hash table) */ + xmlHashTablePtr varHash; /* Hash table of defined variables */ + + int nb_types; /* number of defined types */ + int max_types; /* max number of types */ + xmlXPathTypePtr types; /* Array of defined types */ + + int nb_funcs_unused; /* unused (hash table) */ + int max_funcs_unused; /* unused (hash table) */ + xmlHashTablePtr funcHash; /* Hash table of defined funcs */ + + int nb_axis; /* number of defined axis */ + int max_axis; /* max number of axis */ + xmlXPathAxisPtr axis; /* Array of defined axis */ + + /* the namespace nodes of the context node */ + xmlNsPtr *namespaces; /* Array of namespaces */ + int nsNr; /* number of namespace in scope */ + void *user; /* function to free */ + + /* extra variables */ + int contextSize; /* the context size */ + int proximityPosition; /* the proximity position */ + + /* extra stuff for XPointer */ + int xptr; /* is this an XPointer context? */ + xmlNodePtr here; /* for here() */ + xmlNodePtr origin; /* for origin() */ + + /* the set of namespace declarations in scope for the expression */ + xmlHashTablePtr nsHash; /* The namespaces hash table */ + xmlXPathVariableLookupFunc varLookupFunc;/* variable lookup func */ + void *varLookupData; /* variable lookup data */ + + /* Possibility to link in an extra item */ + void *extra; /* needed for XSLT */ + + /* The function name and URI when calling a function */ + const xmlChar *function; + const xmlChar *functionURI; + + /* function lookup function and data */ + xmlXPathFuncLookupFunc funcLookupFunc;/* function lookup func */ + void *funcLookupData; /* function lookup data */ + + /* temporary namespace lists kept for walking the namespace axis */ + xmlNsPtr *tmpNsList; /* Array of namespaces */ + int tmpNsNr; /* number of namespaces in scope */ + + /* error reporting mechanism */ + void *userData; /* user specific data block */ + xmlStructuredErrorFunc error; /* the callback in case of errors */ + xmlError lastError; /* the last error */ + xmlNodePtr debugNode; /* the source node XSLT */ + + /* dictionary */ + xmlDictPtr dict; /* dictionary if any */ + + int flags; /* flags to control compilation */ + + /* Cache for reusal of XPath objects */ + void *cache; + + /* Resource limits */ + unsigned long opLimit; + unsigned long opCount; + int depth; +}; + +/* + * The structure of a compiled expression form is not public. + */ + +typedef struct _xmlXPathCompExpr xmlXPathCompExpr; +typedef xmlXPathCompExpr *xmlXPathCompExprPtr; + +/** + * xmlXPathParserContext: + * + * An XPath parser context. It contains pure parsing information, + * an xmlXPathContext, and the stack of objects. + */ +struct _xmlXPathParserContext { + const xmlChar *cur; /* the current char being parsed */ + const xmlChar *base; /* the full expression */ + + int error; /* error code */ + + xmlXPathContextPtr context; /* the evaluation context */ + xmlXPathObjectPtr value; /* the current value */ + int valueNr; /* number of values stacked */ + int valueMax; /* max number of values stacked */ + xmlXPathObjectPtr *valueTab; /* stack of values */ + + xmlXPathCompExprPtr comp; /* the precompiled expression */ + int xptr; /* it this an XPointer expression */ + xmlNodePtr ancestor; /* used for walking preceding axis */ + + int valueFrame; /* always zero for compatibility */ +}; + +/************************************************************************ + * * + * Public API * + * * + ************************************************************************/ + +/** + * Objects and Nodesets handling + */ + +XMLPUBVAR double xmlXPathNAN; +XMLPUBVAR double xmlXPathPINF; +XMLPUBVAR double xmlXPathNINF; + +/* These macros may later turn into functions */ +/** + * xmlXPathNodeSetGetLength: + * @ns: a node-set + * + * Implement a functionality similar to the DOM NodeList.length. + * + * Returns the number of nodes in the node-set. + */ +#define xmlXPathNodeSetGetLength(ns) ((ns) ? (ns)->nodeNr : 0) +/** + * xmlXPathNodeSetItem: + * @ns: a node-set + * @index: index of a node in the set + * + * Implements a functionality similar to the DOM NodeList.item(). + * + * Returns the xmlNodePtr at the given @index in @ns or NULL if + * @index is out of range (0 to length-1) + */ +#define xmlXPathNodeSetItem(ns, index) \ + ((((ns) != NULL) && \ + ((index) >= 0) && ((index) < (ns)->nodeNr)) ? \ + (ns)->nodeTab[(index)] \ + : NULL) +/** + * xmlXPathNodeSetIsEmpty: + * @ns: a node-set + * + * Checks whether @ns is empty or not. + * + * Returns %TRUE if @ns is an empty node-set. + */ +#define xmlXPathNodeSetIsEmpty(ns) \ + (((ns) == NULL) || ((ns)->nodeNr == 0) || ((ns)->nodeTab == NULL)) + + +XMLPUBFUN void + xmlXPathFreeObject (xmlXPathObjectPtr obj); +XMLPUBFUN xmlNodeSetPtr + xmlXPathNodeSetCreate (xmlNodePtr val); +XMLPUBFUN void + xmlXPathFreeNodeSetList (xmlXPathObjectPtr obj); +XMLPUBFUN void + xmlXPathFreeNodeSet (xmlNodeSetPtr obj); +XMLPUBFUN xmlXPathObjectPtr + xmlXPathObjectCopy (xmlXPathObjectPtr val); +XMLPUBFUN int + xmlXPathCmpNodes (xmlNodePtr node1, + xmlNodePtr node2); +/** + * Conversion functions to basic types. + */ +XMLPUBFUN int + xmlXPathCastNumberToBoolean (double val); +XMLPUBFUN int + xmlXPathCastStringToBoolean (const xmlChar * val); +XMLPUBFUN int + xmlXPathCastNodeSetToBoolean(xmlNodeSetPtr ns); +XMLPUBFUN int + xmlXPathCastToBoolean (xmlXPathObjectPtr val); + +XMLPUBFUN double + xmlXPathCastBooleanToNumber (int val); +XMLPUBFUN double + xmlXPathCastStringToNumber (const xmlChar * val); +XMLPUBFUN double + xmlXPathCastNodeToNumber (xmlNodePtr node); +XMLPUBFUN double + xmlXPathCastNodeSetToNumber (xmlNodeSetPtr ns); +XMLPUBFUN double + xmlXPathCastToNumber (xmlXPathObjectPtr val); + +XMLPUBFUN xmlChar * + xmlXPathCastBooleanToString (int val); +XMLPUBFUN xmlChar * + xmlXPathCastNumberToString (double val); +XMLPUBFUN xmlChar * + xmlXPathCastNodeToString (xmlNodePtr node); +XMLPUBFUN xmlChar * + xmlXPathCastNodeSetToString (xmlNodeSetPtr ns); +XMLPUBFUN xmlChar * + xmlXPathCastToString (xmlXPathObjectPtr val); + +XMLPUBFUN xmlXPathObjectPtr + xmlXPathConvertBoolean (xmlXPathObjectPtr val); +XMLPUBFUN xmlXPathObjectPtr + xmlXPathConvertNumber (xmlXPathObjectPtr val); +XMLPUBFUN xmlXPathObjectPtr + xmlXPathConvertString (xmlXPathObjectPtr val); + +/** + * Context handling. + */ +XMLPUBFUN xmlXPathContextPtr + xmlXPathNewContext (xmlDocPtr doc); +XMLPUBFUN void + xmlXPathFreeContext (xmlXPathContextPtr ctxt); +XMLPUBFUN void + xmlXPathSetErrorHandler(xmlXPathContextPtr ctxt, + xmlStructuredErrorFunc handler, + void *context); +XMLPUBFUN int + xmlXPathContextSetCache(xmlXPathContextPtr ctxt, + int active, + int value, + int options); +/** + * Evaluation functions. + */ +XMLPUBFUN long + xmlXPathOrderDocElems (xmlDocPtr doc); +XMLPUBFUN int + xmlXPathSetContextNode (xmlNodePtr node, + xmlXPathContextPtr ctx); +XMLPUBFUN xmlXPathObjectPtr + xmlXPathNodeEval (xmlNodePtr node, + const xmlChar *str, + xmlXPathContextPtr ctx); +XMLPUBFUN xmlXPathObjectPtr + xmlXPathEval (const xmlChar *str, + xmlXPathContextPtr ctx); +XMLPUBFUN xmlXPathObjectPtr + xmlXPathEvalExpression (const xmlChar *str, + xmlXPathContextPtr ctxt); +XMLPUBFUN int + xmlXPathEvalPredicate (xmlXPathContextPtr ctxt, + xmlXPathObjectPtr res); +/** + * Separate compilation/evaluation entry points. + */ +XMLPUBFUN xmlXPathCompExprPtr + xmlXPathCompile (const xmlChar *str); +XMLPUBFUN xmlXPathCompExprPtr + xmlXPathCtxtCompile (xmlXPathContextPtr ctxt, + const xmlChar *str); +XMLPUBFUN xmlXPathObjectPtr + xmlXPathCompiledEval (xmlXPathCompExprPtr comp, + xmlXPathContextPtr ctx); +XMLPUBFUN int + xmlXPathCompiledEvalToBoolean(xmlXPathCompExprPtr comp, + xmlXPathContextPtr ctxt); +XMLPUBFUN void + xmlXPathFreeCompExpr (xmlXPathCompExprPtr comp); +#endif /* LIBXML_XPATH_ENABLED */ +#if defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) +XML_DEPRECATED +XMLPUBFUN void + xmlXPathInit (void); +XMLPUBFUN int + xmlXPathIsNaN (double val); +XMLPUBFUN int + xmlXPathIsInf (double val); + +#ifdef __cplusplus +} +#endif + +#endif /* LIBXML_XPATH_ENABLED or LIBXML_SCHEMAS_ENABLED*/ +#endif /* ! __XML_XPATH_H__ */ diff --git a/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/include/libxml2/libxml/xpathInternals.h b/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/include/libxml2/libxml/xpathInternals.h new file mode 100644 index 0000000000000000000000000000000000000000..d1c90dff2aac24ba418503d433e7609661233060 --- /dev/null +++ b/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/include/libxml2/libxml/xpathInternals.h @@ -0,0 +1,633 @@ +/* + * Summary: internal interfaces for XML Path Language implementation + * Description: internal interfaces for XML Path Language implementation + * used to build new modules on top of XPath like XPointer and + * XSLT + * + * Copy: See Copyright for the status of this software. + * + * Author: Daniel Veillard + */ + +#ifndef __XML_XPATH_INTERNALS_H__ +#define __XML_XPATH_INTERNALS_H__ + +#include +#include +#include + +#ifdef LIBXML_XPATH_ENABLED + +#ifdef __cplusplus +extern "C" { +#endif + +/************************************************************************ + * * + * Helpers * + * * + ************************************************************************/ + +/* + * Many of these macros may later turn into functions. They + * shouldn't be used in #ifdef's preprocessor instructions. + */ +/** + * xmlXPathSetError: + * @ctxt: an XPath parser context + * @err: an xmlXPathError code + * + * Raises an error. + */ +#define xmlXPathSetError(ctxt, err) \ + { xmlXPatherror((ctxt), __FILE__, __LINE__, (err)); \ + if ((ctxt) != NULL) (ctxt)->error = (err); } + +/** + * xmlXPathSetArityError: + * @ctxt: an XPath parser context + * + * Raises an XPATH_INVALID_ARITY error. + */ +#define xmlXPathSetArityError(ctxt) \ + xmlXPathSetError((ctxt), XPATH_INVALID_ARITY) + +/** + * xmlXPathSetTypeError: + * @ctxt: an XPath parser context + * + * Raises an XPATH_INVALID_TYPE error. + */ +#define xmlXPathSetTypeError(ctxt) \ + xmlXPathSetError((ctxt), XPATH_INVALID_TYPE) + +/** + * xmlXPathGetError: + * @ctxt: an XPath parser context + * + * Get the error code of an XPath context. + * + * Returns the context error. + */ +#define xmlXPathGetError(ctxt) ((ctxt)->error) + +/** + * xmlXPathCheckError: + * @ctxt: an XPath parser context + * + * Check if an XPath error was raised. + * + * Returns true if an error has been raised, false otherwise. + */ +#define xmlXPathCheckError(ctxt) ((ctxt)->error != XPATH_EXPRESSION_OK) + +/** + * xmlXPathGetDocument: + * @ctxt: an XPath parser context + * + * Get the document of an XPath context. + * + * Returns the context document. + */ +#define xmlXPathGetDocument(ctxt) ((ctxt)->context->doc) + +/** + * xmlXPathGetContextNode: + * @ctxt: an XPath parser context + * + * Get the context node of an XPath context. + * + * Returns the context node. + */ +#define xmlXPathGetContextNode(ctxt) ((ctxt)->context->node) + +XMLPUBFUN int + xmlXPathPopBoolean (xmlXPathParserContextPtr ctxt); +XMLPUBFUN double + xmlXPathPopNumber (xmlXPathParserContextPtr ctxt); +XMLPUBFUN xmlChar * + xmlXPathPopString (xmlXPathParserContextPtr ctxt); +XMLPUBFUN xmlNodeSetPtr + xmlXPathPopNodeSet (xmlXPathParserContextPtr ctxt); +XMLPUBFUN void * + xmlXPathPopExternal (xmlXPathParserContextPtr ctxt); + +/** + * xmlXPathReturnBoolean: + * @ctxt: an XPath parser context + * @val: a boolean + * + * Pushes the boolean @val on the context stack. + */ +#define xmlXPathReturnBoolean(ctxt, val) \ + valuePush((ctxt), xmlXPathNewBoolean(val)) + +/** + * xmlXPathReturnTrue: + * @ctxt: an XPath parser context + * + * Pushes true on the context stack. + */ +#define xmlXPathReturnTrue(ctxt) xmlXPathReturnBoolean((ctxt), 1) + +/** + * xmlXPathReturnFalse: + * @ctxt: an XPath parser context + * + * Pushes false on the context stack. + */ +#define xmlXPathReturnFalse(ctxt) xmlXPathReturnBoolean((ctxt), 0) + +/** + * xmlXPathReturnNumber: + * @ctxt: an XPath parser context + * @val: a double + * + * Pushes the double @val on the context stack. + */ +#define xmlXPathReturnNumber(ctxt, val) \ + valuePush((ctxt), xmlXPathNewFloat(val)) + +/** + * xmlXPathReturnString: + * @ctxt: an XPath parser context + * @str: a string + * + * Pushes the string @str on the context stack. + */ +#define xmlXPathReturnString(ctxt, str) \ + valuePush((ctxt), xmlXPathWrapString(str)) + +/** + * xmlXPathReturnEmptyString: + * @ctxt: an XPath parser context + * + * Pushes an empty string on the stack. + */ +#define xmlXPathReturnEmptyString(ctxt) \ + valuePush((ctxt), xmlXPathNewCString("")) + +/** + * xmlXPathReturnNodeSet: + * @ctxt: an XPath parser context + * @ns: a node-set + * + * Pushes the node-set @ns on the context stack. + */ +#define xmlXPathReturnNodeSet(ctxt, ns) \ + valuePush((ctxt), xmlXPathWrapNodeSet(ns)) + +/** + * xmlXPathReturnEmptyNodeSet: + * @ctxt: an XPath parser context + * + * Pushes an empty node-set on the context stack. + */ +#define xmlXPathReturnEmptyNodeSet(ctxt) \ + valuePush((ctxt), xmlXPathNewNodeSet(NULL)) + +/** + * xmlXPathReturnExternal: + * @ctxt: an XPath parser context + * @val: user data + * + * Pushes user data on the context stack. + */ +#define xmlXPathReturnExternal(ctxt, val) \ + valuePush((ctxt), xmlXPathWrapExternal(val)) + +/** + * xmlXPathStackIsNodeSet: + * @ctxt: an XPath parser context + * + * Check if the current value on the XPath stack is a node set or + * an XSLT value tree. + * + * Returns true if the current object on the stack is a node-set. + */ +#define xmlXPathStackIsNodeSet(ctxt) \ + (((ctxt)->value != NULL) \ + && (((ctxt)->value->type == XPATH_NODESET) \ + || ((ctxt)->value->type == XPATH_XSLT_TREE))) + +/** + * xmlXPathStackIsExternal: + * @ctxt: an XPath parser context + * + * Checks if the current value on the XPath stack is an external + * object. + * + * Returns true if the current object on the stack is an external + * object. + */ +#define xmlXPathStackIsExternal(ctxt) \ + ((ctxt->value != NULL) && (ctxt->value->type == XPATH_USERS)) + +/** + * xmlXPathEmptyNodeSet: + * @ns: a node-set + * + * Empties a node-set. + */ +#define xmlXPathEmptyNodeSet(ns) \ + { while ((ns)->nodeNr > 0) (ns)->nodeTab[--(ns)->nodeNr] = NULL; } + +/** + * CHECK_ERROR: + * + * Macro to return from the function if an XPath error was detected. + */ +#define CHECK_ERROR \ + if (ctxt->error != XPATH_EXPRESSION_OK) return + +/** + * CHECK_ERROR0: + * + * Macro to return 0 from the function if an XPath error was detected. + */ +#define CHECK_ERROR0 \ + if (ctxt->error != XPATH_EXPRESSION_OK) return(0) + +/** + * XP_ERROR: + * @X: the error code + * + * Macro to raise an XPath error and return. + */ +#define XP_ERROR(X) \ + { xmlXPathErr(ctxt, X); return; } + +/** + * XP_ERROR0: + * @X: the error code + * + * Macro to raise an XPath error and return 0. + */ +#define XP_ERROR0(X) \ + { xmlXPathErr(ctxt, X); return(0); } + +/** + * CHECK_TYPE: + * @typeval: the XPath type + * + * Macro to check that the value on top of the XPath stack is of a given + * type. + */ +#define CHECK_TYPE(typeval) \ + if ((ctxt->value == NULL) || (ctxt->value->type != typeval)) \ + XP_ERROR(XPATH_INVALID_TYPE) + +/** + * CHECK_TYPE0: + * @typeval: the XPath type + * + * Macro to check that the value on top of the XPath stack is of a given + * type. Return(0) in case of failure + */ +#define CHECK_TYPE0(typeval) \ + if ((ctxt->value == NULL) || (ctxt->value->type != typeval)) \ + XP_ERROR0(XPATH_INVALID_TYPE) + +/** + * CHECK_ARITY: + * @x: the number of expected args + * + * Macro to check that the number of args passed to an XPath function matches. + */ +#define CHECK_ARITY(x) \ + if (ctxt == NULL) return; \ + if (nargs != (x)) \ + XP_ERROR(XPATH_INVALID_ARITY); \ + if (ctxt->valueNr < (x)) \ + XP_ERROR(XPATH_STACK_ERROR); + +/** + * CAST_TO_STRING: + * + * Macro to try to cast the value on the top of the XPath stack to a string. + */ +#define CAST_TO_STRING \ + if ((ctxt->value != NULL) && (ctxt->value->type != XPATH_STRING)) \ + xmlXPathStringFunction(ctxt, 1); + +/** + * CAST_TO_NUMBER: + * + * Macro to try to cast the value on the top of the XPath stack to a number. + */ +#define CAST_TO_NUMBER \ + if ((ctxt->value != NULL) && (ctxt->value->type != XPATH_NUMBER)) \ + xmlXPathNumberFunction(ctxt, 1); + +/** + * CAST_TO_BOOLEAN: + * + * Macro to try to cast the value on the top of the XPath stack to a boolean. + */ +#define CAST_TO_BOOLEAN \ + if ((ctxt->value != NULL) && (ctxt->value->type != XPATH_BOOLEAN)) \ + xmlXPathBooleanFunction(ctxt, 1); + +/* + * Variable Lookup forwarding. + */ + +XMLPUBFUN void + xmlXPathRegisterVariableLookup (xmlXPathContextPtr ctxt, + xmlXPathVariableLookupFunc f, + void *data); + +/* + * Function Lookup forwarding. + */ + +XMLPUBFUN void + xmlXPathRegisterFuncLookup (xmlXPathContextPtr ctxt, + xmlXPathFuncLookupFunc f, + void *funcCtxt); + +/* + * Error reporting. + */ +XMLPUBFUN void + xmlXPatherror (xmlXPathParserContextPtr ctxt, + const char *file, + int line, + int no); + +XMLPUBFUN void + xmlXPathErr (xmlXPathParserContextPtr ctxt, + int error); + +#ifdef LIBXML_DEBUG_ENABLED +XMLPUBFUN void + xmlXPathDebugDumpObject (FILE *output, + xmlXPathObjectPtr cur, + int depth); +XMLPUBFUN void + xmlXPathDebugDumpCompExpr(FILE *output, + xmlXPathCompExprPtr comp, + int depth); +#endif +/** + * NodeSet handling. + */ +XMLPUBFUN int + xmlXPathNodeSetContains (xmlNodeSetPtr cur, + xmlNodePtr val); +XMLPUBFUN xmlNodeSetPtr + xmlXPathDifference (xmlNodeSetPtr nodes1, + xmlNodeSetPtr nodes2); +XMLPUBFUN xmlNodeSetPtr + xmlXPathIntersection (xmlNodeSetPtr nodes1, + xmlNodeSetPtr nodes2); + +XMLPUBFUN xmlNodeSetPtr + xmlXPathDistinctSorted (xmlNodeSetPtr nodes); +XMLPUBFUN xmlNodeSetPtr + xmlXPathDistinct (xmlNodeSetPtr nodes); + +XMLPUBFUN int + xmlXPathHasSameNodes (xmlNodeSetPtr nodes1, + xmlNodeSetPtr nodes2); + +XMLPUBFUN xmlNodeSetPtr + xmlXPathNodeLeadingSorted (xmlNodeSetPtr nodes, + xmlNodePtr node); +XMLPUBFUN xmlNodeSetPtr + xmlXPathLeadingSorted (xmlNodeSetPtr nodes1, + xmlNodeSetPtr nodes2); +XMLPUBFUN xmlNodeSetPtr + xmlXPathNodeLeading (xmlNodeSetPtr nodes, + xmlNodePtr node); +XMLPUBFUN xmlNodeSetPtr + xmlXPathLeading (xmlNodeSetPtr nodes1, + xmlNodeSetPtr nodes2); + +XMLPUBFUN xmlNodeSetPtr + xmlXPathNodeTrailingSorted (xmlNodeSetPtr nodes, + xmlNodePtr node); +XMLPUBFUN xmlNodeSetPtr + xmlXPathTrailingSorted (xmlNodeSetPtr nodes1, + xmlNodeSetPtr nodes2); +XMLPUBFUN xmlNodeSetPtr + xmlXPathNodeTrailing (xmlNodeSetPtr nodes, + xmlNodePtr node); +XMLPUBFUN xmlNodeSetPtr + xmlXPathTrailing (xmlNodeSetPtr nodes1, + xmlNodeSetPtr nodes2); + + +/** + * Extending a context. + */ + +XMLPUBFUN int + xmlXPathRegisterNs (xmlXPathContextPtr ctxt, + const xmlChar *prefix, + const xmlChar *ns_uri); +XMLPUBFUN const xmlChar * + xmlXPathNsLookup (xmlXPathContextPtr ctxt, + const xmlChar *prefix); +XMLPUBFUN void + xmlXPathRegisteredNsCleanup (xmlXPathContextPtr ctxt); + +XMLPUBFUN int + xmlXPathRegisterFunc (xmlXPathContextPtr ctxt, + const xmlChar *name, + xmlXPathFunction f); +XMLPUBFUN int + xmlXPathRegisterFuncNS (xmlXPathContextPtr ctxt, + const xmlChar *name, + const xmlChar *ns_uri, + xmlXPathFunction f); +XMLPUBFUN int + xmlXPathRegisterVariable (xmlXPathContextPtr ctxt, + const xmlChar *name, + xmlXPathObjectPtr value); +XMLPUBFUN int + xmlXPathRegisterVariableNS (xmlXPathContextPtr ctxt, + const xmlChar *name, + const xmlChar *ns_uri, + xmlXPathObjectPtr value); +XMLPUBFUN xmlXPathFunction + xmlXPathFunctionLookup (xmlXPathContextPtr ctxt, + const xmlChar *name); +XMLPUBFUN xmlXPathFunction + xmlXPathFunctionLookupNS (xmlXPathContextPtr ctxt, + const xmlChar *name, + const xmlChar *ns_uri); +XMLPUBFUN void + xmlXPathRegisteredFuncsCleanup (xmlXPathContextPtr ctxt); +XMLPUBFUN xmlXPathObjectPtr + xmlXPathVariableLookup (xmlXPathContextPtr ctxt, + const xmlChar *name); +XMLPUBFUN xmlXPathObjectPtr + xmlXPathVariableLookupNS (xmlXPathContextPtr ctxt, + const xmlChar *name, + const xmlChar *ns_uri); +XMLPUBFUN void + xmlXPathRegisteredVariablesCleanup(xmlXPathContextPtr ctxt); + +/** + * Utilities to extend XPath. + */ +XMLPUBFUN xmlXPathParserContextPtr + xmlXPathNewParserContext (const xmlChar *str, + xmlXPathContextPtr ctxt); +XMLPUBFUN void + xmlXPathFreeParserContext (xmlXPathParserContextPtr ctxt); + +/* TODO: remap to xmlXPathValuePop and Push. */ +XMLPUBFUN xmlXPathObjectPtr + valuePop (xmlXPathParserContextPtr ctxt); +XMLPUBFUN int + valuePush (xmlXPathParserContextPtr ctxt, + xmlXPathObjectPtr value); + +XMLPUBFUN xmlXPathObjectPtr + xmlXPathNewString (const xmlChar *val); +XMLPUBFUN xmlXPathObjectPtr + xmlXPathNewCString (const char *val); +XMLPUBFUN xmlXPathObjectPtr + xmlXPathWrapString (xmlChar *val); +XMLPUBFUN xmlXPathObjectPtr + xmlXPathWrapCString (char * val); +XMLPUBFUN xmlXPathObjectPtr + xmlXPathNewFloat (double val); +XMLPUBFUN xmlXPathObjectPtr + xmlXPathNewBoolean (int val); +XMLPUBFUN xmlXPathObjectPtr + xmlXPathNewNodeSet (xmlNodePtr val); +XMLPUBFUN xmlXPathObjectPtr + xmlXPathNewValueTree (xmlNodePtr val); +XMLPUBFUN int + xmlXPathNodeSetAdd (xmlNodeSetPtr cur, + xmlNodePtr val); +XMLPUBFUN int + xmlXPathNodeSetAddUnique (xmlNodeSetPtr cur, + xmlNodePtr val); +XMLPUBFUN int + xmlXPathNodeSetAddNs (xmlNodeSetPtr cur, + xmlNodePtr node, + xmlNsPtr ns); +XMLPUBFUN void + xmlXPathNodeSetSort (xmlNodeSetPtr set); + +XMLPUBFUN void + xmlXPathRoot (xmlXPathParserContextPtr ctxt); +XMLPUBFUN void + xmlXPathEvalExpr (xmlXPathParserContextPtr ctxt); +XMLPUBFUN xmlChar * + xmlXPathParseName (xmlXPathParserContextPtr ctxt); +XMLPUBFUN xmlChar * + xmlXPathParseNCName (xmlXPathParserContextPtr ctxt); + +/* + * Existing functions. + */ +XMLPUBFUN double + xmlXPathStringEvalNumber (const xmlChar *str); +XMLPUBFUN int + xmlXPathEvaluatePredicateResult (xmlXPathParserContextPtr ctxt, + xmlXPathObjectPtr res); +XMLPUBFUN void + xmlXPathRegisterAllFunctions (xmlXPathContextPtr ctxt); +XMLPUBFUN xmlNodeSetPtr + xmlXPathNodeSetMerge (xmlNodeSetPtr val1, + xmlNodeSetPtr val2); +XMLPUBFUN void + xmlXPathNodeSetDel (xmlNodeSetPtr cur, + xmlNodePtr val); +XMLPUBFUN void + xmlXPathNodeSetRemove (xmlNodeSetPtr cur, + int val); +XMLPUBFUN xmlXPathObjectPtr + xmlXPathNewNodeSetList (xmlNodeSetPtr val); +XMLPUBFUN xmlXPathObjectPtr + xmlXPathWrapNodeSet (xmlNodeSetPtr val); +XMLPUBFUN xmlXPathObjectPtr + xmlXPathWrapExternal (void *val); + +XMLPUBFUN int xmlXPathEqualValues(xmlXPathParserContextPtr ctxt); +XMLPUBFUN int xmlXPathNotEqualValues(xmlXPathParserContextPtr ctxt); +XMLPUBFUN int xmlXPathCompareValues(xmlXPathParserContextPtr ctxt, int inf, int strict); +XMLPUBFUN void xmlXPathValueFlipSign(xmlXPathParserContextPtr ctxt); +XMLPUBFUN void xmlXPathAddValues(xmlXPathParserContextPtr ctxt); +XMLPUBFUN void xmlXPathSubValues(xmlXPathParserContextPtr ctxt); +XMLPUBFUN void xmlXPathMultValues(xmlXPathParserContextPtr ctxt); +XMLPUBFUN void xmlXPathDivValues(xmlXPathParserContextPtr ctxt); +XMLPUBFUN void xmlXPathModValues(xmlXPathParserContextPtr ctxt); + +XMLPUBFUN int xmlXPathIsNodeType(const xmlChar *name); + +/* + * Some of the axis navigation routines. + */ +XMLPUBFUN xmlNodePtr xmlXPathNextSelf(xmlXPathParserContextPtr ctxt, + xmlNodePtr cur); +XMLPUBFUN xmlNodePtr xmlXPathNextChild(xmlXPathParserContextPtr ctxt, + xmlNodePtr cur); +XMLPUBFUN xmlNodePtr xmlXPathNextDescendant(xmlXPathParserContextPtr ctxt, + xmlNodePtr cur); +XMLPUBFUN xmlNodePtr xmlXPathNextDescendantOrSelf(xmlXPathParserContextPtr ctxt, + xmlNodePtr cur); +XMLPUBFUN xmlNodePtr xmlXPathNextParent(xmlXPathParserContextPtr ctxt, + xmlNodePtr cur); +XMLPUBFUN xmlNodePtr xmlXPathNextAncestorOrSelf(xmlXPathParserContextPtr ctxt, + xmlNodePtr cur); +XMLPUBFUN xmlNodePtr xmlXPathNextFollowingSibling(xmlXPathParserContextPtr ctxt, + xmlNodePtr cur); +XMLPUBFUN xmlNodePtr xmlXPathNextFollowing(xmlXPathParserContextPtr ctxt, + xmlNodePtr cur); +XMLPUBFUN xmlNodePtr xmlXPathNextNamespace(xmlXPathParserContextPtr ctxt, + xmlNodePtr cur); +XMLPUBFUN xmlNodePtr xmlXPathNextAttribute(xmlXPathParserContextPtr ctxt, + xmlNodePtr cur); +XMLPUBFUN xmlNodePtr xmlXPathNextPreceding(xmlXPathParserContextPtr ctxt, + xmlNodePtr cur); +XMLPUBFUN xmlNodePtr xmlXPathNextAncestor(xmlXPathParserContextPtr ctxt, + xmlNodePtr cur); +XMLPUBFUN xmlNodePtr xmlXPathNextPrecedingSibling(xmlXPathParserContextPtr ctxt, + xmlNodePtr cur); +/* + * The official core of XPath functions. + */ +XMLPUBFUN void xmlXPathLastFunction(xmlXPathParserContextPtr ctxt, int nargs); +XMLPUBFUN void xmlXPathPositionFunction(xmlXPathParserContextPtr ctxt, int nargs); +XMLPUBFUN void xmlXPathCountFunction(xmlXPathParserContextPtr ctxt, int nargs); +XMLPUBFUN void xmlXPathIdFunction(xmlXPathParserContextPtr ctxt, int nargs); +XMLPUBFUN void xmlXPathLocalNameFunction(xmlXPathParserContextPtr ctxt, int nargs); +XMLPUBFUN void xmlXPathNamespaceURIFunction(xmlXPathParserContextPtr ctxt, int nargs); +XMLPUBFUN void xmlXPathStringFunction(xmlXPathParserContextPtr ctxt, int nargs); +XMLPUBFUN void xmlXPathStringLengthFunction(xmlXPathParserContextPtr ctxt, int nargs); +XMLPUBFUN void xmlXPathConcatFunction(xmlXPathParserContextPtr ctxt, int nargs); +XMLPUBFUN void xmlXPathContainsFunction(xmlXPathParserContextPtr ctxt, int nargs); +XMLPUBFUN void xmlXPathStartsWithFunction(xmlXPathParserContextPtr ctxt, int nargs); +XMLPUBFUN void xmlXPathSubstringFunction(xmlXPathParserContextPtr ctxt, int nargs); +XMLPUBFUN void xmlXPathSubstringBeforeFunction(xmlXPathParserContextPtr ctxt, int nargs); +XMLPUBFUN void xmlXPathSubstringAfterFunction(xmlXPathParserContextPtr ctxt, int nargs); +XMLPUBFUN void xmlXPathNormalizeFunction(xmlXPathParserContextPtr ctxt, int nargs); +XMLPUBFUN void xmlXPathTranslateFunction(xmlXPathParserContextPtr ctxt, int nargs); +XMLPUBFUN void xmlXPathNotFunction(xmlXPathParserContextPtr ctxt, int nargs); +XMLPUBFUN void xmlXPathTrueFunction(xmlXPathParserContextPtr ctxt, int nargs); +XMLPUBFUN void xmlXPathFalseFunction(xmlXPathParserContextPtr ctxt, int nargs); +XMLPUBFUN void xmlXPathLangFunction(xmlXPathParserContextPtr ctxt, int nargs); +XMLPUBFUN void xmlXPathNumberFunction(xmlXPathParserContextPtr ctxt, int nargs); +XMLPUBFUN void xmlXPathSumFunction(xmlXPathParserContextPtr ctxt, int nargs); +XMLPUBFUN void xmlXPathFloorFunction(xmlXPathParserContextPtr ctxt, int nargs); +XMLPUBFUN void xmlXPathCeilingFunction(xmlXPathParserContextPtr ctxt, int nargs); +XMLPUBFUN void xmlXPathRoundFunction(xmlXPathParserContextPtr ctxt, int nargs); +XMLPUBFUN void xmlXPathBooleanFunction(xmlXPathParserContextPtr ctxt, int nargs); + +/** + * Really internal functions + */ +XMLPUBFUN void xmlXPathNodeSetFreeNs(xmlNsPtr ns); + +#ifdef __cplusplus +} +#endif + +#endif /* LIBXML_XPATH_ENABLED */ +#endif /* ! __XML_XPATH_INTERNALS_H__ */ diff --git a/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/include/libxml2/libxml/xpointer.h b/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/include/libxml2/libxml/xpointer.h new file mode 100644 index 0000000000000000000000000000000000000000..a5260008fc09875d409c59d8c6099f97110ebd6f --- /dev/null +++ b/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/include/libxml2/libxml/xpointer.h @@ -0,0 +1,138 @@ +/* + * Summary: API to handle XML Pointers + * Description: API to handle XML Pointers + * Base implementation was made accordingly to + * W3C Candidate Recommendation 7 June 2000 + * http://www.w3.org/TR/2000/CR-xptr-20000607 + * + * Added support for the element() scheme described in: + * W3C Proposed Recommendation 13 November 2002 + * http://www.w3.org/TR/2002/PR-xptr-element-20021113/ + * + * Copy: See Copyright for the status of this software. + * + * Author: Daniel Veillard + */ + +#ifndef __XML_XPTR_H__ +#define __XML_XPTR_H__ + +#include + +#ifdef LIBXML_XPTR_ENABLED + +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +#if defined(LIBXML_XPTR_LOCS_ENABLED) +/* + * A Location Set + */ +typedef struct _xmlLocationSet xmlLocationSet; +typedef xmlLocationSet *xmlLocationSetPtr; +struct _xmlLocationSet { + int locNr; /* number of locations in the set */ + int locMax; /* size of the array as allocated */ + xmlXPathObjectPtr *locTab;/* array of locations */ +}; + +/* + * Handling of location sets. + */ + +XML_DEPRECATED +XMLPUBFUN xmlLocationSetPtr + xmlXPtrLocationSetCreate (xmlXPathObjectPtr val); +XML_DEPRECATED +XMLPUBFUN void + xmlXPtrFreeLocationSet (xmlLocationSetPtr obj); +XML_DEPRECATED +XMLPUBFUN xmlLocationSetPtr + xmlXPtrLocationSetMerge (xmlLocationSetPtr val1, + xmlLocationSetPtr val2); +XML_DEPRECATED +XMLPUBFUN xmlXPathObjectPtr + xmlXPtrNewRange (xmlNodePtr start, + int startindex, + xmlNodePtr end, + int endindex); +XML_DEPRECATED +XMLPUBFUN xmlXPathObjectPtr + xmlXPtrNewRangePoints (xmlXPathObjectPtr start, + xmlXPathObjectPtr end); +XML_DEPRECATED +XMLPUBFUN xmlXPathObjectPtr + xmlXPtrNewRangeNodePoint (xmlNodePtr start, + xmlXPathObjectPtr end); +XML_DEPRECATED +XMLPUBFUN xmlXPathObjectPtr + xmlXPtrNewRangePointNode (xmlXPathObjectPtr start, + xmlNodePtr end); +XML_DEPRECATED +XMLPUBFUN xmlXPathObjectPtr + xmlXPtrNewRangeNodes (xmlNodePtr start, + xmlNodePtr end); +XML_DEPRECATED +XMLPUBFUN xmlXPathObjectPtr + xmlXPtrNewLocationSetNodes (xmlNodePtr start, + xmlNodePtr end); +XML_DEPRECATED +XMLPUBFUN xmlXPathObjectPtr + xmlXPtrNewLocationSetNodeSet(xmlNodeSetPtr set); +XML_DEPRECATED +XMLPUBFUN xmlXPathObjectPtr + xmlXPtrNewRangeNodeObject (xmlNodePtr start, + xmlXPathObjectPtr end); +XML_DEPRECATED +XMLPUBFUN xmlXPathObjectPtr + xmlXPtrNewCollapsedRange (xmlNodePtr start); +XML_DEPRECATED +XMLPUBFUN void + xmlXPtrLocationSetAdd (xmlLocationSetPtr cur, + xmlXPathObjectPtr val); +XML_DEPRECATED +XMLPUBFUN xmlXPathObjectPtr + xmlXPtrWrapLocationSet (xmlLocationSetPtr val); +XML_DEPRECATED +XMLPUBFUN void + xmlXPtrLocationSetDel (xmlLocationSetPtr cur, + xmlXPathObjectPtr val); +XML_DEPRECATED +XMLPUBFUN void + xmlXPtrLocationSetRemove (xmlLocationSetPtr cur, + int val); +#endif /* defined(LIBXML_XPTR_LOCS_ENABLED) */ + +/* + * Functions. + */ +XMLPUBFUN xmlXPathContextPtr + xmlXPtrNewContext (xmlDocPtr doc, + xmlNodePtr here, + xmlNodePtr origin); +XMLPUBFUN xmlXPathObjectPtr + xmlXPtrEval (const xmlChar *str, + xmlXPathContextPtr ctx); + +#if defined(LIBXML_XPTR_LOCS_ENABLED) +XML_DEPRECATED +XMLPUBFUN void + xmlXPtrRangeToFunction (xmlXPathParserContextPtr ctxt, + int nargs); +XML_DEPRECATED +XMLPUBFUN xmlNodePtr + xmlXPtrBuildNodeList (xmlXPathObjectPtr obj); +XML_DEPRECATED +XMLPUBFUN void + xmlXPtrEvalRangePredicate (xmlXPathParserContextPtr ctxt); +#endif /* defined(LIBXML_XPTR_LOCS_ENABLED) */ +#ifdef __cplusplus +} +#endif + +#endif /* LIBXML_XPTR_ENABLED */ +#endif /* __XML_XPTR_H__ */ diff --git a/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/info/about.json b/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/info/about.json new file mode 100644 index 0000000000000000000000000000000000000000..c2795c0b3fd894052aa74c632896bffbdf4c8547 --- /dev/null +++ b/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/info/about.json @@ -0,0 +1,167 @@ +{ + "channels": [ + "https://repo.anaconda.com/pkgs/main", + "https://repo.anaconda.com/pkgs/r", + "https://repo.anaconda.com/pkgs/r" + ], + "conda_build_version": "25.1.2", + "conda_version": "25.1.1", + "description": "Though libxml2 is written in C a variety of language\nbindings make it available in other environments.\n", + "dev_url": "https://gitlab.gnome.org/GNOME/libxml2/", + "doc_url": "https://gitlab.gnome.org/GNOME/libxml2/-/wikis/home", + "env_vars": { + "CIO_TEST": "" + }, + "extra": { + "copy_test_source_files": true, + "final": true, + "recipe-maintainers": [ + "ocefpaf", + "jakirkham", + "mingwandroid", + "gillins", + "jschueller", + "msarahan", + "scopatz", + "chenghlee" + ] + }, + "home": "https://gitlab.gnome.org/GNOME/libxml2/", + "identifiers": [], + "keywords": [], + "license": "MIT", + "license_family": "MIT", + "license_file": "Copyright", + "root_pkgs": [ + "_libgcc_mutex 0.1 main", + "ca-certificates 2025.9.9 h06a4308_0", + "ld_impl_linux-64 2.40 h12ee557_0", + "libstdcxx-ng 11.2.0 h1234567_1", + "nlohmann_json 3.11.2 h6a678d5_0", + "pybind11-abi 5 hd3eb1b0_0", + "tzdata 2025a h04d1e81_0", + "libgomp 11.2.0 h1234567_1", + "_openmp_mutex 5.1 1_gnu", + "libgcc-ng 11.2.0 h1234567_1", + "bzip2 1.0.8 h5eee18b_6", + "c-ares 1.19.1 h5eee18b_0", + "cpp-expected 1.1.0 hdb19cb5_0", + "expat 2.6.4 h6a678d5_0", + "fmt 9.1.0 hdb19cb5_1", + "icu 73.1 h6a678d5_0", + "libev 4.33 h7f8727e_1", + "libffi 3.4.4 h6a678d5_1", + "libuuid 1.41.5 h5eee18b_0", + "lz4-c 1.9.4 h6a678d5_1", + "ncurses 6.4 h6a678d5_0", + "liblief 0.12.3 h6a678d5_0", + "reproc 14.2.4 h6a678d5_2", + "simdjson 3.10.1 hdb19cb5_0", + "xz 5.4.6 h5eee18b_1", + "yaml-cpp 0.8.0 h6a678d5_1", + "zlib 1.2.13 h5eee18b_1", + "libedit 3.1.20230828 h5eee18b_0", + "libnghttp2 1.57.0 h2d74bed_0", + "libssh2 1.11.1 h251f7ec_0", + "libxml2 2.13.5 hfdd30dd_0", + "pcre2 10.42 hebb0a14_1", + "readline 8.2 h5eee18b_0", + "reproc-cpp 14.2.4 h6a678d5_2", + "spdlog 1.11.0 hdb19cb5_0", + "tk 8.6.14 h39e8969_0", + "zstd 1.5.6 hc292b87_0", + "krb5 1.20.1 h143b758_1", + "libarchive 3.7.7 hfab0078_0", + "libsolv 0.7.30 he621ea3_1", + "sqlite 3.45.3 h5eee18b_0", + "libcurl 8.11.1 hc9e6f67_0", + "python 3.12.9 h5148396_0", + "libmamba 2.0.5 haf1ee3a_1", + "menuinst 2.2.0 py312h06a4308_1", + "anaconda-anon-usage 0.5.0 py312hfc0e8ea_100", + "annotated-types 0.6.0 py312h06a4308_0", + "archspec 0.2.3 pyhd3eb1b0_0", + "boltons 24.1.0 py312h06a4308_0", + "brotli-python 1.0.9 py312h6a678d5_9", + "charset-normalizer 3.3.2 pyhd3eb1b0_0", + "distro 1.9.0 py312h06a4308_0", + "frozendict 2.4.2 py312h06a4308_0", + "idna 3.7 py312h06a4308_0", + "jsonpointer 2.1 pyhd3eb1b0_0", + "libmambapy 2.0.5 py312hdb19cb5_1", + "mdurl 0.1.0 py312h06a4308_0", + "packaging 24.2 py312h06a4308_0", + "platformdirs 3.10.0 py312h06a4308_0", + "pluggy 1.5.0 py312h06a4308_0", + "pycosat 0.6.6 py312h5eee18b_2", + "pycparser 2.21 pyhd3eb1b0_0", + "pygments 2.15.1 py312h06a4308_1", + "pysocks 1.7.1 py312h06a4308_0", + "ruamel.yaml.clib 0.2.8 py312h5eee18b_0", + "setuptools 75.8.0 py312h06a4308_0", + "tqdm 4.67.1 py312he106c6f_0", + "truststore 0.10.0 py312h06a4308_0", + "typing_extensions 4.12.2 py312h06a4308_0", + "wheel 0.45.1 py312h06a4308_0", + "cffi 1.17.1 py312h1fdaa30_1", + "jsonpatch 1.33 py312h06a4308_1", + "markdown-it-py 2.2.0 py312h06a4308_1", + "pip 25.0 py312h06a4308_0", + "ruamel.yaml 0.18.6 py312h5eee18b_0", + "typing-extensions 4.12.2 py312h06a4308_0", + "urllib3 2.3.0 py312h06a4308_0", + "cryptography 43.0.3 py312h7825ff9_1", + "pydantic-core 2.27.1 py312h4aa5aa6_0", + "requests 2.32.3 py312h06a4308_1", + "rich 13.9.4 py312h06a4308_0", + "zstandard 0.23.0 py312h2c38b39_1", + "conda-content-trust 0.2.0 py312h06a4308_1", + "conda-package-streaming 0.11.0 py312h06a4308_0", + "pydantic 2.10.3 py312h06a4308_0", + "conda-package-handling 2.4.0 py312h06a4308_0", + "conda 25.1.1 py312h06a4308_0", + "conda-anaconda-tos 0.1.2 py312h06a4308_0", + "conda-libmamba-solver 25.1.1 pyhd3eb1b0_0", + "libsodium 1.0.20 heac8642_0", + "openssl 3.0.18 hd6dcaed_0", + "patch 2.8 hb25bd0a_0", + "patchelf 0.17.2 h6a678d5_0", + "yaml 0.2.5 h7b6447c_0", + "argcomplete 3.6.2 py312h06a4308_0", + "attrs 24.3.0 py312h06a4308_0", + "certifi 2025.8.3 py312h06a4308_0", + "chardet 5.2.0 py312h06a4308_0", + "click 8.2.1 py312h06a4308_0", + "filelock 3.17.0 py312h06a4308_0", + "jmespath 1.0.1 py312h06a4308_0", + "markupsafe 3.0.2 py312h5eee18b_0", + "more-itertools 10.3.0 py312h06a4308_0", + "pkginfo 1.12.0 py312h06a4308_0", + "psutil 7.0.0 py312hee96239_0", + "py-lief 0.12.3 py312h6a678d5_0", + "python-libarchive-c 5.1 pyhd3eb1b0_0", + "pytz 2025.2 py312h06a4308_0", + "pyyaml 6.0.2 py312h5eee18b_0", + "rpds-py 0.22.3 py312h4aa5aa6_0", + "six 1.17.0 py312h06a4308_0", + "soupsieve 2.5 py312h06a4308_0", + "tomlkit 0.13.2 py312h06a4308_0", + "xmltodict 0.14.2 py312h06a4308_0", + "jinja2 3.1.6 py312h06a4308_0", + "python-dateutil 2.9.0post0 py312h06a4308_2", + "referencing 0.30.2 py312h06a4308_0", + "yq 3.4.3 py312h06a4308_0", + "beautifulsoup4 4.13.5 py312h06a4308_0", + "botocore 1.37.10 py312h06a4308_0", + "jsonschema-specifications 2023.7.1 py312h06a4308_0", + "pynacl 1.5.0 py312h2630517_2", + "jsonschema 4.25.0 py312h06a4308_0", + "s3transfer 0.11.2 py312h06a4308_0", + "boto3 1.37.10 py312h06a4308_0", + "conda-anaconda-telemetry 0.3.0 pyhd3eb1b0_1", + "conda-index 0.5.0 py312h06a4308_0", + "conda-build 25.1.2 py312h06a4308_0" + ], + "summary": "The XML C parser and toolkit of Gnome", + "tags": [] +} \ No newline at end of file diff --git a/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/info/files b/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/info/files new file mode 100644 index 0000000000000000000000000000000000000000..dd94289ae5bc033ef1e5d21692a0c10ef7c50d5e --- /dev/null +++ b/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/info/files @@ -0,0 +1,55 @@ +bin/xml2-config +bin/xmlcatalog +bin/xmllint +include/libxml2/libxml/HTMLparser.h +include/libxml2/libxml/HTMLtree.h +include/libxml2/libxml/SAX.h +include/libxml2/libxml/SAX2.h +include/libxml2/libxml/c14n.h +include/libxml2/libxml/catalog.h +include/libxml2/libxml/chvalid.h +include/libxml2/libxml/debugXML.h +include/libxml2/libxml/dict.h +include/libxml2/libxml/encoding.h +include/libxml2/libxml/entities.h +include/libxml2/libxml/globals.h +include/libxml2/libxml/hash.h +include/libxml2/libxml/list.h +include/libxml2/libxml/nanoftp.h +include/libxml2/libxml/nanohttp.h +include/libxml2/libxml/parser.h +include/libxml2/libxml/parserInternals.h +include/libxml2/libxml/pattern.h +include/libxml2/libxml/relaxng.h +include/libxml2/libxml/schemasInternals.h +include/libxml2/libxml/schematron.h +include/libxml2/libxml/threads.h +include/libxml2/libxml/tree.h +include/libxml2/libxml/uri.h +include/libxml2/libxml/valid.h +include/libxml2/libxml/xinclude.h +include/libxml2/libxml/xlink.h +include/libxml2/libxml/xmlIO.h +include/libxml2/libxml/xmlautomata.h +include/libxml2/libxml/xmlerror.h +include/libxml2/libxml/xmlexports.h +include/libxml2/libxml/xmlmemory.h +include/libxml2/libxml/xmlmodule.h +include/libxml2/libxml/xmlreader.h +include/libxml2/libxml/xmlregexp.h +include/libxml2/libxml/xmlsave.h +include/libxml2/libxml/xmlschemas.h +include/libxml2/libxml/xmlschemastypes.h +include/libxml2/libxml/xmlstring.h +include/libxml2/libxml/xmlunicode.h +include/libxml2/libxml/xmlversion.h +include/libxml2/libxml/xmlwriter.h +include/libxml2/libxml/xpath.h +include/libxml2/libxml/xpathInternals.h +include/libxml2/libxml/xpointer.h +lib/cmake/libxml2/libxml2-config.cmake +lib/libxml2.so +lib/libxml2.so.2 +lib/libxml2.so.2.13.9 +lib/pkgconfig/libxml-2.0.pc +share/aclocal/libxml.m4 diff --git a/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/info/git b/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/info/git new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/info/has_prefix b/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/info/has_prefix new file mode 100644 index 0000000000000000000000000000000000000000..2b9b6a426a86ae2e457fe7065ff451f6627599d1 --- /dev/null +++ b/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/info/has_prefix @@ -0,0 +1,6 @@ +/home/task_176176819578609/conda-bld/libxml2_1761768910671/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold binary bin/xmlcatalog +/home/task_176176819578609/conda-bld/libxml2_1761768910671/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold binary bin/xmllint +/home/task_176176819578609/conda-bld/libxml2_1761768910671/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold binary lib/libxml2.so.2.13.9 +/home/task_176176819578609/conda-bld/libxml2_1761768910671/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold text bin/xml2-config +/home/task_176176819578609/conda-bld/libxml2_1761768910671/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold text lib/cmake/libxml2/libxml2-config.cmake +/home/task_176176819578609/conda-bld/libxml2_1761768910671/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold text lib/pkgconfig/libxml-2.0.pc diff --git a/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/info/hash_input.json b/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/info/hash_input.json new file mode 100644 index 0000000000000000000000000000000000000000..613d92ab2017095c44dadb70a636162b03ca6751 --- /dev/null +++ b/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/info/hash_input.json @@ -0,0 +1,15 @@ +{ + "c_stdlib_version": "2.28", + "c_compiler": "gcc", + "libxml2": "2.13", + "target_platform": "linux-64", + "VERBOSE_AT": "V=1", + "BUILD": "x86_64-conda_el8-linux-gnu", + "xz": "5", + "c_stdlib": "sysroot", + "icu": "73", + "c_compiler_version": "11.2.0", + "channel_targets": "defaults", + "zlib": "1.2", + "__glibc": "__glibc >=2.28,<3.0.a0" +} \ No newline at end of file diff --git a/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/info/index.json b/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/info/index.json new file mode 100644 index 0000000000000000000000000000000000000000..6874e46e04dbe83d77920af1049dca8bd1684b72 --- /dev/null +++ b/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/info/index.json @@ -0,0 +1,19 @@ +{ + "arch": "x86_64", + "build": "h2c43086_0", + "build_number": 0, + "depends": [ + "__glibc >=2.28,<3.0.a0", + "icu >=73.1,<74.0a0", + "libgcc-ng >=11.2.0", + "xz >=5.6.4,<6.0a0", + "zlib >=1.2.13,<2.0a0" + ], + "license": "MIT", + "license_family": "MIT", + "name": "libxml2", + "platform": "linux", + "subdir": "linux-64", + "timestamp": 1761768971660, + "version": "2.13.9" +} \ No newline at end of file diff --git a/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/info/licenses/Copyright b/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/info/licenses/Copyright new file mode 100644 index 0000000000000000000000000000000000000000..f76a86df63f54f2ce47a86716170955e06ef20e4 --- /dev/null +++ b/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/info/licenses/Copyright @@ -0,0 +1,23 @@ +Except where otherwise noted in the source code (e.g. the files dict.c and +list.c, which are covered by a similar licence but with different Copyright +notices) all the files are: + + Copyright (C) 1998-2012 Daniel Veillard. All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is fur- +nished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FIT- +NESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/info/paths.json b/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/info/paths.json new file mode 100644 index 0000000000000000000000000000000000000000..3e807298d47cf98f96b608736e412bfd8cd00f7c --- /dev/null +++ b/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/info/paths.json @@ -0,0 +1,347 @@ +{ + "paths": [ + { + "_path": "bin/xml2-config", + "file_mode": "text", + "path_type": "hardlink", + "prefix_placeholder": "/home/task_176176819578609/conda-bld/libxml2_1761768910671/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold", + "sha256": "10e3ae074769a93ff030044449db30816242adaecb023fbcbc13a706f39ac66b", + "size_in_bytes": 3369 + }, + { + "_path": "bin/xmlcatalog", + "file_mode": "binary", + "path_type": "hardlink", + "prefix_placeholder": "/home/task_176176819578609/conda-bld/libxml2_1761768910671/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold", + "sha256": "ffb85688cd1dc47548618fdb86eee412b9852cbcc323ae54972f46f25c3338d6", + "size_in_bytes": 27520 + }, + { + "_path": "bin/xmllint", + "file_mode": "binary", + "path_type": "hardlink", + "prefix_placeholder": "/home/task_176176819578609/conda-bld/libxml2_1761768910671/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold", + "sha256": "39a7f0dd8d2c64e1ef6d0b7a1a5b6c0afd40662a996a3313981c0c79b130d536", + "size_in_bytes": 84608 + }, + { + "_path": "include/libxml2/libxml/HTMLparser.h", + "path_type": "hardlink", + "sha256": "6d334194ad458aeceaadbbd445c6bc31bf255a5c5776ff45905371dec4c89752", + "size_in_bytes": 9849 + }, + { + "_path": "include/libxml2/libxml/HTMLtree.h", + "path_type": "hardlink", + "sha256": "c5031e1130ed63c5d99e457dac6908e14814229ef5238cf63b747f3f5004c1ce", + "size_in_bytes": 3502 + }, + { + "_path": "include/libxml2/libxml/SAX.h", + "path_type": "hardlink", + "sha256": "4c6da9908227100d6f2db31f841d369998584a84cac57fa6d116941a6632cc2a", + "size_in_bytes": 4418 + }, + { + "_path": "include/libxml2/libxml/SAX2.h", + "path_type": "hardlink", + "sha256": "e5f88dbeb426920233819264fb7f0fd6dc5fb3e8c8bc070bfbf843004da9405b", + "size_in_bytes": 4430 + }, + { + "_path": "include/libxml2/libxml/c14n.h", + "path_type": "hardlink", + "sha256": "052057c3a9c866eb42f265af6d1acb2e6a168f0df046dfa733ddef8d718c0a6f", + "size_in_bytes": 2742 + }, + { + "_path": "include/libxml2/libxml/catalog.h", + "path_type": "hardlink", + "sha256": "fda4efa8f96f5bd592c06af452c52be741f7c6f2cadca8c84fb344684f0be16c", + "size_in_bytes": 4618 + }, + { + "_path": "include/libxml2/libxml/chvalid.h", + "path_type": "hardlink", + "sha256": "4d971c78da7a0b0d10958c08a8af46c7262a2f9522023a50ca3b7fcab6464d01", + "size_in_bytes": 5087 + }, + { + "_path": "include/libxml2/libxml/debugXML.h", + "path_type": "hardlink", + "sha256": "8a99e6670290f39e2d23b5e0d653098af0aed35d3599d5776bb33327a5d3c2bd", + "size_in_bytes": 4934 + }, + { + "_path": "include/libxml2/libxml/dict.h", + "path_type": "hardlink", + "sha256": "4b079a3c632d4d37f88dee9d35322813371f12fa6c013f7f3e147b142d0afab4", + "size_in_bytes": 1770 + }, + { + "_path": "include/libxml2/libxml/encoding.h", + "path_type": "hardlink", + "sha256": "e8851672beeb7c2bf6e1aaed733d9a42cdab1a0c8b5a51bd403288a09aa55fc1", + "size_in_bytes": 8369 + }, + { + "_path": "include/libxml2/libxml/entities.h", + "path_type": "hardlink", + "sha256": "78ed3ea4551ed62d93a1baeaad5e084357610effab34ed2d87906f3751fa73c6", + "size_in_bytes": 4907 + }, + { + "_path": "include/libxml2/libxml/globals.h", + "path_type": "hardlink", + "sha256": "182a79232ec83ab7b4302d456c54dda6276249e5454f87c0dadd0569c6e2c344", + "size_in_bytes": 890 + }, + { + "_path": "include/libxml2/libxml/hash.h", + "path_type": "hardlink", + "sha256": "2882290182817c6514df27568467a15327ee6ae673fcfb348326a66f3428feb7", + "size_in_bytes": 7017 + }, + { + "_path": "include/libxml2/libxml/list.h", + "path_type": "hardlink", + "sha256": "a21ee224d41a8d103f707b0d93d09c14f624696dac99fe09fcca5e74f3e30b89", + "size_in_bytes": 3128 + }, + { + "_path": "include/libxml2/libxml/nanoftp.h", + "path_type": "hardlink", + "sha256": "abe3869afde5b534d36c1fe7e9e8691852694bac30304fa93539317188472afa", + "size_in_bytes": 4013 + }, + { + "_path": "include/libxml2/libxml/nanohttp.h", + "path_type": "hardlink", + "sha256": "6cb6f362303200a98fdc2a2630e3c7e97694226bba6cd004485d47ad5b51bded", + "size_in_bytes": 2124 + }, + { + "_path": "include/libxml2/libxml/parser.h", + "path_type": "hardlink", + "sha256": "c54589d22aff8825c0628247be38e606048b733a6a0366f3aa014ff01baf75d3", + "size_in_bytes": 44153 + }, + { + "_path": "include/libxml2/libxml/parserInternals.h", + "path_type": "hardlink", + "sha256": "c3f51eba83663c400bf5e99dc555692f74648c7f20d25a46d158d8cb877923c7", + "size_in_bytes": 16810 + }, + { + "_path": "include/libxml2/libxml/pattern.h", + "path_type": "hardlink", + "sha256": "5378a38f02d834a2ab64ce192a9347a71aadfe5ec1eccbf9c43d753e778ce770", + "size_in_bytes": 2640 + }, + { + "_path": "include/libxml2/libxml/relaxng.h", + "path_type": "hardlink", + "sha256": "9a2ca0046680c69c621b5ea4cc659b6a1f4f97ce13ba7cea28841ff467139211", + "size_in_bytes": 5830 + }, + { + "_path": "include/libxml2/libxml/schemasInternals.h", + "path_type": "hardlink", + "sha256": "57c338227df37f6e045f9e58b7875c7f1c29ecda471985622a72cac2dcab3c9e", + "size_in_bytes": 26233 + }, + { + "_path": "include/libxml2/libxml/schematron.h", + "path_type": "hardlink", + "sha256": "f0484f0e1bed94cc65f5ed02e6b49b12bb8ebf3252e410bf38e15babd4576676", + "size_in_bytes": 4255 + }, + { + "_path": "include/libxml2/libxml/threads.h", + "path_type": "hardlink", + "sha256": "bd65effcdbdfedad6225564edb627b9c2519913c0cd69956ea52ffbfd59c91dd", + "size_in_bytes": 1730 + }, + { + "_path": "include/libxml2/libxml/tree.h", + "path_type": "hardlink", + "sha256": "ad21354b7d69ba4d7874eb7b8c971ab27ed3c0f7c3fbf9fb1086544536fc809b", + "size_in_bytes": 38871 + }, + { + "_path": "include/libxml2/libxml/uri.h", + "path_type": "hardlink", + "sha256": "27db5e24799ee73f3cddce2dc05e6822611863e137c52be17521a9c9156dbc88", + "size_in_bytes": 2855 + }, + { + "_path": "include/libxml2/libxml/valid.h", + "path_type": "hardlink", + "sha256": "5128984012dc2538d26da86cedefbfd1b594c4eef4f43f2b37f3152d51b55299", + "size_in_bytes": 13305 + }, + { + "_path": "include/libxml2/libxml/xinclude.h", + "path_type": "hardlink", + "sha256": "8f21da57a43cb22f28cafd18112915f4edde6cd404a03ebcb1ea139d7f68066f", + "size_in_bytes": 3109 + }, + { + "_path": "include/libxml2/libxml/xlink.h", + "path_type": "hardlink", + "sha256": "53025542f1406b1ebdb5d32478f6220257e4a734d319933b8563321b31037709", + "size_in_bytes": 5002 + }, + { + "_path": "include/libxml2/libxml/xmlIO.h", + "path_type": "hardlink", + "sha256": "173d5b689e87c727d09180d1213a427e86b8e96ac78f09d2477b68cc23544a04", + "size_in_bytes": 12475 + }, + { + "_path": "include/libxml2/libxml/xmlautomata.h", + "path_type": "hardlink", + "sha256": "e95ffdf4ece67e3cb5132c070721cb06b82f06c22db98a15df8aa27c90dd5c37", + "size_in_bytes": 3787 + }, + { + "_path": "include/libxml2/libxml/xmlerror.h", + "path_type": "hardlink", + "sha256": "a7d81d3c672b9300bd4c8d8b294db81f2ffd99a051f4525ccef779f9e677fdc7", + "size_in_bytes": 37703 + }, + { + "_path": "include/libxml2/libxml/xmlexports.h", + "path_type": "hardlink", + "sha256": "cf9315d6492bb5fde04d1e1c86a2b32b7d8f005de8912fe5cccb9ce557fc00a3", + "size_in_bytes": 3280 + }, + { + "_path": "include/libxml2/libxml/xmlmemory.h", + "path_type": "hardlink", + "sha256": "1b67c2d36c02bd9adbb3132ed2847c36906ad1ba83e229a6c7864f6d8da15794", + "size_in_bytes": 4904 + }, + { + "_path": "include/libxml2/libxml/xmlmodule.h", + "path_type": "hardlink", + "sha256": "cbc026ca066b477c1fe5411fca1bba49feac9fb4d33b8ee0d0551fc1db5ec40f", + "size_in_bytes": 1138 + }, + { + "_path": "include/libxml2/libxml/xmlreader.h", + "path_type": "hardlink", + "sha256": "cd8d9a554c19965d8cc6f0b84b8edc392b70cbef061c4bca80fced7517d023e3", + "size_in_bytes": 12205 + }, + { + "_path": "include/libxml2/libxml/xmlregexp.h", + "path_type": "hardlink", + "sha256": "00aebd6ed95c3e11bf8bfeb0541f95001963a2d6e0db8d5616c2f7e124cac668", + "size_in_bytes": 5149 + }, + { + "_path": "include/libxml2/libxml/xmlsave.h", + "path_type": "hardlink", + "sha256": "70a82ec80d1a93f0657aa4dfc49ea2fce1ac76a94b1f871d9a70a7f0d89d9e62", + "size_in_bytes": 2568 + }, + { + "_path": "include/libxml2/libxml/xmlschemas.h", + "path_type": "hardlink", + "sha256": "9571ec61380f169bd2645f0b485987945e84c9c5f53e4cf35bbcde8e8b0e9f7e", + "size_in_bytes": 6902 + }, + { + "_path": "include/libxml2/libxml/xmlschemastypes.h", + "path_type": "hardlink", + "sha256": "318c251a6a0a028de51d169a2a09c25e22e63d3f4a463771c8227b4c4c99ea33", + "size_in_bytes": 4583 + }, + { + "_path": "include/libxml2/libxml/xmlstring.h", + "path_type": "hardlink", + "sha256": "7793e9ab13f5235b1f982507bd526d8e80bd87b84b1dc000439a24fd1b5fe742", + "size_in_bytes": 5271 + }, + { + "_path": "include/libxml2/libxml/xmlunicode.h", + "path_type": "hardlink", + "sha256": "1a43b69fd62cb5422f877101f96a35d3ef37e7f8f0b0f5e9327dab317b87b008", + "size_in_bytes": 11125 + }, + { + "_path": "include/libxml2/libxml/xmlversion.h", + "path_type": "hardlink", + "sha256": "ef72b72238a66d1c84ca30d741b97a131b113346f3b9506922ff2d1792d1a251", + "size_in_bytes": 5399 + }, + { + "_path": "include/libxml2/libxml/xmlwriter.h", + "path_type": "hardlink", + "sha256": "04453060d2b1df1ca60c4f6f7a992c10aef256af525d89b5776a509f394fcbdd", + "size_in_bytes": 20688 + }, + { + "_path": "include/libxml2/libxml/xpath.h", + "path_type": "hardlink", + "sha256": "5e9e684a09d4e6628a513721512c321b760536950fd5f9fbf93169c1104d6081", + "size_in_bytes": 16578 + }, + { + "_path": "include/libxml2/libxml/xpathInternals.h", + "path_type": "hardlink", + "sha256": "cb71743fb6b0064f6a85142698482d483107a12bdb2cdfd0daf2227df972a522", + "size_in_bytes": 18419 + }, + { + "_path": "include/libxml2/libxml/xpointer.h", + "path_type": "hardlink", + "sha256": "f4c2b0eee468c31e77a1dde995110bfecce2a04b9d825652e87d8451eb414e84", + "size_in_bytes": 3647 + }, + { + "_path": "lib/cmake/libxml2/libxml2-config.cmake", + "file_mode": "text", + "path_type": "hardlink", + "prefix_placeholder": "/home/task_176176819578609/conda-bld/libxml2_1761768910671/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold", + "sha256": "c6ad0097d7d39b11c125cf0d2abbf93bdea88a7a817257d6ee11aa4b1d23eeaf", + "size_in_bytes": 6513 + }, + { + "_path": "lib/libxml2.so", + "path_type": "softlink", + "sha256": "c2111348a54a23d18db9f89485000fd6a63d8a1f78d348cbe065e095caba0c52", + "size_in_bytes": 1578016 + }, + { + "_path": "lib/libxml2.so.2", + "path_type": "softlink", + "sha256": "c2111348a54a23d18db9f89485000fd6a63d8a1f78d348cbe065e095caba0c52", + "size_in_bytes": 1578016 + }, + { + "_path": "lib/libxml2.so.2.13.9", + "file_mode": "binary", + "path_type": "hardlink", + "prefix_placeholder": "/home/task_176176819578609/conda-bld/libxml2_1761768910671/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold", + "sha256": "c2111348a54a23d18db9f89485000fd6a63d8a1f78d348cbe065e095caba0c52", + "size_in_bytes": 1578016 + }, + { + "_path": "lib/pkgconfig/libxml-2.0.pc", + "file_mode": "text", + "path_type": "hardlink", + "prefix_placeholder": "/home/task_176176819578609/conda-bld/libxml2_1761768910671/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold", + "sha256": "610a2ef084c38879cbf6e166ea204e30c4122a1af652eefff814d2c6f45a3bb6", + "size_in_bytes": 1592 + }, + { + "_path": "share/aclocal/libxml.m4", + "path_type": "hardlink", + "sha256": "732632019d4f7e2e6b0e03cf3f9f4ebf37c31c5abbf039cd7ea335e2154c33ae", + "size_in_bytes": 461 + } + ], + "paths_version": 1 +} \ No newline at end of file diff --git a/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/info/recipe/0002-Make-and-install-a-pkg-config-file-on-Windows.patch b/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/info/recipe/0002-Make-and-install-a-pkg-config-file-on-Windows.patch new file mode 100644 index 0000000000000000000000000000000000000000..c3f93c958444d1e596983dd0cb32526e91f87da9 --- /dev/null +++ b/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/info/recipe/0002-Make-and-install-a-pkg-config-file-on-Windows.patch @@ -0,0 +1,48 @@ +From f90d931fa6f400065189b44d00273979709c700b Mon Sep 17 00:00:00 2001 +From: Peter Williams +Date: Wed, 5 Sep 2018 16:50:54 -0400 +Subject: [PATCH] Make and install a pkg-config file on Windows + +--- + win32/Makefile.msvc | 18 +++++++++++++++++- + 1 file changed, 17 insertions(+), 1 deletion(-) + +diff --git a/win32/Makefile.msvc b/win32/Makefile.msvc +index 491dc88..415ec0b 100644 +--- a/win32/Makefile.msvc ++++ b/win32/Makefile.msvc +@@ -282,7 +282,21 @@ _VC_MANIFEST_EMBED_EXE= + _VC_MANIFEST_EMBED_DLL= + !endif + +-all : libxml libxmla libxmladll utils ++all : libxml libxmla libxmladll utils libxml-2.0.pc ++ ++# Note hardcoded libraries and trouble getting dollar-sign/brace variables working ++libxml-2.0.pc: ++ echo prefix=$(PREFIX:\=/) >$@ ++ echo exec_prefix=$(PREFIX:\=/) >>$@ ++ echo libdir=$(LIBPREFIX:\=/) >>$@ ++ echo includedir=$(INCPREFIX:\=/) >>$@ ++ echo modules=0 >>$@ ++ echo Name: libXML >>$@ ++ echo Version: $(LIBXML_MAJOR_VERSION).$(LIBXML_MINOR_VERSION).$(LIBXML_MICRO_VERSION) >>$@ ++ echo Description: libXML library version2. >>$@ ++ echo Requires: >>$@ ++ echo Libs: -L$(LIBPREFIX:\=/) -lxml2 -liconv -lz >>$@ ++ echo Cflags: -I$(INCPREFIX:\=/)/libxml2 -I$(INCPREFIX:\=/) >>$@ + + libxml : $(BINDIR)\$(XML_SO) + +@@ -320,6 +334,8 @@ install-libs : all + install : install-libs + copy $(BINDIR)\*.exe $(BINPREFIX) + -copy $(BINDIR)\*.pdb $(BINPREFIX) ++ if not exist $(LIBPREFIX)\pkgconfig mkdir $(LIBPREFIX)\pkgconfig ++ copy libxml-2.0.pc $(LIBPREFIX)\pkgconfig + + install-dist : install-libs + copy $(BINDIR)\xml*.exe $(BINPREFIX) +-- +2.17.1 + diff --git a/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/info/recipe/bld.bat b/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/info/recipe/bld.bat new file mode 100644 index 0000000000000000000000000000000000000000..72f172102b6649172b2d6d1fc58e27ac6f7d5d4f --- /dev/null +++ b/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/info/recipe/bld.bat @@ -0,0 +1,21 @@ + +cd win32 + + +cscript configure.js compiler=msvc iconv=yes icu=no zlib=yes lzma=no python=no ^ + threads=ctls ^ + prefix=%LIBRARY_PREFIX% ^ + include=%LIBRARY_INC% ^ + lib=%LIBRARY_LIB% + +if errorlevel 1 exit 1 + +nmake /f Makefile.msvc +if errorlevel 1 exit 1 + +nmake /f Makefile.msvc install +if errorlevel 1 exit 1 + +del %LIBRARY_PREFIX%\bin\test*.exe || exit 1 +del %LIBRARY_PREFIX%\bin\runsuite.exe || exit 1 +del %LIBRARY_PREFIX%\bin\runtest.exe || exit 1 diff --git a/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/info/recipe/build.sh b/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/info/recipe/build.sh new file mode 100644 index 0000000000000000000000000000000000000000..0697e2d610234555d01c26f17d537902e96c7d84 --- /dev/null +++ b/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/info/recipe/build.sh @@ -0,0 +1,33 @@ +#!/bin/bash + +#./autogen.sh will run configure unless you tell it not to. +export NOCONFIGURE=1 +./autogen.sh + +export CFLAGS="${CFLAGS} -DTRUE=1" +export CXXFLAGS="${CXXFLAGS} -DTRUE=1" + +./configure --prefix="${PREFIX}" \ + --build=${BUILD} \ + --host=${HOST} \ + --with-iconv="${PREFIX}" \ + --with-zlib="${PREFIX}" \ + --with-icu \ + --with-lzma="${PREFIX}" \ + --without-python \ + --with-legacy \ + --enable-static=no +make -j${CPU_COUNT} ${VERBOSE_AT} + +if [[ ${target_platform} != osx-64 ]]; then + make check ${VERBOSE_AT} +fi + +make install + +# Remove large documentation files that can take up to 6.6/9.2MB of the install +# size. +# https://github.com/conda-forge/libxml2-feedstock/issues/57 +rm -rf ${PREFIX}/share/doc +rm -rf ${PREFIX}/share/gtk-doc +rm -rf ${PREFIX}/share/man \ No newline at end of file diff --git a/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/info/recipe/conda_build_config.yaml b/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/info/recipe/conda_build_config.yaml new file mode 100644 index 0000000000000000000000000000000000000000..2793e3eca118c7c61700ac8e46d90bfe47b83759 --- /dev/null +++ b/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/info/recipe/conda_build_config.yaml @@ -0,0 +1,37 @@ +BUILD: x86_64-conda_el8-linux-gnu +VERBOSE_AT: V=1 +c_compiler: gcc +c_compiler_version: 11.2.0 +c_stdlib: sysroot +c_stdlib_version: '2.28' +channel_targets: defaults +cpu_optimization_target: nocona +cran_mirror: https://cran.r-project.org +cxx_compiler: gxx +extend_keys: +- pin_run_as_build +- ignore_build_only_deps +- ignore_version +- extend_keys +fortran_compiler: gfortran +icu: '73' +ignore_build_only_deps: +- numpy +- python +libxml2: '2.13' +lua: '5' +numpy: '1.26' +perl: 5.26.2 +pin_run_as_build: + python: + max_pin: x.x + min_pin: x.x + r-base: + max_pin: x.x + min_pin: x.x +platform: linux-64 +python: '3.12' +r_base: '3.5' +target_platform: linux-64 +xz: '5' +zlib: '1.2' diff --git a/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/info/recipe/meta.yaml b/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/info/recipe/meta.yaml new file mode 100644 index 0000000000000000000000000000000000000000..0ed97030242cb888173e6b569dc384c4151f571b --- /dev/null +++ b/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/info/recipe/meta.yaml @@ -0,0 +1,85 @@ +# This file created by conda-build 25.1.2 +# meta.yaml template originally from: +# /home/task_176176819578609/libxml2-feedstock/recipe, last modified Wed Oct 29 20:15:01 2025 +# ------------------------------------------------ + +package: + name: libxml2 + version: 2.13.9 +source: + patches: null + sha256: 8d5fa142a3ea8727db1f7988b01f75b9fad8d311b8e0505e38e9d6a42a720085 + url: https://gitlab.gnome.org/GNOME/libxml2/-/archive/v2.13.9/libxml2-v2.13.9.tar.gz +build: + number: '0' + run_exports: + - libxml2 >=2.13.9,<2.14.0a0 + string: h2c43086_0 +requirements: + build: + - _libgcc_mutex 0.1 main + - _openmp_mutex 5.1 1_gnu + - autoconf 2.71 pl5340h5eee18b_0 + - automake 1.16.5 pl5340h06a4308_1 + - binutils_impl_linux-64 2.40 h5293946_0 + - binutils_linux-64 2.40.0 hc2dff05_2 + - gcc_impl_linux-64 11.2.0 h1234567_1 + - gcc_linux-64 11.2.0 h5c386dc_2 + - kernel-headers_linux-64 4.18.0 h528b178_0 + - ld_impl_linux-64 2.40 h12ee557_0 + - libgcc-devel_linux-64 11.2.0 h1234567_1 + - libgcc-ng 11.2.0 h1234567_1 + - libgomp 11.2.0 h1234567_1 + - libstdcxx-ng 11.2.0 h1234567_1 + - libtool 2.4.7 h6a678d5_0 + - m4 1.4.18 h4e445db_0 + - make 4.2.1 h1bed415_1 + - perl 5.40.2 0_h5eee18b_perl5 + - pkg-config 0.29.2 h1bed415_8 + - sysroot_linux-64 2.28 h528b178_0 + - tzdata 2025b h04d1e81_0 + host: + - _libgcc_mutex 0.1 main + - _openmp_mutex 5.1 1_gnu + - icu 73.1 h6a678d5_0 + - libgcc-ng 11.2.0 h1234567_1 + - libgomp 11.2.0 h1234567_1 + - libstdcxx-ng 11.2.0 h1234567_1 + - xz 5.6.4 h5eee18b_1 + - zlib 1.2.13 hd233ad5_2 + run: + - __glibc >=2.28,<3.0.a0 + - icu >=73.1,<74.0a0 + - libgcc-ng >=11.2.0 + - xz >=5.6.4,<6.0a0 + - zlib >=1.2.13,<2.0a0 +test: + commands: + - xmllint test.xml + files: + - test.xml +about: + description: 'Though libxml2 is written in C a variety of language + + bindings make it available in other environments. + + ' + dev_url: https://gitlab.gnome.org/GNOME/libxml2/ + doc_url: https://gitlab.gnome.org/GNOME/libxml2/-/wikis/home + home: https://gitlab.gnome.org/GNOME/libxml2/ + license: MIT + license_family: MIT + license_file: Copyright + summary: The XML C parser and toolkit of Gnome +extra: + copy_test_source_files: true + final: true + recipe-maintainers: + - chenghlee + - gillins + - jakirkham + - jschueller + - mingwandroid + - msarahan + - ocefpaf + - scopatz diff --git a/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/info/recipe/meta.yaml.template b/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/info/recipe/meta.yaml.template new file mode 100644 index 0000000000000000000000000000000000000000..19f71231e12c8d7f7625bda7e168944931d62d94 --- /dev/null +++ b/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/info/recipe/meta.yaml.template @@ -0,0 +1,64 @@ +{% set version = "2.13.9" %} + +package: + name: libxml2 + version: {{ version }} + +source: + url: https://gitlab.gnome.org/GNOME/libxml2/-/archive/v{{ version }}/libxml2-v{{ version }}.tar.gz + sha256: 8d5fa142a3ea8727db1f7988b01f75b9fad8d311b8e0505e38e9d6a42a720085 + patches: + - 0002-Make-and-install-a-pkg-config-file-on-Windows.patch # [win] + +build: + number: 0 + run_exports: + # remove symbols at minor versions. + # https://abi-laboratory.pro/tracker/timeline/libxml2/ + - {{ pin_subpackage('libxml2', max_pin='x.x') }} + +requirements: + build: + - {{ compiler('c') }} + - {{ stdlib('c') }} + - autoconf # [not win] + - automake # [not win] + - libtool # [not win] + - pkg-config # [not win] + - make # [not win] + host: + - icu {{ icu }} # [not win] + - libiconv 1.16 # [not linux] + - xz {{ xz }} # [not win] + - zlib {{ zlib }} + run: + - libiconv # [not linux] + +test: + files: + - test.xml + commands: + - xmllint test.xml + +about: + home: https://gitlab.gnome.org/GNOME/libxml2/ + license: MIT + license_family: MIT + license_file: Copyright + summary: The XML C parser and toolkit of Gnome + description: | + Though libxml2 is written in C a variety of language + bindings make it available in other environments. + doc_url: https://gitlab.gnome.org/GNOME/libxml2/-/wikis/home + dev_url: https://gitlab.gnome.org/GNOME/libxml2/ + +extra: + recipe-maintainers: + - ocefpaf + - jakirkham + - mingwandroid + - gillins + - jschueller + - msarahan + - scopatz + - chenghlee diff --git a/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/info/recipe/test.xml b/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/info/recipe/test.xml new file mode 100644 index 0000000000000000000000000000000000000000..7afe3ff3792db8e424acebcf6821606fd4dbb72e --- /dev/null +++ b/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/info/recipe/test.xml @@ -0,0 +1,115 @@ + + +Introduction to XSL +

Introduction to XSL

+ + + +
+

Overview +

+
    + +
  • 1.Intro
  • + +
  • 2.History
  • + +
  • 3.XSL Basics
  • + +
  • Lunch
  • + +
  • 4.An XML Data Model
  • + +
  • 5.XSL Patterns
  • + +
  • 6.XSL Templates
  • + +
  • 7.XSL Formatting Model +
  • + +
+ + + + + + +
+

Intro

+
    + +
  • Who am I?
  • + +
  • Who are you?
  • + +
  • Why are we here? +
  • + +
+ + + + + + +
+

History: XML and SGML

+
    + +
  • XML is a subset of SGML.
  • + +
  • SGML allows the separation of abstract content from formatting.
  • + +
  • Also one of XML's primary virtues (in the doc publishing domain). +
  • + +
+ + + + + + +
+

History: What are stylesheets?

+
    + +
  • Stylesheets specify the formatting of SGML/XML documents.
  • + +
  • Stylesheets put the "style" back into documents.
  • + +
  • New York Times content+NYT Stylesheet = NYT paper +
  • + +
+ + + + + + +
+

History: FOSI

+
    + +
  • FOSI: "Formatted Output Specification Instance" +
      +
    • MIL-STD-28001 +
    • + +
    • FOSI's are SGML documents +
    • + +
    • A stylesheet for another document +
    • +
  • + +
  • Obsolete but implemented... +
  • + +
+ + + + + diff --git a/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/info/repodata_record.json b/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/info/repodata_record.json new file mode 100644 index 0000000000000000000000000000000000000000..768b98f06b2ed22a6b4b7063b7952e5ef5cbfb61 --- /dev/null +++ b/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/info/repodata_record.json @@ -0,0 +1,26 @@ +{ + "arch": "x86_64", + "build": "h2c43086_0", + "build_number": 0, + "channel": "https://repo.anaconda.com/pkgs/main/linux-64/", + "constrains": [], + "depends": [ + "__glibc >=2.28,<3.0.a0", + "icu >=73.1,<74.0a0", + "libgcc-ng >=11.2.0", + "xz >=5.6.4,<6.0a0", + "zlib >=1.2.13,<2.0a0" + ], + "fn": "libxml2-2.13.9-h2c43086_0.conda", + "license": "MIT", + "license_family": "MIT", + "md5": "72d5d2d627dd9b7780781e7aa6a12689", + "name": "libxml2", + "platform": "linux", + "sha256": "9bb90ed726ba5868488184f03aa1c18fe654e00aa36b570a16a66c3d350a868b", + "size": 684847, + "subdir": "linux-64", + "timestamp": 1761768971000, + "url": "https://repo.anaconda.com/pkgs/main/linux-64/libxml2-2.13.9-h2c43086_0.conda", + "version": "2.13.9" +} \ No newline at end of file diff --git a/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/info/run_exports.json b/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/info/run_exports.json new file mode 100644 index 0000000000000000000000000000000000000000..78733bd832f9e0f068dc7f5997763601520e8bf1 --- /dev/null +++ b/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/info/run_exports.json @@ -0,0 +1 @@ +{"weak": ["libxml2 >=2.13.9,<2.14.0a0"]} \ No newline at end of file diff --git a/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/info/test/run_test.sh b/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/info/test/run_test.sh new file mode 100644 index 0000000000000000000000000000000000000000..db30f6f0a9db43ba71255c51d72df9f675b861f1 --- /dev/null +++ b/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/info/test/run_test.sh @@ -0,0 +1,8 @@ + + +set -ex + + + +xmllint test.xml +exit 0 diff --git a/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/info/test/test.xml b/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/info/test/test.xml new file mode 100644 index 0000000000000000000000000000000000000000..7afe3ff3792db8e424acebcf6821606fd4dbb72e --- /dev/null +++ b/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/info/test/test.xml @@ -0,0 +1,115 @@ + + +Introduction to XSL +

Introduction to XSL

+ + + +
+

Overview +

+
    + +
  • 1.Intro
  • + +
  • 2.History
  • + +
  • 3.XSL Basics
  • + +
  • Lunch
  • + +
  • 4.An XML Data Model
  • + +
  • 5.XSL Patterns
  • + +
  • 6.XSL Templates
  • + +
  • 7.XSL Formatting Model +
  • + +
+ + + + + + +
+

Intro

+
    + +
  • Who am I?
  • + +
  • Who are you?
  • + +
  • Why are we here? +
  • + +
+ + + + + + +
+

History: XML and SGML

+
    + +
  • XML is a subset of SGML.
  • + +
  • SGML allows the separation of abstract content from formatting.
  • + +
  • Also one of XML's primary virtues (in the doc publishing domain). +
  • + +
+ + + + + + +
+

History: What are stylesheets?

+
    + +
  • Stylesheets specify the formatting of SGML/XML documents.
  • + +
  • Stylesheets put the "style" back into documents.
  • + +
  • New York Times content+NYT Stylesheet = NYT paper +
  • + +
+ + + + + + +
+

History: FOSI

+
    + +
  • FOSI: "Formatted Output Specification Instance" +
      +
    • MIL-STD-28001 +
    • + +
    • FOSI's are SGML documents +
    • + +
    • A stylesheet for another document +
    • +
  • + +
  • Obsolete but implemented... +
  • + +
+ + + + + diff --git a/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/lib/cmake/libxml2/libxml2-config.cmake b/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/lib/cmake/libxml2/libxml2-config.cmake new file mode 100644 index 0000000000000000000000000000000000000000..227f72b4b8617fdc543bb6d78575bfff5aa55196 --- /dev/null +++ b/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/lib/cmake/libxml2/libxml2-config.cmake @@ -0,0 +1,142 @@ +# libxml2-config.cmake +# -------------------- +# +# Libxml2 cmake module. +# This module sets the following variables: +# +# :: +# +# LIBXML2_FOUND - True if libxml2 headers and libraries were found +# LIBXML2_INCLUDE_DIR - Directory where LibXml2 headers are located. +# LIBXML2_INCLUDE_DIRS - list of the include directories needed to use LibXml2. +# LIBXML2_LIBRARY - path to the LibXml2 library. +# LIBXML2_LIBRARIES - xml2 libraries to link against. +# LIBXML2_DEFINITIONS - the compiler switches required for using LibXml2. +# LIBXML2_VERSION_MAJOR - The major version of libxml2. +# LIBXML2_VERSION_MINOR - The minor version of libxml2. +# LIBXML2_VERSION_PATCH - The patch version of libxml2. +# LIBXML2_VERSION_STRING - version number as a string (ex: "2.3.4") +# LIBXML2_MODULES - whether libxml2 has dso support +# LIBXML2_XMLLINT_EXECUTABLE - path to the XML checking tool xmllint coming with LibXml2 +# +# The following targets are defined: +# +# LibXml2::LibXml2 - the LibXml2 library +# LibXml2::xmllint - the xmllint command-line executable + +set(LIBXML2_VERSION_MAJOR 2) +set(LIBXML2_VERSION_MINOR 13) +set(LIBXML2_VERSION_MICRO 9) +set(LIBXML2_VERSION_STRING "2.13.9") +set(LIBXML2_DEFINITIONS "") +set(LIBXML2_INCLUDE_DIR /home/task_176176819578609/conda-bld/libxml2_1761768910671/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold/include/libxml2) +set(LIBXML2_LIBRARY_DIR /home/task_176176819578609/conda-bld/libxml2_1761768910671/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold/lib) + +find_library(LIBXML2_LIBRARY NAMES xml2 HINTS ${LIBXML2_LIBRARY_DIR} NO_DEFAULT_PATH) +find_program(LIBXML2_XMLCATALOG_EXECUTABLE NAMES xmlcatalog HINTS /home/task_176176819578609/conda-bld/libxml2_1761768910671/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold/bin NO_DEFAULT_PATH) +find_program(LIBXML2_XMLLINT_EXECUTABLE NAMES xmllint HINTS /home/task_176176819578609/conda-bld/libxml2_1761768910671/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold/bin NO_DEFAULT_PATH) + +set(LIBXML2_LIBRARIES ${LIBXML2_LIBRARY}) +set(LIBXML2_INCLUDE_DIRS ${LIBXML2_INCLUDE_DIR}) +unset(LIBXML2_INTERFACE_LINK_LIBRARIES) + +include(CMakeFindDependencyMacro) + +set(LIBXML2_WITH_ICONV 1) +set(LIBXML2_WITH_THREADS 1) +set(LIBXML2_WITH_ICU 1) +set(LIBXML2_WITH_LZMA 1) +set(LIBXML2_WITH_ZLIB 1) + +if(LIBXML2_WITH_ICONV) + find_dependency(Iconv) + list(APPEND LIBXML2_LIBRARIES ${Iconv_LIBRARIES}) + list(APPEND LIBXML2_INCLUDE_DIRS ${Iconv_INCLUDE_DIRS}) + list(APPEND LIBXML2_INTERFACE_LINK_LIBRARIES "Iconv::Iconv") + if(NOT Iconv_FOUND) + set(${CMAKE_FIND_PACKAGE_NAME}_FOUND FALSE) + set(${CMAKE_FIND_PACKAGE_NAME}_NOT_FOUND_MESSAGE "Iconv dependency was not found") + return() + endif() +endif() + +if(LIBXML2_WITH_THREADS) + find_dependency(Threads) + list(APPEND LIBXML2_LIBRARIES ${CMAKE_THREAD_LIBS_INIT}) + list(APPEND LIBXML2_INTERFACE_LINK_LIBRARIES "\$") + if(NOT Threads_FOUND) + set(${CMAKE_FIND_PACKAGE_NAME}_FOUND FALSE) + set(${CMAKE_FIND_PACKAGE_NAME}_NOT_FOUND_MESSAGE "Threads dependency was not found") + return() + endif() +endif() + +if(LIBXML2_WITH_ICU) + find_dependency(ICU COMPONENTS data i18n uc) + list(APPEND LIBXML2_LIBRARIES ${ICU_LIBRARIES}) + list(APPEND LIBXML2_INTERFACE_LINK_LIBRARIES "\$;\$;\$") + if(NOT ICU_FOUND) + set(${CMAKE_FIND_PACKAGE_NAME}_FOUND FALSE) + set(${CMAKE_FIND_PACKAGE_NAME}_NOT_FOUND_MESSAGE "ICU dependency was not found") + return() + endif() +endif() + +if(LIBXML2_WITH_LZMA) + find_dependency(LibLZMA) + list(APPEND LIBXML2_LIBRARIES ${LIBLZMA_LIBRARIES}) + list(APPEND LIBXML2_INTERFACE_LINK_LIBRARIES "\$") + if(NOT LibLZMA_FOUND) + set(${CMAKE_FIND_PACKAGE_NAME}_FOUND FALSE) + set(${CMAKE_FIND_PACKAGE_NAME}_NOT_FOUND_MESSAGE "LibLZMA dependency was not found") + return() + endif() +endif() + +if(LIBXML2_WITH_ZLIB) + find_dependency(ZLIB) + list(APPEND LIBXML2_LIBRARIES ${ZLIB_LIBRARIES}) + list(APPEND LIBXML2_INTERFACE_LINK_LIBRARIES "\$") + if(NOT ZLIB_FOUND) + set(${CMAKE_FIND_PACKAGE_NAME}_FOUND FALSE) + set(${CMAKE_FIND_PACKAGE_NAME}_NOT_FOUND_MESSAGE "ZLIB dependency was not found") + return() + endif() +endif() + +if(UNIX) + list(APPEND LIBXML2_LIBRARIES m) + list(APPEND LIBXML2_INTERFACE_LINK_LIBRARIES "\$") +endif() + +if(WIN32) + list(APPEND LIBXML2_LIBRARIES ws2_32;Bcrypt) + list(APPEND LIBXML2_INTERFACE_LINK_LIBRARIES "\$;\$") +endif() + +# whether libxml2 has dso support +set(LIBXML2_MODULES 1) + +mark_as_advanced(LIBXML2_LIBRARY LIBXML2_XMLCATALOG_EXECUTABLE LIBXML2_XMLLINT_EXECUTABLE) + +if(DEFINED LIBXML2_LIBRARY AND DEFINED LIBXML2_INCLUDE_DIRS) + set(LIBXML2_FOUND TRUE) +endif() + +if(NOT TARGET LibXml2::LibXml2 AND DEFINED LIBXML2_LIBRARY AND DEFINED LIBXML2_INCLUDE_DIRS) + add_library(LibXml2::LibXml2 UNKNOWN IMPORTED) + set_target_properties(LibXml2::LibXml2 PROPERTIES IMPORTED_LOCATION "${LIBXML2_LIBRARY}") + set_target_properties(LibXml2::LibXml2 PROPERTIES INTERFACE_COMPILE_OPTIONS "${LIBXML2_DEFINITIONS}") + set_target_properties(LibXml2::LibXml2 PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${LIBXML2_INCLUDE_DIRS}") + set_target_properties(LibXml2::LibXml2 PROPERTIES INTERFACE_LINK_LIBRARIES "${LIBXML2_INTERFACE_LINK_LIBRARIES}") +endif() + +if(NOT TARGET LibXml2::xmlcatalog AND DEFINED LIBXML2_XMLCATALOG_EXECUTABLE) + add_executable(LibXml2::xmlcatalog IMPORTED) + set_target_properties(LibXml2::xmlcatalog PROPERTIES IMPORTED_LOCATION "${LIBXML2_XMLCATALOG_EXECUTABLE}") +endif() + +if(NOT TARGET LibXml2::xmllint AND DEFINED LIBXML2_XMLLINT_EXECUTABLE) + add_executable(LibXml2::xmllint IMPORTED) + set_target_properties(LibXml2::xmllint PROPERTIES IMPORTED_LOCATION "${LIBXML2_XMLLINT_EXECUTABLE}") +endif() diff --git a/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/lib/pkgconfig/libxml-2.0.pc b/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/lib/pkgconfig/libxml-2.0.pc new file mode 100644 index 0000000000000000000000000000000000000000..2baea09317092cb20b4f9bc761fe3a32e114e02b --- /dev/null +++ b/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/lib/pkgconfig/libxml-2.0.pc @@ -0,0 +1,13 @@ +prefix=/home/task_176176819578609/conda-bld/libxml2_1761768910671/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include +modules=1 + +Name: libXML +Version: 2.13.9 +Description: libXML library version2. +Requires.private: icu-i18n +Libs: -L${libdir} -lxml2 +Libs.private: -L/home/task_176176819578609/conda-bld/libxml2_1761768910671/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold/lib -lz -L/home/task_176176819578609/conda-bld/libxml2_1761768910671/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold/lib -llzma -L/home/task_176176819578609/conda-bld/libxml2_1761768910671/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold/lib -lm +Cflags: -I${includedir}/libxml2 -I/home/task_176176819578609/conda-bld/libxml2_1761768910671/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold/include diff --git a/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/share/aclocal/libxml.m4 b/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/share/aclocal/libxml.m4 new file mode 100644 index 0000000000000000000000000000000000000000..27ad84d402179805d0c9c9b101c186064963d5b1 --- /dev/null +++ b/miniconda3/pkgs/libxml2-2.13.9-h2c43086_0/share/aclocal/libxml.m4 @@ -0,0 +1,14 @@ +dnl AM_PATH_XML2([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]]) +dnl Test for XML, and define XML_CPPFLAGS and XML_LIBS +dnl +AC_DEFUN([AM_PATH_XML2],[ + m4_warn([obsolete], [AM_PATH_XML2 is deprecated, use PKG_CHECK_MODULES instead]) + AC_REQUIRE([PKG_PROG_PKG_CONFIG]) + + verdep=ifelse([$1], [], [], [">= $1"]) + PKG_CHECK_MODULES(XML, [libxml-2.0 $verdep], [$2], [$3]) + + XML_CPPFLAGS=$XML_CFLAGS + AC_SUBST(XML_CPPFLAGS) + AC_SUBST(XML_LIBS) +]) diff --git a/miniconda3/pkgs/libzlib-1.3.1-hb25bd0a_0/info/about.json b/miniconda3/pkgs/libzlib-1.3.1-hb25bd0a_0/info/about.json new file mode 100644 index 0000000000000000000000000000000000000000..5de2a724a08061d9e14d1a3e863e60c2e0ef8d42 --- /dev/null +++ b/miniconda3/pkgs/libzlib-1.3.1-hb25bd0a_0/info/about.json @@ -0,0 +1,139 @@ +{ + "channels": [ + "https://repo.anaconda.com/pkgs/main" + ], + "conda_build_version": "24.1.2", + "conda_version": "24.1.2", + "description": "zlib is designed to be a free, general-purpose, lossless data-compression\nlibrary for use on virtually any computer hardware and operating system.\n", + "dev_url": "https://github.com/madler/zlib/tree/v1.3.1", + "doc_url": "https://zlib.net/manual.html", + "env_vars": { + "CIO_TEST": "" + }, + "extra": { + "copy_test_source_files": true, + "final": true, + "flow_run_id": "9f6b66c6-17e9-43de-85a1-e51171cc7f26", + "parent_recipe": { + "name": "zlib-split", + "path": "/feedstock/recipe", + "version": "1.3.1" + }, + "recipe-maintainers": [ + "groutr", + "msarahan", + "ocefpaf", + "mingwandroid" + ], + "remote_url": "git@github.com:AnacondaRecipes/zlib-feedstock.git", + "sha": "75e04258de05478db14c1c11ee6200f55a676d6a" + }, + "home": "https://zlib.net/", + "identifiers": [], + "keywords": [], + "license": "Zlib", + "license_family": "OTHER", + "license_file": "LICENSE", + "root_pkgs": [ + "_libgcc_mutex 0.1 main", + "_openmp_mutex 5.1 1_gnu", + "archspec 0.2.1 pyhd3eb1b0_0", + "boltons 23.0.0 py39h06a4308_0", + "brotli-python 1.0.9 py39h6a678d5_7", + "bzip2 1.0.8 h7b6447c_0", + "c-ares 1.19.1 h5eee18b_0", + "charset-normalizer 2.0.4 pyhd3eb1b0_0", + "conda-content-trust 0.2.0 py39h06a4308_0", + "conda-package-handling 2.2.0 py39h06a4308_0", + "conda-package-streaming 0.9.0 py39h06a4308_0", + "fmt 9.1.0 hdb19cb5_0", + "icu 73.1 h6a678d5_0", + "idna 3.4 py39h06a4308_0", + "jsonpatch 1.32 pyhd3eb1b0_0", + "jsonpointer 2.1 pyhd3eb1b0_0", + "krb5 1.20.1 h143b758_1", + "ld_impl_linux-64 2.38 h1181459_1", + "libarchive 3.6.2 h6ac8c49_2", + "libev 4.33 h7f8727e_1", + "libffi 3.4.4 h6a678d5_0", + "libgcc-ng 11.2.0 h1234567_1", + "libgomp 11.2.0 h1234567_1", + "libnghttp2 1.57.0 h2d74bed_0", + "libsolv 0.7.24 he621ea3_0", + "libssh2 1.10.0 hdbd6064_2", + "libstdcxx-ng 11.2.0 h1234567_1", + "libxml2 2.10.4 hf1b16e4_1", + "lz4-c 1.9.4 h6a678d5_0", + "ncurses 6.4 h6a678d5_0", + "packaging 23.1 py39h06a4308_0", + "pcre2 10.42 hebb0a14_0", + "pluggy 1.0.0 py39h06a4308_1", + "pybind11-abi 4 hd3eb1b0_1", + "pycosat 0.6.6 py39h5eee18b_0", + "pycparser 2.21 pyhd3eb1b0_0", + "pysocks 1.7.1 py39h06a4308_0", + "python 3.9.18 h955ad1f_0", + "readline 8.2 h5eee18b_0", + "reproc 14.2.4 h295c915_1", + "reproc-cpp 14.2.4 h295c915_1", + "ruamel.yaml 0.17.21 py39h5eee18b_0", + "ruamel.yaml.clib 0.2.6 py39h5eee18b_1", + "sqlite 3.41.2 h5eee18b_0", + "tk 8.6.12 h1ccaba5_0", + "tqdm 4.65.0 py39hb070fc8_0", + "wheel 0.41.2 py39h06a4308_0", + "yaml-cpp 0.8.0 h6a678d5_0", + "zlib 1.2.13 h5eee18b_0", + "zstandard 0.19.0 py39h5eee18b_0", + "zstd 1.5.5 hc292b87_0", + "attrs 23.1.0 py39h06a4308_0", + "beautifulsoup4 4.12.2 py39h06a4308_0", + "ca-certificates 2023.12.12 h06a4308_0", + "certifi 2024.2.2 py39h06a4308_0", + "cffi 1.16.0 py39h5eee18b_0", + "chardet 4.0.0 py39h06a4308_1003", + "click 8.1.7 py39h06a4308_0", + "conda 24.1.2 py39h06a4308_0", + "conda-build 24.1.2 py39h06a4308_0", + "conda-index 0.4.0 pyhd3eb1b0_0", + "conda-libmamba-solver 24.1.0 pyhd3eb1b0_0", + "cryptography 42.0.2 py39hdda0065_0", + "distro 1.8.0 py39h06a4308_0", + "filelock 3.13.1 py39h06a4308_0", + "jinja2 3.1.3 py39h06a4308_0", + "jsonschema 4.19.2 py39h06a4308_0", + "jsonschema-specifications 2023.7.1 py39h06a4308_0", + "libcurl 8.5.0 h251f7ec_0", + "libedit 3.1.20230828 h5eee18b_0", + "liblief 0.12.3 h6a678d5_0", + "libmamba 1.5.6 haf1ee3a_0", + "libmambapy 1.5.6 py39h2dafd23_0", + "markupsafe 2.1.3 py39h5eee18b_0", + "menuinst 2.0.2 py39h06a4308_0", + "more-itertools 10.1.0 py39h06a4308_0", + "openssl 3.0.13 h7f8727e_0", + "patch 2.7.6 h7b6447c_1001", + "patchelf 0.17.2 h6a678d5_0", + "pip 23.3.1 py39h06a4308_0", + "pkginfo 1.9.6 py39h06a4308_0", + "platformdirs 3.10.0 py39h06a4308_0", + "psutil 5.9.0 py39h5eee18b_0", + "py-lief 0.12.3 py39h6a678d5_0", + "pyopenssl 24.0.0 py39h06a4308_0", + "python-libarchive-c 2.9 pyhd3eb1b0_1", + "pytz 2023.3.post1 py39h06a4308_0", + "pyyaml 6.0.1 py39h5eee18b_0", + "referencing 0.30.2 py39h06a4308_0", + "requests 2.31.0 py39h06a4308_1", + "rpds-py 0.10.6 py39hb02cf49_0", + "setuptools 68.2.2 py39h06a4308_0", + "soupsieve 2.5 py39h06a4308_0", + "tomli 2.0.1 py39h06a4308_0", + "tzdata 2023d h04d1e81_0", + "urllib3 2.1.0 py39h06a4308_1", + "xz 5.4.5 h5eee18b_0", + "yaml 0.2.5 h7b6447c_0" + ], + "summary": "A massively spiffy yet delicately unobtrusive compression library", + "tags": [] +} \ No newline at end of file diff --git a/miniconda3/pkgs/libzlib-1.3.1-hb25bd0a_0/info/files b/miniconda3/pkgs/libzlib-1.3.1-hb25bd0a_0/info/files new file mode 100644 index 0000000000000000000000000000000000000000..e449fbfd65fafaeadee34a337bb4fdbc29b7ea15 --- /dev/null +++ b/miniconda3/pkgs/libzlib-1.3.1-hb25bd0a_0/info/files @@ -0,0 +1,2 @@ +lib/libz.so.1 +lib/libz.so.1.3.1 diff --git a/miniconda3/pkgs/libzlib-1.3.1-hb25bd0a_0/info/git b/miniconda3/pkgs/libzlib-1.3.1-hb25bd0a_0/info/git new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/miniconda3/pkgs/libzlib-1.3.1-hb25bd0a_0/info/hash_input.json b/miniconda3/pkgs/libzlib-1.3.1-hb25bd0a_0/info/hash_input.json new file mode 100644 index 0000000000000000000000000000000000000000..5f264bcad2463758f6b2d540a0989b61bc0e0291 --- /dev/null +++ b/miniconda3/pkgs/libzlib-1.3.1-hb25bd0a_0/info/hash_input.json @@ -0,0 +1,7 @@ +{ + "c_compiler_version": "11.2.0", + "target_platform": "linux-64", + "c_compiler": "gcc", + "channel_targets": "defaults", + "__glibc": "__glibc >=2.17,<3.0.a0" +} \ No newline at end of file diff --git a/miniconda3/pkgs/libzlib-1.3.1-hb25bd0a_0/info/index.json b/miniconda3/pkgs/libzlib-1.3.1-hb25bd0a_0/info/index.json new file mode 100644 index 0000000000000000000000000000000000000000..d865a9c39aed2bf7e20a42319b9415c818f73f32 --- /dev/null +++ b/miniconda3/pkgs/libzlib-1.3.1-hb25bd0a_0/info/index.json @@ -0,0 +1,19 @@ +{ + "arch": "x86_64", + "build": "hb25bd0a_0", + "build_number": 0, + "constrains": [ + "zlib 1.3.1" + ], + "depends": [ + "__glibc >=2.17,<3.0.a0", + "libgcc-ng >=11.2.0" + ], + "license": "Zlib", + "license_family": "OTHER", + "name": "libzlib", + "platform": "linux", + "subdir": "linux-64", + "timestamp": 1756475934898, + "version": "1.3.1" +} \ No newline at end of file diff --git a/miniconda3/pkgs/libzlib-1.3.1-hb25bd0a_0/info/licenses/LICENSE b/miniconda3/pkgs/libzlib-1.3.1-hb25bd0a_0/info/licenses/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..ab8ee6f71428c3e4646b12b64ad387cde33462e5 --- /dev/null +++ b/miniconda3/pkgs/libzlib-1.3.1-hb25bd0a_0/info/licenses/LICENSE @@ -0,0 +1,22 @@ +Copyright notice: + + (C) 1995-2022 Jean-loup Gailly and Mark Adler + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + 3. This notice may not be removed or altered from any source distribution. + + Jean-loup Gailly Mark Adler + jloup@gzip.org madler@alumni.caltech.edu diff --git a/miniconda3/pkgs/libzlib-1.3.1-hb25bd0a_0/info/paths.json b/miniconda3/pkgs/libzlib-1.3.1-hb25bd0a_0/info/paths.json new file mode 100644 index 0000000000000000000000000000000000000000..875bb1527793ce99e018e9ef8c0b15d09be423dc --- /dev/null +++ b/miniconda3/pkgs/libzlib-1.3.1-hb25bd0a_0/info/paths.json @@ -0,0 +1,17 @@ +{ + "paths": [ + { + "_path": "lib/libz.so.1", + "path_type": "softlink", + "sha256": "96b55bbfb48f50af95da290c4cce33d0724e6565715bfc2e859de7d9efde3cbc", + "size_in_bytes": 108688 + }, + { + "_path": "lib/libz.so.1.3.1", + "path_type": "hardlink", + "sha256": "96b55bbfb48f50af95da290c4cce33d0724e6565715bfc2e859de7d9efde3cbc", + "size_in_bytes": 108688 + } + ], + "paths_version": 1 +} \ No newline at end of file diff --git a/miniconda3/pkgs/libzlib-1.3.1-hb25bd0a_0/info/recipe/conda_build_config.yaml b/miniconda3/pkgs/libzlib-1.3.1-hb25bd0a_0/info/recipe/conda_build_config.yaml new file mode 100644 index 0000000000000000000000000000000000000000..38e4fb8fecfd460eeaed6d6a0365723b27cf7cbe --- /dev/null +++ b/miniconda3/pkgs/libzlib-1.3.1-hb25bd0a_0/info/recipe/conda_build_config.yaml @@ -0,0 +1,395 @@ +VERBOSE_AT: V=1 +VERBOSE_CM: VERBOSE=1 +alsa_lib: '1.2' +ampl_mp: '3.1' +aom: '3.6' +armadillo: '12' +arpack: '3.9' +arrow_cpp: 19.0.0 +assimp: 6.0.2 +at_spi2_core: '2.36' +aws_c_auth: 0.9.0 +aws_c_cal: 0.9.2 +aws_c_common: 0.12.3 +aws_c_compression: 0.3.1 +aws_c_event_stream: 0.5.5 +aws_c_http: 0.10.2 +aws_c_io: 0.20.1 +aws_c_mqtt: 0.13.2 +aws_c_s3: 0.8.3 +aws_c_sdkutils: 0.2.4 +aws_checksums: 0.2.7 +aws_crt_cpp: 0.32.10 +aws_sdk_cpp: 1.11.528 +azure_core_cpp: 1.14.1 +azure_identity_cpp: 1.10.1 +azure_storage_blobs_cpp: 12.13.0 +azure_storage_common_cpp: 12.10.0 +backtrace: '20241216' +blas_impl: mkl +blosc: '1' +brotli: '1' +brunsli: '0' +bzip2: '1' +c_ares: '1' +c_blosc2: '2.17' +c_compiler: gcc +c_compiler_version: 11.2.0 +c_stdlib: sysroot +c_stdlib_version: '2.17' +cairo: '1' +capnproto: 1.1.0 +ceres_solver: '2.2' +cfitsio: '3.470' +cgo_compiler: go-cgo +cgo_compiler_version: '1.21' +channel_targets: defaults +charls: '2.2' +clang_variant: clang +coin_or_cbc: '2.10' +coin_or_cgl: '0.60' +coin_or_clp: '1.17' +coin_or_osi: '0.108' +coin_or_utils: '2.11' +cpu_optimization_target: nocona +cran_mirror: https://cran.r-project.org +cuda_compiler: cuda-nvcc +cuda_compiler_version: '12.4' +cudnn: '9' +cutensor: '2' +cxx_compiler: gxx +cxx_compiler_version: 11.2.0 +cyrus_sasl: 2.1.28 +dav1d: 1.2.1 +dbus: '1' +eigen: 3.3.7 +epoxy: '1.5' +expat: '2' +extend_keys: +- ignore_version +- pin_run_as_build +- extend_keys +- ignore_build_only_deps +ffmpeg: '6' +fftw: '3.3' +flatbuffers: 25.2.10 +fmt: '9' +fontconfig: '2' +fortran_compiler: gfortran +fortran_compiler_version: 11.2.0 +freeglut: '3' +freetds: '1' +freetype: '2' +freexl: '2' +fribidi: '1' +g2clib: '1.6' +gcab: '1' +gdbm: '1.18' +gdk_pixbuf: '2' +geos: 3.10.6 +geotiff: '1.7' +getopt_win32: '0.1' +gettext: '0' +gflags: '2.2' +giflib: '5.2' +gl2ps: 1.4.2 +glew: '2.2' +glib: '2' +glog: '0.5' +glpk: '4.65' +glslang: '15' +gmp: 6.3.0 +gnupg: '2.4' +gnutls: '3.8' +go_compiler: go-nocgo +go_compiler_version: '1.21' +graphite2: '1' +gsl: '2.7' +gst_plugins_base: '1.24' +gst_plugins_good: '1.24' +gstreamer: '1.24' +gstreamer_orc: '0.4' +gtest: 1.14.0 +gtk3: '3' +gts: '0.7' +harfbuzz: '10' +hdf4: 4.2.13 +hdf5: 1.14.5 +hdfeos2: '2.20' +hdfeos5: '5.1' +icu: '73' +ignore_build_only_deps: +- numpy +- python +igraph: '0.10' +isl: '0.22' +jansson: '2' +jasper: '4' +jemalloc: 5.2.1 +jpeg: 9e +json_c: '0.16' +jsoncpp: 1.9.6 +jxrlib: '1.1' +kealib: '1.5' +khronos_opencl_icd_loader: 2024.5.8 +krb5: '1.21' +lame: '3.100' +lcms2: '2' +leptonica: '1.82' +lerc: '4' +level_zero: '1' +leveldb: '1.23' +libabseil: '20250127.0' +libaec: '1' +libaio: '0.3' +libapr: '1' +libapriconv: '1' +libaprutil: '1' +libarchive: '3.7' +libassuan: '3' +libavif: '1' +libboost: 1.88.0 +libboost_devel: 1.88.0 +libbrotlicommon: '1.0' +libbrotlidec: '1.0' +libbrotlienc: '1.0' +libclang13: '14.0' +libclang_cpp14: '14.0' +libcrc32c: '1.1' +libcryptominisat: '5.6' +libcurl: '8' +libdap4: '3.19' +libde265: 1.0.15 +libdeflate: '1.22' +libdrm: '2.4' +libebm: 0.4.4 +libedit: '3.1' +libegl: '1' +libev: '4.33' +libevent: 2.1.12 +libfaiss: 1.0.0 +libffi: '3.4' +libflac: '1.4' +libgcrypt: '1' +libgd: '2.3' +libgdal: '3.11' +libgdal_core: '3.11' +libgit2: '1.6' +libgl: '1' +libgles: '1' +libglib: '2' +libglu: '9' +libglvnd: '1' +libglx: '1' +libgpg_error: '1' +libgrpc: '1.71' +libgsasl: '1' +libgsf: '1.14' +libheif: '1.19' +libhiredis: '1.3' +libiconv: '1' +libidn2: '2' +libjpeg_turbo: '3' +libkml: '1.3' +libksba: '1.6' +liblief: '0.16' +libllvm19: '19.1' +libmamba: '2.0' +libmambapy: '2.0' +libmlir19: '19.1' +libmpdec: '4' +libmpdecxx: '4' +libnetcdf: '4' +libnghttp2: '1' +libnsl: '2.0' +libntlm: '1' +libogg: '1.3' +libopenblas: '0' +libopengl: '1' +libopus: '1' +libortools: '9.9' +libosqp: 0.6.3 +libpcap: '1.10' +libpciaccess: '0.18' +libpng: '1.6' +libpq: '17' +libprotobuf: 5.29.3 +libqdldl: 0.1.7 +librdkafka: '2.2' +libre2_11: '2024' +librsvg: '2' +libsentencepiece: 0.2.0 +libsndfile: '1.2' +libsodium: 1.0.18 +libspatialindex: 1.9.3 +libspatialite: '5.1' +libssh2: '1' +libtasn1: '4' +libtensorflow: 2.18.1 +libtensorflow_cc: 2.18.1 +libtheora: '1' +libthrift: '0.15' +libtiff: '4' +libtmglib: '3' +libtorch: '2.6' +libunistring: '0' +libunwind: '1' +libutf8proc: '2' +libuuid: '1' +libuv: '1' +libvorbis: '1' +libvpx: '1.13' +libvulkan: '1.4' +libwebp: 1.3.2 +libwebp_base: '1' +libxcb: '1' +libxkbcommon: '1' +libxkbfile: '1' +libxml2: '2.13' +libxmlsec1: '1.3' +libxslt: '1' +libzopfli: '1.0' +lmdb: '0' +lua: '5' +lz4_c: '1.9' +lzo: '2' +macports_legacy_support: '1' +mbedtls: '3.5' +mesalib: '25.1' +metis: '5.1' +minizip: '4' +mkl: '2023' +mkl_service: '2' +mpc: '1' +mpfr: '4' +mpich: '4' +mysql_libs: '9.3' +nanobind_abi: '15' +nccl: '2' +ncurses: '6' +nettle: '3.7' +nlopt: '2.7' +npth: '1' +nspr: '4' +nss: '3' +ntbtls: '0' +numpy: '2.0' +ocl_icd: '2' +oniguruma: '6.9' +openblas: '0' +openblas_devel: '0' +openh264: '2.6' +openjpeg: '2' +openldap: '2.6' +openmpi: '4.1' +openssl: '3' +orc: 2.1.1 +pango: '1' +pcre: '8' +pcre2: '10.42' +pdal: '2.5' +perl: '5.38' +pin_run_as_build: + python: + max_pin: x.x + min_pin: x.x + r-base: + max_pin: x.x + min_pin: x.x + libboost: + max_pin: x.x.x +pixman: 0.46.4 +popt: '1' +proj: 9.3.1 +ptscotch: 6.0.9 +pugixml: '1.11' +py_lief: '0.16' +pybind11_abi: '5' +pyqt: '6.7' +pyqtchart: '5.15' +pyqtwebengine: '6.7' +python: '3.9' +python_igraph: '0.10' +python_impl: cpython +python_implementation: cpython +pytorch: '2.6' +qhull: '2020.2' +qpdf: '11' +qt: '6.9' +quantlib: '1' +r_base: 4.3.1 +r_implementation: r-base +r_version: 4.3.1 +rdkit: 2023.03.3 +re2: '2024' +readline: '8' +reproc: '14.2' +reproc_cpp: '14.2' +rhash: '1' +ruby: '3.2' +rust_compiler: rust +rust_compiler_version: 1.87.0 +s2n: 1.5.14 +scotch: 6.0.9 +serf: '1.3' +simdjson: '3.10' +sip: '6.12' +sleef: '3' +snappy: '1' +spdlog: '1' +spdlog_fmt_embed: '1' +spirv_tools: '2025' +sqlite: '3' +suitesparse: '7' +target_platform: linux-64 +tesseract: 5.2.0 +tiledb: '2.26' +tk: '8.6' +unixodbc: '2.3' +vc: '14' +vtk_base: 9.4.1 +vtk_io_ffmpeg: 9.4.1 +wayland: '1.24' +x264: 1!152.20180806 +xcb_util: '0.4' +xcb_util_cursor: '0.1' +xcb_util_image: '0.4' +xcb_util_keysyms: '0.4' +xcb_util_renderutil: '0.3' +xcb_util_wm: '0.4' +xerces_c: '3.2' +xorg_libice: '1' +xorg_libsm: '1' +xorg_libx11: '1' +xorg_libxau: '1' +xorg_libxcomposite: '0' +xorg_libxcursor: '1' +xorg_libxdamage: '1' +xorg_libxdmcp: '1' +xorg_libxext: '1' +xorg_libxfixes: '6' +xorg_libxft: '2' +xorg_libxi: '1' +xorg_libxinerama: '1.1' +xorg_libxmu: '1' +xorg_libxrandr: '1' +xorg_libxrender: '0.9' +xorg_libxscrnsaver: '1' +xorg_libxshmfence: '1' +xorg_libxt: '1' +xorg_libxtst: '1' +xorg_libxxf86vm: '1' +xorg_xextproto: '7' +xorg_xorgproto: '2024' +xxhash: 0.8.0 +xz: '5' +yaml: '0.2' +yaml_cpp: '0.8' +zeromq: '4.3' +zfp: '1' +zip_keys: +- - python + - numpy +zlib: '1.2' +zlib_ng: '2.0' +zstd: '1.5' diff --git a/miniconda3/pkgs/libzlib-1.3.1-hb25bd0a_0/info/recipe/meta.yaml b/miniconda3/pkgs/libzlib-1.3.1-hb25bd0a_0/info/recipe/meta.yaml new file mode 100644 index 0000000000000000000000000000000000000000..f5c0cb91821d858b26cbfe21902203b8f3ef7934 --- /dev/null +++ b/miniconda3/pkgs/libzlib-1.3.1-hb25bd0a_0/info/recipe/meta.yaml @@ -0,0 +1,71 @@ +# This file created by conda-build 24.1.2 +# ------------------------------------------------ + +package: + name: libzlib + version: 1.3.1 +source: + sha256: 9a93b2b7dfdac77ceba5a558a580e74667dd6fede4585b91eefb60f03b72df23 + url: https://zlib.net/zlib-1.3.1.tar.gz +build: + noarch: false + noarch_python: false + number: '0' + run_exports: + - libzlib >=1.3.1,<2.0a0 + string: hb25bd0a_0 +requirements: + build: + - _libgcc_mutex 0.1 main + - _openmp_mutex 5.1 1_gnu + - _sysroot_linux-64_curr_repodata_hack 3 haa98f57_10 + - binutils_impl_linux-64 2.40 h5293946_0 + - binutils_linux-64 2.40.0 hc2dff05_2 + - gcc_impl_linux-64 11.2.0 h1234567_1 + - gcc_linux-64 11.2.0 h5c386dc_2 + - kernel-headers_linux-64 3.10.0 h57e8cba_10 + - ld_impl_linux-64 2.40 h12ee557_0 + - libgcc-devel_linux-64 11.2.0 h1234567_1 + - libgcc-ng 11.2.0 h1234567_1 + - libgomp 11.2.0 h1234567_1 + - libstdcxx-ng 11.2.0 h1234567_1 + - sysroot_linux-64 2.17 h57e8cba_10 + host: + - _libgcc_mutex 0.1 main + - _openmp_mutex 5.1 1_gnu + - libgcc-ng 11.2.0 h1234567_1 + - libgomp 11.2.0 h1234567_1 + run: + - __glibc >=2.17,<3.0.a0 + - libgcc-ng >=11.2.0 + run_constrained: + - zlib 1.3.1 +test: + commands: + - test ! -f ${PREFIX}/lib/libz.a + - test ! -f ${PREFIX}/lib/libz${SHLIB_EXT} + - test ! -f ${PREFIX}/include/zlib.h +about: + description: 'zlib is designed to be a free, general-purpose, lossless data-compression + + library for use on virtually any computer hardware and operating system. + + ' + dev_url: https://github.com/madler/zlib/tree/v1.3.1 + doc_url: https://zlib.net/manual.html + home: https://zlib.net/ + license: Zlib + license_family: OTHER + license_file: LICENSE + summary: A massively spiffy yet delicately unobtrusive compression library +extra: + copy_test_source_files: true + final: true + flow_run_id: 9f6b66c6-17e9-43de-85a1-e51171cc7f26 + recipe-maintainers: + - groutr + - mingwandroid + - msarahan + - ocefpaf + remote_url: git@github.com:AnacondaRecipes/zlib-feedstock.git + sha: 75e04258de05478db14c1c11ee6200f55a676d6a diff --git a/miniconda3/pkgs/libzlib-1.3.1-hb25bd0a_0/info/recipe/parent/bld.bat b/miniconda3/pkgs/libzlib-1.3.1-hb25bd0a_0/info/recipe/parent/bld.bat new file mode 100644 index 0000000000000000000000000000000000000000..f0d85e05c45161291cdc7372969e64954889d6f3 --- /dev/null +++ b/miniconda3/pkgs/libzlib-1.3.1-hb25bd0a_0/info/recipe/parent/bld.bat @@ -0,0 +1,65 @@ +@echo on + +set LIB=%LIBRARY_LIB%;%LIB% +set LIBPATH=%LIBRARY_LIB%;%LIBPATH% +set INCLUDE=%LIBRARY_INC%;%INCLUDE% + +:: Configure. +:: -DZLIB_WINAPI switches to WINAPI calling convention. See Q7 in DLL_FAQ.txt. +cmake -G "NMake Makefiles" ^ + -D CMAKE_BUILD_TYPE=Release ^ + -D CMAKE_PREFIX_PATH=%LIBRARY_PREFIX% ^ + -D CMAKE_INSTALL_PREFIX:PATH=%LIBRARY_PREFIX% ^ + -D CMAKE_C_FLAGS="-DZLIB_WINAPI " ^ + -D CMAKE_RELEASE_POSTFIX="wapi" ^ + %CMAKE_ARGS% %SRC_DIR% +if errorlevel 1 exit 1 + +:: For logging. +type CMakeCache.txt + +:: Build. +cmake --build %SRC_DIR% --config Release +if errorlevel 1 exit 1 + +:: Test. +ctest --output-on-failure +if errorlevel 1 exit 1 + + +:: Copy built zlibwapi.dll with the same name provided by https://www.winimage.com/zLibDll/index.html +:: This is needed for example for cuDNN +:: https://docs.nvidia.com/deeplearning/cudnn/archives/cudnn-890/install-guide/index.html#install-zlib-windows +copy "zlibwapi.dll" "%LIBRARY_BIN%\zlibwapi.dll" || exit 1 +copy "zlibwapi.lib" "%LIBRARY_LIB%\zlibwapi.lib" || exit 1 + +del /f /q CMakeCache.txt + +:: Now build regular zlib. +:: Configure. +cmake -G "NMake Makefiles" ^ + -D CMAKE_BUILD_TYPE=Release ^ + -D CMAKE_PREFIX_PATH=%LIBRARY_PREFIX% ^ + -D CMAKE_INSTALL_PREFIX:PATH=%LIBRARY_PREFIX% ^ + -D INSTALL_PKGCONFIG_DIR=%LIBRARY_PREFIX%\lib\pkgconfig ^ + %SRC_DIR% +if errorlevel 1 exit 1 + +type CMakeCache.txt + +:: Build. +cmake --build %SRC_DIR% --target INSTALL --config Release --clean-first +if errorlevel 1 exit 1 + +:: Test. +ctest --output-on-failure +if errorlevel 1 exit 1 + +:: Some OSS libraries are happier if z.lib exists, even though it's not typical on Windows. +copy %LIBRARY_LIB%\zlib.lib %LIBRARY_LIB%\z.lib || exit 1 + +:: Qt in particular goes looking for this one (as of 4.8.7). +copy %LIBRARY_LIB%\zlib.lib %LIBRARY_LIB%\zdll.lib || exit 1 + +:: python>=3.10 depend on this being at %PREFIX% +copy %LIBRARY_BIN%\zlib.dll %PREFIX%\zlib.dll || exit 1 diff --git a/miniconda3/pkgs/libzlib-1.3.1-hb25bd0a_0/info/recipe/parent/build.sh b/miniconda3/pkgs/libzlib-1.3.1-hb25bd0a_0/info/recipe/parent/build.sh new file mode 100644 index 0000000000000000000000000000000000000000..1b01bdb95e0bfea80b913c3a7d3523c26d819356 --- /dev/null +++ b/miniconda3/pkgs/libzlib-1.3.1-hb25bd0a_0/info/recipe/parent/build.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +export CFLAGS="${CFLAGS} -fPIC" +export CXXFLAGS="${CXXFLAGS} -fPIC" + +if [[ "$target_platform" == linux-* ]]; then + export CC=$GCC +fi + +export cc=$CC + +./configure --prefix=${PREFIX} \ + --shared || (cat configure.log && false) + +cat configure.log + +make -j${CPU_COUNT} ${VERBOSE_AT} +make check +make install diff --git a/miniconda3/pkgs/libzlib-1.3.1-hb25bd0a_0/info/recipe/parent/conda_build_config.yaml b/miniconda3/pkgs/libzlib-1.3.1-hb25bd0a_0/info/recipe/parent/conda_build_config.yaml new file mode 100644 index 0000000000000000000000000000000000000000..bf5d8d771d86d5797dfef35b256f9e1aaccc2de1 --- /dev/null +++ b/miniconda3/pkgs/libzlib-1.3.1-hb25bd0a_0/info/recipe/parent/conda_build_config.yaml @@ -0,0 +1,2 @@ +c_compiler: # [osx] + - clang_bootstrap # [osx] diff --git a/miniconda3/pkgs/libzlib-1.3.1-hb25bd0a_0/info/recipe/parent/meta.yaml b/miniconda3/pkgs/libzlib-1.3.1-hb25bd0a_0/info/recipe/parent/meta.yaml new file mode 100644 index 0000000000000000000000000000000000000000..09a1a0d75ce8f672a3c8bc6a1e7710eb74af0c47 --- /dev/null +++ b/miniconda3/pkgs/libzlib-1.3.1-hb25bd0a_0/info/recipe/parent/meta.yaml @@ -0,0 +1,149 @@ +{% set name = "zlib" %} +{% set version = "1.3.1" %} + +package: + name: {{ name|lower }}-split + version: {{ version }} + +source: + url: https://zlib.net/zlib-{{ version }}.tar.gz + sha256: 9a93b2b7dfdac77ceba5a558a580e74667dd6fede4585b91eefb60f03b72df23 + +build: + number: 0 + +requirements: + build: + - {{ stdlib('c') }} + - {{ compiler('c') }} + - cmake # [win] + - make # [unix] + +outputs: + - name: lib{{ name }} + run_exports: + - {{ pin_subpackage('lib' + name, max_pin='x') }} + requirements: + build: + - {{ stdlib('c') }} + - {{ compiler('c') }} + run_constrained: + - {{ name }} {{ version }} + files: + - lib/libz.so.* # [linux] + - lib/libz.*.dylib # [osx] + - Library/bin/zlib.dll # [win] + - zlib.dll # [win] + test: + commands: + - test ! -f ${PREFIX}/lib/libz.a # [unix] + - test ! -f ${PREFIX}/lib/libz${SHLIB_EXT} # [unix] + - test ! -f ${PREFIX}/include/zlib.h # [unix] + - if not exist %LIBRARY_BIN%\zlib.dll exit 1 # [win] + - if not exist %PREFIX%\zlib.dll exit 1 # [win] + + - name: lib{{ name }}-wapi + build: + skip: true # [not win] + run_exports: + - {{ pin_subpackage('lib' + name + '-wapi', max_pin='x') }} + requirements: + build: + - {{ stdlib('c') }} + - {{ compiler('c') }} + run_constrained: + - {{ name }} {{ version }} + - {{ name }}-wapi {{ version }} + files: + - Library/bin/zlibwapi.dll # [win] + test: + commands: + - if not exist "%LIBRARY_BIN%\zlibwapi.dll" exit 1 # [win] + + - name: {{ name }} + build: + run_exports: + - {{ pin_subpackage('lib' + name, max_pin='x') }} + requirements: + build: + - {{ stdlib('c') }} + - {{ compiler('c') }} + host: + - {{ pin_subpackage('lib' + name, exact=True) }} + run: + - {{ pin_subpackage('lib' + name, exact=True) }} + files: + - lib/libz.so # [linux] + - lib/libz.dylib # [osx] + - include # [unix] + - lib/pkgconfig # [unix] + - lib/libz.a # [unix] + - Library/include # [win] + - Library/share # [win] + - Library/lib/zlib.lib # [win] + - Library/lib/zdll.lib # [win] + - Library/lib/z.lib # [win] + - Library/lib/zlibstatic.lib # [win] + - Library/lib/pkgconfig # [win] + test: + requires: + - {{ compiler('c') }} + files: + - test_compile_flags.bat + - test_compile_flags.c + commands: + - test -f ${PREFIX}/lib/libz.a # [unix] + - test -f ${PREFIX}/lib/libz${SHLIB_EXT} # [unix] + - test -f ${PREFIX}/include/zlib.h # [unix] + - if not exist %LIBRARY_LIB%\zlibstatic.lib exit 1 # [win] + - if not exist %LIBRARY_LIB%\zlib.lib exit 1 # [win] + - if not exist %LIBRARY_LIB%\pkgconfig\zlib.pc exit 1 # [win] + - if not exist %LIBRARY_INC%\zlib.h exit 1 # [win] + - if exist %LIBRARY_LIB%\zlibwapi.lib exit 1 # [win] + - call test_compile_flags.bat # [win] + + - name: {{ name }}-wapi + build: + skip: true # [not win] + run_exports: + - {{ pin_subpackage('lib' + name + '-wapi', max_pin='x') }} + requirements: + build: + - {{ stdlib('c') }} + - {{ compiler('c') }} + host: + - {{ pin_subpackage('lib' + name + '-wapi', exact=True) }} + - {{ pin_subpackage(name, exact=True) }} + run: + - {{ pin_subpackage('lib' + name + '-wapi', exact=True) }} + - {{ pin_subpackage(name, exact=True) }} + files: + - Library/lib/zlibwapi.lib # [win] + test: + requires: + - {{ compiler('c') }} + files: + - test_compile_flags.bat + - test_compile_flags.c + commands: + - if not exist %LIBRARY_LIB%\zlibwapi.lib exit 1 # [win] + - call test_compile_flags.bat "wapi" # [win] + +about: + home: https://zlib.net/ + summary: A massively spiffy yet delicately unobtrusive compression library + description: | + zlib is designed to be a free, general-purpose, lossless data-compression + library for use on virtually any computer hardware and operating system. + license: Zlib + license_family: OTHER + license_file: LICENSE + doc_url: https://zlib.net/manual.html + dev_url: https://github.com/madler/zlib/tree/v1.3.1 + +extra: + recipe-maintainers: + - groutr + - msarahan + - ocefpaf + - mingwandroid diff --git a/miniconda3/pkgs/libzlib-1.3.1-hb25bd0a_0/info/recipe/parent/test_compile_flags.bat b/miniconda3/pkgs/libzlib-1.3.1-hb25bd0a_0/info/recipe/parent/test_compile_flags.bat new file mode 100644 index 0000000000000000000000000000000000000000..9d6dc51eb5fc5977800b43a83c40673d22cc4e35 --- /dev/null +++ b/miniconda3/pkgs/libzlib-1.3.1-hb25bd0a_0/info/recipe/parent/test_compile_flags.bat @@ -0,0 +1,13 @@ +IF "%~1"=="wapi" ( +:: Compile example that links zlibwapi.lib +%CC% /I%PREFIX%\Library\include %PREFIX%\Library\lib\zlibwapi.lib /DZLIB_WINAPI test_compile_flags.c +if errorlevel 1 exit 1 +) else ( +:: Compile example that links zlib.lib +%CC% /I%PREFIX%\Library\include %PREFIX%\Library\lib\zlib.lib test_compile_flags.c +if errorlevel 1 exit 1 +) + +:: Run test +.\test_compile_flags.exe +if errorlevel 1 exit 1 diff --git a/miniconda3/pkgs/libzlib-1.3.1-hb25bd0a_0/info/recipe/parent/test_compile_flags.c b/miniconda3/pkgs/libzlib-1.3.1-hb25bd0a_0/info/recipe/parent/test_compile_flags.c new file mode 100644 index 0000000000000000000000000000000000000000..8e8befd6a32f3e60e8878d1c333da9d3b5c8c079 --- /dev/null +++ b/miniconda3/pkgs/libzlib-1.3.1-hb25bd0a_0/info/recipe/parent/test_compile_flags.c @@ -0,0 +1,19 @@ +#include + +int main() +{ + // compile flags must have the 10-th bit set if compiled with ZLIB_WINAPI + printf("zlib version %s = 0x%04x, compile flags = 0x%lx\n", + ZLIB_VERSION, ZLIB_VERNUM, zlibCompileFlags()); + +#ifdef ZLIB_WINAPI + if ((zlibCompileFlags() & (1 << 10)) == 0) { + return 1; + } +#else + if ((zlibCompileFlags() & (1 << 10)) != 0) { + return 1; + } +#endif + return 0; +} diff --git a/miniconda3/pkgs/libzlib-1.3.1-hb25bd0a_0/info/repodata_record.json b/miniconda3/pkgs/libzlib-1.3.1-hb25bd0a_0/info/repodata_record.json new file mode 100644 index 0000000000000000000000000000000000000000..0a79373641fe2b4d7fc360f75143dfa6429047b8 --- /dev/null +++ b/miniconda3/pkgs/libzlib-1.3.1-hb25bd0a_0/info/repodata_record.json @@ -0,0 +1,25 @@ +{ + "arch": "x86_64", + "build": "hb25bd0a_0", + "build_number": 0, + "channel": "https://repo.anaconda.com/pkgs/main/linux-64/", + "constrains": [ + "zlib 1.3.1" + ], + "depends": [ + "__glibc >=2.17,<3.0.a0", + "libgcc-ng >=11.2.0" + ], + "fn": "libzlib-1.3.1-hb25bd0a_0.conda", + "license": "Zlib", + "license_family": "OTHER", + "md5": "338ee51e19ee211b7fc994d4ba88c631", + "name": "libzlib", + "platform": "linux", + "sha256": "2e0a3ea3aba7ffaa9c2ce9b267b34b12859f93bde8e62cedcbbab6144776568f", + "size": 60697, + "subdir": "linux-64", + "timestamp": 1756475934000, + "url": "https://repo.anaconda.com/pkgs/main/linux-64/libzlib-1.3.1-hb25bd0a_0.conda", + "version": "1.3.1" +} \ No newline at end of file diff --git a/miniconda3/pkgs/libzlib-1.3.1-hb25bd0a_0/info/run_exports.json b/miniconda3/pkgs/libzlib-1.3.1-hb25bd0a_0/info/run_exports.json new file mode 100644 index 0000000000000000000000000000000000000000..d8f0e5e68089ff605627ff226e7b652f90a5bc9a --- /dev/null +++ b/miniconda3/pkgs/libzlib-1.3.1-hb25bd0a_0/info/run_exports.json @@ -0,0 +1 @@ +{"weak": ["libzlib >=1.3.1,<2.0a0"]} \ No newline at end of file diff --git a/miniconda3/pkgs/libzlib-1.3.1-hb25bd0a_0/info/test/run_test.sh b/miniconda3/pkgs/libzlib-1.3.1-hb25bd0a_0/info/test/run_test.sh new file mode 100644 index 0000000000000000000000000000000000000000..5da1d53adadefd7ba63cec665c903dffa9f5a718 --- /dev/null +++ b/miniconda3/pkgs/libzlib-1.3.1-hb25bd0a_0/info/test/run_test.sh @@ -0,0 +1,10 @@ + + +set -ex + + + +test ! -f ${PREFIX}/lib/libz.a +test ! -f ${PREFIX}/lib/libz${SHLIB_EXT} +test ! -f ${PREFIX}/include/zlib.h +exit 0 diff --git a/miniconda3/pkgs/lmdb-0.9.31-hb25bd0a_0/include/lmdb.h b/miniconda3/pkgs/lmdb-0.9.31-hb25bd0a_0/include/lmdb.h new file mode 100644 index 0000000000000000000000000000000000000000..ff03c224f22b26503ff1b5d1f01bf0b08c120993 --- /dev/null +++ b/miniconda3/pkgs/lmdb-0.9.31-hb25bd0a_0/include/lmdb.h @@ -0,0 +1,1608 @@ +/** @file lmdb.h + * @brief Lightning memory-mapped database library + * + * @mainpage Lightning Memory-Mapped Database Manager (LMDB) + * + * @section intro_sec Introduction + * LMDB is a Btree-based database management library modeled loosely on the + * BerkeleyDB API, but much simplified. The entire database is exposed + * in a memory map, and all data fetches return data directly + * from the mapped memory, so no malloc's or memcpy's occur during + * data fetches. As such, the library is extremely simple because it + * requires no page caching layer of its own, and it is extremely high + * performance and memory-efficient. It is also fully transactional with + * full ACID semantics, and when the memory map is read-only, the + * database integrity cannot be corrupted by stray pointer writes from + * application code. + * + * The library is fully thread-aware and supports concurrent read/write + * access from multiple processes and threads. Data pages use a copy-on- + * write strategy so no active data pages are ever overwritten, which + * also provides resistance to corruption and eliminates the need of any + * special recovery procedures after a system crash. Writes are fully + * serialized; only one write transaction may be active at a time, which + * guarantees that writers can never deadlock. The database structure is + * multi-versioned so readers run with no locks; writers cannot block + * readers, and readers don't block writers. + * + * Unlike other well-known database mechanisms which use either write-ahead + * transaction logs or append-only data writes, LMDB requires no maintenance + * during operation. Both write-ahead loggers and append-only databases + * require periodic checkpointing and/or compaction of their log or database + * files otherwise they grow without bound. LMDB tracks free pages within + * the database and re-uses them for new write operations, so the database + * size does not grow without bound in normal use. + * + * The memory map can be used as a read-only or read-write map. It is + * read-only by default as this provides total immunity to corruption. + * Using read-write mode offers much higher write performance, but adds + * the possibility for stray application writes thru pointers to silently + * corrupt the database. Of course if your application code is known to + * be bug-free (...) then this is not an issue. + * + * If this is your first time using a transactional embedded key/value + * store, you may find the \ref starting page to be helpful. + * + * @section caveats_sec Caveats + * Troubleshooting the lock file, plus semaphores on BSD systems: + * + * - A broken lockfile can cause sync issues. + * Stale reader transactions left behind by an aborted program + * cause further writes to grow the database quickly, and + * stale locks can block further operation. + * + * Fix: Check for stale readers periodically, using the + * #mdb_reader_check function or the \ref mdb_stat_1 "mdb_stat" tool. + * Stale writers will be cleared automatically on some systems: + * - Windows - automatic + * - Linux, systems using POSIX mutexes with Robust option - automatic + * - not on BSD, systems using POSIX semaphores. + * Otherwise just make all programs using the database close it; + * the lockfile is always reset on first open of the environment. + * + * - On BSD systems or others configured with MDB_USE_POSIX_SEM, + * startup can fail due to semaphores owned by another userid. + * + * Fix: Open and close the database as the user which owns the + * semaphores (likely last user) or as root, while no other + * process is using the database. + * + * Restrictions/caveats (in addition to those listed for some functions): + * + * - Only the database owner should normally use the database on + * BSD systems or when otherwise configured with MDB_USE_POSIX_SEM. + * Multiple users can cause startup to fail later, as noted above. + * + * - There is normally no pure read-only mode, since readers need write + * access to locks and lock file. Exceptions: On read-only filesystems + * or with the #MDB_NOLOCK flag described under #mdb_env_open(). + * + * - An LMDB configuration will often reserve considerable \b unused + * memory address space and maybe file size for future growth. + * This does not use actual memory or disk space, but users may need + * to understand the difference so they won't be scared off. + * + * - By default, in versions before 0.9.10, unused portions of the data + * file might receive garbage data from memory freed by other code. + * (This does not happen when using the #MDB_WRITEMAP flag.) As of + * 0.9.10 the default behavior is to initialize such memory before + * writing to the data file. Since there may be a slight performance + * cost due to this initialization, applications may disable it using + * the #MDB_NOMEMINIT flag. Applications handling sensitive data + * which must not be written should not use this flag. This flag is + * irrelevant when using #MDB_WRITEMAP. + * + * - A thread can only use one transaction at a time, plus any child + * transactions. Each transaction belongs to one thread. See below. + * The #MDB_NOTLS flag changes this for read-only transactions. + * + * - Use an MDB_env* in the process which opened it, not after fork(). + * + * - Do not have open an LMDB database twice in the same process at + * the same time. Not even from a plain open() call - close()ing it + * breaks fcntl() advisory locking. (It is OK to reopen it after + * fork() - exec*(), since the lockfile has FD_CLOEXEC set.) + * + * - Avoid long-lived transactions. Read transactions prevent + * reuse of pages freed by newer write transactions, thus the + * database can grow quickly. Write transactions prevent + * other write transactions, since writes are serialized. + * + * - Avoid suspending a process with active transactions. These + * would then be "long-lived" as above. Also read transactions + * suspended when writers commit could sometimes see wrong data. + * + * ...when several processes can use a database concurrently: + * + * - Avoid aborting a process with an active transaction. + * The transaction becomes "long-lived" as above until a check + * for stale readers is performed or the lockfile is reset, + * since the process may not remove it from the lockfile. + * + * This does not apply to write transactions if the system clears + * stale writers, see above. + * + * - If you do that anyway, do a periodic check for stale readers. Or + * close the environment once in a while, so the lockfile can get reset. + * + * - Do not use LMDB databases on remote filesystems, even between + * processes on the same host. This breaks flock() on some OSes, + * possibly memory map sync, and certainly sync between programs + * on different hosts. + * + * - Opening a database can fail if another process is opening or + * closing it at exactly the same time. + * + * @author Howard Chu, Symas Corporation. + * + * @copyright Copyright 2011-2021 Howard Chu, Symas Corp. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted only as authorized by the OpenLDAP + * Public License. + * + * A copy of this license is available in the file LICENSE in the + * top-level directory of the distribution or, alternatively, at + * . + * + * @par Derived From: + * This code is derived from btree.c written by Martin Hedenfalk. + * + * Copyright (c) 2009, 2010 Martin Hedenfalk + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ +#ifndef _LMDB_H_ +#define _LMDB_H_ + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/** Unix permissions for creating files, or dummy definition for Windows */ +#ifdef _MSC_VER +typedef int mdb_mode_t; +#else +typedef mode_t mdb_mode_t; +#endif + +/** An abstraction for a file handle. + * On POSIX systems file handles are small integers. On Windows + * they're opaque pointers. + */ +#ifdef _WIN32 +typedef void *mdb_filehandle_t; +#else +typedef int mdb_filehandle_t; +#endif + +/** @defgroup mdb LMDB API + * @{ + * @brief OpenLDAP Lightning Memory-Mapped Database Manager + */ +/** @defgroup Version Version Macros + * @{ + */ +/** Library major version */ +#define MDB_VERSION_MAJOR 0 +/** Library minor version */ +#define MDB_VERSION_MINOR 9 +/** Library patch version */ +#define MDB_VERSION_PATCH 31 + +/** Combine args a,b,c into a single integer for easy version comparisons */ +#define MDB_VERINT(a,b,c) (((a) << 24) | ((b) << 16) | (c)) + +/** The full library version as a single integer */ +#define MDB_VERSION_FULL \ + MDB_VERINT(MDB_VERSION_MAJOR,MDB_VERSION_MINOR,MDB_VERSION_PATCH) + +/** The release date of this library version */ +#define MDB_VERSION_DATE "July 10, 2023" + +/** A stringifier for the version info */ +#define MDB_VERSTR(a,b,c,d) "LMDB " #a "." #b "." #c ": (" d ")" + +/** A helper for the stringifier macro */ +#define MDB_VERFOO(a,b,c,d) MDB_VERSTR(a,b,c,d) + +/** The full library version as a C string */ +#define MDB_VERSION_STRING \ + MDB_VERFOO(MDB_VERSION_MAJOR,MDB_VERSION_MINOR,MDB_VERSION_PATCH,MDB_VERSION_DATE) +/** @} */ + +/** @brief Opaque structure for a database environment. + * + * A DB environment supports multiple databases, all residing in the same + * shared-memory map. + */ +typedef struct MDB_env MDB_env; + +/** @brief Opaque structure for a transaction handle. + * + * All database operations require a transaction handle. Transactions may be + * read-only or read-write. + */ +typedef struct MDB_txn MDB_txn; + +/** @brief A handle for an individual database in the DB environment. */ +typedef unsigned int MDB_dbi; + +/** @brief Opaque structure for navigating through a database */ +typedef struct MDB_cursor MDB_cursor; + +/** @brief Generic structure used for passing keys and data in and out + * of the database. + * + * Values returned from the database are valid only until a subsequent + * update operation, or the end of the transaction. Do not modify or + * free them, they commonly point into the database itself. + * + * Key sizes must be between 1 and #mdb_env_get_maxkeysize() inclusive. + * The same applies to data sizes in databases with the #MDB_DUPSORT flag. + * Other data items can in theory be from 0 to 0xffffffff bytes long. + */ +typedef struct MDB_val { + size_t mv_size; /**< size of the data item */ + void *mv_data; /**< address of the data item */ +} MDB_val; + +/** @brief A callback function used to compare two keys in a database */ +typedef int (MDB_cmp_func)(const MDB_val *a, const MDB_val *b); + +/** @brief A callback function used to relocate a position-dependent data item + * in a fixed-address database. + * + * The \b newptr gives the item's desired address in + * the memory map, and \b oldptr gives its previous address. The item's actual + * data resides at the address in \b item. This callback is expected to walk + * through the fields of the record in \b item and modify any + * values based at the \b oldptr address to be relative to the \b newptr address. + * @param[in,out] item The item that is to be relocated. + * @param[in] oldptr The previous address. + * @param[in] newptr The new address to relocate to. + * @param[in] relctx An application-provided context, set by #mdb_set_relctx(). + * @todo This feature is currently unimplemented. + */ +typedef void (MDB_rel_func)(MDB_val *item, void *oldptr, void *newptr, void *relctx); + +/** @defgroup mdb_env Environment Flags + * @{ + */ + /** mmap at a fixed address (experimental) */ +#define MDB_FIXEDMAP 0x01 + /** no environment directory */ +#define MDB_NOSUBDIR 0x4000 + /** don't fsync after commit */ +#define MDB_NOSYNC 0x10000 + /** read only */ +#define MDB_RDONLY 0x20000 + /** don't fsync metapage after commit */ +#define MDB_NOMETASYNC 0x40000 + /** use writable mmap */ +#define MDB_WRITEMAP 0x80000 + /** use asynchronous msync when #MDB_WRITEMAP is used */ +#define MDB_MAPASYNC 0x100000 + /** tie reader locktable slots to #MDB_txn objects instead of to threads */ +#define MDB_NOTLS 0x200000 + /** don't do any locking, caller must manage their own locks */ +#define MDB_NOLOCK 0x400000 + /** don't do readahead (no effect on Windows) */ +#define MDB_NORDAHEAD 0x800000 + /** don't initialize malloc'd memory before writing to datafile */ +#define MDB_NOMEMINIT 0x1000000 +/** @} */ + +/** @defgroup mdb_dbi_open Database Flags + * @{ + */ + /** use reverse string keys */ +#define MDB_REVERSEKEY 0x02 + /** use sorted duplicates */ +#define MDB_DUPSORT 0x04 + /** numeric keys in native byte order: either unsigned int or size_t. + * The keys must all be of the same size. */ +#define MDB_INTEGERKEY 0x08 + /** with #MDB_DUPSORT, sorted dup items have fixed size */ +#define MDB_DUPFIXED 0x10 + /** with #MDB_DUPSORT, dups are #MDB_INTEGERKEY-style integers */ +#define MDB_INTEGERDUP 0x20 + /** with #MDB_DUPSORT, use reverse string dups */ +#define MDB_REVERSEDUP 0x40 + /** create DB if not already existing */ +#define MDB_CREATE 0x40000 +/** @} */ + +/** @defgroup mdb_put Write Flags + * @{ + */ +/** For put: Don't write if the key already exists. */ +#define MDB_NOOVERWRITE 0x10 +/** Only for #MDB_DUPSORT
+ * For put: don't write if the key and data pair already exist.
+ * For mdb_cursor_del: remove all duplicate data items. + */ +#define MDB_NODUPDATA 0x20 +/** For mdb_cursor_put: overwrite the current key/data pair */ +#define MDB_CURRENT 0x40 +/** For put: Just reserve space for data, don't copy it. Return a + * pointer to the reserved space. + */ +#define MDB_RESERVE 0x10000 +/** Data is being appended, don't split full pages. */ +#define MDB_APPEND 0x20000 +/** Duplicate data is being appended, don't split full pages. */ +#define MDB_APPENDDUP 0x40000 +/** Store multiple data items in one call. Only for #MDB_DUPFIXED. */ +#define MDB_MULTIPLE 0x80000 +/* @} */ + +/** @defgroup mdb_copy Copy Flags + * @{ + */ +/** Compacting copy: Omit free space from copy, and renumber all + * pages sequentially. + */ +#define MDB_CP_COMPACT 0x01 +/* @} */ + +/** @brief Cursor Get operations. + * + * This is the set of all operations for retrieving data + * using a cursor. + */ +typedef enum MDB_cursor_op { + MDB_FIRST, /**< Position at first key/data item */ + MDB_FIRST_DUP, /**< Position at first data item of current key. + Only for #MDB_DUPSORT */ + MDB_GET_BOTH, /**< Position at key/data pair. Only for #MDB_DUPSORT */ + MDB_GET_BOTH_RANGE, /**< position at key, nearest data. Only for #MDB_DUPSORT */ + MDB_GET_CURRENT, /**< Return key/data at current cursor position */ + MDB_GET_MULTIPLE, /**< Return up to a page of duplicate data items + from current cursor position. Move cursor to prepare + for #MDB_NEXT_MULTIPLE. Only for #MDB_DUPFIXED */ + MDB_LAST, /**< Position at last key/data item */ + MDB_LAST_DUP, /**< Position at last data item of current key. + Only for #MDB_DUPSORT */ + MDB_NEXT, /**< Position at next data item */ + MDB_NEXT_DUP, /**< Position at next data item of current key. + Only for #MDB_DUPSORT */ + MDB_NEXT_MULTIPLE, /**< Return up to a page of duplicate data items + from next cursor position. Move cursor to prepare + for #MDB_NEXT_MULTIPLE. Only for #MDB_DUPFIXED */ + MDB_NEXT_NODUP, /**< Position at first data item of next key */ + MDB_PREV, /**< Position at previous data item */ + MDB_PREV_DUP, /**< Position at previous data item of current key. + Only for #MDB_DUPSORT */ + MDB_PREV_NODUP, /**< Position at last data item of previous key */ + MDB_SET, /**< Position at specified key */ + MDB_SET_KEY, /**< Position at specified key, return key + data */ + MDB_SET_RANGE, /**< Position at first key greater than or equal to specified key. */ + MDB_PREV_MULTIPLE /**< Position at previous page and return up to + a page of duplicate data items. Only for #MDB_DUPFIXED */ +} MDB_cursor_op; + +/** @defgroup errors Return Codes + * + * BerkeleyDB uses -30800 to -30999, we'll go under them + * @{ + */ + /** Successful result */ +#define MDB_SUCCESS 0 + /** key/data pair already exists */ +#define MDB_KEYEXIST (-30799) + /** key/data pair not found (EOF) */ +#define MDB_NOTFOUND (-30798) + /** Requested page not found - this usually indicates corruption */ +#define MDB_PAGE_NOTFOUND (-30797) + /** Located page was wrong type */ +#define MDB_CORRUPTED (-30796) + /** Update of meta page failed or environment had fatal error */ +#define MDB_PANIC (-30795) + /** Environment version mismatch */ +#define MDB_VERSION_MISMATCH (-30794) + /** File is not a valid LMDB file */ +#define MDB_INVALID (-30793) + /** Environment mapsize reached */ +#define MDB_MAP_FULL (-30792) + /** Environment maxdbs reached */ +#define MDB_DBS_FULL (-30791) + /** Environment maxreaders reached */ +#define MDB_READERS_FULL (-30790) + /** Too many TLS keys in use - Windows only */ +#define MDB_TLS_FULL (-30789) + /** Txn has too many dirty pages */ +#define MDB_TXN_FULL (-30788) + /** Cursor stack too deep - internal error */ +#define MDB_CURSOR_FULL (-30787) + /** Page has not enough space - internal error */ +#define MDB_PAGE_FULL (-30786) + /** Database contents grew beyond environment mapsize */ +#define MDB_MAP_RESIZED (-30785) + /** Operation and DB incompatible, or DB type changed. This can mean: + *
    + *
  • The operation expects an #MDB_DUPSORT / #MDB_DUPFIXED database. + *
  • Opening a named DB when the unnamed DB has #MDB_DUPSORT / #MDB_INTEGERKEY. + *
  • Accessing a data record as a database, or vice versa. + *
  • The database was dropped and recreated with different flags. + *
+ */ +#define MDB_INCOMPATIBLE (-30784) + /** Invalid reuse of reader locktable slot */ +#define MDB_BAD_RSLOT (-30783) + /** Transaction must abort, has a child, or is invalid */ +#define MDB_BAD_TXN (-30782) + /** Unsupported size of key/DB name/data, or wrong DUPFIXED size */ +#define MDB_BAD_VALSIZE (-30781) + /** The specified DBI was changed unexpectedly */ +#define MDB_BAD_DBI (-30780) + /** The last defined error code */ +#define MDB_LAST_ERRCODE MDB_BAD_DBI +/** @} */ + +/** @brief Statistics for a database in the environment */ +typedef struct MDB_stat { + unsigned int ms_psize; /**< Size of a database page. + This is currently the same for all databases. */ + unsigned int ms_depth; /**< Depth (height) of the B-tree */ + size_t ms_branch_pages; /**< Number of internal (non-leaf) pages */ + size_t ms_leaf_pages; /**< Number of leaf pages */ + size_t ms_overflow_pages; /**< Number of overflow pages */ + size_t ms_entries; /**< Number of data items */ +} MDB_stat; + +/** @brief Information about the environment */ +typedef struct MDB_envinfo { + void *me_mapaddr; /**< Address of map, if fixed */ + size_t me_mapsize; /**< Size of the data memory map */ + size_t me_last_pgno; /**< ID of the last used page */ + size_t me_last_txnid; /**< ID of the last committed transaction */ + unsigned int me_maxreaders; /**< max reader slots in the environment */ + unsigned int me_numreaders; /**< max reader slots used in the environment */ +} MDB_envinfo; + + /** @brief Return the LMDB library version information. + * + * @param[out] major if non-NULL, the library major version number is copied here + * @param[out] minor if non-NULL, the library minor version number is copied here + * @param[out] patch if non-NULL, the library patch version number is copied here + * @retval "version string" The library version as a string + */ +char *mdb_version(int *major, int *minor, int *patch); + + /** @brief Return a string describing a given error code. + * + * This function is a superset of the ANSI C X3.159-1989 (ANSI C) strerror(3) + * function. If the error code is greater than or equal to 0, then the string + * returned by the system function strerror(3) is returned. If the error code + * is less than 0, an error string corresponding to the LMDB library error is + * returned. See @ref errors for a list of LMDB-specific error codes. + * @param[in] err The error code + * @retval "error message" The description of the error + */ +char *mdb_strerror(int err); + + /** @brief Create an LMDB environment handle. + * + * This function allocates memory for a #MDB_env structure. To release + * the allocated memory and discard the handle, call #mdb_env_close(). + * Before the handle may be used, it must be opened using #mdb_env_open(). + * Various other options may also need to be set before opening the handle, + * e.g. #mdb_env_set_mapsize(), #mdb_env_set_maxreaders(), #mdb_env_set_maxdbs(), + * depending on usage requirements. + * @param[out] env The address where the new handle will be stored + * @return A non-zero error value on failure and 0 on success. + */ +int mdb_env_create(MDB_env **env); + + /** @brief Open an environment handle. + * + * If this function fails, #mdb_env_close() must be called to discard the #MDB_env handle. + * @param[in] env An environment handle returned by #mdb_env_create() + * @param[in] path The directory in which the database files reside. This + * directory must already exist and be writable. + * @param[in] flags Special options for this environment. This parameter + * must be set to 0 or by bitwise OR'ing together one or more of the + * values described here. + * Flags set by mdb_env_set_flags() are also used. + *
    + *
  • #MDB_FIXEDMAP + * use a fixed address for the mmap region. This flag must be specified + * when creating the environment, and is stored persistently in the environment. + * If successful, the memory map will always reside at the same virtual address + * and pointers used to reference data items in the database will be constant + * across multiple invocations. This option may not always work, depending on + * how the operating system has allocated memory to shared libraries and other uses. + * The feature is highly experimental. + *
  • #MDB_NOSUBDIR + * By default, LMDB creates its environment in a directory whose + * pathname is given in \b path, and creates its data and lock files + * under that directory. With this option, \b path is used as-is for + * the database main data file. The database lock file is the \b path + * with "-lock" appended. + *
  • #MDB_RDONLY + * Open the environment in read-only mode. No write operations will be + * allowed. LMDB will still modify the lock file - except on read-only + * filesystems, where LMDB does not use locks. + *
  • #MDB_WRITEMAP + * Use a writeable memory map unless MDB_RDONLY is set. This uses + * fewer mallocs but loses protection from application bugs + * like wild pointer writes and other bad updates into the database. + * This may be slightly faster for DBs that fit entirely in RAM, but + * is slower for DBs larger than RAM. + * Incompatible with nested transactions. + * Do not mix processes with and without MDB_WRITEMAP on the same + * environment. This can defeat durability (#mdb_env_sync etc). + *
  • #MDB_NOMETASYNC + * Flush system buffers to disk only once per transaction, omit the + * metadata flush. Defer that until the system flushes files to disk, + * or next non-MDB_RDONLY commit or #mdb_env_sync(). This optimization + * maintains database integrity, but a system crash may undo the last + * committed transaction. I.e. it preserves the ACI (atomicity, + * consistency, isolation) but not D (durability) database property. + * This flag may be changed at any time using #mdb_env_set_flags(). + *
  • #MDB_NOSYNC + * Don't flush system buffers to disk when committing a transaction. + * This optimization means a system crash can corrupt the database or + * lose the last transactions if buffers are not yet flushed to disk. + * The risk is governed by how often the system flushes dirty buffers + * to disk and how often #mdb_env_sync() is called. However, if the + * filesystem preserves write order and the #MDB_WRITEMAP flag is not + * used, transactions exhibit ACI (atomicity, consistency, isolation) + * properties and only lose D (durability). I.e. database integrity + * is maintained, but a system crash may undo the final transactions. + * Note that (#MDB_NOSYNC | #MDB_WRITEMAP) leaves the system with no + * hint for when to write transactions to disk, unless #mdb_env_sync() + * is called. (#MDB_MAPASYNC | #MDB_WRITEMAP) may be preferable. + * This flag may be changed at any time using #mdb_env_set_flags(). + *
  • #MDB_MAPASYNC + * When using #MDB_WRITEMAP, use asynchronous flushes to disk. + * As with #MDB_NOSYNC, a system crash can then corrupt the + * database or lose the last transactions. Calling #mdb_env_sync() + * ensures on-disk database integrity until next commit. + * This flag may be changed at any time using #mdb_env_set_flags(). + *
  • #MDB_NOTLS + * Don't use Thread-Local Storage. Tie reader locktable slots to + * #MDB_txn objects instead of to threads. I.e. #mdb_txn_reset() keeps + * the slot reserved for the #MDB_txn object. A thread may use parallel + * read-only transactions. A read-only transaction may span threads if + * the user synchronizes its use. Applications that multiplex many + * user threads over individual OS threads need this option. Such an + * application must also serialize the write transactions in an OS + * thread, since LMDB's write locking is unaware of the user threads. + *
  • #MDB_NOLOCK + * Don't do any locking. If concurrent access is anticipated, the + * caller must manage all concurrency itself. For proper operation + * the caller must enforce single-writer semantics, and must ensure + * that no readers are using old transactions while a writer is + * active. The simplest approach is to use an exclusive lock so that + * no readers may be active at all when a writer begins. + *
  • #MDB_NORDAHEAD + * Turn off readahead. Most operating systems perform readahead on + * read requests by default. This option turns it off if the OS + * supports it. Turning it off may help random read performance + * when the DB is larger than RAM and system RAM is full. + * The option is not implemented on Windows. + *
  • #MDB_NOMEMINIT + * Don't initialize malloc'd memory before writing to unused spaces + * in the data file. By default, memory for pages written to the data + * file is obtained using malloc. While these pages may be reused in + * subsequent transactions, freshly malloc'd pages will be initialized + * to zeroes before use. This avoids persisting leftover data from other + * code (that used the heap and subsequently freed the memory) into the + * data file. Note that many other system libraries may allocate + * and free memory from the heap for arbitrary uses. E.g., stdio may + * use the heap for file I/O buffers. This initialization step has a + * modest performance cost so some applications may want to disable + * it using this flag. This option can be a problem for applications + * which handle sensitive data like passwords, and it makes memory + * checkers like Valgrind noisy. This flag is not needed with #MDB_WRITEMAP, + * which writes directly to the mmap instead of using malloc for pages. The + * initialization is also skipped if #MDB_RESERVE is used; the + * caller is expected to overwrite all of the memory that was + * reserved in that case. + * This flag may be changed at any time using #mdb_env_set_flags(). + *
+ * @param[in] mode The UNIX permissions to set on created files and semaphores. + * This parameter is ignored on Windows. + * @return A non-zero error value on failure and 0 on success. Some possible + * errors are: + *
    + *
  • #MDB_VERSION_MISMATCH - the version of the LMDB library doesn't match the + * version that created the database environment. + *
  • #MDB_INVALID - the environment file headers are corrupted. + *
  • ENOENT - the directory specified by the path parameter doesn't exist. + *
  • EACCES - the user didn't have permission to access the environment files. + *
  • EAGAIN - the environment was locked by another process. + *
+ */ +int mdb_env_open(MDB_env *env, const char *path, unsigned int flags, mdb_mode_t mode); + + /** @brief Copy an LMDB environment to the specified path. + * + * This function may be used to make a backup of an existing environment. + * No lockfile is created, since it gets recreated at need. + * @note This call can trigger significant file size growth if run in + * parallel with write transactions, because it employs a read-only + * transaction. See long-lived transactions under @ref caveats_sec. + * @param[in] env An environment handle returned by #mdb_env_create(). It + * must have already been opened successfully. + * @param[in] path The directory in which the copy will reside. This + * directory must already exist and be writable but must otherwise be + * empty. + * @return A non-zero error value on failure and 0 on success. + */ +int mdb_env_copy(MDB_env *env, const char *path); + + /** @brief Copy an LMDB environment to the specified file descriptor. + * + * This function may be used to make a backup of an existing environment. + * No lockfile is created, since it gets recreated at need. + * @note This call can trigger significant file size growth if run in + * parallel with write transactions, because it employs a read-only + * transaction. See long-lived transactions under @ref caveats_sec. + * @param[in] env An environment handle returned by #mdb_env_create(). It + * must have already been opened successfully. + * @param[in] fd The filedescriptor to write the copy to. It must + * have already been opened for Write access. + * @return A non-zero error value on failure and 0 on success. + */ +int mdb_env_copyfd(MDB_env *env, mdb_filehandle_t fd); + + /** @brief Copy an LMDB environment to the specified path, with options. + * + * This function may be used to make a backup of an existing environment. + * No lockfile is created, since it gets recreated at need. + * @note This call can trigger significant file size growth if run in + * parallel with write transactions, because it employs a read-only + * transaction. See long-lived transactions under @ref caveats_sec. + * @param[in] env An environment handle returned by #mdb_env_create(). It + * must have already been opened successfully. + * @param[in] path The directory in which the copy will reside. This + * directory must already exist and be writable but must otherwise be + * empty. + * @param[in] flags Special options for this operation. This parameter + * must be set to 0 or by bitwise OR'ing together one or more of the + * values described here. + *
    + *
  • #MDB_CP_COMPACT - Perform compaction while copying: omit free + * pages and sequentially renumber all pages in output. This option + * consumes more CPU and runs more slowly than the default. + * Currently it fails if the environment has suffered a page leak. + *
+ * @return A non-zero error value on failure and 0 on success. + */ +int mdb_env_copy2(MDB_env *env, const char *path, unsigned int flags); + + /** @brief Copy an LMDB environment to the specified file descriptor, + * with options. + * + * This function may be used to make a backup of an existing environment. + * No lockfile is created, since it gets recreated at need. See + * #mdb_env_copy2() for further details. + * @note This call can trigger significant file size growth if run in + * parallel with write transactions, because it employs a read-only + * transaction. See long-lived transactions under @ref caveats_sec. + * @param[in] env An environment handle returned by #mdb_env_create(). It + * must have already been opened successfully. + * @param[in] fd The filedescriptor to write the copy to. It must + * have already been opened for Write access. + * @param[in] flags Special options for this operation. + * See #mdb_env_copy2() for options. + * @return A non-zero error value on failure and 0 on success. + */ +int mdb_env_copyfd2(MDB_env *env, mdb_filehandle_t fd, unsigned int flags); + + /** @brief Return statistics about the LMDB environment. + * + * @param[in] env An environment handle returned by #mdb_env_create() + * @param[out] stat The address of an #MDB_stat structure + * where the statistics will be copied + */ +int mdb_env_stat(MDB_env *env, MDB_stat *stat); + + /** @brief Return information about the LMDB environment. + * + * @param[in] env An environment handle returned by #mdb_env_create() + * @param[out] stat The address of an #MDB_envinfo structure + * where the information will be copied + */ +int mdb_env_info(MDB_env *env, MDB_envinfo *stat); + + /** @brief Flush the data buffers to disk. + * + * Data is always written to disk when #mdb_txn_commit() is called, + * but the operating system may keep it buffered. LMDB always flushes + * the OS buffers upon commit as well, unless the environment was + * opened with #MDB_NOSYNC or in part #MDB_NOMETASYNC. This call is + * not valid if the environment was opened with #MDB_RDONLY. + * @param[in] env An environment handle returned by #mdb_env_create() + * @param[in] force If non-zero, force a synchronous flush. Otherwise + * if the environment has the #MDB_NOSYNC flag set the flushes + * will be omitted, and with #MDB_MAPASYNC they will be asynchronous. + * @return A non-zero error value on failure and 0 on success. Some possible + * errors are: + *
    + *
  • EACCES - the environment is read-only. + *
  • EINVAL - an invalid parameter was specified. + *
  • EIO - an error occurred during synchronization. + *
+ */ +int mdb_env_sync(MDB_env *env, int force); + + /** @brief Close the environment and release the memory map. + * + * Only a single thread may call this function. All transactions, databases, + * and cursors must already be closed before calling this function. Attempts to + * use any such handles after calling this function will cause a SIGSEGV. + * The environment handle will be freed and must not be used again after this call. + * @param[in] env An environment handle returned by #mdb_env_create() + */ +void mdb_env_close(MDB_env *env); + + /** @brief Set environment flags. + * + * This may be used to set some flags in addition to those from + * #mdb_env_open(), or to unset these flags. If several threads + * change the flags at the same time, the result is undefined. + * @param[in] env An environment handle returned by #mdb_env_create() + * @param[in] flags The flags to change, bitwise OR'ed together + * @param[in] onoff A non-zero value sets the flags, zero clears them. + * @return A non-zero error value on failure and 0 on success. Some possible + * errors are: + *
    + *
  • EINVAL - an invalid parameter was specified. + *
+ */ +int mdb_env_set_flags(MDB_env *env, unsigned int flags, int onoff); + + /** @brief Get environment flags. + * + * @param[in] env An environment handle returned by #mdb_env_create() + * @param[out] flags The address of an integer to store the flags + * @return A non-zero error value on failure and 0 on success. Some possible + * errors are: + *
    + *
  • EINVAL - an invalid parameter was specified. + *
+ */ +int mdb_env_get_flags(MDB_env *env, unsigned int *flags); + + /** @brief Return the path that was used in #mdb_env_open(). + * + * @param[in] env An environment handle returned by #mdb_env_create() + * @param[out] path Address of a string pointer to contain the path. This + * is the actual string in the environment, not a copy. It should not be + * altered in any way. + * @return A non-zero error value on failure and 0 on success. Some possible + * errors are: + *
    + *
  • EINVAL - an invalid parameter was specified. + *
+ */ +int mdb_env_get_path(MDB_env *env, const char **path); + + /** @brief Return the filedescriptor for the given environment. + * + * This function may be called after fork(), so the descriptor can be + * closed before exec*(). Other LMDB file descriptors have FD_CLOEXEC. + * (Until LMDB 0.9.18, only the lockfile had that.) + * + * @param[in] env An environment handle returned by #mdb_env_create() + * @param[out] fd Address of a mdb_filehandle_t to contain the descriptor. + * @return A non-zero error value on failure and 0 on success. Some possible + * errors are: + *
    + *
  • EINVAL - an invalid parameter was specified. + *
+ */ +int mdb_env_get_fd(MDB_env *env, mdb_filehandle_t *fd); + + /** @brief Set the size of the memory map to use for this environment. + * + * The size should be a multiple of the OS page size. The default is + * 10485760 bytes. The size of the memory map is also the maximum size + * of the database. The value should be chosen as large as possible, + * to accommodate future growth of the database. + * This function should be called after #mdb_env_create() and before #mdb_env_open(). + * It may be called at later times if no transactions are active in + * this process. Note that the library does not check for this condition, + * the caller must ensure it explicitly. + * + * The new size takes effect immediately for the current process but + * will not be persisted to any others until a write transaction has been + * committed by the current process. Also, only mapsize increases are + * persisted into the environment. + * + * If the mapsize is increased by another process, and data has grown + * beyond the range of the current mapsize, #mdb_txn_begin() will + * return #MDB_MAP_RESIZED. This function may be called with a size + * of zero to adopt the new size. + * + * Any attempt to set a size smaller than the space already consumed + * by the environment will be silently changed to the current size of the used space. + * @param[in] env An environment handle returned by #mdb_env_create() + * @param[in] size The size in bytes + * @return A non-zero error value on failure and 0 on success. Some possible + * errors are: + *
    + *
  • EINVAL - an invalid parameter was specified, or the environment has + * an active write transaction. + *
+ */ +int mdb_env_set_mapsize(MDB_env *env, size_t size); + + /** @brief Set the maximum number of threads/reader slots for the environment. + * + * This defines the number of slots in the lock table that is used to track readers in the + * the environment. The default is 126. + * Starting a read-only transaction normally ties a lock table slot to the + * current thread until the environment closes or the thread exits. If + * MDB_NOTLS is in use, #mdb_txn_begin() instead ties the slot to the + * MDB_txn object until it or the #MDB_env object is destroyed. + * This function may only be called after #mdb_env_create() and before #mdb_env_open(). + * @param[in] env An environment handle returned by #mdb_env_create() + * @param[in] readers The maximum number of reader lock table slots + * @return A non-zero error value on failure and 0 on success. Some possible + * errors are: + *
    + *
  • EINVAL - an invalid parameter was specified, or the environment is already open. + *
+ */ +int mdb_env_set_maxreaders(MDB_env *env, unsigned int readers); + + /** @brief Get the maximum number of threads/reader slots for the environment. + * + * @param[in] env An environment handle returned by #mdb_env_create() + * @param[out] readers Address of an integer to store the number of readers + * @return A non-zero error value on failure and 0 on success. Some possible + * errors are: + *
    + *
  • EINVAL - an invalid parameter was specified. + *
+ */ +int mdb_env_get_maxreaders(MDB_env *env, unsigned int *readers); + + /** @brief Set the maximum number of named databases for the environment. + * + * This function is only needed if multiple databases will be used in the + * environment. Simpler applications that use the environment as a single + * unnamed database can ignore this option. + * This function may only be called after #mdb_env_create() and before #mdb_env_open(). + * + * Currently a moderate number of slots are cheap but a huge number gets + * expensive: 7-120 words per transaction, and every #mdb_dbi_open() + * does a linear search of the opened slots. + * @param[in] env An environment handle returned by #mdb_env_create() + * @param[in] dbs The maximum number of databases + * @return A non-zero error value on failure and 0 on success. Some possible + * errors are: + *
    + *
  • EINVAL - an invalid parameter was specified, or the environment is already open. + *
+ */ +int mdb_env_set_maxdbs(MDB_env *env, MDB_dbi dbs); + + /** @brief Get the maximum size of keys and #MDB_DUPSORT data we can write. + * + * Depends on the compile-time constant #MDB_MAXKEYSIZE. Default 511. + * See @ref MDB_val. + * @param[in] env An environment handle returned by #mdb_env_create() + * @return The maximum size of a key we can write + */ +int mdb_env_get_maxkeysize(MDB_env *env); + + /** @brief Set application information associated with the #MDB_env. + * + * @param[in] env An environment handle returned by #mdb_env_create() + * @param[in] ctx An arbitrary pointer for whatever the application needs. + * @return A non-zero error value on failure and 0 on success. + */ +int mdb_env_set_userctx(MDB_env *env, void *ctx); + + /** @brief Get the application information associated with the #MDB_env. + * + * @param[in] env An environment handle returned by #mdb_env_create() + * @return The pointer set by #mdb_env_set_userctx(). + */ +void *mdb_env_get_userctx(MDB_env *env); + + /** @brief A callback function for most LMDB assert() failures, + * called before printing the message and aborting. + * + * @param[in] env An environment handle returned by #mdb_env_create(). + * @param[in] msg The assertion message, not including newline. + */ +typedef void MDB_assert_func(MDB_env *env, const char *msg); + + /** Set or reset the assert() callback of the environment. + * Disabled if liblmdb is built with NDEBUG. + * @note This hack should become obsolete as lmdb's error handling matures. + * @param[in] env An environment handle returned by #mdb_env_create(). + * @param[in] func An #MDB_assert_func function, or 0. + * @return A non-zero error value on failure and 0 on success. + */ +int mdb_env_set_assert(MDB_env *env, MDB_assert_func *func); + + /** @brief Create a transaction for use with the environment. + * + * The transaction handle may be discarded using #mdb_txn_abort() or #mdb_txn_commit(). + * @note A transaction and its cursors must only be used by a single + * thread, and a thread may only have a single transaction at a time. + * If #MDB_NOTLS is in use, this does not apply to read-only transactions. + * @note Cursors may not span transactions. + * @param[in] env An environment handle returned by #mdb_env_create() + * @param[in] parent If this parameter is non-NULL, the new transaction + * will be a nested transaction, with the transaction indicated by \b parent + * as its parent. Transactions may be nested to any level. A parent + * transaction and its cursors may not issue any other operations than + * mdb_txn_commit and mdb_txn_abort while it has active child transactions. + * @param[in] flags Special options for this transaction. This parameter + * must be set to 0 or by bitwise OR'ing together one or more of the + * values described here. + *
    + *
  • #MDB_RDONLY + * This transaction will not perform any write operations. + *
+ * @param[out] txn Address where the new #MDB_txn handle will be stored + * @return A non-zero error value on failure and 0 on success. Some possible + * errors are: + *
    + *
  • #MDB_PANIC - a fatal error occurred earlier and the environment + * must be shut down. + *
  • #MDB_MAP_RESIZED - another process wrote data beyond this MDB_env's + * mapsize and this environment's map must be resized as well. + * See #mdb_env_set_mapsize(). + *
  • #MDB_READERS_FULL - a read-only transaction was requested and + * the reader lock table is full. See #mdb_env_set_maxreaders(). + *
  • ENOMEM - out of memory. + *
+ */ +int mdb_txn_begin(MDB_env *env, MDB_txn *parent, unsigned int flags, MDB_txn **txn); + + /** @brief Returns the transaction's #MDB_env + * + * @param[in] txn A transaction handle returned by #mdb_txn_begin() + */ +MDB_env *mdb_txn_env(MDB_txn *txn); + + /** @brief Return the transaction's ID. + * + * This returns the identifier associated with this transaction. For a + * read-only transaction, this corresponds to the snapshot being read; + * concurrent readers will frequently have the same transaction ID. + * + * @param[in] txn A transaction handle returned by #mdb_txn_begin() + * @return A transaction ID, valid if input is an active transaction. + */ +size_t mdb_txn_id(MDB_txn *txn); + + /** @brief Commit all the operations of a transaction into the database. + * + * The transaction handle is freed. It and its cursors must not be used + * again after this call, except with #mdb_cursor_renew(). + * @note Earlier documentation incorrectly said all cursors would be freed. + * Only write-transactions free cursors. + * @param[in] txn A transaction handle returned by #mdb_txn_begin() + * @return A non-zero error value on failure and 0 on success. Some possible + * errors are: + *
    + *
  • EINVAL - an invalid parameter was specified. + *
  • ENOSPC - no more disk space. + *
  • EIO - a low-level I/O error occurred while writing. + *
  • ENOMEM - out of memory. + *
+ */ +int mdb_txn_commit(MDB_txn *txn); + + /** @brief Abandon all the operations of the transaction instead of saving them. + * + * The transaction handle is freed. It and its cursors must not be used + * again after this call, except with #mdb_cursor_renew(). + * @note Earlier documentation incorrectly said all cursors would be freed. + * Only write-transactions free cursors. + * @param[in] txn A transaction handle returned by #mdb_txn_begin() + */ +void mdb_txn_abort(MDB_txn *txn); + + /** @brief Reset a read-only transaction. + * + * Abort the transaction like #mdb_txn_abort(), but keep the transaction + * handle. #mdb_txn_renew() may reuse the handle. This saves allocation + * overhead if the process will start a new read-only transaction soon, + * and also locking overhead if #MDB_NOTLS is in use. The reader table + * lock is released, but the table slot stays tied to its thread or + * #MDB_txn. Use mdb_txn_abort() to discard a reset handle, and to free + * its lock table slot if MDB_NOTLS is in use. + * Cursors opened within the transaction must not be used + * again after this call, except with #mdb_cursor_renew(). + * Reader locks generally don't interfere with writers, but they keep old + * versions of database pages allocated. Thus they prevent the old pages + * from being reused when writers commit new data, and so under heavy load + * the database size may grow much more rapidly than otherwise. + * @param[in] txn A transaction handle returned by #mdb_txn_begin() + */ +void mdb_txn_reset(MDB_txn *txn); + + /** @brief Renew a read-only transaction. + * + * This acquires a new reader lock for a transaction handle that had been + * released by #mdb_txn_reset(). It must be called before a reset transaction + * may be used again. + * @param[in] txn A transaction handle returned by #mdb_txn_begin() + * @return A non-zero error value on failure and 0 on success. Some possible + * errors are: + *
    + *
  • #MDB_PANIC - a fatal error occurred earlier and the environment + * must be shut down. + *
  • EINVAL - an invalid parameter was specified. + *
+ */ +int mdb_txn_renew(MDB_txn *txn); + +/** Compat with version <= 0.9.4, avoid clash with libmdb from MDB Tools project */ +#define mdb_open(txn,name,flags,dbi) mdb_dbi_open(txn,name,flags,dbi) +/** Compat with version <= 0.9.4, avoid clash with libmdb from MDB Tools project */ +#define mdb_close(env,dbi) mdb_dbi_close(env,dbi) + + /** @brief Open a database in the environment. + * + * A database handle denotes the name and parameters of a database, + * independently of whether such a database exists. + * The database handle may be discarded by calling #mdb_dbi_close(). + * The old database handle is returned if the database was already open. + * The handle may only be closed once. + * + * The database handle will be private to the current transaction until + * the transaction is successfully committed. If the transaction is + * aborted the handle will be closed automatically. + * After a successful commit the handle will reside in the shared + * environment, and may be used by other transactions. + * + * This function must not be called from multiple concurrent + * transactions in the same process. A transaction that uses + * this function must finish (either commit or abort) before + * any other transaction in the process may use this function. + * + * To use named databases (with name != NULL), #mdb_env_set_maxdbs() + * must be called before opening the environment. Database names are + * keys in the unnamed database, and may be read but not written. + * + * @param[in] txn A transaction handle returned by #mdb_txn_begin() + * @param[in] name The name of the database to open. If only a single + * database is needed in the environment, this value may be NULL. + * @param[in] flags Special options for this database. This parameter + * must be set to 0 or by bitwise OR'ing together one or more of the + * values described here. + *
    + *
  • #MDB_REVERSEKEY + * Keys are strings to be compared in reverse order, from the end + * of the strings to the beginning. By default, Keys are treated as strings and + * compared from beginning to end. + *
  • #MDB_DUPSORT + * Duplicate keys may be used in the database. (Or, from another perspective, + * keys may have multiple data items, stored in sorted order.) By default + * keys must be unique and may have only a single data item. + *
  • #MDB_INTEGERKEY + * Keys are binary integers in native byte order, either unsigned int + * or size_t, and will be sorted as such. + * The keys must all be of the same size. + *
  • #MDB_DUPFIXED + * This flag may only be used in combination with #MDB_DUPSORT. This option + * tells the library that the data items for this database are all the same + * size, which allows further optimizations in storage and retrieval. When + * all data items are the same size, the #MDB_GET_MULTIPLE, #MDB_NEXT_MULTIPLE + * and #MDB_PREV_MULTIPLE cursor operations may be used to retrieve multiple + * items at once. + *
  • #MDB_INTEGERDUP + * This option specifies that duplicate data items are binary integers, + * similar to #MDB_INTEGERKEY keys. + *
  • #MDB_REVERSEDUP + * This option specifies that duplicate data items should be compared as + * strings in reverse order. + *
  • #MDB_CREATE + * Create the named database if it doesn't exist. This option is not + * allowed in a read-only transaction or a read-only environment. + *
+ * @param[out] dbi Address where the new #MDB_dbi handle will be stored + * @return A non-zero error value on failure and 0 on success. Some possible + * errors are: + *
    + *
  • #MDB_NOTFOUND - the specified database doesn't exist in the environment + * and #MDB_CREATE was not specified. + *
  • #MDB_DBS_FULL - too many databases have been opened. See #mdb_env_set_maxdbs(). + *
+ */ +int mdb_dbi_open(MDB_txn *txn, const char *name, unsigned int flags, MDB_dbi *dbi); + + /** @brief Retrieve statistics for a database. + * + * @param[in] txn A transaction handle returned by #mdb_txn_begin() + * @param[in] dbi A database handle returned by #mdb_dbi_open() + * @param[out] stat The address of an #MDB_stat structure + * where the statistics will be copied + * @return A non-zero error value on failure and 0 on success. Some possible + * errors are: + *
    + *
  • EINVAL - an invalid parameter was specified. + *
+ */ +int mdb_stat(MDB_txn *txn, MDB_dbi dbi, MDB_stat *stat); + + /** @brief Retrieve the DB flags for a database handle. + * + * @param[in] txn A transaction handle returned by #mdb_txn_begin() + * @param[in] dbi A database handle returned by #mdb_dbi_open() + * @param[out] flags Address where the flags will be returned. + * @return A non-zero error value on failure and 0 on success. + */ +int mdb_dbi_flags(MDB_txn *txn, MDB_dbi dbi, unsigned int *flags); + + /** @brief Close a database handle. Normally unnecessary. Use with care: + * + * This call is not mutex protected. Handles should only be closed by + * a single thread, and only if no other threads are going to reference + * the database handle or one of its cursors any further. Do not close + * a handle if an existing transaction has modified its database. + * Doing so can cause misbehavior from database corruption to errors + * like MDB_BAD_VALSIZE (since the DB name is gone). + * + * Closing a database handle is not necessary, but lets #mdb_dbi_open() + * reuse the handle value. Usually it's better to set a bigger + * #mdb_env_set_maxdbs(), unless that value would be large. + * + * @param[in] env An environment handle returned by #mdb_env_create() + * @param[in] dbi A database handle returned by #mdb_dbi_open() + */ +void mdb_dbi_close(MDB_env *env, MDB_dbi dbi); + + /** @brief Empty or delete+close a database. + * + * See #mdb_dbi_close() for restrictions about closing the DB handle. + * @param[in] txn A transaction handle returned by #mdb_txn_begin() + * @param[in] dbi A database handle returned by #mdb_dbi_open() + * @param[in] del 0 to empty the DB, 1 to delete it from the + * environment and close the DB handle. + * @return A non-zero error value on failure and 0 on success. + */ +int mdb_drop(MDB_txn *txn, MDB_dbi dbi, int del); + + /** @brief Set a custom key comparison function for a database. + * + * The comparison function is called whenever it is necessary to compare a + * key specified by the application with a key currently stored in the database. + * If no comparison function is specified, and no special key flags were specified + * with #mdb_dbi_open(), the keys are compared lexically, with shorter keys collating + * before longer keys. + * @warning This function must be called before any data access functions are used, + * otherwise data corruption may occur. The same comparison function must be used by every + * program accessing the database, every time the database is used. + * @param[in] txn A transaction handle returned by #mdb_txn_begin() + * @param[in] dbi A database handle returned by #mdb_dbi_open() + * @param[in] cmp A #MDB_cmp_func function + * @return A non-zero error value on failure and 0 on success. Some possible + * errors are: + *
    + *
  • EINVAL - an invalid parameter was specified. + *
+ */ +int mdb_set_compare(MDB_txn *txn, MDB_dbi dbi, MDB_cmp_func *cmp); + + /** @brief Set a custom data comparison function for a #MDB_DUPSORT database. + * + * This comparison function is called whenever it is necessary to compare a data + * item specified by the application with a data item currently stored in the database. + * This function only takes effect if the database was opened with the #MDB_DUPSORT + * flag. + * If no comparison function is specified, and no special key flags were specified + * with #mdb_dbi_open(), the data items are compared lexically, with shorter items collating + * before longer items. + * @warning This function must be called before any data access functions are used, + * otherwise data corruption may occur. The same comparison function must be used by every + * program accessing the database, every time the database is used. + * @param[in] txn A transaction handle returned by #mdb_txn_begin() + * @param[in] dbi A database handle returned by #mdb_dbi_open() + * @param[in] cmp A #MDB_cmp_func function + * @return A non-zero error value on failure and 0 on success. Some possible + * errors are: + *
    + *
  • EINVAL - an invalid parameter was specified. + *
+ */ +int mdb_set_dupsort(MDB_txn *txn, MDB_dbi dbi, MDB_cmp_func *cmp); + + /** @brief Set a relocation function for a #MDB_FIXEDMAP database. + * + * @todo The relocation function is called whenever it is necessary to move the data + * of an item to a different position in the database (e.g. through tree + * balancing operations, shifts as a result of adds or deletes, etc.). It is + * intended to allow address/position-dependent data items to be stored in + * a database in an environment opened with the #MDB_FIXEDMAP option. + * Currently the relocation feature is unimplemented and setting + * this function has no effect. + * @param[in] txn A transaction handle returned by #mdb_txn_begin() + * @param[in] dbi A database handle returned by #mdb_dbi_open() + * @param[in] rel A #MDB_rel_func function + * @return A non-zero error value on failure and 0 on success. Some possible + * errors are: + *
    + *
  • EINVAL - an invalid parameter was specified. + *
+ */ +int mdb_set_relfunc(MDB_txn *txn, MDB_dbi dbi, MDB_rel_func *rel); + + /** @brief Set a context pointer for a #MDB_FIXEDMAP database's relocation function. + * + * See #mdb_set_relfunc and #MDB_rel_func for more details. + * @param[in] txn A transaction handle returned by #mdb_txn_begin() + * @param[in] dbi A database handle returned by #mdb_dbi_open() + * @param[in] ctx An arbitrary pointer for whatever the application needs. + * It will be passed to the callback function set by #mdb_set_relfunc + * as its \b relctx parameter whenever the callback is invoked. + * @return A non-zero error value on failure and 0 on success. Some possible + * errors are: + *
    + *
  • EINVAL - an invalid parameter was specified. + *
+ */ +int mdb_set_relctx(MDB_txn *txn, MDB_dbi dbi, void *ctx); + + /** @brief Get items from a database. + * + * This function retrieves key/data pairs from the database. The address + * and length of the data associated with the specified \b key are returned + * in the structure to which \b data refers. + * If the database supports duplicate keys (#MDB_DUPSORT) then the + * first data item for the key will be returned. Retrieval of other + * items requires the use of #mdb_cursor_get(). + * + * @note The memory pointed to by the returned values is owned by the + * database. The caller need not dispose of the memory, and may not + * modify it in any way. For values returned in a read-only transaction + * any modification attempts will cause a SIGSEGV. + * @note Values returned from the database are valid only until a + * subsequent update operation, or the end of the transaction. + * @param[in] txn A transaction handle returned by #mdb_txn_begin() + * @param[in] dbi A database handle returned by #mdb_dbi_open() + * @param[in] key The key to search for in the database + * @param[out] data The data corresponding to the key + * @return A non-zero error value on failure and 0 on success. Some possible + * errors are: + *
    + *
  • #MDB_NOTFOUND - the key was not in the database. + *
  • EINVAL - an invalid parameter was specified. + *
+ */ +int mdb_get(MDB_txn *txn, MDB_dbi dbi, MDB_val *key, MDB_val *data); + + /** @brief Store items into a database. + * + * This function stores key/data pairs in the database. The default behavior + * is to enter the new key/data pair, replacing any previously existing key + * if duplicates are disallowed, or adding a duplicate data item if + * duplicates are allowed (#MDB_DUPSORT). + * @param[in] txn A transaction handle returned by #mdb_txn_begin() + * @param[in] dbi A database handle returned by #mdb_dbi_open() + * @param[in] key The key to store in the database + * @param[in,out] data The data to store + * @param[in] flags Special options for this operation. This parameter + * must be set to 0 or by bitwise OR'ing together one or more of the + * values described here. + *
    + *
  • #MDB_NODUPDATA - enter the new key/data pair only if it does not + * already appear in the database. This flag may only be specified + * if the database was opened with #MDB_DUPSORT. The function will + * return #MDB_KEYEXIST if the key/data pair already appears in the + * database. + *
  • #MDB_NOOVERWRITE - enter the new key/data pair only if the key + * does not already appear in the database. The function will return + * #MDB_KEYEXIST if the key already appears in the database, even if + * the database supports duplicates (#MDB_DUPSORT). The \b data + * parameter will be set to point to the existing item. + *
  • #MDB_RESERVE - reserve space for data of the given size, but + * don't copy the given data. Instead, return a pointer to the + * reserved space, which the caller can fill in later - before + * the next update operation or the transaction ends. This saves + * an extra memcpy if the data is being generated later. + * LMDB does nothing else with this memory, the caller is expected + * to modify all of the space requested. This flag must not be + * specified if the database was opened with #MDB_DUPSORT. + *
  • #MDB_APPEND - append the given key/data pair to the end of the + * database. This option allows fast bulk loading when keys are + * already known to be in the correct order. Loading unsorted keys + * with this flag will cause a #MDB_KEYEXIST error. + *
  • #MDB_APPENDDUP - as above, but for sorted dup data. + *
+ * @return A non-zero error value on failure and 0 on success. Some possible + * errors are: + *
    + *
  • #MDB_MAP_FULL - the database is full, see #mdb_env_set_mapsize(). + *
  • #MDB_TXN_FULL - the transaction has too many dirty pages. + *
  • EACCES - an attempt was made to write in a read-only transaction. + *
  • EINVAL - an invalid parameter was specified. + *
+ */ +int mdb_put(MDB_txn *txn, MDB_dbi dbi, MDB_val *key, MDB_val *data, + unsigned int flags); + + /** @brief Delete items from a database. + * + * This function removes key/data pairs from the database. + * If the database does not support sorted duplicate data items + * (#MDB_DUPSORT) the data parameter is ignored. + * If the database supports sorted duplicates and the data parameter + * is NULL, all of the duplicate data items for the key will be + * deleted. Otherwise, if the data parameter is non-NULL + * only the matching data item will be deleted. + * This function will return #MDB_NOTFOUND if the specified key/data + * pair is not in the database. + * @param[in] txn A transaction handle returned by #mdb_txn_begin() + * @param[in] dbi A database handle returned by #mdb_dbi_open() + * @param[in] key The key to delete from the database + * @param[in] data The data to delete + * @return A non-zero error value on failure and 0 on success. Some possible + * errors are: + *
    + *
  • EACCES - an attempt was made to write in a read-only transaction. + *
  • EINVAL - an invalid parameter was specified. + *
+ */ +int mdb_del(MDB_txn *txn, MDB_dbi dbi, MDB_val *key, MDB_val *data); + + /** @brief Create a cursor handle. + * + * A cursor is associated with a specific transaction and database. + * A cursor cannot be used when its database handle is closed. Nor + * when its transaction has ended, except with #mdb_cursor_renew(). + * It can be discarded with #mdb_cursor_close(). + * A cursor in a write-transaction can be closed before its transaction + * ends, and will otherwise be closed when its transaction ends. + * A cursor in a read-only transaction must be closed explicitly, before + * or after its transaction ends. It can be reused with + * #mdb_cursor_renew() before finally closing it. + * @note Earlier documentation said that cursors in every transaction + * were closed when the transaction committed or aborted. + * @param[in] txn A transaction handle returned by #mdb_txn_begin() + * @param[in] dbi A database handle returned by #mdb_dbi_open() + * @param[out] cursor Address where the new #MDB_cursor handle will be stored + * @return A non-zero error value on failure and 0 on success. Some possible + * errors are: + *
    + *
  • EINVAL - an invalid parameter was specified. + *
+ */ +int mdb_cursor_open(MDB_txn *txn, MDB_dbi dbi, MDB_cursor **cursor); + + /** @brief Close a cursor handle. + * + * The cursor handle will be freed and must not be used again after this call. + * Its transaction must still be live if it is a write-transaction. + * @param[in] cursor A cursor handle returned by #mdb_cursor_open() + */ +void mdb_cursor_close(MDB_cursor *cursor); + + /** @brief Renew a cursor handle. + * + * A cursor is associated with a specific transaction and database. + * Cursors that are only used in read-only + * transactions may be re-used, to avoid unnecessary malloc/free overhead. + * The cursor may be associated with a new read-only transaction, and + * referencing the same database handle as it was created with. + * This may be done whether the previous transaction is live or dead. + * @param[in] txn A transaction handle returned by #mdb_txn_begin() + * @param[in] cursor A cursor handle returned by #mdb_cursor_open() + * @return A non-zero error value on failure and 0 on success. Some possible + * errors are: + *
    + *
  • EINVAL - an invalid parameter was specified. + *
+ */ +int mdb_cursor_renew(MDB_txn *txn, MDB_cursor *cursor); + + /** @brief Return the cursor's transaction handle. + * + * @param[in] cursor A cursor handle returned by #mdb_cursor_open() + */ +MDB_txn *mdb_cursor_txn(MDB_cursor *cursor); + + /** @brief Return the cursor's database handle. + * + * @param[in] cursor A cursor handle returned by #mdb_cursor_open() + */ +MDB_dbi mdb_cursor_dbi(MDB_cursor *cursor); + + /** @brief Retrieve by cursor. + * + * This function retrieves key/data pairs from the database. The address and length + * of the key are returned in the object to which \b key refers (except for the + * case of the #MDB_SET option, in which the \b key object is unchanged), and + * the address and length of the data are returned in the object to which \b data + * refers. + * See #mdb_get() for restrictions on using the output values. + * @param[in] cursor A cursor handle returned by #mdb_cursor_open() + * @param[in,out] key The key for a retrieved item + * @param[in,out] data The data of a retrieved item + * @param[in] op A cursor operation #MDB_cursor_op + * @return A non-zero error value on failure and 0 on success. Some possible + * errors are: + *
    + *
  • #MDB_NOTFOUND - no matching key found. + *
  • EINVAL - an invalid parameter was specified. + *
+ */ +int mdb_cursor_get(MDB_cursor *cursor, MDB_val *key, MDB_val *data, + MDB_cursor_op op); + + /** @brief Store by cursor. + * + * This function stores key/data pairs into the database. + * The cursor is positioned at the new item, or on failure usually near it. + * @note Earlier documentation incorrectly said errors would leave the + * state of the cursor unchanged. + * @param[in] cursor A cursor handle returned by #mdb_cursor_open() + * @param[in] key The key operated on. + * @param[in] data The data operated on. + * @param[in] flags Options for this operation. This parameter + * must be set to 0 or one of the values described here. + *
    + *
  • #MDB_CURRENT - replace the item at the current cursor position. + * The \b key parameter must still be provided, and must match it. + * If using sorted duplicates (#MDB_DUPSORT) the data item must still + * sort into the same place. This is intended to be used when the + * new data is the same size as the old. Otherwise it will simply + * perform a delete of the old record followed by an insert. + *
  • #MDB_NODUPDATA - enter the new key/data pair only if it does not + * already appear in the database. This flag may only be specified + * if the database was opened with #MDB_DUPSORT. The function will + * return #MDB_KEYEXIST if the key/data pair already appears in the + * database. + *
  • #MDB_NOOVERWRITE - enter the new key/data pair only if the key + * does not already appear in the database. The function will return + * #MDB_KEYEXIST if the key already appears in the database, even if + * the database supports duplicates (#MDB_DUPSORT). + *
  • #MDB_RESERVE - reserve space for data of the given size, but + * don't copy the given data. Instead, return a pointer to the + * reserved space, which the caller can fill in later - before + * the next update operation or the transaction ends. This saves + * an extra memcpy if the data is being generated later. This flag + * must not be specified if the database was opened with #MDB_DUPSORT. + *
  • #MDB_APPEND - append the given key/data pair to the end of the + * database. No key comparisons are performed. This option allows + * fast bulk loading when keys are already known to be in the + * correct order. Loading unsorted keys with this flag will cause + * a #MDB_KEYEXIST error. + *
  • #MDB_APPENDDUP - as above, but for sorted dup data. + *
  • #MDB_MULTIPLE - store multiple contiguous data elements in a + * single request. This flag may only be specified if the database + * was opened with #MDB_DUPFIXED. The \b data argument must be an + * array of two MDB_vals. The mv_size of the first MDB_val must be + * the size of a single data element. The mv_data of the first MDB_val + * must point to the beginning of the array of contiguous data elements. + * The mv_size of the second MDB_val must be the count of the number + * of data elements to store. On return this field will be set to + * the count of the number of elements actually written. The mv_data + * of the second MDB_val is unused. + *
+ * @return A non-zero error value on failure and 0 on success. Some possible + * errors are: + *
    + *
  • #MDB_MAP_FULL - the database is full, see #mdb_env_set_mapsize(). + *
  • #MDB_TXN_FULL - the transaction has too many dirty pages. + *
  • EACCES - an attempt was made to write in a read-only transaction. + *
  • EINVAL - an invalid parameter was specified. + *
+ */ +int mdb_cursor_put(MDB_cursor *cursor, MDB_val *key, MDB_val *data, + unsigned int flags); + + /** @brief Delete current key/data pair + * + * This function deletes the key/data pair to which the cursor refers. + * This does not invalidate the cursor, so operations such as MDB_NEXT + * can still be used on it. + * Both MDB_NEXT and MDB_GET_CURRENT will return the same record after + * this operation. + * @param[in] cursor A cursor handle returned by #mdb_cursor_open() + * @param[in] flags Options for this operation. This parameter + * must be set to 0 or one of the values described here. + *
    + *
  • #MDB_NODUPDATA - delete all of the data items for the current key. + * This flag may only be specified if the database was opened with #MDB_DUPSORT. + *
+ * @return A non-zero error value on failure and 0 on success. Some possible + * errors are: + *
    + *
  • EACCES - an attempt was made to write in a read-only transaction. + *
  • EINVAL - an invalid parameter was specified. + *
+ */ +int mdb_cursor_del(MDB_cursor *cursor, unsigned int flags); + + /** @brief Return count of duplicates for current key. + * + * This call is only valid on databases that support sorted duplicate + * data items #MDB_DUPSORT. + * @param[in] cursor A cursor handle returned by #mdb_cursor_open() + * @param[out] countp Address where the count will be stored + * @return A non-zero error value on failure and 0 on success. Some possible + * errors are: + *
    + *
  • EINVAL - cursor is not initialized, or an invalid parameter was specified. + *
+ */ +int mdb_cursor_count(MDB_cursor *cursor, size_t *countp); + + /** @brief Compare two data items according to a particular database. + * + * This returns a comparison as if the two data items were keys in the + * specified database. + * @param[in] txn A transaction handle returned by #mdb_txn_begin() + * @param[in] dbi A database handle returned by #mdb_dbi_open() + * @param[in] a The first item to compare + * @param[in] b The second item to compare + * @return < 0 if a < b, 0 if a == b, > 0 if a > b + */ +int mdb_cmp(MDB_txn *txn, MDB_dbi dbi, const MDB_val *a, const MDB_val *b); + + /** @brief Compare two data items according to a particular database. + * + * This returns a comparison as if the two items were data items of + * the specified database. The database must have the #MDB_DUPSORT flag. + * @param[in] txn A transaction handle returned by #mdb_txn_begin() + * @param[in] dbi A database handle returned by #mdb_dbi_open() + * @param[in] a The first item to compare + * @param[in] b The second item to compare + * @return < 0 if a < b, 0 if a == b, > 0 if a > b + */ +int mdb_dcmp(MDB_txn *txn, MDB_dbi dbi, const MDB_val *a, const MDB_val *b); + + /** @brief A callback function used to print a message from the library. + * + * @param[in] msg The string to be printed. + * @param[in] ctx An arbitrary context pointer for the callback. + * @return < 0 on failure, >= 0 on success. + */ +typedef int (MDB_msg_func)(const char *msg, void *ctx); + + /** @brief Dump the entries in the reader lock table. + * + * @param[in] env An environment handle returned by #mdb_env_create() + * @param[in] func A #MDB_msg_func function + * @param[in] ctx Anything the message function needs + * @return < 0 on failure, >= 0 on success. + */ +int mdb_reader_list(MDB_env *env, MDB_msg_func *func, void *ctx); + + /** @brief Check for stale entries in the reader lock table. + * + * @param[in] env An environment handle returned by #mdb_env_create() + * @param[out] dead Number of stale slots that were cleared + * @return 0 on success, non-zero on failure. + */ +int mdb_reader_check(MDB_env *env, int *dead); +/** @} */ + +#ifdef __cplusplus +} +#endif +/** @page tools LMDB Command Line Tools + The following describes the command line tools that are available for LMDB. + \li \ref mdb_copy_1 + \li \ref mdb_dump_1 + \li \ref mdb_load_1 + \li \ref mdb_stat_1 +*/ + +#endif /* _LMDB_H_ */ diff --git a/miniconda3/pkgs/lmdb-0.9.31-hb25bd0a_0/info/about.json b/miniconda3/pkgs/lmdb-0.9.31-hb25bd0a_0/info/about.json new file mode 100644 index 0000000000000000000000000000000000000000..ecd49002b0ddd66c740839e4ec6e12ecd0c53c0f --- /dev/null +++ b/miniconda3/pkgs/lmdb-0.9.31-hb25bd0a_0/info/about.json @@ -0,0 +1,131 @@ +{ + "channels": [ + "https://repo.anaconda.com/pkgs/main" + ], + "conda_build_version": "24.1.2", + "conda_version": "24.1.2", + "description": "Symas LMDB is an extraordinarily fast, memory-efficient database developed\nfor the Symas OpenLDAP Project. With memory-mapped files, it has the read\nperformance of a pure in-memory database while retaining the persistence of\nstandard disk-based databases.\n", + "dev_url": "https://github.com/LMDB/lmdb", + "doc_url": "https://www.symas.com/symas-embedded-database-lmdb", + "env_vars": { + "CIO_TEST": "" + }, + "extra": { + "copy_test_source_files": true, + "final": true, + "flow_run_id": "eadb492f-a812-4bad-af17-3fd0128527a8", + "recipe-maintainers": [ + "jakirkham" + ], + "remote_url": "git@github.com:AnacondaRecipes/lmdb-feedstock.git", + "sha": "031cedbb15092307709a97f06082ca574e65e770" + }, + "home": "https://www.symas.com/symas-embedded-database-lmdb", + "identifiers": [], + "keywords": [], + "license": "BSD-3-Clause", + "license_family": "BSD", + "license_file": "libraries/liblmdb/LICENSE", + "root_pkgs": [ + "_libgcc_mutex 0.1 main", + "_openmp_mutex 5.1 1_gnu", + "archspec 0.2.1 pyhd3eb1b0_0", + "boltons 23.0.0 py39h06a4308_0", + "brotli-python 1.0.9 py39h6a678d5_7", + "bzip2 1.0.8 h7b6447c_0", + "c-ares 1.19.1 h5eee18b_0", + "charset-normalizer 2.0.4 pyhd3eb1b0_0", + "conda-content-trust 0.2.0 py39h06a4308_0", + "conda-package-handling 2.2.0 py39h06a4308_0", + "conda-package-streaming 0.9.0 py39h06a4308_0", + "fmt 9.1.0 hdb19cb5_0", + "icu 73.1 h6a678d5_0", + "idna 3.4 py39h06a4308_0", + "jsonpatch 1.32 pyhd3eb1b0_0", + "jsonpointer 2.1 pyhd3eb1b0_0", + "krb5 1.20.1 h143b758_1", + "ld_impl_linux-64 2.38 h1181459_1", + "libarchive 3.6.2 h6ac8c49_2", + "libev 4.33 h7f8727e_1", + "libffi 3.4.4 h6a678d5_0", + "libgcc-ng 11.2.0 h1234567_1", + "libgomp 11.2.0 h1234567_1", + "libnghttp2 1.57.0 h2d74bed_0", + "libsolv 0.7.24 he621ea3_0", + "libssh2 1.10.0 hdbd6064_2", + "libstdcxx-ng 11.2.0 h1234567_1", + "libxml2 2.10.4 hf1b16e4_1", + "lz4-c 1.9.4 h6a678d5_0", + "ncurses 6.4 h6a678d5_0", + "packaging 23.1 py39h06a4308_0", + "pcre2 10.42 hebb0a14_0", + "pluggy 1.0.0 py39h06a4308_1", + "pybind11-abi 4 hd3eb1b0_1", + "pycosat 0.6.6 py39h5eee18b_0", + "pycparser 2.21 pyhd3eb1b0_0", + "pysocks 1.7.1 py39h06a4308_0", + "python 3.9.18 h955ad1f_0", + "readline 8.2 h5eee18b_0", + "reproc 14.2.4 h295c915_1", + "reproc-cpp 14.2.4 h295c915_1", + "ruamel.yaml 0.17.21 py39h5eee18b_0", + "ruamel.yaml.clib 0.2.6 py39h5eee18b_1", + "sqlite 3.41.2 h5eee18b_0", + "tk 8.6.12 h1ccaba5_0", + "tqdm 4.65.0 py39hb070fc8_0", + "wheel 0.41.2 py39h06a4308_0", + "yaml-cpp 0.8.0 h6a678d5_0", + "zlib 1.2.13 h5eee18b_0", + "zstandard 0.19.0 py39h5eee18b_0", + "zstd 1.5.5 hc292b87_0", + "attrs 23.1.0 py39h06a4308_0", + "beautifulsoup4 4.12.2 py39h06a4308_0", + "ca-certificates 2023.12.12 h06a4308_0", + "certifi 2024.2.2 py39h06a4308_0", + "cffi 1.16.0 py39h5eee18b_0", + "chardet 4.0.0 py39h06a4308_1003", + "click 8.1.7 py39h06a4308_0", + "conda 24.1.2 py39h06a4308_0", + "conda-build 24.1.2 py39h06a4308_0", + "conda-index 0.4.0 pyhd3eb1b0_0", + "conda-libmamba-solver 24.1.0 pyhd3eb1b0_0", + "cryptography 42.0.2 py39hdda0065_0", + "distro 1.8.0 py39h06a4308_0", + "filelock 3.13.1 py39h06a4308_0", + "jinja2 3.1.3 py39h06a4308_0", + "jsonschema 4.19.2 py39h06a4308_0", + "jsonschema-specifications 2023.7.1 py39h06a4308_0", + "libcurl 8.5.0 h251f7ec_0", + "libedit 3.1.20230828 h5eee18b_0", + "liblief 0.12.3 h6a678d5_0", + "libmamba 1.5.6 haf1ee3a_0", + "libmambapy 1.5.6 py39h2dafd23_0", + "markupsafe 2.1.3 py39h5eee18b_0", + "menuinst 2.0.2 py39h06a4308_0", + "more-itertools 10.1.0 py39h06a4308_0", + "openssl 3.0.13 h7f8727e_0", + "patch 2.7.6 h7b6447c_1001", + "patchelf 0.17.2 h6a678d5_0", + "pip 23.3.1 py39h06a4308_0", + "pkginfo 1.9.6 py39h06a4308_0", + "platformdirs 3.10.0 py39h06a4308_0", + "psutil 5.9.0 py39h5eee18b_0", + "py-lief 0.12.3 py39h6a678d5_0", + "pyopenssl 24.0.0 py39h06a4308_0", + "python-libarchive-c 2.9 pyhd3eb1b0_1", + "pytz 2023.3.post1 py39h06a4308_0", + "pyyaml 6.0.1 py39h5eee18b_0", + "referencing 0.30.2 py39h06a4308_0", + "requests 2.31.0 py39h06a4308_1", + "rpds-py 0.10.6 py39hb02cf49_0", + "setuptools 68.2.2 py39h06a4308_0", + "soupsieve 2.5 py39h06a4308_0", + "tomli 2.0.1 py39h06a4308_0", + "tzdata 2023d h04d1e81_0", + "urllib3 2.1.0 py39h06a4308_1", + "xz 5.4.5 h5eee18b_0", + "yaml 0.2.5 h7b6447c_0" + ], + "summary": "A high-performance embedded transactional key-value store database.", + "tags": [] +} \ No newline at end of file diff --git a/miniconda3/pkgs/lmdb-0.9.31-hb25bd0a_0/info/files b/miniconda3/pkgs/lmdb-0.9.31-hb25bd0a_0/info/files new file mode 100644 index 0000000000000000000000000000000000000000..6cf8b5c96368ec5c9cb9fee410ad227069856267 --- /dev/null +++ b/miniconda3/pkgs/lmdb-0.9.31-hb25bd0a_0/info/files @@ -0,0 +1,11 @@ +bin/mdb_copy +bin/mdb_dump +bin/mdb_load +bin/mdb_stat +include/lmdb.h +lib/liblmdb.a +lib/liblmdb.so +share/man/man1/mdb_copy.1 +share/man/man1/mdb_dump.1 +share/man/man1/mdb_load.1 +share/man/man1/mdb_stat.1 diff --git a/miniconda3/pkgs/lmdb-0.9.31-hb25bd0a_0/info/git b/miniconda3/pkgs/lmdb-0.9.31-hb25bd0a_0/info/git new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/miniconda3/pkgs/lmdb-0.9.31-hb25bd0a_0/info/hash_input.json b/miniconda3/pkgs/lmdb-0.9.31-hb25bd0a_0/info/hash_input.json new file mode 100644 index 0000000000000000000000000000000000000000..dc221cd8f464a44e35afa45655f84e8a4531b0e0 --- /dev/null +++ b/miniconda3/pkgs/lmdb-0.9.31-hb25bd0a_0/info/hash_input.json @@ -0,0 +1,7 @@ +{ + "channel_targets": "defaults", + "c_compiler_version": "11.2.0", + "target_platform": "linux-64", + "c_compiler": "gcc", + "__glibc": "__glibc >=2.17,<3.0.a0" +} \ No newline at end of file diff --git a/miniconda3/pkgs/lmdb-0.9.31-hb25bd0a_0/info/index.json b/miniconda3/pkgs/lmdb-0.9.31-hb25bd0a_0/info/index.json new file mode 100644 index 0000000000000000000000000000000000000000..aefd320fc9b31c531e9d8025887ff4315df7deb6 --- /dev/null +++ b/miniconda3/pkgs/lmdb-0.9.31-hb25bd0a_0/info/index.json @@ -0,0 +1,16 @@ +{ + "arch": "x86_64", + "build": "hb25bd0a_0", + "build_number": 0, + "depends": [ + "__glibc >=2.17,<3.0.a0", + "libgcc-ng >=11.2.0" + ], + "license": "BSD-3-Clause", + "license_family": "BSD", + "name": "lmdb", + "platform": "linux", + "subdir": "linux-64", + "timestamp": 1754999718088, + "version": "0.9.31" +} \ No newline at end of file diff --git a/miniconda3/pkgs/lmdb-0.9.31-hb25bd0a_0/info/licenses/libraries/liblmdb/LICENSE b/miniconda3/pkgs/lmdb-0.9.31-hb25bd0a_0/info/licenses/libraries/liblmdb/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..05ad7571e448b9d83ead5d4691274d9484574714 --- /dev/null +++ b/miniconda3/pkgs/lmdb-0.9.31-hb25bd0a_0/info/licenses/libraries/liblmdb/LICENSE @@ -0,0 +1,47 @@ +The OpenLDAP Public License + Version 2.8, 17 August 2003 + +Redistribution and use of this software and associated documentation +("Software"), with or without modification, are permitted provided +that the following conditions are met: + +1. Redistributions in source form must retain copyright statements + and notices, + +2. Redistributions in binary form must reproduce applicable copyright + statements and notices, this list of conditions, and the following + disclaimer in the documentation and/or other materials provided + with the distribution, and + +3. Redistributions must contain a verbatim copy of this document. + +The OpenLDAP Foundation may revise this license from time to time. +Each revision is distinguished by a version number. You may use +this Software under terms of this license revision or under the +terms of any subsequent revision of the license. + +THIS SOFTWARE IS PROVIDED BY THE OPENLDAP FOUNDATION AND ITS +CONTRIBUTORS ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, +INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT +SHALL THE OPENLDAP FOUNDATION, ITS CONTRIBUTORS, OR THE AUTHOR(S) +OR OWNER(S) OF THE SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + +The names of the authors and copyright holders must not be used in +advertising or otherwise to promote the sale, use or other dealing +in this Software without specific, written prior permission. Title +to copyright in this Software shall at all times remain with copyright +holders. + +OpenLDAP is a registered trademark of the OpenLDAP Foundation. + +Copyright 1999-2003 The OpenLDAP Foundation, Redwood City, +California, USA. All Rights Reserved. Permission to copy and +distribute verbatim copies of this document is granted. diff --git a/miniconda3/pkgs/lmdb-0.9.31-hb25bd0a_0/info/paths.json b/miniconda3/pkgs/lmdb-0.9.31-hb25bd0a_0/info/paths.json new file mode 100644 index 0000000000000000000000000000000000000000..9a49bf9d285879024a8abd9e7e109cca2e199fc7 --- /dev/null +++ b/miniconda3/pkgs/lmdb-0.9.31-hb25bd0a_0/info/paths.json @@ -0,0 +1,71 @@ +{ + "paths": [ + { + "_path": "bin/mdb_copy", + "path_type": "hardlink", + "sha256": "7d2be2f6ef533bce27e394bc14a47753de41715696581dac60f5eb40e7a3384f", + "size_in_bytes": 291816 + }, + { + "_path": "bin/mdb_dump", + "path_type": "hardlink", + "sha256": "6fb407ac4c749c41258f1756d9b1d875d64504c60280d093ec1fc7e3914c7b05", + "size_in_bytes": 307368 + }, + { + "_path": "bin/mdb_load", + "path_type": "hardlink", + "sha256": "d05a0e446a26575d5ec36d7fe056e2ccc9aec974063a1dbe91b44c62162a7978", + "size_in_bytes": 314456 + }, + { + "_path": "bin/mdb_stat", + "path_type": "hardlink", + "sha256": "79e6d672bc2b1b3ed8b11157a5cb19859dd45490b75f09a9f9e59f37dab4bfdf", + "size_in_bytes": 304896 + }, + { + "_path": "include/lmdb.h", + "path_type": "hardlink", + "sha256": "8316fc4df7f9c0a8f664c68e79900854f20726c0ee05510bd828c7818f88f9a7", + "size_in_bytes": 74013 + }, + { + "_path": "lib/liblmdb.a", + "path_type": "hardlink", + "sha256": "85c035dc5c2e52125357d36eebefbfcd352c7c7e30880f8a03e819103bd500fe", + "size_in_bytes": 336306 + }, + { + "_path": "lib/liblmdb.so", + "path_type": "hardlink", + "sha256": "741b5aa312727b1f8ccd8c5dee368a5487d8cb275ef3144cf72d29e2579cdb70", + "size_in_bytes": 290400 + }, + { + "_path": "share/man/man1/mdb_copy.1", + "path_type": "hardlink", + "sha256": "201bc00529e9ba25e7ad5dd3d6b1b830f22ceccde9352fd2975038e5c0b5aa2d", + "size_in_bytes": 1533 + }, + { + "_path": "share/man/man1/mdb_dump.1", + "path_type": "hardlink", + "sha256": "fd95dbe39786fd20f23dcafe227b5b0e3ffdf7bf6aa8fcaf924ecd8f35cefad9", + "size_in_bytes": 2197 + }, + { + "_path": "share/man/man1/mdb_load.1", + "path_type": "hardlink", + "sha256": "716c7e3443f0edd979d4f5a58faf0c532cb679b2ede5b25e321a2db4fb23be2a", + "size_in_bytes": 2636 + }, + { + "_path": "share/man/man1/mdb_stat.1", + "path_type": "hardlink", + "sha256": "ed3fe4a49d4ad208ce42911abe0fcaaf51d8a7ba9d83c9da438bb7c7b0759232", + "size_in_bytes": 1780 + } + ], + "paths_version": 1 +} \ No newline at end of file diff --git a/miniconda3/pkgs/lmdb-0.9.31-hb25bd0a_0/info/recipe/LICENSES.txt b/miniconda3/pkgs/lmdb-0.9.31-hb25bd0a_0/info/recipe/LICENSES.txt new file mode 100644 index 0000000000000000000000000000000000000000..4d3125685bb704c4ea9febe20e2ed3957d93da1a --- /dev/null +++ b/miniconda3/pkgs/lmdb-0.9.31-hb25bd0a_0/info/recipe/LICENSES.txt @@ -0,0 +1,99 @@ +The OpenLDAP Public License + Version 2.8, 17 August 2003 + +Redistribution and use of this software and associated documentation +("Software"), with or without modification, are permitted provided +that the following conditions are met: + +1. Redistributions in source form must retain copyright statements + and notices, + +2. Redistributions in binary form must reproduce applicable copyright + statements and notices, this list of conditions, and the following + disclaimer in the documentation and/or other materials provided + with the distribution, and + +3. Redistributions must contain a verbatim copy of this document. + +The OpenLDAP Foundation may revise this license from time to time. +Each revision is distinguished by a version number. You may use +this Software under terms of this license revision or under the +terms of any subsequent revision of the license. + +THIS SOFTWARE IS PROVIDED BY THE OPENLDAP FOUNDATION AND ITS +CONTRIBUTORS ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, +INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT +SHALL THE OPENLDAP FOUNDATION, ITS CONTRIBUTORS, OR THE AUTHOR(S) +OR OWNER(S) OF THE SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + +The names of the authors and copyright holders must not be used in +advertising or otherwise to promote the sale, use or other dealing +in this Software without specific, written prior permission. Title +to copyright in this Software shall at all times remain with copyright +holders. + +OpenLDAP is a registered trademark of the OpenLDAP Foundation. + +Copyright 1999-2003 The OpenLDAP Foundation, Redwood City, +California, USA. All Rights Reserved. Permission to copy and +distribute verbatim copies of this document is granted. + +*-----------------------------------------------------------------------------* + +$OpenBSD: getopt_long.c,v 1.23 2007/10/31 12:34:57 chl Exp $ +$NetBSD: getopt_long.c,v 1.15 2002/01/31 22:43:40 tv Exp $ + + Copyright (c) 2002 Todd C. Miller + + Permission to use, copy, modify, and distribute this software for any + purpose with or without fee is hereby granted, provided that the above + copyright notice and this permission notice appear in all copies. + + THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + + Sponsored in part by the Defense Advanced Research Projects + Agency (DARPA) and Air Force Research Laboratory, Air Force + Materiel Command, USAF, under agreement number F39502-99-1-0512. + +*-----------------------------------------------------------------------------* + + Copyright (c) 2000 The NetBSD Foundation, Inc. + All rights reserved. + + This code is derived from software contributed to The NetBSD Foundation + by Dieter Baron and Thomas Klausner. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS + ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS + BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. diff --git a/miniconda3/pkgs/lmdb-0.9.31-hb25bd0a_0/info/recipe/bld.bat b/miniconda3/pkgs/lmdb-0.9.31-hb25bd0a_0/info/recipe/bld.bat new file mode 100644 index 0000000000000000000000000000000000000000..7120b13faf0cc12f69e15aa94b39cc577fc3281c --- /dev/null +++ b/miniconda3/pkgs/lmdb-0.9.31-hb25bd0a_0/info/recipe/bld.bat @@ -0,0 +1,44 @@ +::https://github.com/willyd/caffe-builder/blob/master/packages/lmdb/cmake +xcopy /s /y "%RECIPE_DIR%\cmake" "%SRC_DIR%\libraries\liblmdb" +if errorlevel 1 exit 1 + +:: https://github.com/Alexpux/mingw-w64/blob/master/mingw-w64-crt/misc/getopt.c +:: https://github.com/Alexpux/mingw-w64/blob/master/mingw-w64-headers/crt/getopt.h +xcopy /y "%RECIPE_DIR%\getopt_win" "%SRC_DIR%\libraries\liblmdb\getopt\" +if errorlevel 1 exit 1 + +cd "%SRC_DIR%\libraries\liblmdb" +mkdir build_release +cd build_release + +if %ARCH% == 32 ( + set ARCH_STRING=x86 +) else ( + set ARCH_STRING=x64 +) + +:: Required for ntldd.dll +if %VS_YEAR% == 2008 ( + set "LIB=%LIB%;C:\Program Files (x86)\Windows Kits\8.1\lib\winv6.3\um\%ARCH_STRING%" +) + +set "INCLUDE=%INCLUDE%;%SRC_DIR%\libraries\liblmdb\getopt\" + +cmake -G"NMake Makefiles" ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_PREFIX_PATH="%LIBRARY_PREFIX%" ^ + -DCMAKE_INSTALL_PREFIX="%LIBRARY_PREFIX%" ^ + -DBUILD_SHARED_LIBS=True ^ + -DLMDB_BUILD_TOOLS=True ^ + -DLMDB_BUILD_TESTS=True ^ + .. +if errorlevel 1 exit 1 + +cmake --build . --config Release +if errorlevel 1 exit 1 + +ctest -C Release +if errorlevel 1 exit 1 + +cmake --build . --target install +if errorlevel 1 exit 1 \ No newline at end of file diff --git a/miniconda3/pkgs/lmdb-0.9.31-hb25bd0a_0/info/recipe/build.sh b/miniconda3/pkgs/lmdb-0.9.31-hb25bd0a_0/info/recipe/build.sh new file mode 100644 index 0000000000000000000000000000000000000000..a4b422969e6f448f0b61658ae3af3107af364a82 --- /dev/null +++ b/miniconda3/pkgs/lmdb-0.9.31-hb25bd0a_0/info/recipe/build.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +cd libraries/liblmdb/ +export DESTDIR=$PREFIX +make +make test +make install diff --git a/miniconda3/pkgs/lmdb-0.9.31-hb25bd0a_0/info/recipe/cmake/CMakeLists.txt b/miniconda3/pkgs/lmdb-0.9.31-hb25bd0a_0/info/recipe/cmake/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..328e747dd8e2d3588eb12daac3458c9cf8d7b10a --- /dev/null +++ b/miniconda3/pkgs/lmdb-0.9.31-hb25bd0a_0/info/recipe/cmake/CMakeLists.txt @@ -0,0 +1,80 @@ +cmake_minimum_required(VERSION 3.14) + +file(READ "${CMAKE_CURRENT_SOURCE_DIR}/lmdb.h" VERSION_HEADER) +string(REGEX MATCH ".*MDB_VERSION_MAJOR[ \t]+([0-9])" MAJOR_VERSION_MATCH "${VERSION_HEADER}") +set(LMDB_MAJOR_VERSION ${CMAKE_MATCH_1}) +string(REGEX MATCH ".*MDB_VERSION_MINOR[ \t]+([0-9])" MINOR_VERSION_MATCH "${VERSION_HEADER}") +set(LMDB_MINOR_VERSION ${CMAKE_MATCH_1}) +string(REGEX MATCH ".*MDB_VERSION_PATCH[ \t]+([0-9]+)" PATCH_VERSION_MATCH "${VERSION_HEADER}") +set(LMDB_PATCH_VERSION ${CMAKE_MATCH_1}) + +set(LMDB_VERSION "${LMDB_MAJOR_VERSION}.${LMDB_MINOR_VERSION}.${LMDB_PATCH_VERSION}") + +project(lmdb) + +option(LMDB_BUILD_TOOLS "Build lmdb tools" OFF) +option(LMDB_BUILD_TESTS "Build lmdb tests" OFF) +option(LMDB_INSTALL_HEADERS "Install LMDB header files" ON) +set(LMDB_INCLUDE_INSTALL_DIR include CACHE PATH "Install directory for headers") +set(LMDB_LIBRARY_INSTALL_DIR lib CACHE PATH "Install directory for library") +set(LMDB_RUNTIME_INSTALL_DIR bin CACHE PATH "Install directory for binaries/dlls") +set(LMDB_CONFIG_INSTALL_DIR cmake CACHE PATH "Install directory for cmake config files") + + +if(BUILD_SHARED_LIBS) +set(CMAKE_SHARED_LINKER_FLAGS_DEBUG "${CMAKE_SHARED_LINKER_FLAGS_DEBUG} /DEF:${CMAKE_CURRENT_SOURCE_DIR}/lmdbd.def") +set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_SHARED_LINKER_FLAGS_DEBUG} /DEF:${CMAKE_CURRENT_SOURCE_DIR}/lmdb.def") +endif() + +set(SRCS lmdb mdb.c lmdb.h midl.c midl.h ) +add_library(lmdb ${SRCS}) +set_target_properties(lmdb PROPERTIES DEBUG_POSTFIX d) +target_link_libraries(lmdb PRIVATE ntdll.lib) + +install(TARGETS lmdb DESTINATION lib + EXPORT lmdb-targets + RUNTIME DESTINATION ${LMDB_RUNTIME_INSTALL_DIR} + LIBRARY DESTINATION ${LMDB_LIBRARY_INSTALL_DIR} + ARCHIVE DESTINATION ${LMDB_LIBRARY_INSTALL_DIR} + ) + +if(LMDB_INSTALL_HEADERS) + install(FILES lmdb.h midl.h DESTINATION ${LMDB_INCLUDE_INSTALL_DIR}) +endif() + +include(CMakePackageConfigHelpers) + +set(INSTALL_INCLUDE_DIR ${LMDB_INCLUDE_INSTALL_DIR}) +configure_package_config_file(${CMAKE_CURRENT_SOURCE_DIR}/cmake/package-config.cmakein ${CMAKE_CURRENT_BINARY_DIR}/lmdb-config.cmake + INSTALL_DESTINATION ${LMDB_CONFIG_INSTALL_DIR} + PATH_VARS INSTALL_INCLUDE_DIR + ) + +write_basic_package_version_file( ${CMAKE_CURRENT_BINARY_DIR}/lmdb-config-version.cmake VERSION ${LMDB_VERSION} COMPATIBILITY SameMajorVersion ) + +install(FILES ${CMAKE_CURRENT_BINARY_DIR}/lmdb-config.cmake ${CMAKE_CURRENT_BINARY_DIR}/lmdb-config-version.cmake + DESTINATION ${LMDB_CONFIG_INSTALL_DIR} ) + + +install(EXPORT lmdb-targets DESTINATION ${LMDB_CONFIG_INSTALL_DIR}) + +if(LMDB_BUILD_TOOLS) + # build mdb_dump/load/stat with getopt.h from mingw-64 + foreach(_tool mdb_copy mdb_dump mdb_load mdb_stat) + add_executable(${_tool} ${_tool}.c getopt/getopt.c) + target_link_libraries(${_tool} lmdb) + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${_tool}.exe DESTINATION ${LMDB_RUNTIME_INSTALL_DIR}) + endforeach() +endif() + +if(LMDB_BUILD_TESTS) + enable_testing() + # don't use mtest6 since it will only build in static + # build + foreach(_test mtest mtest2 mtest3 mtest4 mtest5) + add_executable(${_test} ${_test}.c) + target_link_libraries(${_test} lmdb) + add_test(NAME ${_test} + COMMAND ${CMAKE_COMMAND} -DTEST=$ + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + * Sponsored in part by the Defense Advanced Research Projects + * Agency (DARPA) and Air Force Research Laboratory, Air Force + * Materiel Command, USAF, under agreement number F39502-99-1-0512. + */ +/*- + * Copyright (c) 2000 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Dieter Baron and Thomas Klausner. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#include +#include +#include +#include +#include +#include +#include + +#define REPLACE_GETOPT /* use this getopt as the system getopt(3) */ + +#ifdef REPLACE_GETOPT +int opterr = 1; /* if error message should be printed */ +int optind = 1; /* index into parent argv vector */ +int optopt = '?'; /* character checked for validity */ +#undef optreset /* see getopt.h */ +#define optreset __mingw_optreset +int optreset; /* reset getopt */ +char *optarg; /* argument associated with option */ +#endif + +#define PRINT_ERROR ((opterr) && (*options != ':')) + +#define FLAG_PERMUTE 0x01 /* permute non-options to the end of argv */ +#define FLAG_ALLARGS 0x02 /* treat non-options as args to option "-1" */ +#define FLAG_LONGONLY 0x04 /* operate as getopt_long_only */ + +/* return values */ +#define BADCH (int)'?' +#define BADARG ((*options == ':') ? (int)':' : (int)'?') +#define INORDER (int)1 + +#ifndef __CYGWIN__ +#define __progname __argv[0] +#else +extern char __declspec(dllimport) *__progname; +#endif + +#ifdef __CYGWIN__ +static char EMSG[] = ""; +#else +#define EMSG "" +#endif + +static int getopt_internal(int, char * const *, const char *, + const struct option *, int *, int); +static int parse_long_options(char * const *, const char *, + const struct option *, int *, int); +static int gcd(int, int); +static void permute_args(int, int, int, char * const *); + +static char *place = EMSG; /* option letter processing */ + +/* XXX: set optreset to 1 rather than these two */ +static int nonopt_start = -1; /* first non option argument (for permute) */ +static int nonopt_end = -1; /* first option after non options (for permute) */ + +/* Error messages */ +static const char recargchar[] = "option requires an argument -- %c"; +static const char recargstring[] = "option requires an argument -- %s"; +static const char ambig[] = "ambiguous option -- %.*s"; +static const char noarg[] = "option doesn't take an argument -- %.*s"; +static const char illoptchar[] = "unknown option -- %c"; +static const char illoptstring[] = "unknown option -- %s"; + +static void +_vwarnx(const char *fmt,va_list ap) +{ + (void)fprintf(stderr,"%s: ",__progname); + if (fmt != NULL) + (void)vfprintf(stderr,fmt,ap); + (void)fprintf(stderr,"\n"); +} + +static void +warnx(const char *fmt,...) +{ + va_list ap; + va_start(ap,fmt); + _vwarnx(fmt,ap); + va_end(ap); +} + +/* + * Compute the greatest common divisor of a and b. + */ +static int +gcd(int a, int b) +{ + int c; + + c = a % b; + while (c != 0) { + a = b; + b = c; + c = a % b; + } + + return (b); +} + +/* + * Exchange the block from nonopt_start to nonopt_end with the block + * from nonopt_end to opt_end (keeping the same order of arguments + * in each block). + */ +static void +permute_args(int panonopt_start, int panonopt_end, int opt_end, + char * const *nargv) +{ + int cstart, cyclelen, i, j, ncycle, nnonopts, nopts, pos; + char *swap; + + /* + * compute lengths of blocks and number and size of cycles + */ + nnonopts = panonopt_end - panonopt_start; + nopts = opt_end - panonopt_end; + ncycle = gcd(nnonopts, nopts); + cyclelen = (opt_end - panonopt_start) / ncycle; + + for (i = 0; i < ncycle; i++) { + cstart = panonopt_end+i; + pos = cstart; + for (j = 0; j < cyclelen; j++) { + if (pos >= panonopt_end) + pos -= nnonopts; + else + pos += nopts; + swap = nargv[pos]; + /* LINTED const cast */ + ((char **) nargv)[pos] = nargv[cstart]; + /* LINTED const cast */ + ((char **)nargv)[cstart] = swap; + } + } +} + +/* + * parse_long_options -- + * Parse long options in argc/argv argument vector. + * Returns -1 if short_too is set and the option does not match long_options. + */ +static int +parse_long_options(char * const *nargv, const char *options, + const struct option *long_options, int *idx, int short_too) +{ + char *current_argv, *has_equal; + size_t current_argv_len; + int i, ambiguous, match; + +#define IDENTICAL_INTERPRETATION(_x, _y) \ + (long_options[(_x)].has_arg == long_options[(_y)].has_arg && \ + long_options[(_x)].flag == long_options[(_y)].flag && \ + long_options[(_x)].val == long_options[(_y)].val) + + current_argv = place; + match = -1; + ambiguous = 0; + + optind++; + + if ((has_equal = strchr(current_argv, '=')) != NULL) { + /* argument found (--option=arg) */ + current_argv_len = has_equal - current_argv; + has_equal++; + } else + current_argv_len = strlen(current_argv); + + for (i = 0; long_options[i].name; i++) { + /* find matching long option */ + if (strncmp(current_argv, long_options[i].name, + current_argv_len)) + continue; + + if (strlen(long_options[i].name) == current_argv_len) { + /* exact match */ + match = i; + ambiguous = 0; + break; + } + /* + * If this is a known short option, don't allow + * a partial match of a single character. + */ + if (short_too && current_argv_len == 1) + continue; + + if (match == -1) /* partial match */ + match = i; + else if (!IDENTICAL_INTERPRETATION(i, match)) + ambiguous = 1; + } + if (ambiguous) { + /* ambiguous abbreviation */ + if (PRINT_ERROR) + warnx(ambig, (int)current_argv_len, + current_argv); + optopt = 0; + return (BADCH); + } + if (match != -1) { /* option found */ + if (long_options[match].has_arg == no_argument + && has_equal) { + if (PRINT_ERROR) + warnx(noarg, (int)current_argv_len, + current_argv); + /* + * XXX: GNU sets optopt to val regardless of flag + */ + if (long_options[match].flag == NULL) + optopt = long_options[match].val; + else + optopt = 0; + return (BADARG); + } + if (long_options[match].has_arg == required_argument || + long_options[match].has_arg == optional_argument) { + if (has_equal) + optarg = has_equal; + else if (long_options[match].has_arg == + required_argument) { + /* + * optional argument doesn't use next nargv + */ + optarg = nargv[optind++]; + } + } + if ((long_options[match].has_arg == required_argument) + && (optarg == NULL)) { + /* + * Missing argument; leading ':' indicates no error + * should be generated. + */ + if (PRINT_ERROR) + warnx(recargstring, + current_argv); + /* + * XXX: GNU sets optopt to val regardless of flag + */ + if (long_options[match].flag == NULL) + optopt = long_options[match].val; + else + optopt = 0; + --optind; + return (BADARG); + } + } else { /* unknown option */ + if (short_too) { + --optind; + return (-1); + } + if (PRINT_ERROR) + warnx(illoptstring, current_argv); + optopt = 0; + return (BADCH); + } + if (idx) + *idx = match; + if (long_options[match].flag) { + *long_options[match].flag = long_options[match].val; + return (0); + } else + return (long_options[match].val); +#undef IDENTICAL_INTERPRETATION +} + +/* + * getopt_internal -- + * Parse argc/argv argument vector. Called by user level routines. + */ +static int +getopt_internal(int nargc, char * const *nargv, const char *options, + const struct option *long_options, int *idx, int flags) +{ + char *oli; /* option letter list index */ + int optchar, short_too; + static int posixly_correct = -1; + + if (options == NULL) + return (-1); + + /* + * XXX Some GNU programs (like cvs) set optind to 0 instead of + * XXX using optreset. Work around this braindamage. + */ + if (optind == 0) + optind = optreset = 1; + + /* + * Disable GNU extensions if POSIXLY_CORRECT is set or options + * string begins with a '+'. + * + * CV, 2009-12-14: Check POSIXLY_CORRECT anew if optind == 0 or + * optreset != 0 for GNU compatibility. + */ + if (posixly_correct == -1 || optreset != 0) + posixly_correct = (getenv("POSIXLY_CORRECT") != NULL); + if (*options == '-') + flags |= FLAG_ALLARGS; + else if (posixly_correct || *options == '+') + flags &= ~FLAG_PERMUTE; + if (*options == '+' || *options == '-') + options++; + + optarg = NULL; + if (optreset) + nonopt_start = nonopt_end = -1; +start: + if (optreset || !*place) { /* update scanning pointer */ + optreset = 0; + if (optind >= nargc) { /* end of argument vector */ + place = EMSG; + if (nonopt_end != -1) { + /* do permutation, if we have to */ + permute_args(nonopt_start, nonopt_end, + optind, nargv); + optind -= nonopt_end - nonopt_start; + } + else if (nonopt_start != -1) { + /* + * If we skipped non-options, set optind + * to the first of them. + */ + optind = nonopt_start; + } + nonopt_start = nonopt_end = -1; + return (-1); + } + if (*(place = nargv[optind]) != '-' || + (place[1] == '\0' && strchr(options, '-') == NULL)) { + place = EMSG; /* found non-option */ + if (flags & FLAG_ALLARGS) { + /* + * GNU extension: + * return non-option as argument to option 1 + */ + optarg = nargv[optind++]; + return (INORDER); + } + if (!(flags & FLAG_PERMUTE)) { + /* + * If no permutation wanted, stop parsing + * at first non-option. + */ + return (-1); + } + /* do permutation */ + if (nonopt_start == -1) + nonopt_start = optind; + else if (nonopt_end != -1) { + permute_args(nonopt_start, nonopt_end, + optind, nargv); + nonopt_start = optind - + (nonopt_end - nonopt_start); + nonopt_end = -1; + } + optind++; + /* process next argument */ + goto start; + } + if (nonopt_start != -1 && nonopt_end == -1) + nonopt_end = optind; + + /* + * If we have "-" do nothing, if "--" we are done. + */ + if (place[1] != '\0' && *++place == '-' && place[1] == '\0') { + optind++; + place = EMSG; + /* + * We found an option (--), so if we skipped + * non-options, we have to permute. + */ + if (nonopt_end != -1) { + permute_args(nonopt_start, nonopt_end, + optind, nargv); + optind -= nonopt_end - nonopt_start; + } + nonopt_start = nonopt_end = -1; + return (-1); + } + } + + /* + * Check long options if: + * 1) we were passed some + * 2) the arg is not just "-" + * 3) either the arg starts with -- we are getopt_long_only() + */ + if (long_options != NULL && place != nargv[optind] && + (*place == '-' || (flags & FLAG_LONGONLY))) { + short_too = 0; + if (*place == '-') + place++; /* --foo long option */ + else if (*place != ':' && strchr(options, *place) != NULL) + short_too = 1; /* could be short option too */ + + optchar = parse_long_options(nargv, options, long_options, + idx, short_too); + if (optchar != -1) { + place = EMSG; + return (optchar); + } + } + + if ((optchar = (int)*place++) == (int)':' || + (optchar == (int)'-' && *place != '\0') || + (oli = strchr(options, optchar)) == NULL) { + /* + * If the user specified "-" and '-' isn't listed in + * options, return -1 (non-option) as per POSIX. + * Otherwise, it is an unknown option character (or ':'). + */ + if (optchar == (int)'-' && *place == '\0') + return (-1); + if (!*place) + ++optind; + if (PRINT_ERROR) + warnx(illoptchar, optchar); + optopt = optchar; + return (BADCH); + } + if (long_options != NULL && optchar == 'W' && oli[1] == ';') { + /* -W long-option */ + if (*place) /* no space */ + /* NOTHING */; + else if (++optind >= nargc) { /* no arg */ + place = EMSG; + if (PRINT_ERROR) + warnx(recargchar, optchar); + optopt = optchar; + return (BADARG); + } else /* white space */ + place = nargv[optind]; + optchar = parse_long_options(nargv, options, long_options, + idx, 0); + place = EMSG; + return (optchar); + } + if (*++oli != ':') { /* doesn't take argument */ + if (!*place) + ++optind; + } else { /* takes (optional) argument */ + optarg = NULL; + if (*place) /* no white space */ + optarg = place; + else if (oli[1] != ':') { /* arg not optional */ + if (++optind >= nargc) { /* no arg */ + place = EMSG; + if (PRINT_ERROR) + warnx(recargchar, optchar); + optopt = optchar; + return (BADARG); + } else + optarg = nargv[optind]; + } + place = EMSG; + ++optind; + } + /* dump back option letter */ + return (optchar); +} + +#ifdef REPLACE_GETOPT +/* + * getopt -- + * Parse argc/argv argument vector. + * + * [eventually this will replace the BSD getopt] + */ +int +getopt(int nargc, char * const *nargv, const char *options) +{ + + /* + * We don't pass FLAG_PERMUTE to getopt_internal() since + * the BSD getopt(3) (unlike GNU) has never done this. + * + * Furthermore, since many privileged programs call getopt() + * before dropping privileges it makes sense to keep things + * as simple (and bug-free) as possible. + */ + return (getopt_internal(nargc, nargv, options, NULL, NULL, 0)); +} +#endif /* REPLACE_GETOPT */ + +/* + * getopt_long -- + * Parse argc/argv argument vector. + */ +int +getopt_long(int nargc, char * const *nargv, const char *options, + const struct option *long_options, int *idx) +{ + + return (getopt_internal(nargc, nargv, options, long_options, idx, + FLAG_PERMUTE)); +} + +/* + * getopt_long_only -- + * Parse argc/argv argument vector. + */ +int +getopt_long_only(int nargc, char * const *nargv, const char *options, + const struct option *long_options, int *idx) +{ + + return (getopt_internal(nargc, nargv, options, long_options, idx, + FLAG_PERMUTE|FLAG_LONGONLY)); +} diff --git a/miniconda3/pkgs/lmdb-0.9.31-hb25bd0a_0/info/recipe/getopt_win/getopt.h b/miniconda3/pkgs/lmdb-0.9.31-hb25bd0a_0/info/recipe/getopt_win/getopt.h new file mode 100644 index 0000000000000000000000000000000000000000..1922a0efb1845d916680452572ca66637696d4b7 --- /dev/null +++ b/miniconda3/pkgs/lmdb-0.9.31-hb25bd0a_0/info/recipe/getopt_win/getopt.h @@ -0,0 +1,95 @@ +#ifndef __GETOPT_H__ +/** + * DISCLAIMER + * This file has no copyright assigned and is placed in the Public Domain. + * This file is part of the mingw-w64 runtime package. + * + * The mingw-w64 runtime package and its code is distributed in the hope that it + * will be useful but WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESSED OR + * IMPLIED ARE HEREBY DISCLAIMED. This includes but is not limited to + * warranties of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + */ + +#define __GETOPT_H__ + +/* All the headers include this file. */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +extern int optind; /* index of first non-option in argv */ +extern int optopt; /* single option character, as parsed */ +extern int opterr; /* flag to enable built-in diagnostics... */ + /* (user may set to zero, to suppress) */ + +extern char *optarg; /* pointer to argument of current option */ + +extern int getopt(int nargc, char * const *nargv, const char *options); + +#ifdef _BSD_SOURCE +/* + * BSD adds the non-standard `optreset' feature, for reinitialisation + * of `getopt' parsing. We support this feature, for applications which + * proclaim their BSD heritage, before including this header; however, + * to maintain portability, developers are advised to avoid it. + */ +# define optreset __mingw_optreset +extern int optreset; +#endif +#ifdef __cplusplus +} +#endif +/* + * POSIX requires the `getopt' API to be specified in `unistd.h'; + * thus, `unistd.h' includes this header. However, we do not want + * to expose the `getopt_long' or `getopt_long_only' APIs, when + * included in this manner. Thus, close the standard __GETOPT_H__ + * declarations block, and open an additional __GETOPT_LONG_H__ + * specific block, only when *not* __UNISTD_H_SOURCED__, in which + * to declare the extended API. + */ +#endif /* !defined(__GETOPT_H__) */ + +#if !defined(__UNISTD_H_SOURCED__) && !defined(__GETOPT_LONG_H__) +#define __GETOPT_LONG_H__ + +#ifdef __cplusplus +extern "C" { +#endif + +struct option /* specification for a long form option... */ +{ + const char *name; /* option name, without leading hyphens */ + int has_arg; /* does it take an argument? */ + int *flag; /* where to save its status, or NULL */ + int val; /* its associated status value */ +}; + +enum /* permitted values for its `has_arg' field... */ +{ + no_argument = 0, /* option never takes an argument */ + required_argument, /* option always requires an argument */ + optional_argument /* option may take an argument */ +}; + +extern int getopt_long(int nargc, char * const *nargv, const char *options, + const struct option *long_options, int *idx); +extern int getopt_long_only(int nargc, char * const *nargv, const char *options, + const struct option *long_options, int *idx); +/* + * Previous MinGW implementation had... + */ +#ifndef HAVE_DECL_GETOPT +/* + * ...for the long form API only; keep this for compatibility. + */ +# define HAVE_DECL_GETOPT 1 +#endif + +#ifdef __cplusplus +} +#endif + +#endif /* !defined(__UNISTD_H_SOURCED__) && !defined(__GETOPT_LONG_H__) */ diff --git a/miniconda3/pkgs/lmdb-0.9.31-hb25bd0a_0/info/recipe/meta.yaml b/miniconda3/pkgs/lmdb-0.9.31-hb25bd0a_0/info/recipe/meta.yaml new file mode 100644 index 0000000000000000000000000000000000000000..9550529ac145ce3980286001aea5a83ef754d5e9 --- /dev/null +++ b/miniconda3/pkgs/lmdb-0.9.31-hb25bd0a_0/info/recipe/meta.yaml @@ -0,0 +1,77 @@ +# This file created by conda-build 24.1.2 +# meta.yaml template originally from: +# /feedstock/recipe, last modified Tue Aug 12 11:54:36 2025 +# ------------------------------------------------ + +package: + name: lmdb + version: 0.9.31 +source: + patches: + - patches/0001-fix-makefile.patch + sha256: dd70a8c67807b3b8532b3e987b0a4e998962ecc28643e1af5ec77696b081c9b0 + url: https://github.com/LMDB/lmdb/archive/refs/tags/LMDB_0.9.31.tar.gz +build: + number: '0' + run_exports: + - lmdb >=0.9.31,<1.0a0 + string: hb25bd0a_0 +requirements: + build: + - _libgcc_mutex 0.1 main + - _openmp_mutex 5.1 1_gnu + - _sysroot_linux-64_curr_repodata_hack 3 haa98f57_10 + - binutils_impl_linux-64 2.40 h5293946_0 + - binutils_linux-64 2.40.0 hc2dff05_2 + - gcc_impl_linux-64 11.2.0 h1234567_1 + - gcc_linux-64 11.2.0 h5c386dc_2 + - kernel-headers_linux-64 3.10.0 h57e8cba_10 + - ld_impl_linux-64 2.40 h12ee557_0 + - libgcc-devel_linux-64 11.2.0 h1234567_1 + - libgcc-ng 11.2.0 h1234567_1 + - libgomp 11.2.0 h1234567_1 + - libstdcxx-ng 11.2.0 h1234567_1 + - make 4.2.1 h1bed415_1 + - sysroot_linux-64 2.17 h57e8cba_10 + host: + - _libgcc_mutex 0.1 main + - _openmp_mutex 5.1 1_gnu + - libgcc-ng 11.2.0 h1234567_1 + - libgomp 11.2.0 h1234567_1 + run: + - __glibc >=2.17,<3.0.a0 + - libgcc-ng >=11.2.0 +test: + commands: + - mdb_copy -V + - mdb_dump -V + - mdb_load -V + - mdb_stat -V + - conda inspect linkages -p $PREFIX lmdb + requires: + - conda-build +about: + description: 'Symas LMDB is an extraordinarily fast, memory-efficient database developed + + for the Symas OpenLDAP Project. With memory-mapped files, it has the read + + performance of a pure in-memory database while retaining the persistence of + + standard disk-based databases. + + ' + dev_url: https://github.com/LMDB/lmdb + doc_url: https://www.symas.com/symas-embedded-database-lmdb + home: https://www.symas.com/symas-embedded-database-lmdb + license: BSD-3-Clause + license_family: BSD + license_file: libraries/liblmdb/LICENSE + summary: A high-performance embedded transactional key-value store database. +extra: + copy_test_source_files: true + final: true + flow_run_id: eadb492f-a812-4bad-af17-3fd0128527a8 + recipe-maintainers: + - jakirkham + remote_url: git@github.com:AnacondaRecipes/lmdb-feedstock.git + sha: 031cedbb15092307709a97f06082ca574e65e770 diff --git a/miniconda3/pkgs/lmdb-0.9.31-hb25bd0a_0/info/recipe/meta.yaml.template b/miniconda3/pkgs/lmdb-0.9.31-hb25bd0a_0/info/recipe/meta.yaml.template new file mode 100644 index 0000000000000000000000000000000000000000..f8a319eb04a08173efa740e542d3557b9a7c3e44 --- /dev/null +++ b/miniconda3/pkgs/lmdb-0.9.31-hb25bd0a_0/info/recipe/meta.yaml.template @@ -0,0 +1,61 @@ +{% set version = "0.9.31" %} +{% set name = "LMDB" %} + +package: + name: "{{ name|lower }}" + version: {{ version }} + +source: + url: https://github.com/{{ name }}/{{ name|lower }}/archive/refs/tags/{{ name }}_{{ version }}.tar.gz + sha256: dd70a8c67807b3b8532b3e987b0a4e998962ecc28643e1af5ec77696b081c9b0 + patches: + - patches/0001-fix-makefile.patch # [unix] + - patches/getopt_win.patch # [win] + - patches/ssize_t.patch # [win] + +build: + number: 0 + run_exports: + # good backwards compatibility + # https://abi-laboratory.pro/tracker/timeline/lmdb/ + - {{ pin_subpackage('lmdb') }} + +requirements: + build: + - {{ compiler('c') }} + - {{ stdlib('c') }} + - cmake # [win] + - make # [not win] + +test: + requires: + - conda-build + commands: + - mdb_copy -V + - mdb_dump -V + - mdb_load -V + - mdb_stat -V + + - if not exist %LIBRARY_INC%\\lmdb.h exit 1 # [win] + - if not exist %LIBRARY_INC%\\midl.h exit 1 # [win] + - if not exist %LIBRARY_LIB%\\lmdb.lib exit 1 # [win] + - if not exist %LIBRARY_BIN%\\lmdb.dll exit 1 # [win] + - conda inspect linkages -p $PREFIX lmdb # [unix] + +about: + home: https://www.symas.com/symas-embedded-database-lmdb + license: BSD-3-Clause + license_file: libraries/liblmdb/LICENSE + license_family: BSD + summary: A high-performance embedded transactional key-value store database. + description: | + Symas LMDB is an extraordinarily fast, memory-efficient database developed + for the Symas OpenLDAP Project. With memory-mapped files, it has the read + performance of a pure in-memory database while retaining the persistence of + standard disk-based databases. + doc_url: https://www.symas.com/symas-embedded-database-lmdb + dev_url: https://github.com/LMDB/lmdb + +extra: + recipe-maintainers: + - jakirkham diff --git a/miniconda3/pkgs/lmdb-0.9.31-hb25bd0a_0/info/recipe/patches/0001-fix-makefile.patch b/miniconda3/pkgs/lmdb-0.9.31-hb25bd0a_0/info/recipe/patches/0001-fix-makefile.patch new file mode 100644 index 0000000000000000000000000000000000000000..19d1d200c0295d042855efd525a6ffe3daf316c9 --- /dev/null +++ b/miniconda3/pkgs/lmdb-0.9.31-hb25bd0a_0/info/recipe/patches/0001-fix-makefile.patch @@ -0,0 +1,38 @@ +From 030c6cfec2977b3f64d198d88b97246a9209c278 Mon Sep 17 00:00:00 2001 +From: Jonathan Helmus +Date: Thu, 7 Dec 2017 18:16:49 -0600 +Subject: [PATCH] fix makefile + +Remove CC and AR definitions from the Makefile, use from the environment +unset prefix +--- + libraries/liblmdb/Makefile | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/libraries/liblmdb/Makefile b/libraries/liblmdb/Makefile +index f254511..fc465f2 100644 +--- a/libraries/liblmdb/Makefile ++++ b/libraries/liblmdb/Makefile +@@ -18,8 +18,8 @@ + # There may be other macros in mdb.c of interest. You should + # read mdb.c before changing any of them. + # +-CC = gcc +-AR = ar ++#CC = gcc ++#AR = ar + W = -W -Wall -Wno-unused-parameter -Wbad-function-cast -Wuninitialized + THREADS = -pthread + OPT = -O2 -g +@@ -27,7 +27,7 @@ CFLAGS = $(THREADS) $(OPT) $(W) $(XCFLAGS) + LDLIBS = + SOLIBS = + SOEXT = .so +-prefix = /usr/local ++prefix = + exec_prefix = $(prefix) + bindir = $(exec_prefix)/bin + libdir = $(exec_prefix)/lib +-- +2.11.1 + diff --git a/miniconda3/pkgs/lmdb-0.9.31-hb25bd0a_0/info/recipe/patches/getopt_win.patch b/miniconda3/pkgs/lmdb-0.9.31-hb25bd0a_0/info/recipe/patches/getopt_win.patch new file mode 100644 index 0000000000000000000000000000000000000000..1eb23247ca18cb49de6b4ef0351a18abdbeb2dbf --- /dev/null +++ b/miniconda3/pkgs/lmdb-0.9.31-hb25bd0a_0/info/recipe/patches/getopt_win.patch @@ -0,0 +1,53 @@ +From 036ca6d0776e18d1e2c8aef33662e1a59b487cda Mon Sep 17 00:00:00 2001 +From: Nehal J Wani +Date: Thu, 29 Jun 2017 00:54:09 -0500 +Subject: [PATCH] Use mingw-64 port of getopt + +--- + libraries/liblmdb/mdb_dump.c | 2 +- + libraries/liblmdb/mdb_load.c | 2 +- + libraries/liblmdb/mdb_stat.c | 2 +- + 3 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/libraries/liblmdb/mdb_dump.c b/libraries/liblmdb/mdb_dump.c +index 537a499..5074386 100644 +--- a/libraries/liblmdb/mdb_dump.c ++++ b/libraries/liblmdb/mdb_dump.c +@@ -16,7 +16,7 @@ + #include + #include + #include +-#include ++#include + #include + #include "lmdb.h" + +diff --git a/libraries/liblmdb/mdb_load.c b/libraries/liblmdb/mdb_load.c +index d193a69..1e1aec9 100644 +--- a/libraries/liblmdb/mdb_load.c ++++ b/libraries/liblmdb/mdb_load.c +@@ -16,7 +16,7 @@ + #include + #include + #include +-#include ++#include + #include "lmdb.h" + + #define PRINT 1 +diff --git a/libraries/liblmdb/mdb_stat.c b/libraries/liblmdb/mdb_stat.c +index 51063ac..a7315d8 100644 +--- a/libraries/liblmdb/mdb_stat.c ++++ b/libraries/liblmdb/mdb_stat.c +@@ -14,7 +14,7 @@ + #include + #include + #include +-#include ++#include + #include "lmdb.h" + + #ifdef _WIN32 +-- +2.5.1.windows.1 + diff --git a/miniconda3/pkgs/lmdb-0.9.31-hb25bd0a_0/info/recipe/patches/ssize_t.patch b/miniconda3/pkgs/lmdb-0.9.31-hb25bd0a_0/info/recipe/patches/ssize_t.patch new file mode 100644 index 0000000000000000000000000000000000000000..ea76959a0879840d192e85d5fda8e786d48184ef --- /dev/null +++ b/miniconda3/pkgs/lmdb-0.9.31-hb25bd0a_0/info/recipe/patches/ssize_t.patch @@ -0,0 +1,24 @@ +From 29020c3ccf83992621dd96e7a9d5d90d8d790181 Mon Sep 17 00:00:00 2001 +From: Nehal J Wani +Date: Thu, 29 Jun 2017 01:08:03 -0500 +Subject: [PATCH] define ssize_t as int + +--- + libraries/liblmdb/mdb_stat.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/libraries/liblmdb/mdb_stat.c b/libraries/liblmdb/mdb_stat.c +index a7315d8..f7b0d95 100644 +--- a/libraries/liblmdb/mdb_stat.c ++++ b/libraries/liblmdb/mdb_stat.c +@@ -19,6 +19,7 @@ + + #ifdef _WIN32 + #define Z "I" ++#define ssize_t int + #else + #define Z "z" + #endif +-- +2.5.1.windows.1 + diff --git a/miniconda3/pkgs/lmdb-0.9.31-hb25bd0a_0/info/repodata_record.json b/miniconda3/pkgs/lmdb-0.9.31-hb25bd0a_0/info/repodata_record.json new file mode 100644 index 0000000000000000000000000000000000000000..0bfc4cab0ae5af835d390b31f71c1783146a2423 --- /dev/null +++ b/miniconda3/pkgs/lmdb-0.9.31-hb25bd0a_0/info/repodata_record.json @@ -0,0 +1,23 @@ +{ + "arch": "x86_64", + "build": "hb25bd0a_0", + "build_number": 0, + "channel": "https://repo.anaconda.com/pkgs/main/linux-64/", + "constrains": [], + "depends": [ + "__glibc >=2.17,<3.0.a0", + "libgcc-ng >=11.2.0" + ], + "fn": "lmdb-0.9.31-hb25bd0a_0.conda", + "license": "BSD-3-Clause", + "license_family": "BSD", + "md5": "1468bc20414b0fa8eb1b18d3a916039f", + "name": "lmdb", + "platform": "linux", + "sha256": "839f0cd7e4a13088dcd9b8ac3213e8992725dd67f8e1a747c54132013b87d4b9", + "size": 480121, + "subdir": "linux-64", + "timestamp": 1754999718000, + "url": "https://repo.anaconda.com/pkgs/main/linux-64/lmdb-0.9.31-hb25bd0a_0.conda", + "version": "0.9.31" +} \ No newline at end of file diff --git a/miniconda3/pkgs/lmdb-0.9.31-hb25bd0a_0/info/run_exports.json b/miniconda3/pkgs/lmdb-0.9.31-hb25bd0a_0/info/run_exports.json new file mode 100644 index 0000000000000000000000000000000000000000..038339e79c587ec365e3c7208361440a8d964512 --- /dev/null +++ b/miniconda3/pkgs/lmdb-0.9.31-hb25bd0a_0/info/run_exports.json @@ -0,0 +1 @@ +{"weak": ["lmdb >=0.9.31,<1.0a0"]} \ No newline at end of file diff --git a/miniconda3/pkgs/lmdb-0.9.31-hb25bd0a_0/info/test/run_test.sh b/miniconda3/pkgs/lmdb-0.9.31-hb25bd0a_0/info/test/run_test.sh new file mode 100644 index 0000000000000000000000000000000000000000..c4274c1c3adb8cb0de31a0b4ee5cd75b7175f53e --- /dev/null +++ b/miniconda3/pkgs/lmdb-0.9.31-hb25bd0a_0/info/test/run_test.sh @@ -0,0 +1,12 @@ + + +set -ex + + + +mdb_copy -V +mdb_dump -V +mdb_load -V +mdb_stat -V +conda inspect linkages -p $PREFIX lmdb +exit 0 diff --git a/miniconda3/pkgs/lmdb-0.9.31-hb25bd0a_0/info/test/test_time_dependencies.json b/miniconda3/pkgs/lmdb-0.9.31-hb25bd0a_0/info/test/test_time_dependencies.json new file mode 100644 index 0000000000000000000000000000000000000000..5925644ad4728659d2327e3cd54d420460b02f45 --- /dev/null +++ b/miniconda3/pkgs/lmdb-0.9.31-hb25bd0a_0/info/test/test_time_dependencies.json @@ -0,0 +1 @@ +["conda-build"] \ No newline at end of file diff --git a/miniconda3/pkgs/lmdb-0.9.31-hb25bd0a_0/share/man/man1/mdb_copy.1 b/miniconda3/pkgs/lmdb-0.9.31-hb25bd0a_0/share/man/man1/mdb_copy.1 new file mode 100644 index 0000000000000000000000000000000000000000..0c53746223e1a86a35af1f049ce5a0fea0b3b9f4 --- /dev/null +++ b/miniconda3/pkgs/lmdb-0.9.31-hb25bd0a_0/share/man/man1/mdb_copy.1 @@ -0,0 +1,55 @@ +.TH MDB_COPY 1 "2014/07/01" "LMDB 0.9.14" +.\" Copyright 2012-2021 Howard Chu, Symas Corp. All Rights Reserved. +.\" Copying restrictions apply. See COPYRIGHT/LICENSE. +.SH NAME +mdb_copy \- LMDB environment copy tool +.SH SYNOPSIS +.B mdb_copy +[\c +.BR \-V ] +[\c +.BR \-c ] +[\c +.BR \-n ] +.B srcpath +[\c +.BR dstpath ] +.SH DESCRIPTION +The +.B mdb_copy +utility copies an LMDB environment. The environment can +be copied regardless of whether it is currently in use. +No lockfile is created, since it gets recreated at need. + +If +.I dstpath +is specified it must be the path of an empty directory +for storing the backup. Otherwise, the backup will be +written to stdout. + +.SH OPTIONS +.TP +.BR \-V +Write the library version number to the standard output, and exit. +.TP +.BR \-c +Compact while copying. Only current data pages will be copied; freed +or unused pages will be omitted from the copy. This option will +slow down the backup process as it is more CPU-intensive. +Currently it fails if the environment has suffered a page leak. +.TP +.BR \-n +Open LDMB environment(s) which do not use subdirectories. + +.SH DIAGNOSTICS +Exit status is zero if no errors occur. +Errors result in a non-zero exit status and +a diagnostic message being written to standard error. +.SH CAVEATS +This utility can trigger significant file size growth if run +in parallel with write transactions, because pages which they +free during copying cannot be reused until the copy is done. +.SH "SEE ALSO" +.BR mdb_stat (1) +.SH AUTHOR +Howard Chu of Symas Corporation diff --git a/miniconda3/pkgs/lmdb-0.9.31-hb25bd0a_0/share/man/man1/mdb_dump.1 b/miniconda3/pkgs/lmdb-0.9.31-hb25bd0a_0/share/man/man1/mdb_dump.1 new file mode 100644 index 0000000000000000000000000000000000000000..5f2d771b5859d667a3c91bd6be97f98668e1f0b6 --- /dev/null +++ b/miniconda3/pkgs/lmdb-0.9.31-hb25bd0a_0/share/man/man1/mdb_dump.1 @@ -0,0 +1,75 @@ +.TH MDB_DUMP 1 "2015/09/30" "LMDB 0.9.17" +.\" Copyright 2014-2021 Howard Chu, Symas Corp. All Rights Reserved. +.\" Copying restrictions apply. See COPYRIGHT/LICENSE. +.SH NAME +mdb_dump \- LMDB environment export tool +.SH SYNOPSIS +.B mdb_dump +[\c +.BR \-V ] +[\c +.BI \-f \ file\fR] +[\c +.BR \-l ] +[\c +.BR \-n ] +[\c +.BR \-p ] +[\c +.BR \-a \ | +.BI \-s \ subdb\fR] +.BR \ envpath +.SH DESCRIPTION +The +.B mdb_dump +utility reads a database and writes its contents to the +standard output using a portable flat-text format +understood by the +.BR mdb_load (1) +utility. +.SH OPTIONS +.TP +.BR \-V +Write the library version number to the standard output, and exit. +.TP +.BR \-f \ file +Write to the specified file instead of to the standard output. +.TP +.BR \-l +List the databases stored in the environment. Just the +names will be listed, no data will be output. +.TP +.BR \-n +Dump an LMDB database which does not use subdirectories. +.TP +.BR \-p +If characters in either the key or data items are printing characters (as +defined by isprint(3)), output them directly. This option permits users to +use standard text editors and tools to modify the contents of databases. + +Note: different systems may have different notions about what characters +are considered printing characters, and databases dumped in this manner may +be less portable to external systems. +.TP +.BR \-a +Dump all of the subdatabases in the environment. +.TP +.BR \-s \ subdb +Dump a specific subdatabase. If no database is specified, only the main database is dumped. +.SH DIAGNOSTICS +Exit status is zero if no errors occur. +Errors result in a non-zero exit status and +a diagnostic message being written to standard error. + +Dumping and reloading databases that use user-defined comparison functions +will result in new databases that use the default comparison functions. +\fBIn this case it is quite likely that the reloaded database will be +damaged beyond repair permitting neither record storage nor retrieval.\fP + +The only available workaround is to modify the source for the +.BR mdb_load (1) +utility to load the database using the correct comparison functions. +.SH "SEE ALSO" +.BR mdb_load (1) +.SH AUTHOR +Howard Chu of Symas Corporation diff --git a/miniconda3/pkgs/lmdb-0.9.31-hb25bd0a_0/share/man/man1/mdb_load.1 b/miniconda3/pkgs/lmdb-0.9.31-hb25bd0a_0/share/man/man1/mdb_load.1 new file mode 100644 index 0000000000000000000000000000000000000000..78439a14da66734a8c671df53440a940ba06c3a2 --- /dev/null +++ b/miniconda3/pkgs/lmdb-0.9.31-hb25bd0a_0/share/man/man1/mdb_load.1 @@ -0,0 +1,84 @@ +.TH MDB_LOAD 1 "2015/09/30" "LMDB 0.9.17" +.\" Copyright 2014-2021 Howard Chu, Symas Corp. All Rights Reserved. +.\" Copying restrictions apply. See COPYRIGHT/LICENSE. +.SH NAME +mdb_load \- LMDB environment import tool +.SH SYNOPSIS +.B mdb_load +[\c +.BR \-V ] +[\c +.BI \-f \ file\fR] +[\c +.BR \-n ] +[\c +.BI \-s \ subdb\fR] +[\c +.BR \-N ] +[\c +.BR \-T ] +.BR \ envpath +.SH DESCRIPTION +The +.B mdb_load +utility reads from the standard input and loads it into the +LMDB environment +.BR envpath . + +The input to +.B mdb_load +must be in the output format specified by the +.BR mdb_dump (1) +utility or as specified by the +.B -T +option below. +.SH OPTIONS +.TP +.BR \-V +Write the library version number to the standard output, and exit. +.TP +.BR \-a +Append all records in the order they appear in the input. The input is assumed to already be +in correctly sorted order and no sorting or checking for redundant values will be performed. +This option must be used to reload data that was produced by running +.B mdb_dump +on a database that uses custom compare functions. +.TP +.BR \-f \ file +Read from the specified file instead of from the standard input. +.TP +.BR \-n +Load an LMDB database which does not use subdirectories. +.TP +.BR \-s \ subdb +Load a specific subdatabase. If no database is specified, data is loaded into the main database. +.TP +.BR \-N +Don't overwrite existing records when loading into an already existing database; just skip them. +.TP +.BR \-T +Load data from simple text files. The input must be paired lines of text, where the first +line of the pair is the key item, and the second line of the pair is its corresponding +data item. + +A simple escape mechanism, where newline and backslash (\\) characters are special, is +applied to the text input. Newline characters are interpreted as record separators. +Backslash characters in the text will be interpreted in one of two ways: If the backslash +character precedes another backslash character, the pair will be interpreted as a literal +backslash. If the backslash character precedes any other character, the two characters +following the backslash will be interpreted as a hexadecimal specification of a single +character; for example, \\0a is a newline character in the ASCII character set. + +For this reason, any backslash or newline characters that naturally occur in the text +input must be escaped to avoid misinterpretation by +.BR mdb_load . + +.SH DIAGNOSTICS +Exit status is zero if no errors occur. +Errors result in a non-zero exit status and +a diagnostic message being written to standard error. + +.SH "SEE ALSO" +.BR mdb_dump (1) +.SH AUTHOR +Howard Chu of Symas Corporation diff --git a/miniconda3/pkgs/lmdb-0.9.31-hb25bd0a_0/share/man/man1/mdb_stat.1 b/miniconda3/pkgs/lmdb-0.9.31-hb25bd0a_0/share/man/man1/mdb_stat.1 new file mode 100644 index 0000000000000000000000000000000000000000..62e8ce1d4aa9e51b9184fa6aba92c7a6f0a749cc --- /dev/null +++ b/miniconda3/pkgs/lmdb-0.9.31-hb25bd0a_0/share/man/man1/mdb_stat.1 @@ -0,0 +1,64 @@ +.TH MDB_STAT 1 "2015/09/30" "LMDB 0.9.17" +.\" Copyright 2012-2021 Howard Chu, Symas Corp. All Rights Reserved. +.\" Copying restrictions apply. See COPYRIGHT/LICENSE. +.SH NAME +mdb_stat \- LMDB environment status tool +.SH SYNOPSIS +.B mdb_stat +[\c +.BR \-V ] +[\c +.BR \-e ] +[\c +.BR \-f [ f [ f ]]] +[\c +.BR \-n ] +[\c +.BR \-r [ r ]] +[\c +.BR \-a \ | +.BI \-s \ subdb\fR] +.BR \ envpath +.SH DESCRIPTION +The +.B mdb_stat +utility displays the status of an LMDB environment. +.SH OPTIONS +.TP +.BR \-V +Write the library version number to the standard output, and exit. +.TP +.BR \-e +Display information about the database environment. +.TP +.BR \-f +Display information about the environment freelist. +If \fB\-ff\fP is given, summarize each freelist entry. +If \fB\-fff\fP is given, display the full list of page IDs in the freelist. +.TP +.BR \-n +Display the status of an LMDB database which does not use subdirectories. +.TP +.BR \-r +Display information about the environment reader table. +Shows the process ID, thread ID, and transaction ID for each active +reader slot. The process ID and transaction ID are in decimal, the +thread ID is in hexadecimal. The transaction ID is displayed as "-" +if the reader does not currently have a read transaction open. +If \fB\-rr\fP is given, check for stale entries in the reader +table and clear them. The reader table will be printed again +after the check is performed. +.TP +.BR \-a +Display the status of all of the subdatabases in the environment. +.TP +.BR \-s \ subdb +Display the status of a specific subdatabase. +.SH DIAGNOSTICS +Exit status is zero if no errors occur. +Errors result in a non-zero exit status and +a diagnostic message being written to standard error. +.SH "SEE ALSO" +.BR mdb_copy (1) +.SH AUTHOR +Howard Chu of Symas Corporation diff --git a/miniconda3/pkgs/lz4-c-1.9.4-h6a678d5_1/include/lz4.h b/miniconda3/pkgs/lz4-c-1.9.4-h6a678d5_1/include/lz4.h new file mode 100644 index 0000000000000000000000000000000000000000..491c6087c417754ff4662a02c1bfc9ddc13d43e1 --- /dev/null +++ b/miniconda3/pkgs/lz4-c-1.9.4-h6a678d5_1/include/lz4.h @@ -0,0 +1,842 @@ +/* + * LZ4 - Fast LZ compression algorithm + * Header File + * Copyright (C) 2011-2020, Yann Collet. + + BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php) + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following disclaimer + in the documentation and/or other materials provided with the + distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + You can contact the author at : + - LZ4 homepage : http://www.lz4.org + - LZ4 source repository : https://github.com/lz4/lz4 +*/ +#if defined (__cplusplus) +extern "C" { +#endif + +#ifndef LZ4_H_2983827168210 +#define LZ4_H_2983827168210 + +/* --- Dependency --- */ +#include /* size_t */ + + +/** + Introduction + + LZ4 is lossless compression algorithm, providing compression speed >500 MB/s per core, + scalable with multi-cores CPU. It features an extremely fast decoder, with speed in + multiple GB/s per core, typically reaching RAM speed limits on multi-core systems. + + The LZ4 compression library provides in-memory compression and decompression functions. + It gives full buffer control to user. + Compression can be done in: + - a single step (described as Simple Functions) + - a single step, reusing a context (described in Advanced Functions) + - unbounded multiple steps (described as Streaming compression) + + lz4.h generates and decodes LZ4-compressed blocks (doc/lz4_Block_format.md). + Decompressing such a compressed block requires additional metadata. + Exact metadata depends on exact decompression function. + For the typical case of LZ4_decompress_safe(), + metadata includes block's compressed size, and maximum bound of decompressed size. + Each application is free to encode and pass such metadata in whichever way it wants. + + lz4.h only handle blocks, it can not generate Frames. + + Blocks are different from Frames (doc/lz4_Frame_format.md). + Frames bundle both blocks and metadata in a specified manner. + Embedding metadata is required for compressed data to be self-contained and portable. + Frame format is delivered through a companion API, declared in lz4frame.h. + The `lz4` CLI can only manage frames. +*/ + +/*^*************************************************************** +* Export parameters +*****************************************************************/ +/* +* LZ4_DLL_EXPORT : +* Enable exporting of functions when building a Windows DLL +* LZ4LIB_VISIBILITY : +* Control library symbols visibility. +*/ +#ifndef LZ4LIB_VISIBILITY +# if defined(__GNUC__) && (__GNUC__ >= 4) +# define LZ4LIB_VISIBILITY __attribute__ ((visibility ("default"))) +# else +# define LZ4LIB_VISIBILITY +# endif +#endif +#if defined(LZ4_DLL_EXPORT) && (LZ4_DLL_EXPORT==1) +# define LZ4LIB_API __declspec(dllexport) LZ4LIB_VISIBILITY +#elif defined(LZ4_DLL_IMPORT) && (LZ4_DLL_IMPORT==1) +# define LZ4LIB_API __declspec(dllimport) LZ4LIB_VISIBILITY /* It isn't required but allows to generate better code, saving a function pointer load from the IAT and an indirect jump.*/ +#else +# define LZ4LIB_API LZ4LIB_VISIBILITY +#endif + +/*! LZ4_FREESTANDING : + * When this macro is set to 1, it enables "freestanding mode" that is + * suitable for typical freestanding environment which doesn't support + * standard C library. + * + * - LZ4_FREESTANDING is a compile-time switch. + * - It requires the following macros to be defined: + * LZ4_memcpy, LZ4_memmove, LZ4_memset. + * - It only enables LZ4/HC functions which don't use heap. + * All LZ4F_* functions are not supported. + * - See tests/freestanding.c to check its basic setup. + */ +#if defined(LZ4_FREESTANDING) && (LZ4_FREESTANDING == 1) +# define LZ4_HEAPMODE 0 +# define LZ4HC_HEAPMODE 0 +# define LZ4_STATIC_LINKING_ONLY_DISABLE_MEMORY_ALLOCATION 1 +# if !defined(LZ4_memcpy) +# error "LZ4_FREESTANDING requires macro 'LZ4_memcpy'." +# endif +# if !defined(LZ4_memset) +# error "LZ4_FREESTANDING requires macro 'LZ4_memset'." +# endif +# if !defined(LZ4_memmove) +# error "LZ4_FREESTANDING requires macro 'LZ4_memmove'." +# endif +#elif ! defined(LZ4_FREESTANDING) +# define LZ4_FREESTANDING 0 +#endif + + +/*------ Version ------*/ +#define LZ4_VERSION_MAJOR 1 /* for breaking interface changes */ +#define LZ4_VERSION_MINOR 9 /* for new (non-breaking) interface capabilities */ +#define LZ4_VERSION_RELEASE 4 /* for tweaks, bug-fixes, or development */ + +#define LZ4_VERSION_NUMBER (LZ4_VERSION_MAJOR *100*100 + LZ4_VERSION_MINOR *100 + LZ4_VERSION_RELEASE) + +#define LZ4_LIB_VERSION LZ4_VERSION_MAJOR.LZ4_VERSION_MINOR.LZ4_VERSION_RELEASE +#define LZ4_QUOTE(str) #str +#define LZ4_EXPAND_AND_QUOTE(str) LZ4_QUOTE(str) +#define LZ4_VERSION_STRING LZ4_EXPAND_AND_QUOTE(LZ4_LIB_VERSION) /* requires v1.7.3+ */ + +LZ4LIB_API int LZ4_versionNumber (void); /**< library version number; useful to check dll version; requires v1.3.0+ */ +LZ4LIB_API const char* LZ4_versionString (void); /**< library version string; useful to check dll version; requires v1.7.5+ */ + + +/*-************************************ +* Tuning parameter +**************************************/ +#define LZ4_MEMORY_USAGE_MIN 10 +#define LZ4_MEMORY_USAGE_DEFAULT 14 +#define LZ4_MEMORY_USAGE_MAX 20 + +/*! + * LZ4_MEMORY_USAGE : + * Memory usage formula : N->2^N Bytes (examples : 10 -> 1KB; 12 -> 4KB ; 16 -> 64KB; 20 -> 1MB; ) + * Increasing memory usage improves compression ratio, at the cost of speed. + * Reduced memory usage may improve speed at the cost of ratio, thanks to better cache locality. + * Default value is 14, for 16KB, which nicely fits into Intel x86 L1 cache + */ +#ifndef LZ4_MEMORY_USAGE +# define LZ4_MEMORY_USAGE LZ4_MEMORY_USAGE_DEFAULT +#endif + +#if (LZ4_MEMORY_USAGE < LZ4_MEMORY_USAGE_MIN) +# error "LZ4_MEMORY_USAGE is too small !" +#endif + +#if (LZ4_MEMORY_USAGE > LZ4_MEMORY_USAGE_MAX) +# error "LZ4_MEMORY_USAGE is too large !" +#endif + +/*-************************************ +* Simple Functions +**************************************/ +/*! LZ4_compress_default() : + * Compresses 'srcSize' bytes from buffer 'src' + * into already allocated 'dst' buffer of size 'dstCapacity'. + * Compression is guaranteed to succeed if 'dstCapacity' >= LZ4_compressBound(srcSize). + * It also runs faster, so it's a recommended setting. + * If the function cannot compress 'src' into a more limited 'dst' budget, + * compression stops *immediately*, and the function result is zero. + * In which case, 'dst' content is undefined (invalid). + * srcSize : max supported value is LZ4_MAX_INPUT_SIZE. + * dstCapacity : size of buffer 'dst' (which must be already allocated) + * @return : the number of bytes written into buffer 'dst' (necessarily <= dstCapacity) + * or 0 if compression fails + * Note : This function is protected against buffer overflow scenarios (never writes outside 'dst' buffer, nor read outside 'source' buffer). + */ +LZ4LIB_API int LZ4_compress_default(const char* src, char* dst, int srcSize, int dstCapacity); + +/*! LZ4_decompress_safe() : + * compressedSize : is the exact complete size of the compressed block. + * dstCapacity : is the size of destination buffer (which must be already allocated), presumed an upper bound of decompressed size. + * @return : the number of bytes decompressed into destination buffer (necessarily <= dstCapacity) + * If destination buffer is not large enough, decoding will stop and output an error code (negative value). + * If the source stream is detected malformed, the function will stop decoding and return a negative result. + * Note 1 : This function is protected against malicious data packets : + * it will never writes outside 'dst' buffer, nor read outside 'source' buffer, + * even if the compressed block is maliciously modified to order the decoder to do these actions. + * In such case, the decoder stops immediately, and considers the compressed block malformed. + * Note 2 : compressedSize and dstCapacity must be provided to the function, the compressed block does not contain them. + * The implementation is free to send / store / derive this information in whichever way is most beneficial. + * If there is a need for a different format which bundles together both compressed data and its metadata, consider looking at lz4frame.h instead. + */ +LZ4LIB_API int LZ4_decompress_safe (const char* src, char* dst, int compressedSize, int dstCapacity); + + +/*-************************************ +* Advanced Functions +**************************************/ +#define LZ4_MAX_INPUT_SIZE 0x7E000000 /* 2 113 929 216 bytes */ +#define LZ4_COMPRESSBOUND(isize) ((unsigned)(isize) > (unsigned)LZ4_MAX_INPUT_SIZE ? 0 : (isize) + ((isize)/255) + 16) + +/*! LZ4_compressBound() : + Provides the maximum size that LZ4 compression may output in a "worst case" scenario (input data not compressible) + This function is primarily useful for memory allocation purposes (destination buffer size). + Macro LZ4_COMPRESSBOUND() is also provided for compilation-time evaluation (stack memory allocation for example). + Note that LZ4_compress_default() compresses faster when dstCapacity is >= LZ4_compressBound(srcSize) + inputSize : max supported value is LZ4_MAX_INPUT_SIZE + return : maximum output size in a "worst case" scenario + or 0, if input size is incorrect (too large or negative) +*/ +LZ4LIB_API int LZ4_compressBound(int inputSize); + +/*! LZ4_compress_fast() : + Same as LZ4_compress_default(), but allows selection of "acceleration" factor. + The larger the acceleration value, the faster the algorithm, but also the lesser the compression. + It's a trade-off. It can be fine tuned, with each successive value providing roughly +~3% to speed. + An acceleration value of "1" is the same as regular LZ4_compress_default() + Values <= 0 will be replaced by LZ4_ACCELERATION_DEFAULT (currently == 1, see lz4.c). + Values > LZ4_ACCELERATION_MAX will be replaced by LZ4_ACCELERATION_MAX (currently == 65537, see lz4.c). +*/ +LZ4LIB_API int LZ4_compress_fast (const char* src, char* dst, int srcSize, int dstCapacity, int acceleration); + + +/*! LZ4_compress_fast_extState() : + * Same as LZ4_compress_fast(), using an externally allocated memory space for its state. + * Use LZ4_sizeofState() to know how much memory must be allocated, + * and allocate it on 8-bytes boundaries (using `malloc()` typically). + * Then, provide this buffer as `void* state` to compression function. + */ +LZ4LIB_API int LZ4_sizeofState(void); +LZ4LIB_API int LZ4_compress_fast_extState (void* state, const char* src, char* dst, int srcSize, int dstCapacity, int acceleration); + + +/*! LZ4_compress_destSize() : + * Reverse the logic : compresses as much data as possible from 'src' buffer + * into already allocated buffer 'dst', of size >= 'targetDestSize'. + * This function either compresses the entire 'src' content into 'dst' if it's large enough, + * or fill 'dst' buffer completely with as much data as possible from 'src'. + * note: acceleration parameter is fixed to "default". + * + * *srcSizePtr : will be modified to indicate how many bytes where read from 'src' to fill 'dst'. + * New value is necessarily <= input value. + * @return : Nb bytes written into 'dst' (necessarily <= targetDestSize) + * or 0 if compression fails. + * + * Note : from v1.8.2 to v1.9.1, this function had a bug (fixed un v1.9.2+): + * the produced compressed content could, in specific circumstances, + * require to be decompressed into a destination buffer larger + * by at least 1 byte than the content to decompress. + * If an application uses `LZ4_compress_destSize()`, + * it's highly recommended to update liblz4 to v1.9.2 or better. + * If this can't be done or ensured, + * the receiving decompression function should provide + * a dstCapacity which is > decompressedSize, by at least 1 byte. + * See https://github.com/lz4/lz4/issues/859 for details + */ +LZ4LIB_API int LZ4_compress_destSize (const char* src, char* dst, int* srcSizePtr, int targetDstSize); + + +/*! LZ4_decompress_safe_partial() : + * Decompress an LZ4 compressed block, of size 'srcSize' at position 'src', + * into destination buffer 'dst' of size 'dstCapacity'. + * Up to 'targetOutputSize' bytes will be decoded. + * The function stops decoding on reaching this objective. + * This can be useful to boost performance + * whenever only the beginning of a block is required. + * + * @return : the number of bytes decoded in `dst` (necessarily <= targetOutputSize) + * If source stream is detected malformed, function returns a negative result. + * + * Note 1 : @return can be < targetOutputSize, if compressed block contains less data. + * + * Note 2 : targetOutputSize must be <= dstCapacity + * + * Note 3 : this function effectively stops decoding on reaching targetOutputSize, + * so dstCapacity is kind of redundant. + * This is because in older versions of this function, + * decoding operation would still write complete sequences. + * Therefore, there was no guarantee that it would stop writing at exactly targetOutputSize, + * it could write more bytes, though only up to dstCapacity. + * Some "margin" used to be required for this operation to work properly. + * Thankfully, this is no longer necessary. + * The function nonetheless keeps the same signature, in an effort to preserve API compatibility. + * + * Note 4 : If srcSize is the exact size of the block, + * then targetOutputSize can be any value, + * including larger than the block's decompressed size. + * The function will, at most, generate block's decompressed size. + * + * Note 5 : If srcSize is _larger_ than block's compressed size, + * then targetOutputSize **MUST** be <= block's decompressed size. + * Otherwise, *silent corruption will occur*. + */ +LZ4LIB_API int LZ4_decompress_safe_partial (const char* src, char* dst, int srcSize, int targetOutputSize, int dstCapacity); + + +/*-********************************************* +* Streaming Compression Functions +***********************************************/ +typedef union LZ4_stream_u LZ4_stream_t; /* incomplete type (defined later) */ + +/** + Note about RC_INVOKED + + - RC_INVOKED is predefined symbol of rc.exe (the resource compiler which is part of MSVC/Visual Studio). + https://docs.microsoft.com/en-us/windows/win32/menurc/predefined-macros + + - Since rc.exe is a legacy compiler, it truncates long symbol (> 30 chars) + and reports warning "RC4011: identifier truncated". + + - To eliminate the warning, we surround long preprocessor symbol with + "#if !defined(RC_INVOKED) ... #endif" block that means + "skip this block when rc.exe is trying to read it". +*/ +#if !defined(RC_INVOKED) /* https://docs.microsoft.com/en-us/windows/win32/menurc/predefined-macros */ +#if !defined(LZ4_STATIC_LINKING_ONLY_DISABLE_MEMORY_ALLOCATION) +LZ4LIB_API LZ4_stream_t* LZ4_createStream(void); +LZ4LIB_API int LZ4_freeStream (LZ4_stream_t* streamPtr); +#endif /* !defined(LZ4_STATIC_LINKING_ONLY_DISABLE_MEMORY_ALLOCATION) */ +#endif + +/*! LZ4_resetStream_fast() : v1.9.0+ + * Use this to prepare an LZ4_stream_t for a new chain of dependent blocks + * (e.g., LZ4_compress_fast_continue()). + * + * An LZ4_stream_t must be initialized once before usage. + * This is automatically done when created by LZ4_createStream(). + * However, should the LZ4_stream_t be simply declared on stack (for example), + * it's necessary to initialize it first, using LZ4_initStream(). + * + * After init, start any new stream with LZ4_resetStream_fast(). + * A same LZ4_stream_t can be re-used multiple times consecutively + * and compress multiple streams, + * provided that it starts each new stream with LZ4_resetStream_fast(). + * + * LZ4_resetStream_fast() is much faster than LZ4_initStream(), + * but is not compatible with memory regions containing garbage data. + * + * Note: it's only useful to call LZ4_resetStream_fast() + * in the context of streaming compression. + * The *extState* functions perform their own resets. + * Invoking LZ4_resetStream_fast() before is redundant, and even counterproductive. + */ +LZ4LIB_API void LZ4_resetStream_fast (LZ4_stream_t* streamPtr); + +/*! LZ4_loadDict() : + * Use this function to reference a static dictionary into LZ4_stream_t. + * The dictionary must remain available during compression. + * LZ4_loadDict() triggers a reset, so any previous data will be forgotten. + * The same dictionary will have to be loaded on decompression side for successful decoding. + * Dictionary are useful for better compression of small data (KB range). + * While LZ4 accept any input as dictionary, + * results are generally better when using Zstandard's Dictionary Builder. + * Loading a size of 0 is allowed, and is the same as reset. + * @return : loaded dictionary size, in bytes (necessarily <= 64 KB) + */ +LZ4LIB_API int LZ4_loadDict (LZ4_stream_t* streamPtr, const char* dictionary, int dictSize); + +/*! LZ4_compress_fast_continue() : + * Compress 'src' content using data from previously compressed blocks, for better compression ratio. + * 'dst' buffer must be already allocated. + * If dstCapacity >= LZ4_compressBound(srcSize), compression is guaranteed to succeed, and runs faster. + * + * @return : size of compressed block + * or 0 if there is an error (typically, cannot fit into 'dst'). + * + * Note 1 : Each invocation to LZ4_compress_fast_continue() generates a new block. + * Each block has precise boundaries. + * Each block must be decompressed separately, calling LZ4_decompress_*() with relevant metadata. + * It's not possible to append blocks together and expect a single invocation of LZ4_decompress_*() to decompress them together. + * + * Note 2 : The previous 64KB of source data is __assumed__ to remain present, unmodified, at same address in memory ! + * + * Note 3 : When input is structured as a double-buffer, each buffer can have any size, including < 64 KB. + * Make sure that buffers are separated, by at least one byte. + * This construction ensures that each block only depends on previous block. + * + * Note 4 : If input buffer is a ring-buffer, it can have any size, including < 64 KB. + * + * Note 5 : After an error, the stream status is undefined (invalid), it can only be reset or freed. + */ +LZ4LIB_API int LZ4_compress_fast_continue (LZ4_stream_t* streamPtr, const char* src, char* dst, int srcSize, int dstCapacity, int acceleration); + +/*! LZ4_saveDict() : + * If last 64KB data cannot be guaranteed to remain available at its current memory location, + * save it into a safer place (char* safeBuffer). + * This is schematically equivalent to a memcpy() followed by LZ4_loadDict(), + * but is much faster, because LZ4_saveDict() doesn't need to rebuild tables. + * @return : saved dictionary size in bytes (necessarily <= maxDictSize), or 0 if error. + */ +LZ4LIB_API int LZ4_saveDict (LZ4_stream_t* streamPtr, char* safeBuffer, int maxDictSize); + + +/*-********************************************** +* Streaming Decompression Functions +* Bufferless synchronous API +************************************************/ +typedef union LZ4_streamDecode_u LZ4_streamDecode_t; /* tracking context */ + +/*! LZ4_createStreamDecode() and LZ4_freeStreamDecode() : + * creation / destruction of streaming decompression tracking context. + * A tracking context can be re-used multiple times. + */ +#if !defined(RC_INVOKED) /* https://docs.microsoft.com/en-us/windows/win32/menurc/predefined-macros */ +#if !defined(LZ4_STATIC_LINKING_ONLY_DISABLE_MEMORY_ALLOCATION) +LZ4LIB_API LZ4_streamDecode_t* LZ4_createStreamDecode(void); +LZ4LIB_API int LZ4_freeStreamDecode (LZ4_streamDecode_t* LZ4_stream); +#endif /* !defined(LZ4_STATIC_LINKING_ONLY_DISABLE_MEMORY_ALLOCATION) */ +#endif + +/*! LZ4_setStreamDecode() : + * An LZ4_streamDecode_t context can be allocated once and re-used multiple times. + * Use this function to start decompression of a new stream of blocks. + * A dictionary can optionally be set. Use NULL or size 0 for a reset order. + * Dictionary is presumed stable : it must remain accessible and unmodified during next decompression. + * @return : 1 if OK, 0 if error + */ +LZ4LIB_API int LZ4_setStreamDecode (LZ4_streamDecode_t* LZ4_streamDecode, const char* dictionary, int dictSize); + +/*! LZ4_decoderRingBufferSize() : v1.8.2+ + * Note : in a ring buffer scenario (optional), + * blocks are presumed decompressed next to each other + * up to the moment there is not enough remaining space for next block (remainingSize < maxBlockSize), + * at which stage it resumes from beginning of ring buffer. + * When setting such a ring buffer for streaming decompression, + * provides the minimum size of this ring buffer + * to be compatible with any source respecting maxBlockSize condition. + * @return : minimum ring buffer size, + * or 0 if there is an error (invalid maxBlockSize). + */ +LZ4LIB_API int LZ4_decoderRingBufferSize(int maxBlockSize); +#define LZ4_DECODER_RING_BUFFER_SIZE(maxBlockSize) (65536 + 14 + (maxBlockSize)) /* for static allocation; maxBlockSize presumed valid */ + +/*! LZ4_decompress_*_continue() : + * These decoding functions allow decompression of consecutive blocks in "streaming" mode. + * A block is an unsplittable entity, it must be presented entirely to a decompression function. + * Decompression functions only accepts one block at a time. + * The last 64KB of previously decoded data *must* remain available and unmodified at the memory position where they were decoded. + * If less than 64KB of data has been decoded, all the data must be present. + * + * Special : if decompression side sets a ring buffer, it must respect one of the following conditions : + * - Decompression buffer size is _at least_ LZ4_decoderRingBufferSize(maxBlockSize). + * maxBlockSize is the maximum size of any single block. It can have any value > 16 bytes. + * In which case, encoding and decoding buffers do not need to be synchronized. + * Actually, data can be produced by any source compliant with LZ4 format specification, and respecting maxBlockSize. + * - Synchronized mode : + * Decompression buffer size is _exactly_ the same as compression buffer size, + * and follows exactly same update rule (block boundaries at same positions), + * and decoding function is provided with exact decompressed size of each block (exception for last block of the stream), + * _then_ decoding & encoding ring buffer can have any size, including small ones ( < 64 KB). + * - Decompression buffer is larger than encoding buffer, by a minimum of maxBlockSize more bytes. + * In which case, encoding and decoding buffers do not need to be synchronized, + * and encoding ring buffer can have any size, including small ones ( < 64 KB). + * + * Whenever these conditions are not possible, + * save the last 64KB of decoded data into a safe buffer where it can't be modified during decompression, + * then indicate where this data is saved using LZ4_setStreamDecode(), before decompressing next block. +*/ +LZ4LIB_API int +LZ4_decompress_safe_continue (LZ4_streamDecode_t* LZ4_streamDecode, + const char* src, char* dst, + int srcSize, int dstCapacity); + + +/*! LZ4_decompress_*_usingDict() : + * These decoding functions work the same as + * a combination of LZ4_setStreamDecode() followed by LZ4_decompress_*_continue() + * They are stand-alone, and don't need an LZ4_streamDecode_t structure. + * Dictionary is presumed stable : it must remain accessible and unmodified during decompression. + * Performance tip : Decompression speed can be substantially increased + * when dst == dictStart + dictSize. + */ +LZ4LIB_API int +LZ4_decompress_safe_usingDict(const char* src, char* dst, + int srcSize, int dstCapacity, + const char* dictStart, int dictSize); + +LZ4LIB_API int +LZ4_decompress_safe_partial_usingDict(const char* src, char* dst, + int compressedSize, + int targetOutputSize, int maxOutputSize, + const char* dictStart, int dictSize); + +#endif /* LZ4_H_2983827168210 */ + + +/*^************************************* + * !!!!!! STATIC LINKING ONLY !!!!!! + ***************************************/ + +/*-**************************************************************************** + * Experimental section + * + * Symbols declared in this section must be considered unstable. Their + * signatures or semantics may change, or they may be removed altogether in the + * future. They are therefore only safe to depend on when the caller is + * statically linked against the library. + * + * To protect against unsafe usage, not only are the declarations guarded, + * the definitions are hidden by default + * when building LZ4 as a shared/dynamic library. + * + * In order to access these declarations, + * define LZ4_STATIC_LINKING_ONLY in your application + * before including LZ4's headers. + * + * In order to make their implementations accessible dynamically, you must + * define LZ4_PUBLISH_STATIC_FUNCTIONS when building the LZ4 library. + ******************************************************************************/ + +#ifdef LZ4_STATIC_LINKING_ONLY + +#ifndef LZ4_STATIC_3504398509 +#define LZ4_STATIC_3504398509 + +#ifdef LZ4_PUBLISH_STATIC_FUNCTIONS +#define LZ4LIB_STATIC_API LZ4LIB_API +#else +#define LZ4LIB_STATIC_API +#endif + + +/*! LZ4_compress_fast_extState_fastReset() : + * A variant of LZ4_compress_fast_extState(). + * + * Using this variant avoids an expensive initialization step. + * It is only safe to call if the state buffer is known to be correctly initialized already + * (see above comment on LZ4_resetStream_fast() for a definition of "correctly initialized"). + * From a high level, the difference is that + * this function initializes the provided state with a call to something like LZ4_resetStream_fast() + * while LZ4_compress_fast_extState() starts with a call to LZ4_resetStream(). + */ +LZ4LIB_STATIC_API int LZ4_compress_fast_extState_fastReset (void* state, const char* src, char* dst, int srcSize, int dstCapacity, int acceleration); + +/*! LZ4_attach_dictionary() : + * This is an experimental API that allows + * efficient use of a static dictionary many times. + * + * Rather than re-loading the dictionary buffer into a working context before + * each compression, or copying a pre-loaded dictionary's LZ4_stream_t into a + * working LZ4_stream_t, this function introduces a no-copy setup mechanism, + * in which the working stream references the dictionary stream in-place. + * + * Several assumptions are made about the state of the dictionary stream. + * Currently, only streams which have been prepared by LZ4_loadDict() should + * be expected to work. + * + * Alternatively, the provided dictionaryStream may be NULL, + * in which case any existing dictionary stream is unset. + * + * If a dictionary is provided, it replaces any pre-existing stream history. + * The dictionary contents are the only history that can be referenced and + * logically immediately precede the data compressed in the first subsequent + * compression call. + * + * The dictionary will only remain attached to the working stream through the + * first compression call, at the end of which it is cleared. The dictionary + * stream (and source buffer) must remain in-place / accessible / unchanged + * through the completion of the first compression call on the stream. + */ +LZ4LIB_STATIC_API void +LZ4_attach_dictionary(LZ4_stream_t* workingStream, + const LZ4_stream_t* dictionaryStream); + + +/*! In-place compression and decompression + * + * It's possible to have input and output sharing the same buffer, + * for highly constrained memory environments. + * In both cases, it requires input to lay at the end of the buffer, + * and decompression to start at beginning of the buffer. + * Buffer size must feature some margin, hence be larger than final size. + * + * |<------------------------buffer--------------------------------->| + * |<-----------compressed data--------->| + * |<-----------decompressed size------------------>| + * |<----margin---->| + * + * This technique is more useful for decompression, + * since decompressed size is typically larger, + * and margin is short. + * + * In-place decompression will work inside any buffer + * which size is >= LZ4_DECOMPRESS_INPLACE_BUFFER_SIZE(decompressedSize). + * This presumes that decompressedSize > compressedSize. + * Otherwise, it means compression actually expanded data, + * and it would be more efficient to store such data with a flag indicating it's not compressed. + * This can happen when data is not compressible (already compressed, or encrypted). + * + * For in-place compression, margin is larger, as it must be able to cope with both + * history preservation, requiring input data to remain unmodified up to LZ4_DISTANCE_MAX, + * and data expansion, which can happen when input is not compressible. + * As a consequence, buffer size requirements are much higher, + * and memory savings offered by in-place compression are more limited. + * + * There are ways to limit this cost for compression : + * - Reduce history size, by modifying LZ4_DISTANCE_MAX. + * Note that it is a compile-time constant, so all compressions will apply this limit. + * Lower values will reduce compression ratio, except when input_size < LZ4_DISTANCE_MAX, + * so it's a reasonable trick when inputs are known to be small. + * - Require the compressor to deliver a "maximum compressed size". + * This is the `dstCapacity` parameter in `LZ4_compress*()`. + * When this size is < LZ4_COMPRESSBOUND(inputSize), then compression can fail, + * in which case, the return code will be 0 (zero). + * The caller must be ready for these cases to happen, + * and typically design a backup scheme to send data uncompressed. + * The combination of both techniques can significantly reduce + * the amount of margin required for in-place compression. + * + * In-place compression can work in any buffer + * which size is >= (maxCompressedSize) + * with maxCompressedSize == LZ4_COMPRESSBOUND(srcSize) for guaranteed compression success. + * LZ4_COMPRESS_INPLACE_BUFFER_SIZE() depends on both maxCompressedSize and LZ4_DISTANCE_MAX, + * so it's possible to reduce memory requirements by playing with them. + */ + +#define LZ4_DECOMPRESS_INPLACE_MARGIN(compressedSize) (((compressedSize) >> 8) + 32) +#define LZ4_DECOMPRESS_INPLACE_BUFFER_SIZE(decompressedSize) ((decompressedSize) + LZ4_DECOMPRESS_INPLACE_MARGIN(decompressedSize)) /**< note: presumes that compressedSize < decompressedSize. note2: margin is overestimated a bit, since it could use compressedSize instead */ + +#ifndef LZ4_DISTANCE_MAX /* history window size; can be user-defined at compile time */ +# define LZ4_DISTANCE_MAX 65535 /* set to maximum value by default */ +#endif + +#define LZ4_COMPRESS_INPLACE_MARGIN (LZ4_DISTANCE_MAX + 32) /* LZ4_DISTANCE_MAX can be safely replaced by srcSize when it's smaller */ +#define LZ4_COMPRESS_INPLACE_BUFFER_SIZE(maxCompressedSize) ((maxCompressedSize) + LZ4_COMPRESS_INPLACE_MARGIN) /**< maxCompressedSize is generally LZ4_COMPRESSBOUND(inputSize), but can be set to any lower value, with the risk that compression can fail (return code 0(zero)) */ + +#endif /* LZ4_STATIC_3504398509 */ +#endif /* LZ4_STATIC_LINKING_ONLY */ + + + +#ifndef LZ4_H_98237428734687 +#define LZ4_H_98237428734687 + +/*-************************************************************ + * Private Definitions + ************************************************************** + * Do not use these definitions directly. + * They are only exposed to allow static allocation of `LZ4_stream_t` and `LZ4_streamDecode_t`. + * Accessing members will expose user code to API and/or ABI break in future versions of the library. + **************************************************************/ +#define LZ4_HASHLOG (LZ4_MEMORY_USAGE-2) +#define LZ4_HASHTABLESIZE (1 << LZ4_MEMORY_USAGE) +#define LZ4_HASH_SIZE_U32 (1 << LZ4_HASHLOG) /* required as macro for static allocation */ + +#if defined(__cplusplus) || (defined (__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) /* C99 */) +# include + typedef int8_t LZ4_i8; + typedef uint8_t LZ4_byte; + typedef uint16_t LZ4_u16; + typedef uint32_t LZ4_u32; +#else + typedef signed char LZ4_i8; + typedef unsigned char LZ4_byte; + typedef unsigned short LZ4_u16; + typedef unsigned int LZ4_u32; +#endif + +/*! LZ4_stream_t : + * Never ever use below internal definitions directly ! + * These definitions are not API/ABI safe, and may change in future versions. + * If you need static allocation, declare or allocate an LZ4_stream_t object. +**/ + +typedef struct LZ4_stream_t_internal LZ4_stream_t_internal; +struct LZ4_stream_t_internal { + LZ4_u32 hashTable[LZ4_HASH_SIZE_U32]; + const LZ4_byte* dictionary; + const LZ4_stream_t_internal* dictCtx; + LZ4_u32 currentOffset; + LZ4_u32 tableType; + LZ4_u32 dictSize; + /* Implicit padding to ensure structure is aligned */ +}; + +#define LZ4_STREAM_MINSIZE ((1UL << LZ4_MEMORY_USAGE) + 32) /* static size, for inter-version compatibility */ +union LZ4_stream_u { + char minStateSize[LZ4_STREAM_MINSIZE]; + LZ4_stream_t_internal internal_donotuse; +}; /* previously typedef'd to LZ4_stream_t */ + + +/*! LZ4_initStream() : v1.9.0+ + * An LZ4_stream_t structure must be initialized at least once. + * This is automatically done when invoking LZ4_createStream(), + * but it's not when the structure is simply declared on stack (for example). + * + * Use LZ4_initStream() to properly initialize a newly declared LZ4_stream_t. + * It can also initialize any arbitrary buffer of sufficient size, + * and will @return a pointer of proper type upon initialization. + * + * Note : initialization fails if size and alignment conditions are not respected. + * In which case, the function will @return NULL. + * Note2: An LZ4_stream_t structure guarantees correct alignment and size. + * Note3: Before v1.9.0, use LZ4_resetStream() instead +**/ +LZ4LIB_API LZ4_stream_t* LZ4_initStream (void* buffer, size_t size); + + +/*! LZ4_streamDecode_t : + * Never ever use below internal definitions directly ! + * These definitions are not API/ABI safe, and may change in future versions. + * If you need static allocation, declare or allocate an LZ4_streamDecode_t object. +**/ +typedef struct { + const LZ4_byte* externalDict; + const LZ4_byte* prefixEnd; + size_t extDictSize; + size_t prefixSize; +} LZ4_streamDecode_t_internal; + +#define LZ4_STREAMDECODE_MINSIZE 32 +union LZ4_streamDecode_u { + char minStateSize[LZ4_STREAMDECODE_MINSIZE]; + LZ4_streamDecode_t_internal internal_donotuse; +} ; /* previously typedef'd to LZ4_streamDecode_t */ + + + +/*-************************************ +* Obsolete Functions +**************************************/ + +/*! Deprecation warnings + * + * Deprecated functions make the compiler generate a warning when invoked. + * This is meant to invite users to update their source code. + * Should deprecation warnings be a problem, it is generally possible to disable them, + * typically with -Wno-deprecated-declarations for gcc + * or _CRT_SECURE_NO_WARNINGS in Visual. + * + * Another method is to define LZ4_DISABLE_DEPRECATE_WARNINGS + * before including the header file. + */ +#ifdef LZ4_DISABLE_DEPRECATE_WARNINGS +# define LZ4_DEPRECATED(message) /* disable deprecation warnings */ +#else +# if defined (__cplusplus) && (__cplusplus >= 201402) /* C++14 or greater */ +# define LZ4_DEPRECATED(message) [[deprecated(message)]] +# elif defined(_MSC_VER) +# define LZ4_DEPRECATED(message) __declspec(deprecated(message)) +# elif defined(__clang__) || (defined(__GNUC__) && (__GNUC__ * 10 + __GNUC_MINOR__ >= 45)) +# define LZ4_DEPRECATED(message) __attribute__((deprecated(message))) +# elif defined(__GNUC__) && (__GNUC__ * 10 + __GNUC_MINOR__ >= 31) +# define LZ4_DEPRECATED(message) __attribute__((deprecated)) +# else +# pragma message("WARNING: LZ4_DEPRECATED needs custom implementation for this compiler") +# define LZ4_DEPRECATED(message) /* disabled */ +# endif +#endif /* LZ4_DISABLE_DEPRECATE_WARNINGS */ + +/*! Obsolete compression functions (since v1.7.3) */ +LZ4_DEPRECATED("use LZ4_compress_default() instead") LZ4LIB_API int LZ4_compress (const char* src, char* dest, int srcSize); +LZ4_DEPRECATED("use LZ4_compress_default() instead") LZ4LIB_API int LZ4_compress_limitedOutput (const char* src, char* dest, int srcSize, int maxOutputSize); +LZ4_DEPRECATED("use LZ4_compress_fast_extState() instead") LZ4LIB_API int LZ4_compress_withState (void* state, const char* source, char* dest, int inputSize); +LZ4_DEPRECATED("use LZ4_compress_fast_extState() instead") LZ4LIB_API int LZ4_compress_limitedOutput_withState (void* state, const char* source, char* dest, int inputSize, int maxOutputSize); +LZ4_DEPRECATED("use LZ4_compress_fast_continue() instead") LZ4LIB_API int LZ4_compress_continue (LZ4_stream_t* LZ4_streamPtr, const char* source, char* dest, int inputSize); +LZ4_DEPRECATED("use LZ4_compress_fast_continue() instead") LZ4LIB_API int LZ4_compress_limitedOutput_continue (LZ4_stream_t* LZ4_streamPtr, const char* source, char* dest, int inputSize, int maxOutputSize); + +/*! Obsolete decompression functions (since v1.8.0) */ +LZ4_DEPRECATED("use LZ4_decompress_fast() instead") LZ4LIB_API int LZ4_uncompress (const char* source, char* dest, int outputSize); +LZ4_DEPRECATED("use LZ4_decompress_safe() instead") LZ4LIB_API int LZ4_uncompress_unknownOutputSize (const char* source, char* dest, int isize, int maxOutputSize); + +/* Obsolete streaming functions (since v1.7.0) + * degraded functionality; do not use! + * + * In order to perform streaming compression, these functions depended on data + * that is no longer tracked in the state. They have been preserved as well as + * possible: using them will still produce a correct output. However, they don't + * actually retain any history between compression calls. The compression ratio + * achieved will therefore be no better than compressing each chunk + * independently. + */ +LZ4_DEPRECATED("Use LZ4_createStream() instead") LZ4LIB_API void* LZ4_create (char* inputBuffer); +LZ4_DEPRECATED("Use LZ4_createStream() instead") LZ4LIB_API int LZ4_sizeofStreamState(void); +LZ4_DEPRECATED("Use LZ4_resetStream() instead") LZ4LIB_API int LZ4_resetStreamState(void* state, char* inputBuffer); +LZ4_DEPRECATED("Use LZ4_saveDict() instead") LZ4LIB_API char* LZ4_slideInputBuffer (void* state); + +/*! Obsolete streaming decoding functions (since v1.7.0) */ +LZ4_DEPRECATED("use LZ4_decompress_safe_usingDict() instead") LZ4LIB_API int LZ4_decompress_safe_withPrefix64k (const char* src, char* dst, int compressedSize, int maxDstSize); +LZ4_DEPRECATED("use LZ4_decompress_fast_usingDict() instead") LZ4LIB_API int LZ4_decompress_fast_withPrefix64k (const char* src, char* dst, int originalSize); + +/*! Obsolete LZ4_decompress_fast variants (since v1.9.0) : + * These functions used to be faster than LZ4_decompress_safe(), + * but this is no longer the case. They are now slower. + * This is because LZ4_decompress_fast() doesn't know the input size, + * and therefore must progress more cautiously into the input buffer to not read beyond the end of block. + * On top of that `LZ4_decompress_fast()` is not protected vs malformed or malicious inputs, making it a security liability. + * As a consequence, LZ4_decompress_fast() is strongly discouraged, and deprecated. + * + * The last remaining LZ4_decompress_fast() specificity is that + * it can decompress a block without knowing its compressed size. + * Such functionality can be achieved in a more secure manner + * by employing LZ4_decompress_safe_partial(). + * + * Parameters: + * originalSize : is the uncompressed size to regenerate. + * `dst` must be already allocated, its size must be >= 'originalSize' bytes. + * @return : number of bytes read from source buffer (== compressed size). + * The function expects to finish at block's end exactly. + * If the source stream is detected malformed, the function stops decoding and returns a negative result. + * note : LZ4_decompress_fast*() requires originalSize. Thanks to this information, it never writes past the output buffer. + * However, since it doesn't know its 'src' size, it may read an unknown amount of input, past input buffer bounds. + * Also, since match offsets are not validated, match reads from 'src' may underflow too. + * These issues never happen if input (compressed) data is correct. + * But they may happen if input data is invalid (error or intentional tampering). + * As a consequence, use these functions in trusted environments with trusted data **only**. + */ +LZ4_DEPRECATED("This function is deprecated and unsafe. Consider using LZ4_decompress_safe() instead") +LZ4LIB_API int LZ4_decompress_fast (const char* src, char* dst, int originalSize); +LZ4_DEPRECATED("This function is deprecated and unsafe. Consider using LZ4_decompress_safe_continue() instead") +LZ4LIB_API int LZ4_decompress_fast_continue (LZ4_streamDecode_t* LZ4_streamDecode, const char* src, char* dst, int originalSize); +LZ4_DEPRECATED("This function is deprecated and unsafe. Consider using LZ4_decompress_safe_usingDict() instead") +LZ4LIB_API int LZ4_decompress_fast_usingDict (const char* src, char* dst, int originalSize, const char* dictStart, int dictSize); + +/*! LZ4_resetStream() : + * An LZ4_stream_t structure must be initialized at least once. + * This is done with LZ4_initStream(), or LZ4_resetStream(). + * Consider switching to LZ4_initStream(), + * invoking LZ4_resetStream() will trigger deprecation warnings in the future. + */ +LZ4LIB_API void LZ4_resetStream (LZ4_stream_t* streamPtr); + + +#endif /* LZ4_H_98237428734687 */ + + +#if defined (__cplusplus) +} +#endif diff --git a/miniconda3/pkgs/lz4-c-1.9.4-h6a678d5_1/include/lz4frame.h b/miniconda3/pkgs/lz4-c-1.9.4-h6a678d5_1/include/lz4frame.h new file mode 100644 index 0000000000000000000000000000000000000000..1bdf6c4fcba57536ff3c97936e1217e5aebb6797 --- /dev/null +++ b/miniconda3/pkgs/lz4-c-1.9.4-h6a678d5_1/include/lz4frame.h @@ -0,0 +1,692 @@ +/* + LZ4F - LZ4-Frame library + Header File + Copyright (C) 2011-2020, Yann Collet. + BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php) + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following disclaimer + in the documentation and/or other materials provided with the + distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + You can contact the author at : + - LZ4 source repository : https://github.com/lz4/lz4 + - LZ4 public forum : https://groups.google.com/forum/#!forum/lz4c +*/ + +/* LZ4F is a stand-alone API able to create and decode LZ4 frames + * conformant with specification v1.6.1 in doc/lz4_Frame_format.md . + * Generated frames are compatible with `lz4` CLI. + * + * LZ4F also offers streaming capabilities. + * + * lz4.h is not required when using lz4frame.h, + * except to extract common constants such as LZ4_VERSION_NUMBER. + * */ + +#ifndef LZ4F_H_09782039843 +#define LZ4F_H_09782039843 + +#if defined (__cplusplus) +extern "C" { +#endif + +/* --- Dependency --- */ +#include /* size_t */ + + +/** + * Introduction + * + * lz4frame.h implements LZ4 frame specification: see doc/lz4_Frame_format.md . + * LZ4 Frames are compatible with `lz4` CLI, + * and designed to be interoperable with any system. +**/ + +/*-*************************************************************** + * Compiler specifics + *****************************************************************/ +/* LZ4_DLL_EXPORT : + * Enable exporting of functions when building a Windows DLL + * LZ4FLIB_VISIBILITY : + * Control library symbols visibility. + */ +#ifndef LZ4FLIB_VISIBILITY +# if defined(__GNUC__) && (__GNUC__ >= 4) +# define LZ4FLIB_VISIBILITY __attribute__ ((visibility ("default"))) +# else +# define LZ4FLIB_VISIBILITY +# endif +#endif +#if defined(LZ4_DLL_EXPORT) && (LZ4_DLL_EXPORT==1) +# define LZ4FLIB_API __declspec(dllexport) LZ4FLIB_VISIBILITY +#elif defined(LZ4_DLL_IMPORT) && (LZ4_DLL_IMPORT==1) +# define LZ4FLIB_API __declspec(dllimport) LZ4FLIB_VISIBILITY +#else +# define LZ4FLIB_API LZ4FLIB_VISIBILITY +#endif + +#ifdef LZ4F_DISABLE_DEPRECATE_WARNINGS +# define LZ4F_DEPRECATE(x) x +#else +# if defined(_MSC_VER) +# define LZ4F_DEPRECATE(x) x /* __declspec(deprecated) x - only works with C++ */ +# elif defined(__clang__) || (defined(__GNUC__) && (__GNUC__ >= 6)) +# define LZ4F_DEPRECATE(x) x __attribute__((deprecated)) +# else +# define LZ4F_DEPRECATE(x) x /* no deprecation warning for this compiler */ +# endif +#endif + + +/*-************************************ + * Error management + **************************************/ +typedef size_t LZ4F_errorCode_t; + +LZ4FLIB_API unsigned LZ4F_isError(LZ4F_errorCode_t code); /**< tells when a function result is an error code */ +LZ4FLIB_API const char* LZ4F_getErrorName(LZ4F_errorCode_t code); /**< return error code string; for debugging */ + + +/*-************************************ + * Frame compression types + ************************************* */ +/* #define LZ4F_ENABLE_OBSOLETE_ENUMS // uncomment to enable obsolete enums */ +#ifdef LZ4F_ENABLE_OBSOLETE_ENUMS +# define LZ4F_OBSOLETE_ENUM(x) , LZ4F_DEPRECATE(x) = LZ4F_##x +#else +# define LZ4F_OBSOLETE_ENUM(x) +#endif + +/* The larger the block size, the (slightly) better the compression ratio, + * though there are diminishing returns. + * Larger blocks also increase memory usage on both compression and decompression sides. + */ +typedef enum { + LZ4F_default=0, + LZ4F_max64KB=4, + LZ4F_max256KB=5, + LZ4F_max1MB=6, + LZ4F_max4MB=7 + LZ4F_OBSOLETE_ENUM(max64KB) + LZ4F_OBSOLETE_ENUM(max256KB) + LZ4F_OBSOLETE_ENUM(max1MB) + LZ4F_OBSOLETE_ENUM(max4MB) +} LZ4F_blockSizeID_t; + +/* Linked blocks sharply reduce inefficiencies when using small blocks, + * they compress better. + * However, some LZ4 decoders are only compatible with independent blocks */ +typedef enum { + LZ4F_blockLinked=0, + LZ4F_blockIndependent + LZ4F_OBSOLETE_ENUM(blockLinked) + LZ4F_OBSOLETE_ENUM(blockIndependent) +} LZ4F_blockMode_t; + +typedef enum { + LZ4F_noContentChecksum=0, + LZ4F_contentChecksumEnabled + LZ4F_OBSOLETE_ENUM(noContentChecksum) + LZ4F_OBSOLETE_ENUM(contentChecksumEnabled) +} LZ4F_contentChecksum_t; + +typedef enum { + LZ4F_noBlockChecksum=0, + LZ4F_blockChecksumEnabled +} LZ4F_blockChecksum_t; + +typedef enum { + LZ4F_frame=0, + LZ4F_skippableFrame + LZ4F_OBSOLETE_ENUM(skippableFrame) +} LZ4F_frameType_t; + +#ifdef LZ4F_ENABLE_OBSOLETE_ENUMS +typedef LZ4F_blockSizeID_t blockSizeID_t; +typedef LZ4F_blockMode_t blockMode_t; +typedef LZ4F_frameType_t frameType_t; +typedef LZ4F_contentChecksum_t contentChecksum_t; +#endif + +/*! LZ4F_frameInfo_t : + * makes it possible to set or read frame parameters. + * Structure must be first init to 0, using memset() or LZ4F_INIT_FRAMEINFO, + * setting all parameters to default. + * It's then possible to update selectively some parameters */ +typedef struct { + LZ4F_blockSizeID_t blockSizeID; /* max64KB, max256KB, max1MB, max4MB; 0 == default */ + LZ4F_blockMode_t blockMode; /* LZ4F_blockLinked, LZ4F_blockIndependent; 0 == default */ + LZ4F_contentChecksum_t contentChecksumFlag; /* 1: frame terminated with 32-bit checksum of decompressed data; 0: disabled (default) */ + LZ4F_frameType_t frameType; /* read-only field : LZ4F_frame or LZ4F_skippableFrame */ + unsigned long long contentSize; /* Size of uncompressed content ; 0 == unknown */ + unsigned dictID; /* Dictionary ID, sent by compressor to help decoder select correct dictionary; 0 == no dictID provided */ + LZ4F_blockChecksum_t blockChecksumFlag; /* 1: each block followed by a checksum of block's compressed data; 0: disabled (default) */ +} LZ4F_frameInfo_t; + +#define LZ4F_INIT_FRAMEINFO { LZ4F_default, LZ4F_blockLinked, LZ4F_noContentChecksum, LZ4F_frame, 0ULL, 0U, LZ4F_noBlockChecksum } /* v1.8.3+ */ + +/*! LZ4F_preferences_t : + * makes it possible to supply advanced compression instructions to streaming interface. + * Structure must be first init to 0, using memset() or LZ4F_INIT_PREFERENCES, + * setting all parameters to default. + * All reserved fields must be set to zero. */ +typedef struct { + LZ4F_frameInfo_t frameInfo; + int compressionLevel; /* 0: default (fast mode); values > LZ4HC_CLEVEL_MAX count as LZ4HC_CLEVEL_MAX; values < 0 trigger "fast acceleration" */ + unsigned autoFlush; /* 1: always flush; reduces usage of internal buffers */ + unsigned favorDecSpeed; /* 1: parser favors decompression speed vs compression ratio. Only works for high compression modes (>= LZ4HC_CLEVEL_OPT_MIN) */ /* v1.8.2+ */ + unsigned reserved[3]; /* must be zero for forward compatibility */ +} LZ4F_preferences_t; + +#define LZ4F_INIT_PREFERENCES { LZ4F_INIT_FRAMEINFO, 0, 0u, 0u, { 0u, 0u, 0u } } /* v1.8.3+ */ + + +/*-********************************* +* Simple compression function +***********************************/ + +LZ4FLIB_API int LZ4F_compressionLevel_max(void); /* v1.8.0+ */ + +/*! LZ4F_compressFrameBound() : + * Returns the maximum possible compressed size with LZ4F_compressFrame() given srcSize and preferences. + * `preferencesPtr` is optional. It can be replaced by NULL, in which case, the function will assume default preferences. + * Note : this result is only usable with LZ4F_compressFrame(). + * It may also be relevant to LZ4F_compressUpdate() _only if_ no flush() operation is ever performed. + */ +LZ4FLIB_API size_t LZ4F_compressFrameBound(size_t srcSize, const LZ4F_preferences_t* preferencesPtr); + +/*! LZ4F_compressFrame() : + * Compress an entire srcBuffer into a valid LZ4 frame. + * dstCapacity MUST be >= LZ4F_compressFrameBound(srcSize, preferencesPtr). + * The LZ4F_preferences_t structure is optional : you can provide NULL as argument. All preferences will be set to default. + * @return : number of bytes written into dstBuffer. + * or an error code if it fails (can be tested using LZ4F_isError()) + */ +LZ4FLIB_API size_t LZ4F_compressFrame(void* dstBuffer, size_t dstCapacity, + const void* srcBuffer, size_t srcSize, + const LZ4F_preferences_t* preferencesPtr); + + +/*-*********************************** +* Advanced compression functions +*************************************/ +typedef struct LZ4F_cctx_s LZ4F_cctx; /* incomplete type */ +typedef LZ4F_cctx* LZ4F_compressionContext_t; /* for compatibility with older APIs, prefer using LZ4F_cctx */ + +typedef struct { + unsigned stableSrc; /* 1 == src content will remain present on future calls to LZ4F_compress(); skip copying src content within tmp buffer */ + unsigned reserved[3]; +} LZ4F_compressOptions_t; + +/*--- Resource Management ---*/ + +#define LZ4F_VERSION 100 /* This number can be used to check for an incompatible API breaking change */ +LZ4FLIB_API unsigned LZ4F_getVersion(void); + +/*! LZ4F_createCompressionContext() : + * The first thing to do is to create a compressionContext object, + * which will keep track of operation state during streaming compression. + * This is achieved using LZ4F_createCompressionContext(), which takes as argument a version, + * and a pointer to LZ4F_cctx*, to write the resulting pointer into. + * @version provided MUST be LZ4F_VERSION. It is intended to track potential version mismatch, notably when using DLL. + * The function provides a pointer to a fully allocated LZ4F_cctx object. + * @cctxPtr MUST be != NULL. + * If @return != zero, context creation failed. + * A created compression context can be employed multiple times for consecutive streaming operations. + * Once all streaming compression jobs are completed, + * the state object can be released using LZ4F_freeCompressionContext(). + * Note1 : LZ4F_freeCompressionContext() is always successful. Its return value can be ignored. + * Note2 : LZ4F_freeCompressionContext() works fine with NULL input pointers (do nothing). +**/ +LZ4FLIB_API LZ4F_errorCode_t LZ4F_createCompressionContext(LZ4F_cctx** cctxPtr, unsigned version); +LZ4FLIB_API LZ4F_errorCode_t LZ4F_freeCompressionContext(LZ4F_cctx* cctx); + + +/*---- Compression ----*/ + +#define LZ4F_HEADER_SIZE_MIN 7 /* LZ4 Frame header size can vary, depending on selected parameters */ +#define LZ4F_HEADER_SIZE_MAX 19 + +/* Size in bytes of a block header in little-endian format. Highest bit indicates if block data is uncompressed */ +#define LZ4F_BLOCK_HEADER_SIZE 4 + +/* Size in bytes of a block checksum footer in little-endian format. */ +#define LZ4F_BLOCK_CHECKSUM_SIZE 4 + +/* Size in bytes of the content checksum. */ +#define LZ4F_CONTENT_CHECKSUM_SIZE 4 + +/*! LZ4F_compressBegin() : + * will write the frame header into dstBuffer. + * dstCapacity must be >= LZ4F_HEADER_SIZE_MAX bytes. + * `prefsPtr` is optional : you can provide NULL as argument, all preferences will then be set to default. + * @return : number of bytes written into dstBuffer for the header + * or an error code (which can be tested using LZ4F_isError()) + */ +LZ4FLIB_API size_t LZ4F_compressBegin(LZ4F_cctx* cctx, + void* dstBuffer, size_t dstCapacity, + const LZ4F_preferences_t* prefsPtr); + +/*! LZ4F_compressBound() : + * Provides minimum dstCapacity required to guarantee success of + * LZ4F_compressUpdate(), given a srcSize and preferences, for a worst case scenario. + * When srcSize==0, LZ4F_compressBound() provides an upper bound for LZ4F_flush() and LZ4F_compressEnd() instead. + * Note that the result is only valid for a single invocation of LZ4F_compressUpdate(). + * When invoking LZ4F_compressUpdate() multiple times, + * if the output buffer is gradually filled up instead of emptied and re-used from its start, + * one must check if there is enough remaining capacity before each invocation, using LZ4F_compressBound(). + * @return is always the same for a srcSize and prefsPtr. + * prefsPtr is optional : when NULL is provided, preferences will be set to cover worst case scenario. + * tech details : + * @return if automatic flushing is not enabled, includes the possibility that internal buffer might already be filled by up to (blockSize-1) bytes. + * It also includes frame footer (ending + checksum), since it might be generated by LZ4F_compressEnd(). + * @return doesn't include frame header, as it was already generated by LZ4F_compressBegin(). + */ +LZ4FLIB_API size_t LZ4F_compressBound(size_t srcSize, const LZ4F_preferences_t* prefsPtr); + +/*! LZ4F_compressUpdate() : + * LZ4F_compressUpdate() can be called repetitively to compress as much data as necessary. + * Important rule: dstCapacity MUST be large enough to ensure operation success even in worst case situations. + * This value is provided by LZ4F_compressBound(). + * If this condition is not respected, LZ4F_compress() will fail (result is an errorCode). + * After an error, the state is left in a UB state, and must be re-initialized or freed. + * If previously an uncompressed block was written, buffered data is flushed + * before appending compressed data is continued. + * `cOptPtr` is optional : NULL can be provided, in which case all options are set to default. + * @return : number of bytes written into `dstBuffer` (it can be zero, meaning input data was just buffered). + * or an error code if it fails (which can be tested using LZ4F_isError()) + */ +LZ4FLIB_API size_t LZ4F_compressUpdate(LZ4F_cctx* cctx, + void* dstBuffer, size_t dstCapacity, + const void* srcBuffer, size_t srcSize, + const LZ4F_compressOptions_t* cOptPtr); + +/*! LZ4F_flush() : + * When data must be generated and sent immediately, without waiting for a block to be completely filled, + * it's possible to call LZ4_flush(). It will immediately compress any data buffered within cctx. + * `dstCapacity` must be large enough to ensure the operation will be successful. + * `cOptPtr` is optional : it's possible to provide NULL, all options will be set to default. + * @return : nb of bytes written into dstBuffer (can be zero, when there is no data stored within cctx) + * or an error code if it fails (which can be tested using LZ4F_isError()) + * Note : LZ4F_flush() is guaranteed to be successful when dstCapacity >= LZ4F_compressBound(0, prefsPtr). + */ +LZ4FLIB_API size_t LZ4F_flush(LZ4F_cctx* cctx, + void* dstBuffer, size_t dstCapacity, + const LZ4F_compressOptions_t* cOptPtr); + +/*! LZ4F_compressEnd() : + * To properly finish an LZ4 frame, invoke LZ4F_compressEnd(). + * It will flush whatever data remained within `cctx` (like LZ4_flush()) + * and properly finalize the frame, with an endMark and a checksum. + * `cOptPtr` is optional : NULL can be provided, in which case all options will be set to default. + * @return : nb of bytes written into dstBuffer, necessarily >= 4 (endMark), + * or an error code if it fails (which can be tested using LZ4F_isError()) + * Note : LZ4F_compressEnd() is guaranteed to be successful when dstCapacity >= LZ4F_compressBound(0, prefsPtr). + * A successful call to LZ4F_compressEnd() makes `cctx` available again for another compression task. + */ +LZ4FLIB_API size_t LZ4F_compressEnd(LZ4F_cctx* cctx, + void* dstBuffer, size_t dstCapacity, + const LZ4F_compressOptions_t* cOptPtr); + + +/*-********************************* +* Decompression functions +***********************************/ +typedef struct LZ4F_dctx_s LZ4F_dctx; /* incomplete type */ +typedef LZ4F_dctx* LZ4F_decompressionContext_t; /* compatibility with previous API versions */ + +typedef struct { + unsigned stableDst; /* pledges that last 64KB decompressed data will remain available unmodified between invocations. + * This optimization skips storage operations in tmp buffers. */ + unsigned skipChecksums; /* disable checksum calculation and verification, even when one is present in frame, to save CPU time. + * Setting this option to 1 once disables all checksums for the rest of the frame. */ + unsigned reserved1; /* must be set to zero for forward compatibility */ + unsigned reserved0; /* idem */ +} LZ4F_decompressOptions_t; + + +/* Resource management */ + +/*! LZ4F_createDecompressionContext() : + * Create an LZ4F_dctx object, to track all decompression operations. + * @version provided MUST be LZ4F_VERSION. + * @dctxPtr MUST be valid. + * The function fills @dctxPtr with the value of a pointer to an allocated and initialized LZ4F_dctx object. + * The @return is an errorCode, which can be tested using LZ4F_isError(). + * dctx memory can be released using LZ4F_freeDecompressionContext(); + * Result of LZ4F_freeDecompressionContext() indicates current state of decompressionContext when being released. + * That is, it should be == 0 if decompression has been completed fully and correctly. + */ +LZ4FLIB_API LZ4F_errorCode_t LZ4F_createDecompressionContext(LZ4F_dctx** dctxPtr, unsigned version); +LZ4FLIB_API LZ4F_errorCode_t LZ4F_freeDecompressionContext(LZ4F_dctx* dctx); + + +/*-*********************************** +* Streaming decompression functions +*************************************/ + +#define LZ4F_MAGICNUMBER 0x184D2204U +#define LZ4F_MAGIC_SKIPPABLE_START 0x184D2A50U +#define LZ4F_MIN_SIZE_TO_KNOW_HEADER_LENGTH 5 + +/*! LZ4F_headerSize() : v1.9.0+ + * Provide the header size of a frame starting at `src`. + * `srcSize` must be >= LZ4F_MIN_SIZE_TO_KNOW_HEADER_LENGTH, + * which is enough to decode the header length. + * @return : size of frame header + * or an error code, which can be tested using LZ4F_isError() + * note : Frame header size is variable, but is guaranteed to be + * >= LZ4F_HEADER_SIZE_MIN bytes, and <= LZ4F_HEADER_SIZE_MAX bytes. + */ +LZ4FLIB_API size_t LZ4F_headerSize(const void* src, size_t srcSize); + +/*! LZ4F_getFrameInfo() : + * This function extracts frame parameters (max blockSize, dictID, etc.). + * Its usage is optional: user can also invoke LZ4F_decompress() directly. + * + * Extracted information will fill an existing LZ4F_frameInfo_t structure. + * This can be useful for allocation and dictionary identification purposes. + * + * LZ4F_getFrameInfo() can work in the following situations : + * + * 1) At the beginning of a new frame, before any invocation of LZ4F_decompress(). + * It will decode header from `srcBuffer`, + * consuming the header and starting the decoding process. + * + * Input size must be large enough to contain the full frame header. + * Frame header size can be known beforehand by LZ4F_headerSize(). + * Frame header size is variable, but is guaranteed to be >= LZ4F_HEADER_SIZE_MIN bytes, + * and not more than <= LZ4F_HEADER_SIZE_MAX bytes. + * Hence, blindly providing LZ4F_HEADER_SIZE_MAX bytes or more will always work. + * It's allowed to provide more input data than the header size, + * LZ4F_getFrameInfo() will only consume the header. + * + * If input size is not large enough, + * aka if it's smaller than header size, + * function will fail and return an error code. + * + * 2) After decoding has been started, + * it's possible to invoke LZ4F_getFrameInfo() anytime + * to extract already decoded frame parameters stored within dctx. + * + * Note that, if decoding has barely started, + * and not yet read enough information to decode the header, + * LZ4F_getFrameInfo() will fail. + * + * The number of bytes consumed from srcBuffer will be updated in *srcSizePtr (necessarily <= original value). + * LZ4F_getFrameInfo() only consumes bytes when decoding has not yet started, + * and when decoding the header has been successful. + * Decompression must then resume from (srcBuffer + *srcSizePtr). + * + * @return : a hint about how many srcSize bytes LZ4F_decompress() expects for next call, + * or an error code which can be tested using LZ4F_isError(). + * note 1 : in case of error, dctx is not modified. Decoding operation can resume from beginning safely. + * note 2 : frame parameters are *copied into* an already allocated LZ4F_frameInfo_t structure. + */ +LZ4FLIB_API size_t +LZ4F_getFrameInfo(LZ4F_dctx* dctx, + LZ4F_frameInfo_t* frameInfoPtr, + const void* srcBuffer, size_t* srcSizePtr); + +/*! LZ4F_decompress() : + * Call this function repetitively to regenerate data compressed in `srcBuffer`. + * + * The function requires a valid dctx state. + * It will read up to *srcSizePtr bytes from srcBuffer, + * and decompress data into dstBuffer, of capacity *dstSizePtr. + * + * The nb of bytes consumed from srcBuffer will be written into *srcSizePtr (necessarily <= original value). + * The nb of bytes decompressed into dstBuffer will be written into *dstSizePtr (necessarily <= original value). + * + * The function does not necessarily read all input bytes, so always check value in *srcSizePtr. + * Unconsumed source data must be presented again in subsequent invocations. + * + * `dstBuffer` can freely change between each consecutive function invocation. + * `dstBuffer` content will be overwritten. + * + * @return : an hint of how many `srcSize` bytes LZ4F_decompress() expects for next call. + * Schematically, it's the size of the current (or remaining) compressed block + header of next block. + * Respecting the hint provides some small speed benefit, because it skips intermediate buffers. + * This is just a hint though, it's always possible to provide any srcSize. + * + * When a frame is fully decoded, @return will be 0 (no more data expected). + * When provided with more bytes than necessary to decode a frame, + * LZ4F_decompress() will stop reading exactly at end of current frame, and @return 0. + * + * If decompression failed, @return is an error code, which can be tested using LZ4F_isError(). + * After a decompression error, the `dctx` context is not resumable. + * Use LZ4F_resetDecompressionContext() to return to clean state. + * + * After a frame is fully decoded, dctx can be used again to decompress another frame. + */ +LZ4FLIB_API size_t +LZ4F_decompress(LZ4F_dctx* dctx, + void* dstBuffer, size_t* dstSizePtr, + const void* srcBuffer, size_t* srcSizePtr, + const LZ4F_decompressOptions_t* dOptPtr); + + +/*! LZ4F_resetDecompressionContext() : added in v1.8.0 + * In case of an error, the context is left in "undefined" state. + * In which case, it's necessary to reset it, before re-using it. + * This method can also be used to abruptly stop any unfinished decompression, + * and start a new one using same context resources. */ +LZ4FLIB_API void LZ4F_resetDecompressionContext(LZ4F_dctx* dctx); /* always successful */ + + + +#if defined (__cplusplus) +} +#endif + +#endif /* LZ4F_H_09782039843 */ + +#if defined(LZ4F_STATIC_LINKING_ONLY) && !defined(LZ4F_H_STATIC_09782039843) +#define LZ4F_H_STATIC_09782039843 + +#if defined (__cplusplus) +extern "C" { +#endif + +/* These declarations are not stable and may change in the future. + * They are therefore only safe to depend on + * when the caller is statically linked against the library. + * To access their declarations, define LZ4F_STATIC_LINKING_ONLY. + * + * By default, these symbols aren't published into shared/dynamic libraries. + * You can override this behavior and force them to be published + * by defining LZ4F_PUBLISH_STATIC_FUNCTIONS. + * Use at your own risk. + */ +#ifdef LZ4F_PUBLISH_STATIC_FUNCTIONS +# define LZ4FLIB_STATIC_API LZ4FLIB_API +#else +# define LZ4FLIB_STATIC_API +#endif + + +/* --- Error List --- */ +#define LZ4F_LIST_ERRORS(ITEM) \ + ITEM(OK_NoError) \ + ITEM(ERROR_GENERIC) \ + ITEM(ERROR_maxBlockSize_invalid) \ + ITEM(ERROR_blockMode_invalid) \ + ITEM(ERROR_contentChecksumFlag_invalid) \ + ITEM(ERROR_compressionLevel_invalid) \ + ITEM(ERROR_headerVersion_wrong) \ + ITEM(ERROR_blockChecksum_invalid) \ + ITEM(ERROR_reservedFlag_set) \ + ITEM(ERROR_allocation_failed) \ + ITEM(ERROR_srcSize_tooLarge) \ + ITEM(ERROR_dstMaxSize_tooSmall) \ + ITEM(ERROR_frameHeader_incomplete) \ + ITEM(ERROR_frameType_unknown) \ + ITEM(ERROR_frameSize_wrong) \ + ITEM(ERROR_srcPtr_wrong) \ + ITEM(ERROR_decompressionFailed) \ + ITEM(ERROR_headerChecksum_invalid) \ + ITEM(ERROR_contentChecksum_invalid) \ + ITEM(ERROR_frameDecoding_alreadyStarted) \ + ITEM(ERROR_compressionState_uninitialized) \ + ITEM(ERROR_parameter_null) \ + ITEM(ERROR_maxCode) + +#define LZ4F_GENERATE_ENUM(ENUM) LZ4F_##ENUM, + +/* enum list is exposed, to handle specific errors */ +typedef enum { LZ4F_LIST_ERRORS(LZ4F_GENERATE_ENUM) + _LZ4F_dummy_error_enum_for_c89_never_used } LZ4F_errorCodes; + +LZ4FLIB_STATIC_API LZ4F_errorCodes LZ4F_getErrorCode(size_t functionResult); + + +/*! LZ4F_getBlockSize() : + * Return, in scalar format (size_t), + * the maximum block size associated with blockSizeID. +**/ +LZ4FLIB_STATIC_API size_t LZ4F_getBlockSize(LZ4F_blockSizeID_t blockSizeID); + +/*! LZ4F_uncompressedUpdate() : + * LZ4F_uncompressedUpdate() can be called repetitively to add as much data uncompressed data as necessary. + * Important rule: dstCapacity MUST be large enough to store the entire source buffer as + * no compression is done for this operation + * If this condition is not respected, LZ4F_uncompressedUpdate() will fail (result is an errorCode). + * After an error, the state is left in a UB state, and must be re-initialized or freed. + * If previously a compressed block was written, buffered data is flushed + * before appending uncompressed data is continued. + * This is only supported when LZ4F_blockIndependent is used + * `cOptPtr` is optional : NULL can be provided, in which case all options are set to default. + * @return : number of bytes written into `dstBuffer` (it can be zero, meaning input data was just buffered). + * or an error code if it fails (which can be tested using LZ4F_isError()) + */ +LZ4FLIB_STATIC_API size_t +LZ4F_uncompressedUpdate(LZ4F_cctx* cctx, + void* dstBuffer, size_t dstCapacity, + const void* srcBuffer, size_t srcSize, + const LZ4F_compressOptions_t* cOptPtr); + +/********************************** + * Bulk processing dictionary API + *********************************/ + +/* A Dictionary is useful for the compression of small messages (KB range). + * It dramatically improves compression efficiency. + * + * LZ4 can ingest any input as dictionary, though only the last 64 KB are useful. + * Best results are generally achieved by using Zstandard's Dictionary Builder + * to generate a high-quality dictionary from a set of samples. + * + * Loading a dictionary has a cost, since it involves construction of tables. + * The Bulk processing dictionary API makes it possible to share this cost + * over an arbitrary number of compression jobs, even concurrently, + * markedly improving compression latency for these cases. + * + * The same dictionary will have to be used on the decompression side + * for decoding to be successful. + * To help identify the correct dictionary at decoding stage, + * the frame header allows optional embedding of a dictID field. + */ +typedef struct LZ4F_CDict_s LZ4F_CDict; + +/*! LZ4_createCDict() : + * When compressing multiple messages / blocks using the same dictionary, it's recommended to load it just once. + * LZ4_createCDict() will create a digested dictionary, ready to start future compression operations without startup delay. + * LZ4_CDict can be created once and shared by multiple threads concurrently, since its usage is read-only. + * `dictBuffer` can be released after LZ4_CDict creation, since its content is copied within CDict */ +LZ4FLIB_STATIC_API LZ4F_CDict* LZ4F_createCDict(const void* dictBuffer, size_t dictSize); +LZ4FLIB_STATIC_API void LZ4F_freeCDict(LZ4F_CDict* CDict); + + +/*! LZ4_compressFrame_usingCDict() : + * Compress an entire srcBuffer into a valid LZ4 frame using a digested Dictionary. + * cctx must point to a context created by LZ4F_createCompressionContext(). + * If cdict==NULL, compress without a dictionary. + * dstBuffer MUST be >= LZ4F_compressFrameBound(srcSize, preferencesPtr). + * If this condition is not respected, function will fail (@return an errorCode). + * The LZ4F_preferences_t structure is optional : you may provide NULL as argument, + * but it's not recommended, as it's the only way to provide dictID in the frame header. + * @return : number of bytes written into dstBuffer. + * or an error code if it fails (can be tested using LZ4F_isError()) */ +LZ4FLIB_STATIC_API size_t +LZ4F_compressFrame_usingCDict(LZ4F_cctx* cctx, + void* dst, size_t dstCapacity, + const void* src, size_t srcSize, + const LZ4F_CDict* cdict, + const LZ4F_preferences_t* preferencesPtr); + + +/*! LZ4F_compressBegin_usingCDict() : + * Inits streaming dictionary compression, and writes the frame header into dstBuffer. + * dstCapacity must be >= LZ4F_HEADER_SIZE_MAX bytes. + * `prefsPtr` is optional : you may provide NULL as argument, + * however, it's the only way to provide dictID in the frame header. + * @return : number of bytes written into dstBuffer for the header, + * or an error code (which can be tested using LZ4F_isError()) */ +LZ4FLIB_STATIC_API size_t +LZ4F_compressBegin_usingCDict(LZ4F_cctx* cctx, + void* dstBuffer, size_t dstCapacity, + const LZ4F_CDict* cdict, + const LZ4F_preferences_t* prefsPtr); + + +/*! LZ4F_decompress_usingDict() : + * Same as LZ4F_decompress(), using a predefined dictionary. + * Dictionary is used "in place", without any preprocessing. +** It must remain accessible throughout the entire frame decoding. */ +LZ4FLIB_STATIC_API size_t +LZ4F_decompress_usingDict(LZ4F_dctx* dctxPtr, + void* dstBuffer, size_t* dstSizePtr, + const void* srcBuffer, size_t* srcSizePtr, + const void* dict, size_t dictSize, + const LZ4F_decompressOptions_t* decompressOptionsPtr); + + +/*! Custom memory allocation : + * These prototypes make it possible to pass custom allocation/free functions. + * LZ4F_customMem is provided at state creation time, using LZ4F_create*_advanced() listed below. + * All allocation/free operations will be completed using these custom variants instead of regular ones. + */ +typedef void* (*LZ4F_AllocFunction) (void* opaqueState, size_t size); +typedef void* (*LZ4F_CallocFunction) (void* opaqueState, size_t size); +typedef void (*LZ4F_FreeFunction) (void* opaqueState, void* address); +typedef struct { + LZ4F_AllocFunction customAlloc; + LZ4F_CallocFunction customCalloc; /* optional; when not defined, uses customAlloc + memset */ + LZ4F_FreeFunction customFree; + void* opaqueState; +} LZ4F_CustomMem; +static +#ifdef __GNUC__ +__attribute__((__unused__)) +#endif +LZ4F_CustomMem const LZ4F_defaultCMem = { NULL, NULL, NULL, NULL }; /**< this constant defers to stdlib's functions */ + +LZ4FLIB_STATIC_API LZ4F_cctx* LZ4F_createCompressionContext_advanced(LZ4F_CustomMem customMem, unsigned version); +LZ4FLIB_STATIC_API LZ4F_dctx* LZ4F_createDecompressionContext_advanced(LZ4F_CustomMem customMem, unsigned version); +LZ4FLIB_STATIC_API LZ4F_CDict* LZ4F_createCDict_advanced(LZ4F_CustomMem customMem, const void* dictBuffer, size_t dictSize); + + +#if defined (__cplusplus) +} +#endif + +#endif /* defined(LZ4F_STATIC_LINKING_ONLY) && !defined(LZ4F_H_STATIC_09782039843) */ diff --git a/miniconda3/pkgs/lz4-c-1.9.4-h6a678d5_1/include/lz4frame_static.h b/miniconda3/pkgs/lz4-c-1.9.4-h6a678d5_1/include/lz4frame_static.h new file mode 100644 index 0000000000000000000000000000000000000000..2b44a63155be37062247bd0f4ccfc6205bdf91bd --- /dev/null +++ b/miniconda3/pkgs/lz4-c-1.9.4-h6a678d5_1/include/lz4frame_static.h @@ -0,0 +1,47 @@ +/* + LZ4 auto-framing library + Header File for static linking only + Copyright (C) 2011-2020, Yann Collet. + + BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php) + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following disclaimer + in the documentation and/or other materials provided with the + distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + You can contact the author at : + - LZ4 source repository : https://github.com/lz4/lz4 + - LZ4 public forum : https://groups.google.com/forum/#!forum/lz4c +*/ + +#ifndef LZ4FRAME_STATIC_H_0398209384 +#define LZ4FRAME_STATIC_H_0398209384 + +/* The declarations that formerly were made here have been merged into + * lz4frame.h, protected by the LZ4F_STATIC_LINKING_ONLY macro. Going forward, + * it is recommended to simply include that header directly. + */ + +#define LZ4F_STATIC_LINKING_ONLY +#include "lz4frame.h" + +#endif /* LZ4FRAME_STATIC_H_0398209384 */ diff --git a/miniconda3/pkgs/lz4-c-1.9.4-h6a678d5_1/include/lz4hc.h b/miniconda3/pkgs/lz4-c-1.9.4-h6a678d5_1/include/lz4hc.h new file mode 100644 index 0000000000000000000000000000000000000000..e937acfefd857f1b2be158cd3a5ba3a85a389f07 --- /dev/null +++ b/miniconda3/pkgs/lz4-c-1.9.4-h6a678d5_1/include/lz4hc.h @@ -0,0 +1,413 @@ +/* + LZ4 HC - High Compression Mode of LZ4 + Header File + Copyright (C) 2011-2020, Yann Collet. + BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php) + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following disclaimer + in the documentation and/or other materials provided with the + distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + You can contact the author at : + - LZ4 source repository : https://github.com/lz4/lz4 + - LZ4 public forum : https://groups.google.com/forum/#!forum/lz4c +*/ +#ifndef LZ4_HC_H_19834876238432 +#define LZ4_HC_H_19834876238432 + +#if defined (__cplusplus) +extern "C" { +#endif + +/* --- Dependency --- */ +/* note : lz4hc requires lz4.h/lz4.c for compilation */ +#include "lz4.h" /* stddef, LZ4LIB_API, LZ4_DEPRECATED */ + + +/* --- Useful constants --- */ +#define LZ4HC_CLEVEL_MIN 3 +#define LZ4HC_CLEVEL_DEFAULT 9 +#define LZ4HC_CLEVEL_OPT_MIN 10 +#define LZ4HC_CLEVEL_MAX 12 + + +/*-************************************ + * Block Compression + **************************************/ +/*! LZ4_compress_HC() : + * Compress data from `src` into `dst`, using the powerful but slower "HC" algorithm. + * `dst` must be already allocated. + * Compression is guaranteed to succeed if `dstCapacity >= LZ4_compressBound(srcSize)` (see "lz4.h") + * Max supported `srcSize` value is LZ4_MAX_INPUT_SIZE (see "lz4.h") + * `compressionLevel` : any value between 1 and LZ4HC_CLEVEL_MAX will work. + * Values > LZ4HC_CLEVEL_MAX behave the same as LZ4HC_CLEVEL_MAX. + * @return : the number of bytes written into 'dst' + * or 0 if compression fails. + */ +LZ4LIB_API int LZ4_compress_HC (const char* src, char* dst, int srcSize, int dstCapacity, int compressionLevel); + + +/* Note : + * Decompression functions are provided within "lz4.h" (BSD license) + */ + + +/*! LZ4_compress_HC_extStateHC() : + * Same as LZ4_compress_HC(), but using an externally allocated memory segment for `state`. + * `state` size is provided by LZ4_sizeofStateHC(). + * Memory segment must be aligned on 8-bytes boundaries (which a normal malloc() should do properly). + */ +LZ4LIB_API int LZ4_sizeofStateHC(void); +LZ4LIB_API int LZ4_compress_HC_extStateHC(void* stateHC, const char* src, char* dst, int srcSize, int maxDstSize, int compressionLevel); + + +/*! LZ4_compress_HC_destSize() : v1.9.0+ + * Will compress as much data as possible from `src` + * to fit into `targetDstSize` budget. + * Result is provided in 2 parts : + * @return : the number of bytes written into 'dst' (necessarily <= targetDstSize) + * or 0 if compression fails. + * `srcSizePtr` : on success, *srcSizePtr is updated to indicate how much bytes were read from `src` + */ +LZ4LIB_API int LZ4_compress_HC_destSize(void* stateHC, + const char* src, char* dst, + int* srcSizePtr, int targetDstSize, + int compressionLevel); + + +/*-************************************ + * Streaming Compression + * Bufferless synchronous API + **************************************/ + typedef union LZ4_streamHC_u LZ4_streamHC_t; /* incomplete type (defined later) */ + +/*! LZ4_createStreamHC() and LZ4_freeStreamHC() : + * These functions create and release memory for LZ4 HC streaming state. + * Newly created states are automatically initialized. + * A same state can be used multiple times consecutively, + * starting with LZ4_resetStreamHC_fast() to start a new stream of blocks. + */ +LZ4LIB_API LZ4_streamHC_t* LZ4_createStreamHC(void); +LZ4LIB_API int LZ4_freeStreamHC (LZ4_streamHC_t* streamHCPtr); + +/* + These functions compress data in successive blocks of any size, + using previous blocks as dictionary, to improve compression ratio. + One key assumption is that previous blocks (up to 64 KB) remain read-accessible while compressing next blocks. + There is an exception for ring buffers, which can be smaller than 64 KB. + Ring-buffer scenario is automatically detected and handled within LZ4_compress_HC_continue(). + + Before starting compression, state must be allocated and properly initialized. + LZ4_createStreamHC() does both, though compression level is set to LZ4HC_CLEVEL_DEFAULT. + + Selecting the compression level can be done with LZ4_resetStreamHC_fast() (starts a new stream) + or LZ4_setCompressionLevel() (anytime, between blocks in the same stream) (experimental). + LZ4_resetStreamHC_fast() only works on states which have been properly initialized at least once, + which is automatically the case when state is created using LZ4_createStreamHC(). + + After reset, a first "fictional block" can be designated as initial dictionary, + using LZ4_loadDictHC() (Optional). + + Invoke LZ4_compress_HC_continue() to compress each successive block. + The number of blocks is unlimited. + Previous input blocks, including initial dictionary when present, + must remain accessible and unmodified during compression. + + It's allowed to update compression level anytime between blocks, + using LZ4_setCompressionLevel() (experimental). + + 'dst' buffer should be sized to handle worst case scenarios + (see LZ4_compressBound(), it ensures compression success). + In case of failure, the API does not guarantee recovery, + so the state _must_ be reset. + To ensure compression success + whenever `dst` buffer size cannot be made >= LZ4_compressBound(), + consider using LZ4_compress_HC_continue_destSize(). + + Whenever previous input blocks can't be preserved unmodified in-place during compression of next blocks, + it's possible to copy the last blocks into a more stable memory space, using LZ4_saveDictHC(). + Return value of LZ4_saveDictHC() is the size of dictionary effectively saved into 'safeBuffer' (<= 64 KB) + + After completing a streaming compression, + it's possible to start a new stream of blocks, using the same LZ4_streamHC_t state, + just by resetting it, using LZ4_resetStreamHC_fast(). +*/ + +LZ4LIB_API void LZ4_resetStreamHC_fast(LZ4_streamHC_t* streamHCPtr, int compressionLevel); /* v1.9.0+ */ +LZ4LIB_API int LZ4_loadDictHC (LZ4_streamHC_t* streamHCPtr, const char* dictionary, int dictSize); + +LZ4LIB_API int LZ4_compress_HC_continue (LZ4_streamHC_t* streamHCPtr, + const char* src, char* dst, + int srcSize, int maxDstSize); + +/*! LZ4_compress_HC_continue_destSize() : v1.9.0+ + * Similar to LZ4_compress_HC_continue(), + * but will read as much data as possible from `src` + * to fit into `targetDstSize` budget. + * Result is provided into 2 parts : + * @return : the number of bytes written into 'dst' (necessarily <= targetDstSize) + * or 0 if compression fails. + * `srcSizePtr` : on success, *srcSizePtr will be updated to indicate how much bytes were read from `src`. + * Note that this function may not consume the entire input. + */ +LZ4LIB_API int LZ4_compress_HC_continue_destSize(LZ4_streamHC_t* LZ4_streamHCPtr, + const char* src, char* dst, + int* srcSizePtr, int targetDstSize); + +LZ4LIB_API int LZ4_saveDictHC (LZ4_streamHC_t* streamHCPtr, char* safeBuffer, int maxDictSize); + + + +/*^********************************************** + * !!!!!! STATIC LINKING ONLY !!!!!! + ***********************************************/ + +/*-****************************************************************** + * PRIVATE DEFINITIONS : + * Do not use these definitions directly. + * They are merely exposed to allow static allocation of `LZ4_streamHC_t`. + * Declare an `LZ4_streamHC_t` directly, rather than any type below. + * Even then, only do so in the context of static linking, as definitions may change between versions. + ********************************************************************/ + +#define LZ4HC_DICTIONARY_LOGSIZE 16 +#define LZ4HC_MAXD (1<= LZ4HC_CLEVEL_OPT_MIN. + */ +LZ4LIB_STATIC_API void LZ4_favorDecompressionSpeed( + LZ4_streamHC_t* LZ4_streamHCPtr, int favor); + +/*! LZ4_resetStreamHC_fast() : v1.9.0+ + * When an LZ4_streamHC_t is known to be in a internally coherent state, + * it can often be prepared for a new compression with almost no work, only + * sometimes falling back to the full, expensive reset that is always required + * when the stream is in an indeterminate state (i.e., the reset performed by + * LZ4_resetStreamHC()). + * + * LZ4_streamHCs are guaranteed to be in a valid state when: + * - returned from LZ4_createStreamHC() + * - reset by LZ4_resetStreamHC() + * - memset(stream, 0, sizeof(LZ4_streamHC_t)) + * - the stream was in a valid state and was reset by LZ4_resetStreamHC_fast() + * - the stream was in a valid state and was then used in any compression call + * that returned success + * - the stream was in an indeterminate state and was used in a compression + * call that fully reset the state (LZ4_compress_HC_extStateHC()) and that + * returned success + * + * Note: + * A stream that was last used in a compression call that returned an error + * may be passed to this function. However, it will be fully reset, which will + * clear any existing history and settings from the context. + */ +LZ4LIB_STATIC_API void LZ4_resetStreamHC_fast( + LZ4_streamHC_t* LZ4_streamHCPtr, int compressionLevel); + +/*! LZ4_compress_HC_extStateHC_fastReset() : + * A variant of LZ4_compress_HC_extStateHC(). + * + * Using this variant avoids an expensive initialization step. It is only safe + * to call if the state buffer is known to be correctly initialized already + * (see above comment on LZ4_resetStreamHC_fast() for a definition of + * "correctly initialized"). From a high level, the difference is that this + * function initializes the provided state with a call to + * LZ4_resetStreamHC_fast() while LZ4_compress_HC_extStateHC() starts with a + * call to LZ4_resetStreamHC(). + */ +LZ4LIB_STATIC_API int LZ4_compress_HC_extStateHC_fastReset ( + void* state, + const char* src, char* dst, + int srcSize, int dstCapacity, + int compressionLevel); + +/*! LZ4_attach_HC_dictionary() : + * This is an experimental API that allows for the efficient use of a + * static dictionary many times. + * + * Rather than re-loading the dictionary buffer into a working context before + * each compression, or copying a pre-loaded dictionary's LZ4_streamHC_t into a + * working LZ4_streamHC_t, this function introduces a no-copy setup mechanism, + * in which the working stream references the dictionary stream in-place. + * + * Several assumptions are made about the state of the dictionary stream. + * Currently, only streams which have been prepared by LZ4_loadDictHC() should + * be expected to work. + * + * Alternatively, the provided dictionary stream pointer may be NULL, in which + * case any existing dictionary stream is unset. + * + * A dictionary should only be attached to a stream without any history (i.e., + * a stream that has just been reset). + * + * The dictionary will remain attached to the working stream only for the + * current stream session. Calls to LZ4_resetStreamHC(_fast) will remove the + * dictionary context association from the working stream. The dictionary + * stream (and source buffer) must remain in-place / accessible / unchanged + * through the lifetime of the stream session. + */ +LZ4LIB_STATIC_API void LZ4_attach_HC_dictionary( + LZ4_streamHC_t *working_stream, + const LZ4_streamHC_t *dictionary_stream); + +#if defined (__cplusplus) +} +#endif + +#endif /* LZ4_HC_SLO_098092834 */ +#endif /* LZ4_HC_STATIC_LINKING_ONLY */ diff --git a/miniconda3/pkgs/lz4-c-1.9.4-h6a678d5_1/info/about.json b/miniconda3/pkgs/lz4-c-1.9.4-h6a678d5_1/info/about.json new file mode 100644 index 0000000000000000000000000000000000000000..c020ef7444c238b0038f598cecfbddf9b2ed43d5 --- /dev/null +++ b/miniconda3/pkgs/lz4-c-1.9.4-h6a678d5_1/info/about.json @@ -0,0 +1,134 @@ +{ + "channels": [ + "https://repo.anaconda.com/pkgs/main" + ], + "conda_build_version": "24.1.2", + "conda_version": "24.1.2", + "description": "LZ4 is lossless compression algorithm, providing compression speed at 400\nMB/s per core (0.16 Bytes/cycle). It features an extremely fast decoder,\nwith speed in multiple GB/s per core (0.71 Bytes/cycle). A high compression\nderivative, called LZ4_HC, is available, trading customizable CPU time for\ncompression ratio. LZ4 library is provided as open source software using a\nBSD license.\n", + "dev_url": "https://github.com/lz4/lz4", + "doc_url": "https://github.com/lz4/lz4/blob/dev/README.md", + "env_vars": { + "CIO_TEST": "" + }, + "extra": { + "copy_test_source_files": true, + "final": true, + "flow_run_id": "68ea6e7a-ea57-408c-a240-edc6a1162c60", + "recipe-maintainers": [ + "mingwandroid", + "rmax", + "wesm", + "xhochy" + ], + "remote_url": "git@github.com:AnacondaRecipes/lz4-c-feedstock.git", + "sha": "45537caf4f5443bf05cd61697e4cc857567e2aee" + }, + "home": "https://lz4.github.io/lz4/", + "identifiers": [], + "keywords": [], + "license": "BSD-2-Clause", + "license_family": "BSD", + "license_file": "lib/LICENSE", + "root_pkgs": [ + "_libgcc_mutex 0.1 main", + "_openmp_mutex 5.1 1_gnu", + "archspec 0.2.1 pyhd3eb1b0_0", + "boltons 23.0.0 py39h06a4308_0", + "brotli-python 1.0.9 py39h6a678d5_7", + "bzip2 1.0.8 h7b6447c_0", + "c-ares 1.19.1 h5eee18b_0", + "charset-normalizer 2.0.4 pyhd3eb1b0_0", + "conda-content-trust 0.2.0 py39h06a4308_0", + "conda-package-handling 2.2.0 py39h06a4308_0", + "conda-package-streaming 0.9.0 py39h06a4308_0", + "fmt 9.1.0 hdb19cb5_0", + "icu 73.1 h6a678d5_0", + "idna 3.4 py39h06a4308_0", + "jsonpatch 1.32 pyhd3eb1b0_0", + "jsonpointer 2.1 pyhd3eb1b0_0", + "krb5 1.20.1 h143b758_1", + "ld_impl_linux-64 2.38 h1181459_1", + "libarchive 3.6.2 h6ac8c49_2", + "libev 4.33 h7f8727e_1", + "libffi 3.4.4 h6a678d5_0", + "libgcc-ng 11.2.0 h1234567_1", + "libgomp 11.2.0 h1234567_1", + "libnghttp2 1.57.0 h2d74bed_0", + "libsolv 0.7.24 he621ea3_0", + "libssh2 1.10.0 hdbd6064_2", + "libstdcxx-ng 11.2.0 h1234567_1", + "libxml2 2.10.4 hf1b16e4_1", + "lz4-c 1.9.4 h6a678d5_0", + "ncurses 6.4 h6a678d5_0", + "packaging 23.1 py39h06a4308_0", + "pcre2 10.42 hebb0a14_0", + "pluggy 1.0.0 py39h06a4308_1", + "pybind11-abi 4 hd3eb1b0_1", + "pycosat 0.6.6 py39h5eee18b_0", + "pycparser 2.21 pyhd3eb1b0_0", + "pysocks 1.7.1 py39h06a4308_0", + "python 3.9.18 h955ad1f_0", + "readline 8.2 h5eee18b_0", + "reproc 14.2.4 h295c915_1", + "reproc-cpp 14.2.4 h295c915_1", + "ruamel.yaml 0.17.21 py39h5eee18b_0", + "ruamel.yaml.clib 0.2.6 py39h5eee18b_1", + "sqlite 3.41.2 h5eee18b_0", + "tk 8.6.12 h1ccaba5_0", + "tqdm 4.65.0 py39hb070fc8_0", + "wheel 0.41.2 py39h06a4308_0", + "yaml-cpp 0.8.0 h6a678d5_0", + "zlib 1.2.13 h5eee18b_0", + "zstandard 0.19.0 py39h5eee18b_0", + "zstd 1.5.5 hc292b87_0", + "attrs 23.1.0 py39h06a4308_0", + "beautifulsoup4 4.12.2 py39h06a4308_0", + "ca-certificates 2023.12.12 h06a4308_0", + "certifi 2024.2.2 py39h06a4308_0", + "cffi 1.16.0 py39h5eee18b_0", + "chardet 4.0.0 py39h06a4308_1003", + "click 8.1.7 py39h06a4308_0", + "conda 24.1.2 py39h06a4308_0", + "conda-build 24.1.2 py39h06a4308_0", + "conda-index 0.4.0 pyhd3eb1b0_0", + "conda-libmamba-solver 24.1.0 pyhd3eb1b0_0", + "cryptography 42.0.2 py39hdda0065_0", + "distro 1.8.0 py39h06a4308_0", + "filelock 3.13.1 py39h06a4308_0", + "jinja2 3.1.3 py39h06a4308_0", + "jsonschema 4.19.2 py39h06a4308_0", + "jsonschema-specifications 2023.7.1 py39h06a4308_0", + "libcurl 8.5.0 h251f7ec_0", + "libedit 3.1.20230828 h5eee18b_0", + "liblief 0.12.3 h6a678d5_0", + "libmamba 1.5.6 haf1ee3a_0", + "libmambapy 1.5.6 py39h2dafd23_0", + "markupsafe 2.1.3 py39h5eee18b_0", + "menuinst 2.0.2 py39h06a4308_0", + "more-itertools 10.1.0 py39h06a4308_0", + "openssl 3.0.13 h7f8727e_0", + "patch 2.7.6 h7b6447c_1001", + "patchelf 0.17.2 h6a678d5_0", + "pip 23.3.1 py39h06a4308_0", + "pkginfo 1.9.6 py39h06a4308_0", + "platformdirs 3.10.0 py39h06a4308_0", + "psutil 5.9.0 py39h5eee18b_0", + "py-lief 0.12.3 py39h6a678d5_0", + "pyopenssl 24.0.0 py39h06a4308_0", + "python-libarchive-c 2.9 pyhd3eb1b0_1", + "pytz 2023.3.post1 py39h06a4308_0", + "pyyaml 6.0.1 py39h5eee18b_0", + "referencing 0.30.2 py39h06a4308_0", + "requests 2.31.0 py39h06a4308_1", + "rpds-py 0.10.6 py39hb02cf49_0", + "setuptools 68.2.2 py39h06a4308_0", + "soupsieve 2.5 py39h06a4308_0", + "tomli 2.0.1 py39h06a4308_0", + "tzdata 2023d h04d1e81_0", + "urllib3 2.1.0 py39h06a4308_1", + "xz 5.4.5 h5eee18b_0", + "yaml 0.2.5 h7b6447c_0" + ], + "summary": "Extremely Fast Compression algorithm", + "tags": [] +} \ No newline at end of file diff --git a/miniconda3/pkgs/lz4-c-1.9.4-h6a678d5_1/info/files b/miniconda3/pkgs/lz4-c-1.9.4-h6a678d5_1/info/files new file mode 100644 index 0000000000000000000000000000000000000000..68316b0f658fe41dab21d9e0fe19d2e476c11641 --- /dev/null +++ b/miniconda3/pkgs/lz4-c-1.9.4-h6a678d5_1/info/files @@ -0,0 +1,16 @@ +bin/lz4 +bin/lz4c +bin/lz4cat +bin/unlz4 +include/lz4.h +include/lz4frame.h +include/lz4frame_static.h +include/lz4hc.h +lib/liblz4.so +lib/liblz4.so.1 +lib/liblz4.so.1.9.4 +lib/pkgconfig/liblz4.pc +share/man/man1/lz4.1 +share/man/man1/lz4c.1 +share/man/man1/lz4cat.1 +share/man/man1/unlz4.1 diff --git a/miniconda3/pkgs/lz4-c-1.9.4-h6a678d5_1/info/git b/miniconda3/pkgs/lz4-c-1.9.4-h6a678d5_1/info/git new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/miniconda3/pkgs/lz4-c-1.9.4-h6a678d5_1/info/has_prefix b/miniconda3/pkgs/lz4-c-1.9.4-h6a678d5_1/info/has_prefix new file mode 100644 index 0000000000000000000000000000000000000000..78c0b8e13414b2d456fecf786df6cae7651a020b --- /dev/null +++ b/miniconda3/pkgs/lz4-c-1.9.4-h6a678d5_1/info/has_prefix @@ -0,0 +1 @@ +/croot/lz4-c_1714510556686/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_p text lib/pkgconfig/liblz4.pc diff --git a/miniconda3/pkgs/lz4-c-1.9.4-h6a678d5_1/info/hash_input.json b/miniconda3/pkgs/lz4-c-1.9.4-h6a678d5_1/info/hash_input.json new file mode 100644 index 0000000000000000000000000000000000000000..5887c3b470ef961f7712ce3075d95223bc92887d --- /dev/null +++ b/miniconda3/pkgs/lz4-c-1.9.4-h6a678d5_1/info/hash_input.json @@ -0,0 +1,8 @@ +{ + "c_compiler_version": "11.2.0", + "cxx_compiler": "gxx", + "target_platform": "linux-64", + "cxx_compiler_version": "11.2.0", + "c_compiler": "gcc", + "channel_targets": "defaults" +} \ No newline at end of file diff --git a/miniconda3/pkgs/lz4-c-1.9.4-h6a678d5_1/info/index.json b/miniconda3/pkgs/lz4-c-1.9.4-h6a678d5_1/info/index.json new file mode 100644 index 0000000000000000000000000000000000000000..08da996cb35ba3ec7d4315e4f0556ff658da9eb8 --- /dev/null +++ b/miniconda3/pkgs/lz4-c-1.9.4-h6a678d5_1/info/index.json @@ -0,0 +1,16 @@ +{ + "arch": "x86_64", + "build": "h6a678d5_1", + "build_number": 1, + "depends": [ + "libgcc-ng >=11.2.0", + "libstdcxx-ng >=11.2.0" + ], + "license": "BSD-2-Clause", + "license_family": "BSD", + "name": "lz4-c", + "platform": "linux", + "subdir": "linux-64", + "timestamp": 1714510587156, + "version": "1.9.4" +} \ No newline at end of file diff --git a/miniconda3/pkgs/lz4-c-1.9.4-h6a678d5_1/info/licenses/lib/LICENSE b/miniconda3/pkgs/lz4-c-1.9.4-h6a678d5_1/info/licenses/lib/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..488491695a6b6984aa3a49a8392b192ed2bcac1d --- /dev/null +++ b/miniconda3/pkgs/lz4-c-1.9.4-h6a678d5_1/info/licenses/lib/LICENSE @@ -0,0 +1,24 @@ +LZ4 Library +Copyright (c) 2011-2020, Yann Collet +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, this + list of conditions and the following disclaimer in the documentation and/or + other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/miniconda3/pkgs/lz4-c-1.9.4-h6a678d5_1/info/paths.json b/miniconda3/pkgs/lz4-c-1.9.4-h6a678d5_1/info/paths.json new file mode 100644 index 0000000000000000000000000000000000000000..b90767c83416d7a2d9a60d93e23642e7d9b92db4 --- /dev/null +++ b/miniconda3/pkgs/lz4-c-1.9.4-h6a678d5_1/info/paths.json @@ -0,0 +1,103 @@ +{ + "paths": [ + { + "_path": "bin/lz4", + "path_type": "hardlink", + "sha256": "d57f6ab43a02dde14d6c92c9ac9491481edc473af496b602824c221ef4c1d7a1", + "size_in_bytes": 215016 + }, + { + "_path": "bin/lz4c", + "path_type": "softlink", + "sha256": "d57f6ab43a02dde14d6c92c9ac9491481edc473af496b602824c221ef4c1d7a1", + "size_in_bytes": 215016 + }, + { + "_path": "bin/lz4cat", + "path_type": "softlink", + "sha256": "d57f6ab43a02dde14d6c92c9ac9491481edc473af496b602824c221ef4c1d7a1", + "size_in_bytes": 215016 + }, + { + "_path": "bin/unlz4", + "path_type": "softlink", + "sha256": "d57f6ab43a02dde14d6c92c9ac9491481edc473af496b602824c221ef4c1d7a1", + "size_in_bytes": 215016 + }, + { + "_path": "include/lz4.h", + "path_type": "hardlink", + "sha256": "c1614ecf7ada7b0be1acb560d4239595f96fbb7aa6a79a7c40cb358753830be6", + "size_in_bytes": 43263 + }, + { + "_path": "include/lz4frame.h", + "path_type": "hardlink", + "sha256": "47501e4925d60c0f87c7bfc68c8b9e0e4d942eea786e35d2c5bfbf5e9deab561", + "size_in_bytes": 32749 + }, + { + "_path": "include/lz4frame_static.h", + "path_type": "hardlink", + "sha256": "31ab72a6e97e4fa0bedd4420d24a3f1f8024cbfa1d8ffad88c87cbb4e04f769d", + "size_in_bytes": 2044 + }, + { + "_path": "include/lz4hc.h", + "path_type": "hardlink", + "sha256": "6bc1efeb79571807da2ca084809de1760e0cd87064e40eccf9624d95088dce7d", + "size_in_bytes": 20179 + }, + { + "_path": "lib/liblz4.so", + "path_type": "softlink", + "sha256": "289251345257286b3993a0840c0de0b592de78b8a22ab00b14f89ea3ee45e1d9", + "size_in_bytes": 181888 + }, + { + "_path": "lib/liblz4.so.1", + "path_type": "softlink", + "sha256": "289251345257286b3993a0840c0de0b592de78b8a22ab00b14f89ea3ee45e1d9", + "size_in_bytes": 181888 + }, + { + "_path": "lib/liblz4.so.1.9.4", + "path_type": "hardlink", + "sha256": "289251345257286b3993a0840c0de0b592de78b8a22ab00b14f89ea3ee45e1d9", + "size_in_bytes": 181888 + }, + { + "_path": "lib/pkgconfig/liblz4.pc", + "file_mode": "text", + "path_type": "hardlink", + "prefix_placeholder": "/croot/lz4-c_1714510556686/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_p", + "sha256": "d38cd99a75a077ab3a655f28db056093a0f195eb46beef1ea3f81484583e60cd", + "size_in_bytes": 640 + }, + { + "_path": "share/man/man1/lz4.1", + "path_type": "hardlink", + "sha256": "fe2f1418e45f8044d53d67022d205c79bee8e6f72958fb40633b6167289dd909", + "size_in_bytes": 9262 + }, + { + "_path": "share/man/man1/lz4c.1", + "path_type": "softlink", + "sha256": "fe2f1418e45f8044d53d67022d205c79bee8e6f72958fb40633b6167289dd909", + "size_in_bytes": 9262 + }, + { + "_path": "share/man/man1/lz4cat.1", + "path_type": "softlink", + "sha256": "fe2f1418e45f8044d53d67022d205c79bee8e6f72958fb40633b6167289dd909", + "size_in_bytes": 9262 + }, + { + "_path": "share/man/man1/unlz4.1", + "path_type": "softlink", + "sha256": "fe2f1418e45f8044d53d67022d205c79bee8e6f72958fb40633b6167289dd909", + "size_in_bytes": 9262 + } + ], + "paths_version": 1 +} \ No newline at end of file diff --git a/miniconda3/pkgs/lz4-c-1.9.4-h6a678d5_1/info/recipe/bld.bat b/miniconda3/pkgs/lz4-c-1.9.4-h6a678d5_1/info/recipe/bld.bat new file mode 100644 index 0000000000000000000000000000000000000000..78eaa5d6df0905017640f9cd62f2d8c1fb2d7e39 --- /dev/null +++ b/miniconda3/pkgs/lz4-c-1.9.4-h6a678d5_1/info/recipe/bld.bat @@ -0,0 +1,63 @@ +:: This rougly follow what projects' appveyor file does. + +:: Build +if "%ARCH%"=="32" ( + set PLATFORM=Win32 +) else ( + set PLATFORM=x64 +) +set CONFIGURATION=Release +set VSPROJ_DIR=%SRC_DIR%\build\VS2017 +set BUILD_DIR=%VSPROJ_DIR%\bin\%PLATFORM%_%CONFIGURATION% + +msbuild.exe ^ + -m ^ + -p:Configuration=%CONFIGURATION% ^ + -p:Platform=%PLATFORM% ^ + -p:PlatformToolset=v141 ^ + -p:WindowsTargetPlatformVersion=10.0.17763.0 ^ + -t:Build ^ + %VSPROJ_DIR%\lz4.sln +if errorlevel 1 exit 1 + +:: Test. +cd %BUILD_DIR% +if errorlevel 1 exit 1 +lz4 -i1b lz4.exe +if errorlevel 1 exit 1 +lz4 -i1b5 lz4.exe +if errorlevel 1 exit 1 +lz4 -i1b10 lz4.exe +if errorlevel 1 exit 1 +lz4 -i1b15 lz4.exe +if errorlevel 1 exit 1 + +:: This is a shorter version of `make lz4-test-basic`. +datagen -g0 | lz4 -v | lz4 -t +if errorlevel 1 exit 1 +datagen -g16KB | lz4 -9 | lz4 -t +if errorlevel 1 exit 1 +datagen | lz4 | lz4 -t +if errorlevel 1 exit 1 +datagen -g6M -P99 | lz4 -9BD | lz4 -t +if errorlevel 1 exit 1 +datagen -g17M | lz4 -9v | lz4 -qt +if errorlevel 1 exit 1 +datagen -g33M | lz4 --no-frame-crc | lz4 -t +if errorlevel 1 exit 1 +datagen -g256MB | lz4 -vqB4D | lz4 -t +if errorlevel 1 exit 1 + +:: Install. +COPY %SRC_DIR%\lib\lz4.h %LIBRARY_INC% +if errorlevel 1 exit 1 +COPY %SRC_DIR%\lib\lz4hc.h %LIBRARY_INC% +if errorlevel 1 exit 1 +COPY %SRC_DIR%\lib\lz4frame.h %LIBRARY_INC% +if errorlevel 1 exit 1 +COPY %BUILD_DIR%\liblz4.dll %LIBRARY_BIN% +if errorlevel 1 exit 1 +COPY %BUILD_DIR%\liblz4.lib %LIBRARY_LIB% +if errorlevel 1 exit 1 +COPY %BUILD_DIR%\lz4.exe %LIBRARY_BIN% +if errorlevel 1 exit 1 diff --git a/miniconda3/pkgs/lz4-c-1.9.4-h6a678d5_1/info/recipe/bld_static.bat b/miniconda3/pkgs/lz4-c-1.9.4-h6a678d5_1/info/recipe/bld_static.bat new file mode 100644 index 0000000000000000000000000000000000000000..ed67a1a0244d6840555c37a612c2f9a71608f8a9 --- /dev/null +++ b/miniconda3/pkgs/lz4-c-1.9.4-h6a678d5_1/info/recipe/bld_static.bat @@ -0,0 +1,13 @@ +:: Build +if "%ARCH%"=="32" ( + set PLATFORM=Win32 +) else ( + set PLATFORM=x64 +) +set CONFIGURATION=Release +set VSPROJ_DIR=%SRC_DIR%\build\VS2017 +set BUILD_DIR=%VSPROJ_DIR%\bin\%PLATFORM%_%CONFIGURATION% + +COPY %BUILD_DIR%\liblz4_static.lib %LIBRARY_LIB% +if errorlevel 1 exit 1 + diff --git a/miniconda3/pkgs/lz4-c-1.9.4-h6a678d5_1/info/recipe/build.sh b/miniconda3/pkgs/lz4-c-1.9.4-h6a678d5_1/info/recipe/build.sh new file mode 100644 index 0000000000000000000000000000000000000000..9594b016c1428e67a7b8cd473d3fceb0e9019309 --- /dev/null +++ b/miniconda3/pkgs/lz4-c-1.9.4-h6a678d5_1/info/recipe/build.sh @@ -0,0 +1,33 @@ +#!/bin/bash +set -ex + +export CFLAGS="${CFLAGS} -O3 -fPIC" +export LDFLAGS="${LDFLAGS} -Wl,-rpath,${PREFIX}/lib -L${PREFIX}/lib" + +if [[ ${target_platform} =~ .*linux.* ]]; then + export LDFLAGS="${LDFLAGS} -lrt" +fi + +# Build +make -j${CPU_COUNT} PREFIX=${PREFIX} + +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + make -C tests datagen + + # Test + LZ4=./lz4 + DATAGEN=./tests/datagen + + # This is a shorter version of `make lz4-test-basic`. + $DATAGEN -g0 | $LZ4 -v | $LZ4 -t + $DATAGEN -g16KB | $LZ4 -9 | $LZ4 -t + $DATAGEN | $LZ4 | $LZ4 -t + $DATAGEN -g6M -P99 | $LZ4 -9BD | $LZ4 -t + $DATAGEN -g17M | $LZ4 -9v | $LZ4 -qt + $DATAGEN -g33M | $LZ4 --no-frame-crc | $LZ4 -t + $DATAGEN -g256MB | $LZ4 -vqB4D | $LZ4 -t +fi + +# Install +make install PREFIX=${PREFIX} +rm ${PREFIX}/lib/liblz4.a diff --git a/miniconda3/pkgs/lz4-c-1.9.4-h6a678d5_1/info/recipe/build_static.sh b/miniconda3/pkgs/lz4-c-1.9.4-h6a678d5_1/info/recipe/build_static.sh new file mode 100644 index 0000000000000000000000000000000000000000..6344c06fa608cbf06bf7801540d8d39991f04a83 --- /dev/null +++ b/miniconda3/pkgs/lz4-c-1.9.4-h6a678d5_1/info/recipe/build_static.sh @@ -0,0 +1,2 @@ +#!/bin/bash +cp lib/liblz4.a ${PREFIX}/lib diff --git a/miniconda3/pkgs/lz4-c-1.9.4-h6a678d5_1/info/recipe/conda_build_config.yaml b/miniconda3/pkgs/lz4-c-1.9.4-h6a678d5_1/info/recipe/conda_build_config.yaml new file mode 100644 index 0000000000000000000000000000000000000000..6ddc91d1102d5a7551839b118be234b771e70373 --- /dev/null +++ b/miniconda3/pkgs/lz4-c-1.9.4-h6a678d5_1/info/recipe/conda_build_config.yaml @@ -0,0 +1,101 @@ +VERBOSE_AT: V=1 +VERBOSE_CM: VERBOSE=1 +apr: 1.6.3 +blas_impl: openblas +boost: '1.82' +boost_cpp: '1.82' +bzip2: '1.0' +c_compiler: gcc +c_compiler_version: 11.2.0 +cairo: '1.16' +channel_targets: defaults +clang_variant: clang +cpu_optimization_target: nocona +cran_mirror: https://mran.microsoft.com/snapshot/2018-01-01 +cxx_compiler: gxx +cxx_compiler_version: 11.2.0 +cyrus_sasl: 2.1.28 +dbus: '1' +expat: '2' +extend_keys: +- ignore_build_only_deps +- pin_run_as_build +- extend_keys +- ignore_version +fontconfig: '2.14' +fortran_compiler: gfortran +fortran_compiler_version: 11.2.0 +freetype: '2.10' +g2clib: '1.6' +geos: 3.8.0 +giflib: '5' +glib: '2' +gmp: '6.1' +gnu: 2.12.2 +gst_plugins_base: '1.14' +gstreamer: '1.14' +harfbuzz: 4.3.0 +hdf4: '4.2' +hdf5: 1.12.1 +hdfeos2: '2.20' +hdfeos5: '5.1' +icu: '73' +ignore_build_only_deps: +- python +- numpy +jpeg: '9' +libcurl: 8.1.1 +libdap4: '3.19' +libffi: '3.4' +libgd: 2.3.3 +libgdal: 3.6.2 +libgsasl: '1.10' +libkml: '1.3' +libnetcdf: '4.8' +libpng: '1.6' +libprotobuf: 3.20.3 +libtiff: '4.2' +libwebp: 1.3.2 +libxml2: '2.10' +libxslt: '1.1' +llvm_variant: llvm +lua: '5' +lzo: '2' +mkl: 2023.* +mpfr: '4' +numpy: '1.21' +openblas: 0.3.21 +openjpeg: '2.3' +openssl: '3.0' +perl: '5.34' +pin_run_as_build: + python: + max_pin: x.x + min_pin: x.x + r-base: + max_pin: x.x + min_pin: x.x + libboost: + max_pin: x.x.x +pixman: '0.40' +proj: 9.3.1 +proj4: 5.2.0 +python: '3.10' +python_impl: cpython +python_implementation: cpython +r_base: '3.5' +r_implementation: r-base +r_version: 3.5.0 +readline: '8.0' +rust_compiler: rust +rust_compiler_version: 1.71.1 +serf: 1.3.9 +sqlite: '3' +target_platform: linux-64 +tk: '8.6' +xz: '5' +zip_keys: +- - python + - numpy +zlib: '1.2' +zstd: 1.5.2 diff --git a/miniconda3/pkgs/lz4-c-1.9.4-h6a678d5_1/info/recipe/meta.yaml b/miniconda3/pkgs/lz4-c-1.9.4-h6a678d5_1/info/recipe/meta.yaml new file mode 100644 index 0000000000000000000000000000000000000000..4fd54c0f21b45255fa582c70079d04b16ae3c7f6 --- /dev/null +++ b/miniconda3/pkgs/lz4-c-1.9.4-h6a678d5_1/info/recipe/meta.yaml @@ -0,0 +1,79 @@ +# This file created by conda-build 24.1.2 +# meta.yaml template originally from: +# /feedstock/recipe, last modified Tue Apr 30 20:55:51 2024 +# ------------------------------------------------ + +package: + name: lz4-c + version: 1.9.4 +source: + fn: lz4-1.9.4.tar.gz + sha256: 0b0e3aa07c8c063ddf40b082bdf7e37a1562bda40a0ff5272957f3e987e0e54b + url: https://github.com/lz4/lz4/archive/v1.9.4.tar.gz +build: + number: '1' + run_exports: + - lz4-c >=1.9.4,<1.10.0a0 + string: h6a678d5_1 +requirements: + build: + - _libgcc_mutex 0.1 main + - _openmp_mutex 5.1 1_gnu + - _sysroot_linux-64_curr_repodata_hack 3 haa98f57_10 + - binutils_impl_linux-64 2.38 h2a08ee3_1 + - binutils_linux-64 2.38.0 hc2dff05_0 + - gcc_impl_linux-64 11.2.0 h1234567_1 + - gcc_linux-64 11.2.0 h5c386dc_0 + - gxx_impl_linux-64 11.2.0 h1234567_1 + - gxx_linux-64 11.2.0 hc2dff05_0 + - kernel-headers_linux-64 3.10.0 h57e8cba_10 + - ld_impl_linux-64 2.38 h1181459_1 + - libgcc-devel_linux-64 11.2.0 h1234567_1 + - libgcc-ng 11.2.0 h1234567_1 + - libgomp 11.2.0 h1234567_1 + - libstdcxx-devel_linux-64 11.2.0 h1234567_1 + - libstdcxx-ng 11.2.0 h1234567_1 + - make 4.2.1 h1bed415_1 + - sysroot_linux-64 2.17 h57e8cba_10 + host: + - _libgcc_mutex 0.1 main + - _openmp_mutex 5.1 1_gnu + - libgcc-ng 11.2.0 h1234567_1 + - libgomp 11.2.0 h1234567_1 + - libstdcxx-ng 11.2.0 h1234567_1 + run: + - libgcc-ng >=11.2.0 + - libstdcxx-ng >=11.2.0 +about: + description: 'LZ4 is lossless compression algorithm, providing compression speed + at 400 + + MB/s per core (0.16 Bytes/cycle). It features an extremely fast decoder, + + with speed in multiple GB/s per core (0.71 Bytes/cycle). A high compression + + derivative, called LZ4_HC, is available, trading customizable CPU time for + + compression ratio. LZ4 library is provided as open source software using a + + BSD license. + + ' + dev_url: https://github.com/lz4/lz4 + doc_url: https://github.com/lz4/lz4/blob/dev/README.md + home: https://lz4.github.io/lz4/ + license: BSD-2-Clause + license_family: BSD + license_file: lib/LICENSE + summary: Extremely Fast Compression algorithm +extra: + copy_test_source_files: true + final: true + flow_run_id: 68ea6e7a-ea57-408c-a240-edc6a1162c60 + recipe-maintainers: + - mingwandroid + - rmax + - wesm + - xhochy + remote_url: git@github.com:AnacondaRecipes/lz4-c-feedstock.git + sha: 45537caf4f5443bf05cd61697e4cc857567e2aee diff --git a/miniconda3/pkgs/lz4-c-1.9.4-h6a678d5_1/info/recipe/meta.yaml.template b/miniconda3/pkgs/lz4-c-1.9.4-h6a678d5_1/info/recipe/meta.yaml.template new file mode 100644 index 0000000000000000000000000000000000000000..32fb5200f8bb820a4281de6da069d014bf548444 --- /dev/null +++ b/miniconda3/pkgs/lz4-c-1.9.4-h6a678d5_1/info/recipe/meta.yaml.template @@ -0,0 +1,92 @@ +{% set pkg_name = "lz4-c" %} +{% set name = "lz4" %} +{% set version = "1.9.4" %} + +package: + name: {{ pkg_name }} + version: {{ version }} + +source: + fn: {{ name }}-{{ version }}.tar.gz + url: https://github.com/{{ name }}/{{ name }}/archive/v{{ version }}.tar.gz + sha256: 0b0e3aa07c8c063ddf40b082bdf7e37a1562bda40a0ff5272957f3e987e0e54b + +build: + number: 1 + +requirements: + build: + - {{ compiler('c') }} + - {{ compiler('cxx') }} # [not win] + - make # [not win] + - m2-gcc-libs # [win] + host: + run: + +outputs: + - name: lz4-c + build: + # https://abi-laboratory.pro/index.php?view=timeline&l=lz4 + run_exports: + - {{ pin_subpackage(pkg_name, max_pin='x.x') }} + test: + requires: + - pkg-config # [unix] + + commands: + - lz4 -h + - lz4c -h # [unix] + - lz4cat -h # [unix] + - unlz4 -h # [unix] + + - test -f ${PREFIX}/include/lz4.h # [unix] + - test -f ${PREFIX}/include/lz4hc.h # [unix] + - test -f ${PREFIX}/include/lz4frame.h # [unix] + + - if not exist %LIBRARY_INC%\\lz4.h exit 1 # [win] + - if not exist %LIBRARY_INC%\\lz4hc.h exit 1 # [win] + - if not exist %LIBRARY_INC%\\lz4frame.h exit 1 # [win] + + - test ! -f ${PREFIX}/lib/liblz4.a # [unix] + - test -f ${PREFIX}/lib/liblz4.dylib # [osx] + - test -f ${PREFIX}/lib/liblz4.so # [linux] + + - if not exist %LIBRARY_BIN%\\liblz4.dll exit 1 # [win] + - if not exist %LIBRARY_LIB%\\liblz4.lib exit 1 # [win] + - if exist %LIBRARY_LIB%\\liblz4_static.lib exit 1 # [win] + + - test -f ${PREFIX}/lib/pkgconfig/liblz4.pc # [unix] + - pkg-config --cflags --libs liblz4 # [unix] + + - name: lz4-c-static + build: + activate_in_script: true + script: build_static.sh # [unix] + script: bld_static.bat # [win] + test: + commands: + - test -f ${PREFIX}/lib/liblz4.a # [unix] + - if not exist %LIBRARY_LIB%\\liblz4_static.lib exit 1 # [win] + +about: + home: https://lz4.github.io/lz4/ + license: BSD-2-Clause + license_family: BSD + license_file: lib/LICENSE + summary: Extremely Fast Compression algorithm + description: | + LZ4 is lossless compression algorithm, providing compression speed at 400 + MB/s per core (0.16 Bytes/cycle). It features an extremely fast decoder, + with speed in multiple GB/s per core (0.71 Bytes/cycle). A high compression + derivative, called LZ4_HC, is available, trading customizable CPU time for + compression ratio. LZ4 library is provided as open source software using a + BSD license. + dev_url: https://github.com/lz4/lz4 + doc_url: https://github.com/lz4/lz4/blob/dev/README.md + +extra: + recipe-maintainers: + - mingwandroid + - rmax + - wesm + - xhochy diff --git a/miniconda3/pkgs/lz4-c-1.9.4-h6a678d5_1/info/repodata_record.json b/miniconda3/pkgs/lz4-c-1.9.4-h6a678d5_1/info/repodata_record.json new file mode 100644 index 0000000000000000000000000000000000000000..973b95771f138d8f34f79e54cb0feb0c062c3250 --- /dev/null +++ b/miniconda3/pkgs/lz4-c-1.9.4-h6a678d5_1/info/repodata_record.json @@ -0,0 +1,23 @@ +{ + "arch": "x86_64", + "build": "h6a678d5_1", + "build_number": 1, + "channel": "https://repo.anaconda.com/pkgs/main/linux-64/", + "constrains": [], + "depends": [ + "libgcc-ng >=11.2.0", + "libstdcxx-ng >=11.2.0" + ], + "fn": "lz4-c-1.9.4-h6a678d5_1.conda", + "license": "BSD-2-Clause", + "license_family": "BSD", + "md5": "2ee58861f2b92b868ce761abb831819d", + "name": "lz4-c", + "platform": "linux", + "sha256": "cc19d62a7f2c0af8e1f0e5bf643cf34475a35d5dc82733d679e575daa7b863aa", + "size": 159495, + "subdir": "linux-64", + "timestamp": 1714510587000, + "url": "https://repo.anaconda.com/pkgs/main/linux-64/lz4-c-1.9.4-h6a678d5_1.conda", + "version": "1.9.4" +} \ No newline at end of file diff --git a/miniconda3/pkgs/lz4-c-1.9.4-h6a678d5_1/info/run_exports.json b/miniconda3/pkgs/lz4-c-1.9.4-h6a678d5_1/info/run_exports.json new file mode 100644 index 0000000000000000000000000000000000000000..9dc6319434b17c1af45e369e97be3baad12f97e3 --- /dev/null +++ b/miniconda3/pkgs/lz4-c-1.9.4-h6a678d5_1/info/run_exports.json @@ -0,0 +1 @@ +{"weak": ["lz4-c >=1.9.4,<1.10.0a0"]} \ No newline at end of file diff --git a/miniconda3/pkgs/lz4-c-1.9.4-h6a678d5_1/lib/pkgconfig/liblz4.pc b/miniconda3/pkgs/lz4-c-1.9.4-h6a678d5_1/lib/pkgconfig/liblz4.pc new file mode 100644 index 0000000000000000000000000000000000000000..70597c2d387260fbad97c08f61a35932eeabe16d --- /dev/null +++ b/miniconda3/pkgs/lz4-c-1.9.4-h6a678d5_1/lib/pkgconfig/liblz4.pc @@ -0,0 +1,14 @@ +# LZ4 - Fast LZ compression algorithm +# Copyright (C) 2011-2020, Yann Collet. +# BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php) + +prefix=/croot/lz4-c_1714510556686/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_p +libdir=${prefix}/lib +includedir=${prefix}/include + +Name: lz4 +Description: extremely fast lossless compression algorithm library +URL: http://www.lz4.org/ +Version: 1.9.4 +Libs: -L${libdir} -llz4 +Cflags: -I${includedir} diff --git a/miniconda3/pkgs/lz4-c-1.9.4-h6a678d5_1/share/man/man1/lz4.1 b/miniconda3/pkgs/lz4-c-1.9.4-h6a678d5_1/share/man/man1/lz4.1 new file mode 100644 index 0000000000000000000000000000000000000000..7cb98d639df71b08b00a45f7aab17f5f60c82df0 --- /dev/null +++ b/miniconda3/pkgs/lz4-c-1.9.4-h6a678d5_1/share/man/man1/lz4.1 @@ -0,0 +1,249 @@ +. +.TH "LZ4" "1" "August 2022" "lz4 v1.9.4" "User Commands" +. +.SH "NAME" +\fBlz4\fR \- lz4, unlz4, lz4cat \- Compress or decompress \.lz4 files +. +.SH "SYNOPSIS" +\fBlz4\fR [\fIOPTIONS\fR] [\-|INPUT\-FILE] \fIOUTPUT\-FILE\fR +. +.P +\fBunlz4\fR is equivalent to \fBlz4 \-d\fR +. +.P +\fBlz4cat\fR is equivalent to \fBlz4 \-dcfm\fR +. +.P +When writing scripts that need to decompress files, it is recommended to always use the name \fBlz4\fR with appropriate arguments (\fBlz4 \-d\fR or \fBlz4 \-dc\fR) instead of the names \fBunlz4\fR and \fBlz4cat\fR\. +. +.SH "DESCRIPTION" +\fBlz4\fR is an extremely fast lossless compression algorithm, based on \fBbyte\-aligned LZ77\fR family of compression scheme\. \fBlz4\fR offers compression speeds > 500 MB/s per core, linearly scalable with multi\-core CPUs\. It features an extremely fast decoder, offering speed in multiple GB/s per core, typically reaching RAM speed limit on multi\-core systems\. The native file format is the \fB\.lz4\fR format\. +. +.SS "Difference between lz4 and gzip" +\fBlz4\fR supports a command line syntax similar \fIbut not identical\fR to \fBgzip(1)\fR\. Differences are : +. +.IP "\(bu" 4 +\fBlz4\fR compresses a single file by default (see \fB\-m\fR for multiple files) +. +.IP "\(bu" 4 +\fBlz4 file1 file2\fR means : compress file1 \fIinto\fR file2 +. +.IP "\(bu" 4 +\fBlz4 file\.lz4\fR will default to decompression (use \fB\-z\fR to force compression) +. +.IP "\(bu" 4 +\fBlz4\fR preserves original files (see \fB\-\-rm\fR to erase source file on completion) +. +.IP "\(bu" 4 +\fBlz4\fR shows real\-time notification statistics during compression or decompression of a single file (use \fB\-q\fR to silence them) +. +.IP "\(bu" 4 +When no destination is specified, result is sent on implicit output, which depends on \fBstdout\fR status\. When \fBstdout\fR \fIis Not the console\fR, it becomes the implicit output\. Otherwise, if \fBstdout\fR is the console, the implicit output is \fBfilename\.lz4\fR\. +. +.IP "\(bu" 4 +It is considered bad practice to rely on implicit output in scripts\. because the script\'s environment may change\. Always use explicit output in scripts\. \fB\-c\fR ensures that output will be \fBstdout\fR\. Conversely, providing a destination name, or using \fB\-m\fR ensures that the output will be either the specified name, or \fBfilename\.lz4\fR respectively\. +. +.IP "" 0 +. +.P +Default behaviors can be modified by opt\-in commands, detailed below\. +. +.IP "\(bu" 4 +\fBlz4 \-m\fR makes it possible to provide multiple input filenames, which will be compressed into files using suffix \fB\.lz4\fR\. Progress notifications become disabled by default (use \fB\-v\fR to enable them)\. This mode has a behavior which more closely mimics \fBgzip\fR command line, with the main remaining difference being that source files are preserved by default\. +. +.IP "\(bu" 4 +Similarly, \fBlz4 \-m \-d\fR can decompress multiple \fB*\.lz4\fR files\. +. +.IP "\(bu" 4 +It\'s possible to opt\-in to erase source files on successful compression or decompression, using \fB\-\-rm\fR command\. +. +.IP "\(bu" 4 +Consequently, \fBlz4 \-m \-\-rm\fR behaves the same as \fBgzip\fR\. +. +.IP "" 0 +. +.SS "Concatenation of \.lz4 files" +It is possible to concatenate \fB\.lz4\fR files as is\. \fBlz4\fR will decompress such files as if they were a single \fB\.lz4\fR file\. For example: +. +.IP "" 4 +. +.nf + +lz4 file1 > foo\.lz4 +lz4 file2 >> foo\.lz4 +. +.fi +. +.IP "" 0 +. +.P +Then \fBlz4cat foo\.lz4\fR is equivalent to \fBcat file1 file2\fR\. +. +.SH "OPTIONS" +. +.SS "Short commands concatenation" +In some cases, some options can be expressed using short command \fB\-x\fR or long command \fB\-\-long\-word\fR\. Short commands can be concatenated together\. For example, \fB\-d \-c\fR is equivalent to \fB\-dc\fR\. Long commands cannot be concatenated\. They must be clearly separated by a space\. +. +.SS "Multiple commands" +When multiple contradictory commands are issued on a same command line, only the latest one will be applied\. +. +.SS "Operation mode" +. +.TP +\fB\-z\fR \fB\-\-compress\fR +Compress\. This is the default operation mode when no operation mode option is specified, no other operation mode is implied from the command name (for example, \fBunlz4\fR implies \fB\-\-decompress\fR), nor from the input file name (for example, a file extension \fB\.lz4\fR implies \fB\-\-decompress\fR by default)\. \fB\-z\fR can also be used to force compression of an already compressed \fB\.lz4\fR file\. +. +.TP +\fB\-d\fR \fB\-\-decompress\fR \fB\-\-uncompress\fR +Decompress\. \fB\-\-decompress\fR is also the default operation when the input filename has an \fB\.lz4\fR extension\. +. +.TP +\fB\-t\fR \fB\-\-test\fR +Test the integrity of compressed \fB\.lz4\fR files\. The decompressed data is discarded\. No files are created nor removed\. +. +.TP +\fB\-b#\fR +Benchmark mode, using \fB#\fR compression level\. +. +.TP +\fB\-\-list\fR +List information about \.lz4 files\. note : current implementation is limited to single\-frame \.lz4 files\. +. +.SS "Operation modifiers" +. +.TP +\fB\-#\fR +Compression level, with # being any value from 1 to 12\. Higher values trade compression speed for compression ratio\. Values above 12 are considered the same as 12\. Recommended values are 1 for fast compression (default), and 9 for high compression\. Speed/compression trade\-off will vary depending on data to compress\. Decompression speed remains fast at all settings\. +. +.TP +\fB\-\-fast[=#]\fR +Switch to ultra\-fast compression levels\. The higher the value, the faster the compression speed, at the cost of some compression ratio\. If \fB=#\fR is not present, it defaults to \fB1\fR\. This setting overrides compression level if one was set previously\. Similarly, if a compression level is set after \fB\-\-fast\fR, it overrides it\. +. +.TP +\fB\-\-best\fR +Set highest compression level\. Same as \-12\. +. +.TP +\fB\-\-favor\-decSpeed\fR +Generate compressed data optimized for decompression speed\. Compressed data will be larger as a consequence (typically by ~0\.5%), while decompression speed will be improved by 5\-20%, depending on use cases\. This option only works in combination with very high compression levels (>=10)\. +. +.TP +\fB\-D dictionaryName\fR +Compress, decompress or benchmark using dictionary \fIdictionaryName\fR\. Compression and decompression must use the same dictionary to be compatible\. Using a different dictionary during decompression will either abort due to decompression error, or generate a checksum error\. +. +.TP +\fB\-f\fR \fB\-\-[no\-]force\fR +This option has several effects: +. +.IP +If the target file already exists, overwrite it without prompting\. +. +.IP +When used with \fB\-\-decompress\fR and \fBlz4\fR cannot recognize the type of the source file, copy the source file as is to standard output\. This allows \fBlz4cat \-\-force\fR to be used like \fBcat (1)\fR for files that have not been compressed with \fBlz4\fR\. +. +.TP +\fB\-c\fR \fB\-\-stdout\fR \fB\-\-to\-stdout\fR +Force write to standard output, even if it is the console\. +. +.TP +\fB\-m\fR \fB\-\-multiple\fR +Multiple input files\. Compressed file names will be appended a \fB\.lz4\fR suffix\. This mode also reduces notification level\. Can also be used to list multiple files\. \fBlz4 \-m\fR has a behavior equivalent to \fBgzip \-k\fR (it preserves source files by default)\. +. +.TP +\fB\-r\fR +operate recursively on directories\. This mode also sets \fB\-m\fR (multiple input files)\. +. +.TP +\fB\-B#\fR +Block size [4\-7](default : 7) +. +.br +\fB\-B4\fR= 64KB ; \fB\-B5\fR= 256KB ; \fB\-B6\fR= 1MB ; \fB\-B7\fR= 4MB +. +.TP +\fB\-BI\fR +Produce independent blocks (default) +. +.TP +\fB\-BD\fR +Blocks depend on predecessors (improves compression ratio, more noticeable on small blocks) +. +.TP +\fB\-BX\fR +Generate block checksums (default:disabled) +. +.TP +\fB\-\-[no\-]frame\-crc\fR +Select frame checksum (default:enabled) +. +.TP +\fB\-\-no\-crc\fR +Disable both frame and block checksums +. +.TP +\fB\-\-[no\-]content\-size\fR +Header includes original size (default:not present) +. +.br +Note : this option can only be activated when the original size can be determined, hence for a file\. It won\'t work with unknown source size, such as stdin or pipe\. +. +.TP +\fB\-\-[no\-]sparse\fR +Sparse mode support (default:enabled on file, disabled on stdout) +. +.TP +\fB\-l\fR +Use Legacy format (typically for Linux Kernel compression) +. +.br +Note : \fB\-l\fR is not compatible with \fB\-m\fR (\fB\-\-multiple\fR) nor \fB\-r\fR +. +.SS "Other options" +. +.TP +\fB\-v\fR \fB\-\-verbose\fR +Verbose mode +. +.TP +\fB\-q\fR \fB\-\-quiet\fR +Suppress warnings and real\-time statistics; specify twice to suppress errors too +. +.TP +\fB\-h\fR \fB\-H\fR \fB\-\-help\fR +Display help/long help and exit +. +.TP +\fB\-V\fR \fB\-\-version\fR +Display Version number and exit +. +.TP +\fB\-k\fR \fB\-\-keep\fR +Preserve source files (default behavior) +. +.TP +\fB\-\-rm\fR +Delete source files on successful compression or decompression +. +.TP +\fB\-\-\fR +Treat all subsequent arguments as files +. +.SS "Benchmark mode" +. +.TP +\fB\-b#\fR +Benchmark file(s), using # compression level +. +.TP +\fB\-e#\fR +Benchmark multiple compression levels, from b# to e# (included) +. +.TP +\fB\-i#\fR +Minimum evaluation time in seconds [1\-9] (default : 3) +. +.SH "BUGS" +Report bugs at: https://github\.com/lz4/lz4/issues +. +.SH "AUTHOR" +Yann Collet diff --git a/miniconda3/pkgs/lz4-c-1.9.4-h6a678d5_1/share/man/man1/lz4c.1 b/miniconda3/pkgs/lz4-c-1.9.4-h6a678d5_1/share/man/man1/lz4c.1 new file mode 100644 index 0000000000000000000000000000000000000000..7cb98d639df71b08b00a45f7aab17f5f60c82df0 --- /dev/null +++ b/miniconda3/pkgs/lz4-c-1.9.4-h6a678d5_1/share/man/man1/lz4c.1 @@ -0,0 +1,249 @@ +. +.TH "LZ4" "1" "August 2022" "lz4 v1.9.4" "User Commands" +. +.SH "NAME" +\fBlz4\fR \- lz4, unlz4, lz4cat \- Compress or decompress \.lz4 files +. +.SH "SYNOPSIS" +\fBlz4\fR [\fIOPTIONS\fR] [\-|INPUT\-FILE] \fIOUTPUT\-FILE\fR +. +.P +\fBunlz4\fR is equivalent to \fBlz4 \-d\fR +. +.P +\fBlz4cat\fR is equivalent to \fBlz4 \-dcfm\fR +. +.P +When writing scripts that need to decompress files, it is recommended to always use the name \fBlz4\fR with appropriate arguments (\fBlz4 \-d\fR or \fBlz4 \-dc\fR) instead of the names \fBunlz4\fR and \fBlz4cat\fR\. +. +.SH "DESCRIPTION" +\fBlz4\fR is an extremely fast lossless compression algorithm, based on \fBbyte\-aligned LZ77\fR family of compression scheme\. \fBlz4\fR offers compression speeds > 500 MB/s per core, linearly scalable with multi\-core CPUs\. It features an extremely fast decoder, offering speed in multiple GB/s per core, typically reaching RAM speed limit on multi\-core systems\. The native file format is the \fB\.lz4\fR format\. +. +.SS "Difference between lz4 and gzip" +\fBlz4\fR supports a command line syntax similar \fIbut not identical\fR to \fBgzip(1)\fR\. Differences are : +. +.IP "\(bu" 4 +\fBlz4\fR compresses a single file by default (see \fB\-m\fR for multiple files) +. +.IP "\(bu" 4 +\fBlz4 file1 file2\fR means : compress file1 \fIinto\fR file2 +. +.IP "\(bu" 4 +\fBlz4 file\.lz4\fR will default to decompression (use \fB\-z\fR to force compression) +. +.IP "\(bu" 4 +\fBlz4\fR preserves original files (see \fB\-\-rm\fR to erase source file on completion) +. +.IP "\(bu" 4 +\fBlz4\fR shows real\-time notification statistics during compression or decompression of a single file (use \fB\-q\fR to silence them) +. +.IP "\(bu" 4 +When no destination is specified, result is sent on implicit output, which depends on \fBstdout\fR status\. When \fBstdout\fR \fIis Not the console\fR, it becomes the implicit output\. Otherwise, if \fBstdout\fR is the console, the implicit output is \fBfilename\.lz4\fR\. +. +.IP "\(bu" 4 +It is considered bad practice to rely on implicit output in scripts\. because the script\'s environment may change\. Always use explicit output in scripts\. \fB\-c\fR ensures that output will be \fBstdout\fR\. Conversely, providing a destination name, or using \fB\-m\fR ensures that the output will be either the specified name, or \fBfilename\.lz4\fR respectively\. +. +.IP "" 0 +. +.P +Default behaviors can be modified by opt\-in commands, detailed below\. +. +.IP "\(bu" 4 +\fBlz4 \-m\fR makes it possible to provide multiple input filenames, which will be compressed into files using suffix \fB\.lz4\fR\. Progress notifications become disabled by default (use \fB\-v\fR to enable them)\. This mode has a behavior which more closely mimics \fBgzip\fR command line, with the main remaining difference being that source files are preserved by default\. +. +.IP "\(bu" 4 +Similarly, \fBlz4 \-m \-d\fR can decompress multiple \fB*\.lz4\fR files\. +. +.IP "\(bu" 4 +It\'s possible to opt\-in to erase source files on successful compression or decompression, using \fB\-\-rm\fR command\. +. +.IP "\(bu" 4 +Consequently, \fBlz4 \-m \-\-rm\fR behaves the same as \fBgzip\fR\. +. +.IP "" 0 +. +.SS "Concatenation of \.lz4 files" +It is possible to concatenate \fB\.lz4\fR files as is\. \fBlz4\fR will decompress such files as if they were a single \fB\.lz4\fR file\. For example: +. +.IP "" 4 +. +.nf + +lz4 file1 > foo\.lz4 +lz4 file2 >> foo\.lz4 +. +.fi +. +.IP "" 0 +. +.P +Then \fBlz4cat foo\.lz4\fR is equivalent to \fBcat file1 file2\fR\. +. +.SH "OPTIONS" +. +.SS "Short commands concatenation" +In some cases, some options can be expressed using short command \fB\-x\fR or long command \fB\-\-long\-word\fR\. Short commands can be concatenated together\. For example, \fB\-d \-c\fR is equivalent to \fB\-dc\fR\. Long commands cannot be concatenated\. They must be clearly separated by a space\. +. +.SS "Multiple commands" +When multiple contradictory commands are issued on a same command line, only the latest one will be applied\. +. +.SS "Operation mode" +. +.TP +\fB\-z\fR \fB\-\-compress\fR +Compress\. This is the default operation mode when no operation mode option is specified, no other operation mode is implied from the command name (for example, \fBunlz4\fR implies \fB\-\-decompress\fR), nor from the input file name (for example, a file extension \fB\.lz4\fR implies \fB\-\-decompress\fR by default)\. \fB\-z\fR can also be used to force compression of an already compressed \fB\.lz4\fR file\. +. +.TP +\fB\-d\fR \fB\-\-decompress\fR \fB\-\-uncompress\fR +Decompress\. \fB\-\-decompress\fR is also the default operation when the input filename has an \fB\.lz4\fR extension\. +. +.TP +\fB\-t\fR \fB\-\-test\fR +Test the integrity of compressed \fB\.lz4\fR files\. The decompressed data is discarded\. No files are created nor removed\. +. +.TP +\fB\-b#\fR +Benchmark mode, using \fB#\fR compression level\. +. +.TP +\fB\-\-list\fR +List information about \.lz4 files\. note : current implementation is limited to single\-frame \.lz4 files\. +. +.SS "Operation modifiers" +. +.TP +\fB\-#\fR +Compression level, with # being any value from 1 to 12\. Higher values trade compression speed for compression ratio\. Values above 12 are considered the same as 12\. Recommended values are 1 for fast compression (default), and 9 for high compression\. Speed/compression trade\-off will vary depending on data to compress\. Decompression speed remains fast at all settings\. +. +.TP +\fB\-\-fast[=#]\fR +Switch to ultra\-fast compression levels\. The higher the value, the faster the compression speed, at the cost of some compression ratio\. If \fB=#\fR is not present, it defaults to \fB1\fR\. This setting overrides compression level if one was set previously\. Similarly, if a compression level is set after \fB\-\-fast\fR, it overrides it\. +. +.TP +\fB\-\-best\fR +Set highest compression level\. Same as \-12\. +. +.TP +\fB\-\-favor\-decSpeed\fR +Generate compressed data optimized for decompression speed\. Compressed data will be larger as a consequence (typically by ~0\.5%), while decompression speed will be improved by 5\-20%, depending on use cases\. This option only works in combination with very high compression levels (>=10)\. +. +.TP +\fB\-D dictionaryName\fR +Compress, decompress or benchmark using dictionary \fIdictionaryName\fR\. Compression and decompression must use the same dictionary to be compatible\. Using a different dictionary during decompression will either abort due to decompression error, or generate a checksum error\. +. +.TP +\fB\-f\fR \fB\-\-[no\-]force\fR +This option has several effects: +. +.IP +If the target file already exists, overwrite it without prompting\. +. +.IP +When used with \fB\-\-decompress\fR and \fBlz4\fR cannot recognize the type of the source file, copy the source file as is to standard output\. This allows \fBlz4cat \-\-force\fR to be used like \fBcat (1)\fR for files that have not been compressed with \fBlz4\fR\. +. +.TP +\fB\-c\fR \fB\-\-stdout\fR \fB\-\-to\-stdout\fR +Force write to standard output, even if it is the console\. +. +.TP +\fB\-m\fR \fB\-\-multiple\fR +Multiple input files\. Compressed file names will be appended a \fB\.lz4\fR suffix\. This mode also reduces notification level\. Can also be used to list multiple files\. \fBlz4 \-m\fR has a behavior equivalent to \fBgzip \-k\fR (it preserves source files by default)\. +. +.TP +\fB\-r\fR +operate recursively on directories\. This mode also sets \fB\-m\fR (multiple input files)\. +. +.TP +\fB\-B#\fR +Block size [4\-7](default : 7) +. +.br +\fB\-B4\fR= 64KB ; \fB\-B5\fR= 256KB ; \fB\-B6\fR= 1MB ; \fB\-B7\fR= 4MB +. +.TP +\fB\-BI\fR +Produce independent blocks (default) +. +.TP +\fB\-BD\fR +Blocks depend on predecessors (improves compression ratio, more noticeable on small blocks) +. +.TP +\fB\-BX\fR +Generate block checksums (default:disabled) +. +.TP +\fB\-\-[no\-]frame\-crc\fR +Select frame checksum (default:enabled) +. +.TP +\fB\-\-no\-crc\fR +Disable both frame and block checksums +. +.TP +\fB\-\-[no\-]content\-size\fR +Header includes original size (default:not present) +. +.br +Note : this option can only be activated when the original size can be determined, hence for a file\. It won\'t work with unknown source size, such as stdin or pipe\. +. +.TP +\fB\-\-[no\-]sparse\fR +Sparse mode support (default:enabled on file, disabled on stdout) +. +.TP +\fB\-l\fR +Use Legacy format (typically for Linux Kernel compression) +. +.br +Note : \fB\-l\fR is not compatible with \fB\-m\fR (\fB\-\-multiple\fR) nor \fB\-r\fR +. +.SS "Other options" +. +.TP +\fB\-v\fR \fB\-\-verbose\fR +Verbose mode +. +.TP +\fB\-q\fR \fB\-\-quiet\fR +Suppress warnings and real\-time statistics; specify twice to suppress errors too +. +.TP +\fB\-h\fR \fB\-H\fR \fB\-\-help\fR +Display help/long help and exit +. +.TP +\fB\-V\fR \fB\-\-version\fR +Display Version number and exit +. +.TP +\fB\-k\fR \fB\-\-keep\fR +Preserve source files (default behavior) +. +.TP +\fB\-\-rm\fR +Delete source files on successful compression or decompression +. +.TP +\fB\-\-\fR +Treat all subsequent arguments as files +. +.SS "Benchmark mode" +. +.TP +\fB\-b#\fR +Benchmark file(s), using # compression level +. +.TP +\fB\-e#\fR +Benchmark multiple compression levels, from b# to e# (included) +. +.TP +\fB\-i#\fR +Minimum evaluation time in seconds [1\-9] (default : 3) +. +.SH "BUGS" +Report bugs at: https://github\.com/lz4/lz4/issues +. +.SH "AUTHOR" +Yann Collet diff --git a/miniconda3/pkgs/lz4-c-1.9.4-h6a678d5_1/share/man/man1/lz4cat.1 b/miniconda3/pkgs/lz4-c-1.9.4-h6a678d5_1/share/man/man1/lz4cat.1 new file mode 100644 index 0000000000000000000000000000000000000000..7cb98d639df71b08b00a45f7aab17f5f60c82df0 --- /dev/null +++ b/miniconda3/pkgs/lz4-c-1.9.4-h6a678d5_1/share/man/man1/lz4cat.1 @@ -0,0 +1,249 @@ +. +.TH "LZ4" "1" "August 2022" "lz4 v1.9.4" "User Commands" +. +.SH "NAME" +\fBlz4\fR \- lz4, unlz4, lz4cat \- Compress or decompress \.lz4 files +. +.SH "SYNOPSIS" +\fBlz4\fR [\fIOPTIONS\fR] [\-|INPUT\-FILE] \fIOUTPUT\-FILE\fR +. +.P +\fBunlz4\fR is equivalent to \fBlz4 \-d\fR +. +.P +\fBlz4cat\fR is equivalent to \fBlz4 \-dcfm\fR +. +.P +When writing scripts that need to decompress files, it is recommended to always use the name \fBlz4\fR with appropriate arguments (\fBlz4 \-d\fR or \fBlz4 \-dc\fR) instead of the names \fBunlz4\fR and \fBlz4cat\fR\. +. +.SH "DESCRIPTION" +\fBlz4\fR is an extremely fast lossless compression algorithm, based on \fBbyte\-aligned LZ77\fR family of compression scheme\. \fBlz4\fR offers compression speeds > 500 MB/s per core, linearly scalable with multi\-core CPUs\. It features an extremely fast decoder, offering speed in multiple GB/s per core, typically reaching RAM speed limit on multi\-core systems\. The native file format is the \fB\.lz4\fR format\. +. +.SS "Difference between lz4 and gzip" +\fBlz4\fR supports a command line syntax similar \fIbut not identical\fR to \fBgzip(1)\fR\. Differences are : +. +.IP "\(bu" 4 +\fBlz4\fR compresses a single file by default (see \fB\-m\fR for multiple files) +. +.IP "\(bu" 4 +\fBlz4 file1 file2\fR means : compress file1 \fIinto\fR file2 +. +.IP "\(bu" 4 +\fBlz4 file\.lz4\fR will default to decompression (use \fB\-z\fR to force compression) +. +.IP "\(bu" 4 +\fBlz4\fR preserves original files (see \fB\-\-rm\fR to erase source file on completion) +. +.IP "\(bu" 4 +\fBlz4\fR shows real\-time notification statistics during compression or decompression of a single file (use \fB\-q\fR to silence them) +. +.IP "\(bu" 4 +When no destination is specified, result is sent on implicit output, which depends on \fBstdout\fR status\. When \fBstdout\fR \fIis Not the console\fR, it becomes the implicit output\. Otherwise, if \fBstdout\fR is the console, the implicit output is \fBfilename\.lz4\fR\. +. +.IP "\(bu" 4 +It is considered bad practice to rely on implicit output in scripts\. because the script\'s environment may change\. Always use explicit output in scripts\. \fB\-c\fR ensures that output will be \fBstdout\fR\. Conversely, providing a destination name, or using \fB\-m\fR ensures that the output will be either the specified name, or \fBfilename\.lz4\fR respectively\. +. +.IP "" 0 +. +.P +Default behaviors can be modified by opt\-in commands, detailed below\. +. +.IP "\(bu" 4 +\fBlz4 \-m\fR makes it possible to provide multiple input filenames, which will be compressed into files using suffix \fB\.lz4\fR\. Progress notifications become disabled by default (use \fB\-v\fR to enable them)\. This mode has a behavior which more closely mimics \fBgzip\fR command line, with the main remaining difference being that source files are preserved by default\. +. +.IP "\(bu" 4 +Similarly, \fBlz4 \-m \-d\fR can decompress multiple \fB*\.lz4\fR files\. +. +.IP "\(bu" 4 +It\'s possible to opt\-in to erase source files on successful compression or decompression, using \fB\-\-rm\fR command\. +. +.IP "\(bu" 4 +Consequently, \fBlz4 \-m \-\-rm\fR behaves the same as \fBgzip\fR\. +. +.IP "" 0 +. +.SS "Concatenation of \.lz4 files" +It is possible to concatenate \fB\.lz4\fR files as is\. \fBlz4\fR will decompress such files as if they were a single \fB\.lz4\fR file\. For example: +. +.IP "" 4 +. +.nf + +lz4 file1 > foo\.lz4 +lz4 file2 >> foo\.lz4 +. +.fi +. +.IP "" 0 +. +.P +Then \fBlz4cat foo\.lz4\fR is equivalent to \fBcat file1 file2\fR\. +. +.SH "OPTIONS" +. +.SS "Short commands concatenation" +In some cases, some options can be expressed using short command \fB\-x\fR or long command \fB\-\-long\-word\fR\. Short commands can be concatenated together\. For example, \fB\-d \-c\fR is equivalent to \fB\-dc\fR\. Long commands cannot be concatenated\. They must be clearly separated by a space\. +. +.SS "Multiple commands" +When multiple contradictory commands are issued on a same command line, only the latest one will be applied\. +. +.SS "Operation mode" +. +.TP +\fB\-z\fR \fB\-\-compress\fR +Compress\. This is the default operation mode when no operation mode option is specified, no other operation mode is implied from the command name (for example, \fBunlz4\fR implies \fB\-\-decompress\fR), nor from the input file name (for example, a file extension \fB\.lz4\fR implies \fB\-\-decompress\fR by default)\. \fB\-z\fR can also be used to force compression of an already compressed \fB\.lz4\fR file\. +. +.TP +\fB\-d\fR \fB\-\-decompress\fR \fB\-\-uncompress\fR +Decompress\. \fB\-\-decompress\fR is also the default operation when the input filename has an \fB\.lz4\fR extension\. +. +.TP +\fB\-t\fR \fB\-\-test\fR +Test the integrity of compressed \fB\.lz4\fR files\. The decompressed data is discarded\. No files are created nor removed\. +. +.TP +\fB\-b#\fR +Benchmark mode, using \fB#\fR compression level\. +. +.TP +\fB\-\-list\fR +List information about \.lz4 files\. note : current implementation is limited to single\-frame \.lz4 files\. +. +.SS "Operation modifiers" +. +.TP +\fB\-#\fR +Compression level, with # being any value from 1 to 12\. Higher values trade compression speed for compression ratio\. Values above 12 are considered the same as 12\. Recommended values are 1 for fast compression (default), and 9 for high compression\. Speed/compression trade\-off will vary depending on data to compress\. Decompression speed remains fast at all settings\. +. +.TP +\fB\-\-fast[=#]\fR +Switch to ultra\-fast compression levels\. The higher the value, the faster the compression speed, at the cost of some compression ratio\. If \fB=#\fR is not present, it defaults to \fB1\fR\. This setting overrides compression level if one was set previously\. Similarly, if a compression level is set after \fB\-\-fast\fR, it overrides it\. +. +.TP +\fB\-\-best\fR +Set highest compression level\. Same as \-12\. +. +.TP +\fB\-\-favor\-decSpeed\fR +Generate compressed data optimized for decompression speed\. Compressed data will be larger as a consequence (typically by ~0\.5%), while decompression speed will be improved by 5\-20%, depending on use cases\. This option only works in combination with very high compression levels (>=10)\. +. +.TP +\fB\-D dictionaryName\fR +Compress, decompress or benchmark using dictionary \fIdictionaryName\fR\. Compression and decompression must use the same dictionary to be compatible\. Using a different dictionary during decompression will either abort due to decompression error, or generate a checksum error\. +. +.TP +\fB\-f\fR \fB\-\-[no\-]force\fR +This option has several effects: +. +.IP +If the target file already exists, overwrite it without prompting\. +. +.IP +When used with \fB\-\-decompress\fR and \fBlz4\fR cannot recognize the type of the source file, copy the source file as is to standard output\. This allows \fBlz4cat \-\-force\fR to be used like \fBcat (1)\fR for files that have not been compressed with \fBlz4\fR\. +. +.TP +\fB\-c\fR \fB\-\-stdout\fR \fB\-\-to\-stdout\fR +Force write to standard output, even if it is the console\. +. +.TP +\fB\-m\fR \fB\-\-multiple\fR +Multiple input files\. Compressed file names will be appended a \fB\.lz4\fR suffix\. This mode also reduces notification level\. Can also be used to list multiple files\. \fBlz4 \-m\fR has a behavior equivalent to \fBgzip \-k\fR (it preserves source files by default)\. +. +.TP +\fB\-r\fR +operate recursively on directories\. This mode also sets \fB\-m\fR (multiple input files)\. +. +.TP +\fB\-B#\fR +Block size [4\-7](default : 7) +. +.br +\fB\-B4\fR= 64KB ; \fB\-B5\fR= 256KB ; \fB\-B6\fR= 1MB ; \fB\-B7\fR= 4MB +. +.TP +\fB\-BI\fR +Produce independent blocks (default) +. +.TP +\fB\-BD\fR +Blocks depend on predecessors (improves compression ratio, more noticeable on small blocks) +. +.TP +\fB\-BX\fR +Generate block checksums (default:disabled) +. +.TP +\fB\-\-[no\-]frame\-crc\fR +Select frame checksum (default:enabled) +. +.TP +\fB\-\-no\-crc\fR +Disable both frame and block checksums +. +.TP +\fB\-\-[no\-]content\-size\fR +Header includes original size (default:not present) +. +.br +Note : this option can only be activated when the original size can be determined, hence for a file\. It won\'t work with unknown source size, such as stdin or pipe\. +. +.TP +\fB\-\-[no\-]sparse\fR +Sparse mode support (default:enabled on file, disabled on stdout) +. +.TP +\fB\-l\fR +Use Legacy format (typically for Linux Kernel compression) +. +.br +Note : \fB\-l\fR is not compatible with \fB\-m\fR (\fB\-\-multiple\fR) nor \fB\-r\fR +. +.SS "Other options" +. +.TP +\fB\-v\fR \fB\-\-verbose\fR +Verbose mode +. +.TP +\fB\-q\fR \fB\-\-quiet\fR +Suppress warnings and real\-time statistics; specify twice to suppress errors too +. +.TP +\fB\-h\fR \fB\-H\fR \fB\-\-help\fR +Display help/long help and exit +. +.TP +\fB\-V\fR \fB\-\-version\fR +Display Version number and exit +. +.TP +\fB\-k\fR \fB\-\-keep\fR +Preserve source files (default behavior) +. +.TP +\fB\-\-rm\fR +Delete source files on successful compression or decompression +. +.TP +\fB\-\-\fR +Treat all subsequent arguments as files +. +.SS "Benchmark mode" +. +.TP +\fB\-b#\fR +Benchmark file(s), using # compression level +. +.TP +\fB\-e#\fR +Benchmark multiple compression levels, from b# to e# (included) +. +.TP +\fB\-i#\fR +Minimum evaluation time in seconds [1\-9] (default : 3) +. +.SH "BUGS" +Report bugs at: https://github\.com/lz4/lz4/issues +. +.SH "AUTHOR" +Yann Collet diff --git a/miniconda3/pkgs/lz4-c-1.9.4-h6a678d5_1/share/man/man1/unlz4.1 b/miniconda3/pkgs/lz4-c-1.9.4-h6a678d5_1/share/man/man1/unlz4.1 new file mode 100644 index 0000000000000000000000000000000000000000..7cb98d639df71b08b00a45f7aab17f5f60c82df0 --- /dev/null +++ b/miniconda3/pkgs/lz4-c-1.9.4-h6a678d5_1/share/man/man1/unlz4.1 @@ -0,0 +1,249 @@ +. +.TH "LZ4" "1" "August 2022" "lz4 v1.9.4" "User Commands" +. +.SH "NAME" +\fBlz4\fR \- lz4, unlz4, lz4cat \- Compress or decompress \.lz4 files +. +.SH "SYNOPSIS" +\fBlz4\fR [\fIOPTIONS\fR] [\-|INPUT\-FILE] \fIOUTPUT\-FILE\fR +. +.P +\fBunlz4\fR is equivalent to \fBlz4 \-d\fR +. +.P +\fBlz4cat\fR is equivalent to \fBlz4 \-dcfm\fR +. +.P +When writing scripts that need to decompress files, it is recommended to always use the name \fBlz4\fR with appropriate arguments (\fBlz4 \-d\fR or \fBlz4 \-dc\fR) instead of the names \fBunlz4\fR and \fBlz4cat\fR\. +. +.SH "DESCRIPTION" +\fBlz4\fR is an extremely fast lossless compression algorithm, based on \fBbyte\-aligned LZ77\fR family of compression scheme\. \fBlz4\fR offers compression speeds > 500 MB/s per core, linearly scalable with multi\-core CPUs\. It features an extremely fast decoder, offering speed in multiple GB/s per core, typically reaching RAM speed limit on multi\-core systems\. The native file format is the \fB\.lz4\fR format\. +. +.SS "Difference between lz4 and gzip" +\fBlz4\fR supports a command line syntax similar \fIbut not identical\fR to \fBgzip(1)\fR\. Differences are : +. +.IP "\(bu" 4 +\fBlz4\fR compresses a single file by default (see \fB\-m\fR for multiple files) +. +.IP "\(bu" 4 +\fBlz4 file1 file2\fR means : compress file1 \fIinto\fR file2 +. +.IP "\(bu" 4 +\fBlz4 file\.lz4\fR will default to decompression (use \fB\-z\fR to force compression) +. +.IP "\(bu" 4 +\fBlz4\fR preserves original files (see \fB\-\-rm\fR to erase source file on completion) +. +.IP "\(bu" 4 +\fBlz4\fR shows real\-time notification statistics during compression or decompression of a single file (use \fB\-q\fR to silence them) +. +.IP "\(bu" 4 +When no destination is specified, result is sent on implicit output, which depends on \fBstdout\fR status\. When \fBstdout\fR \fIis Not the console\fR, it becomes the implicit output\. Otherwise, if \fBstdout\fR is the console, the implicit output is \fBfilename\.lz4\fR\. +. +.IP "\(bu" 4 +It is considered bad practice to rely on implicit output in scripts\. because the script\'s environment may change\. Always use explicit output in scripts\. \fB\-c\fR ensures that output will be \fBstdout\fR\. Conversely, providing a destination name, or using \fB\-m\fR ensures that the output will be either the specified name, or \fBfilename\.lz4\fR respectively\. +. +.IP "" 0 +. +.P +Default behaviors can be modified by opt\-in commands, detailed below\. +. +.IP "\(bu" 4 +\fBlz4 \-m\fR makes it possible to provide multiple input filenames, which will be compressed into files using suffix \fB\.lz4\fR\. Progress notifications become disabled by default (use \fB\-v\fR to enable them)\. This mode has a behavior which more closely mimics \fBgzip\fR command line, with the main remaining difference being that source files are preserved by default\. +. +.IP "\(bu" 4 +Similarly, \fBlz4 \-m \-d\fR can decompress multiple \fB*\.lz4\fR files\. +. +.IP "\(bu" 4 +It\'s possible to opt\-in to erase source files on successful compression or decompression, using \fB\-\-rm\fR command\. +. +.IP "\(bu" 4 +Consequently, \fBlz4 \-m \-\-rm\fR behaves the same as \fBgzip\fR\. +. +.IP "" 0 +. +.SS "Concatenation of \.lz4 files" +It is possible to concatenate \fB\.lz4\fR files as is\. \fBlz4\fR will decompress such files as if they were a single \fB\.lz4\fR file\. For example: +. +.IP "" 4 +. +.nf + +lz4 file1 > foo\.lz4 +lz4 file2 >> foo\.lz4 +. +.fi +. +.IP "" 0 +. +.P +Then \fBlz4cat foo\.lz4\fR is equivalent to \fBcat file1 file2\fR\. +. +.SH "OPTIONS" +. +.SS "Short commands concatenation" +In some cases, some options can be expressed using short command \fB\-x\fR or long command \fB\-\-long\-word\fR\. Short commands can be concatenated together\. For example, \fB\-d \-c\fR is equivalent to \fB\-dc\fR\. Long commands cannot be concatenated\. They must be clearly separated by a space\. +. +.SS "Multiple commands" +When multiple contradictory commands are issued on a same command line, only the latest one will be applied\. +. +.SS "Operation mode" +. +.TP +\fB\-z\fR \fB\-\-compress\fR +Compress\. This is the default operation mode when no operation mode option is specified, no other operation mode is implied from the command name (for example, \fBunlz4\fR implies \fB\-\-decompress\fR), nor from the input file name (for example, a file extension \fB\.lz4\fR implies \fB\-\-decompress\fR by default)\. \fB\-z\fR can also be used to force compression of an already compressed \fB\.lz4\fR file\. +. +.TP +\fB\-d\fR \fB\-\-decompress\fR \fB\-\-uncompress\fR +Decompress\. \fB\-\-decompress\fR is also the default operation when the input filename has an \fB\.lz4\fR extension\. +. +.TP +\fB\-t\fR \fB\-\-test\fR +Test the integrity of compressed \fB\.lz4\fR files\. The decompressed data is discarded\. No files are created nor removed\. +. +.TP +\fB\-b#\fR +Benchmark mode, using \fB#\fR compression level\. +. +.TP +\fB\-\-list\fR +List information about \.lz4 files\. note : current implementation is limited to single\-frame \.lz4 files\. +. +.SS "Operation modifiers" +. +.TP +\fB\-#\fR +Compression level, with # being any value from 1 to 12\. Higher values trade compression speed for compression ratio\. Values above 12 are considered the same as 12\. Recommended values are 1 for fast compression (default), and 9 for high compression\. Speed/compression trade\-off will vary depending on data to compress\. Decompression speed remains fast at all settings\. +. +.TP +\fB\-\-fast[=#]\fR +Switch to ultra\-fast compression levels\. The higher the value, the faster the compression speed, at the cost of some compression ratio\. If \fB=#\fR is not present, it defaults to \fB1\fR\. This setting overrides compression level if one was set previously\. Similarly, if a compression level is set after \fB\-\-fast\fR, it overrides it\. +. +.TP +\fB\-\-best\fR +Set highest compression level\. Same as \-12\. +. +.TP +\fB\-\-favor\-decSpeed\fR +Generate compressed data optimized for decompression speed\. Compressed data will be larger as a consequence (typically by ~0\.5%), while decompression speed will be improved by 5\-20%, depending on use cases\. This option only works in combination with very high compression levels (>=10)\. +. +.TP +\fB\-D dictionaryName\fR +Compress, decompress or benchmark using dictionary \fIdictionaryName\fR\. Compression and decompression must use the same dictionary to be compatible\. Using a different dictionary during decompression will either abort due to decompression error, or generate a checksum error\. +. +.TP +\fB\-f\fR \fB\-\-[no\-]force\fR +This option has several effects: +. +.IP +If the target file already exists, overwrite it without prompting\. +. +.IP +When used with \fB\-\-decompress\fR and \fBlz4\fR cannot recognize the type of the source file, copy the source file as is to standard output\. This allows \fBlz4cat \-\-force\fR to be used like \fBcat (1)\fR for files that have not been compressed with \fBlz4\fR\. +. +.TP +\fB\-c\fR \fB\-\-stdout\fR \fB\-\-to\-stdout\fR +Force write to standard output, even if it is the console\. +. +.TP +\fB\-m\fR \fB\-\-multiple\fR +Multiple input files\. Compressed file names will be appended a \fB\.lz4\fR suffix\. This mode also reduces notification level\. Can also be used to list multiple files\. \fBlz4 \-m\fR has a behavior equivalent to \fBgzip \-k\fR (it preserves source files by default)\. +. +.TP +\fB\-r\fR +operate recursively on directories\. This mode also sets \fB\-m\fR (multiple input files)\. +. +.TP +\fB\-B#\fR +Block size [4\-7](default : 7) +. +.br +\fB\-B4\fR= 64KB ; \fB\-B5\fR= 256KB ; \fB\-B6\fR= 1MB ; \fB\-B7\fR= 4MB +. +.TP +\fB\-BI\fR +Produce independent blocks (default) +. +.TP +\fB\-BD\fR +Blocks depend on predecessors (improves compression ratio, more noticeable on small blocks) +. +.TP +\fB\-BX\fR +Generate block checksums (default:disabled) +. +.TP +\fB\-\-[no\-]frame\-crc\fR +Select frame checksum (default:enabled) +. +.TP +\fB\-\-no\-crc\fR +Disable both frame and block checksums +. +.TP +\fB\-\-[no\-]content\-size\fR +Header includes original size (default:not present) +. +.br +Note : this option can only be activated when the original size can be determined, hence for a file\. It won\'t work with unknown source size, such as stdin or pipe\. +. +.TP +\fB\-\-[no\-]sparse\fR +Sparse mode support (default:enabled on file, disabled on stdout) +. +.TP +\fB\-l\fR +Use Legacy format (typically for Linux Kernel compression) +. +.br +Note : \fB\-l\fR is not compatible with \fB\-m\fR (\fB\-\-multiple\fR) nor \fB\-r\fR +. +.SS "Other options" +. +.TP +\fB\-v\fR \fB\-\-verbose\fR +Verbose mode +. +.TP +\fB\-q\fR \fB\-\-quiet\fR +Suppress warnings and real\-time statistics; specify twice to suppress errors too +. +.TP +\fB\-h\fR \fB\-H\fR \fB\-\-help\fR +Display help/long help and exit +. +.TP +\fB\-V\fR \fB\-\-version\fR +Display Version number and exit +. +.TP +\fB\-k\fR \fB\-\-keep\fR +Preserve source files (default behavior) +. +.TP +\fB\-\-rm\fR +Delete source files on successful compression or decompression +. +.TP +\fB\-\-\fR +Treat all subsequent arguments as files +. +.SS "Benchmark mode" +. +.TP +\fB\-b#\fR +Benchmark file(s), using # compression level +. +.TP +\fB\-e#\fR +Benchmark multiple compression levels, from b# to e# (included) +. +.TP +\fB\-i#\fR +Minimum evaluation time in seconds [1\-9] (default : 3) +. +.SH "BUGS" +Report bugs at: https://github\.com/lz4/lz4/issues +. +.SH "AUTHOR" +Yann Collet diff --git a/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/bin/markdown-it b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/bin/markdown-it new file mode 100644 index 0000000000000000000000000000000000000000..028b35f95e9263bc863c0c589fa7c777e35ca97f --- /dev/null +++ b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/bin/markdown-it @@ -0,0 +1,11 @@ +#!/home/task_176700162971740/croot/markdown-it-py_1767001650253/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeh/bin/python + +# -*- coding: utf-8 -*- +import re +import sys + +from markdown_it.cli.parse import main + +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/about.json b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/about.json new file mode 100644 index 0000000000000000000000000000000000000000..abec307a405cbe04b4b02f21079d4464adee9a77 --- /dev/null +++ b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/about.json @@ -0,0 +1,173 @@ +{ + "channels": [ + "https://repo.anaconda.com/pkgs/main", + "https://repo.anaconda.com/pkgs/r", + "https://repo.anaconda.com/pkgs/r" + ], + "conda_build_version": "25.1.2", + "conda_version": "25.1.1", + "description": "Python port of markdown-it. Markdown parsing, done right!\n", + "dev_url": "https://github.com/executablebooks/markdown-it-py", + "doc_url": "https://github.com/executablebooks/markdown-it-py/blob/master/README.md", + "env_vars": { + "CIO_TEST": "" + }, + "extra": { + "copy_test_source_files": true, + "final": true, + "recipe-maintainers": [ + "dopplershift", + "choldgraf" + ] + }, + "home": "https://github.com/executablebooks/markdown-it-py", + "identifiers": [], + "keywords": [], + "license": "MIT", + "license_family": "MIT", + "license_file": "LICENSE", + "root_pkgs": [ + "_libgcc_mutex 0.1 main", + "ca-certificates 2025.11.4 h06a4308_0", + "ld_impl_linux-64 2.40 h12ee557_0", + "libstdcxx-ng 11.2.0 h1234567_1", + "nlohmann_json 3.11.2 h6a678d5_0", + "pybind11-abi 5 hd3eb1b0_0", + "tzdata 2025a h04d1e81_0", + "libgomp 11.2.0 h1234567_1", + "_openmp_mutex 5.1 1_gnu", + "libgcc-ng 11.2.0 h1234567_1", + "bzip2 1.0.8 h5eee18b_6", + "c-ares 1.19.1 h5eee18b_0", + "cpp-expected 1.1.0 hdb19cb5_0", + "expat 2.7.3 h3385a95_0", + "fmt 9.1.0 hdb19cb5_1", + "icu 73.1 h6a678d5_0", + "libev 4.33 h7f8727e_1", + "libffi 3.4.4 h6a678d5_1", + "libuuid 1.41.5 h5eee18b_0", + "lz4-c 1.9.4 h6a678d5_1", + "ncurses 6.4 h6a678d5_0", + "reproc 14.2.4 h6a678d5_2", + "simdjson 3.10.1 hdb19cb5_0", + "xz 5.4.6 h5eee18b_1", + "yaml-cpp 0.8.0 h6a678d5_1", + "zlib 1.2.13 h5eee18b_1", + "libedit 3.1.20230828 h5eee18b_0", + "libnghttp2 1.57.0 h2d74bed_0", + "libssh2 1.11.1 h251f7ec_0", + "libxml2 2.13.5 hfdd30dd_0", + "pcre2 10.42 hebb0a14_1", + "readline 8.2 h5eee18b_0", + "reproc-cpp 14.2.4 h6a678d5_2", + "spdlog 1.11.0 hdb19cb5_0", + "patch 2.8 hb25bd0a_0", + "zstd 1.5.6 hc292b87_0", + "krb5 1.20.1 h143b758_1", + "libarchive 3.7.7 hfab0078_0", + "libsolv 0.7.30 he621ea3_1", + "sqlite 3.45.3 h5eee18b_0", + "python 3.12.9 h5148396_0", + "libmamba 2.0.5 haf1ee3a_1", + "menuinst 2.2.0 py312h06a4308_1", + "anaconda-anon-usage 0.5.0 py312hfc0e8ea_100", + "annotated-types 0.6.0 py312h06a4308_0", + "archspec 0.2.3 pyhd3eb1b0_0", + "boltons 24.1.0 py312h06a4308_0", + "brotli-python 1.0.9 py312h6a678d5_9", + "charset-normalizer 3.3.2 pyhd3eb1b0_0", + "distro 1.9.0 py312h06a4308_0", + "frozendict 2.4.2 py312h06a4308_0", + "idna 3.7 py312h06a4308_0", + "jsonpointer 2.1 pyhd3eb1b0_0", + "libmambapy 2.0.5 py312hdb19cb5_1", + "mdurl 0.1.0 py312h06a4308_0", + "packaging 24.2 py312h06a4308_0", + "platformdirs 3.10.0 py312h06a4308_0", + "pluggy 1.5.0 py312h06a4308_0", + "pycosat 0.6.6 py312h5eee18b_2", + "pycparser 2.21 pyhd3eb1b0_0", + "pygments 2.15.1 py312h06a4308_1", + "pysocks 1.7.1 py312h06a4308_0", + "ruamel.yaml.clib 0.2.8 py312h5eee18b_0", + "setuptools 75.8.0 py312h06a4308_0", + "tqdm 4.67.1 py312he106c6f_0", + "truststore 0.10.0 py312h06a4308_0", + "typing_extensions 4.12.2 py312h06a4308_0", + "wheel 0.45.1 py312h06a4308_0", + "cffi 1.17.1 py312h1fdaa30_1", + "jsonpatch 1.33 py312h06a4308_1", + "markdown-it-py 2.2.0 py312h06a4308_1", + "pip 25.0 py312h06a4308_0", + "ruamel.yaml 0.18.6 py312h5eee18b_0", + "typing-extensions 4.12.2 py312h06a4308_0", + "urllib3 2.3.0 py312h06a4308_0", + "cryptography 43.0.3 py312h7825ff9_1", + "pydantic-core 2.27.1 py312h4aa5aa6_0", + "requests 2.32.3 py312h06a4308_1", + "rich 13.9.4 py312h06a4308_0", + "zstandard 0.23.0 py312h2c38b39_1", + "conda-content-trust 0.2.0 py312h06a4308_1", + "conda-package-streaming 0.11.0 py312h06a4308_0", + "pydantic 2.10.3 py312h06a4308_0", + "conda-package-handling 2.4.0 py312h06a4308_0", + "conda 25.1.1 py312h06a4308_0", + "conda-anaconda-tos 0.1.2 py312h06a4308_0", + "conda-libmamba-solver 25.1.1 pyhd3eb1b0_0", + "libiconv 1.16 h5eee18b_3", + "liblief 0.12.3 h6a678d5_0", + "libsodium 1.0.20 heac8642_0", + "libunistring 1.3 hb25bd0a_0", + "openssl 3.0.18 hd6dcaed_0", + "patchelf 0.17.2 h6a678d5_0", + "perl 5.40.2 0_h5eee18b_perl5", + "pthread-stubs 0.3 h0ce48e5_1", + "xorg-libxau 1.0.12 h9b100fa_0", + "xorg-libxdmcp 1.1.5 h9b100fa_0", + "xorg-xorgproto 2024.1 h5eee18b_1", + "yaml 0.2.5 h7b6447c_0", + "libxcb 1.17.0 h9b100fa_0", + "gettext 0.21.0 hedfda30_2", + "xorg-libx11 1.8.12 h9b100fa_1", + "libidn2 2.3.8 hf80d704_0", + "tk 8.6.15 h54e0aa7_0", + "libcurl 8.16.0 heebcbe5_0", + "git 2.51.0 pl5382h000ed5b_0", + "argcomplete 3.6.2 py312h06a4308_0", + "attrs 25.4.0 py312h06a4308_2", + "certifi 2025.10.5 py312h06a4308_0", + "chardet 5.2.0 py312h06a4308_0", + "click 8.2.1 py312h06a4308_0", + "filelock 3.20.0 py312h06a4308_0", + "jmespath 1.0.1 py312h06a4308_0", + "markupsafe 3.0.2 py312h5eee18b_0", + "more-itertools 10.8.0 py312h06a4308_0", + "pkginfo 1.12.0 py312h06a4308_0", + "psutil 7.0.0 py312hee96239_1", + "py-lief 0.12.3 py312h6a678d5_0", + "python-libarchive-c 5.1 pyhd3eb1b0_0", + "pytz 2025.2 py312h06a4308_0", + "pyyaml 6.0.2 py312h5eee18b_0", + "rpds-py 0.28.0 py312h498d7c9_0", + "six 1.17.0 py312h06a4308_0", + "soupsieve 2.5 py312h06a4308_0", + "tomlkit 0.13.2 py312h06a4308_0", + "xmltodict 0.14.2 py312h06a4308_0", + "jinja2 3.1.6 py312h06a4308_0", + "python-dateutil 2.9.0post0 py312h06a4308_2", + "referencing 0.37.0 py312h06a4308_0", + "yq 3.4.3 py312h06a4308_0", + "beautifulsoup4 4.13.5 py312h06a4308_0", + "botocore 1.40.54 py312h06a4308_0", + "jsonschema-specifications 2023.7.1 py312h06a4308_1", + "pynacl 1.5.0 py312h2630517_2", + "jsonschema 4.25.0 py312h06a4308_1", + "s3transfer 0.14.0 py312h06a4308_0", + "boto3 1.40.54 py312h06a4308_0", + "conda-anaconda-telemetry 0.3.0 pyhd3eb1b0_1", + "conda-index 0.5.0 py312h06a4308_0", + "conda-build 25.1.2 py312h06a4308_0" + ], + "summary": "Python port of markdown-it. Markdown parsing, done right!", + "tags": [] +} \ No newline at end of file diff --git a/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/files b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/files new file mode 100644 index 0000000000000000000000000000000000000000..b17bf34d945219d62337623ac86f2555ef2dc4f9 --- /dev/null +++ b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/files @@ -0,0 +1,144 @@ +bin/markdown-it +lib/python3.13/site-packages/markdown_it/__init__.py +lib/python3.13/site-packages/markdown_it/__pycache__/__init__.cpython-313.pyc +lib/python3.13/site-packages/markdown_it/__pycache__/_compat.cpython-313.pyc +lib/python3.13/site-packages/markdown_it/__pycache__/_punycode.cpython-313.pyc +lib/python3.13/site-packages/markdown_it/__pycache__/main.cpython-313.pyc +lib/python3.13/site-packages/markdown_it/__pycache__/parser_block.cpython-313.pyc +lib/python3.13/site-packages/markdown_it/__pycache__/parser_core.cpython-313.pyc +lib/python3.13/site-packages/markdown_it/__pycache__/parser_inline.cpython-313.pyc +lib/python3.13/site-packages/markdown_it/__pycache__/renderer.cpython-313.pyc +lib/python3.13/site-packages/markdown_it/__pycache__/ruler.cpython-313.pyc +lib/python3.13/site-packages/markdown_it/__pycache__/token.cpython-313.pyc +lib/python3.13/site-packages/markdown_it/__pycache__/tree.cpython-313.pyc +lib/python3.13/site-packages/markdown_it/__pycache__/utils.cpython-313.pyc +lib/python3.13/site-packages/markdown_it/_compat.py +lib/python3.13/site-packages/markdown_it/_punycode.py +lib/python3.13/site-packages/markdown_it/cli/__init__.py +lib/python3.13/site-packages/markdown_it/cli/__pycache__/__init__.cpython-313.pyc +lib/python3.13/site-packages/markdown_it/cli/__pycache__/parse.cpython-313.pyc +lib/python3.13/site-packages/markdown_it/cli/parse.py +lib/python3.13/site-packages/markdown_it/common/__init__.py +lib/python3.13/site-packages/markdown_it/common/__pycache__/__init__.cpython-313.pyc +lib/python3.13/site-packages/markdown_it/common/__pycache__/entities.cpython-313.pyc +lib/python3.13/site-packages/markdown_it/common/__pycache__/html_blocks.cpython-313.pyc +lib/python3.13/site-packages/markdown_it/common/__pycache__/html_re.cpython-313.pyc +lib/python3.13/site-packages/markdown_it/common/__pycache__/normalize_url.cpython-313.pyc +lib/python3.13/site-packages/markdown_it/common/__pycache__/utils.cpython-313.pyc +lib/python3.13/site-packages/markdown_it/common/entities.py +lib/python3.13/site-packages/markdown_it/common/html_blocks.py +lib/python3.13/site-packages/markdown_it/common/html_re.py +lib/python3.13/site-packages/markdown_it/common/normalize_url.py +lib/python3.13/site-packages/markdown_it/common/utils.py +lib/python3.13/site-packages/markdown_it/helpers/__init__.py +lib/python3.13/site-packages/markdown_it/helpers/__pycache__/__init__.cpython-313.pyc +lib/python3.13/site-packages/markdown_it/helpers/__pycache__/parse_link_destination.cpython-313.pyc +lib/python3.13/site-packages/markdown_it/helpers/__pycache__/parse_link_label.cpython-313.pyc +lib/python3.13/site-packages/markdown_it/helpers/__pycache__/parse_link_title.cpython-313.pyc +lib/python3.13/site-packages/markdown_it/helpers/parse_link_destination.py +lib/python3.13/site-packages/markdown_it/helpers/parse_link_label.py +lib/python3.13/site-packages/markdown_it/helpers/parse_link_title.py +lib/python3.13/site-packages/markdown_it/main.py +lib/python3.13/site-packages/markdown_it/parser_block.py +lib/python3.13/site-packages/markdown_it/parser_core.py +lib/python3.13/site-packages/markdown_it/parser_inline.py +lib/python3.13/site-packages/markdown_it/port.yaml +lib/python3.13/site-packages/markdown_it/presets/__init__.py +lib/python3.13/site-packages/markdown_it/presets/__pycache__/__init__.cpython-313.pyc +lib/python3.13/site-packages/markdown_it/presets/__pycache__/commonmark.cpython-313.pyc +lib/python3.13/site-packages/markdown_it/presets/__pycache__/default.cpython-313.pyc +lib/python3.13/site-packages/markdown_it/presets/__pycache__/zero.cpython-313.pyc +lib/python3.13/site-packages/markdown_it/presets/commonmark.py +lib/python3.13/site-packages/markdown_it/presets/default.py +lib/python3.13/site-packages/markdown_it/presets/zero.py +lib/python3.13/site-packages/markdown_it/py.typed +lib/python3.13/site-packages/markdown_it/renderer.py +lib/python3.13/site-packages/markdown_it/ruler.py +lib/python3.13/site-packages/markdown_it/rules_block/__init__.py +lib/python3.13/site-packages/markdown_it/rules_block/__pycache__/__init__.cpython-313.pyc +lib/python3.13/site-packages/markdown_it/rules_block/__pycache__/blockquote.cpython-313.pyc +lib/python3.13/site-packages/markdown_it/rules_block/__pycache__/code.cpython-313.pyc +lib/python3.13/site-packages/markdown_it/rules_block/__pycache__/fence.cpython-313.pyc +lib/python3.13/site-packages/markdown_it/rules_block/__pycache__/heading.cpython-313.pyc +lib/python3.13/site-packages/markdown_it/rules_block/__pycache__/hr.cpython-313.pyc +lib/python3.13/site-packages/markdown_it/rules_block/__pycache__/html_block.cpython-313.pyc +lib/python3.13/site-packages/markdown_it/rules_block/__pycache__/lheading.cpython-313.pyc +lib/python3.13/site-packages/markdown_it/rules_block/__pycache__/list.cpython-313.pyc +lib/python3.13/site-packages/markdown_it/rules_block/__pycache__/paragraph.cpython-313.pyc +lib/python3.13/site-packages/markdown_it/rules_block/__pycache__/reference.cpython-313.pyc +lib/python3.13/site-packages/markdown_it/rules_block/__pycache__/state_block.cpython-313.pyc +lib/python3.13/site-packages/markdown_it/rules_block/__pycache__/table.cpython-313.pyc +lib/python3.13/site-packages/markdown_it/rules_block/blockquote.py +lib/python3.13/site-packages/markdown_it/rules_block/code.py +lib/python3.13/site-packages/markdown_it/rules_block/fence.py +lib/python3.13/site-packages/markdown_it/rules_block/heading.py +lib/python3.13/site-packages/markdown_it/rules_block/hr.py +lib/python3.13/site-packages/markdown_it/rules_block/html_block.py +lib/python3.13/site-packages/markdown_it/rules_block/lheading.py +lib/python3.13/site-packages/markdown_it/rules_block/list.py +lib/python3.13/site-packages/markdown_it/rules_block/paragraph.py +lib/python3.13/site-packages/markdown_it/rules_block/reference.py +lib/python3.13/site-packages/markdown_it/rules_block/state_block.py +lib/python3.13/site-packages/markdown_it/rules_block/table.py +lib/python3.13/site-packages/markdown_it/rules_core/__init__.py +lib/python3.13/site-packages/markdown_it/rules_core/__pycache__/__init__.cpython-313.pyc +lib/python3.13/site-packages/markdown_it/rules_core/__pycache__/block.cpython-313.pyc +lib/python3.13/site-packages/markdown_it/rules_core/__pycache__/inline.cpython-313.pyc +lib/python3.13/site-packages/markdown_it/rules_core/__pycache__/linkify.cpython-313.pyc +lib/python3.13/site-packages/markdown_it/rules_core/__pycache__/normalize.cpython-313.pyc +lib/python3.13/site-packages/markdown_it/rules_core/__pycache__/replacements.cpython-313.pyc +lib/python3.13/site-packages/markdown_it/rules_core/__pycache__/smartquotes.cpython-313.pyc +lib/python3.13/site-packages/markdown_it/rules_core/__pycache__/state_core.cpython-313.pyc +lib/python3.13/site-packages/markdown_it/rules_core/__pycache__/text_join.cpython-313.pyc +lib/python3.13/site-packages/markdown_it/rules_core/block.py +lib/python3.13/site-packages/markdown_it/rules_core/inline.py +lib/python3.13/site-packages/markdown_it/rules_core/linkify.py +lib/python3.13/site-packages/markdown_it/rules_core/normalize.py +lib/python3.13/site-packages/markdown_it/rules_core/replacements.py +lib/python3.13/site-packages/markdown_it/rules_core/smartquotes.py +lib/python3.13/site-packages/markdown_it/rules_core/state_core.py +lib/python3.13/site-packages/markdown_it/rules_core/text_join.py +lib/python3.13/site-packages/markdown_it/rules_inline/__init__.py +lib/python3.13/site-packages/markdown_it/rules_inline/__pycache__/__init__.cpython-313.pyc +lib/python3.13/site-packages/markdown_it/rules_inline/__pycache__/autolink.cpython-313.pyc +lib/python3.13/site-packages/markdown_it/rules_inline/__pycache__/backticks.cpython-313.pyc +lib/python3.13/site-packages/markdown_it/rules_inline/__pycache__/balance_pairs.cpython-313.pyc +lib/python3.13/site-packages/markdown_it/rules_inline/__pycache__/emphasis.cpython-313.pyc +lib/python3.13/site-packages/markdown_it/rules_inline/__pycache__/entity.cpython-313.pyc +lib/python3.13/site-packages/markdown_it/rules_inline/__pycache__/escape.cpython-313.pyc +lib/python3.13/site-packages/markdown_it/rules_inline/__pycache__/fragments_join.cpython-313.pyc +lib/python3.13/site-packages/markdown_it/rules_inline/__pycache__/html_inline.cpython-313.pyc +lib/python3.13/site-packages/markdown_it/rules_inline/__pycache__/image.cpython-313.pyc +lib/python3.13/site-packages/markdown_it/rules_inline/__pycache__/link.cpython-313.pyc +lib/python3.13/site-packages/markdown_it/rules_inline/__pycache__/linkify.cpython-313.pyc +lib/python3.13/site-packages/markdown_it/rules_inline/__pycache__/newline.cpython-313.pyc +lib/python3.13/site-packages/markdown_it/rules_inline/__pycache__/state_inline.cpython-313.pyc +lib/python3.13/site-packages/markdown_it/rules_inline/__pycache__/strikethrough.cpython-313.pyc +lib/python3.13/site-packages/markdown_it/rules_inline/__pycache__/text.cpython-313.pyc +lib/python3.13/site-packages/markdown_it/rules_inline/autolink.py +lib/python3.13/site-packages/markdown_it/rules_inline/backticks.py +lib/python3.13/site-packages/markdown_it/rules_inline/balance_pairs.py +lib/python3.13/site-packages/markdown_it/rules_inline/emphasis.py +lib/python3.13/site-packages/markdown_it/rules_inline/entity.py +lib/python3.13/site-packages/markdown_it/rules_inline/escape.py +lib/python3.13/site-packages/markdown_it/rules_inline/fragments_join.py +lib/python3.13/site-packages/markdown_it/rules_inline/html_inline.py +lib/python3.13/site-packages/markdown_it/rules_inline/image.py +lib/python3.13/site-packages/markdown_it/rules_inline/link.py +lib/python3.13/site-packages/markdown_it/rules_inline/linkify.py +lib/python3.13/site-packages/markdown_it/rules_inline/newline.py +lib/python3.13/site-packages/markdown_it/rules_inline/state_inline.py +lib/python3.13/site-packages/markdown_it/rules_inline/strikethrough.py +lib/python3.13/site-packages/markdown_it/rules_inline/text.py +lib/python3.13/site-packages/markdown_it/token.py +lib/python3.13/site-packages/markdown_it/tree.py +lib/python3.13/site-packages/markdown_it/utils.py +lib/python3.13/site-packages/markdown_it_py-4.0.0.dist-info/INSTALLER +lib/python3.13/site-packages/markdown_it_py-4.0.0.dist-info/METADATA +lib/python3.13/site-packages/markdown_it_py-4.0.0.dist-info/RECORD +lib/python3.13/site-packages/markdown_it_py-4.0.0.dist-info/REQUESTED +lib/python3.13/site-packages/markdown_it_py-4.0.0.dist-info/WHEEL +lib/python3.13/site-packages/markdown_it_py-4.0.0.dist-info/direct_url.json +lib/python3.13/site-packages/markdown_it_py-4.0.0.dist-info/entry_points.txt +lib/python3.13/site-packages/markdown_it_py-4.0.0.dist-info/licenses/LICENSE +lib/python3.13/site-packages/markdown_it_py-4.0.0.dist-info/licenses/LICENSE.markdown-it diff --git a/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/git b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/git new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/has_prefix b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/has_prefix new file mode 100644 index 0000000000000000000000000000000000000000..3d1b4143ae2a3f17259329a774b9c1b34f3e1cea --- /dev/null +++ b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/has_prefix @@ -0,0 +1 @@ +/home/task_176700162971740/croot/markdown-it-py_1767001650253/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeh text bin/markdown-it diff --git a/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/hash_input.json b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/hash_input.json new file mode 100644 index 0000000000000000000000000000000000000000..e1489271625fa4f5548417553f3725447d4df321 --- /dev/null +++ b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/hash_input.json @@ -0,0 +1,4 @@ +{ + "channel_targets": "defaults", + "target_platform": "linux-64" +} \ No newline at end of file diff --git a/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/index.json b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/index.json new file mode 100644 index 0000000000000000000000000000000000000000..90e4b3c256e6167eac842593a4e2a0f9649f3474 --- /dev/null +++ b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/index.json @@ -0,0 +1,27 @@ +{ + "arch": "x86_64", + "build": "py313h06a4308_1", + "build_number": 1, + "constrains": [ + "mdit-py-plugins >=0.5.0", + "sphinx-book-theme >=1,<2", + "commonmark >=0.9,<0.10", + "panflute >=2.3,<2.4", + "markdown >=3.4,<3.9", + "mistletoe >=1.0,<2.0", + "mistune >=3.0,<4.0", + "linkify-it-py >=1,<3" + ], + "depends": [ + "mdurl >=0.1,<0.2", + "python >=3.13,<3.14.0a0", + "python_abi 3.13.* *_cp313" + ], + "license": "MIT", + "license_family": "MIT", + "name": "markdown-it-py", + "platform": "linux", + "subdir": "linux-64", + "timestamp": 1767001668294, + "version": "4.0.0" +} \ No newline at end of file diff --git a/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/licenses/LICENSE b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/licenses/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..582ddf59e08277fe6e78cee924d2c84805fe36fe --- /dev/null +++ b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/licenses/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2020 ExecutableBookProject + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/paths.json b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/paths.json new file mode 100644 index 0000000000000000000000000000000000000000..a2bf1feda148d355fa6784688159954ededbfd9f --- /dev/null +++ b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/paths.json @@ -0,0 +1,871 @@ +{ + "paths": [ + { + "_path": "bin/markdown-it", + "file_mode": "text", + "path_type": "hardlink", + "prefix_placeholder": "/home/task_176700162971740/croot/markdown-it-py_1767001650253/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeh", + "sha256": "a0ddbaee228b7b7f8f32869bf6600c0dda4c56e29394b82f9c466a99a9803b7e", + "size_in_bytes": 474 + }, + { + "_path": "lib/python3.13/site-packages/markdown_it/__init__.py", + "path_type": "hardlink", + "sha256": "47b7ccbc3c5a81e609e10e9da017229a8832d5cb5c575781b8216ee4fafc6db0", + "size_in_bytes": 114 + }, + { + "_path": "lib/python3.13/site-packages/markdown_it/__pycache__/__init__.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "e669b488e9ea6c7d605d8abb3606f60cc9b5ecb98369f98f415a545635b7766f", + "size_in_bytes": 284 + }, + { + "_path": "lib/python3.13/site-packages/markdown_it/__pycache__/_compat.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "09ad9edf9687645c20057d8334110c166cc94bc5f6750b4172ccfbfdb9f51676", + "size_in_bytes": 197 + }, + { + "_path": "lib/python3.13/site-packages/markdown_it/__pycache__/_punycode.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "ffe7a5ad09df1c4b47cc7518afe9b2955daf71cebadce2ceacf41581ecf31a24", + "size_in_bytes": 2612 + }, + { + "_path": "lib/python3.13/site-packages/markdown_it/__pycache__/main.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "6020715638ded61f0baab6586521526e4a54dea0b122a952564d417499445f9f", + "size_in_bytes": 16646 + }, + { + "_path": "lib/python3.13/site-packages/markdown_it/__pycache__/parser_block.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "8d19959403d2c2d577063fce06be318d51793510a944829daa9bd1258ff0094f", + "size_in_bytes": 4135 + }, + { + "_path": "lib/python3.13/site-packages/markdown_it/__pycache__/parser_core.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "9f142985a3efeb423aafbb0dea9f08d8d7048361eb279b0abb74da2b84af5ef0", + "size_in_bytes": 1842 + }, + { + "_path": "lib/python3.13/site-packages/markdown_it/__pycache__/parser_inline.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "a7b1662058afc16359946ca31ce0d5e468dfa83954b096389516b354befec9dd", + "size_in_bytes": 5400 + }, + { + "_path": "lib/python3.13/site-packages/markdown_it/__pycache__/renderer.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "1921680f8f0c1ce25454252593b11f149823eeb21ebfb2947fcd0b3cd7c6a1d9", + "size_in_bytes": 11832 + }, + { + "_path": "lib/python3.13/site-packages/markdown_it/__pycache__/ruler.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "0a19e5e9fad92e11d98dfa7daba5f8d834e113a77a6df398ad80cc796d7bf5bb", + "size_in_bytes": 12177 + }, + { + "_path": "lib/python3.13/site-packages/markdown_it/__pycache__/token.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "690a12999047533ca1d398ab2ad21371b0d12a3e5b7d4a37eff1c6800eba60c0", + "size_in_bytes": 7764 + }, + { + "_path": "lib/python3.13/site-packages/markdown_it/__pycache__/tree.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "8506a5095cb4b8e930097db0d5e79078a5dc27306bf5fa4110c58bc475592d53", + "size_in_bytes": 15516 + }, + { + "_path": "lib/python3.13/site-packages/markdown_it/__pycache__/utils.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "3f4c5d177d008cf2056865918de91a7154f35f665d1c566779ee97d080adb0c1", + "size_in_bytes": 8429 + }, + { + "_path": "lib/python3.13/site-packages/markdown_it/_compat.py", + "path_type": "hardlink", + "sha256": "5384bfdb2df380b6557cc7a71d16891415bccaa87699406e236f752c6415389f", + "size_in_bytes": 35 + }, + { + "_path": "lib/python3.13/site-packages/markdown_it/_punycode.py", + "path_type": "hardlink", + "sha256": "26f48e649e152abe7ccfbba71463342a17d3c6a1cc936c3c82097169ed90b333", + "size_in_bytes": 2373 + }, + { + "_path": "lib/python3.13/site-packages/markdown_it/cli/__init__.py", + "path_type": "hardlink", + "sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "size_in_bytes": 0 + }, + { + "_path": "lib/python3.13/site-packages/markdown_it/cli/__pycache__/__init__.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "aa5a689e86f98044e6b67d22b7d6104a45f8a95f92edf09ca84b0ba4633091b7", + "size_in_bytes": 153 + }, + { + "_path": "lib/python3.13/site-packages/markdown_it/cli/__pycache__/parse.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "ae570732bc047403f1e35641424692b7ec353c2474064caf95fe1749e0636f40", + "size_in_bytes": 4390 + }, + { + "_path": "lib/python3.13/site-packages/markdown_it/cli/parse.py", + "path_type": "hardlink", + "sha256": "527dcdedfc861e1640428b86567471f9665ca4ac042b6385d3caf354010189ef", + "size_in_bytes": 2881 + }, + { + "_path": "lib/python3.13/site-packages/markdown_it/common/__init__.py", + "path_type": "hardlink", + "sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "size_in_bytes": 0 + }, + { + "_path": "lib/python3.13/site-packages/markdown_it/common/__pycache__/__init__.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "2459f1a4d9b2095b8b83de928a7cfe7eb82fd7d4e507cba2b8497be30fc79913", + "size_in_bytes": 156 + }, + { + "_path": "lib/python3.13/site-packages/markdown_it/common/__pycache__/entities.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "2e628b97c97575d118bde2b91fb0663e7f8bde047ad74469fef39ff8a5ef183d", + "size_in_bytes": 524 + }, + { + "_path": "lib/python3.13/site-packages/markdown_it/common/__pycache__/html_blocks.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "445a884701e1567e102711a1bb83efaf31aedf11cc5f9f47869fc69d5b5d35f8", + "size_in_bytes": 740 + }, + { + "_path": "lib/python3.13/site-packages/markdown_it/common/__pycache__/html_re.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "c8e633c1442c2da427ef6afe00fd69e6c99c84e8cdeeede80cf74427035f8739", + "size_in_bytes": 1292 + }, + { + "_path": "lib/python3.13/site-packages/markdown_it/common/__pycache__/normalize_url.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "c8234fd0c37d0e85d3488a6ffca4ff6889dd54254d0314b0e37d6086f9ebe998", + "size_in_bytes": 3293 + }, + { + "_path": "lib/python3.13/site-packages/markdown_it/common/__pycache__/utils.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "d772aa8384b4051c5f52eb259448002856e72c730d991d3150e22aab599ec004", + "size_in_bytes": 8167 + }, + { + "_path": "lib/python3.13/site-packages/markdown_it/common/entities.py", + "path_type": "hardlink", + "sha256": "1184429942fb654d454462d25d094fc77e7a958f04501745cb1f7a79219ce9dd", + "size_in_bytes": 157 + }, + { + "_path": "lib/python3.13/site-packages/markdown_it/common/html_blocks.py", + "path_type": "hardlink", + "sha256": "4176d40cca0df655cb818164d830589659cb885ba42fa7479f65fdf18e967b0b", + "size_in_bytes": 986 + }, + { + "_path": "lib/python3.13/site-packages/markdown_it/common/html_re.py", + "path_type": "hardlink", + "sha256": "16080012ff482fc80742ab064e41dc7f7df7ad3a23c06d03409307f6856ed1f5", + "size_in_bytes": 926 + }, + { + "_path": "lib/python3.13/site-packages/markdown_it/common/normalize_url.py", + "path_type": "hardlink", + "sha256": "6af3979cb77dc70e63535ab93cb7ed8c033da6f1b1f25f500c4926652cab3208", + "size_in_bytes": 2568 + }, + { + "_path": "lib/python3.13/site-packages/markdown_it/common/utils.py", + "path_type": "hardlink", + "sha256": "a4c82f30e137656f81749ec77eece55cd2b20f522f93b8c712b73627f07c2793", + "size_in_bytes": 8734 + }, + { + "_path": "lib/python3.13/site-packages/markdown_it/helpers/__init__.py", + "path_type": "hardlink", + "sha256": "607db3edd4b459473ff65e753163efacbb45a013e1e092c6c39f0eba119108ad", + "size_in_bytes": 253 + }, + { + "_path": "lib/python3.13/site-packages/markdown_it/helpers/__pycache__/__init__.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "954805923b8ec899e0e669df4e16756a4a5f9bc049880468e8f7837c07861a15", + "size_in_bytes": 419 + }, + { + "_path": "lib/python3.13/site-packages/markdown_it/helpers/__pycache__/parse_link_destination.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "485e8a67eac7d736bd9009cc28c00fc2667e613baeb1d45b7b7a47f6fef781ac", + "size_in_bytes": 2139 + }, + { + "_path": "lib/python3.13/site-packages/markdown_it/helpers/__pycache__/parse_link_label.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "b6ecb277a283131ddbd23d3927aa8a557a916563f2e54d597c2e2d4007ec6cbe", + "size_in_bytes": 1415 + }, + { + "_path": "lib/python3.13/site-packages/markdown_it/helpers/__pycache__/parse_link_title.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "f0deff10c780efb95762f79aa0e92213a4e4988656cccade242af8be7b6ce146", + "size_in_bytes": 2407 + }, + { + "_path": "lib/python3.13/site-packages/markdown_it/helpers/parse_link_destination.py", + "path_type": "hardlink", + "sha256": "bbec715953f7835b3b0b56d0b9022d898c83ad8a181c9cd76995cf82bfa8ea66", + "size_in_bytes": 1906 + }, + { + "_path": "lib/python3.13/site-packages/markdown_it/helpers/parse_link_label.py", + "path_type": "hardlink", + "sha256": "3c81c6e99326dc1530d1ada6d7b9421aa36b977bdacfdd75b6ea06be2583dc8e", + "size_in_bytes": 1037 + }, + { + "_path": "lib/python3.13/site-packages/markdown_it/helpers/parse_link_title.py", + "path_type": "hardlink", + "sha256": "8e42e861030a35e5fd6ef5901e4692ae8884a36ec7ca590450d9a3f31051969e", + "size_in_bytes": 2273 + }, + { + "_path": "lib/python3.13/site-packages/markdown_it/main.py", + "path_type": "hardlink", + "sha256": "bf3b93db72c9c8aacf28dc8728a01b38790d5a9c0895d38650cf881acbf60c73", + "size_in_bytes": 12732 + }, + { + "_path": "lib/python3.13/site-packages/markdown_it/parser_block.py", + "path_type": "hardlink", + "sha256": "f8ccae81707add37bbd6ce0d71241988ae5b13a04791d17266ffdbbe2b9ab5d2", + "size_in_bytes": 3939 + }, + { + "_path": "lib/python3.13/site-packages/markdown_it/parser_core.py", + "path_type": "hardlink", + "sha256": "4919898ea7bc742e865b310046959b6b9f5c066c630abdc6b20f21dbd3bcb109", + "size_in_bytes": 1016 + }, + { + "_path": "lib/python3.13/site-packages/markdown_it/parser_inline.py", + "path_type": "hardlink", + "sha256": "cb48c28a0f0227140eee1073d19637b06bcf940293a213b02206aa9e549a4b90", + "size_in_bytes": 5024 + }, + { + "_path": "lib/python3.13/site-packages/markdown_it/port.yaml", + "path_type": "hardlink", + "sha256": "8edfeb7703a77e870e5799dcdf9adebd3c9b00040c229ffed5f95aff9dbbb151", + "size_in_bytes": 2447 + }, + { + "_path": "lib/python3.13/site-packages/markdown_it/presets/__init__.py", + "path_type": "hardlink", + "sha256": "db6bc5b7024463b8aa151b60559fa926d85c7ad7e9af53a283c5ce17dc75df6f", + "size_in_bytes": 970 + }, + { + "_path": "lib/python3.13/site-packages/markdown_it/presets/__pycache__/__init__.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "18943b69821765357151dedfa414df6a56be7ece6a122ee78b30365a72a9a901", + "size_in_bytes": 1614 + }, + { + "_path": "lib/python3.13/site-packages/markdown_it/presets/__pycache__/commonmark.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "36e3e531e2476782b6449370132edf56dfaedc2a10020d14df5bf11c59c23a98", + "size_in_bytes": 1119 + }, + { + "_path": "lib/python3.13/site-packages/markdown_it/presets/__pycache__/default.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "81dea1f88a5b00d8a9b2664499558a6766f49f4a17596b8838b80663bdb9cd3a", + "size_in_bytes": 635 + }, + { + "_path": "lib/python3.13/site-packages/markdown_it/presets/__pycache__/zero.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "5eb10642ff9a8b1d25f5fb7f52cf321a4a105ea68349e2a9ea1df9ed3c4ad004", + "size_in_bytes": 896 + }, + { + "_path": "lib/python3.13/site-packages/markdown_it/presets/commonmark.py", + "path_type": "hardlink", + "sha256": "ca07dbd11ed643f668c903f775ff81d049d832a357095392c3d48074c8ec1a8c", + "size_in_bytes": 2869 + }, + { + "_path": "lib/python3.13/site-packages/markdown_it/presets/default.py", + "path_type": "hardlink", + "sha256": "15f295508d071f733efeacba470a2d2d2b5d0b83c0680c44ec3ab4fca42d46d7", + "size_in_bytes": 1811 + }, + { + "_path": "lib/python3.13/site-packages/markdown_it/presets/zero.py", + "path_type": "hardlink", + "sha256": "a245d64c1108fb69e6c31e5729e0a3c489d17fae680b5d606a1b5197e40db473", + "size_in_bytes": 2113 + }, + { + "_path": "lib/python3.13/site-packages/markdown_it/py.typed", + "path_type": "hardlink", + "sha256": "f0f8f2675695a10a5156fb7bd66bafbaae6a13e8d315990af862c792175e6e67", + "size_in_bytes": 26 + }, + { + "_path": "lib/python3.13/site-packages/markdown_it/renderer.py", + "path_type": "hardlink", + "sha256": "2f3af4825a9de68c452f5d0339f8e35bc920e06a78d62750e2f88441a138ee80", + "size_in_bytes": 9947 + }, + { + "_path": "lib/python3.13/site-packages/markdown_it/ruler.py", + "path_type": "hardlink", + "sha256": "78c02d5864407d2337dda88979dd24e7ddb704492e315b0cab572df2f53eaa5e", + "size_in_bytes": 9142 + }, + { + "_path": "lib/python3.13/site-packages/markdown_it/rules_block/__init__.py", + "path_type": "hardlink", + "sha256": "490a60d28726b077882cf01644787380b80930a21c36443210b1f5de8ffa2ad7", + "size_in_bytes": 553 + }, + { + "_path": "lib/python3.13/site-packages/markdown_it/rules_block/__pycache__/__init__.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "e81ef371d56369f00df30d25a0d234ee6c43809e51f1ff588e644f041139b487", + "size_in_bytes": 643 + }, + { + "_path": "lib/python3.13/site-packages/markdown_it/rules_block/__pycache__/blockquote.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "c8c8fd1c0f4bffe1a562dd259576b91fb2814269a289ba8c8bb7c83045783e36", + "size_in_bytes": 6992 + }, + { + "_path": "lib/python3.13/site-packages/markdown_it/rules_block/__pycache__/code.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "b93a361fec1da438639b9db6edef54ac7a74914076d88d3f43f4297c9f5fb8e4", + "size_in_bytes": 1359 + }, + { + "_path": "lib/python3.13/site-packages/markdown_it/rules_block/__pycache__/fence.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "b8176e632a0d609ed541d81d19aa94c3ac1fa41bbd9d8e6a45e54ce0ff78b755", + "size_in_bytes": 2502 + }, + { + "_path": "lib/python3.13/site-packages/markdown_it/rules_block/__pycache__/heading.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "f326aaf6dfcb1d21a315ac5c549491b36df1293696192c9a0d4d9773c74c0b71", + "size_in_bytes": 2616 + }, + { + "_path": "lib/python3.13/site-packages/markdown_it/rules_block/__pycache__/hr.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "3f18a54f5fed24b750e438edc18c94ff16d8ead9c5aea81754df0a095335a303", + "size_in_bytes": 1738 + }, + { + "_path": "lib/python3.13/site-packages/markdown_it/rules_block/__pycache__/html_block.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "e2653cb7d891bee1d13819aa89aa82ea284b5cf4a77b9a4ab0f42ee77141f1a1", + "size_in_bytes": 3608 + }, + { + "_path": "lib/python3.13/site-packages/markdown_it/rules_block/__pycache__/lheading.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "b137a7fd3bbfe553bb26b8aad0a45cb51e66773cd4fd0be8d43ec51c6e507261", + "size_in_bytes": 2938 + }, + { + "_path": "lib/python3.13/site-packages/markdown_it/rules_block/__pycache__/list.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "60c7715650ac443d4e3b931e2c8ce5ba8379ae543dae192fcce461d6955e77a8", + "size_in_bytes": 8198 + }, + { + "_path": "lib/python3.13/site-packages/markdown_it/rules_block/__pycache__/paragraph.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "b7401170283498354a859118c450522ac4f83f1f54563bd819e32f33caea2d87", + "size_in_bytes": 2143 + }, + { + "_path": "lib/python3.13/site-packages/markdown_it/rules_block/__pycache__/reference.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "c7dd41237d16bc46a7c8986d269351f0b89669e346c011aab59824d17b2d45a2", + "size_in_bytes": 6283 + }, + { + "_path": "lib/python3.13/site-packages/markdown_it/rules_block/__pycache__/state_block.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "87bb24fb1b11b5926a9c2bba74d96a4177c6038c1d6615529592ac9ba9b978d4", + "size_in_bytes": 9355 + }, + { + "_path": "lib/python3.13/site-packages/markdown_it/rules_block/__pycache__/table.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "e7f2e8432f52e22a60cffd28335e6041b3a9b530a25cf30c32c586336ac4716c", + "size_in_bytes": 7516 + }, + { + "_path": "lib/python3.13/site-packages/markdown_it/rules_block/blockquote.py", + "path_type": "hardlink", + "sha256": "eeeca64b7e9d72b9de7770ec21a45ca9c6c5535365ca686fb19a445d30f7fe7f", + "size_in_bytes": 8887 + }, + { + "_path": "lib/python3.13/site-packages/markdown_it/rules_block/code.py", + "path_type": "hardlink", + "sha256": "893031bf4535f8c0e1cfcf0cd66d698b6bf33a110c48444eb17328d90abefa45", + "size_in_bytes": 860 + }, + { + "_path": "lib/python3.13/site-packages/markdown_it/rules_block/fence.py", + "path_type": "hardlink", + "sha256": "049814f8fa99e2f0250aa19cadcf14b5d2e9249c8c79158df86f8ea7ecf1acc7", + "size_in_bytes": 2537 + }, + { + "_path": "lib/python3.13/site-packages/markdown_it/rules_block/heading.py", + "path_type": "hardlink", + "sha256": "e0b875e6bc2856c4231358558696e189d43493dc4a1e28608c079849bc203b99", + "size_in_bytes": 1745 + }, + { + "_path": "lib/python3.13/site-packages/markdown_it/rules_block/hr.py", + "path_type": "hardlink", + "sha256": "402a18e6422669046f17b3f23fc3a859fb7a03c2551f5bfa30dfb41d1f489298", + "size_in_bytes": 1227 + }, + { + "_path": "lib/python3.13/site-packages/markdown_it/rules_block/html_block.py", + "path_type": "hardlink", + "sha256": "c00f296f7e0bb59af50642004e018a4012065f98d034e930665f54184aaf6f93", + "size_in_bytes": 2721 + }, + { + "_path": "lib/python3.13/site-packages/markdown_it/rules_block/lheading.py", + "path_type": "hardlink", + "sha256": "7d6a04b94a3b4b6b2faf950c2a6c9032487486179800783680c336eba32882ce", + "size_in_bytes": 2625 + }, + { + "_path": "lib/python3.13/site-packages/markdown_it/rules_block/list.py", + "path_type": "hardlink", + "sha256": "808a1d900245c8e2322826428f994094bee3223e64033ac36fe2bed8c14da656", + "size_in_bytes": 9668 + }, + { + "_path": "lib/python3.13/site-packages/markdown_it/rules_block/paragraph.py", + "path_type": "hardlink", + "sha256": "f69982c00ede32ee0b05d5787d62b30b811dc1a3a8686c3691f79849088bc9ef", + "size_in_bytes": 1819 + }, + { + "_path": "lib/python3.13/site-packages/markdown_it/rules_block/reference.py", + "path_type": "hardlink", + "sha256": "b9ed6a65b51a50fd0622fc138e1ea70f552d0a28fcbb0b0832e616d710647247", + "size_in_bytes": 6983 + }, + { + "_path": "lib/python3.13/site-packages/markdown_it/rules_block/state_block.py", + "path_type": "hardlink", + "sha256": "1e8c2c432cb98465226c7e0745958a7cb2255de0d49ee58bee4a45d3ead2c283", + "size_in_bytes": 8422 + }, + { + "_path": "lib/python3.13/site-packages/markdown_it/rules_block/table.py", + "path_type": "hardlink", + "sha256": "f2731df4e34639f7c447b05799cf646db87190b8eda57efd7552d1d226ad1a73", + "size_in_bytes": 7682 + }, + { + "_path": "lib/python3.13/site-packages/markdown_it/rules_core/__init__.py", + "path_type": "hardlink", + "sha256": "4051817bd4d48e745024353bc58e12418a71c931cdc20f1b7934b05e93464631", + "size_in_bytes": 394 + }, + { + "_path": "lib/python3.13/site-packages/markdown_it/rules_core/__pycache__/__init__.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "b81c78c7cf7abc63e753744a0ad1b1a719f68337ce7db13331f0ed640c542ef1", + "size_in_bytes": 507 + }, + { + "_path": "lib/python3.13/site-packages/markdown_it/rules_core/__pycache__/block.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "826f5d1b52b34aa4b4b913a359b63ba96fdd89612b4cc0b9d8936fb3ed17a2f7", + "size_in_bytes": 951 + }, + { + "_path": "lib/python3.13/site-packages/markdown_it/rules_core/__pycache__/inline.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "e3a05d335137eb24aefa17e97fa6bfb56ff0dd7320f3a055e2bfaa7a0ad94efd", + "size_in_bytes": 790 + }, + { + "_path": "lib/python3.13/site-packages/markdown_it/rules_core/__pycache__/linkify.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "a60b507b6ce7cd5748a8beff4935481c88d5dc61800dca0a18ba8cc2e151fba0", + "size_in_bytes": 5480 + }, + { + "_path": "lib/python3.13/site-packages/markdown_it/rules_core/__pycache__/normalize.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "f33d698bd7e3b37e92cc278d20a667c5b0307d2ce68a2d2f51ad27e607bf7a90", + "size_in_bytes": 761 + }, + { + "_path": "lib/python3.13/site-packages/markdown_it/rules_core/__pycache__/replacements.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "28d4f9a574ce12d01a5c70177c578d7ae2d54979d97227c801699f1ab8a530d2", + "size_in_bytes": 4961 + }, + { + "_path": "lib/python3.13/site-packages/markdown_it/rules_core/__pycache__/smartquotes.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "853a779d6ebb044a18ef3cb60adf1b0f9aeca02b215d451cc30a9d3d8f9c423e", + "size_in_bytes": 6405 + }, + { + "_path": "lib/python3.13/site-packages/markdown_it/rules_core/__pycache__/state_core.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "0ba95676cc2c73607e25352f1968bbb16085a4a8d3ad9683af63c0a340b4654c", + "size_in_bytes": 1146 + }, + { + "_path": "lib/python3.13/site-packages/markdown_it/rules_core/__pycache__/text_join.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "e9962eb48c620eb8886a37be25fbaaf55994946710c0ee168c77003d5c3e864d", + "size_in_bytes": 1460 + }, + { + "_path": "lib/python3.13/site-packages/markdown_it/rules_core/block.py", + "path_type": "hardlink", + "sha256": "d3f258d42532f87d8ea2816d204640002b6ea0650ca21831a3867a03f5229d28", + "size_in_bytes": 372 + }, + { + "_path": "lib/python3.13/site-packages/markdown_it/rules_core/inline.py", + "path_type": "hardlink", + "sha256": "f685a67818491c4ef1e3ba0970df72a7a52c019b6b118fc0f9599fa0cbca95de", + "size_in_bytes": 325 + }, + { + "_path": "lib/python3.13/site-packages/markdown_it/rules_core/linkify.py", + "path_type": "hardlink", + "sha256": "9a342aa64fe51cb876371c3850568bc5ae3b1608be3879e60da9a58179e19afd", + "size_in_bytes": 5141 + }, + { + "_path": "lib/python3.13/site-packages/markdown_it/rules_core/normalize.py", + "path_type": "hardlink", + "sha256": "0099b87de9ad149fd006733477387450da934c993d2ba28cb7044f6a2a1916a3", + "size_in_bytes": 403 + }, + { + "_path": "lib/python3.13/site-packages/markdown_it/rules_core/replacements.py", + "path_type": "hardlink", + "sha256": "087ef99a27beb5dcdd2ca42d301b824dc5c09758a37a075919f6d5fd593bb2dd", + "size_in_bytes": 3471 + }, + { + "_path": "lib/python3.13/site-packages/markdown_it/rules_core/smartquotes.py", + "path_type": "hardlink", + "sha256": "8b32bd7d2cae4f303ecc0506911933f4ac300905a8e34891a9c08aa8e8456c41", + "size_in_bytes": 7443 + }, + { + "_path": "lib/python3.13/site-packages/markdown_it/rules_core/state_core.py", + "path_type": "hardlink", + "sha256": "1ea599094af97d6ef11ba8de4190dd3b4844f61c71ca5dfff9b6b080ecb9ec76", + "size_in_bytes": 570 + }, + { + "_path": "lib/python3.13/site-packages/markdown_it/rules_core/text_join.py", + "path_type": "hardlink", + "sha256": "acb5f136e2e1fdeb3946f1f7d46b178bb7a7f1b30d3bd509e676c930304f96d6", + "size_in_bytes": 1173 + }, + { + "_path": "lib/python3.13/site-packages/markdown_it/rules_inline/__init__.py", + "path_type": "hardlink", + "sha256": "aaa1d993af9813c45cd76aba3f1bd52816b1bf6c2665e7a8e391f55cc47f571b", + "size_in_bytes": 696 + }, + { + "_path": "lib/python3.13/site-packages/markdown_it/rules_inline/__pycache__/__init__.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "041648d9b59c4b2cf7f3d2a145e371dc030c02d2a1621851523aca4f042dc72d", + "size_in_bytes": 774 + }, + { + "_path": "lib/python3.13/site-packages/markdown_it/rules_inline/__pycache__/autolink.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "b80de12e9ffb73b77783c954351b910534b5f99bc79f10921db177da7fc26a8c", + "size_in_bytes": 2788 + }, + { + "_path": "lib/python3.13/site-packages/markdown_it/rules_inline/__pycache__/backticks.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "279886579ae94ecd078163c389e58e53229c68b7f93ee188bef39131a759d37b", + "size_in_bytes": 2572 + }, + { + "_path": "lib/python3.13/site-packages/markdown_it/rules_inline/__pycache__/balance_pairs.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "ecdd0210c9573a39f600eb194e264f33688eaa0ae9eb95ad0abca18194d4f8d4", + "size_in_bytes": 3285 + }, + { + "_path": "lib/python3.13/site-packages/markdown_it/rules_inline/__pycache__/emphasis.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "ae22df3885b408789c279bdf02cf98e2faeb58b00970bd599a129fae22f00f57", + "size_in_bytes": 3938 + }, + { + "_path": "lib/python3.13/site-packages/markdown_it/rules_inline/__pycache__/entity.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "d35c3e2c1db130709367d44ce2f0ebc7483ec2f3290966495f5be789cc34823d", + "size_in_bytes": 2493 + }, + { + "_path": "lib/python3.13/site-packages/markdown_it/rules_inline/__pycache__/escape.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "fce16ec296c28179d7863b2d8d002fc1d9229215441f87e2165b34daefd84bdc", + "size_in_bytes": 1886 + }, + { + "_path": "lib/python3.13/site-packages/markdown_it/rules_inline/__pycache__/fragments_join.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "8756f0fefe092e20764e68fb7f2b6687bee5b3d6b4b5737129ec94ee3ab22156", + "size_in_bytes": 1875 + }, + { + "_path": "lib/python3.13/site-packages/markdown_it/rules_inline/__pycache__/html_inline.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "eaaa54162ae6fb16baa6d99cf119b9b85f907c19815af1bf96a40dac1ea6ba38", + "size_in_bytes": 2038 + }, + { + "_path": "lib/python3.13/site-packages/markdown_it/rules_inline/__pycache__/image.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "d53fcaf79c369eef2fac1e15b70bb2e2a201fbeb7167ef8ad81b42b4bb47af5d", + "size_in_bytes": 4258 + }, + { + "_path": "lib/python3.13/site-packages/markdown_it/rules_inline/__pycache__/link.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "e76728ede2818a69f07234ad2f01f9ea52b6daae7ae7999cfaf9a4d9f79478bd", + "size_in_bytes": 4093 + }, + { + "_path": "lib/python3.13/site-packages/markdown_it/rules_inline/__pycache__/linkify.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "d923dfaa35a2fd233a8714b3827f0857947f2b57b267abb07ae3c70b86019365", + "size_in_bytes": 2769 + }, + { + "_path": "lib/python3.13/site-packages/markdown_it/rules_inline/__pycache__/newline.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "cac7511dd8b849863a68a9b5c882f6f446ed1fd406b7a52abfbe135bf363798c", + "size_in_bytes": 1787 + }, + { + "_path": "lib/python3.13/site-packages/markdown_it/rules_inline/__pycache__/state_inline.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "23d3a6ac6617cc9821671e9f438af24f951f85089164025324f154429fa99bf4", + "size_in_bytes": 6201 + }, + { + "_path": "lib/python3.13/site-packages/markdown_it/rules_inline/__pycache__/strikethrough.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "d23ba69fec1df2d4590c00be9afbb7ebf77cceba2274b7fdafd66cda60eadc21", + "size_in_bytes": 4213 + }, + { + "_path": "lib/python3.13/site-packages/markdown_it/rules_inline/__pycache__/text.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "447a8535644ce221c9e5b73e3d2c73fcb1390c55325fa96e6323920e37aae85a", + "size_in_bytes": 1492 + }, + { + "_path": "lib/python3.13/site-packages/markdown_it/rules_inline/autolink.py", + "path_type": "hardlink", + "sha256": "a4fa2a258f22f7d56d167eca814ccc69c90c7aad61cadce2a15bd6b3e5503d1a", + "size_in_bytes": 2065 + }, + { + "_path": "lib/python3.13/site-packages/markdown_it/rules_inline/backticks.py", + "path_type": "hardlink", + "sha256": "27b6dece38cdc625e52aabc77347c99076701fbfb69c1b1756370ac9d93c1383", + "size_in_bytes": 2037 + }, + { + "_path": "lib/python3.13/site-packages/markdown_it/rules_inline/balance_pairs.py", + "path_type": "hardlink", + "sha256": "e7380188689da9d8969adec8a3f72e64e621e441447d7ad845c7bc4578399bba", + "size_in_bytes": 4852 + }, + { + "_path": "lib/python3.13/site-packages/markdown_it/rules_inline/emphasis.py", + "path_type": "hardlink", + "sha256": "eda0cb671d0995e92ebdbbb7b845130e1269d346743e3ea0e02dfe54b848f02a", + "size_in_bytes": 3123 + }, + { + "_path": "lib/python3.13/site-packages/markdown_it/rules_inline/entity.py", + "path_type": "hardlink", + "sha256": "084f00206322e62b046b6e1136c7a8d304664d36a3e582db81315d0e605eb005", + "size_in_bytes": 1651 + }, + { + "_path": "lib/python3.13/site-packages/markdown_it/rules_inline/escape.py", + "path_type": "hardlink", + "sha256": "286ba5c2b3f9167a9933b19763c95fee9c95bf4624479f6d6990de1dbe5c98a8", + "size_in_bytes": 1659 + }, + { + "_path": "lib/python3.13/site-packages/markdown_it/rules_inline/fragments_join.py", + "path_type": "hardlink", + "sha256": "ff725bc16609cfbe2044779993a4fc79d5494f62154ac8bb15f98926589e4250", + "size_in_bytes": 1493 + }, + { + "_path": "lib/python3.13/site-packages/markdown_it/rules_inline/html_inline.py", + "path_type": "hardlink", + "sha256": "48183a1d1d0746a09dae491e73475f398b90740ab27de2d114b790820b608ef8", + "size_in_bytes": 1130 + }, + { + "_path": "lib/python3.13/site-packages/markdown_it/rules_inline/image.py", + "path_type": "hardlink", + "sha256": "59bb20ee38273ad2972305c63493a51bb3914e190c90156897122d0b4a61e82d", + "size_in_bytes": 4141 + }, + { + "_path": "lib/python3.13/site-packages/markdown_it/rules_inline/link.py", + "path_type": "hardlink", + "sha256": "da80fe7c0741d31cb10d1b592d38f32de59bcc9d64f5b6cf5509a885be7c46e2", + "size_in_bytes": 4258 + }, + { + "_path": "lib/python3.13/site-packages/markdown_it/rules_inline/linkify.py", + "path_type": "hardlink", + "sha256": "89f1fab1be7013c3c6316130f52af8c740e13157cd3840427c54b02a59763beb", + "size_in_bytes": 1706 + }, + { + "_path": "lib/python3.13/site-packages/markdown_it/rules_inline/newline.py", + "path_type": "hardlink", + "sha256": "df6f6bd15dda0e3ccdb4972fcc0de5b05623ce006b4a12c0579b9ff61c102ff3", + "size_in_bytes": 1297 + }, + { + "_path": "lib/python3.13/site-packages/markdown_it/rules_inline/state_inline.py", + "path_type": "hardlink", + "sha256": "77e99e9c5cdbcf9143cb524d806045f810126ac9d523ef51b8ec56cfd3e72a7e", + "size_in_bytes": 5003 + }, + { + "_path": "lib/python3.13/site-packages/markdown_it/rules_inline/strikethrough.py", + "path_type": "hardlink", + "sha256": "a7070f972864879a6a155c51092add5b974d0883ad5387838aded35434cf2150", + "size_in_bytes": 3214 + }, + { + "_path": "lib/python3.13/site-packages/markdown_it/rules_inline/text.py", + "path_type": "hardlink", + "sha256": "150a9a41152a6e730b3bd65258f59050c10a1fa26a5924929a5679222f4fe3ca", + "size_in_bytes": 1119 + }, + { + "_path": "lib/python3.13/site-packages/markdown_it/token.py", + "path_type": "hardlink", + "sha256": "716aedf64a1d7cf762cc7abfb58af3c8864db4960d30dd7cd770cf365ba7c138", + "size_in_bytes": 6381 + }, + { + "_path": "lib/python3.13/site-packages/markdown_it/tree.py", + "path_type": "hardlink", + "sha256": "e7a09d6f0bb602292cee4358a8efdf4195a93dbfe7e3c094965ce34107e0bb56", + "size_in_bytes": 11111 + }, + { + "_path": "lib/python3.13/site-packages/markdown_it/utils.py", + "path_type": "hardlink", + "sha256": "9552de5fb01fdc668d15fc6632051bb27e69edc5dbc212eaed149fe7a516b911", + "size_in_bytes": 5687 + }, + { + "_path": "lib/python3.13/site-packages/markdown_it_py-4.0.0.dist-info/INSTALLER", + "path_type": "hardlink", + "sha256": "d0edee15f91b406f3f99726e44eb990be6e34fd0345b52b910c568e0eef6a2a8", + "size_in_bytes": 5 + }, + { + "_path": "lib/python3.13/site-packages/markdown_it_py-4.0.0.dist-info/METADATA", + "path_type": "hardlink", + "sha256": "e9fcaa1e2daf3f96d840a09fbaaa394feaadf37a36d88a7b6b6b672487c65bfb", + "size_in_bytes": 7288 + }, + { + "_path": "lib/python3.13/site-packages/markdown_it_py-4.0.0.dist-info/RECORD", + "path_type": "hardlink", + "sha256": "e39f1c34092f202865974262a2345ea62394b6dfb210d5263da17cfa0590e397", + "size_in_bytes": 11042 + }, + { + "_path": "lib/python3.13/site-packages/markdown_it_py-4.0.0.dist-info/REQUESTED", + "path_type": "hardlink", + "sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "size_in_bytes": 0 + }, + { + "_path": "lib/python3.13/site-packages/markdown_it_py-4.0.0.dist-info/WHEEL", + "path_type": "hardlink", + "sha256": "1b68144734c4b66791f27add5d425f3620775585718a03d0f9b110ba3a4d88db", + "size_in_bytes": 82 + }, + { + "_path": "lib/python3.13/site-packages/markdown_it_py-4.0.0.dist-info/direct_url.json", + "path_type": "hardlink", + "sha256": "8dd6b25f46f12b4e9359c2f1d740f0dcda8a6a2a4c8f7786cd2f9e68e19b1cf2", + "size_in_bytes": 100 + }, + { + "_path": "lib/python3.13/site-packages/markdown_it_py-4.0.0.dist-info/entry_points.txt", + "path_type": "hardlink", + "sha256": "4fcd65edf1d0de9965a50e3052d40ae9af20fe9eb0c506e78ca5470a4d96306e", + "size_in_bytes": 58 + }, + { + "_path": "lib/python3.13/site-packages/markdown_it_py-4.0.0.dist-info/licenses/LICENSE", + "path_type": "hardlink", + "sha256": "4a2260d6e2cd0f5a151a1e86dbfe7d3ed552b1e2beabf9941c1ba5c49cbce484", + "size_in_bytes": 1078 + }, + { + "_path": "lib/python3.13/site-packages/markdown_it_py-4.0.0.dist-info/licenses/LICENSE.markdown-it", + "path_type": "hardlink", + "sha256": "792c48c5a849a15fdf9e37e8bcf9e6d1dd13b32b46c642a748a0a46a9919d473", + "size_in_bytes": 1073 + } + ], + "paths_version": 1 +} \ No newline at end of file diff --git a/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/recipe/conda_build_config.yaml b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/recipe/conda_build_config.yaml new file mode 100644 index 0000000000000000000000000000000000000000..498b785e18be419609225f438ff64f9256a9921e --- /dev/null +++ b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/recipe/conda_build_config.yaml @@ -0,0 +1,28 @@ +c_compiler: gcc +channel_targets: defaults +cpu_optimization_target: nocona +cran_mirror: https://cran.r-project.org +cxx_compiler: gxx +extend_keys: +- extend_keys +- pin_run_as_build +- ignore_build_only_deps +- ignore_version +fortran_compiler: gfortran +ignore_build_only_deps: +- numpy +- python +lua: '5' +numpy: '1.26' +perl: 5.26.2 +pin_run_as_build: + python: + max_pin: x.x + min_pin: x.x + r-base: + max_pin: x.x + min_pin: x.x +platform: linux-64 +python: '3.13' +r_base: '3.5' +target_platform: linux-64 diff --git a/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/recipe/meta.yaml b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/recipe/meta.yaml new file mode 100644 index 0000000000000000000000000000000000000000..220a2beb7920c7acb677a0c47f8f18a276a276cb --- /dev/null +++ b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/recipe/meta.yaml @@ -0,0 +1,112 @@ +# This file created by conda-build 25.1.2 +# meta.yaml template originally from: +# /home/task_176700162971740/markdown-it-py-feedstock/recipe, last modified Mon Dec 29 09:47:12 2025 +# ------------------------------------------------ + +package: + name: markdown-it-py + version: 4.0.0 +source: + - sha256: cb0a2b4aa34f932c007117b194e945bd74e0ec24133ceb5bac59009cda1cb9f3 + url: https://pypi.org/packages/source/m/markdown-it-py/markdown_it_py-4.0.0.tar.gz + - folder: gh + sha256: c562899de418498f223f0c48b3d462319a64493bd3b2758e1a76f11ad8f0ae15 + url: https://github.com/executablebooks/markdown-it-py/archive/refs/tags/v4.0.0.tar.gz +build: + entry_points: + - markdown-it = markdown_it.cli.parse:main + number: '1' + script: /home/task_176700162971740/croot/markdown-it-py_1767001650253/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeh/bin/python + -m pip install . -vv --no-deps --no-build-isolation + string: py313h06a4308_1 +requirements: + host: + - _libgcc_mutex 0.1 main + - _openmp_mutex 5.1 1_gnu + - bzip2 1.0.8 h5eee18b_6 + - ca-certificates 2025.12.2 h06a4308_0 + - flit-core 3.12.0 py313hee27c6d_1 + - ld_impl_linux-64 2.44 h153f514_2 + - libexpat 2.7.3 h7354ed3_4 + - libffi 3.4.4 h6a678d5_1 + - libgcc 15.2.0 h69a1729_7 + - libgcc-ng 15.2.0 h166f726_7 + - libgomp 15.2.0 h4751f2c_7 + - libmpdec 4.0.0 h5eee18b_0 + - libstdcxx 15.2.0 h39759b7_7 + - libstdcxx-ng 15.2.0 hc03a8fd_7 + - libuuid 1.41.5 h5eee18b_0 + - libxcb 1.17.0 h9b100fa_0 + - libzlib 1.3.1 hb25bd0a_0 + - ncurses 6.5 h7934f7d_0 + - openssl 3.0.18 hd6dcaed_0 + - pip 25.3 pyhc872135_0 + - pthread-stubs 0.3 h0ce48e5_1 + - python 3.13.11 hcf712cf_100_cp313 + - python_abi 3.13 3_cp313 + - readline 8.3 hc2a1206_0 + - setuptools 80.9.0 py313h06a4308_0 + - sqlite 3.51.0 h2a70700_0 + - tk 8.6.15 h54e0aa7_0 + - tzdata 2025b h04d1e81_0 + - wheel 0.45.1 py313h06a4308_0 + - xorg-libx11 1.8.12 h9b100fa_1 + - xorg-libxau 1.0.12 h9b100fa_0 + - xorg-libxdmcp 1.1.5 h9b100fa_0 + - xorg-xorgproto 2024.1 h5eee18b_1 + - xz 5.6.4 h5eee18b_1 + - zlib 1.3.1 hb25bd0a_0 + run: + - mdurl >=0.1,<0.2 + - python >=3.13,<3.14.0a0 + - python_abi 3.13.* *_cp313 + run_constrained: + - commonmark >=0.9,<0.10 + - linkify-it-py >=1,<3 + - markdown >=3.4,<3.9 + - mdit-py-plugins >=0.5.0 + - mistletoe >=1.0,<2.0 + - mistune >=3.0,<4.0 + - panflute >=2.3,<2.4 + - sphinx-book-theme >=1,<2 +test: + commands: + - pip check + - python -c "from importlib.metadata import version; assert(version('markdown-it-py')=='4.0.0')" + - pytest -k "not(test_commonmark_extras or test_table_tokens or test_file or test_use_existing_env + or test_store_labels or test_inline_definitions or test_pretty or test_pretty_text_special)" + -v gh/tests + - markdown-it --help + imports: + - markdown_it + - markdown_it.cli + - markdown_it.main + - markdown_it.presets + - markdown_it.renderer + - markdown_it.rules_inline + - markdown_it.token + - markdown_it.tree + - markdown_it.utils + requires: + - linkify-it-py + - pip + - pytest + source_files: + - gh/tests +about: + description: 'Python port of markdown-it. Markdown parsing, done right! + + ' + dev_url: https://github.com/executablebooks/markdown-it-py + doc_url: https://github.com/executablebooks/markdown-it-py/blob/master/README.md + home: https://github.com/executablebooks/markdown-it-py + license: MIT + license_family: MIT + license_file: LICENSE + summary: Python port of markdown-it. Markdown parsing, done right! +extra: + copy_test_source_files: true + final: true + recipe-maintainers: + - choldgraf + - dopplershift diff --git a/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/recipe/meta.yaml.template b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/recipe/meta.yaml.template new file mode 100644 index 0000000000000000000000000000000000000000..38630deec936e17edb15a9984880e89102b3ebf7 --- /dev/null +++ b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/recipe/meta.yaml.template @@ -0,0 +1,96 @@ +{% set name = "markdown-it-py" %} +{% set version = "4.0.0" %} + +package: + name: {{ name|lower }} + version: {{ version }} + +source: + - url: https://pypi.org/packages/source/{{ name[0] }}/{{ name }}/markdown_it_py-{{ version }}.tar.gz + sha256: cb0a2b4aa34f932c007117b194e945bd74e0ec24133ceb5bac59009cda1cb9f3 + - url: https://github.com/executablebooks/{{ name }}/archive/refs/tags/v{{ version }}.tar.gz + sha256: c562899de418498f223f0c48b3d462319a64493bd3b2758e1a76f11ad8f0ae15 + folder: gh + +build: + number: 1 + entry_points: + - markdown-it = markdown_it.cli.parse:main + script: {{ PYTHON }} -m pip install . -vv --no-deps --no-build-isolation + skip: true # [py<310] + +requirements: + host: + - python + - pip + # AttributeError: module 'ast' has no attribute 'Str' when using flit-core <3.12 on python 3.14. + # To fix this, the flit-core code needs to be updated to use ast.Constant instead. + # flit-core 3.12 is available on the main channel for python 3.14. + - flit-core >=3.4,<4 # [py<314] + - flit-core >=3.12,<4 # [py>=314] + run: + - python + - mdurl >=0.1,<0.2 + run_constrained: + - commonmark >=0.9,<0.10 + # Relax the upper bound to allow for the latest version of markdown + # with py314 support on the main channel. + - markdown >=3.4,<3.9 + - mistletoe >=1.0,<2.0 + - mistune >=3.0,<4.0 + - panflute >=2.3,<2.4 + - linkify-it-py >=1,<3 + - mdit-py-plugins >=0.5.0 + - sphinx-book-theme >=1,<2 + +# E IndexError: string index out of range +{% set tests_to_skip = "test_commonmark_extras" %} +# Missing pytest-regressions in the main channel +{% set tests_to_skip = tests_to_skip + " or test_table_tokens + or test_file or test_use_existing_env + or test_store_labels + or test_inline_definitions + or test_pretty + or test_pretty_text_special" %} + +test: + source_files: + - gh/tests + requires: + - pip + - pytest + - linkify-it-py + imports: + - markdown_it + - markdown_it.cli + - markdown_it.main + - markdown_it.presets + - markdown_it.renderer + - markdown_it.rules_inline + - markdown_it.token + - markdown_it.tree + - markdown_it.utils + commands: + - pip check + - python -c "from importlib.metadata import version; assert(version('{{ name }}')=='{{ version }}')" + # UnicodeDecodeError: 'charmap' codec can't decode byte + - set PYTHONUTF8=1 # [win] + - set PYTHONIOENCODING="UTF-8" # [win] + - pytest -k "not({{ tests_to_skip }})" -v gh/tests + - markdown-it --help + +about: + home: https://github.com/executablebooks/markdown-it-py + license: MIT + license_family: MIT + license_file: LICENSE + description: | + Python port of markdown-it. Markdown parsing, done right! + summary: Python port of markdown-it. Markdown parsing, done right! + doc_url: https://github.com/executablebooks/markdown-it-py/blob/master/README.md + dev_url: https://github.com/executablebooks/markdown-it-py + +extra: + recipe-maintainers: + - dopplershift + - choldgraf \ No newline at end of file diff --git a/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/repodata_record.json b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/repodata_record.json new file mode 100644 index 0000000000000000000000000000000000000000..ebc281abe9f9f7d08d07590af4cb282ffc62e3fa --- /dev/null +++ b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/repodata_record.json @@ -0,0 +1,33 @@ +{ + "arch": "x86_64", + "build": "py313h06a4308_1", + "build_number": 1, + "channel": "https://repo.anaconda.com/pkgs/main/linux-64/", + "constrains": [ + "mdit-py-plugins >=0.5.0", + "sphinx-book-theme >=1,<2", + "commonmark >=0.9,<0.10", + "panflute >=2.3,<2.4", + "markdown >=3.4,<3.9", + "mistletoe >=1.0,<2.0", + "mistune >=3.0,<4.0", + "linkify-it-py >=1,<3" + ], + "depends": [ + "mdurl >=0.1,<0.2", + "python >=3.13,<3.14.0a0", + "python_abi 3.13.* *_cp313" + ], + "fn": "markdown-it-py-4.0.0-py313h06a4308_1.conda", + "license": "MIT", + "license_family": "MIT", + "md5": "f515d22e3c87bcf86d4cd5c877bc34cd", + "name": "markdown-it-py", + "platform": "linux", + "sha256": "bfed5539652f10a2c344501a4d9928856b50d323fdd390c578fd08e856b7d648", + "size": 242668, + "subdir": "linux-64", + "timestamp": 1767001668000, + "url": "https://repo.anaconda.com/pkgs/main/linux-64/markdown-it-py-4.0.0-py313h06a4308_1.conda", + "version": "4.0.0" +} \ No newline at end of file diff --git a/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/test/gh/tests/__init__.py b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/test/gh/tests/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/test/gh/tests/fuzz/README.md b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/test/gh/tests/fuzz/README.md new file mode 100644 index 0000000000000000000000000000000000000000..87075a706befc8bb8b02b64ca25ad0a154e27045 --- /dev/null +++ b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/test/gh/tests/fuzz/README.md @@ -0,0 +1,41 @@ +# OSS-Fuzz integration + +In principle, core Markdown parsing is designed to never except/crash on any input, +and so [fuzzing](https://en.wikipedia.org/wiki/Fuzzing) can be used to test this conformance. +This folder contains fuzzers which are principally run downstream as part of the infrastructure. + +Any file that matches `fuzz_*.py` in this repository will be built and run on OSS-Fuzz +(see ). + +See for full details. + +## CI integration + +Fuzzing essentially runs forever, or until a crash is found, therefore it cannot be fully integrated into local continous integration testing. +The workflow in `.github/workflows/fuzz.yml` though runs a brief fuzzing on code changed in a PR, +which can be used to provide early warning on code changes. + +## Reproducing crash failures + +If OSS-Fuzz (or the CI workflow) identifies a crash, it will produce a "minimized testcase" file +(e.g. ). + +To reproduce this crash locally, the easiest way is to run the [tox](https://tox.wiki/) environment, provided in this repository, against the test file (see `tox.ini`): + +``` +tox -e fuzz path/to/testcase +``` + +This idempotently sets up a local python environment with markdown-it-py (local dev) and [Atheris](https://pypi.org/project/atheris/) installed, +clones into it, +and builds the fuzzers. +Then the testcase is run within this environment. + +If you wish to simply run the full fuzzing process, +you can activate this environment, then run e.g.: + +``` +python .tox/fuzz/oss-fuzz/infra/helper.py run_fuzzer markdown-it-py fuzz_markdown +``` + +For a more thorough guide on reproducing, see: https://google.github.io/oss-fuzz/advanced-topics/reproducing/ diff --git a/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/test/gh/tests/fuzz/fuzz_markdown.py b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/test/gh/tests/fuzz/fuzz_markdown.py new file mode 100644 index 0000000000000000000000000000000000000000..d78ef69762d4d954167a05129a9e222d8416fcbb --- /dev/null +++ b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/test/gh/tests/fuzz/fuzz_markdown.py @@ -0,0 +1,23 @@ +import sys + +import atheris + +from markdown_it import MarkdownIt + + +def TestOneInput(data): + fdp = atheris.FuzzedDataProvider(data) + md = MarkdownIt() + raw_markdown = fdp.ConsumeUnicodeNoSurrogates(sys.maxsize) + md.parse(raw_markdown) + md.render(raw_markdown) + + +def main(): + atheris.instrument_all() + atheris.Setup(sys.argv, TestOneInput) + atheris.Fuzz() + + +if __name__ == "__main__": + main() diff --git a/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/test/gh/tests/fuzz/fuzz_markdown_extended.py b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/test/gh/tests/fuzz/fuzz_markdown_extended.py new file mode 100644 index 0000000000000000000000000000000000000000..4ba749ee809724ad5f9631af33995517cf300804 --- /dev/null +++ b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/test/gh/tests/fuzz/fuzz_markdown_extended.py @@ -0,0 +1,53 @@ +import sys + +import atheris + +# Beautified from auto-generated fuzzer at: +# https://github.com/ossf/fuzz-introspector/pull/872#issuecomment-1450847118 +# Auto-fuzz heuristics used: py-autofuzz-heuristics-4.1 +# Imports by the generated code +import markdown_it + + +def TestOneInput(data): + fdp = atheris.FuzzedDataProvider(data) + val_1 = fdp.ConsumeUnicodeNoSurrogates(fdp.ConsumeIntInRange(0, 1024)) + val_2 = fdp.ConsumeUnicodeNoSurrogates(fdp.ConsumeIntInRange(0, 1024)) + val_3 = fdp.ConsumeUnicodeNoSurrogates(fdp.ConsumeIntInRange(0, 256)) + val_4 = fdp.ConsumeUnicodeNoSurrogates(fdp.ConsumeIntInRange(0, 256)) + val_5 = fdp.ConsumeUnicodeNoSurrogates(fdp.ConsumeIntInRange(0, 256)) + val_6 = fdp.ConsumeUnicodeNoSurrogates(fdp.ConsumeIntInRange(0, 256)) + val_7 = fdp.ConsumeUnicodeNoSurrogates(fdp.ConsumeIntInRange(0, 256)) + val_8 = fdp.ConsumeUnicodeNoSurrogates(fdp.ConsumeIntInRange(0, 256)) + val_9 = fdp.ConsumeUnicodeNoSurrogates(fdp.ConsumeIntInRange(0, 256)) + val_10 = fdp.ConsumeUnicodeNoSurrogates(fdp.ConsumeIntInRange(0, 256)) + + try: + c1 = markdown_it.main.MarkdownIt() + c1.render(val_1) + c1.parse(val_2) + c1.renderInline(val_3) + c1.parseInline(val_4) + c1.normalizeLink(val_5) + c1.normalizeLinkText(val_6) + c1.disable(val_7) + c1.enable(val_8) + c1.validateLink(val_9) + c1.configure(val_10) + except ( + ValueError, + KeyError, + TypeError, + ): + # Exceptions thrown by the hit code. + pass + + +def main(): + atheris.instrument_all() + atheris.Setup(sys.argv, TestOneInput) + atheris.Fuzz() + + +if __name__ == "__main__": + main() diff --git a/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/test/gh/tests/test_api/test_main.py b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/test/gh/tests/test_api/test_main.py new file mode 100644 index 0000000000000000000000000000000000000000..178d717e05a37790740cb102a410033e542b3f08 --- /dev/null +++ b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/test/gh/tests/test_api/test_main.py @@ -0,0 +1,281 @@ +from markdown_it import MarkdownIt +from markdown_it.token import Token + + +def test_get_rules(): + md = MarkdownIt("zero") + # print(md.get_all_rules()) + assert md.get_all_rules() == { + "core": [ + "normalize", + "block", + "inline", + "linkify", + "replacements", + "smartquotes", + "text_join", + ], + "block": [ + "table", + "code", + "fence", + "blockquote", + "hr", + "list", + "reference", + "html_block", + "heading", + "lheading", + "paragraph", + ], + "inline": [ + "text", + "linkify", + "newline", + "escape", + "backticks", + "strikethrough", + "emphasis", + "link", + "image", + "autolink", + "html_inline", + "entity", + ], + "inline2": ["balance_pairs", "strikethrough", "emphasis", "fragments_join"], + } + + +def test_load_presets(): + md = MarkdownIt("zero") + assert md.get_active_rules() == { + "block": ["paragraph"], + "core": ["normalize", "block", "inline", "text_join"], + "inline": ["text"], + "inline2": ["balance_pairs", "fragments_join"], + } + md = MarkdownIt("commonmark") + assert md.get_active_rules() == { + "core": ["normalize", "block", "inline", "text_join"], + "block": [ + "code", + "fence", + "blockquote", + "hr", + "list", + "reference", + "html_block", + "heading", + "lheading", + "paragraph", + ], + "inline": [ + "text", + "newline", + "escape", + "backticks", + "emphasis", + "link", + "image", + "autolink", + "html_inline", + "entity", + ], + "inline2": ["balance_pairs", "emphasis", "fragments_join"], + } + + +def test_override_options(): + md = MarkdownIt("zero") + assert md.options["maxNesting"] == 20 + md = MarkdownIt("zero", {"maxNesting": 99}) + assert md.options["maxNesting"] == 99 + + +def test_enable(): + md = MarkdownIt("zero").enable("heading") + assert md.get_active_rules() == { + "block": ["heading", "paragraph"], + "core": ["normalize", "block", "inline", "text_join"], + "inline": ["text"], + "inline2": ["balance_pairs", "fragments_join"], + } + md.enable(["backticks", "autolink"]) + assert md.get_active_rules() == { + "block": ["heading", "paragraph"], + "core": ["normalize", "block", "inline", "text_join"], + "inline": ["text", "backticks", "autolink"], + "inline2": ["balance_pairs", "fragments_join"], + } + + +def test_disable(): + md = MarkdownIt("zero").disable("inline") + assert md.get_active_rules() == { + "block": ["paragraph"], + "core": ["normalize", "block", "text_join"], + "inline": ["text"], + "inline2": ["balance_pairs", "fragments_join"], + } + md.disable(["text"]) + assert md.get_active_rules() == { + "block": ["paragraph"], + "core": ["normalize", "block", "text_join"], + "inline": [], + "inline2": ["balance_pairs", "fragments_join"], + } + + +def test_reset(): + md = MarkdownIt("zero") + with md.reset_rules(): + md.disable("inline") + assert md.get_active_rules() == { + "block": ["paragraph"], + "core": ["normalize", "block", "text_join"], + "inline": ["text"], + "inline2": ["balance_pairs", "fragments_join"], + } + assert md.get_active_rules() == { + "block": ["paragraph"], + "core": ["normalize", "block", "inline", "text_join"], + "inline": ["text"], + "inline2": ["balance_pairs", "fragments_join"], + } + + +def test_parseInline(): + md = MarkdownIt() + tokens = md.parseInline("abc\n\n> xyz") + assert tokens == [ + Token( + type="inline", + tag="", + nesting=0, + attrs={}, + map=[0, 1], + level=0, + children=[ + Token( + type="text", + tag="", + nesting=0, + attrs={}, + map=None, + level=0, + children=None, + content="abc", + markup="", + info="", + meta={}, + block=False, + hidden=False, + ), + Token( + type="softbreak", + tag="br", + nesting=0, + attrs={}, + map=None, + level=0, + children=None, + content="", + markup="", + info="", + meta={}, + block=False, + hidden=False, + ), + Token( + type="softbreak", + tag="br", + nesting=0, + attrs={}, + map=None, + level=0, + children=None, + content="", + markup="", + info="", + meta={}, + block=False, + hidden=False, + ), + Token( + type="text", + tag="", + nesting=0, + attrs={}, + map=None, + level=0, + children=None, + content="> xyz", + markup="", + info="", + meta={}, + block=False, + hidden=False, + ), + ], + content="abc\n\n> xyz", + markup="", + info="", + meta={}, + block=False, + hidden=False, + ) + ] + + +def test_renderInline(): + md = MarkdownIt("zero") + tokens = md.renderInline("abc\n\n*xyz*") + assert tokens == "abc\n\n*xyz*" + + +def test_emptyStr(): + md = MarkdownIt() + tokens = md.parseInline("") + assert tokens == [ + Token( + type="inline", + tag="", + nesting=0, + attrs={}, + map=[0, 1], + level=0, + children=[], + content="", + markup="", + info="", + meta={}, + block=False, + hidden=False, + ) + ] + + +def test_empty_env(): + """Test that an empty `env` is mutated, not copied and mutated.""" + md = MarkdownIt() + + env = {} # type: ignore + md.render("[foo]: /url\n[foo]", env) + assert "references" in env + + env = {} + md.parse("[foo]: /url\n[foo]", env) + assert "references" in env + + +def test_table_tokens(data_regression): + md = MarkdownIt("js-default") + tokens = md.parse( + """ +| Heading 1 | Heading 2 +| --------- | --------- +| Cell 1 | Cell 2 +| Cell 3 | Cell 4 + """ + ) + data_regression.check([t.as_dict() for t in tokens]) diff --git a/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/test/gh/tests/test_api/test_main/test_table_tokens.yml b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/test/gh/tests/test_api/test_main/test_table_tokens.yml new file mode 100644 index 0000000000000000000000000000000000000000..5bac04456e67730ebb499871d2738e7060bc2010 --- /dev/null +++ b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/test/gh/tests/test_api/test_main/test_table_tokens.yml @@ -0,0 +1,492 @@ +- attrs: null + block: true + children: null + content: '' + hidden: false + info: '' + level: 0 + map: + - 1 + - 5 + markup: '' + meta: {} + nesting: 1 + tag: table + type: table_open +- attrs: null + block: true + children: null + content: '' + hidden: false + info: '' + level: 1 + map: + - 1 + - 2 + markup: '' + meta: {} + nesting: 1 + tag: thead + type: thead_open +- attrs: null + block: true + children: null + content: '' + hidden: false + info: '' + level: 2 + map: + - 1 + - 2 + markup: '' + meta: {} + nesting: 1 + tag: tr + type: tr_open +- attrs: null + block: true + children: null + content: '' + hidden: false + info: '' + level: 3 + map: null + markup: '' + meta: {} + nesting: 1 + tag: th + type: th_open +- attrs: null + block: true + children: + - attrs: null + block: false + children: null + content: Heading 1 + hidden: false + info: '' + level: 0 + map: null + markup: '' + meta: {} + nesting: 0 + tag: '' + type: text + content: Heading 1 + hidden: false + info: '' + level: 4 + map: + - 1 + - 2 + markup: '' + meta: {} + nesting: 0 + tag: '' + type: inline +- attrs: null + block: true + children: null + content: '' + hidden: false + info: '' + level: 3 + map: null + markup: '' + meta: {} + nesting: -1 + tag: th + type: th_close +- attrs: null + block: true + children: null + content: '' + hidden: false + info: '' + level: 3 + map: null + markup: '' + meta: {} + nesting: 1 + tag: th + type: th_open +- attrs: null + block: true + children: + - attrs: null + block: false + children: null + content: Heading 2 + hidden: false + info: '' + level: 0 + map: null + markup: '' + meta: {} + nesting: 0 + tag: '' + type: text + content: Heading 2 + hidden: false + info: '' + level: 4 + map: + - 1 + - 2 + markup: '' + meta: {} + nesting: 0 + tag: '' + type: inline +- attrs: null + block: true + children: null + content: '' + hidden: false + info: '' + level: 3 + map: null + markup: '' + meta: {} + nesting: -1 + tag: th + type: th_close +- attrs: null + block: true + children: null + content: '' + hidden: false + info: '' + level: 2 + map: null + markup: '' + meta: {} + nesting: -1 + tag: tr + type: tr_close +- attrs: null + block: true + children: null + content: '' + hidden: false + info: '' + level: 1 + map: null + markup: '' + meta: {} + nesting: -1 + tag: thead + type: thead_close +- attrs: null + block: true + children: null + content: '' + hidden: false + info: '' + level: 1 + map: + - 3 + - 5 + markup: '' + meta: {} + nesting: 1 + tag: tbody + type: tbody_open +- attrs: null + block: true + children: null + content: '' + hidden: false + info: '' + level: 2 + map: + - 3 + - 4 + markup: '' + meta: {} + nesting: 1 + tag: tr + type: tr_open +- attrs: null + block: true + children: null + content: '' + hidden: false + info: '' + level: 3 + map: null + markup: '' + meta: {} + nesting: 1 + tag: td + type: td_open +- attrs: null + block: true + children: + - attrs: null + block: false + children: null + content: Cell 1 + hidden: false + info: '' + level: 0 + map: null + markup: '' + meta: {} + nesting: 0 + tag: '' + type: text + content: Cell 1 + hidden: false + info: '' + level: 4 + map: + - 3 + - 4 + markup: '' + meta: {} + nesting: 0 + tag: '' + type: inline +- attrs: null + block: true + children: null + content: '' + hidden: false + info: '' + level: 3 + map: null + markup: '' + meta: {} + nesting: -1 + tag: td + type: td_close +- attrs: null + block: true + children: null + content: '' + hidden: false + info: '' + level: 3 + map: null + markup: '' + meta: {} + nesting: 1 + tag: td + type: td_open +- attrs: null + block: true + children: + - attrs: null + block: false + children: null + content: Cell 2 + hidden: false + info: '' + level: 0 + map: null + markup: '' + meta: {} + nesting: 0 + tag: '' + type: text + content: Cell 2 + hidden: false + info: '' + level: 4 + map: + - 3 + - 4 + markup: '' + meta: {} + nesting: 0 + tag: '' + type: inline +- attrs: null + block: true + children: null + content: '' + hidden: false + info: '' + level: 3 + map: null + markup: '' + meta: {} + nesting: -1 + tag: td + type: td_close +- attrs: null + block: true + children: null + content: '' + hidden: false + info: '' + level: 2 + map: null + markup: '' + meta: {} + nesting: -1 + tag: tr + type: tr_close +- attrs: null + block: true + children: null + content: '' + hidden: false + info: '' + level: 2 + map: + - 4 + - 5 + markup: '' + meta: {} + nesting: 1 + tag: tr + type: tr_open +- attrs: null + block: true + children: null + content: '' + hidden: false + info: '' + level: 3 + map: null + markup: '' + meta: {} + nesting: 1 + tag: td + type: td_open +- attrs: null + block: true + children: + - attrs: null + block: false + children: null + content: Cell 3 + hidden: false + info: '' + level: 0 + map: null + markup: '' + meta: {} + nesting: 0 + tag: '' + type: text + content: Cell 3 + hidden: false + info: '' + level: 4 + map: + - 4 + - 5 + markup: '' + meta: {} + nesting: 0 + tag: '' + type: inline +- attrs: null + block: true + children: null + content: '' + hidden: false + info: '' + level: 3 + map: null + markup: '' + meta: {} + nesting: -1 + tag: td + type: td_close +- attrs: null + block: true + children: null + content: '' + hidden: false + info: '' + level: 3 + map: null + markup: '' + meta: {} + nesting: 1 + tag: td + type: td_open +- attrs: null + block: true + children: + - attrs: null + block: false + children: null + content: Cell 4 + hidden: false + info: '' + level: 0 + map: null + markup: '' + meta: {} + nesting: 0 + tag: '' + type: text + content: Cell 4 + hidden: false + info: '' + level: 4 + map: + - 4 + - 5 + markup: '' + meta: {} + nesting: 0 + tag: '' + type: inline +- attrs: null + block: true + children: null + content: '' + hidden: false + info: '' + level: 3 + map: null + markup: '' + meta: {} + nesting: -1 + tag: td + type: td_close +- attrs: null + block: true + children: null + content: '' + hidden: false + info: '' + level: 2 + map: null + markup: '' + meta: {} + nesting: -1 + tag: tr + type: tr_close +- attrs: null + block: true + children: null + content: '' + hidden: false + info: '' + level: 1 + map: null + markup: '' + meta: {} + nesting: -1 + tag: tbody + type: tbody_close +- attrs: null + block: true + children: null + content: '' + hidden: false + info: '' + level: 0 + map: null + markup: '' + meta: {} + nesting: -1 + tag: table + type: table_close diff --git a/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/test/gh/tests/test_api/test_plugin_creation.py b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/test/gh/tests/test_api/test_plugin_creation.py new file mode 100644 index 0000000000000000000000000000000000000000..d555be18e2ea0db071d1f11551338a0bd5ac8685 --- /dev/null +++ b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/test/gh/tests/test_api/test_plugin_creation.py @@ -0,0 +1,91 @@ +"""Test basic plugin creation functionality: +that they can be added and are called correctly +""" + +from markdown_it import MarkdownIt + + +def inline_rule(state, silent): + print("plugin called") + return False + + +def test_inline_after(capsys): + def _plugin(_md: MarkdownIt) -> None: + _md.inline.ruler.after("text", "new_rule", inline_rule) + + MarkdownIt().use(_plugin).parse("[") + assert "plugin called" in capsys.readouterr().out + + +def test_inline_before(capsys): + def _plugin(_md: MarkdownIt) -> None: + _md.inline.ruler.before("text", "new_rule", inline_rule) + + MarkdownIt().use(_plugin).parse("a") + assert "plugin called" in capsys.readouterr().out + + +def test_inline_at(capsys): + def _plugin(_md: MarkdownIt) -> None: + _md.inline.ruler.at("text", inline_rule) + + MarkdownIt().use(_plugin).parse("a") + assert "plugin called" in capsys.readouterr().out + + +def block_rule(state, startLine, endLine, silent): + print("plugin called") + return False + + +def test_block_after(capsys): + def _plugin(_md: MarkdownIt) -> None: + _md.block.ruler.after("hr", "new_rule", block_rule) + + MarkdownIt().use(_plugin).parse("a") + assert "plugin called" in capsys.readouterr().out + + +def test_block_before(capsys): + def _plugin(_md: MarkdownIt) -> None: + _md.block.ruler.before("hr", "new_rule", block_rule) + + MarkdownIt().use(_plugin).parse("a") + assert "plugin called" in capsys.readouterr().out + + +def test_block_at(capsys): + def _plugin(_md: MarkdownIt) -> None: + _md.block.ruler.at("hr", block_rule) + + MarkdownIt().use(_plugin).parse("a") + assert "plugin called" in capsys.readouterr().out + + +def core_rule(state): + print("plugin called") + + +def test_core_after(capsys): + def _plugin(_md: MarkdownIt) -> None: + _md.core.ruler.after("normalize", "new_rule", core_rule) + + MarkdownIt().use(_plugin).parse("a") + assert "plugin called" in capsys.readouterr().out + + +def test_core_before(capsys): + def _plugin(_md: MarkdownIt) -> None: + _md.core.ruler.before("normalize", "new_rule", core_rule) + + MarkdownIt().use(_plugin).parse("a") + assert "plugin called" in capsys.readouterr().out + + +def test_core_at(capsys): + def _plugin(_md: MarkdownIt) -> None: + _md.core.ruler.at("normalize", core_rule) + + MarkdownIt().use(_plugin).parse("a") + assert "plugin called" in capsys.readouterr().out diff --git a/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/test/gh/tests/test_api/test_token.py b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/test/gh/tests/test_api/test_token.py new file mode 100644 index 0000000000000000000000000000000000000000..4403598115d6eeb1c1816236b39b52f933adcefc --- /dev/null +++ b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/test/gh/tests/test_api/test_token.py @@ -0,0 +1,38 @@ +import warnings + +from markdown_it.token import Token + + +def test_token(): + token = Token("name", "tag", 0) + assert token.as_dict() == { + "type": "name", + "tag": "tag", + "nesting": 0, + "attrs": None, + "map": None, + "level": 0, + "children": None, + "content": "", + "markup": "", + "info": "", + "meta": {}, + "block": False, + "hidden": False, + } + token.attrSet("a", "b") + assert token.attrGet("a") == "b" + token.attrJoin("a", "c") + assert token.attrGet("a") == "b c" + token.attrPush(("x", "y")) + assert token.attrGet("x") == "y" + with warnings.catch_warnings(): + warnings.simplefilter("ignore") + assert token.attrIndex("a") == 0 + assert token.attrIndex("x") == 1 + assert token.attrIndex("j") == -1 + + +def test_serialization(): + token = Token("name", "tag", 0, children=[Token("other", "tag2", 0)]) + assert token == Token.from_dict(token.as_dict()) diff --git a/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/test/gh/tests/test_cli.py b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/test/gh/tests/test_cli.py new file mode 100644 index 0000000000000000000000000000000000000000..ed8d8205b91748f07bf7160d4846000109c97428 --- /dev/null +++ b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/test/gh/tests/test_cli.py @@ -0,0 +1,42 @@ +import pathlib +import tempfile +from unittest.mock import patch + +import pytest + +from markdown_it.cli import parse + + +def test_parse(): + with tempfile.TemporaryDirectory() as tempdir: + path = pathlib.Path(tempdir).joinpath("test.md") + path.write_text("a b c") + assert parse.main([str(path)]) == 0 + + +def test_parse_fail(): + with pytest.raises(SystemExit) as exc_info: + parse.main(["/tmp/nonexistant_path/for_cli_test.md"]) + assert exc_info.value.code == 1 + + +def test_non_utf8(): + with tempfile.TemporaryDirectory() as tempdir: + path = pathlib.Path(tempdir).joinpath("test.md") + path.write_bytes(b"\x80abc") + assert parse.main([str(path)]) == 0 + + +def test_print_heading(): + with patch("builtins.print") as patched: + parse.print_heading() + patched.assert_called() + + +def test_interactive(): + def mock_input(prompt): + raise KeyboardInterrupt + + with patch("builtins.print") as patched, patch("builtins.input", mock_input): + parse.interactive() + patched.assert_called() diff --git a/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/test/gh/tests/test_cmark_spec/commonmark.json b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/test/gh/tests/test_cmark_spec/commonmark.json new file mode 100644 index 0000000000000000000000000000000000000000..1f89e66f2ada1fb77c32ced2376f04afcab88b92 --- /dev/null +++ b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/test/gh/tests/test_cmark_spec/commonmark.json @@ -0,0 +1,5218 @@ +[ + { + "markdown": "\tfoo\tbaz\t\tbim\n", + "html": "
foo\tbaz\t\tbim\n
\n", + "example": 1, + "start_line": 355, + "end_line": 360, + "section": "Tabs" + }, + { + "markdown": " \tfoo\tbaz\t\tbim\n", + "html": "
foo\tbaz\t\tbim\n
\n", + "example": 2, + "start_line": 362, + "end_line": 367, + "section": "Tabs" + }, + { + "markdown": " a\ta\n ὐ\ta\n", + "html": "
a\ta\nὐ\ta\n
\n", + "example": 3, + "start_line": 369, + "end_line": 376, + "section": "Tabs" + }, + { + "markdown": " - foo\n\n\tbar\n", + "html": "
    \n
  • \n

    foo

    \n

    bar

    \n
  • \n
\n", + "example": 4, + "start_line": 382, + "end_line": 393, + "section": "Tabs" + }, + { + "markdown": "- foo\n\n\t\tbar\n", + "html": "
    \n
  • \n

    foo

    \n
      bar\n
    \n
  • \n
\n", + "example": 5, + "start_line": 395, + "end_line": 407, + "section": "Tabs" + }, + { + "markdown": ">\t\tfoo\n", + "html": "
\n
  foo\n
\n
\n", + "example": 6, + "start_line": 418, + "end_line": 425, + "section": "Tabs" + }, + { + "markdown": "-\t\tfoo\n", + "html": "
    \n
  • \n
      foo\n
    \n
  • \n
\n", + "example": 7, + "start_line": 427, + "end_line": 436, + "section": "Tabs" + }, + { + "markdown": " foo\n\tbar\n", + "html": "
foo\nbar\n
\n", + "example": 8, + "start_line": 439, + "end_line": 446, + "section": "Tabs" + }, + { + "markdown": " - foo\n - bar\n\t - baz\n", + "html": "
    \n
  • foo\n
      \n
    • bar\n
        \n
      • baz
      • \n
      \n
    • \n
    \n
  • \n
\n", + "example": 9, + "start_line": 448, + "end_line": 464, + "section": "Tabs" + }, + { + "markdown": "#\tFoo\n", + "html": "

Foo

\n", + "example": 10, + "start_line": 466, + "end_line": 470, + "section": "Tabs" + }, + { + "markdown": "*\t*\t*\t\n", + "html": "
\n", + "example": 11, + "start_line": 472, + "end_line": 476, + "section": "Tabs" + }, + { + "markdown": "\\!\\\"\\#\\$\\%\\&\\'\\(\\)\\*\\+\\,\\-\\.\\/\\:\\;\\<\\=\\>\\?\\@\\[\\\\\\]\\^\\_\\`\\{\\|\\}\\~\n", + "html": "

!"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~

\n", + "example": 12, + "start_line": 489, + "end_line": 493, + "section": "Backslash escapes" + }, + { + "markdown": "\\\t\\A\\a\\ \\3\\φ\\«\n", + "html": "

\\\t\\A\\a\\ \\3\\φ\\«

\n", + "example": 13, + "start_line": 499, + "end_line": 503, + "section": "Backslash escapes" + }, + { + "markdown": "\\*not emphasized*\n\\
not a tag\n\\[not a link](/foo)\n\\`not code`\n1\\. not a list\n\\* not a list\n\\# not a heading\n\\[foo]: /url \"not a reference\"\n\\ö not a character entity\n", + "html": "

*not emphasized*\n<br/> not a tag\n[not a link](/foo)\n`not code`\n1. not a list\n* not a list\n# not a heading\n[foo]: /url "not a reference"\n&ouml; not a character entity

\n", + "example": 14, + "start_line": 509, + "end_line": 529, + "section": "Backslash escapes" + }, + { + "markdown": "\\\\*emphasis*\n", + "html": "

\\emphasis

\n", + "example": 15, + "start_line": 534, + "end_line": 538, + "section": "Backslash escapes" + }, + { + "markdown": "foo\\\nbar\n", + "html": "

foo
\nbar

\n", + "example": 16, + "start_line": 543, + "end_line": 549, + "section": "Backslash escapes" + }, + { + "markdown": "`` \\[\\` ``\n", + "html": "

\\[\\`

\n", + "example": 17, + "start_line": 555, + "end_line": 559, + "section": "Backslash escapes" + }, + { + "markdown": " \\[\\]\n", + "html": "
\\[\\]\n
\n", + "example": 18, + "start_line": 562, + "end_line": 567, + "section": "Backslash escapes" + }, + { + "markdown": "~~~\n\\[\\]\n~~~\n", + "html": "
\\[\\]\n
\n", + "example": 19, + "start_line": 570, + "end_line": 577, + "section": "Backslash escapes" + }, + { + "markdown": "\n", + "html": "

https://example.com?find=\\*

\n", + "example": 20, + "start_line": 580, + "end_line": 584, + "section": "Backslash escapes" + }, + { + "markdown": "\n", + "html": "\n", + "example": 21, + "start_line": 587, + "end_line": 591, + "section": "Backslash escapes" + }, + { + "markdown": "[foo](/bar\\* \"ti\\*tle\")\n", + "html": "

foo

\n", + "example": 22, + "start_line": 597, + "end_line": 601, + "section": "Backslash escapes" + }, + { + "markdown": "[foo]\n\n[foo]: /bar\\* \"ti\\*tle\"\n", + "html": "

foo

\n", + "example": 23, + "start_line": 604, + "end_line": 610, + "section": "Backslash escapes" + }, + { + "markdown": "``` foo\\+bar\nfoo\n```\n", + "html": "
foo\n
\n", + "example": 24, + "start_line": 613, + "end_line": 620, + "section": "Backslash escapes" + }, + { + "markdown": "  & © Æ Ď\n¾ ℋ ⅆ\n∲ ≧̸\n", + "html": "

  & © Æ Ď\n¾ ℋ ⅆ\n∲ ≧̸

\n", + "example": 25, + "start_line": 649, + "end_line": 657, + "section": "Entity and numeric character references" + }, + { + "markdown": "# Ӓ Ϡ �\n", + "html": "

# Ӓ Ϡ �

\n", + "example": 26, + "start_line": 668, + "end_line": 672, + "section": "Entity and numeric character references" + }, + { + "markdown": "" ആ ಫ\n", + "html": "

" ആ ಫ

\n", + "example": 27, + "start_line": 681, + "end_line": 685, + "section": "Entity and numeric character references" + }, + { + "markdown": "  &x; &#; &#x;\n�\n&#abcdef0;\n&ThisIsNotDefined; &hi?;\n", + "html": "

&nbsp &x; &#; &#x;\n&#87654321;\n&#abcdef0;\n&ThisIsNotDefined; &hi?;

\n", + "example": 28, + "start_line": 690, + "end_line": 700, + "section": "Entity and numeric character references" + }, + { + "markdown": "©\n", + "html": "

&copy

\n", + "example": 29, + "start_line": 707, + "end_line": 711, + "section": "Entity and numeric character references" + }, + { + "markdown": "&MadeUpEntity;\n", + "html": "

&MadeUpEntity;

\n", + "example": 30, + "start_line": 717, + "end_line": 721, + "section": "Entity and numeric character references" + }, + { + "markdown": "\n", + "html": "\n", + "example": 31, + "start_line": 728, + "end_line": 732, + "section": "Entity and numeric character references" + }, + { + "markdown": "[foo](/föö \"föö\")\n", + "html": "

foo

\n", + "example": 32, + "start_line": 735, + "end_line": 739, + "section": "Entity and numeric character references" + }, + { + "markdown": "[foo]\n\n[foo]: /föö \"föö\"\n", + "html": "

foo

\n", + "example": 33, + "start_line": 742, + "end_line": 748, + "section": "Entity and numeric character references" + }, + { + "markdown": "``` föö\nfoo\n```\n", + "html": "
foo\n
\n", + "example": 34, + "start_line": 751, + "end_line": 758, + "section": "Entity and numeric character references" + }, + { + "markdown": "`föö`\n", + "html": "

f&ouml;&ouml;

\n", + "example": 35, + "start_line": 764, + "end_line": 768, + "section": "Entity and numeric character references" + }, + { + "markdown": " föfö\n", + "html": "
f&ouml;f&ouml;\n
\n", + "example": 36, + "start_line": 771, + "end_line": 776, + "section": "Entity and numeric character references" + }, + { + "markdown": "*foo*\n*foo*\n", + "html": "

*foo*\nfoo

\n", + "example": 37, + "start_line": 783, + "end_line": 789, + "section": "Entity and numeric character references" + }, + { + "markdown": "* foo\n\n* foo\n", + "html": "

* foo

\n
    \n
  • foo
  • \n
\n", + "example": 38, + "start_line": 791, + "end_line": 800, + "section": "Entity and numeric character references" + }, + { + "markdown": "foo bar\n", + "html": "

foo\n\nbar

\n", + "example": 39, + "start_line": 802, + "end_line": 808, + "section": "Entity and numeric character references" + }, + { + "markdown": " foo\n", + "html": "

\tfoo

\n", + "example": 40, + "start_line": 810, + "end_line": 814, + "section": "Entity and numeric character references" + }, + { + "markdown": "[a](url "tit")\n", + "html": "

[a](url "tit")

\n", + "example": 41, + "start_line": 817, + "end_line": 821, + "section": "Entity and numeric character references" + }, + { + "markdown": "- `one\n- two`\n", + "html": "
    \n
  • `one
  • \n
  • two`
  • \n
\n", + "example": 42, + "start_line": 840, + "end_line": 848, + "section": "Precedence" + }, + { + "markdown": "***\n---\n___\n", + "html": "
\n
\n
\n", + "example": 43, + "start_line": 879, + "end_line": 887, + "section": "Thematic breaks" + }, + { + "markdown": "+++\n", + "html": "

+++

\n", + "example": 44, + "start_line": 892, + "end_line": 896, + "section": "Thematic breaks" + }, + { + "markdown": "===\n", + "html": "

===

\n", + "example": 45, + "start_line": 899, + "end_line": 903, + "section": "Thematic breaks" + }, + { + "markdown": "--\n**\n__\n", + "html": "

--\n**\n__

\n", + "example": 46, + "start_line": 908, + "end_line": 916, + "section": "Thematic breaks" + }, + { + "markdown": " ***\n ***\n ***\n", + "html": "
\n
\n
\n", + "example": 47, + "start_line": 921, + "end_line": 929, + "section": "Thematic breaks" + }, + { + "markdown": " ***\n", + "html": "
***\n
\n", + "example": 48, + "start_line": 934, + "end_line": 939, + "section": "Thematic breaks" + }, + { + "markdown": "Foo\n ***\n", + "html": "

Foo\n***

\n", + "example": 49, + "start_line": 942, + "end_line": 948, + "section": "Thematic breaks" + }, + { + "markdown": "_____________________________________\n", + "html": "
\n", + "example": 50, + "start_line": 953, + "end_line": 957, + "section": "Thematic breaks" + }, + { + "markdown": " - - -\n", + "html": "
\n", + "example": 51, + "start_line": 962, + "end_line": 966, + "section": "Thematic breaks" + }, + { + "markdown": " ** * ** * ** * **\n", + "html": "
\n", + "example": 52, + "start_line": 969, + "end_line": 973, + "section": "Thematic breaks" + }, + { + "markdown": "- - - -\n", + "html": "
\n", + "example": 53, + "start_line": 976, + "end_line": 980, + "section": "Thematic breaks" + }, + { + "markdown": "- - - - \n", + "html": "
\n", + "example": 54, + "start_line": 985, + "end_line": 989, + "section": "Thematic breaks" + }, + { + "markdown": "_ _ _ _ a\n\na------\n\n---a---\n", + "html": "

_ _ _ _ a

\n

a------

\n

---a---

\n", + "example": 55, + "start_line": 994, + "end_line": 1004, + "section": "Thematic breaks" + }, + { + "markdown": " *-*\n", + "html": "

-

\n", + "example": 56, + "start_line": 1010, + "end_line": 1014, + "section": "Thematic breaks" + }, + { + "markdown": "- foo\n***\n- bar\n", + "html": "
    \n
  • foo
  • \n
\n
\n
    \n
  • bar
  • \n
\n", + "example": 57, + "start_line": 1019, + "end_line": 1031, + "section": "Thematic breaks" + }, + { + "markdown": "Foo\n***\nbar\n", + "html": "

Foo

\n
\n

bar

\n", + "example": 58, + "start_line": 1036, + "end_line": 1044, + "section": "Thematic breaks" + }, + { + "markdown": "Foo\n---\nbar\n", + "html": "

Foo

\n

bar

\n", + "example": 59, + "start_line": 1053, + "end_line": 1060, + "section": "Thematic breaks" + }, + { + "markdown": "* Foo\n* * *\n* Bar\n", + "html": "
    \n
  • Foo
  • \n
\n
\n
    \n
  • Bar
  • \n
\n", + "example": 60, + "start_line": 1066, + "end_line": 1078, + "section": "Thematic breaks" + }, + { + "markdown": "- Foo\n- * * *\n", + "html": "
    \n
  • Foo
  • \n
  • \n
    \n
  • \n
\n", + "example": 61, + "start_line": 1083, + "end_line": 1093, + "section": "Thematic breaks" + }, + { + "markdown": "# foo\n## foo\n### foo\n#### foo\n##### foo\n###### foo\n", + "html": "

foo

\n

foo

\n

foo

\n

foo

\n
foo
\n
foo
\n", + "example": 62, + "start_line": 1112, + "end_line": 1126, + "section": "ATX headings" + }, + { + "markdown": "####### foo\n", + "html": "

####### foo

\n", + "example": 63, + "start_line": 1131, + "end_line": 1135, + "section": "ATX headings" + }, + { + "markdown": "#5 bolt\n\n#hashtag\n", + "html": "

#5 bolt

\n

#hashtag

\n", + "example": 64, + "start_line": 1146, + "end_line": 1153, + "section": "ATX headings" + }, + { + "markdown": "\\## foo\n", + "html": "

## foo

\n", + "example": 65, + "start_line": 1158, + "end_line": 1162, + "section": "ATX headings" + }, + { + "markdown": "# foo *bar* \\*baz\\*\n", + "html": "

foo bar *baz*

\n", + "example": 66, + "start_line": 1167, + "end_line": 1171, + "section": "ATX headings" + }, + { + "markdown": "# foo \n", + "html": "

foo

\n", + "example": 67, + "start_line": 1176, + "end_line": 1180, + "section": "ATX headings" + }, + { + "markdown": " ### foo\n ## foo\n # foo\n", + "html": "

foo

\n

foo

\n

foo

\n", + "example": 68, + "start_line": 1185, + "end_line": 1193, + "section": "ATX headings" + }, + { + "markdown": " # foo\n", + "html": "
# foo\n
\n", + "example": 69, + "start_line": 1198, + "end_line": 1203, + "section": "ATX headings" + }, + { + "markdown": "foo\n # bar\n", + "html": "

foo\n# bar

\n", + "example": 70, + "start_line": 1206, + "end_line": 1212, + "section": "ATX headings" + }, + { + "markdown": "## foo ##\n ### bar ###\n", + "html": "

foo

\n

bar

\n", + "example": 71, + "start_line": 1217, + "end_line": 1223, + "section": "ATX headings" + }, + { + "markdown": "# foo ##################################\n##### foo ##\n", + "html": "

foo

\n
foo
\n", + "example": 72, + "start_line": 1228, + "end_line": 1234, + "section": "ATX headings" + }, + { + "markdown": "### foo ### \n", + "html": "

foo

\n", + "example": 73, + "start_line": 1239, + "end_line": 1243, + "section": "ATX headings" + }, + { + "markdown": "### foo ### b\n", + "html": "

foo ### b

\n", + "example": 74, + "start_line": 1250, + "end_line": 1254, + "section": "ATX headings" + }, + { + "markdown": "# foo#\n", + "html": "

foo#

\n", + "example": 75, + "start_line": 1259, + "end_line": 1263, + "section": "ATX headings" + }, + { + "markdown": "### foo \\###\n## foo #\\##\n# foo \\#\n", + "html": "

foo ###

\n

foo ###

\n

foo #

\n", + "example": 76, + "start_line": 1269, + "end_line": 1277, + "section": "ATX headings" + }, + { + "markdown": "****\n## foo\n****\n", + "html": "
\n

foo

\n
\n", + "example": 77, + "start_line": 1283, + "end_line": 1291, + "section": "ATX headings" + }, + { + "markdown": "Foo bar\n# baz\nBar foo\n", + "html": "

Foo bar

\n

baz

\n

Bar foo

\n", + "example": 78, + "start_line": 1294, + "end_line": 1302, + "section": "ATX headings" + }, + { + "markdown": "## \n#\n### ###\n", + "html": "

\n

\n

\n", + "example": 79, + "start_line": 1307, + "end_line": 1315, + "section": "ATX headings" + }, + { + "markdown": "Foo *bar*\n=========\n\nFoo *bar*\n---------\n", + "html": "

Foo bar

\n

Foo bar

\n", + "example": 80, + "start_line": 1347, + "end_line": 1356, + "section": "Setext headings" + }, + { + "markdown": "Foo *bar\nbaz*\n====\n", + "html": "

Foo bar\nbaz

\n", + "example": 81, + "start_line": 1361, + "end_line": 1368, + "section": "Setext headings" + }, + { + "markdown": " Foo *bar\nbaz*\t\n====\n", + "html": "

Foo bar\nbaz

\n", + "example": 82, + "start_line": 1375, + "end_line": 1382, + "section": "Setext headings" + }, + { + "markdown": "Foo\n-------------------------\n\nFoo\n=\n", + "html": "

Foo

\n

Foo

\n", + "example": 83, + "start_line": 1387, + "end_line": 1396, + "section": "Setext headings" + }, + { + "markdown": " Foo\n---\n\n Foo\n-----\n\n Foo\n ===\n", + "html": "

Foo

\n

Foo

\n

Foo

\n", + "example": 84, + "start_line": 1402, + "end_line": 1415, + "section": "Setext headings" + }, + { + "markdown": " Foo\n ---\n\n Foo\n---\n", + "html": "
Foo\n---\n\nFoo\n
\n
\n", + "example": 85, + "start_line": 1420, + "end_line": 1433, + "section": "Setext headings" + }, + { + "markdown": "Foo\n ---- \n", + "html": "

Foo

\n", + "example": 86, + "start_line": 1439, + "end_line": 1444, + "section": "Setext headings" + }, + { + "markdown": "Foo\n ---\n", + "html": "

Foo\n---

\n", + "example": 87, + "start_line": 1449, + "end_line": 1455, + "section": "Setext headings" + }, + { + "markdown": "Foo\n= =\n\nFoo\n--- -\n", + "html": "

Foo\n= =

\n

Foo

\n
\n", + "example": 88, + "start_line": 1460, + "end_line": 1471, + "section": "Setext headings" + }, + { + "markdown": "Foo \n-----\n", + "html": "

Foo

\n", + "example": 89, + "start_line": 1476, + "end_line": 1481, + "section": "Setext headings" + }, + { + "markdown": "Foo\\\n----\n", + "html": "

Foo\\

\n", + "example": 90, + "start_line": 1486, + "end_line": 1491, + "section": "Setext headings" + }, + { + "markdown": "`Foo\n----\n`\n\n\n", + "html": "

`Foo

\n

`

\n

<a title="a lot

\n

of dashes"/>

\n", + "example": 91, + "start_line": 1497, + "end_line": 1510, + "section": "Setext headings" + }, + { + "markdown": "> Foo\n---\n", + "html": "
\n

Foo

\n
\n
\n", + "example": 92, + "start_line": 1516, + "end_line": 1524, + "section": "Setext headings" + }, + { + "markdown": "> foo\nbar\n===\n", + "html": "
\n

foo\nbar\n===

\n
\n", + "example": 93, + "start_line": 1527, + "end_line": 1537, + "section": "Setext headings" + }, + { + "markdown": "- Foo\n---\n", + "html": "
    \n
  • Foo
  • \n
\n
\n", + "example": 94, + "start_line": 1540, + "end_line": 1548, + "section": "Setext headings" + }, + { + "markdown": "Foo\nBar\n---\n", + "html": "

Foo\nBar

\n", + "example": 95, + "start_line": 1555, + "end_line": 1562, + "section": "Setext headings" + }, + { + "markdown": "---\nFoo\n---\nBar\n---\nBaz\n", + "html": "
\n

Foo

\n

Bar

\n

Baz

\n", + "example": 96, + "start_line": 1568, + "end_line": 1580, + "section": "Setext headings" + }, + { + "markdown": "\n====\n", + "html": "

====

\n", + "example": 97, + "start_line": 1585, + "end_line": 1590, + "section": "Setext headings" + }, + { + "markdown": "---\n---\n", + "html": "
\n
\n", + "example": 98, + "start_line": 1597, + "end_line": 1603, + "section": "Setext headings" + }, + { + "markdown": "- foo\n-----\n", + "html": "
    \n
  • foo
  • \n
\n
\n", + "example": 99, + "start_line": 1606, + "end_line": 1614, + "section": "Setext headings" + }, + { + "markdown": " foo\n---\n", + "html": "
foo\n
\n
\n", + "example": 100, + "start_line": 1617, + "end_line": 1624, + "section": "Setext headings" + }, + { + "markdown": "> foo\n-----\n", + "html": "
\n

foo

\n
\n
\n", + "example": 101, + "start_line": 1627, + "end_line": 1635, + "section": "Setext headings" + }, + { + "markdown": "\\> foo\n------\n", + "html": "

> foo

\n", + "example": 102, + "start_line": 1641, + "end_line": 1646, + "section": "Setext headings" + }, + { + "markdown": "Foo\n\nbar\n---\nbaz\n", + "html": "

Foo

\n

bar

\n

baz

\n", + "example": 103, + "start_line": 1672, + "end_line": 1682, + "section": "Setext headings" + }, + { + "markdown": "Foo\nbar\n\n---\n\nbaz\n", + "html": "

Foo\nbar

\n
\n

baz

\n", + "example": 104, + "start_line": 1688, + "end_line": 1700, + "section": "Setext headings" + }, + { + "markdown": "Foo\nbar\n* * *\nbaz\n", + "html": "

Foo\nbar

\n
\n

baz

\n", + "example": 105, + "start_line": 1706, + "end_line": 1716, + "section": "Setext headings" + }, + { + "markdown": "Foo\nbar\n\\---\nbaz\n", + "html": "

Foo\nbar\n---\nbaz

\n", + "example": 106, + "start_line": 1721, + "end_line": 1731, + "section": "Setext headings" + }, + { + "markdown": " a simple\n indented code block\n", + "html": "
a simple\n  indented code block\n
\n", + "example": 107, + "start_line": 1749, + "end_line": 1756, + "section": "Indented code blocks" + }, + { + "markdown": " - foo\n\n bar\n", + "html": "
    \n
  • \n

    foo

    \n

    bar

    \n
  • \n
\n", + "example": 108, + "start_line": 1763, + "end_line": 1774, + "section": "Indented code blocks" + }, + { + "markdown": "1. foo\n\n - bar\n", + "html": "
    \n
  1. \n

    foo

    \n
      \n
    • bar
    • \n
    \n
  2. \n
\n", + "example": 109, + "start_line": 1777, + "end_line": 1790, + "section": "Indented code blocks" + }, + { + "markdown": "
\n *hi*\n\n - one\n", + "html": "
<a/>\n*hi*\n\n- one\n
\n", + "example": 110, + "start_line": 1797, + "end_line": 1808, + "section": "Indented code blocks" + }, + { + "markdown": " chunk1\n\n chunk2\n \n \n \n chunk3\n", + "html": "
chunk1\n\nchunk2\n\n\n\nchunk3\n
\n", + "example": 111, + "start_line": 1813, + "end_line": 1830, + "section": "Indented code blocks" + }, + { + "markdown": " chunk1\n \n chunk2\n", + "html": "
chunk1\n  \n  chunk2\n
\n", + "example": 112, + "start_line": 1836, + "end_line": 1845, + "section": "Indented code blocks" + }, + { + "markdown": "Foo\n bar\n\n", + "html": "

Foo\nbar

\n", + "example": 113, + "start_line": 1851, + "end_line": 1858, + "section": "Indented code blocks" + }, + { + "markdown": " foo\nbar\n", + "html": "
foo\n
\n

bar

\n", + "example": 114, + "start_line": 1865, + "end_line": 1872, + "section": "Indented code blocks" + }, + { + "markdown": "# Heading\n foo\nHeading\n------\n foo\n----\n", + "html": "

Heading

\n
foo\n
\n

Heading

\n
foo\n
\n
\n", + "example": 115, + "start_line": 1878, + "end_line": 1893, + "section": "Indented code blocks" + }, + { + "markdown": " foo\n bar\n", + "html": "
    foo\nbar\n
\n", + "example": 116, + "start_line": 1898, + "end_line": 1905, + "section": "Indented code blocks" + }, + { + "markdown": "\n \n foo\n \n\n", + "html": "
foo\n
\n", + "example": 117, + "start_line": 1911, + "end_line": 1920, + "section": "Indented code blocks" + }, + { + "markdown": " foo \n", + "html": "
foo  \n
\n", + "example": 118, + "start_line": 1925, + "end_line": 1930, + "section": "Indented code blocks" + }, + { + "markdown": "```\n<\n >\n```\n", + "html": "
<\n >\n
\n", + "example": 119, + "start_line": 1980, + "end_line": 1989, + "section": "Fenced code blocks" + }, + { + "markdown": "~~~\n<\n >\n~~~\n", + "html": "
<\n >\n
\n", + "example": 120, + "start_line": 1994, + "end_line": 2003, + "section": "Fenced code blocks" + }, + { + "markdown": "``\nfoo\n``\n", + "html": "

foo

\n", + "example": 121, + "start_line": 2007, + "end_line": 2013, + "section": "Fenced code blocks" + }, + { + "markdown": "```\naaa\n~~~\n```\n", + "html": "
aaa\n~~~\n
\n", + "example": 122, + "start_line": 2018, + "end_line": 2027, + "section": "Fenced code blocks" + }, + { + "markdown": "~~~\naaa\n```\n~~~\n", + "html": "
aaa\n```\n
\n", + "example": 123, + "start_line": 2030, + "end_line": 2039, + "section": "Fenced code blocks" + }, + { + "markdown": "````\naaa\n```\n``````\n", + "html": "
aaa\n```\n
\n", + "example": 124, + "start_line": 2044, + "end_line": 2053, + "section": "Fenced code blocks" + }, + { + "markdown": "~~~~\naaa\n~~~\n~~~~\n", + "html": "
aaa\n~~~\n
\n", + "example": 125, + "start_line": 2056, + "end_line": 2065, + "section": "Fenced code blocks" + }, + { + "markdown": "```\n", + "html": "
\n", + "example": 126, + "start_line": 2071, + "end_line": 2075, + "section": "Fenced code blocks" + }, + { + "markdown": "`````\n\n```\naaa\n", + "html": "
\n```\naaa\n
\n", + "example": 127, + "start_line": 2078, + "end_line": 2088, + "section": "Fenced code blocks" + }, + { + "markdown": "> ```\n> aaa\n\nbbb\n", + "html": "
\n
aaa\n
\n
\n

bbb

\n", + "example": 128, + "start_line": 2091, + "end_line": 2102, + "section": "Fenced code blocks" + }, + { + "markdown": "```\n\n \n```\n", + "html": "
\n  \n
\n", + "example": 129, + "start_line": 2107, + "end_line": 2116, + "section": "Fenced code blocks" + }, + { + "markdown": "```\n```\n", + "html": "
\n", + "example": 130, + "start_line": 2121, + "end_line": 2126, + "section": "Fenced code blocks" + }, + { + "markdown": " ```\n aaa\naaa\n```\n", + "html": "
aaa\naaa\n
\n", + "example": 131, + "start_line": 2133, + "end_line": 2142, + "section": "Fenced code blocks" + }, + { + "markdown": " ```\naaa\n aaa\naaa\n ```\n", + "html": "
aaa\naaa\naaa\n
\n", + "example": 132, + "start_line": 2145, + "end_line": 2156, + "section": "Fenced code blocks" + }, + { + "markdown": " ```\n aaa\n aaa\n aaa\n ```\n", + "html": "
aaa\n aaa\naaa\n
\n", + "example": 133, + "start_line": 2159, + "end_line": 2170, + "section": "Fenced code blocks" + }, + { + "markdown": " ```\n aaa\n ```\n", + "html": "
```\naaa\n```\n
\n", + "example": 134, + "start_line": 2175, + "end_line": 2184, + "section": "Fenced code blocks" + }, + { + "markdown": "```\naaa\n ```\n", + "html": "
aaa\n
\n", + "example": 135, + "start_line": 2190, + "end_line": 2197, + "section": "Fenced code blocks" + }, + { + "markdown": " ```\naaa\n ```\n", + "html": "
aaa\n
\n", + "example": 136, + "start_line": 2200, + "end_line": 2207, + "section": "Fenced code blocks" + }, + { + "markdown": "```\naaa\n ```\n", + "html": "
aaa\n    ```\n
\n", + "example": 137, + "start_line": 2212, + "end_line": 2220, + "section": "Fenced code blocks" + }, + { + "markdown": "``` ```\naaa\n", + "html": "

\naaa

\n", + "example": 138, + "start_line": 2226, + "end_line": 2232, + "section": "Fenced code blocks" + }, + { + "markdown": "~~~~~~\naaa\n~~~ ~~\n", + "html": "
aaa\n~~~ ~~\n
\n", + "example": 139, + "start_line": 2235, + "end_line": 2243, + "section": "Fenced code blocks" + }, + { + "markdown": "foo\n```\nbar\n```\nbaz\n", + "html": "

foo

\n
bar\n
\n

baz

\n", + "example": 140, + "start_line": 2249, + "end_line": 2260, + "section": "Fenced code blocks" + }, + { + "markdown": "foo\n---\n~~~\nbar\n~~~\n# baz\n", + "html": "

foo

\n
bar\n
\n

baz

\n", + "example": 141, + "start_line": 2266, + "end_line": 2278, + "section": "Fenced code blocks" + }, + { + "markdown": "```ruby\ndef foo(x)\n return 3\nend\n```\n", + "html": "
def foo(x)\n  return 3\nend\n
\n", + "example": 142, + "start_line": 2288, + "end_line": 2299, + "section": "Fenced code blocks" + }, + { + "markdown": "~~~~ ruby startline=3 $%@#$\ndef foo(x)\n return 3\nend\n~~~~~~~\n", + "html": "
def foo(x)\n  return 3\nend\n
\n", + "example": 143, + "start_line": 2302, + "end_line": 2313, + "section": "Fenced code blocks" + }, + { + "markdown": "````;\n````\n", + "html": "
\n", + "example": 144, + "start_line": 2316, + "end_line": 2321, + "section": "Fenced code blocks" + }, + { + "markdown": "``` aa ```\nfoo\n", + "html": "

aa\nfoo

\n", + "example": 145, + "start_line": 2326, + "end_line": 2332, + "section": "Fenced code blocks" + }, + { + "markdown": "~~~ aa ``` ~~~\nfoo\n~~~\n", + "html": "
foo\n
\n", + "example": 146, + "start_line": 2337, + "end_line": 2344, + "section": "Fenced code blocks" + }, + { + "markdown": "```\n``` aaa\n```\n", + "html": "
``` aaa\n
\n", + "example": 147, + "start_line": 2349, + "end_line": 2356, + "section": "Fenced code blocks" + }, + { + "markdown": "
\n
\n**Hello**,\n\n_world_.\n
\n
\n", + "html": "
\n
\n**Hello**,\n

world.\n

\n
\n", + "example": 148, + "start_line": 2428, + "end_line": 2443, + "section": "HTML blocks" + }, + { + "markdown": "\n \n \n \n
\n hi\n
\n\nokay.\n", + "html": "\n \n \n \n
\n hi\n
\n

okay.

\n", + "example": 149, + "start_line": 2457, + "end_line": 2476, + "section": "HTML blocks" + }, + { + "markdown": "
\n*foo*\n", + "example": 151, + "start_line": 2492, + "end_line": 2498, + "section": "HTML blocks" + }, + { + "markdown": "
\n\n*Markdown*\n\n
\n", + "html": "
\n

Markdown

\n
\n", + "example": 152, + "start_line": 2503, + "end_line": 2513, + "section": "HTML blocks" + }, + { + "markdown": "
\n
\n", + "html": "
\n
\n", + "example": 153, + "start_line": 2519, + "end_line": 2527, + "section": "HTML blocks" + }, + { + "markdown": "
\n
\n", + "html": "
\n
\n", + "example": 154, + "start_line": 2530, + "end_line": 2538, + "section": "HTML blocks" + }, + { + "markdown": "
\n*foo*\n\n*bar*\n", + "html": "
\n*foo*\n

bar

\n", + "example": 155, + "start_line": 2542, + "end_line": 2551, + "section": "HTML blocks" + }, + { + "markdown": "
\n", + "html": "\n", + "example": 159, + "start_line": 2591, + "end_line": 2595, + "section": "HTML blocks" + }, + { + "markdown": "
\nfoo\n
\n", + "html": "
\nfoo\n
\n", + "example": 160, + "start_line": 2598, + "end_line": 2606, + "section": "HTML blocks" + }, + { + "markdown": "
\n``` c\nint x = 33;\n```\n", + "html": "
\n``` c\nint x = 33;\n```\n", + "example": 161, + "start_line": 2615, + "end_line": 2625, + "section": "HTML blocks" + }, + { + "markdown": "\n*bar*\n\n", + "html": "\n*bar*\n\n", + "example": 162, + "start_line": 2632, + "end_line": 2640, + "section": "HTML blocks" + }, + { + "markdown": "\n*bar*\n\n", + "html": "\n*bar*\n\n", + "example": 163, + "start_line": 2645, + "end_line": 2653, + "section": "HTML blocks" + }, + { + "markdown": "\n*bar*\n\n", + "html": "\n*bar*\n\n", + "example": 164, + "start_line": 2656, + "end_line": 2664, + "section": "HTML blocks" + }, + { + "markdown": "\n*bar*\n", + "html": "\n*bar*\n", + "example": 165, + "start_line": 2667, + "end_line": 2673, + "section": "HTML blocks" + }, + { + "markdown": "\n*foo*\n\n", + "html": "\n*foo*\n\n", + "example": 166, + "start_line": 2682, + "end_line": 2690, + "section": "HTML blocks" + }, + { + "markdown": "\n\n*foo*\n\n\n", + "html": "\n

foo

\n
\n", + "example": 167, + "start_line": 2697, + "end_line": 2707, + "section": "HTML blocks" + }, + { + "markdown": "*foo*\n", + "html": "

foo

\n", + "example": 168, + "start_line": 2715, + "end_line": 2719, + "section": "HTML blocks" + }, + { + "markdown": "
\nimport Text.HTML.TagSoup\n\nmain :: IO ()\nmain = print $ parseTags tags\n
\nokay\n", + "html": "
\nimport Text.HTML.TagSoup\n\nmain :: IO ()\nmain = print $ parseTags tags\n
\n

okay

\n", + "example": 169, + "start_line": 2731, + "end_line": 2747, + "section": "HTML blocks" + }, + { + "markdown": "\nokay\n", + "html": "\n

okay

\n", + "example": 170, + "start_line": 2752, + "end_line": 2766, + "section": "HTML blocks" + }, + { + "markdown": "\n", + "html": "\n", + "example": 171, + "start_line": 2771, + "end_line": 2787, + "section": "HTML blocks" + }, + { + "markdown": "\nh1 {color:red;}\n\np {color:blue;}\n\nokay\n", + "html": "\nh1 {color:red;}\n\np {color:blue;}\n\n

okay

\n", + "example": 172, + "start_line": 2791, + "end_line": 2807, + "section": "HTML blocks" + }, + { + "markdown": "\n\nfoo\n", + "html": "\n\nfoo\n", + "example": 173, + "start_line": 2814, + "end_line": 2824, + "section": "HTML blocks" + }, + { + "markdown": ">
\n> foo\n\nbar\n", + "html": "
\n
\nfoo\n
\n

bar

\n", + "example": 174, + "start_line": 2827, + "end_line": 2838, + "section": "HTML blocks" + }, + { + "markdown": "-
\n- foo\n", + "html": "
    \n
  • \n
    \n
  • \n
  • foo
  • \n
\n", + "example": 175, + "start_line": 2841, + "end_line": 2851, + "section": "HTML blocks" + }, + { + "markdown": "\n*foo*\n", + "html": "\n

foo

\n", + "example": 176, + "start_line": 2856, + "end_line": 2862, + "section": "HTML blocks" + }, + { + "markdown": "*bar*\n*baz*\n", + "html": "*bar*\n

baz

\n", + "example": 177, + "start_line": 2865, + "end_line": 2871, + "section": "HTML blocks" + }, + { + "markdown": "1. *bar*\n", + "html": "1. *bar*\n", + "example": 178, + "start_line": 2877, + "end_line": 2885, + "section": "HTML blocks" + }, + { + "markdown": "\nokay\n", + "html": "\n

okay

\n", + "example": 179, + "start_line": 2890, + "end_line": 2902, + "section": "HTML blocks" + }, + { + "markdown": "';\n\n?>\nokay\n", + "html": "';\n\n?>\n

okay

\n", + "example": 180, + "start_line": 2908, + "end_line": 2922, + "section": "HTML blocks" + }, + { + "markdown": "\n", + "html": "\n", + "example": 181, + "start_line": 2927, + "end_line": 2931, + "section": "HTML blocks" + }, + { + "markdown": "\nokay\n", + "html": "\n

okay

\n", + "example": 182, + "start_line": 2936, + "end_line": 2964, + "section": "HTML blocks" + }, + { + "markdown": " \n\n \n", + "html": " \n
<!-- foo -->\n
\n", + "example": 183, + "start_line": 2970, + "end_line": 2978, + "section": "HTML blocks" + }, + { + "markdown": "
\n\n
\n", + "html": "
\n
<div>\n
\n", + "example": 184, + "start_line": 2981, + "end_line": 2989, + "section": "HTML blocks" + }, + { + "markdown": "Foo\n
\nbar\n
\n", + "html": "

Foo

\n
\nbar\n
\n", + "example": 185, + "start_line": 2995, + "end_line": 3005, + "section": "HTML blocks" + }, + { + "markdown": "
\nbar\n
\n*foo*\n", + "html": "
\nbar\n
\n*foo*\n", + "example": 186, + "start_line": 3012, + "end_line": 3022, + "section": "HTML blocks" + }, + { + "markdown": "Foo\n\nbaz\n", + "html": "

Foo\n\nbaz

\n", + "example": 187, + "start_line": 3027, + "end_line": 3035, + "section": "HTML blocks" + }, + { + "markdown": "
\n\n*Emphasized* text.\n\n
\n", + "html": "
\n

Emphasized text.

\n
\n", + "example": 188, + "start_line": 3068, + "end_line": 3078, + "section": "HTML blocks" + }, + { + "markdown": "
\n*Emphasized* text.\n
\n", + "html": "
\n*Emphasized* text.\n
\n", + "example": 189, + "start_line": 3081, + "end_line": 3089, + "section": "HTML blocks" + }, + { + "markdown": "\n\n\n\n\n\n\n\n
\nHi\n
\n", + "html": "\n\n\n\n
\nHi\n
\n", + "example": 190, + "start_line": 3103, + "end_line": 3123, + "section": "HTML blocks" + }, + { + "markdown": "\n\n \n\n \n\n \n\n
\n Hi\n
\n", + "html": "\n \n
<td>\n  Hi\n</td>\n
\n \n
\n", + "example": 191, + "start_line": 3130, + "end_line": 3151, + "section": "HTML blocks" + }, + { + "markdown": "[foo]: /url \"title\"\n\n[foo]\n", + "html": "

foo

\n", + "example": 192, + "start_line": 3179, + "end_line": 3185, + "section": "Link reference definitions" + }, + { + "markdown": " [foo]: \n /url \n 'the title' \n\n[foo]\n", + "html": "

foo

\n", + "example": 193, + "start_line": 3188, + "end_line": 3196, + "section": "Link reference definitions" + }, + { + "markdown": "[Foo*bar\\]]:my_(url) 'title (with parens)'\n\n[Foo*bar\\]]\n", + "html": "

Foo*bar]

\n", + "example": 194, + "start_line": 3199, + "end_line": 3205, + "section": "Link reference definitions" + }, + { + "markdown": "[Foo bar]:\n\n'title'\n\n[Foo bar]\n", + "html": "

Foo bar

\n", + "example": 195, + "start_line": 3208, + "end_line": 3216, + "section": "Link reference definitions" + }, + { + "markdown": "[foo]: /url '\ntitle\nline1\nline2\n'\n\n[foo]\n", + "html": "

foo

\n", + "example": 196, + "start_line": 3221, + "end_line": 3235, + "section": "Link reference definitions" + }, + { + "markdown": "[foo]: /url 'title\n\nwith blank line'\n\n[foo]\n", + "html": "

[foo]: /url 'title

\n

with blank line'

\n

[foo]

\n", + "example": 197, + "start_line": 3240, + "end_line": 3250, + "section": "Link reference definitions" + }, + { + "markdown": "[foo]:\n/url\n\n[foo]\n", + "html": "

foo

\n", + "example": 198, + "start_line": 3255, + "end_line": 3262, + "section": "Link reference definitions" + }, + { + "markdown": "[foo]:\n\n[foo]\n", + "html": "

[foo]:

\n

[foo]

\n", + "example": 199, + "start_line": 3267, + "end_line": 3274, + "section": "Link reference definitions" + }, + { + "markdown": "[foo]: <>\n\n[foo]\n", + "html": "

foo

\n", + "example": 200, + "start_line": 3279, + "end_line": 3285, + "section": "Link reference definitions" + }, + { + "markdown": "[foo]: (baz)\n\n[foo]\n", + "html": "

[foo]: (baz)

\n

[foo]

\n", + "example": 201, + "start_line": 3290, + "end_line": 3297, + "section": "Link reference definitions" + }, + { + "markdown": "[foo]: /url\\bar\\*baz \"foo\\\"bar\\baz\"\n\n[foo]\n", + "html": "

foo

\n", + "example": 202, + "start_line": 3303, + "end_line": 3309, + "section": "Link reference definitions" + }, + { + "markdown": "[foo]\n\n[foo]: url\n", + "html": "

foo

\n", + "example": 203, + "start_line": 3314, + "end_line": 3320, + "section": "Link reference definitions" + }, + { + "markdown": "[foo]\n\n[foo]: first\n[foo]: second\n", + "html": "

foo

\n", + "example": 204, + "start_line": 3326, + "end_line": 3333, + "section": "Link reference definitions" + }, + { + "markdown": "[FOO]: /url\n\n[Foo]\n", + "html": "

Foo

\n", + "example": 205, + "start_line": 3339, + "end_line": 3345, + "section": "Link reference definitions" + }, + { + "markdown": "[ΑΓΩ]: /φου\n\n[αγω]\n", + "html": "

αγω

\n", + "example": 206, + "start_line": 3348, + "end_line": 3354, + "section": "Link reference definitions" + }, + { + "markdown": "[foo]: /url\n", + "html": "", + "example": 207, + "start_line": 3363, + "end_line": 3366, + "section": "Link reference definitions" + }, + { + "markdown": "[\nfoo\n]: /url\nbar\n", + "html": "

bar

\n", + "example": 208, + "start_line": 3371, + "end_line": 3378, + "section": "Link reference definitions" + }, + { + "markdown": "[foo]: /url \"title\" ok\n", + "html": "

[foo]: /url "title" ok

\n", + "example": 209, + "start_line": 3384, + "end_line": 3388, + "section": "Link reference definitions" + }, + { + "markdown": "[foo]: /url\n\"title\" ok\n", + "html": "

"title" ok

\n", + "example": 210, + "start_line": 3393, + "end_line": 3398, + "section": "Link reference definitions" + }, + { + "markdown": " [foo]: /url \"title\"\n\n[foo]\n", + "html": "
[foo]: /url "title"\n
\n

[foo]

\n", + "example": 211, + "start_line": 3404, + "end_line": 3412, + "section": "Link reference definitions" + }, + { + "markdown": "```\n[foo]: /url\n```\n\n[foo]\n", + "html": "
[foo]: /url\n
\n

[foo]

\n", + "example": 212, + "start_line": 3418, + "end_line": 3428, + "section": "Link reference definitions" + }, + { + "markdown": "Foo\n[bar]: /baz\n\n[bar]\n", + "html": "

Foo\n[bar]: /baz

\n

[bar]

\n", + "example": 213, + "start_line": 3433, + "end_line": 3442, + "section": "Link reference definitions" + }, + { + "markdown": "# [Foo]\n[foo]: /url\n> bar\n", + "html": "

Foo

\n
\n

bar

\n
\n", + "example": 214, + "start_line": 3448, + "end_line": 3457, + "section": "Link reference definitions" + }, + { + "markdown": "[foo]: /url\nbar\n===\n[foo]\n", + "html": "

bar

\n

foo

\n", + "example": 215, + "start_line": 3459, + "end_line": 3467, + "section": "Link reference definitions" + }, + { + "markdown": "[foo]: /url\n===\n[foo]\n", + "html": "

===\nfoo

\n", + "example": 216, + "start_line": 3469, + "end_line": 3476, + "section": "Link reference definitions" + }, + { + "markdown": "[foo]: /foo-url \"foo\"\n[bar]: /bar-url\n \"bar\"\n[baz]: /baz-url\n\n[foo],\n[bar],\n[baz]\n", + "html": "

foo,\nbar,\nbaz

\n", + "example": 217, + "start_line": 3482, + "end_line": 3495, + "section": "Link reference definitions" + }, + { + "markdown": "[foo]\n\n> [foo]: /url\n", + "html": "

foo

\n
\n
\n", + "example": 218, + "start_line": 3503, + "end_line": 3511, + "section": "Link reference definitions" + }, + { + "markdown": "aaa\n\nbbb\n", + "html": "

aaa

\n

bbb

\n", + "example": 219, + "start_line": 3525, + "end_line": 3532, + "section": "Paragraphs" + }, + { + "markdown": "aaa\nbbb\n\nccc\nddd\n", + "html": "

aaa\nbbb

\n

ccc\nddd

\n", + "example": 220, + "start_line": 3537, + "end_line": 3548, + "section": "Paragraphs" + }, + { + "markdown": "aaa\n\n\nbbb\n", + "html": "

aaa

\n

bbb

\n", + "example": 221, + "start_line": 3553, + "end_line": 3561, + "section": "Paragraphs" + }, + { + "markdown": " aaa\n bbb\n", + "html": "

aaa\nbbb

\n", + "example": 222, + "start_line": 3566, + "end_line": 3572, + "section": "Paragraphs" + }, + { + "markdown": "aaa\n bbb\n ccc\n", + "html": "

aaa\nbbb\nccc

\n", + "example": 223, + "start_line": 3578, + "end_line": 3586, + "section": "Paragraphs" + }, + { + "markdown": " aaa\nbbb\n", + "html": "

aaa\nbbb

\n", + "example": 224, + "start_line": 3592, + "end_line": 3598, + "section": "Paragraphs" + }, + { + "markdown": " aaa\nbbb\n", + "html": "
aaa\n
\n

bbb

\n", + "example": 225, + "start_line": 3601, + "end_line": 3608, + "section": "Paragraphs" + }, + { + "markdown": "aaa \nbbb \n", + "html": "

aaa
\nbbb

\n", + "example": 226, + "start_line": 3615, + "end_line": 3621, + "section": "Paragraphs" + }, + { + "markdown": " \n\naaa\n \n\n# aaa\n\n \n", + "html": "

aaa

\n

aaa

\n", + "example": 227, + "start_line": 3632, + "end_line": 3644, + "section": "Blank lines" + }, + { + "markdown": "> # Foo\n> bar\n> baz\n", + "html": "
\n

Foo

\n

bar\nbaz

\n
\n", + "example": 228, + "start_line": 3700, + "end_line": 3710, + "section": "Block quotes" + }, + { + "markdown": "># Foo\n>bar\n> baz\n", + "html": "
\n

Foo

\n

bar\nbaz

\n
\n", + "example": 229, + "start_line": 3715, + "end_line": 3725, + "section": "Block quotes" + }, + { + "markdown": " > # Foo\n > bar\n > baz\n", + "html": "
\n

Foo

\n

bar\nbaz

\n
\n", + "example": 230, + "start_line": 3730, + "end_line": 3740, + "section": "Block quotes" + }, + { + "markdown": " > # Foo\n > bar\n > baz\n", + "html": "
> # Foo\n> bar\n> baz\n
\n", + "example": 231, + "start_line": 3745, + "end_line": 3754, + "section": "Block quotes" + }, + { + "markdown": "> # Foo\n> bar\nbaz\n", + "html": "
\n

Foo

\n

bar\nbaz

\n
\n", + "example": 232, + "start_line": 3760, + "end_line": 3770, + "section": "Block quotes" + }, + { + "markdown": "> bar\nbaz\n> foo\n", + "html": "
\n

bar\nbaz\nfoo

\n
\n", + "example": 233, + "start_line": 3776, + "end_line": 3786, + "section": "Block quotes" + }, + { + "markdown": "> foo\n---\n", + "html": "
\n

foo

\n
\n
\n", + "example": 234, + "start_line": 3800, + "end_line": 3808, + "section": "Block quotes" + }, + { + "markdown": "> - foo\n- bar\n", + "html": "
\n
    \n
  • foo
  • \n
\n
\n
    \n
  • bar
  • \n
\n", + "example": 235, + "start_line": 3820, + "end_line": 3832, + "section": "Block quotes" + }, + { + "markdown": "> foo\n bar\n", + "html": "
\n
foo\n
\n
\n
bar\n
\n", + "example": 236, + "start_line": 3838, + "end_line": 3848, + "section": "Block quotes" + }, + { + "markdown": "> ```\nfoo\n```\n", + "html": "
\n
\n
\n

foo

\n
\n", + "example": 237, + "start_line": 3851, + "end_line": 3861, + "section": "Block quotes" + }, + { + "markdown": "> foo\n - bar\n", + "html": "
\n

foo\n- bar

\n
\n", + "example": 238, + "start_line": 3867, + "end_line": 3875, + "section": "Block quotes" + }, + { + "markdown": ">\n", + "html": "
\n
\n", + "example": 239, + "start_line": 3891, + "end_line": 3896, + "section": "Block quotes" + }, + { + "markdown": ">\n> \n> \n", + "html": "
\n
\n", + "example": 240, + "start_line": 3899, + "end_line": 3906, + "section": "Block quotes" + }, + { + "markdown": ">\n> foo\n> \n", + "html": "
\n

foo

\n
\n", + "example": 241, + "start_line": 3911, + "end_line": 3919, + "section": "Block quotes" + }, + { + "markdown": "> foo\n\n> bar\n", + "html": "
\n

foo

\n
\n
\n

bar

\n
\n", + "example": 242, + "start_line": 3924, + "end_line": 3935, + "section": "Block quotes" + }, + { + "markdown": "> foo\n> bar\n", + "html": "
\n

foo\nbar

\n
\n", + "example": 243, + "start_line": 3946, + "end_line": 3954, + "section": "Block quotes" + }, + { + "markdown": "> foo\n>\n> bar\n", + "html": "
\n

foo

\n

bar

\n
\n", + "example": 244, + "start_line": 3959, + "end_line": 3968, + "section": "Block quotes" + }, + { + "markdown": "foo\n> bar\n", + "html": "

foo

\n
\n

bar

\n
\n", + "example": 245, + "start_line": 3973, + "end_line": 3981, + "section": "Block quotes" + }, + { + "markdown": "> aaa\n***\n> bbb\n", + "html": "
\n

aaa

\n
\n
\n
\n

bbb

\n
\n", + "example": 246, + "start_line": 3987, + "end_line": 3999, + "section": "Block quotes" + }, + { + "markdown": "> bar\nbaz\n", + "html": "
\n

bar\nbaz

\n
\n", + "example": 247, + "start_line": 4005, + "end_line": 4013, + "section": "Block quotes" + }, + { + "markdown": "> bar\n\nbaz\n", + "html": "
\n

bar

\n
\n

baz

\n", + "example": 248, + "start_line": 4016, + "end_line": 4025, + "section": "Block quotes" + }, + { + "markdown": "> bar\n>\nbaz\n", + "html": "
\n

bar

\n
\n

baz

\n", + "example": 249, + "start_line": 4028, + "end_line": 4037, + "section": "Block quotes" + }, + { + "markdown": "> > > foo\nbar\n", + "html": "
\n
\n
\n

foo\nbar

\n
\n
\n
\n", + "example": 250, + "start_line": 4044, + "end_line": 4056, + "section": "Block quotes" + }, + { + "markdown": ">>> foo\n> bar\n>>baz\n", + "html": "
\n
\n
\n

foo\nbar\nbaz

\n
\n
\n
\n", + "example": 251, + "start_line": 4059, + "end_line": 4073, + "section": "Block quotes" + }, + { + "markdown": "> code\n\n> not code\n", + "html": "
\n
code\n
\n
\n
\n

not code

\n
\n", + "example": 252, + "start_line": 4081, + "end_line": 4093, + "section": "Block quotes" + }, + { + "markdown": "A paragraph\nwith two lines.\n\n indented code\n\n> A block quote.\n", + "html": "

A paragraph\nwith two lines.

\n
indented code\n
\n
\n

A block quote.

\n
\n", + "example": 253, + "start_line": 4135, + "end_line": 4150, + "section": "List items" + }, + { + "markdown": "1. A paragraph\n with two lines.\n\n indented code\n\n > A block quote.\n", + "html": "
    \n
  1. \n

    A paragraph\nwith two lines.

    \n
    indented code\n
    \n
    \n

    A block quote.

    \n
    \n
  2. \n
\n", + "example": 254, + "start_line": 4157, + "end_line": 4176, + "section": "List items" + }, + { + "markdown": "- one\n\n two\n", + "html": "
    \n
  • one
  • \n
\n

two

\n", + "example": 255, + "start_line": 4190, + "end_line": 4199, + "section": "List items" + }, + { + "markdown": "- one\n\n two\n", + "html": "
    \n
  • \n

    one

    \n

    two

    \n
  • \n
\n", + "example": 256, + "start_line": 4202, + "end_line": 4213, + "section": "List items" + }, + { + "markdown": " - one\n\n two\n", + "html": "
    \n
  • one
  • \n
\n
 two\n
\n", + "example": 257, + "start_line": 4216, + "end_line": 4226, + "section": "List items" + }, + { + "markdown": " - one\n\n two\n", + "html": "
    \n
  • \n

    one

    \n

    two

    \n
  • \n
\n", + "example": 258, + "start_line": 4229, + "end_line": 4240, + "section": "List items" + }, + { + "markdown": " > > 1. one\n>>\n>> two\n", + "html": "
\n
\n
    \n
  1. \n

    one

    \n

    two

    \n
  2. \n
\n
\n
\n", + "example": 259, + "start_line": 4251, + "end_line": 4266, + "section": "List items" + }, + { + "markdown": ">>- one\n>>\n > > two\n", + "html": "
\n
\n
    \n
  • one
  • \n
\n

two

\n
\n
\n", + "example": 260, + "start_line": 4278, + "end_line": 4291, + "section": "List items" + }, + { + "markdown": "-one\n\n2.two\n", + "html": "

-one

\n

2.two

\n", + "example": 261, + "start_line": 4297, + "end_line": 4304, + "section": "List items" + }, + { + "markdown": "- foo\n\n\n bar\n", + "html": "
    \n
  • \n

    foo

    \n

    bar

    \n
  • \n
\n", + "example": 262, + "start_line": 4310, + "end_line": 4322, + "section": "List items" + }, + { + "markdown": "1. foo\n\n ```\n bar\n ```\n\n baz\n\n > bam\n", + "html": "
    \n
  1. \n

    foo

    \n
    bar\n
    \n

    baz

    \n
    \n

    bam

    \n
    \n
  2. \n
\n", + "example": 263, + "start_line": 4327, + "end_line": 4349, + "section": "List items" + }, + { + "markdown": "- Foo\n\n bar\n\n\n baz\n", + "html": "
    \n
  • \n

    Foo

    \n
    bar\n\n\nbaz\n
    \n
  • \n
\n", + "example": 264, + "start_line": 4355, + "end_line": 4373, + "section": "List items" + }, + { + "markdown": "123456789. ok\n", + "html": "
    \n
  1. ok
  2. \n
\n", + "example": 265, + "start_line": 4377, + "end_line": 4383, + "section": "List items" + }, + { + "markdown": "1234567890. not ok\n", + "html": "

1234567890. not ok

\n", + "example": 266, + "start_line": 4386, + "end_line": 4390, + "section": "List items" + }, + { + "markdown": "0. ok\n", + "html": "
    \n
  1. ok
  2. \n
\n", + "example": 267, + "start_line": 4395, + "end_line": 4401, + "section": "List items" + }, + { + "markdown": "003. ok\n", + "html": "
    \n
  1. ok
  2. \n
\n", + "example": 268, + "start_line": 4404, + "end_line": 4410, + "section": "List items" + }, + { + "markdown": "-1. not ok\n", + "html": "

-1. not ok

\n", + "example": 269, + "start_line": 4415, + "end_line": 4419, + "section": "List items" + }, + { + "markdown": "- foo\n\n bar\n", + "html": "
    \n
  • \n

    foo

    \n
    bar\n
    \n
  • \n
\n", + "example": 270, + "start_line": 4438, + "end_line": 4450, + "section": "List items" + }, + { + "markdown": " 10. foo\n\n bar\n", + "html": "
    \n
  1. \n

    foo

    \n
    bar\n
    \n
  2. \n
\n", + "example": 271, + "start_line": 4455, + "end_line": 4467, + "section": "List items" + }, + { + "markdown": " indented code\n\nparagraph\n\n more code\n", + "html": "
indented code\n
\n

paragraph

\n
more code\n
\n", + "example": 272, + "start_line": 4474, + "end_line": 4486, + "section": "List items" + }, + { + "markdown": "1. indented code\n\n paragraph\n\n more code\n", + "html": "
    \n
  1. \n
    indented code\n
    \n

    paragraph

    \n
    more code\n
    \n
  2. \n
\n", + "example": 273, + "start_line": 4489, + "end_line": 4505, + "section": "List items" + }, + { + "markdown": "1. indented code\n\n paragraph\n\n more code\n", + "html": "
    \n
  1. \n
     indented code\n
    \n

    paragraph

    \n
    more code\n
    \n
  2. \n
\n", + "example": 274, + "start_line": 4511, + "end_line": 4527, + "section": "List items" + }, + { + "markdown": " foo\n\nbar\n", + "html": "

foo

\n

bar

\n", + "example": 275, + "start_line": 4538, + "end_line": 4545, + "section": "List items" + }, + { + "markdown": "- foo\n\n bar\n", + "html": "
    \n
  • foo
  • \n
\n

bar

\n", + "example": 276, + "start_line": 4548, + "end_line": 4557, + "section": "List items" + }, + { + "markdown": "- foo\n\n bar\n", + "html": "
    \n
  • \n

    foo

    \n

    bar

    \n
  • \n
\n", + "example": 277, + "start_line": 4565, + "end_line": 4576, + "section": "List items" + }, + { + "markdown": "-\n foo\n-\n ```\n bar\n ```\n-\n baz\n", + "html": "
    \n
  • foo
  • \n
  • \n
    bar\n
    \n
  • \n
  • \n
    baz\n
    \n
  • \n
\n", + "example": 278, + "start_line": 4592, + "end_line": 4613, + "section": "List items" + }, + { + "markdown": "- \n foo\n", + "html": "
    \n
  • foo
  • \n
\n", + "example": 279, + "start_line": 4618, + "end_line": 4625, + "section": "List items" + }, + { + "markdown": "-\n\n foo\n", + "html": "
    \n
  • \n
\n

foo

\n", + "example": 280, + "start_line": 4632, + "end_line": 4641, + "section": "List items" + }, + { + "markdown": "- foo\n-\n- bar\n", + "html": "
    \n
  • foo
  • \n
  • \n
  • bar
  • \n
\n", + "example": 281, + "start_line": 4646, + "end_line": 4656, + "section": "List items" + }, + { + "markdown": "- foo\n- \n- bar\n", + "html": "
    \n
  • foo
  • \n
  • \n
  • bar
  • \n
\n", + "example": 282, + "start_line": 4661, + "end_line": 4671, + "section": "List items" + }, + { + "markdown": "1. foo\n2.\n3. bar\n", + "html": "
    \n
  1. foo
  2. \n
  3. \n
  4. bar
  5. \n
\n", + "example": 283, + "start_line": 4676, + "end_line": 4686, + "section": "List items" + }, + { + "markdown": "*\n", + "html": "
    \n
  • \n
\n", + "example": 284, + "start_line": 4691, + "end_line": 4697, + "section": "List items" + }, + { + "markdown": "foo\n*\n\nfoo\n1.\n", + "html": "

foo\n*

\n

foo\n1.

\n", + "example": 285, + "start_line": 4701, + "end_line": 4712, + "section": "List items" + }, + { + "markdown": " 1. A paragraph\n with two lines.\n\n indented code\n\n > A block quote.\n", + "html": "
    \n
  1. \n

    A paragraph\nwith two lines.

    \n
    indented code\n
    \n
    \n

    A block quote.

    \n
    \n
  2. \n
\n", + "example": 286, + "start_line": 4723, + "end_line": 4742, + "section": "List items" + }, + { + "markdown": " 1. A paragraph\n with two lines.\n\n indented code\n\n > A block quote.\n", + "html": "
    \n
  1. \n

    A paragraph\nwith two lines.

    \n
    indented code\n
    \n
    \n

    A block quote.

    \n
    \n
  2. \n
\n", + "example": 287, + "start_line": 4747, + "end_line": 4766, + "section": "List items" + }, + { + "markdown": " 1. A paragraph\n with two lines.\n\n indented code\n\n > A block quote.\n", + "html": "
    \n
  1. \n

    A paragraph\nwith two lines.

    \n
    indented code\n
    \n
    \n

    A block quote.

    \n
    \n
  2. \n
\n", + "example": 288, + "start_line": 4771, + "end_line": 4790, + "section": "List items" + }, + { + "markdown": " 1. A paragraph\n with two lines.\n\n indented code\n\n > A block quote.\n", + "html": "
1.  A paragraph\n    with two lines.\n\n        indented code\n\n    > A block quote.\n
\n", + "example": 289, + "start_line": 4795, + "end_line": 4810, + "section": "List items" + }, + { + "markdown": " 1. A paragraph\nwith two lines.\n\n indented code\n\n > A block quote.\n", + "html": "
    \n
  1. \n

    A paragraph\nwith two lines.

    \n
    indented code\n
    \n
    \n

    A block quote.

    \n
    \n
  2. \n
\n", + "example": 290, + "start_line": 4825, + "end_line": 4844, + "section": "List items" + }, + { + "markdown": " 1. A paragraph\n with two lines.\n", + "html": "
    \n
  1. A paragraph\nwith two lines.
  2. \n
\n", + "example": 291, + "start_line": 4849, + "end_line": 4857, + "section": "List items" + }, + { + "markdown": "> 1. > Blockquote\ncontinued here.\n", + "html": "
\n
    \n
  1. \n
    \n

    Blockquote\ncontinued here.

    \n
    \n
  2. \n
\n
\n", + "example": 292, + "start_line": 4862, + "end_line": 4876, + "section": "List items" + }, + { + "markdown": "> 1. > Blockquote\n> continued here.\n", + "html": "
\n
    \n
  1. \n
    \n

    Blockquote\ncontinued here.

    \n
    \n
  2. \n
\n
\n", + "example": 293, + "start_line": 4879, + "end_line": 4893, + "section": "List items" + }, + { + "markdown": "- foo\n - bar\n - baz\n - boo\n", + "html": "
    \n
  • foo\n
      \n
    • bar\n
        \n
      • baz\n
          \n
        • boo
        • \n
        \n
      • \n
      \n
    • \n
    \n
  • \n
\n", + "example": 294, + "start_line": 4907, + "end_line": 4928, + "section": "List items" + }, + { + "markdown": "- foo\n - bar\n - baz\n - boo\n", + "html": "
    \n
  • foo
  • \n
  • bar
  • \n
  • baz
  • \n
  • boo
  • \n
\n", + "example": 295, + "start_line": 4933, + "end_line": 4945, + "section": "List items" + }, + { + "markdown": "10) foo\n - bar\n", + "html": "
    \n
  1. foo\n
      \n
    • bar
    • \n
    \n
  2. \n
\n", + "example": 296, + "start_line": 4950, + "end_line": 4961, + "section": "List items" + }, + { + "markdown": "10) foo\n - bar\n", + "html": "
    \n
  1. foo
  2. \n
\n
    \n
  • bar
  • \n
\n", + "example": 297, + "start_line": 4966, + "end_line": 4976, + "section": "List items" + }, + { + "markdown": "- - foo\n", + "html": "
    \n
  • \n
      \n
    • foo
    • \n
    \n
  • \n
\n", + "example": 298, + "start_line": 4981, + "end_line": 4991, + "section": "List items" + }, + { + "markdown": "1. - 2. foo\n", + "html": "
    \n
  1. \n
      \n
    • \n
        \n
      1. foo
      2. \n
      \n
    • \n
    \n
  2. \n
\n", + "example": 299, + "start_line": 4994, + "end_line": 5008, + "section": "List items" + }, + { + "markdown": "- # Foo\n- Bar\n ---\n baz\n", + "html": "
    \n
  • \n

    Foo

    \n
  • \n
  • \n

    Bar

    \nbaz
  • \n
\n", + "example": 300, + "start_line": 5013, + "end_line": 5027, + "section": "List items" + }, + { + "markdown": "- foo\n- bar\n+ baz\n", + "html": "
    \n
  • foo
  • \n
  • bar
  • \n
\n
    \n
  • baz
  • \n
\n", + "example": 301, + "start_line": 5249, + "end_line": 5261, + "section": "Lists" + }, + { + "markdown": "1. foo\n2. bar\n3) baz\n", + "html": "
    \n
  1. foo
  2. \n
  3. bar
  4. \n
\n
    \n
  1. baz
  2. \n
\n", + "example": 302, + "start_line": 5264, + "end_line": 5276, + "section": "Lists" + }, + { + "markdown": "Foo\n- bar\n- baz\n", + "html": "

Foo

\n
    \n
  • bar
  • \n
  • baz
  • \n
\n", + "example": 303, + "start_line": 5283, + "end_line": 5293, + "section": "Lists" + }, + { + "markdown": "The number of windows in my house is\n14. The number of doors is 6.\n", + "html": "

The number of windows in my house is\n14. The number of doors is 6.

\n", + "example": 304, + "start_line": 5360, + "end_line": 5366, + "section": "Lists" + }, + { + "markdown": "The number of windows in my house is\n1. The number of doors is 6.\n", + "html": "

The number of windows in my house is

\n
    \n
  1. The number of doors is 6.
  2. \n
\n", + "example": 305, + "start_line": 5370, + "end_line": 5378, + "section": "Lists" + }, + { + "markdown": "- foo\n\n- bar\n\n\n- baz\n", + "html": "
    \n
  • \n

    foo

    \n
  • \n
  • \n

    bar

    \n
  • \n
  • \n

    baz

    \n
  • \n
\n", + "example": 306, + "start_line": 5384, + "end_line": 5403, + "section": "Lists" + }, + { + "markdown": "- foo\n - bar\n - baz\n\n\n bim\n", + "html": "
    \n
  • foo\n
      \n
    • bar\n
        \n
      • \n

        baz

        \n

        bim

        \n
      • \n
      \n
    • \n
    \n
  • \n
\n", + "example": 307, + "start_line": 5405, + "end_line": 5427, + "section": "Lists" + }, + { + "markdown": "- foo\n- bar\n\n\n\n- baz\n- bim\n", + "html": "
    \n
  • foo
  • \n
  • bar
  • \n
\n\n
    \n
  • baz
  • \n
  • bim
  • \n
\n", + "example": 308, + "start_line": 5435, + "end_line": 5453, + "section": "Lists" + }, + { + "markdown": "- foo\n\n notcode\n\n- foo\n\n\n\n code\n", + "html": "
    \n
  • \n

    foo

    \n

    notcode

    \n
  • \n
  • \n

    foo

    \n
  • \n
\n\n
code\n
\n", + "example": 309, + "start_line": 5456, + "end_line": 5479, + "section": "Lists" + }, + { + "markdown": "- a\n - b\n - c\n - d\n - e\n - f\n- g\n", + "html": "
    \n
  • a
  • \n
  • b
  • \n
  • c
  • \n
  • d
  • \n
  • e
  • \n
  • f
  • \n
  • g
  • \n
\n", + "example": 310, + "start_line": 5487, + "end_line": 5505, + "section": "Lists" + }, + { + "markdown": "1. a\n\n 2. b\n\n 3. c\n", + "html": "
    \n
  1. \n

    a

    \n
  2. \n
  3. \n

    b

    \n
  4. \n
  5. \n

    c

    \n
  6. \n
\n", + "example": 311, + "start_line": 5508, + "end_line": 5526, + "section": "Lists" + }, + { + "markdown": "- a\n - b\n - c\n - d\n - e\n", + "html": "
    \n
  • a
  • \n
  • b
  • \n
  • c
  • \n
  • d\n- e
  • \n
\n", + "example": 312, + "start_line": 5532, + "end_line": 5546, + "section": "Lists" + }, + { + "markdown": "1. a\n\n 2. b\n\n 3. c\n", + "html": "
    \n
  1. \n

    a

    \n
  2. \n
  3. \n

    b

    \n
  4. \n
\n
3. c\n
\n", + "example": 313, + "start_line": 5552, + "end_line": 5569, + "section": "Lists" + }, + { + "markdown": "- a\n- b\n\n- c\n", + "html": "
    \n
  • \n

    a

    \n
  • \n
  • \n

    b

    \n
  • \n
  • \n

    c

    \n
  • \n
\n", + "example": 314, + "start_line": 5575, + "end_line": 5592, + "section": "Lists" + }, + { + "markdown": "* a\n*\n\n* c\n", + "html": "
    \n
  • \n

    a

    \n
  • \n
  • \n
  • \n

    c

    \n
  • \n
\n", + "example": 315, + "start_line": 5597, + "end_line": 5612, + "section": "Lists" + }, + { + "markdown": "- a\n- b\n\n c\n- d\n", + "html": "
    \n
  • \n

    a

    \n
  • \n
  • \n

    b

    \n

    c

    \n
  • \n
  • \n

    d

    \n
  • \n
\n", + "example": 316, + "start_line": 5619, + "end_line": 5638, + "section": "Lists" + }, + { + "markdown": "- a\n- b\n\n [ref]: /url\n- d\n", + "html": "
    \n
  • \n

    a

    \n
  • \n
  • \n

    b

    \n
  • \n
  • \n

    d

    \n
  • \n
\n", + "example": 317, + "start_line": 5641, + "end_line": 5659, + "section": "Lists" + }, + { + "markdown": "- a\n- ```\n b\n\n\n ```\n- c\n", + "html": "
    \n
  • a
  • \n
  • \n
    b\n\n\n
    \n
  • \n
  • c
  • \n
\n", + "example": 318, + "start_line": 5664, + "end_line": 5683, + "section": "Lists" + }, + { + "markdown": "- a\n - b\n\n c\n- d\n", + "html": "
    \n
  • a\n
      \n
    • \n

      b

      \n

      c

      \n
    • \n
    \n
  • \n
  • d
  • \n
\n", + "example": 319, + "start_line": 5690, + "end_line": 5708, + "section": "Lists" + }, + { + "markdown": "* a\n > b\n >\n* c\n", + "html": "
    \n
  • a\n
    \n

    b

    \n
    \n
  • \n
  • c
  • \n
\n", + "example": 320, + "start_line": 5714, + "end_line": 5728, + "section": "Lists" + }, + { + "markdown": "- a\n > b\n ```\n c\n ```\n- d\n", + "html": "
    \n
  • a\n
    \n

    b

    \n
    \n
    c\n
    \n
  • \n
  • d
  • \n
\n", + "example": 321, + "start_line": 5734, + "end_line": 5752, + "section": "Lists" + }, + { + "markdown": "- a\n", + "html": "
    \n
  • a
  • \n
\n", + "example": 322, + "start_line": 5757, + "end_line": 5763, + "section": "Lists" + }, + { + "markdown": "- a\n - b\n", + "html": "
    \n
  • a\n
      \n
    • b
    • \n
    \n
  • \n
\n", + "example": 323, + "start_line": 5766, + "end_line": 5777, + "section": "Lists" + }, + { + "markdown": "1. ```\n foo\n ```\n\n bar\n", + "html": "
    \n
  1. \n
    foo\n
    \n

    bar

    \n
  2. \n
\n", + "example": 324, + "start_line": 5783, + "end_line": 5797, + "section": "Lists" + }, + { + "markdown": "* foo\n * bar\n\n baz\n", + "html": "
    \n
  • \n

    foo

    \n
      \n
    • bar
    • \n
    \n

    baz

    \n
  • \n
\n", + "example": 325, + "start_line": 5802, + "end_line": 5817, + "section": "Lists" + }, + { + "markdown": "- a\n - b\n - c\n\n- d\n - e\n - f\n", + "html": "
    \n
  • \n

    a

    \n
      \n
    • b
    • \n
    • c
    • \n
    \n
  • \n
  • \n

    d

    \n
      \n
    • e
    • \n
    • f
    • \n
    \n
  • \n
\n", + "example": 326, + "start_line": 5820, + "end_line": 5845, + "section": "Lists" + }, + { + "markdown": "`hi`lo`\n", + "html": "

hilo`

\n", + "example": 327, + "start_line": 5854, + "end_line": 5858, + "section": "Inlines" + }, + { + "markdown": "`foo`\n", + "html": "

foo

\n", + "example": 328, + "start_line": 5886, + "end_line": 5890, + "section": "Code spans" + }, + { + "markdown": "`` foo ` bar ``\n", + "html": "

foo ` bar

\n", + "example": 329, + "start_line": 5897, + "end_line": 5901, + "section": "Code spans" + }, + { + "markdown": "` `` `\n", + "html": "

``

\n", + "example": 330, + "start_line": 5907, + "end_line": 5911, + "section": "Code spans" + }, + { + "markdown": "` `` `\n", + "html": "

``

\n", + "example": 331, + "start_line": 5915, + "end_line": 5919, + "section": "Code spans" + }, + { + "markdown": "` a`\n", + "html": "

a

\n", + "example": 332, + "start_line": 5924, + "end_line": 5928, + "section": "Code spans" + }, + { + "markdown": "` b `\n", + "html": "

 b 

\n", + "example": 333, + "start_line": 5933, + "end_line": 5937, + "section": "Code spans" + }, + { + "markdown": "` `\n` `\n", + "html": "

 \n

\n", + "example": 334, + "start_line": 5941, + "end_line": 5947, + "section": "Code spans" + }, + { + "markdown": "``\nfoo\nbar \nbaz\n``\n", + "html": "

foo bar baz

\n", + "example": 335, + "start_line": 5952, + "end_line": 5960, + "section": "Code spans" + }, + { + "markdown": "``\nfoo \n``\n", + "html": "

foo

\n", + "example": 336, + "start_line": 5962, + "end_line": 5968, + "section": "Code spans" + }, + { + "markdown": "`foo bar \nbaz`\n", + "html": "

foo bar baz

\n", + "example": 337, + "start_line": 5973, + "end_line": 5978, + "section": "Code spans" + }, + { + "markdown": "`foo\\`bar`\n", + "html": "

foo\\bar`

\n", + "example": 338, + "start_line": 5990, + "end_line": 5994, + "section": "Code spans" + }, + { + "markdown": "``foo`bar``\n", + "html": "

foo`bar

\n", + "example": 339, + "start_line": 6001, + "end_line": 6005, + "section": "Code spans" + }, + { + "markdown": "` foo `` bar `\n", + "html": "

foo `` bar

\n", + "example": 340, + "start_line": 6007, + "end_line": 6011, + "section": "Code spans" + }, + { + "markdown": "*foo`*`\n", + "html": "

*foo*

\n", + "example": 341, + "start_line": 6019, + "end_line": 6023, + "section": "Code spans" + }, + { + "markdown": "[not a `link](/foo`)\n", + "html": "

[not a link](/foo)

\n", + "example": 342, + "start_line": 6028, + "end_line": 6032, + "section": "Code spans" + }, + { + "markdown": "``\n", + "html": "

<a href="">`

\n", + "example": 343, + "start_line": 6038, + "end_line": 6042, + "section": "Code spans" + }, + { + "markdown": "
`\n", + "html": "

`

\n", + "example": 344, + "start_line": 6047, + "end_line": 6051, + "section": "Code spans" + }, + { + "markdown": "``\n", + "html": "

<https://foo.bar.baz>`

\n", + "example": 345, + "start_line": 6056, + "end_line": 6060, + "section": "Code spans" + }, + { + "markdown": "`\n", + "html": "

https://foo.bar.`baz`

\n", + "example": 346, + "start_line": 6065, + "end_line": 6069, + "section": "Code spans" + }, + { + "markdown": "```foo``\n", + "html": "

```foo``

\n", + "example": 347, + "start_line": 6075, + "end_line": 6079, + "section": "Code spans" + }, + { + "markdown": "`foo\n", + "html": "

`foo

\n", + "example": 348, + "start_line": 6082, + "end_line": 6086, + "section": "Code spans" + }, + { + "markdown": "`foo``bar``\n", + "html": "

`foobar

\n", + "example": 349, + "start_line": 6091, + "end_line": 6095, + "section": "Code spans" + }, + { + "markdown": "*foo bar*\n", + "html": "

foo bar

\n", + "example": 350, + "start_line": 6308, + "end_line": 6312, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "a * foo bar*\n", + "html": "

a * foo bar*

\n", + "example": 351, + "start_line": 6318, + "end_line": 6322, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "a*\"foo\"*\n", + "html": "

a*"foo"*

\n", + "example": 352, + "start_line": 6329, + "end_line": 6333, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "* a *\n", + "html": "

* a *

\n", + "example": 353, + "start_line": 6338, + "end_line": 6342, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "*$*alpha.\n\n*£*bravo.\n\n*€*charlie.\n", + "html": "

*$*alpha.

\n

*£*bravo.

\n

*€*charlie.

\n", + "example": 354, + "start_line": 6347, + "end_line": 6357, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "foo*bar*\n", + "html": "

foobar

\n", + "example": 355, + "start_line": 6362, + "end_line": 6366, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "5*6*78\n", + "html": "

5678

\n", + "example": 356, + "start_line": 6369, + "end_line": 6373, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "_foo bar_\n", + "html": "

foo bar

\n", + "example": 357, + "start_line": 6378, + "end_line": 6382, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "_ foo bar_\n", + "html": "

_ foo bar_

\n", + "example": 358, + "start_line": 6388, + "end_line": 6392, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "a_\"foo\"_\n", + "html": "

a_"foo"_

\n", + "example": 359, + "start_line": 6398, + "end_line": 6402, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "foo_bar_\n", + "html": "

foo_bar_

\n", + "example": 360, + "start_line": 6407, + "end_line": 6411, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "5_6_78\n", + "html": "

5_6_78

\n", + "example": 361, + "start_line": 6414, + "end_line": 6418, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "пристаням_стремятся_\n", + "html": "

пристаням_стремятся_

\n", + "example": 362, + "start_line": 6421, + "end_line": 6425, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "aa_\"bb\"_cc\n", + "html": "

aa_"bb"_cc

\n", + "example": 363, + "start_line": 6431, + "end_line": 6435, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "foo-_(bar)_\n", + "html": "

foo-(bar)

\n", + "example": 364, + "start_line": 6442, + "end_line": 6446, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "_foo*\n", + "html": "

_foo*

\n", + "example": 365, + "start_line": 6454, + "end_line": 6458, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "*foo bar *\n", + "html": "

*foo bar *

\n", + "example": 366, + "start_line": 6464, + "end_line": 6468, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "*foo bar\n*\n", + "html": "

*foo bar\n*

\n", + "example": 367, + "start_line": 6473, + "end_line": 6479, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "*(*foo)\n", + "html": "

*(*foo)

\n", + "example": 368, + "start_line": 6486, + "end_line": 6490, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "*(*foo*)*\n", + "html": "

(foo)

\n", + "example": 369, + "start_line": 6496, + "end_line": 6500, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "*foo*bar\n", + "html": "

foobar

\n", + "example": 370, + "start_line": 6505, + "end_line": 6509, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "_foo bar _\n", + "html": "

_foo bar _

\n", + "example": 371, + "start_line": 6518, + "end_line": 6522, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "_(_foo)\n", + "html": "

_(_foo)

\n", + "example": 372, + "start_line": 6528, + "end_line": 6532, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "_(_foo_)_\n", + "html": "

(foo)

\n", + "example": 373, + "start_line": 6537, + "end_line": 6541, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "_foo_bar\n", + "html": "

_foo_bar

\n", + "example": 374, + "start_line": 6546, + "end_line": 6550, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "_пристаням_стремятся\n", + "html": "

_пристаням_стремятся

\n", + "example": 375, + "start_line": 6553, + "end_line": 6557, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "_foo_bar_baz_\n", + "html": "

foo_bar_baz

\n", + "example": 376, + "start_line": 6560, + "end_line": 6564, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "_(bar)_.\n", + "html": "

(bar).

\n", + "example": 377, + "start_line": 6571, + "end_line": 6575, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "**foo bar**\n", + "html": "

foo bar

\n", + "example": 378, + "start_line": 6580, + "end_line": 6584, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "** foo bar**\n", + "html": "

** foo bar**

\n", + "example": 379, + "start_line": 6590, + "end_line": 6594, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "a**\"foo\"**\n", + "html": "

a**"foo"**

\n", + "example": 380, + "start_line": 6601, + "end_line": 6605, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "foo**bar**\n", + "html": "

foobar

\n", + "example": 381, + "start_line": 6610, + "end_line": 6614, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "__foo bar__\n", + "html": "

foo bar

\n", + "example": 382, + "start_line": 6619, + "end_line": 6623, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "__ foo bar__\n", + "html": "

__ foo bar__

\n", + "example": 383, + "start_line": 6629, + "end_line": 6633, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "__\nfoo bar__\n", + "html": "

__\nfoo bar__

\n", + "example": 384, + "start_line": 6637, + "end_line": 6643, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "a__\"foo\"__\n", + "html": "

a__"foo"__

\n", + "example": 385, + "start_line": 6649, + "end_line": 6653, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "foo__bar__\n", + "html": "

foo__bar__

\n", + "example": 386, + "start_line": 6658, + "end_line": 6662, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "5__6__78\n", + "html": "

5__6__78

\n", + "example": 387, + "start_line": 6665, + "end_line": 6669, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "пристаням__стремятся__\n", + "html": "

пристаням__стремятся__

\n", + "example": 388, + "start_line": 6672, + "end_line": 6676, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "__foo, __bar__, baz__\n", + "html": "

foo, bar, baz

\n", + "example": 389, + "start_line": 6679, + "end_line": 6683, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "foo-__(bar)__\n", + "html": "

foo-(bar)

\n", + "example": 390, + "start_line": 6690, + "end_line": 6694, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "**foo bar **\n", + "html": "

**foo bar **

\n", + "example": 391, + "start_line": 6703, + "end_line": 6707, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "**(**foo)\n", + "html": "

**(**foo)

\n", + "example": 392, + "start_line": 6716, + "end_line": 6720, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "*(**foo**)*\n", + "html": "

(foo)

\n", + "example": 393, + "start_line": 6726, + "end_line": 6730, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "**Gomphocarpus (*Gomphocarpus physocarpus*, syn.\n*Asclepias physocarpa*)**\n", + "html": "

Gomphocarpus (Gomphocarpus physocarpus, syn.\nAsclepias physocarpa)

\n", + "example": 394, + "start_line": 6733, + "end_line": 6739, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "**foo \"*bar*\" foo**\n", + "html": "

foo "bar" foo

\n", + "example": 395, + "start_line": 6742, + "end_line": 6746, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "**foo**bar\n", + "html": "

foobar

\n", + "example": 396, + "start_line": 6751, + "end_line": 6755, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "__foo bar __\n", + "html": "

__foo bar __

\n", + "example": 397, + "start_line": 6763, + "end_line": 6767, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "__(__foo)\n", + "html": "

__(__foo)

\n", + "example": 398, + "start_line": 6773, + "end_line": 6777, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "_(__foo__)_\n", + "html": "

(foo)

\n", + "example": 399, + "start_line": 6783, + "end_line": 6787, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "__foo__bar\n", + "html": "

__foo__bar

\n", + "example": 400, + "start_line": 6792, + "end_line": 6796, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "__пристаням__стремятся\n", + "html": "

__пристаням__стремятся

\n", + "example": 401, + "start_line": 6799, + "end_line": 6803, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "__foo__bar__baz__\n", + "html": "

foo__bar__baz

\n", + "example": 402, + "start_line": 6806, + "end_line": 6810, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "__(bar)__.\n", + "html": "

(bar).

\n", + "example": 403, + "start_line": 6817, + "end_line": 6821, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "*foo [bar](/url)*\n", + "html": "

foo bar

\n", + "example": 404, + "start_line": 6829, + "end_line": 6833, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "*foo\nbar*\n", + "html": "

foo\nbar

\n", + "example": 405, + "start_line": 6836, + "end_line": 6842, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "_foo __bar__ baz_\n", + "html": "

foo bar baz

\n", + "example": 406, + "start_line": 6848, + "end_line": 6852, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "_foo _bar_ baz_\n", + "html": "

foo bar baz

\n", + "example": 407, + "start_line": 6855, + "end_line": 6859, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "__foo_ bar_\n", + "html": "

foo bar

\n", + "example": 408, + "start_line": 6862, + "end_line": 6866, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "*foo *bar**\n", + "html": "

foo bar

\n", + "example": 409, + "start_line": 6869, + "end_line": 6873, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "*foo **bar** baz*\n", + "html": "

foo bar baz

\n", + "example": 410, + "start_line": 6876, + "end_line": 6880, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "*foo**bar**baz*\n", + "html": "

foobarbaz

\n", + "example": 411, + "start_line": 6882, + "end_line": 6886, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "*foo**bar*\n", + "html": "

foo**bar

\n", + "example": 412, + "start_line": 6906, + "end_line": 6910, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "***foo** bar*\n", + "html": "

foo bar

\n", + "example": 413, + "start_line": 6919, + "end_line": 6923, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "*foo **bar***\n", + "html": "

foo bar

\n", + "example": 414, + "start_line": 6926, + "end_line": 6930, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "*foo**bar***\n", + "html": "

foobar

\n", + "example": 415, + "start_line": 6933, + "end_line": 6937, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "foo***bar***baz\n", + "html": "

foobarbaz

\n", + "example": 416, + "start_line": 6944, + "end_line": 6948, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "foo******bar*********baz\n", + "html": "

foobar***baz

\n", + "example": 417, + "start_line": 6950, + "end_line": 6954, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "*foo **bar *baz* bim** bop*\n", + "html": "

foo bar baz bim bop

\n", + "example": 418, + "start_line": 6959, + "end_line": 6963, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "*foo [*bar*](/url)*\n", + "html": "

foo bar

\n", + "example": 419, + "start_line": 6966, + "end_line": 6970, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "** is not an empty emphasis\n", + "html": "

** is not an empty emphasis

\n", + "example": 420, + "start_line": 6975, + "end_line": 6979, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "**** is not an empty strong emphasis\n", + "html": "

**** is not an empty strong emphasis

\n", + "example": 421, + "start_line": 6982, + "end_line": 6986, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "**foo [bar](/url)**\n", + "html": "

foo bar

\n", + "example": 422, + "start_line": 6995, + "end_line": 6999, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "**foo\nbar**\n", + "html": "

foo\nbar

\n", + "example": 423, + "start_line": 7002, + "end_line": 7008, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "__foo _bar_ baz__\n", + "html": "

foo bar baz

\n", + "example": 424, + "start_line": 7014, + "end_line": 7018, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "__foo __bar__ baz__\n", + "html": "

foo bar baz

\n", + "example": 425, + "start_line": 7021, + "end_line": 7025, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "____foo__ bar__\n", + "html": "

foo bar

\n", + "example": 426, + "start_line": 7028, + "end_line": 7032, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "**foo **bar****\n", + "html": "

foo bar

\n", + "example": 427, + "start_line": 7035, + "end_line": 7039, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "**foo *bar* baz**\n", + "html": "

foo bar baz

\n", + "example": 428, + "start_line": 7042, + "end_line": 7046, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "**foo*bar*baz**\n", + "html": "

foobarbaz

\n", + "example": 429, + "start_line": 7049, + "end_line": 7053, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "***foo* bar**\n", + "html": "

foo bar

\n", + "example": 430, + "start_line": 7056, + "end_line": 7060, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "**foo *bar***\n", + "html": "

foo bar

\n", + "example": 431, + "start_line": 7063, + "end_line": 7067, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "**foo *bar **baz**\nbim* bop**\n", + "html": "

foo bar baz\nbim bop

\n", + "example": 432, + "start_line": 7072, + "end_line": 7078, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "**foo [*bar*](/url)**\n", + "html": "

foo bar

\n", + "example": 433, + "start_line": 7081, + "end_line": 7085, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "__ is not an empty emphasis\n", + "html": "

__ is not an empty emphasis

\n", + "example": 434, + "start_line": 7090, + "end_line": 7094, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "____ is not an empty strong emphasis\n", + "html": "

____ is not an empty strong emphasis

\n", + "example": 435, + "start_line": 7097, + "end_line": 7101, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "foo ***\n", + "html": "

foo ***

\n", + "example": 436, + "start_line": 7107, + "end_line": 7111, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "foo *\\**\n", + "html": "

foo *

\n", + "example": 437, + "start_line": 7114, + "end_line": 7118, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "foo *_*\n", + "html": "

foo _

\n", + "example": 438, + "start_line": 7121, + "end_line": 7125, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "foo *****\n", + "html": "

foo *****

\n", + "example": 439, + "start_line": 7128, + "end_line": 7132, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "foo **\\***\n", + "html": "

foo *

\n", + "example": 440, + "start_line": 7135, + "end_line": 7139, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "foo **_**\n", + "html": "

foo _

\n", + "example": 441, + "start_line": 7142, + "end_line": 7146, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "**foo*\n", + "html": "

*foo

\n", + "example": 442, + "start_line": 7153, + "end_line": 7157, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "*foo**\n", + "html": "

foo*

\n", + "example": 443, + "start_line": 7160, + "end_line": 7164, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "***foo**\n", + "html": "

*foo

\n", + "example": 444, + "start_line": 7167, + "end_line": 7171, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "****foo*\n", + "html": "

***foo

\n", + "example": 445, + "start_line": 7174, + "end_line": 7178, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "**foo***\n", + "html": "

foo*

\n", + "example": 446, + "start_line": 7181, + "end_line": 7185, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "*foo****\n", + "html": "

foo***

\n", + "example": 447, + "start_line": 7188, + "end_line": 7192, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "foo ___\n", + "html": "

foo ___

\n", + "example": 448, + "start_line": 7198, + "end_line": 7202, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "foo _\\__\n", + "html": "

foo _

\n", + "example": 449, + "start_line": 7205, + "end_line": 7209, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "foo _*_\n", + "html": "

foo *

\n", + "example": 450, + "start_line": 7212, + "end_line": 7216, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "foo _____\n", + "html": "

foo _____

\n", + "example": 451, + "start_line": 7219, + "end_line": 7223, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "foo __\\___\n", + "html": "

foo _

\n", + "example": 452, + "start_line": 7226, + "end_line": 7230, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "foo __*__\n", + "html": "

foo *

\n", + "example": 453, + "start_line": 7233, + "end_line": 7237, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "__foo_\n", + "html": "

_foo

\n", + "example": 454, + "start_line": 7240, + "end_line": 7244, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "_foo__\n", + "html": "

foo_

\n", + "example": 455, + "start_line": 7251, + "end_line": 7255, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "___foo__\n", + "html": "

_foo

\n", + "example": 456, + "start_line": 7258, + "end_line": 7262, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "____foo_\n", + "html": "

___foo

\n", + "example": 457, + "start_line": 7265, + "end_line": 7269, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "__foo___\n", + "html": "

foo_

\n", + "example": 458, + "start_line": 7272, + "end_line": 7276, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "_foo____\n", + "html": "

foo___

\n", + "example": 459, + "start_line": 7279, + "end_line": 7283, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "**foo**\n", + "html": "

foo

\n", + "example": 460, + "start_line": 7289, + "end_line": 7293, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "*_foo_*\n", + "html": "

foo

\n", + "example": 461, + "start_line": 7296, + "end_line": 7300, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "__foo__\n", + "html": "

foo

\n", + "example": 462, + "start_line": 7303, + "end_line": 7307, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "_*foo*_\n", + "html": "

foo

\n", + "example": 463, + "start_line": 7310, + "end_line": 7314, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "****foo****\n", + "html": "

foo

\n", + "example": 464, + "start_line": 7320, + "end_line": 7324, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "____foo____\n", + "html": "

foo

\n", + "example": 465, + "start_line": 7327, + "end_line": 7331, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "******foo******\n", + "html": "

foo

\n", + "example": 466, + "start_line": 7338, + "end_line": 7342, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "***foo***\n", + "html": "

foo

\n", + "example": 467, + "start_line": 7347, + "end_line": 7351, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "_____foo_____\n", + "html": "

foo

\n", + "example": 468, + "start_line": 7354, + "end_line": 7358, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "*foo _bar* baz_\n", + "html": "

foo _bar baz_

\n", + "example": 469, + "start_line": 7363, + "end_line": 7367, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "*foo __bar *baz bim__ bam*\n", + "html": "

foo bar *baz bim bam

\n", + "example": 470, + "start_line": 7370, + "end_line": 7374, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "**foo **bar baz**\n", + "html": "

**foo bar baz

\n", + "example": 471, + "start_line": 7379, + "end_line": 7383, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "*foo *bar baz*\n", + "html": "

*foo bar baz

\n", + "example": 472, + "start_line": 7386, + "end_line": 7390, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "*[bar*](/url)\n", + "html": "

*bar*

\n", + "example": 473, + "start_line": 7395, + "end_line": 7399, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "_foo [bar_](/url)\n", + "html": "

_foo bar_

\n", + "example": 474, + "start_line": 7402, + "end_line": 7406, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "*\n", + "html": "

*

\n", + "example": 475, + "start_line": 7409, + "end_line": 7413, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "**\n", + "html": "

**

\n", + "example": 476, + "start_line": 7416, + "end_line": 7420, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "__\n", + "html": "

__

\n", + "example": 477, + "start_line": 7423, + "end_line": 7427, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "*a `*`*\n", + "html": "

a *

\n", + "example": 478, + "start_line": 7430, + "end_line": 7434, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "_a `_`_\n", + "html": "

a _

\n", + "example": 479, + "start_line": 7437, + "end_line": 7441, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "**a\n", + "html": "

**ahttps://foo.bar/?q=**

\n", + "example": 480, + "start_line": 7444, + "end_line": 7448, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "__a\n", + "html": "

__ahttps://foo.bar/?q=__

\n", + "example": 481, + "start_line": 7451, + "end_line": 7455, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "[link](/uri \"title\")\n", + "html": "

link

\n", + "example": 482, + "start_line": 7539, + "end_line": 7543, + "section": "Links" + }, + { + "markdown": "[link](/uri)\n", + "html": "

link

\n", + "example": 483, + "start_line": 7549, + "end_line": 7553, + "section": "Links" + }, + { + "markdown": "[](./target.md)\n", + "html": "

\n", + "example": 484, + "start_line": 7555, + "end_line": 7559, + "section": "Links" + }, + { + "markdown": "[link]()\n", + "html": "

link

\n", + "example": 485, + "start_line": 7562, + "end_line": 7566, + "section": "Links" + }, + { + "markdown": "[link](<>)\n", + "html": "

link

\n", + "example": 486, + "start_line": 7569, + "end_line": 7573, + "section": "Links" + }, + { + "markdown": "[]()\n", + "html": "

\n", + "example": 487, + "start_line": 7576, + "end_line": 7580, + "section": "Links" + }, + { + "markdown": "[link](/my uri)\n", + "html": "

[link](/my uri)

\n", + "example": 488, + "start_line": 7585, + "end_line": 7589, + "section": "Links" + }, + { + "markdown": "[link](
)\n", + "html": "

link

\n", + "example": 489, + "start_line": 7591, + "end_line": 7595, + "section": "Links" + }, + { + "markdown": "[link](foo\nbar)\n", + "html": "

[link](foo\nbar)

\n", + "example": 490, + "start_line": 7600, + "end_line": 7606, + "section": "Links" + }, + { + "markdown": "[link]()\n", + "html": "

[link]()

\n", + "example": 491, + "start_line": 7608, + "end_line": 7614, + "section": "Links" + }, + { + "markdown": "[a]()\n", + "html": "

a

\n", + "example": 492, + "start_line": 7619, + "end_line": 7623, + "section": "Links" + }, + { + "markdown": "[link]()\n", + "html": "

[link](<foo>)

\n", + "example": 493, + "start_line": 7627, + "end_line": 7631, + "section": "Links" + }, + { + "markdown": "[a](\n[a](c)\n", + "html": "

[a](<b)c\n[a](<b)c>\n[a](c)

\n", + "example": 494, + "start_line": 7636, + "end_line": 7644, + "section": "Links" + }, + { + "markdown": "[link](\\(foo\\))\n", + "html": "

link

\n", + "example": 495, + "start_line": 7648, + "end_line": 7652, + "section": "Links" + }, + { + "markdown": "[link](foo(and(bar)))\n", + "html": "

link

\n", + "example": 496, + "start_line": 7657, + "end_line": 7661, + "section": "Links" + }, + { + "markdown": "[link](foo(and(bar))\n", + "html": "

[link](foo(and(bar))

\n", + "example": 497, + "start_line": 7666, + "end_line": 7670, + "section": "Links" + }, + { + "markdown": "[link](foo\\(and\\(bar\\))\n", + "html": "

link

\n", + "example": 498, + "start_line": 7673, + "end_line": 7677, + "section": "Links" + }, + { + "markdown": "[link]()\n", + "html": "

link

\n", + "example": 499, + "start_line": 7680, + "end_line": 7684, + "section": "Links" + }, + { + "markdown": "[link](foo\\)\\:)\n", + "html": "

link

\n", + "example": 500, + "start_line": 7690, + "end_line": 7694, + "section": "Links" + }, + { + "markdown": "[link](#fragment)\n\n[link](https://example.com#fragment)\n\n[link](https://example.com?foo=3#frag)\n", + "html": "

link

\n

link

\n

link

\n", + "example": 501, + "start_line": 7699, + "end_line": 7709, + "section": "Links" + }, + { + "markdown": "[link](foo\\bar)\n", + "html": "

link

\n", + "example": 502, + "start_line": 7715, + "end_line": 7719, + "section": "Links" + }, + { + "markdown": "[link](foo%20bä)\n", + "html": "

link

\n", + "example": 503, + "start_line": 7731, + "end_line": 7735, + "section": "Links" + }, + { + "markdown": "[link](\"title\")\n", + "html": "

link

\n", + "example": 504, + "start_line": 7742, + "end_line": 7746, + "section": "Links" + }, + { + "markdown": "[link](/url \"title\")\n[link](/url 'title')\n[link](/url (title))\n", + "html": "

link\nlink\nlink

\n", + "example": 505, + "start_line": 7751, + "end_line": 7759, + "section": "Links" + }, + { + "markdown": "[link](/url \"title \\\""\")\n", + "html": "

link

\n", + "example": 506, + "start_line": 7765, + "end_line": 7769, + "section": "Links" + }, + { + "markdown": "[link](/url \"title\")\n", + "html": "

link

\n", + "example": 507, + "start_line": 7776, + "end_line": 7780, + "section": "Links" + }, + { + "markdown": "[link](/url \"title \"and\" title\")\n", + "html": "

[link](/url "title "and" title")

\n", + "example": 508, + "start_line": 7785, + "end_line": 7789, + "section": "Links" + }, + { + "markdown": "[link](/url 'title \"and\" title')\n", + "html": "

link

\n", + "example": 509, + "start_line": 7794, + "end_line": 7798, + "section": "Links" + }, + { + "markdown": "[link]( /uri\n \"title\" )\n", + "html": "

link

\n", + "example": 510, + "start_line": 7819, + "end_line": 7824, + "section": "Links" + }, + { + "markdown": "[link] (/uri)\n", + "html": "

[link] (/uri)

\n", + "example": 511, + "start_line": 7830, + "end_line": 7834, + "section": "Links" + }, + { + "markdown": "[link [foo [bar]]](/uri)\n", + "html": "

link [foo [bar]]

\n", + "example": 512, + "start_line": 7840, + "end_line": 7844, + "section": "Links" + }, + { + "markdown": "[link] bar](/uri)\n", + "html": "

[link] bar](/uri)

\n", + "example": 513, + "start_line": 7847, + "end_line": 7851, + "section": "Links" + }, + { + "markdown": "[link [bar](/uri)\n", + "html": "

[link bar

\n", + "example": 514, + "start_line": 7854, + "end_line": 7858, + "section": "Links" + }, + { + "markdown": "[link \\[bar](/uri)\n", + "html": "

link [bar

\n", + "example": 515, + "start_line": 7861, + "end_line": 7865, + "section": "Links" + }, + { + "markdown": "[link *foo **bar** `#`*](/uri)\n", + "html": "

link foo bar #

\n", + "example": 516, + "start_line": 7870, + "end_line": 7874, + "section": "Links" + }, + { + "markdown": "[![moon](moon.jpg)](/uri)\n", + "html": "

\"moon\"

\n", + "example": 517, + "start_line": 7877, + "end_line": 7881, + "section": "Links" + }, + { + "markdown": "[foo [bar](/uri)](/uri)\n", + "html": "

[foo bar](/uri)

\n", + "example": 518, + "start_line": 7886, + "end_line": 7890, + "section": "Links" + }, + { + "markdown": "[foo *[bar [baz](/uri)](/uri)*](/uri)\n", + "html": "

[foo [bar baz](/uri)](/uri)

\n", + "example": 519, + "start_line": 7893, + "end_line": 7897, + "section": "Links" + }, + { + "markdown": "![[[foo](uri1)](uri2)](uri3)\n", + "html": "

\"[foo](uri2)\"

\n", + "example": 520, + "start_line": 7900, + "end_line": 7904, + "section": "Links" + }, + { + "markdown": "*[foo*](/uri)\n", + "html": "

*foo*

\n", + "example": 521, + "start_line": 7910, + "end_line": 7914, + "section": "Links" + }, + { + "markdown": "[foo *bar](baz*)\n", + "html": "

foo *bar

\n", + "example": 522, + "start_line": 7917, + "end_line": 7921, + "section": "Links" + }, + { + "markdown": "*foo [bar* baz]\n", + "html": "

foo [bar baz]

\n", + "example": 523, + "start_line": 7927, + "end_line": 7931, + "section": "Links" + }, + { + "markdown": "[foo \n", + "html": "

[foo

\n", + "example": 524, + "start_line": 7937, + "end_line": 7941, + "section": "Links" + }, + { + "markdown": "[foo`](/uri)`\n", + "html": "

[foo](/uri)

\n", + "example": 525, + "start_line": 7944, + "end_line": 7948, + "section": "Links" + }, + { + "markdown": "[foo\n", + "html": "

[foohttps://example.com/?search=](uri)

\n", + "example": 526, + "start_line": 7951, + "end_line": 7955, + "section": "Links" + }, + { + "markdown": "[foo][bar]\n\n[bar]: /url \"title\"\n", + "html": "

foo

\n", + "example": 527, + "start_line": 7989, + "end_line": 7995, + "section": "Links" + }, + { + "markdown": "[link [foo [bar]]][ref]\n\n[ref]: /uri\n", + "html": "

link [foo [bar]]

\n", + "example": 528, + "start_line": 8004, + "end_line": 8010, + "section": "Links" + }, + { + "markdown": "[link \\[bar][ref]\n\n[ref]: /uri\n", + "html": "

link [bar

\n", + "example": 529, + "start_line": 8013, + "end_line": 8019, + "section": "Links" + }, + { + "markdown": "[link *foo **bar** `#`*][ref]\n\n[ref]: /uri\n", + "html": "

link foo bar #

\n", + "example": 530, + "start_line": 8024, + "end_line": 8030, + "section": "Links" + }, + { + "markdown": "[![moon](moon.jpg)][ref]\n\n[ref]: /uri\n", + "html": "

\"moon\"

\n", + "example": 531, + "start_line": 8033, + "end_line": 8039, + "section": "Links" + }, + { + "markdown": "[foo [bar](/uri)][ref]\n\n[ref]: /uri\n", + "html": "

[foo bar]ref

\n", + "example": 532, + "start_line": 8044, + "end_line": 8050, + "section": "Links" + }, + { + "markdown": "[foo *bar [baz][ref]*][ref]\n\n[ref]: /uri\n", + "html": "

[foo bar baz]ref

\n", + "example": 533, + "start_line": 8053, + "end_line": 8059, + "section": "Links" + }, + { + "markdown": "*[foo*][ref]\n\n[ref]: /uri\n", + "html": "

*foo*

\n", + "example": 534, + "start_line": 8068, + "end_line": 8074, + "section": "Links" + }, + { + "markdown": "[foo *bar][ref]*\n\n[ref]: /uri\n", + "html": "

foo *bar*

\n", + "example": 535, + "start_line": 8077, + "end_line": 8083, + "section": "Links" + }, + { + "markdown": "[foo \n\n[ref]: /uri\n", + "html": "

[foo

\n", + "example": 536, + "start_line": 8089, + "end_line": 8095, + "section": "Links" + }, + { + "markdown": "[foo`][ref]`\n\n[ref]: /uri\n", + "html": "

[foo][ref]

\n", + "example": 537, + "start_line": 8098, + "end_line": 8104, + "section": "Links" + }, + { + "markdown": "[foo\n\n[ref]: /uri\n", + "html": "

[foohttps://example.com/?search=][ref]

\n", + "example": 538, + "start_line": 8107, + "end_line": 8113, + "section": "Links" + }, + { + "markdown": "[foo][BaR]\n\n[bar]: /url \"title\"\n", + "html": "

foo

\n", + "example": 539, + "start_line": 8118, + "end_line": 8124, + "section": "Links" + }, + { + "markdown": "[ẞ]\n\n[SS]: /url\n", + "html": "

\n", + "example": 540, + "start_line": 8129, + "end_line": 8135, + "section": "Links" + }, + { + "markdown": "[Foo\n bar]: /url\n\n[Baz][Foo bar]\n", + "html": "

Baz

\n", + "example": 541, + "start_line": 8141, + "end_line": 8148, + "section": "Links" + }, + { + "markdown": "[foo] [bar]\n\n[bar]: /url \"title\"\n", + "html": "

[foo] bar

\n", + "example": 542, + "start_line": 8154, + "end_line": 8160, + "section": "Links" + }, + { + "markdown": "[foo]\n[bar]\n\n[bar]: /url \"title\"\n", + "html": "

[foo]\nbar

\n", + "example": 543, + "start_line": 8163, + "end_line": 8171, + "section": "Links" + }, + { + "markdown": "[foo]: /url1\n\n[foo]: /url2\n\n[bar][foo]\n", + "html": "

bar

\n", + "example": 544, + "start_line": 8204, + "end_line": 8212, + "section": "Links" + }, + { + "markdown": "[bar][foo\\!]\n\n[foo!]: /url\n", + "html": "

[bar][foo!]

\n", + "example": 545, + "start_line": 8219, + "end_line": 8225, + "section": "Links" + }, + { + "markdown": "[foo][ref[]\n\n[ref[]: /uri\n", + "html": "

[foo][ref[]

\n

[ref[]: /uri

\n", + "example": 546, + "start_line": 8231, + "end_line": 8238, + "section": "Links" + }, + { + "markdown": "[foo][ref[bar]]\n\n[ref[bar]]: /uri\n", + "html": "

[foo][ref[bar]]

\n

[ref[bar]]: /uri

\n", + "example": 547, + "start_line": 8241, + "end_line": 8248, + "section": "Links" + }, + { + "markdown": "[[[foo]]]\n\n[[[foo]]]: /url\n", + "html": "

[[[foo]]]

\n

[[[foo]]]: /url

\n", + "example": 548, + "start_line": 8251, + "end_line": 8258, + "section": "Links" + }, + { + "markdown": "[foo][ref\\[]\n\n[ref\\[]: /uri\n", + "html": "

foo

\n", + "example": 549, + "start_line": 8261, + "end_line": 8267, + "section": "Links" + }, + { + "markdown": "[bar\\\\]: /uri\n\n[bar\\\\]\n", + "html": "

bar\\

\n", + "example": 550, + "start_line": 8272, + "end_line": 8278, + "section": "Links" + }, + { + "markdown": "[]\n\n[]: /uri\n", + "html": "

[]

\n

[]: /uri

\n", + "example": 551, + "start_line": 8284, + "end_line": 8291, + "section": "Links" + }, + { + "markdown": "[\n ]\n\n[\n ]: /uri\n", + "html": "

[\n]

\n

[\n]: /uri

\n", + "example": 552, + "start_line": 8294, + "end_line": 8305, + "section": "Links" + }, + { + "markdown": "[foo][]\n\n[foo]: /url \"title\"\n", + "html": "

foo

\n", + "example": 553, + "start_line": 8317, + "end_line": 8323, + "section": "Links" + }, + { + "markdown": "[*foo* bar][]\n\n[*foo* bar]: /url \"title\"\n", + "html": "

foo bar

\n", + "example": 554, + "start_line": 8326, + "end_line": 8332, + "section": "Links" + }, + { + "markdown": "[Foo][]\n\n[foo]: /url \"title\"\n", + "html": "

Foo

\n", + "example": 555, + "start_line": 8337, + "end_line": 8343, + "section": "Links" + }, + { + "markdown": "[foo] \n[]\n\n[foo]: /url \"title\"\n", + "html": "

foo\n[]

\n", + "example": 556, + "start_line": 8350, + "end_line": 8358, + "section": "Links" + }, + { + "markdown": "[foo]\n\n[foo]: /url \"title\"\n", + "html": "

foo

\n", + "example": 557, + "start_line": 8370, + "end_line": 8376, + "section": "Links" + }, + { + "markdown": "[*foo* bar]\n\n[*foo* bar]: /url \"title\"\n", + "html": "

foo bar

\n", + "example": 558, + "start_line": 8379, + "end_line": 8385, + "section": "Links" + }, + { + "markdown": "[[*foo* bar]]\n\n[*foo* bar]: /url \"title\"\n", + "html": "

[foo bar]

\n", + "example": 559, + "start_line": 8388, + "end_line": 8394, + "section": "Links" + }, + { + "markdown": "[[bar [foo]\n\n[foo]: /url\n", + "html": "

[[bar foo

\n", + "example": 560, + "start_line": 8397, + "end_line": 8403, + "section": "Links" + }, + { + "markdown": "[Foo]\n\n[foo]: /url \"title\"\n", + "html": "

Foo

\n", + "example": 561, + "start_line": 8408, + "end_line": 8414, + "section": "Links" + }, + { + "markdown": "[foo] bar\n\n[foo]: /url\n", + "html": "

foo bar

\n", + "example": 562, + "start_line": 8419, + "end_line": 8425, + "section": "Links" + }, + { + "markdown": "\\[foo]\n\n[foo]: /url \"title\"\n", + "html": "

[foo]

\n", + "example": 563, + "start_line": 8431, + "end_line": 8437, + "section": "Links" + }, + { + "markdown": "[foo*]: /url\n\n*[foo*]\n", + "html": "

*foo*

\n", + "example": 564, + "start_line": 8443, + "end_line": 8449, + "section": "Links" + }, + { + "markdown": "[foo][bar]\n\n[foo]: /url1\n[bar]: /url2\n", + "html": "

foo

\n", + "example": 565, + "start_line": 8455, + "end_line": 8462, + "section": "Links" + }, + { + "markdown": "[foo][]\n\n[foo]: /url1\n", + "html": "

foo

\n", + "example": 566, + "start_line": 8464, + "end_line": 8470, + "section": "Links" + }, + { + "markdown": "[foo]()\n\n[foo]: /url1\n", + "html": "

foo

\n", + "example": 567, + "start_line": 8474, + "end_line": 8480, + "section": "Links" + }, + { + "markdown": "[foo](not a link)\n\n[foo]: /url1\n", + "html": "

foo(not a link)

\n", + "example": 568, + "start_line": 8482, + "end_line": 8488, + "section": "Links" + }, + { + "markdown": "[foo][bar][baz]\n\n[baz]: /url\n", + "html": "

[foo]bar

\n", + "example": 569, + "start_line": 8493, + "end_line": 8499, + "section": "Links" + }, + { + "markdown": "[foo][bar][baz]\n\n[baz]: /url1\n[bar]: /url2\n", + "html": "

foobaz

\n", + "example": 570, + "start_line": 8505, + "end_line": 8512, + "section": "Links" + }, + { + "markdown": "[foo][bar][baz]\n\n[baz]: /url1\n[foo]: /url2\n", + "html": "

[foo]bar

\n", + "example": 571, + "start_line": 8518, + "end_line": 8525, + "section": "Links" + }, + { + "markdown": "![foo](/url \"title\")\n", + "html": "

\"foo\"

\n", + "example": 572, + "start_line": 8541, + "end_line": 8545, + "section": "Images" + }, + { + "markdown": "![foo *bar*]\n\n[foo *bar*]: train.jpg \"train & tracks\"\n", + "html": "

\"foo

\n", + "example": 573, + "start_line": 8548, + "end_line": 8554, + "section": "Images" + }, + { + "markdown": "![foo ![bar](/url)](/url2)\n", + "html": "

\"foo

\n", + "example": 574, + "start_line": 8557, + "end_line": 8561, + "section": "Images" + }, + { + "markdown": "![foo [bar](/url)](/url2)\n", + "html": "

\"foo

\n", + "example": 575, + "start_line": 8564, + "end_line": 8568, + "section": "Images" + }, + { + "markdown": "![foo *bar*][]\n\n[foo *bar*]: train.jpg \"train & tracks\"\n", + "html": "

\"foo

\n", + "example": 576, + "start_line": 8578, + "end_line": 8584, + "section": "Images" + }, + { + "markdown": "![foo *bar*][foobar]\n\n[FOOBAR]: train.jpg \"train & tracks\"\n", + "html": "

\"foo

\n", + "example": 577, + "start_line": 8587, + "end_line": 8593, + "section": "Images" + }, + { + "markdown": "![foo](train.jpg)\n", + "html": "

\"foo\"

\n", + "example": 578, + "start_line": 8596, + "end_line": 8600, + "section": "Images" + }, + { + "markdown": "My ![foo bar](/path/to/train.jpg \"title\" )\n", + "html": "

My \"foo

\n", + "example": 579, + "start_line": 8603, + "end_line": 8607, + "section": "Images" + }, + { + "markdown": "![foo]()\n", + "html": "

\"foo\"

\n", + "example": 580, + "start_line": 8610, + "end_line": 8614, + "section": "Images" + }, + { + "markdown": "![](/url)\n", + "html": "

\"\"

\n", + "example": 581, + "start_line": 8617, + "end_line": 8621, + "section": "Images" + }, + { + "markdown": "![foo][bar]\n\n[bar]: /url\n", + "html": "

\"foo\"

\n", + "example": 582, + "start_line": 8626, + "end_line": 8632, + "section": "Images" + }, + { + "markdown": "![foo][bar]\n\n[BAR]: /url\n", + "html": "

\"foo\"

\n", + "example": 583, + "start_line": 8635, + "end_line": 8641, + "section": "Images" + }, + { + "markdown": "![foo][]\n\n[foo]: /url \"title\"\n", + "html": "

\"foo\"

\n", + "example": 584, + "start_line": 8646, + "end_line": 8652, + "section": "Images" + }, + { + "markdown": "![*foo* bar][]\n\n[*foo* bar]: /url \"title\"\n", + "html": "

\"foo

\n", + "example": 585, + "start_line": 8655, + "end_line": 8661, + "section": "Images" + }, + { + "markdown": "![Foo][]\n\n[foo]: /url \"title\"\n", + "html": "

\"Foo\"

\n", + "example": 586, + "start_line": 8666, + "end_line": 8672, + "section": "Images" + }, + { + "markdown": "![foo] \n[]\n\n[foo]: /url \"title\"\n", + "html": "

\"foo\"\n[]

\n", + "example": 587, + "start_line": 8678, + "end_line": 8686, + "section": "Images" + }, + { + "markdown": "![foo]\n\n[foo]: /url \"title\"\n", + "html": "

\"foo\"

\n", + "example": 588, + "start_line": 8691, + "end_line": 8697, + "section": "Images" + }, + { + "markdown": "![*foo* bar]\n\n[*foo* bar]: /url \"title\"\n", + "html": "

\"foo

\n", + "example": 589, + "start_line": 8700, + "end_line": 8706, + "section": "Images" + }, + { + "markdown": "![[foo]]\n\n[[foo]]: /url \"title\"\n", + "html": "

![[foo]]

\n

[[foo]]: /url "title"

\n", + "example": 590, + "start_line": 8711, + "end_line": 8718, + "section": "Images" + }, + { + "markdown": "![Foo]\n\n[foo]: /url \"title\"\n", + "html": "

\"Foo\"

\n", + "example": 591, + "start_line": 8723, + "end_line": 8729, + "section": "Images" + }, + { + "markdown": "!\\[foo]\n\n[foo]: /url \"title\"\n", + "html": "

![foo]

\n", + "example": 592, + "start_line": 8735, + "end_line": 8741, + "section": "Images" + }, + { + "markdown": "\\![foo]\n\n[foo]: /url \"title\"\n", + "html": "

!foo

\n", + "example": 593, + "start_line": 8747, + "end_line": 8753, + "section": "Images" + }, + { + "markdown": "\n", + "html": "

http://foo.bar.baz

\n", + "example": 594, + "start_line": 8780, + "end_line": 8784, + "section": "Autolinks" + }, + { + "markdown": "\n", + "html": "

https://foo.bar.baz/test?q=hello&id=22&boolean

\n", + "example": 595, + "start_line": 8787, + "end_line": 8791, + "section": "Autolinks" + }, + { + "markdown": "\n", + "html": "

irc://foo.bar:2233/baz

\n", + "example": 596, + "start_line": 8794, + "end_line": 8798, + "section": "Autolinks" + }, + { + "markdown": "\n", + "html": "

MAILTO:FOO@BAR.BAZ

\n", + "example": 597, + "start_line": 8803, + "end_line": 8807, + "section": "Autolinks" + }, + { + "markdown": "\n", + "html": "

a+b+c:d

\n", + "example": 598, + "start_line": 8815, + "end_line": 8819, + "section": "Autolinks" + }, + { + "markdown": "\n", + "html": "

made-up-scheme://foo,bar

\n", + "example": 599, + "start_line": 8822, + "end_line": 8826, + "section": "Autolinks" + }, + { + "markdown": "\n", + "html": "

https://../

\n", + "example": 600, + "start_line": 8829, + "end_line": 8833, + "section": "Autolinks" + }, + { + "markdown": "\n", + "html": "

localhost:5001/foo

\n", + "example": 601, + "start_line": 8836, + "end_line": 8840, + "section": "Autolinks" + }, + { + "markdown": "\n", + "html": "

<https://foo.bar/baz bim>

\n", + "example": 602, + "start_line": 8845, + "end_line": 8849, + "section": "Autolinks" + }, + { + "markdown": "\n", + "html": "

https://example.com/\\[\\

\n", + "example": 603, + "start_line": 8854, + "end_line": 8858, + "section": "Autolinks" + }, + { + "markdown": "\n", + "html": "

foo@bar.example.com

\n", + "example": 604, + "start_line": 8876, + "end_line": 8880, + "section": "Autolinks" + }, + { + "markdown": "\n", + "html": "

foo+special@Bar.baz-bar0.com

\n", + "example": 605, + "start_line": 8883, + "end_line": 8887, + "section": "Autolinks" + }, + { + "markdown": "\n", + "html": "

<foo+@bar.example.com>

\n", + "example": 606, + "start_line": 8892, + "end_line": 8896, + "section": "Autolinks" + }, + { + "markdown": "<>\n", + "html": "

<>

\n", + "example": 607, + "start_line": 8901, + "end_line": 8905, + "section": "Autolinks" + }, + { + "markdown": "< https://foo.bar >\n", + "html": "

< https://foo.bar >

\n", + "example": 608, + "start_line": 8908, + "end_line": 8912, + "section": "Autolinks" + }, + { + "markdown": "\n", + "html": "

<m:abc>

\n", + "example": 609, + "start_line": 8915, + "end_line": 8919, + "section": "Autolinks" + }, + { + "markdown": "\n", + "html": "

<foo.bar.baz>

\n", + "example": 610, + "start_line": 8922, + "end_line": 8926, + "section": "Autolinks" + }, + { + "markdown": "https://example.com\n", + "html": "

https://example.com

\n", + "example": 611, + "start_line": 8929, + "end_line": 8933, + "section": "Autolinks" + }, + { + "markdown": "foo@bar.example.com\n", + "html": "

foo@bar.example.com

\n", + "example": 612, + "start_line": 8936, + "end_line": 8940, + "section": "Autolinks" + }, + { + "markdown": "\n", + "html": "

\n", + "example": 613, + "start_line": 9016, + "end_line": 9020, + "section": "Raw HTML" + }, + { + "markdown": "\n", + "html": "

\n", + "example": 614, + "start_line": 9025, + "end_line": 9029, + "section": "Raw HTML" + }, + { + "markdown": "\n", + "html": "

\n", + "example": 615, + "start_line": 9034, + "end_line": 9040, + "section": "Raw HTML" + }, + { + "markdown": "\n", + "html": "

\n", + "example": 616, + "start_line": 9045, + "end_line": 9051, + "section": "Raw HTML" + }, + { + "markdown": "Foo \n", + "html": "

Foo

\n", + "example": 617, + "start_line": 9056, + "end_line": 9060, + "section": "Raw HTML" + }, + { + "markdown": "<33> <__>\n", + "html": "

<33> <__>

\n", + "example": 618, + "start_line": 9065, + "end_line": 9069, + "section": "Raw HTML" + }, + { + "markdown": "
\n", + "html": "

<a h*#ref="hi">

\n", + "example": 619, + "start_line": 9074, + "end_line": 9078, + "section": "Raw HTML" + }, + { + "markdown": "
\n", + "html": "

<a href="hi'> <a href=hi'>

\n", + "example": 620, + "start_line": 9083, + "end_line": 9087, + "section": "Raw HTML" + }, + { + "markdown": "< a><\nfoo>\n\n", + "html": "

< a><\nfoo><bar/ >\n<foo bar=baz\nbim!bop />

\n", + "example": 621, + "start_line": 9092, + "end_line": 9102, + "section": "Raw HTML" + }, + { + "markdown": "
\n", + "html": "

<a href='bar'title=title>

\n", + "example": 622, + "start_line": 9107, + "end_line": 9111, + "section": "Raw HTML" + }, + { + "markdown": "
\n", + "html": "

\n", + "example": 623, + "start_line": 9116, + "end_line": 9120, + "section": "Raw HTML" + }, + { + "markdown": "\n", + "html": "

</a href="foo">

\n", + "example": 624, + "start_line": 9125, + "end_line": 9129, + "section": "Raw HTML" + }, + { + "markdown": "foo \n", + "html": "

foo

\n", + "example": 625, + "start_line": 9134, + "end_line": 9140, + "section": "Raw HTML" + }, + { + "markdown": "foo foo -->\n\nfoo foo -->\n", + "html": "

foo foo -->

\n

foo foo -->

\n", + "example": 626, + "start_line": 9142, + "end_line": 9149, + "section": "Raw HTML" + }, + { + "markdown": "foo \n", + "html": "

foo

\n", + "example": 627, + "start_line": 9154, + "end_line": 9158, + "section": "Raw HTML" + }, + { + "markdown": "foo \n", + "html": "

foo

\n", + "example": 628, + "start_line": 9163, + "end_line": 9167, + "section": "Raw HTML" + }, + { + "markdown": "foo &<]]>\n", + "html": "

foo &<]]>

\n", + "example": 629, + "start_line": 9172, + "end_line": 9176, + "section": "Raw HTML" + }, + { + "markdown": "foo \n", + "html": "

foo

\n", + "example": 630, + "start_line": 9182, + "end_line": 9186, + "section": "Raw HTML" + }, + { + "markdown": "foo \n", + "html": "

foo

\n", + "example": 631, + "start_line": 9191, + "end_line": 9195, + "section": "Raw HTML" + }, + { + "markdown": "\n", + "html": "

<a href=""">

\n", + "example": 632, + "start_line": 9198, + "end_line": 9202, + "section": "Raw HTML" + }, + { + "markdown": "foo \nbaz\n", + "html": "

foo
\nbaz

\n", + "example": 633, + "start_line": 9212, + "end_line": 9218, + "section": "Hard line breaks" + }, + { + "markdown": "foo\\\nbaz\n", + "html": "

foo
\nbaz

\n", + "example": 634, + "start_line": 9224, + "end_line": 9230, + "section": "Hard line breaks" + }, + { + "markdown": "foo \nbaz\n", + "html": "

foo
\nbaz

\n", + "example": 635, + "start_line": 9235, + "end_line": 9241, + "section": "Hard line breaks" + }, + { + "markdown": "foo \n bar\n", + "html": "

foo
\nbar

\n", + "example": 636, + "start_line": 9246, + "end_line": 9252, + "section": "Hard line breaks" + }, + { + "markdown": "foo\\\n bar\n", + "html": "

foo
\nbar

\n", + "example": 637, + "start_line": 9255, + "end_line": 9261, + "section": "Hard line breaks" + }, + { + "markdown": "*foo \nbar*\n", + "html": "

foo
\nbar

\n", + "example": 638, + "start_line": 9267, + "end_line": 9273, + "section": "Hard line breaks" + }, + { + "markdown": "*foo\\\nbar*\n", + "html": "

foo
\nbar

\n", + "example": 639, + "start_line": 9276, + "end_line": 9282, + "section": "Hard line breaks" + }, + { + "markdown": "`code \nspan`\n", + "html": "

code span

\n", + "example": 640, + "start_line": 9287, + "end_line": 9292, + "section": "Hard line breaks" + }, + { + "markdown": "`code\\\nspan`\n", + "html": "

code\\ span

\n", + "example": 641, + "start_line": 9295, + "end_line": 9300, + "section": "Hard line breaks" + }, + { + "markdown": "
\n", + "html": "

\n", + "example": 642, + "start_line": 9305, + "end_line": 9311, + "section": "Hard line breaks" + }, + { + "markdown": "\n", + "html": "

\n", + "example": 643, + "start_line": 9314, + "end_line": 9320, + "section": "Hard line breaks" + }, + { + "markdown": "foo\\\n", + "html": "

foo\\

\n", + "example": 644, + "start_line": 9327, + "end_line": 9331, + "section": "Hard line breaks" + }, + { + "markdown": "foo \n", + "html": "

foo

\n", + "example": 645, + "start_line": 9334, + "end_line": 9338, + "section": "Hard line breaks" + }, + { + "markdown": "### foo\\\n", + "html": "

foo\\

\n", + "example": 646, + "start_line": 9341, + "end_line": 9345, + "section": "Hard line breaks" + }, + { + "markdown": "### foo \n", + "html": "

foo

\n", + "example": 647, + "start_line": 9348, + "end_line": 9352, + "section": "Hard line breaks" + }, + { + "markdown": "foo\nbaz\n", + "html": "

foo\nbaz

\n", + "example": 648, + "start_line": 9363, + "end_line": 9369, + "section": "Soft line breaks" + }, + { + "markdown": "foo \n baz\n", + "html": "

foo\nbaz

\n", + "example": 649, + "start_line": 9375, + "end_line": 9381, + "section": "Soft line breaks" + }, + { + "markdown": "hello $.;'there\n", + "html": "

hello $.;'there

\n", + "example": 650, + "start_line": 9395, + "end_line": 9399, + "section": "Textual content" + }, + { + "markdown": "Foo χρῆν\n", + "html": "

Foo χρῆν

\n", + "example": 651, + "start_line": 9402, + "end_line": 9406, + "section": "Textual content" + }, + { + "markdown": "Multiple spaces\n", + "html": "

Multiple spaces

\n", + "example": 652, + "start_line": 9411, + "end_line": 9415, + "section": "Textual content" + } +] \ No newline at end of file diff --git a/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/test/gh/tests/test_cmark_spec/get_cmark_spec.py b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/test/gh/tests/test_cmark_spec/get_cmark_spec.py new file mode 100644 index 0000000000000000000000000000000000000000..d59364f0d1486a68f07d139963bac3faf718a5ef --- /dev/null +++ b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/test/gh/tests/test_cmark_spec/get_cmark_spec.py @@ -0,0 +1,96 @@ +# /// script +# dependencies = [ +# "requests", +# ] +# /// +from pathlib import Path +from typing import Any + +default_version = "0.31.2" +default_json_path = Path(__file__).parent / "commonmark.json" +default_text_path = Path(__file__).parent / "spec.md" +default_fixture_path = ( + Path(__file__).parent.parent / "test_port" / "fixtures" / "commonmark_spec.md" +) + + +def create_argparser(): + import argparse + + parser = argparse.ArgumentParser(description="Download CommonMark spec JSON") + parser.add_argument( + "version", + nargs="?", + default=default_version, + help=f"CommonMark spec version to download (default: {default_version})", + ) + parser.add_argument( + "--output-json", + type=Path, + default=default_json_path, + help=f"Output file path (default: {default_json_path})", + ) + parser.add_argument( + "--output-text", + type=Path, + default=default_text_path, + help=f"Output file path (default: {default_text_path})", + ) + parser.add_argument( + "--output-fixture", + type=Path, + default=default_fixture_path, + help=f"Write to test fixture (default: {default_fixture_path})", + ) + return parser + + +def _json_to_fixture(data: list[dict[str, Any]]) -> str: + text = "" + for item in data: + text += "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" + text += f"src line: {item['start_line'] - 1}\n\n" + text += f".\n{item['markdown']}.\n{item['html']}.\n\n" + return text + + +if __name__ == "__main__": + import requests # type: ignore[import-untyped] + + args = create_argparser().parse_args() + version: str = args.version + json_path: Path = args.output_json + txt_path: Path = args.output_text + test_fixture: Path = args.output_fixture + + changed = False + + json_url = f"https://spec.commonmark.org/{version}/spec.json" + txt_url = f"https://raw.githubusercontent.com/commonmark/commonmark-spec/refs/tags/{version}/spec.txt" + + for url, output_path in ((json_url, json_path), (txt_url, txt_path)): + print(f"Downloading CommonMark spec from {url}") + response = requests.get(url) + response.raise_for_status() + if not output_path.exists() or output_path.read_text() != response.text: + changed = True + with output_path.open("w") as f: + f.write(response.text) + print(f"Updated to {output_path}") + else: + print(f"File {output_path} is up to date, not overwriting") + + # write_to_test_fixture: + response = requests.get(json_url) + response.raise_for_status() + data = response.json() + text = _json_to_fixture(data) + if not test_fixture.exists() or test_fixture.read_text() != text: + changed = True + with test_fixture.open("w") as f: + f.write(text) + print(f"Also updated to {test_fixture}") + else: + print(f"Fixture file {test_fixture} is up to date, not overwriting") + + raise SystemExit(0 if not changed else 1) diff --git a/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/test/gh/tests/test_cmark_spec/spec.md b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/test/gh/tests/test_cmark_spec/spec.md new file mode 100644 index 0000000000000000000000000000000000000000..f1fab281e98b6006a62afcc59ed910ae4bc6741f --- /dev/null +++ b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/test/gh/tests/test_cmark_spec/spec.md @@ -0,0 +1,9756 @@ +--- +title: CommonMark Spec +author: John MacFarlane +version: '0.31.2' +date: '2024-01-28' +license: '[CC-BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/)' +... + +# Introduction + +## What is Markdown? + +Markdown is a plain text format for writing structured documents, +based on conventions for indicating formatting in email +and usenet posts. It was developed by John Gruber (with +help from Aaron Swartz) and released in 2004 in the form of a +[syntax description](https://daringfireball.net/projects/markdown/syntax) +and a Perl script (`Markdown.pl`) for converting Markdown to +HTML. In the next decade, dozens of implementations were +developed in many languages. Some extended the original +Markdown syntax with conventions for footnotes, tables, and +other document elements. Some allowed Markdown documents to be +rendered in formats other than HTML. Websites like Reddit, +StackOverflow, and GitHub had millions of people using Markdown. +And Markdown started to be used beyond the web, to author books, +articles, slide shows, letters, and lecture notes. + +What distinguishes Markdown from many other lightweight markup +syntaxes, which are often easier to write, is its readability. +As Gruber writes: + +> The overriding design goal for Markdown's formatting syntax is +> to make it as readable as possible. The idea is that a +> Markdown-formatted document should be publishable as-is, as +> plain text, without looking like it's been marked up with tags +> or formatting instructions. +> () + +The point can be illustrated by comparing a sample of +[AsciiDoc](https://asciidoc.org/) with +an equivalent sample of Markdown. Here is a sample of +AsciiDoc from the AsciiDoc manual: + +``` +1. List item one. ++ +List item one continued with a second paragraph followed by an +Indented block. ++ +................. +$ ls *.sh +$ mv *.sh ~/tmp +................. ++ +List item continued with a third paragraph. + +2. List item two continued with an open block. ++ +-- +This paragraph is part of the preceding list item. + +a. This list is nested and does not require explicit item +continuation. ++ +This paragraph is part of the preceding list item. + +b. List item b. + +This paragraph belongs to item two of the outer list. +-- +``` + +And here is the equivalent in Markdown: +``` +1. List item one. + + List item one continued with a second paragraph followed by an + Indented block. + + $ ls *.sh + $ mv *.sh ~/tmp + + List item continued with a third paragraph. + +2. List item two continued with an open block. + + This paragraph is part of the preceding list item. + + 1. This list is nested and does not require explicit item continuation. + + This paragraph is part of the preceding list item. + + 2. List item b. + + This paragraph belongs to item two of the outer list. +``` + +The AsciiDoc version is, arguably, easier to write. You don't need +to worry about indentation. But the Markdown version is much easier +to read. The nesting of list items is apparent to the eye in the +source, not just in the processed document. + +## Why is a spec needed? + +John Gruber's [canonical description of Markdown's +syntax](https://daringfireball.net/projects/markdown/syntax) +does not specify the syntax unambiguously. Here are some examples of +questions it does not answer: + +1. How much indentation is needed for a sublist? The spec says that + continuation paragraphs need to be indented four spaces, but is + not fully explicit about sublists. It is natural to think that + they, too, must be indented four spaces, but `Markdown.pl` does + not require that. This is hardly a "corner case," and divergences + between implementations on this issue often lead to surprises for + users in real documents. (See [this comment by John + Gruber](https://web.archive.org/web/20170611172104/http://article.gmane.org/gmane.text.markdown.general/1997).) + +2. Is a blank line needed before a block quote or heading? + Most implementations do not require the blank line. However, + this can lead to unexpected results in hard-wrapped text, and + also to ambiguities in parsing (note that some implementations + put the heading inside the blockquote, while others do not). + (John Gruber has also spoken [in favor of requiring the blank + lines](https://web.archive.org/web/20170611172104/http://article.gmane.org/gmane.text.markdown.general/2146).) + +3. Is a blank line needed before an indented code block? + (`Markdown.pl` requires it, but this is not mentioned in the + documentation, and some implementations do not require it.) + + ``` markdown + paragraph + code? + ``` + +4. What is the exact rule for determining when list items get + wrapped in `

` tags? Can a list be partially "loose" and partially + "tight"? What should we do with a list like this? + + ``` markdown + 1. one + + 2. two + 3. three + ``` + + Or this? + + ``` markdown + 1. one + - a + + - b + 2. two + ``` + + (There are some relevant comments by John Gruber + [here](https://web.archive.org/web/20170611172104/http://article.gmane.org/gmane.text.markdown.general/2554).) + +5. Can list markers be indented? Can ordered list markers be right-aligned? + + ``` markdown + 8. item 1 + 9. item 2 + 10. item 2a + ``` + +6. Is this one list with a thematic break in its second item, + or two lists separated by a thematic break? + + ``` markdown + * a + * * * * * + * b + ``` + +7. When list markers change from numbers to bullets, do we have + two lists or one? (The Markdown syntax description suggests two, + but the perl scripts and many other implementations produce one.) + + ``` markdown + 1. fee + 2. fie + - foe + - fum + ``` + +8. What are the precedence rules for the markers of inline structure? + For example, is the following a valid link, or does the code span + take precedence ? + + ``` markdown + [a backtick (`)](/url) and [another backtick (`)](/url). + ``` + +9. What are the precedence rules for markers of emphasis and strong + emphasis? For example, how should the following be parsed? + + ``` markdown + *foo *bar* baz* + ``` + +10. What are the precedence rules between block-level and inline-level + structure? For example, how should the following be parsed? + + ``` markdown + - `a long code span can contain a hyphen like this + - and it can screw things up` + ``` + +11. Can list items include section headings? (`Markdown.pl` does not + allow this, but does allow blockquotes to include headings.) + + ``` markdown + - # Heading + ``` + +12. Can list items be empty? + + ``` markdown + * a + * + * b + ``` + +13. Can link references be defined inside block quotes or list items? + + ``` markdown + > Blockquote [foo]. + > + > [foo]: /url + ``` + +14. If there are multiple definitions for the same reference, which takes + precedence? + + ``` markdown + [foo]: /url1 + [foo]: /url2 + + [foo][] + ``` + +In the absence of a spec, early implementers consulted `Markdown.pl` +to resolve these ambiguities. But `Markdown.pl` was quite buggy, and +gave manifestly bad results in many cases, so it was not a +satisfactory replacement for a spec. + +Because there is no unambiguous spec, implementations have diverged +considerably. As a result, users are often surprised to find that +a document that renders one way on one system (say, a GitHub wiki) +renders differently on another (say, converting to docbook using +pandoc). To make matters worse, because nothing in Markdown counts +as a "syntax error," the divergence often isn't discovered right away. + +## About this document + +This document attempts to specify Markdown syntax unambiguously. +It contains many examples with side-by-side Markdown and +HTML. These are intended to double as conformance tests. An +accompanying script `spec_tests.py` can be used to run the tests +against any Markdown program: + + python test/spec_tests.py --spec spec.txt --program PROGRAM + +Since this document describes how Markdown is to be parsed into +an abstract syntax tree, it would have made sense to use an abstract +representation of the syntax tree instead of HTML. But HTML is capable +of representing the structural distinctions we need to make, and the +choice of HTML for the tests makes it possible to run the tests against +an implementation without writing an abstract syntax tree renderer. + +Note that not every feature of the HTML samples is mandated by +the spec. For example, the spec says what counts as a link +destination, but it doesn't mandate that non-ASCII characters in +the URL be percent-encoded. To use the automatic tests, +implementers will need to provide a renderer that conforms to +the expectations of the spec examples (percent-encoding +non-ASCII characters in URLs). But a conforming implementation +can use a different renderer and may choose not to +percent-encode non-ASCII characters in URLs. + +This document is generated from a text file, `spec.txt`, written +in Markdown with a small extension for the side-by-side tests. +The script `tools/makespec.py` can be used to convert `spec.txt` into +HTML or CommonMark (which can then be converted into other formats). + +In the examples, the `→` character is used to represent tabs. + +# Preliminaries + +## Characters and lines + +Any sequence of [characters] is a valid CommonMark +document. + +A [character](@) is a Unicode code point. Although some +code points (for example, combining accents) do not correspond to +characters in an intuitive sense, all code points count as characters +for purposes of this spec. + +This spec does not specify an encoding; it thinks of lines as composed +of [characters] rather than bytes. A conforming parser may be limited +to a certain encoding. + +A [line](@) is a sequence of zero or more [characters] +other than line feed (`U+000A`) or carriage return (`U+000D`), +followed by a [line ending] or by the end of file. + +A [line ending](@) is a line feed (`U+000A`), a carriage return +(`U+000D`) not followed by a line feed, or a carriage return and a +following line feed. + +A line containing no characters, or a line containing only spaces +(`U+0020`) or tabs (`U+0009`), is called a [blank line](@). + +The following definitions of character classes will be used in this spec: + +A [Unicode whitespace character](@) is a character in the Unicode `Zs` general +category, or a tab (`U+0009`), line feed (`U+000A`), form feed (`U+000C`), or +carriage return (`U+000D`). + +[Unicode whitespace](@) is a sequence of one or more +[Unicode whitespace characters]. + +A [tab](@) is `U+0009`. + +A [space](@) is `U+0020`. + +An [ASCII control character](@) is a character between `U+0000–1F` (both +including) or `U+007F`. + +An [ASCII punctuation character](@) +is `!`, `"`, `#`, `$`, `%`, `&`, `'`, `(`, `)`, +`*`, `+`, `,`, `-`, `.`, `/` (U+0021–2F), +`:`, `;`, `<`, `=`, `>`, `?`, `@` (U+003A–0040), +`[`, `\`, `]`, `^`, `_`, `` ` `` (U+005B–0060), +`{`, `|`, `}`, or `~` (U+007B–007E). + +A [Unicode punctuation character](@) is a character in the Unicode `P` +(puncuation) or `S` (symbol) general categories. + +## Tabs + +Tabs in lines are not expanded to [spaces]. However, +in contexts where spaces help to define block structure, +tabs behave as if they were replaced by spaces with a tab stop +of 4 characters. + +Thus, for example, a tab can be used instead of four spaces +in an indented code block. (Note, however, that internal +tabs are passed through as literal tabs, not expanded to +spaces.) + +```````````````````````````````` example +→foo→baz→→bim +. +

foo→baz→→bim
+
+```````````````````````````````` + +```````````````````````````````` example + →foo→baz→→bim +. +
foo→baz→→bim
+
+```````````````````````````````` + +```````````````````````````````` example + a→a + ὐ→a +. +
a→a
+ὐ→a
+
+```````````````````````````````` + +In the following example, a continuation paragraph of a list +item is indented with a tab; this has exactly the same effect +as indentation with four spaces would: + +```````````````````````````````` example + - foo + +→bar +. +
    +
  • +

    foo

    +

    bar

    +
  • +
+```````````````````````````````` + +```````````````````````````````` example +- foo + +→→bar +. +
    +
  • +

    foo

    +
      bar
    +
    +
  • +
+```````````````````````````````` + +Normally the `>` that begins a block quote may be followed +optionally by a space, which is not considered part of the +content. In the following case `>` is followed by a tab, +which is treated as if it were expanded into three spaces. +Since one of these spaces is considered part of the +delimiter, `foo` is considered to be indented six spaces +inside the block quote context, so we get an indented +code block starting with two spaces. + +```````````````````````````````` example +>→→foo +. +
+
  foo
+
+
+```````````````````````````````` + +```````````````````````````````` example +-→→foo +. +
    +
  • +
      foo
    +
    +
  • +
+```````````````````````````````` + + +```````````````````````````````` example + foo +→bar +. +
foo
+bar
+
+```````````````````````````````` + +```````````````````````````````` example + - foo + - bar +→ - baz +. +
    +
  • foo +
      +
    • bar +
        +
      • baz
      • +
      +
    • +
    +
  • +
+```````````````````````````````` + +```````````````````````````````` example +#→Foo +. +

Foo

+```````````````````````````````` + +```````````````````````````````` example +*→*→*→ +. +
+```````````````````````````````` + + +## Insecure characters + +For security reasons, the Unicode character `U+0000` must be replaced +with the REPLACEMENT CHARACTER (`U+FFFD`). + + +## Backslash escapes + +Any ASCII punctuation character may be backslash-escaped: + +```````````````````````````````` example +\!\"\#\$\%\&\'\(\)\*\+\,\-\.\/\:\;\<\=\>\?\@\[\\\]\^\_\`\{\|\}\~ +. +

!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~

+```````````````````````````````` + + +Backslashes before other characters are treated as literal +backslashes: + +```````````````````````````````` example +\→\A\a\ \3\φ\« +. +

\→\A\a\ \3\φ\«

+```````````````````````````````` + + +Escaped characters are treated as regular characters and do +not have their usual Markdown meanings: + +```````````````````````````````` example +\*not emphasized* +\
not a tag +\[not a link](/foo) +\`not code` +1\. not a list +\* not a list +\# not a heading +\[foo]: /url "not a reference" +\ö not a character entity +. +

*not emphasized* +<br/> not a tag +[not a link](/foo) +`not code` +1. not a list +* not a list +# not a heading +[foo]: /url "not a reference" +&ouml; not a character entity

+```````````````````````````````` + + +If a backslash is itself escaped, the following character is not: + +```````````````````````````````` example +\\*emphasis* +. +

\emphasis

+```````````````````````````````` + + +A backslash at the end of the line is a [hard line break]: + +```````````````````````````````` example +foo\ +bar +. +

foo
+bar

+```````````````````````````````` + + +Backslash escapes do not work in code blocks, code spans, autolinks, or +raw HTML: + +```````````````````````````````` example +`` \[\` `` +. +

\[\`

+```````````````````````````````` + + +```````````````````````````````` example + \[\] +. +
\[\]
+
+```````````````````````````````` + + +```````````````````````````````` example +~~~ +\[\] +~~~ +. +
\[\]
+
+```````````````````````````````` + + +```````````````````````````````` example + +. +

https://example.com?find=\*

+```````````````````````````````` + + +```````````````````````````````` example + +. + +```````````````````````````````` + + +But they work in all other contexts, including URLs and link titles, +link references, and [info strings] in [fenced code blocks]: + +```````````````````````````````` example +[foo](/bar\* "ti\*tle") +. +

foo

+```````````````````````````````` + + +```````````````````````````````` example +[foo] + +[foo]: /bar\* "ti\*tle" +. +

foo

+```````````````````````````````` + + +```````````````````````````````` example +``` foo\+bar +foo +``` +. +
foo
+
+```````````````````````````````` + + +## Entity and numeric character references + +Valid HTML entity references and numeric character references +can be used in place of the corresponding Unicode character, +with the following exceptions: + +- Entity and character references are not recognized in code + blocks and code spans. + +- Entity and character references cannot stand in place of + special characters that define structural elements in + CommonMark. For example, although `*` can be used + in place of a literal `*` character, `*` cannot replace + `*` in emphasis delimiters, bullet list markers, or thematic + breaks. + +Conforming CommonMark parsers need not store information about +whether a particular character was represented in the source +using a Unicode character or an entity reference. + +[Entity references](@) consist of `&` + any of the valid +HTML5 entity names + `;`. The +document +is used as an authoritative source for the valid entity +references and their corresponding code points. + +```````````````````````````````` example +  & © Æ Ď +¾ ℋ ⅆ +∲ ≧̸ +. +

  & © Æ Ď +¾ ℋ ⅆ +∲ ≧̸

+```````````````````````````````` + + +[Decimal numeric character +references](@) +consist of `&#` + a string of 1--7 arabic digits + `;`. A +numeric character reference is parsed as the corresponding +Unicode character. Invalid Unicode code points will be replaced by +the REPLACEMENT CHARACTER (`U+FFFD`). For security reasons, +the code point `U+0000` will also be replaced by `U+FFFD`. + +```````````````````````````````` example +# Ӓ Ϡ � +. +

# Ӓ Ϡ �

+```````````````````````````````` + + +[Hexadecimal numeric character +references](@) consist of `&#` + +either `X` or `x` + a string of 1-6 hexadecimal digits + `;`. +They too are parsed as the corresponding Unicode character (this +time specified with a hexadecimal numeral instead of decimal). + +```````````````````````````````` example +" ആ ಫ +. +

" ആ ಫ

+```````````````````````````````` + + +Here are some nonentities: + +```````````````````````````````` example +  &x; &#; &#x; +� +&#abcdef0; +&ThisIsNotDefined; &hi?; +. +

&nbsp &x; &#; &#x; +&#87654321; +&#abcdef0; +&ThisIsNotDefined; &hi?;

+```````````````````````````````` + + +Although HTML5 does accept some entity references +without a trailing semicolon (such as `©`), these are not +recognized here, because it makes the grammar too ambiguous: + +```````````````````````````````` example +© +. +

&copy

+```````````````````````````````` + + +Strings that are not on the list of HTML5 named entities are not +recognized as entity references either: + +```````````````````````````````` example +&MadeUpEntity; +. +

&MadeUpEntity;

+```````````````````````````````` + + +Entity and numeric character references are recognized in any +context besides code spans or code blocks, including +URLs, [link titles], and [fenced code block][] [info strings]: + +```````````````````````````````` example + +. + +```````````````````````````````` + + +```````````````````````````````` example +[foo](/föö "föö") +. +

foo

+```````````````````````````````` + + +```````````````````````````````` example +[foo] + +[foo]: /föö "föö" +. +

foo

+```````````````````````````````` + + +```````````````````````````````` example +``` föö +foo +``` +. +
foo
+
+```````````````````````````````` + + +Entity and numeric character references are treated as literal +text in code spans and code blocks: + +```````````````````````````````` example +`föö` +. +

f&ouml;&ouml;

+```````````````````````````````` + + +```````````````````````````````` example + föfö +. +
f&ouml;f&ouml;
+
+```````````````````````````````` + + +Entity and numeric character references cannot be used +in place of symbols indicating structure in CommonMark +documents. + +```````````````````````````````` example +*foo* +*foo* +. +

*foo* +foo

+```````````````````````````````` + +```````````````````````````````` example +* foo + +* foo +. +

* foo

+
    +
  • foo
  • +
+```````````````````````````````` + +```````````````````````````````` example +foo bar +. +

foo + +bar

+```````````````````````````````` + +```````````````````````````````` example + foo +. +

→foo

+```````````````````````````````` + + +```````````````````````````````` example +[a](url "tit") +. +

[a](url "tit")

+```````````````````````````````` + + + +# Blocks and inlines + +We can think of a document as a sequence of +[blocks](@)---structural elements like paragraphs, block +quotations, lists, headings, rules, and code blocks. Some blocks (like +block quotes and list items) contain other blocks; others (like +headings and paragraphs) contain [inline](@) content---text, +links, emphasized text, images, code spans, and so on. + +## Precedence + +Indicators of block structure always take precedence over indicators +of inline structure. So, for example, the following is a list with +two items, not a list with one item containing a code span: + +```````````````````````````````` example +- `one +- two` +. +
    +
  • `one
  • +
  • two`
  • +
+```````````````````````````````` + + +This means that parsing can proceed in two steps: first, the block +structure of the document can be discerned; second, text lines inside +paragraphs, headings, and other block constructs can be parsed for inline +structure. The second step requires information about link reference +definitions that will be available only at the end of the first +step. Note that the first step requires processing lines in sequence, +but the second can be parallelized, since the inline parsing of +one block element does not affect the inline parsing of any other. + +## Container blocks and leaf blocks + +We can divide blocks into two types: +[container blocks](#container-blocks), +which can contain other blocks, and [leaf blocks](#leaf-blocks), +which cannot. + +# Leaf blocks + +This section describes the different kinds of leaf block that make up a +Markdown document. + +## Thematic breaks + +A line consisting of optionally up to three spaces of indentation, followed by a +sequence of three or more matching `-`, `_`, or `*` characters, each followed +optionally by any number of spaces or tabs, forms a +[thematic break](@). + +```````````````````````````````` example +*** +--- +___ +. +
+
+
+```````````````````````````````` + + +Wrong characters: + +```````````````````````````````` example ++++ +. +

+++

+```````````````````````````````` + + +```````````````````````````````` example +=== +. +

===

+```````````````````````````````` + + +Not enough characters: + +```````````````````````````````` example +-- +** +__ +. +

-- +** +__

+```````````````````````````````` + + +Up to three spaces of indentation are allowed: + +```````````````````````````````` example + *** + *** + *** +. +
+
+
+```````````````````````````````` + + +Four spaces of indentation is too many: + +```````````````````````````````` example + *** +. +
***
+
+```````````````````````````````` + + +```````````````````````````````` example +Foo + *** +. +

Foo +***

+```````````````````````````````` + + +More than three characters may be used: + +```````````````````````````````` example +_____________________________________ +. +
+```````````````````````````````` + + +Spaces and tabs are allowed between the characters: + +```````````````````````````````` example + - - - +. +
+```````````````````````````````` + + +```````````````````````````````` example + ** * ** * ** * ** +. +
+```````````````````````````````` + + +```````````````````````````````` example +- - - - +. +
+```````````````````````````````` + + +Spaces and tabs are allowed at the end: + +```````````````````````````````` example +- - - - +. +
+```````````````````````````````` + + +However, no other characters may occur in the line: + +```````````````````````````````` example +_ _ _ _ a + +a------ + +---a--- +. +

_ _ _ _ a

+

a------

+

---a---

+```````````````````````````````` + + +It is required that all of the characters other than spaces or tabs be the same. +So, this is not a thematic break: + +```````````````````````````````` example + *-* +. +

-

+```````````````````````````````` + + +Thematic breaks do not need blank lines before or after: + +```````````````````````````````` example +- foo +*** +- bar +. +
    +
  • foo
  • +
+
+
    +
  • bar
  • +
+```````````````````````````````` + + +Thematic breaks can interrupt a paragraph: + +```````````````````````````````` example +Foo +*** +bar +. +

Foo

+
+

bar

+```````````````````````````````` + + +If a line of dashes that meets the above conditions for being a +thematic break could also be interpreted as the underline of a [setext +heading], the interpretation as a +[setext heading] takes precedence. Thus, for example, +this is a setext heading, not a paragraph followed by a thematic break: + +```````````````````````````````` example +Foo +--- +bar +. +

Foo

+

bar

+```````````````````````````````` + + +When both a thematic break and a list item are possible +interpretations of a line, the thematic break takes precedence: + +```````````````````````````````` example +* Foo +* * * +* Bar +. +
    +
  • Foo
  • +
+
+
    +
  • Bar
  • +
+```````````````````````````````` + + +If you want a thematic break in a list item, use a different bullet: + +```````````````````````````````` example +- Foo +- * * * +. +
    +
  • Foo
  • +
  • +
    +
  • +
+```````````````````````````````` + + +## ATX headings + +An [ATX heading](@) +consists of a string of characters, parsed as inline content, between an +opening sequence of 1--6 unescaped `#` characters and an optional +closing sequence of any number of unescaped `#` characters. +The opening sequence of `#` characters must be followed by spaces or tabs, or +by the end of line. The optional closing sequence of `#`s must be preceded by +spaces or tabs and may be followed by spaces or tabs only. The opening +`#` character may be preceded by up to three spaces of indentation. The raw +contents of the heading are stripped of leading and trailing space or tabs +before being parsed as inline content. The heading level is equal to the number +of `#` characters in the opening sequence. + +Simple headings: + +```````````````````````````````` example +# foo +## foo +### foo +#### foo +##### foo +###### foo +. +

foo

+

foo

+

foo

+

foo

+
foo
+
foo
+```````````````````````````````` + + +More than six `#` characters is not a heading: + +```````````````````````````````` example +####### foo +. +

####### foo

+```````````````````````````````` + + +At least one space or tab is required between the `#` characters and the +heading's contents, unless the heading is empty. Note that many +implementations currently do not require the space. However, the +space was required by the +[original ATX implementation](http://www.aaronsw.com/2002/atx/atx.py), +and it helps prevent things like the following from being parsed as +headings: + +```````````````````````````````` example +#5 bolt + +#hashtag +. +

#5 bolt

+

#hashtag

+```````````````````````````````` + + +This is not a heading, because the first `#` is escaped: + +```````````````````````````````` example +\## foo +. +

## foo

+```````````````````````````````` + + +Contents are parsed as inlines: + +```````````````````````````````` example +# foo *bar* \*baz\* +. +

foo bar *baz*

+```````````````````````````````` + + +Leading and trailing spaces or tabs are ignored in parsing inline content: + +```````````````````````````````` example +# foo +. +

foo

+```````````````````````````````` + + +Up to three spaces of indentation are allowed: + +```````````````````````````````` example + ### foo + ## foo + # foo +. +

foo

+

foo

+

foo

+```````````````````````````````` + + +Four spaces of indentation is too many: + +```````````````````````````````` example + # foo +. +
# foo
+
+```````````````````````````````` + + +```````````````````````````````` example +foo + # bar +. +

foo +# bar

+```````````````````````````````` + + +A closing sequence of `#` characters is optional: + +```````````````````````````````` example +## foo ## + ### bar ### +. +

foo

+

bar

+```````````````````````````````` + + +It need not be the same length as the opening sequence: + +```````````````````````````````` example +# foo ################################## +##### foo ## +. +

foo

+
foo
+```````````````````````````````` + + +Spaces or tabs are allowed after the closing sequence: + +```````````````````````````````` example +### foo ### +. +

foo

+```````````````````````````````` + + +A sequence of `#` characters with anything but spaces or tabs following it +is not a closing sequence, but counts as part of the contents of the +heading: + +```````````````````````````````` example +### foo ### b +. +

foo ### b

+```````````````````````````````` + + +The closing sequence must be preceded by a space or tab: + +```````````````````````````````` example +# foo# +. +

foo#

+```````````````````````````````` + + +Backslash-escaped `#` characters do not count as part +of the closing sequence: + +```````````````````````````````` example +### foo \### +## foo #\## +# foo \# +. +

foo ###

+

foo ###

+

foo #

+```````````````````````````````` + + +ATX headings need not be separated from surrounding content by blank +lines, and they can interrupt paragraphs: + +```````````````````````````````` example +**** +## foo +**** +. +
+

foo

+
+```````````````````````````````` + + +```````````````````````````````` example +Foo bar +# baz +Bar foo +. +

Foo bar

+

baz

+

Bar foo

+```````````````````````````````` + + +ATX headings can be empty: + +```````````````````````````````` example +## +# +### ### +. +

+

+

+```````````````````````````````` + + +## Setext headings + +A [setext heading](@) consists of one or more +lines of text, not interrupted by a blank line, of which the first line does not +have more than 3 spaces of indentation, followed by +a [setext heading underline]. The lines of text must be such +that, were they not followed by the setext heading underline, +they would be interpreted as a paragraph: they cannot be +interpretable as a [code fence], [ATX heading][ATX headings], +[block quote][block quotes], [thematic break][thematic breaks], +[list item][list items], or [HTML block][HTML blocks]. + +A [setext heading underline](@) is a sequence of +`=` characters or a sequence of `-` characters, with no more than 3 +spaces of indentation and any number of trailing spaces or tabs. + +The heading is a level 1 heading if `=` characters are used in +the [setext heading underline], and a level 2 heading if `-` +characters are used. The contents of the heading are the result +of parsing the preceding lines of text as CommonMark inline +content. + +In general, a setext heading need not be preceded or followed by a +blank line. However, it cannot interrupt a paragraph, so when a +setext heading comes after a paragraph, a blank line is needed between +them. + +Simple examples: + +```````````````````````````````` example +Foo *bar* +========= + +Foo *bar* +--------- +. +

Foo bar

+

Foo bar

+```````````````````````````````` + + +The content of the header may span more than one line: + +```````````````````````````````` example +Foo *bar +baz* +==== +. +

Foo bar +baz

+```````````````````````````````` + +The contents are the result of parsing the headings's raw +content as inlines. The heading's raw content is formed by +concatenating the lines and removing initial and final +spaces or tabs. + +```````````````````````````````` example + Foo *bar +baz*→ +==== +. +

Foo bar +baz

+```````````````````````````````` + + +The underlining can be any length: + +```````````````````````````````` example +Foo +------------------------- + +Foo += +. +

Foo

+

Foo

+```````````````````````````````` + + +The heading content can be preceded by up to three spaces of indentation, and +need not line up with the underlining: + +```````````````````````````````` example + Foo +--- + + Foo +----- + + Foo + === +. +

Foo

+

Foo

+

Foo

+```````````````````````````````` + + +Four spaces of indentation is too many: + +```````````````````````````````` example + Foo + --- + + Foo +--- +. +
Foo
+---
+
+Foo
+
+
+```````````````````````````````` + + +The setext heading underline can be preceded by up to three spaces of +indentation, and may have trailing spaces or tabs: + +```````````````````````````````` example +Foo + ---- +. +

Foo

+```````````````````````````````` + + +Four spaces of indentation is too many: + +```````````````````````````````` example +Foo + --- +. +

Foo +---

+```````````````````````````````` + + +The setext heading underline cannot contain internal spaces or tabs: + +```````````````````````````````` example +Foo += = + +Foo +--- - +. +

Foo += =

+

Foo

+
+```````````````````````````````` + + +Trailing spaces or tabs in the content line do not cause a hard line break: + +```````````````````````````````` example +Foo +----- +. +

Foo

+```````````````````````````````` + + +Nor does a backslash at the end: + +```````````````````````````````` example +Foo\ +---- +. +

Foo\

+```````````````````````````````` + + +Since indicators of block structure take precedence over +indicators of inline structure, the following are setext headings: + +```````````````````````````````` example +`Foo +---- +` + + +. +

`Foo

+

`

+

<a title="a lot

+

of dashes"/>

+```````````````````````````````` + + +The setext heading underline cannot be a [lazy continuation +line] in a list item or block quote: + +```````````````````````````````` example +> Foo +--- +. +
+

Foo

+
+
+```````````````````````````````` + + +```````````````````````````````` example +> foo +bar +=== +. +
+

foo +bar +===

+
+```````````````````````````````` + + +```````````````````````````````` example +- Foo +--- +. +
    +
  • Foo
  • +
+
+```````````````````````````````` + + +A blank line is needed between a paragraph and a following +setext heading, since otherwise the paragraph becomes part +of the heading's content: + +```````````````````````````````` example +Foo +Bar +--- +. +

Foo +Bar

+```````````````````````````````` + + +But in general a blank line is not required before or after +setext headings: + +```````````````````````````````` example +--- +Foo +--- +Bar +--- +Baz +. +
+

Foo

+

Bar

+

Baz

+```````````````````````````````` + + +Setext headings cannot be empty: + +```````````````````````````````` example + +==== +. +

====

+```````````````````````````````` + + +Setext heading text lines must not be interpretable as block +constructs other than paragraphs. So, the line of dashes +in these examples gets interpreted as a thematic break: + +```````````````````````````````` example +--- +--- +. +
+
+```````````````````````````````` + + +```````````````````````````````` example +- foo +----- +. +
    +
  • foo
  • +
+
+```````````````````````````````` + + +```````````````````````````````` example + foo +--- +. +
foo
+
+
+```````````````````````````````` + + +```````````````````````````````` example +> foo +----- +. +
+

foo

+
+
+```````````````````````````````` + + +If you want a heading with `> foo` as its literal text, you can +use backslash escapes: + +```````````````````````````````` example +\> foo +------ +. +

> foo

+```````````````````````````````` + + +**Compatibility note:** Most existing Markdown implementations +do not allow the text of setext headings to span multiple lines. +But there is no consensus about how to interpret + +``` markdown +Foo +bar +--- +baz +``` + +One can find four different interpretations: + +1. paragraph "Foo", heading "bar", paragraph "baz" +2. paragraph "Foo bar", thematic break, paragraph "baz" +3. paragraph "Foo bar --- baz" +4. heading "Foo bar", paragraph "baz" + +We find interpretation 4 most natural, and interpretation 4 +increases the expressive power of CommonMark, by allowing +multiline headings. Authors who want interpretation 1 can +put a blank line after the first paragraph: + +```````````````````````````````` example +Foo + +bar +--- +baz +. +

Foo

+

bar

+

baz

+```````````````````````````````` + + +Authors who want interpretation 2 can put blank lines around +the thematic break, + +```````````````````````````````` example +Foo +bar + +--- + +baz +. +

Foo +bar

+
+

baz

+```````````````````````````````` + + +or use a thematic break that cannot count as a [setext heading +underline], such as + +```````````````````````````````` example +Foo +bar +* * * +baz +. +

Foo +bar

+
+

baz

+```````````````````````````````` + + +Authors who want interpretation 3 can use backslash escapes: + +```````````````````````````````` example +Foo +bar +\--- +baz +. +

Foo +bar +--- +baz

+```````````````````````````````` + + +## Indented code blocks + +An [indented code block](@) is composed of one or more +[indented chunks] separated by blank lines. +An [indented chunk](@) is a sequence of non-blank lines, +each preceded by four or more spaces of indentation. The contents of the code +block are the literal contents of the lines, including trailing +[line endings], minus four spaces of indentation. +An indented code block has no [info string]. + +An indented code block cannot interrupt a paragraph, so there must be +a blank line between a paragraph and a following indented code block. +(A blank line is not needed, however, between a code block and a following +paragraph.) + +```````````````````````````````` example + a simple + indented code block +. +
a simple
+  indented code block
+
+```````````````````````````````` + + +If there is any ambiguity between an interpretation of indentation +as a code block and as indicating that material belongs to a [list +item][list items], the list item interpretation takes precedence: + +```````````````````````````````` example + - foo + + bar +. +
    +
  • +

    foo

    +

    bar

    +
  • +
+```````````````````````````````` + + +```````````````````````````````` example +1. foo + + - bar +. +
    +
  1. +

    foo

    +
      +
    • bar
    • +
    +
  2. +
+```````````````````````````````` + + + +The contents of a code block are literal text, and do not get parsed +as Markdown: + +```````````````````````````````` example +
+ *hi* + + - one +. +
<a/>
+*hi*
+
+- one
+
+```````````````````````````````` + + +Here we have three chunks separated by blank lines: + +```````````````````````````````` example + chunk1 + + chunk2 + + + + chunk3 +. +
chunk1
+
+chunk2
+
+
+
+chunk3
+
+```````````````````````````````` + + +Any initial spaces or tabs beyond four spaces of indentation will be included in +the content, even in interior blank lines: + +```````````````````````````````` example + chunk1 + + chunk2 +. +
chunk1
+  
+  chunk2
+
+```````````````````````````````` + + +An indented code block cannot interrupt a paragraph. (This +allows hanging indents and the like.) + +```````````````````````````````` example +Foo + bar + +. +

Foo +bar

+```````````````````````````````` + + +However, any non-blank line with fewer than four spaces of indentation ends +the code block immediately. So a paragraph may occur immediately +after indented code: + +```````````````````````````````` example + foo +bar +. +
foo
+
+

bar

+```````````````````````````````` + + +And indented code can occur immediately before and after other kinds of +blocks: + +```````````````````````````````` example +# Heading + foo +Heading +------ + foo +---- +. +

Heading

+
foo
+
+

Heading

+
foo
+
+
+```````````````````````````````` + + +The first line can be preceded by more than four spaces of indentation: + +```````````````````````````````` example + foo + bar +. +
    foo
+bar
+
+```````````````````````````````` + + +Blank lines preceding or following an indented code block +are not included in it: + +```````````````````````````````` example + + + foo + + +. +
foo
+
+```````````````````````````````` + + +Trailing spaces or tabs are included in the code block's content: + +```````````````````````````````` example + foo +. +
foo  
+
+```````````````````````````````` + + + +## Fenced code blocks + +A [code fence](@) is a sequence +of at least three consecutive backtick characters (`` ` ``) or +tildes (`~`). (Tildes and backticks cannot be mixed.) +A [fenced code block](@) +begins with a code fence, preceded by up to three spaces of indentation. + +The line with the opening code fence may optionally contain some text +following the code fence; this is trimmed of leading and trailing +spaces or tabs and called the [info string](@). If the [info string] comes +after a backtick fence, it may not contain any backtick +characters. (The reason for this restriction is that otherwise +some inline code would be incorrectly interpreted as the +beginning of a fenced code block.) + +The content of the code block consists of all subsequent lines, until +a closing [code fence] of the same type as the code block +began with (backticks or tildes), and with at least as many backticks +or tildes as the opening code fence. If the leading code fence is +preceded by N spaces of indentation, then up to N spaces of indentation are +removed from each line of the content (if present). (If a content line is not +indented, it is preserved unchanged. If it is indented N spaces or less, all +of the indentation is removed.) + +The closing code fence may be preceded by up to three spaces of indentation, and +may be followed only by spaces or tabs, which are ignored. If the end of the +containing block (or document) is reached and no closing code fence +has been found, the code block contains all of the lines after the +opening code fence until the end of the containing block (or +document). (An alternative spec would require backtracking in the +event that a closing code fence is not found. But this makes parsing +much less efficient, and there seems to be no real downside to the +behavior described here.) + +A fenced code block may interrupt a paragraph, and does not require +a blank line either before or after. + +The content of a code fence is treated as literal text, not parsed +as inlines. The first word of the [info string] is typically used to +specify the language of the code sample, and rendered in the `class` +attribute of the `code` tag. However, this spec does not mandate any +particular treatment of the [info string]. + +Here is a simple example with backticks: + +```````````````````````````````` example +``` +< + > +``` +. +
<
+ >
+
+```````````````````````````````` + + +With tildes: + +```````````````````````````````` example +~~~ +< + > +~~~ +. +
<
+ >
+
+```````````````````````````````` + +Fewer than three backticks is not enough: + +```````````````````````````````` example +`` +foo +`` +. +

foo

+```````````````````````````````` + +The closing code fence must use the same character as the opening +fence: + +```````````````````````````````` example +``` +aaa +~~~ +``` +. +
aaa
+~~~
+
+```````````````````````````````` + + +```````````````````````````````` example +~~~ +aaa +``` +~~~ +. +
aaa
+```
+
+```````````````````````````````` + + +The closing code fence must be at least as long as the opening fence: + +```````````````````````````````` example +```` +aaa +``` +`````` +. +
aaa
+```
+
+```````````````````````````````` + + +```````````````````````````````` example +~~~~ +aaa +~~~ +~~~~ +. +
aaa
+~~~
+
+```````````````````````````````` + + +Unclosed code blocks are closed by the end of the document +(or the enclosing [block quote][block quotes] or [list item][list items]): + +```````````````````````````````` example +``` +. +
+```````````````````````````````` + + +```````````````````````````````` example +````` + +``` +aaa +. +

+```
+aaa
+
+```````````````````````````````` + + +```````````````````````````````` example +> ``` +> aaa + +bbb +. +
+
aaa
+
+
+

bbb

+```````````````````````````````` + + +A code block can have all empty lines as its content: + +```````````````````````````````` example +``` + + +``` +. +

+  
+
+```````````````````````````````` + + +A code block can be empty: + +```````````````````````````````` example +``` +``` +. +
+```````````````````````````````` + + +Fences can be indented. If the opening fence is indented, +content lines will have equivalent opening indentation removed, +if present: + +```````````````````````````````` example + ``` + aaa +aaa +``` +. +
aaa
+aaa
+
+```````````````````````````````` + + +```````````````````````````````` example + ``` +aaa + aaa +aaa + ``` +. +
aaa
+aaa
+aaa
+
+```````````````````````````````` + + +```````````````````````````````` example + ``` + aaa + aaa + aaa + ``` +. +
aaa
+ aaa
+aaa
+
+```````````````````````````````` + + +Four spaces of indentation is too many: + +```````````````````````````````` example + ``` + aaa + ``` +. +
```
+aaa
+```
+
+```````````````````````````````` + + +Closing fences may be preceded by up to three spaces of indentation, and their +indentation need not match that of the opening fence: + +```````````````````````````````` example +``` +aaa + ``` +. +
aaa
+
+```````````````````````````````` + + +```````````````````````````````` example + ``` +aaa + ``` +. +
aaa
+
+```````````````````````````````` + + +This is not a closing fence, because it is indented 4 spaces: + +```````````````````````````````` example +``` +aaa + ``` +. +
aaa
+    ```
+
+```````````````````````````````` + + + +Code fences (opening and closing) cannot contain internal spaces or tabs: + +```````````````````````````````` example +``` ``` +aaa +. +

+aaa

+```````````````````````````````` + + +```````````````````````````````` example +~~~~~~ +aaa +~~~ ~~ +. +
aaa
+~~~ ~~
+
+```````````````````````````````` + + +Fenced code blocks can interrupt paragraphs, and can be followed +directly by paragraphs, without a blank line between: + +```````````````````````````````` example +foo +``` +bar +``` +baz +. +

foo

+
bar
+
+

baz

+```````````````````````````````` + + +Other blocks can also occur before and after fenced code blocks +without an intervening blank line: + +```````````````````````````````` example +foo +--- +~~~ +bar +~~~ +# baz +. +

foo

+
bar
+
+

baz

+```````````````````````````````` + + +An [info string] can be provided after the opening code fence. +Although this spec doesn't mandate any particular treatment of +the info string, the first word is typically used to specify +the language of the code block. In HTML output, the language is +normally indicated by adding a class to the `code` element consisting +of `language-` followed by the language name. + +```````````````````````````````` example +```ruby +def foo(x) + return 3 +end +``` +. +
def foo(x)
+  return 3
+end
+
+```````````````````````````````` + + +```````````````````````````````` example +~~~~ ruby startline=3 $%@#$ +def foo(x) + return 3 +end +~~~~~~~ +. +
def foo(x)
+  return 3
+end
+
+```````````````````````````````` + + +```````````````````````````````` example +````; +```` +. +
+```````````````````````````````` + + +[Info strings] for backtick code blocks cannot contain backticks: + +```````````````````````````````` example +``` aa ``` +foo +. +

aa +foo

+```````````````````````````````` + + +[Info strings] for tilde code blocks can contain backticks and tildes: + +```````````````````````````````` example +~~~ aa ``` ~~~ +foo +~~~ +. +
foo
+
+```````````````````````````````` + + +Closing code fences cannot have [info strings]: + +```````````````````````````````` example +``` +``` aaa +``` +. +
``` aaa
+
+```````````````````````````````` + + + +## HTML blocks + +An [HTML block](@) is a group of lines that is treated +as raw HTML (and will not be escaped in HTML output). + +There are seven kinds of [HTML block], which can be defined by their +start and end conditions. The block begins with a line that meets a +[start condition](@) (after up to three optional spaces of indentation). +It ends with the first subsequent line that meets a matching +[end condition](@), or the last line of the document, or the last line of +the [container block](#container-blocks) containing the current HTML +block, if no line is encountered that meets the [end condition]. If +the first line meets both the [start condition] and the [end +condition], the block will contain just that line. + +1. **Start condition:** line begins with the string ``, or the end of the line.\ +**End condition:** line contains an end tag +``, ``, ``, or `` (case-insensitive; it +need not match the start tag). + +2. **Start condition:** line begins with the string ``. + +3. **Start condition:** line begins with the string ``. + +4. **Start condition:** line begins with the string ``. + +5. **Start condition:** line begins with the string +``. + +6. **Start condition:** line begins with the string `<` or ``, or +the string `/>`.\ +**End condition:** line is followed by a [blank line]. + +7. **Start condition:** line begins with a complete [open tag] +(with any [tag name] other than `pre`, `script`, +`style`, or `textarea`) or a complete [closing tag], +followed by zero or more spaces and tabs, followed by the end of the line.\ +**End condition:** line is followed by a [blank line]. + +HTML blocks continue until they are closed by their appropriate +[end condition], or the last line of the document or other [container +block](#container-blocks). This means any HTML **within an HTML +block** that might otherwise be recognised as a start condition will +be ignored by the parser and passed through as-is, without changing +the parser's state. + +For instance, `
` within an HTML block started by `` will not affect
+the parser state; as the HTML block was started in by start condition 6, it
+will end at any blank line. This can be surprising:
+
+```````````````````````````````` example
+
+
+**Hello**,
+
+_world_.
+
+
+. +
+
+**Hello**,
+

world. +

+
+```````````````````````````````` + +In this case, the HTML block is terminated by the blank line — the `**Hello**` +text remains verbatim — and regular parsing resumes, with a paragraph, +emphasised `world` and inline and block HTML following. + +All types of [HTML blocks] except type 7 may interrupt +a paragraph. Blocks of type 7 may not interrupt a paragraph. +(This restriction is intended to prevent unwanted interpretation +of long tags inside a wrapped paragraph as starting HTML blocks.) + +Some simple examples follow. Here are some basic HTML blocks +of type 6: + +```````````````````````````````` example + + + + +
+ hi +
+ +okay. +. + + + + +
+ hi +
+

okay.

+```````````````````````````````` + + +```````````````````````````````` example +
+*foo* +```````````````````````````````` + + +Here we have two HTML blocks with a Markdown paragraph between them: + +```````````````````````````````` example +
+ +*Markdown* + +
+. +
+

Markdown

+
+```````````````````````````````` + + +The tag on the first line can be partial, as long +as it is split where there would be whitespace: + +```````````````````````````````` example +
+
+. +
+
+```````````````````````````````` + + +```````````````````````````````` example +
+
+. +
+
+```````````````````````````````` + + +An open tag need not be closed: +```````````````````````````````` example +
+*foo* + +*bar* +. +
+*foo* +

bar

+```````````````````````````````` + + + +A partial tag need not even be completed (garbage +in, garbage out): + +```````````````````````````````` example +
+. + +```````````````````````````````` + + +```````````````````````````````` example +
+foo +
+. +
+foo +
+```````````````````````````````` + + +Everything until the next blank line or end of document +gets included in the HTML block. So, in the following +example, what looks like a Markdown code block +is actually part of the HTML block, which continues until a blank +line or the end of the document is reached: + +```````````````````````````````` example +
+``` c +int x = 33; +``` +. +
+``` c +int x = 33; +``` +```````````````````````````````` + + +To start an [HTML block] with a tag that is *not* in the +list of block-level tags in (6), you must put the tag by +itself on the first line (and it must be complete): + +```````````````````````````````` example + +*bar* + +. + +*bar* + +```````````````````````````````` + + +In type 7 blocks, the [tag name] can be anything: + +```````````````````````````````` example + +*bar* + +. + +*bar* + +```````````````````````````````` + + +```````````````````````````````` example + +*bar* + +. + +*bar* + +```````````````````````````````` + + +```````````````````````````````` example + +*bar* +. + +*bar* +```````````````````````````````` + + +These rules are designed to allow us to work with tags that +can function as either block-level or inline-level tags. +The `` tag is a nice example. We can surround content with +`` tags in three different ways. In this case, we get a raw +HTML block, because the `` tag is on a line by itself: + +```````````````````````````````` example + +*foo* + +. + +*foo* + +```````````````````````````````` + + +In this case, we get a raw HTML block that just includes +the `` tag (because it ends with the following blank +line). So the contents get interpreted as CommonMark: + +```````````````````````````````` example + + +*foo* + + +. + +

foo

+
+```````````````````````````````` + + +Finally, in this case, the `` tags are interpreted +as [raw HTML] *inside* the CommonMark paragraph. (Because +the tag is not on a line by itself, we get inline HTML +rather than an [HTML block].) + +```````````````````````````````` example +*foo* +. +

foo

+```````````````````````````````` + + +HTML tags designed to contain literal content +(`pre`, `script`, `style`, `textarea`), comments, processing instructions, +and declarations are treated somewhat differently. +Instead of ending at the first blank line, these blocks +end at the first line containing a corresponding end tag. +As a result, these blocks can contain blank lines: + +A pre tag (type 1): + +```````````````````````````````` example +

+import Text.HTML.TagSoup
+
+main :: IO ()
+main = print $ parseTags tags
+
+okay +. +

+import Text.HTML.TagSoup
+
+main :: IO ()
+main = print $ parseTags tags
+
+

okay

+```````````````````````````````` + + +A script tag (type 1): + +```````````````````````````````` example + +okay +. + +

okay

+```````````````````````````````` + + +A textarea tag (type 1): + +```````````````````````````````` example + +. + +```````````````````````````````` + +A style tag (type 1): + +```````````````````````````````` example + +okay +. + +

okay

+```````````````````````````````` + + +If there is no matching end tag, the block will end at the +end of the document (or the enclosing [block quote][block quotes] +or [list item][list items]): + +```````````````````````````````` example + +*foo* +. + +

foo

+```````````````````````````````` + + +```````````````````````````````` example +*bar* +*baz* +. +*bar* +

baz

+```````````````````````````````` + + +Note that anything on the last line after the +end tag will be included in the [HTML block]: + +```````````````````````````````` example +1. *bar* +. +1. *bar* +```````````````````````````````` + + +A comment (type 2): + +```````````````````````````````` example + +okay +. + +

okay

+```````````````````````````````` + + + +A processing instruction (type 3): + +```````````````````````````````` example +'; + +?> +okay +. +'; + +?> +

okay

+```````````````````````````````` + + +A declaration (type 4): + +```````````````````````````````` example + +. + +```````````````````````````````` + + +CDATA (type 5): + +```````````````````````````````` example + +okay +. + +

okay

+```````````````````````````````` + + +The opening tag can be preceded by up to three spaces of indentation, but not +four: + +```````````````````````````````` example + + + +. + +
<!-- foo -->
+
+```````````````````````````````` + + +```````````````````````````````` example +
+ +
+. +
+
<div>
+
+```````````````````````````````` + + +An HTML block of types 1--6 can interrupt a paragraph, and need not be +preceded by a blank line. + +```````````````````````````````` example +Foo +
+bar +
+. +

Foo

+
+bar +
+```````````````````````````````` + + +However, a following blank line is needed, except at the end of +a document, and except for blocks of types 1--5, [above][HTML +block]: + +```````````````````````````````` example +
+bar +
+*foo* +. +
+bar +
+*foo* +```````````````````````````````` + + +HTML blocks of type 7 cannot interrupt a paragraph: + +```````````````````````````````` example +Foo + +baz +. +

Foo + +baz

+```````````````````````````````` + + +This rule differs from John Gruber's original Markdown syntax +specification, which says: + +> The only restrictions are that block-level HTML elements — +> e.g. `
`, ``, `
`, `

`, etc. — must be separated from +> surrounding content by blank lines, and the start and end tags of the +> block should not be indented with spaces or tabs. + +In some ways Gruber's rule is more restrictive than the one given +here: + +- It requires that an HTML block be preceded by a blank line. +- It does not allow the start tag to be indented. +- It requires a matching end tag, which it also does not allow to + be indented. + +Most Markdown implementations (including some of Gruber's own) do not +respect all of these restrictions. + +There is one respect, however, in which Gruber's rule is more liberal +than the one given here, since it allows blank lines to occur inside +an HTML block. There are two reasons for disallowing them here. +First, it removes the need to parse balanced tags, which is +expensive and can require backtracking from the end of the document +if no matching end tag is found. Second, it provides a very simple +and flexible way of including Markdown content inside HTML tags: +simply separate the Markdown from the HTML using blank lines: + +Compare: + +```````````````````````````````` example +

+ +*Emphasized* text. + +
+. +
+

Emphasized text.

+
+```````````````````````````````` + + +```````````````````````````````` example +
+*Emphasized* text. +
+. +
+*Emphasized* text. +
+```````````````````````````````` + + +Some Markdown implementations have adopted a convention of +interpreting content inside tags as text if the open tag has +the attribute `markdown=1`. The rule given above seems a simpler and +more elegant way of achieving the same expressive power, which is also +much simpler to parse. + +The main potential drawback is that one can no longer paste HTML +blocks into Markdown documents with 100% reliability. However, +*in most cases* this will work fine, because the blank lines in +HTML are usually followed by HTML block tags. For example: + +```````````````````````````````` example +
+ + + + + + + +
+Hi +
+. + + + + +
+Hi +
+```````````````````````````````` + + +There are problems, however, if the inner tags are indented +*and* separated by spaces, as then they will be interpreted as +an indented code block: + +```````````````````````````````` example + + + + + + + + +
+ Hi +
+. + + +
<td>
+  Hi
+</td>
+
+ +
+```````````````````````````````` + + +Fortunately, blank lines are usually not necessary and can be +deleted. The exception is inside `
` tags, but as described
+[above][HTML blocks], raw HTML blocks starting with `
`
+*can* contain blank lines.
+
+## Link reference definitions
+
+A [link reference definition](@)
+consists of a [link label], optionally preceded by up to three spaces of
+indentation, followed
+by a colon (`:`), optional spaces or tabs (including up to one
+[line ending]), a [link destination],
+optional spaces or tabs (including up to one
+[line ending]), and an optional [link
+title], which if it is present must be separated
+from the [link destination] by spaces or tabs.
+No further character may occur.
+
+A [link reference definition]
+does not correspond to a structural element of a document.  Instead, it
+defines a label which can be used in [reference links]
+and reference-style [images] elsewhere in the document.  [Link
+reference definitions] can come either before or after the links that use
+them.
+
+```````````````````````````````` example
+[foo]: /url "title"
+
+[foo]
+.
+

foo

+```````````````````````````````` + + +```````````````````````````````` example + [foo]: + /url + 'the title' + +[foo] +. +

foo

+```````````````````````````````` + + +```````````````````````````````` example +[Foo*bar\]]:my_(url) 'title (with parens)' + +[Foo*bar\]] +. +

Foo*bar]

+```````````````````````````````` + + +```````````````````````````````` example +[Foo bar]: + +'title' + +[Foo bar] +. +

Foo bar

+```````````````````````````````` + + +The title may extend over multiple lines: + +```````````````````````````````` example +[foo]: /url ' +title +line1 +line2 +' + +[foo] +. +

foo

+```````````````````````````````` + + +However, it may not contain a [blank line]: + +```````````````````````````````` example +[foo]: /url 'title + +with blank line' + +[foo] +. +

[foo]: /url 'title

+

with blank line'

+

[foo]

+```````````````````````````````` + + +The title may be omitted: + +```````````````````````````````` example +[foo]: +/url + +[foo] +. +

foo

+```````````````````````````````` + + +The link destination may not be omitted: + +```````````````````````````````` example +[foo]: + +[foo] +. +

[foo]:

+

[foo]

+```````````````````````````````` + + However, an empty link destination may be specified using + angle brackets: + +```````````````````````````````` example +[foo]: <> + +[foo] +. +

foo

+```````````````````````````````` + +The title must be separated from the link destination by +spaces or tabs: + +```````````````````````````````` example +[foo]: (baz) + +[foo] +. +

[foo]: (baz)

+

[foo]

+```````````````````````````````` + + +Both title and destination can contain backslash escapes +and literal backslashes: + +```````````````````````````````` example +[foo]: /url\bar\*baz "foo\"bar\baz" + +[foo] +. +

foo

+```````````````````````````````` + + +A link can come before its corresponding definition: + +```````````````````````````````` example +[foo] + +[foo]: url +. +

foo

+```````````````````````````````` + + +If there are several matching definitions, the first one takes +precedence: + +```````````````````````````````` example +[foo] + +[foo]: first +[foo]: second +. +

foo

+```````````````````````````````` + + +As noted in the section on [Links], matching of labels is +case-insensitive (see [matches]). + +```````````````````````````````` example +[FOO]: /url + +[Foo] +. +

Foo

+```````````````````````````````` + + +```````````````````````````````` example +[ΑΓΩ]: /φου + +[αγω] +. +

αγω

+```````````````````````````````` + + +Whether something is a [link reference definition] is +independent of whether the link reference it defines is +used in the document. Thus, for example, the following +document contains just a link reference definition, and +no visible content: + +```````````````````````````````` example +[foo]: /url +. +```````````````````````````````` + + +Here is another one: + +```````````````````````````````` example +[ +foo +]: /url +bar +. +

bar

+```````````````````````````````` + + +This is not a link reference definition, because there are +characters other than spaces or tabs after the title: + +```````````````````````````````` example +[foo]: /url "title" ok +. +

[foo]: /url "title" ok

+```````````````````````````````` + + +This is a link reference definition, but it has no title: + +```````````````````````````````` example +[foo]: /url +"title" ok +. +

"title" ok

+```````````````````````````````` + + +This is not a link reference definition, because it is indented +four spaces: + +```````````````````````````````` example + [foo]: /url "title" + +[foo] +. +
[foo]: /url "title"
+
+

[foo]

+```````````````````````````````` + + +This is not a link reference definition, because it occurs inside +a code block: + +```````````````````````````````` example +``` +[foo]: /url +``` + +[foo] +. +
[foo]: /url
+
+

[foo]

+```````````````````````````````` + + +A [link reference definition] cannot interrupt a paragraph. + +```````````````````````````````` example +Foo +[bar]: /baz + +[bar] +. +

Foo +[bar]: /baz

+

[bar]

+```````````````````````````````` + + +However, it can directly follow other block elements, such as headings +and thematic breaks, and it need not be followed by a blank line. + +```````````````````````````````` example +# [Foo] +[foo]: /url +> bar +. +

Foo

+
+

bar

+
+```````````````````````````````` + +```````````````````````````````` example +[foo]: /url +bar +=== +[foo] +. +

bar

+

foo

+```````````````````````````````` + +```````````````````````````````` example +[foo]: /url +=== +[foo] +. +

=== +foo

+```````````````````````````````` + + +Several [link reference definitions] +can occur one after another, without intervening blank lines. + +```````````````````````````````` example +[foo]: /foo-url "foo" +[bar]: /bar-url + "bar" +[baz]: /baz-url + +[foo], +[bar], +[baz] +. +

foo, +bar, +baz

+```````````````````````````````` + + +[Link reference definitions] can occur +inside block containers, like lists and block quotations. They +affect the entire document, not just the container in which they +are defined: + +```````````````````````````````` example +[foo] + +> [foo]: /url +. +

foo

+
+
+```````````````````````````````` + + +## Paragraphs + +A sequence of non-blank lines that cannot be interpreted as other +kinds of blocks forms a [paragraph](@). +The contents of the paragraph are the result of parsing the +paragraph's raw content as inlines. The paragraph's raw content +is formed by concatenating the lines and removing initial and final +spaces or tabs. + +A simple example with two paragraphs: + +```````````````````````````````` example +aaa + +bbb +. +

aaa

+

bbb

+```````````````````````````````` + + +Paragraphs can contain multiple lines, but no blank lines: + +```````````````````````````````` example +aaa +bbb + +ccc +ddd +. +

aaa +bbb

+

ccc +ddd

+```````````````````````````````` + + +Multiple blank lines between paragraphs have no effect: + +```````````````````````````````` example +aaa + + +bbb +. +

aaa

+

bbb

+```````````````````````````````` + + +Leading spaces or tabs are skipped: + +```````````````````````````````` example + aaa + bbb +. +

aaa +bbb

+```````````````````````````````` + + +Lines after the first may be indented any amount, since indented +code blocks cannot interrupt paragraphs. + +```````````````````````````````` example +aaa + bbb + ccc +. +

aaa +bbb +ccc

+```````````````````````````````` + + +However, the first line may be preceded by up to three spaces of indentation. +Four spaces of indentation is too many: + +```````````````````````````````` example + aaa +bbb +. +

aaa +bbb

+```````````````````````````````` + + +```````````````````````````````` example + aaa +bbb +. +
aaa
+
+

bbb

+```````````````````````````````` + + +Final spaces or tabs are stripped before inline parsing, so a paragraph +that ends with two or more spaces will not end with a [hard line +break]: + +```````````````````````````````` example +aaa +bbb +. +

aaa
+bbb

+```````````````````````````````` + + +## Blank lines + +[Blank lines] between block-level elements are ignored, +except for the role they play in determining whether a [list] +is [tight] or [loose]. + +Blank lines at the beginning and end of the document are also ignored. + +```````````````````````````````` example + + +aaa + + +# aaa + + +. +

aaa

+

aaa

+```````````````````````````````` + + + +# Container blocks + +A [container block](#container-blocks) is a block that has other +blocks as its contents. There are two basic kinds of container blocks: +[block quotes] and [list items]. +[Lists] are meta-containers for [list items]. + +We define the syntax for container blocks recursively. The general +form of the definition is: + +> If X is a sequence of blocks, then the result of +> transforming X in such-and-such a way is a container of type Y +> with these blocks as its content. + +So, we explain what counts as a block quote or list item by explaining +how these can be *generated* from their contents. This should suffice +to define the syntax, although it does not give a recipe for *parsing* +these constructions. (A recipe is provided below in the section entitled +[A parsing strategy](#appendix-a-parsing-strategy).) + +## Block quotes + +A [block quote marker](@), +optionally preceded by up to three spaces of indentation, +consists of (a) the character `>` together with a following space of +indentation, or (b) a single character `>` not followed by a space of +indentation. + +The following rules define [block quotes]: + +1. **Basic case.** If a string of lines *Ls* constitute a sequence + of blocks *Bs*, then the result of prepending a [block quote + marker] to the beginning of each line in *Ls* + is a [block quote](#block-quotes) containing *Bs*. + +2. **Laziness.** If a string of lines *Ls* constitute a [block + quote](#block-quotes) with contents *Bs*, then the result of deleting + the initial [block quote marker] from one or + more lines in which the next character other than a space or tab after the + [block quote marker] is [paragraph continuation + text] is a block quote with *Bs* as its content. + [Paragraph continuation text](@) is text + that will be parsed as part of the content of a paragraph, but does + not occur at the beginning of the paragraph. + +3. **Consecutiveness.** A document cannot contain two [block + quotes] in a row unless there is a [blank line] between them. + +Nothing else counts as a [block quote](#block-quotes). + +Here is a simple example: + +```````````````````````````````` example +> # Foo +> bar +> baz +. +
+

Foo

+

bar +baz

+
+```````````````````````````````` + + +The space or tab after the `>` characters can be omitted: + +```````````````````````````````` example +># Foo +>bar +> baz +. +
+

Foo

+

bar +baz

+
+```````````````````````````````` + + +The `>` characters can be preceded by up to three spaces of indentation: + +```````````````````````````````` example + > # Foo + > bar + > baz +. +
+

Foo

+

bar +baz

+
+```````````````````````````````` + + +Four spaces of indentation is too many: + +```````````````````````````````` example + > # Foo + > bar + > baz +. +
> # Foo
+> bar
+> baz
+
+```````````````````````````````` + + +The Laziness clause allows us to omit the `>` before +[paragraph continuation text]: + +```````````````````````````````` example +> # Foo +> bar +baz +. +
+

Foo

+

bar +baz

+
+```````````````````````````````` + + +A block quote can contain some lazy and some non-lazy +continuation lines: + +```````````````````````````````` example +> bar +baz +> foo +. +
+

bar +baz +foo

+
+```````````````````````````````` + + +Laziness only applies to lines that would have been continuations of +paragraphs had they been prepended with [block quote markers]. +For example, the `> ` cannot be omitted in the second line of + +``` markdown +> foo +> --- +``` + +without changing the meaning: + +```````````````````````````````` example +> foo +--- +. +
+

foo

+
+
+```````````````````````````````` + + +Similarly, if we omit the `> ` in the second line of + +``` markdown +> - foo +> - bar +``` + +then the block quote ends after the first line: + +```````````````````````````````` example +> - foo +- bar +. +
+
    +
  • foo
  • +
+
+
    +
  • bar
  • +
+```````````````````````````````` + + +For the same reason, we can't omit the `> ` in front of +subsequent lines of an indented or fenced code block: + +```````````````````````````````` example +> foo + bar +. +
+
foo
+
+
+
bar
+
+```````````````````````````````` + + +```````````````````````````````` example +> ``` +foo +``` +. +
+
+
+

foo

+
+```````````````````````````````` + + +Note that in the following case, we have a [lazy +continuation line]: + +```````````````````````````````` example +> foo + - bar +. +
+

foo +- bar

+
+```````````````````````````````` + + +To see why, note that in + +```markdown +> foo +> - bar +``` + +the `- bar` is indented too far to start a list, and can't +be an indented code block because indented code blocks cannot +interrupt paragraphs, so it is [paragraph continuation text]. + +A block quote can be empty: + +```````````````````````````````` example +> +. +
+
+```````````````````````````````` + + +```````````````````````````````` example +> +> +> +. +
+
+```````````````````````````````` + + +A block quote can have initial or final blank lines: + +```````````````````````````````` example +> +> foo +> +. +
+

foo

+
+```````````````````````````````` + + +A blank line always separates block quotes: + +```````````````````````````````` example +> foo + +> bar +. +
+

foo

+
+
+

bar

+
+```````````````````````````````` + + +(Most current Markdown implementations, including John Gruber's +original `Markdown.pl`, will parse this example as a single block quote +with two paragraphs. But it seems better to allow the author to decide +whether two block quotes or one are wanted.) + +Consecutiveness means that if we put these block quotes together, +we get a single block quote: + +```````````````````````````````` example +> foo +> bar +. +
+

foo +bar

+
+```````````````````````````````` + + +To get a block quote with two paragraphs, use: + +```````````````````````````````` example +> foo +> +> bar +. +
+

foo

+

bar

+
+```````````````````````````````` + + +Block quotes can interrupt paragraphs: + +```````````````````````````````` example +foo +> bar +. +

foo

+
+

bar

+
+```````````````````````````````` + + +In general, blank lines are not needed before or after block +quotes: + +```````````````````````````````` example +> aaa +*** +> bbb +. +
+

aaa

+
+
+
+

bbb

+
+```````````````````````````````` + + +However, because of laziness, a blank line is needed between +a block quote and a following paragraph: + +```````````````````````````````` example +> bar +baz +. +
+

bar +baz

+
+```````````````````````````````` + + +```````````````````````````````` example +> bar + +baz +. +
+

bar

+
+

baz

+```````````````````````````````` + + +```````````````````````````````` example +> bar +> +baz +. +
+

bar

+
+

baz

+```````````````````````````````` + + +It is a consequence of the Laziness rule that any number +of initial `>`s may be omitted on a continuation line of a +nested block quote: + +```````````````````````````````` example +> > > foo +bar +. +
+
+
+

foo +bar

+
+
+
+```````````````````````````````` + + +```````````````````````````````` example +>>> foo +> bar +>>baz +. +
+
+
+

foo +bar +baz

+
+
+
+```````````````````````````````` + + +When including an indented code block in a block quote, +remember that the [block quote marker] includes +both the `>` and a following space of indentation. So *five spaces* are needed +after the `>`: + +```````````````````````````````` example +> code + +> not code +. +
+
code
+
+
+
+

not code

+
+```````````````````````````````` + + + +## List items + +A [list marker](@) is a +[bullet list marker] or an [ordered list marker]. + +A [bullet list marker](@) +is a `-`, `+`, or `*` character. + +An [ordered list marker](@) +is a sequence of 1--9 arabic digits (`0-9`), followed by either a +`.` character or a `)` character. (The reason for the length +limit is that with 10 digits we start seeing integer overflows +in some browsers.) + +The following rules define [list items]: + +1. **Basic case.** If a sequence of lines *Ls* constitute a sequence of + blocks *Bs* starting with a character other than a space or tab, and *M* is + a list marker of width *W* followed by 1 ≤ *N* ≤ 4 spaces of indentation, + then the result of prepending *M* and the following spaces to the first line + of *Ls*, and indenting subsequent lines of *Ls* by *W + N* spaces, is a + list item with *Bs* as its contents. The type of the list item + (bullet or ordered) is determined by the type of its list marker. + If the list item is ordered, then it is also assigned a start + number, based on the ordered list marker. + + Exceptions: + + 1. When the first list item in a [list] interrupts + a paragraph---that is, when it starts on a line that would + otherwise count as [paragraph continuation text]---then (a) + the lines *Ls* must not begin with a blank line, and (b) if + the list item is ordered, the start number must be 1. + 2. If any line is a [thematic break][thematic breaks] then + that line is not a list item. + +For example, let *Ls* be the lines + +```````````````````````````````` example +A paragraph +with two lines. + + indented code + +> A block quote. +. +

A paragraph +with two lines.

+
indented code
+
+
+

A block quote.

+
+```````````````````````````````` + + +And let *M* be the marker `1.`, and *N* = 2. Then rule #1 says +that the following is an ordered list item with start number 1, +and the same contents as *Ls*: + +```````````````````````````````` example +1. A paragraph + with two lines. + + indented code + + > A block quote. +. +
    +
  1. +

    A paragraph +with two lines.

    +
    indented code
    +
    +
    +

    A block quote.

    +
    +
  2. +
+```````````````````````````````` + + +The most important thing to notice is that the position of +the text after the list marker determines how much indentation +is needed in subsequent blocks in the list item. If the list +marker takes up two spaces of indentation, and there are three spaces between +the list marker and the next character other than a space or tab, then blocks +must be indented five spaces in order to fall under the list +item. + +Here are some examples showing how far content must be indented to be +put under the list item: + +```````````````````````````````` example +- one + + two +. +
    +
  • one
  • +
+

two

+```````````````````````````````` + + +```````````````````````````````` example +- one + + two +. +
    +
  • +

    one

    +

    two

    +
  • +
+```````````````````````````````` + + +```````````````````````````````` example + - one + + two +. +
    +
  • one
  • +
+
 two
+
+```````````````````````````````` + + +```````````````````````````````` example + - one + + two +. +
    +
  • +

    one

    +

    two

    +
  • +
+```````````````````````````````` + + +It is tempting to think of this in terms of columns: the continuation +blocks must be indented at least to the column of the first character other than +a space or tab after the list marker. However, that is not quite right. +The spaces of indentation after the list marker determine how much relative +indentation is needed. Which column this indentation reaches will depend on +how the list item is embedded in other constructions, as shown by +this example: + +```````````````````````````````` example + > > 1. one +>> +>> two +. +
+
+
    +
  1. +

    one

    +

    two

    +
  2. +
+
+
+```````````````````````````````` + + +Here `two` occurs in the same column as the list marker `1.`, +but is actually contained in the list item, because there is +sufficient indentation after the last containing blockquote marker. + +The converse is also possible. In the following example, the word `two` +occurs far to the right of the initial text of the list item, `one`, but +it is not considered part of the list item, because it is not indented +far enough past the blockquote marker: + +```````````````````````````````` example +>>- one +>> + > > two +. +
+
+
    +
  • one
  • +
+

two

+
+
+```````````````````````````````` + + +Note that at least one space or tab is needed between the list marker and +any following content, so these are not list items: + +```````````````````````````````` example +-one + +2.two +. +

-one

+

2.two

+```````````````````````````````` + + +A list item may contain blocks that are separated by more than +one blank line. + +```````````````````````````````` example +- foo + + + bar +. +
    +
  • +

    foo

    +

    bar

    +
  • +
+```````````````````````````````` + + +A list item may contain any kind of block: + +```````````````````````````````` example +1. foo + + ``` + bar + ``` + + baz + + > bam +. +
    +
  1. +

    foo

    +
    bar
    +
    +

    baz

    +
    +

    bam

    +
    +
  2. +
+```````````````````````````````` + + +A list item that contains an indented code block will preserve +empty lines within the code block verbatim. + +```````````````````````````````` example +- Foo + + bar + + + baz +. +
    +
  • +

    Foo

    +
    bar
    +
    +
    +baz
    +
    +
  • +
+```````````````````````````````` + +Note that ordered list start numbers must be nine digits or less: + +```````````````````````````````` example +123456789. ok +. +
    +
  1. ok
  2. +
+```````````````````````````````` + + +```````````````````````````````` example +1234567890. not ok +. +

1234567890. not ok

+```````````````````````````````` + + +A start number may begin with 0s: + +```````````````````````````````` example +0. ok +. +
    +
  1. ok
  2. +
+```````````````````````````````` + + +```````````````````````````````` example +003. ok +. +
    +
  1. ok
  2. +
+```````````````````````````````` + + +A start number may not be negative: + +```````````````````````````````` example +-1. not ok +. +

-1. not ok

+```````````````````````````````` + + + +2. **Item starting with indented code.** If a sequence of lines *Ls* + constitute a sequence of blocks *Bs* starting with an indented code + block, and *M* is a list marker of width *W* followed by + one space of indentation, then the result of prepending *M* and the + following space to the first line of *Ls*, and indenting subsequent lines + of *Ls* by *W + 1* spaces, is a list item with *Bs* as its contents. + If a line is empty, then it need not be indented. The type of the + list item (bullet or ordered) is determined by the type of its list + marker. If the list item is ordered, then it is also assigned a + start number, based on the ordered list marker. + +An indented code block will have to be preceded by four spaces of indentation +beyond the edge of the region where text will be included in the list item. +In the following case that is 6 spaces: + +```````````````````````````````` example +- foo + + bar +. +
    +
  • +

    foo

    +
    bar
    +
    +
  • +
+```````````````````````````````` + + +And in this case it is 11 spaces: + +```````````````````````````````` example + 10. foo + + bar +. +
    +
  1. +

    foo

    +
    bar
    +
    +
  2. +
+```````````````````````````````` + + +If the *first* block in the list item is an indented code block, +then by rule #2, the contents must be preceded by *one* space of indentation +after the list marker: + +```````````````````````````````` example + indented code + +paragraph + + more code +. +
indented code
+
+

paragraph

+
more code
+
+```````````````````````````````` + + +```````````````````````````````` example +1. indented code + + paragraph + + more code +. +
    +
  1. +
    indented code
    +
    +

    paragraph

    +
    more code
    +
    +
  2. +
+```````````````````````````````` + + +Note that an additional space of indentation is interpreted as space +inside the code block: + +```````````````````````````````` example +1. indented code + + paragraph + + more code +. +
    +
  1. +
     indented code
    +
    +

    paragraph

    +
    more code
    +
    +
  2. +
+```````````````````````````````` + + +Note that rules #1 and #2 only apply to two cases: (a) cases +in which the lines to be included in a list item begin with a +character other than a space or tab, and (b) cases in which +they begin with an indented code +block. In a case like the following, where the first block begins with +three spaces of indentation, the rules do not allow us to form a list item by +indenting the whole thing and prepending a list marker: + +```````````````````````````````` example + foo + +bar +. +

foo

+

bar

+```````````````````````````````` + + +```````````````````````````````` example +- foo + + bar +. +
    +
  • foo
  • +
+

bar

+```````````````````````````````` + + +This is not a significant restriction, because when a block is preceded by up to +three spaces of indentation, the indentation can always be removed without +a change in interpretation, allowing rule #1 to be applied. So, in +the above case: + +```````````````````````````````` example +- foo + + bar +. +
    +
  • +

    foo

    +

    bar

    +
  • +
+```````````````````````````````` + + +3. **Item starting with a blank line.** If a sequence of lines *Ls* + starting with a single [blank line] constitute a (possibly empty) + sequence of blocks *Bs*, and *M* is a list marker of width *W*, + then the result of prepending *M* to the first line of *Ls*, and + preceding subsequent lines of *Ls* by *W + 1* spaces of indentation, is a + list item with *Bs* as its contents. + If a line is empty, then it need not be indented. The type of the + list item (bullet or ordered) is determined by the type of its list + marker. If the list item is ordered, then it is also assigned a + start number, based on the ordered list marker. + +Here are some list items that start with a blank line but are not empty: + +```````````````````````````````` example +- + foo +- + ``` + bar + ``` +- + baz +. +
    +
  • foo
  • +
  • +
    bar
    +
    +
  • +
  • +
    baz
    +
    +
  • +
+```````````````````````````````` + +When the list item starts with a blank line, the number of spaces +following the list marker doesn't change the required indentation: + +```````````````````````````````` example +- + foo +. +
    +
  • foo
  • +
+```````````````````````````````` + + +A list item can begin with at most one blank line. +In the following example, `foo` is not part of the list +item: + +```````````````````````````````` example +- + + foo +. +
    +
  • +
+

foo

+```````````````````````````````` + + +Here is an empty bullet list item: + +```````````````````````````````` example +- foo +- +- bar +. +
    +
  • foo
  • +
  • +
  • bar
  • +
+```````````````````````````````` + + +It does not matter whether there are spaces or tabs following the [list marker]: + +```````````````````````````````` example +- foo +- +- bar +. +
    +
  • foo
  • +
  • +
  • bar
  • +
+```````````````````````````````` + + +Here is an empty ordered list item: + +```````````````````````````````` example +1. foo +2. +3. bar +. +
    +
  1. foo
  2. +
  3. +
  4. bar
  5. +
+```````````````````````````````` + + +A list may start or end with an empty list item: + +```````````````````````````````` example +* +. +
    +
  • +
+```````````````````````````````` + +However, an empty list item cannot interrupt a paragraph: + +```````````````````````````````` example +foo +* + +foo +1. +. +

foo +*

+

foo +1.

+```````````````````````````````` + + +4. **Indentation.** If a sequence of lines *Ls* constitutes a list item + according to rule #1, #2, or #3, then the result of preceding each line + of *Ls* by up to three spaces of indentation (the same for each line) also + constitutes a list item with the same contents and attributes. If a line is + empty, then it need not be indented. + +Indented one space: + +```````````````````````````````` example + 1. A paragraph + with two lines. + + indented code + + > A block quote. +. +
    +
  1. +

    A paragraph +with two lines.

    +
    indented code
    +
    +
    +

    A block quote.

    +
    +
  2. +
+```````````````````````````````` + + +Indented two spaces: + +```````````````````````````````` example + 1. A paragraph + with two lines. + + indented code + + > A block quote. +. +
    +
  1. +

    A paragraph +with two lines.

    +
    indented code
    +
    +
    +

    A block quote.

    +
    +
  2. +
+```````````````````````````````` + + +Indented three spaces: + +```````````````````````````````` example + 1. A paragraph + with two lines. + + indented code + + > A block quote. +. +
    +
  1. +

    A paragraph +with two lines.

    +
    indented code
    +
    +
    +

    A block quote.

    +
    +
  2. +
+```````````````````````````````` + + +Four spaces indent gives a code block: + +```````````````````````````````` example + 1. A paragraph + with two lines. + + indented code + + > A block quote. +. +
1.  A paragraph
+    with two lines.
+
+        indented code
+
+    > A block quote.
+
+```````````````````````````````` + + + +5. **Laziness.** If a string of lines *Ls* constitute a [list + item](#list-items) with contents *Bs*, then the result of deleting + some or all of the indentation from one or more lines in which the + next character other than a space or tab after the indentation is + [paragraph continuation text] is a + list item with the same contents and attributes. The unindented + lines are called + [lazy continuation line](@)s. + +Here is an example with [lazy continuation lines]: + +```````````````````````````````` example + 1. A paragraph +with two lines. + + indented code + + > A block quote. +. +
    +
  1. +

    A paragraph +with two lines.

    +
    indented code
    +
    +
    +

    A block quote.

    +
    +
  2. +
+```````````````````````````````` + + +Indentation can be partially deleted: + +```````````````````````````````` example + 1. A paragraph + with two lines. +. +
    +
  1. A paragraph +with two lines.
  2. +
+```````````````````````````````` + + +These examples show how laziness can work in nested structures: + +```````````````````````````````` example +> 1. > Blockquote +continued here. +. +
+
    +
  1. +
    +

    Blockquote +continued here.

    +
    +
  2. +
+
+```````````````````````````````` + + +```````````````````````````````` example +> 1. > Blockquote +> continued here. +. +
+
    +
  1. +
    +

    Blockquote +continued here.

    +
    +
  2. +
+
+```````````````````````````````` + + + +6. **That's all.** Nothing that is not counted as a list item by rules + #1--5 counts as a [list item](#list-items). + +The rules for sublists follow from the general rules +[above][List items]. A sublist must be indented the same number +of spaces of indentation a paragraph would need to be in order to be included +in the list item. + +So, in this case we need two spaces indent: + +```````````````````````````````` example +- foo + - bar + - baz + - boo +. +
    +
  • foo +
      +
    • bar +
        +
      • baz +
          +
        • boo
        • +
        +
      • +
      +
    • +
    +
  • +
+```````````````````````````````` + + +One is not enough: + +```````````````````````````````` example +- foo + - bar + - baz + - boo +. +
    +
  • foo
  • +
  • bar
  • +
  • baz
  • +
  • boo
  • +
+```````````````````````````````` + + +Here we need four, because the list marker is wider: + +```````````````````````````````` example +10) foo + - bar +. +
    +
  1. foo +
      +
    • bar
    • +
    +
  2. +
+```````````````````````````````` + + +Three is not enough: + +```````````````````````````````` example +10) foo + - bar +. +
    +
  1. foo
  2. +
+
    +
  • bar
  • +
+```````````````````````````````` + + +A list may be the first block in a list item: + +```````````````````````````````` example +- - foo +. +
    +
  • +
      +
    • foo
    • +
    +
  • +
+```````````````````````````````` + + +```````````````````````````````` example +1. - 2. foo +. +
    +
  1. +
      +
    • +
        +
      1. foo
      2. +
      +
    • +
    +
  2. +
+```````````````````````````````` + + +A list item can contain a heading: + +```````````````````````````````` example +- # Foo +- Bar + --- + baz +. +
    +
  • +

    Foo

    +
  • +
  • +

    Bar

    +baz
  • +
+```````````````````````````````` + + +### Motivation + +John Gruber's Markdown spec says the following about list items: + +1. "List markers typically start at the left margin, but may be indented + by up to three spaces. List markers must be followed by one or more + spaces or a tab." + +2. "To make lists look nice, you can wrap items with hanging indents.... + But if you don't want to, you don't have to." + +3. "List items may consist of multiple paragraphs. Each subsequent + paragraph in a list item must be indented by either 4 spaces or one + tab." + +4. "It looks nice if you indent every line of the subsequent paragraphs, + but here again, Markdown will allow you to be lazy." + +5. "To put a blockquote within a list item, the blockquote's `>` + delimiters need to be indented." + +6. "To put a code block within a list item, the code block needs to be + indented twice — 8 spaces or two tabs." + +These rules specify that a paragraph under a list item must be indented +four spaces (presumably, from the left margin, rather than the start of +the list marker, but this is not said), and that code under a list item +must be indented eight spaces instead of the usual four. They also say +that a block quote must be indented, but not by how much; however, the +example given has four spaces indentation. Although nothing is said +about other kinds of block-level content, it is certainly reasonable to +infer that *all* block elements under a list item, including other +lists, must be indented four spaces. This principle has been called the +*four-space rule*. + +The four-space rule is clear and principled, and if the reference +implementation `Markdown.pl` had followed it, it probably would have +become the standard. However, `Markdown.pl` allowed paragraphs and +sublists to start with only two spaces indentation, at least on the +outer level. Worse, its behavior was inconsistent: a sublist of an +outer-level list needed two spaces indentation, but a sublist of this +sublist needed three spaces. It is not surprising, then, that different +implementations of Markdown have developed very different rules for +determining what comes under a list item. (Pandoc and python-Markdown, +for example, stuck with Gruber's syntax description and the four-space +rule, while discount, redcarpet, marked, PHP Markdown, and others +followed `Markdown.pl`'s behavior more closely.) + +Unfortunately, given the divergences between implementations, there +is no way to give a spec for list items that will be guaranteed not +to break any existing documents. However, the spec given here should +correctly handle lists formatted with either the four-space rule or +the more forgiving `Markdown.pl` behavior, provided they are laid out +in a way that is natural for a human to read. + +The strategy here is to let the width and indentation of the list marker +determine the indentation necessary for blocks to fall under the list +item, rather than having a fixed and arbitrary number. The writer can +think of the body of the list item as a unit which gets indented to the +right enough to fit the list marker (and any indentation on the list +marker). (The laziness rule, #5, then allows continuation lines to be +unindented if needed.) + +This rule is superior, we claim, to any rule requiring a fixed level of +indentation from the margin. The four-space rule is clear but +unnatural. It is quite unintuitive that + +``` markdown +- foo + + bar + + - baz +``` + +should be parsed as two lists with an intervening paragraph, + +``` html +
    +
  • foo
  • +
+

bar

+
    +
  • baz
  • +
+``` + +as the four-space rule demands, rather than a single list, + +``` html +
    +
  • +

    foo

    +

    bar

    +
      +
    • baz
    • +
    +
  • +
+``` + +The choice of four spaces is arbitrary. It can be learned, but it is +not likely to be guessed, and it trips up beginners regularly. + +Would it help to adopt a two-space rule? The problem is that such +a rule, together with the rule allowing up to three spaces of indentation for +the initial list marker, allows text that is indented *less than* the +original list marker to be included in the list item. For example, +`Markdown.pl` parses + +``` markdown + - one + + two +``` + +as a single list item, with `two` a continuation paragraph: + +``` html +
    +
  • +

    one

    +

    two

    +
  • +
+``` + +and similarly + +``` markdown +> - one +> +> two +``` + +as + +``` html +
+
    +
  • +

    one

    +

    two

    +
  • +
+
+``` + +This is extremely unintuitive. + +Rather than requiring a fixed indent from the margin, we could require +a fixed indent (say, two spaces, or even one space) from the list marker (which +may itself be indented). This proposal would remove the last anomaly +discussed. Unlike the spec presented above, it would count the following +as a list item with a subparagraph, even though the paragraph `bar` +is not indented as far as the first paragraph `foo`: + +``` markdown + 10. foo + + bar +``` + +Arguably this text does read like a list item with `bar` as a subparagraph, +which may count in favor of the proposal. However, on this proposal indented +code would have to be indented six spaces after the list marker. And this +would break a lot of existing Markdown, which has the pattern: + +``` markdown +1. foo + + indented code +``` + +where the code is indented eight spaces. The spec above, by contrast, will +parse this text as expected, since the code block's indentation is measured +from the beginning of `foo`. + +The one case that needs special treatment is a list item that *starts* +with indented code. How much indentation is required in that case, since +we don't have a "first paragraph" to measure from? Rule #2 simply stipulates +that in such cases, we require one space indentation from the list marker +(and then the normal four spaces for the indented code). This will match the +four-space rule in cases where the list marker plus its initial indentation +takes four spaces (a common case), but diverge in other cases. + +## Lists + +A [list](@) is a sequence of one or more +list items [of the same type]. The list items +may be separated by any number of blank lines. + +Two list items are [of the same type](@) +if they begin with a [list marker] of the same type. +Two list markers are of the +same type if (a) they are bullet list markers using the same character +(`-`, `+`, or `*`) or (b) they are ordered list numbers with the same +delimiter (either `.` or `)`). + +A list is an [ordered list](@) +if its constituent list items begin with +[ordered list markers], and a +[bullet list](@) if its constituent list +items begin with [bullet list markers]. + +The [start number](@) +of an [ordered list] is determined by the list number of +its initial list item. The numbers of subsequent list items are +disregarded. + +A list is [loose](@) if any of its constituent +list items are separated by blank lines, or if any of its constituent +list items directly contain two block-level elements with a blank line +between them. Otherwise a list is [tight](@). +(The difference in HTML output is that paragraphs in a loose list are +wrapped in `

` tags, while paragraphs in a tight list are not.) + +Changing the bullet or ordered list delimiter starts a new list: + +```````````````````````````````` example +- foo +- bar ++ baz +. +

    +
  • foo
  • +
  • bar
  • +
+
    +
  • baz
  • +
+```````````````````````````````` + + +```````````````````````````````` example +1. foo +2. bar +3) baz +. +
    +
  1. foo
  2. +
  3. bar
  4. +
+
    +
  1. baz
  2. +
+```````````````````````````````` + + +In CommonMark, a list can interrupt a paragraph. That is, +no blank line is needed to separate a paragraph from a following +list: + +```````````````````````````````` example +Foo +- bar +- baz +. +

Foo

+
    +
  • bar
  • +
  • baz
  • +
+```````````````````````````````` + +`Markdown.pl` does not allow this, through fear of triggering a list +via a numeral in a hard-wrapped line: + +``` markdown +The number of windows in my house is +14. The number of doors is 6. +``` + +Oddly, though, `Markdown.pl` *does* allow a blockquote to +interrupt a paragraph, even though the same considerations might +apply. + +In CommonMark, we do allow lists to interrupt paragraphs, for +two reasons. First, it is natural and not uncommon for people +to start lists without blank lines: + +``` markdown +I need to buy +- new shoes +- a coat +- a plane ticket +``` + +Second, we are attracted to a + +> [principle of uniformity](@): +> if a chunk of text has a certain +> meaning, it will continue to have the same meaning when put into a +> container block (such as a list item or blockquote). + +(Indeed, the spec for [list items] and [block quotes] presupposes +this principle.) This principle implies that if + +``` markdown + * I need to buy + - new shoes + - a coat + - a plane ticket +``` + +is a list item containing a paragraph followed by a nested sublist, +as all Markdown implementations agree it is (though the paragraph +may be rendered without `

` tags, since the list is "tight"), +then + +``` markdown +I need to buy +- new shoes +- a coat +- a plane ticket +``` + +by itself should be a paragraph followed by a nested sublist. + +Since it is well established Markdown practice to allow lists to +interrupt paragraphs inside list items, the [principle of +uniformity] requires us to allow this outside list items as +well. ([reStructuredText](https://docutils.sourceforge.net/rst.html) +takes a different approach, requiring blank lines before lists +even inside other list items.) + +In order to solve the problem of unwanted lists in paragraphs with +hard-wrapped numerals, we allow only lists starting with `1` to +interrupt paragraphs. Thus, + +```````````````````````````````` example +The number of windows in my house is +14. The number of doors is 6. +. +

The number of windows in my house is +14. The number of doors is 6.

+```````````````````````````````` + +We may still get an unintended result in cases like + +```````````````````````````````` example +The number of windows in my house is +1. The number of doors is 6. +. +

The number of windows in my house is

+
    +
  1. The number of doors is 6.
  2. +
+```````````````````````````````` + +but this rule should prevent most spurious list captures. + +There can be any number of blank lines between items: + +```````````````````````````````` example +- foo + +- bar + + +- baz +. +
    +
  • +

    foo

    +
  • +
  • +

    bar

    +
  • +
  • +

    baz

    +
  • +
+```````````````````````````````` + +```````````````````````````````` example +- foo + - bar + - baz + + + bim +. +
    +
  • foo +
      +
    • bar +
        +
      • +

        baz

        +

        bim

        +
      • +
      +
    • +
    +
  • +
+```````````````````````````````` + + +To separate consecutive lists of the same type, or to separate a +list from an indented code block that would otherwise be parsed +as a subparagraph of the final list item, you can insert a blank HTML +comment: + +```````````````````````````````` example +- foo +- bar + + + +- baz +- bim +. +
    +
  • foo
  • +
  • bar
  • +
+ +
    +
  • baz
  • +
  • bim
  • +
+```````````````````````````````` + + +```````````````````````````````` example +- foo + + notcode + +- foo + + + + code +. +
    +
  • +

    foo

    +

    notcode

    +
  • +
  • +

    foo

    +
  • +
+ +
code
+
+```````````````````````````````` + + +List items need not be indented to the same level. The following +list items will be treated as items at the same list level, +since none is indented enough to belong to the previous list +item: + +```````````````````````````````` example +- a + - b + - c + - d + - e + - f +- g +. +
    +
  • a
  • +
  • b
  • +
  • c
  • +
  • d
  • +
  • e
  • +
  • f
  • +
  • g
  • +
+```````````````````````````````` + + +```````````````````````````````` example +1. a + + 2. b + + 3. c +. +
    +
  1. +

    a

    +
  2. +
  3. +

    b

    +
  4. +
  5. +

    c

    +
  6. +
+```````````````````````````````` + +Note, however, that list items may not be preceded by more than +three spaces of indentation. Here `- e` is treated as a paragraph continuation +line, because it is indented more than three spaces: + +```````````````````````````````` example +- a + - b + - c + - d + - e +. +
    +
  • a
  • +
  • b
  • +
  • c
  • +
  • d +- e
  • +
+```````````````````````````````` + +And here, `3. c` is treated as in indented code block, +because it is indented four spaces and preceded by a +blank line. + +```````````````````````````````` example +1. a + + 2. b + + 3. c +. +
    +
  1. +

    a

    +
  2. +
  3. +

    b

    +
  4. +
+
3. c
+
+```````````````````````````````` + + +This is a loose list, because there is a blank line between +two of the list items: + +```````````````````````````````` example +- a +- b + +- c +. +
    +
  • +

    a

    +
  • +
  • +

    b

    +
  • +
  • +

    c

    +
  • +
+```````````````````````````````` + + +So is this, with a empty second item: + +```````````````````````````````` example +* a +* + +* c +. +
    +
  • +

    a

    +
  • +
  • +
  • +

    c

    +
  • +
+```````````````````````````````` + + +These are loose lists, even though there are no blank lines between the items, +because one of the items directly contains two block-level elements +with a blank line between them: + +```````````````````````````````` example +- a +- b + + c +- d +. +
    +
  • +

    a

    +
  • +
  • +

    b

    +

    c

    +
  • +
  • +

    d

    +
  • +
+```````````````````````````````` + + +```````````````````````````````` example +- a +- b + + [ref]: /url +- d +. +
    +
  • +

    a

    +
  • +
  • +

    b

    +
  • +
  • +

    d

    +
  • +
+```````````````````````````````` + + +This is a tight list, because the blank lines are in a code block: + +```````````````````````````````` example +- a +- ``` + b + + + ``` +- c +. +
    +
  • a
  • +
  • +
    b
    +
    +
    +
    +
  • +
  • c
  • +
+```````````````````````````````` + + +This is a tight list, because the blank line is between two +paragraphs of a sublist. So the sublist is loose while +the outer list is tight: + +```````````````````````````````` example +- a + - b + + c +- d +. +
    +
  • a +
      +
    • +

      b

      +

      c

      +
    • +
    +
  • +
  • d
  • +
+```````````````````````````````` + + +This is a tight list, because the blank line is inside the +block quote: + +```````````````````````````````` example +* a + > b + > +* c +. +
    +
  • a +
    +

    b

    +
    +
  • +
  • c
  • +
+```````````````````````````````` + + +This list is tight, because the consecutive block elements +are not separated by blank lines: + +```````````````````````````````` example +- a + > b + ``` + c + ``` +- d +. +
    +
  • a +
    +

    b

    +
    +
    c
    +
    +
  • +
  • d
  • +
+```````````````````````````````` + + +A single-paragraph list is tight: + +```````````````````````````````` example +- a +. +
    +
  • a
  • +
+```````````````````````````````` + + +```````````````````````````````` example +- a + - b +. +
    +
  • a +
      +
    • b
    • +
    +
  • +
+```````````````````````````````` + + +This list is loose, because of the blank line between the +two block elements in the list item: + +```````````````````````````````` example +1. ``` + foo + ``` + + bar +. +
    +
  1. +
    foo
    +
    +

    bar

    +
  2. +
+```````````````````````````````` + + +Here the outer list is loose, the inner list tight: + +```````````````````````````````` example +* foo + * bar + + baz +. +
    +
  • +

    foo

    +
      +
    • bar
    • +
    +

    baz

    +
  • +
+```````````````````````````````` + + +```````````````````````````````` example +- a + - b + - c + +- d + - e + - f +. +
    +
  • +

    a

    +
      +
    • b
    • +
    • c
    • +
    +
  • +
  • +

    d

    +
      +
    • e
    • +
    • f
    • +
    +
  • +
+```````````````````````````````` + + +# Inlines + +Inlines are parsed sequentially from the beginning of the character +stream to the end (left to right, in left-to-right languages). +Thus, for example, in + +```````````````````````````````` example +`hi`lo` +. +

hilo`

+```````````````````````````````` + +`hi` is parsed as code, leaving the backtick at the end as a literal +backtick. + + + +## Code spans + +A [backtick string](@) +is a string of one or more backtick characters (`` ` ``) that is neither +preceded nor followed by a backtick. + +A [code span](@) begins with a backtick string and ends with +a backtick string of equal length. The contents of the code span are +the characters between these two backtick strings, normalized in the +following ways: + +- First, [line endings] are converted to [spaces]. +- If the resulting string both begins *and* ends with a [space] + character, but does not consist entirely of [space] + characters, a single [space] character is removed from the + front and back. This allows you to include code that begins + or ends with backtick characters, which must be separated by + whitespace from the opening or closing backtick strings. + +This is a simple code span: + +```````````````````````````````` example +`foo` +. +

foo

+```````````````````````````````` + + +Here two backticks are used, because the code contains a backtick. +This example also illustrates stripping of a single leading and +trailing space: + +```````````````````````````````` example +`` foo ` bar `` +. +

foo ` bar

+```````````````````````````````` + + +This example shows the motivation for stripping leading and trailing +spaces: + +```````````````````````````````` example +` `` ` +. +

``

+```````````````````````````````` + +Note that only *one* space is stripped: + +```````````````````````````````` example +` `` ` +. +

``

+```````````````````````````````` + +The stripping only happens if the space is on both +sides of the string: + +```````````````````````````````` example +` a` +. +

a

+```````````````````````````````` + +Only [spaces], and not [unicode whitespace] in general, are +stripped in this way: + +```````````````````````````````` example +` b ` +. +

 b 

+```````````````````````````````` + +No stripping occurs if the code span contains only spaces: + +```````````````````````````````` example +` ` +` ` +. +

  +

+```````````````````````````````` + + +[Line endings] are treated like spaces: + +```````````````````````````````` example +`` +foo +bar +baz +`` +. +

foo bar baz

+```````````````````````````````` + +```````````````````````````````` example +`` +foo +`` +. +

foo

+```````````````````````````````` + + +Interior spaces are not collapsed: + +```````````````````````````````` example +`foo bar +baz` +. +

foo bar baz

+```````````````````````````````` + +Note that browsers will typically collapse consecutive spaces +when rendering `` elements, so it is recommended that +the following CSS be used: + + code{white-space: pre-wrap;} + + +Note that backslash escapes do not work in code spans. All backslashes +are treated literally: + +```````````````````````````````` example +`foo\`bar` +. +

foo\bar`

+```````````````````````````````` + + +Backslash escapes are never needed, because one can always choose a +string of *n* backtick characters as delimiters, where the code does +not contain any strings of exactly *n* backtick characters. + +```````````````````````````````` example +``foo`bar`` +. +

foo`bar

+```````````````````````````````` + +```````````````````````````````` example +` foo `` bar ` +. +

foo `` bar

+```````````````````````````````` + + +Code span backticks have higher precedence than any other inline +constructs except HTML tags and autolinks. Thus, for example, this is +not parsed as emphasized text, since the second `*` is part of a code +span: + +```````````````````````````````` example +*foo`*` +. +

*foo*

+```````````````````````````````` + + +And this is not parsed as a link: + +```````````````````````````````` example +[not a `link](/foo`) +. +

[not a link](/foo)

+```````````````````````````````` + + +Code spans, HTML tags, and autolinks have the same precedence. +Thus, this is code: + +```````````````````````````````` example +`` +. +

<a href="">`

+```````````````````````````````` + + +But this is an HTML tag: + +```````````````````````````````` example +
` +. +

`

+```````````````````````````````` + + +And this is code: + +```````````````````````````````` example +`` +. +

<https://foo.bar.baz>`

+```````````````````````````````` + + +But this is an autolink: + +```````````````````````````````` example +` +. +

https://foo.bar.`baz`

+```````````````````````````````` + + +When a backtick string is not closed by a matching backtick string, +we just have literal backticks: + +```````````````````````````````` example +```foo`` +. +

```foo``

+```````````````````````````````` + + +```````````````````````````````` example +`foo +. +

`foo

+```````````````````````````````` + +The following case also illustrates the need for opening and +closing backtick strings to be equal in length: + +```````````````````````````````` example +`foo``bar`` +. +

`foobar

+```````````````````````````````` + + +## Emphasis and strong emphasis + +John Gruber's original [Markdown syntax +description](https://daringfireball.net/projects/markdown/syntax#em) says: + +> Markdown treats asterisks (`*`) and underscores (`_`) as indicators of +> emphasis. Text wrapped with one `*` or `_` will be wrapped with an HTML +> `` tag; double `*`'s or `_`'s will be wrapped with an HTML `` +> tag. + +This is enough for most users, but these rules leave much undecided, +especially when it comes to nested emphasis. The original +`Markdown.pl` test suite makes it clear that triple `***` and +`___` delimiters can be used for strong emphasis, and most +implementations have also allowed the following patterns: + +``` markdown +***strong emph*** +***strong** in emph* +***emph* in strong** +**in strong *emph*** +*in emph **strong*** +``` + +The following patterns are less widely supported, but the intent +is clear and they are useful (especially in contexts like bibliography +entries): + +``` markdown +*emph *with emph* in it* +**strong **with strong** in it** +``` + +Many implementations have also restricted intraword emphasis to +the `*` forms, to avoid unwanted emphasis in words containing +internal underscores. (It is best practice to put these in code +spans, but users often do not.) + +``` markdown +internal emphasis: foo*bar*baz +no emphasis: foo_bar_baz +``` + +The rules given below capture all of these patterns, while allowing +for efficient parsing strategies that do not backtrack. + +First, some definitions. A [delimiter run](@) is either +a sequence of one or more `*` characters that is not preceded or +followed by a non-backslash-escaped `*` character, or a sequence +of one or more `_` characters that is not preceded or followed by +a non-backslash-escaped `_` character. + +A [left-flanking delimiter run](@) is +a [delimiter run] that is (1) not followed by [Unicode whitespace], +and either (2a) not followed by a [Unicode punctuation character], or +(2b) followed by a [Unicode punctuation character] and +preceded by [Unicode whitespace] or a [Unicode punctuation character]. +For purposes of this definition, the beginning and the end of +the line count as Unicode whitespace. + +A [right-flanking delimiter run](@) is +a [delimiter run] that is (1) not preceded by [Unicode whitespace], +and either (2a) not preceded by a [Unicode punctuation character], or +(2b) preceded by a [Unicode punctuation character] and +followed by [Unicode whitespace] or a [Unicode punctuation character]. +For purposes of this definition, the beginning and the end of +the line count as Unicode whitespace. + +Here are some examples of delimiter runs. + + - left-flanking but not right-flanking: + + ``` + ***abc + _abc + **"abc" + _"abc" + ``` + + - right-flanking but not left-flanking: + + ``` + abc*** + abc_ + "abc"** + "abc"_ + ``` + + - Both left and right-flanking: + + ``` + abc***def + "abc"_"def" + ``` + + - Neither left nor right-flanking: + + ``` + abc *** def + a _ b + ``` + +(The idea of distinguishing left-flanking and right-flanking +delimiter runs based on the character before and the character +after comes from Roopesh Chander's +[vfmd](https://web.archive.org/web/20220608143320/http://www.vfmd.org/vfmd-spec/specification/#procedure-for-identifying-emphasis-tags). +vfmd uses the terminology "emphasis indicator string" instead of "delimiter +run," and its rules for distinguishing left- and right-flanking runs +are a bit more complex than the ones given here.) + +The following rules define emphasis and strong emphasis: + +1. A single `*` character [can open emphasis](@) + iff (if and only if) it is part of a [left-flanking delimiter run]. + +2. A single `_` character [can open emphasis] iff + it is part of a [left-flanking delimiter run] + and either (a) not part of a [right-flanking delimiter run] + or (b) part of a [right-flanking delimiter run] + preceded by a [Unicode punctuation character]. + +3. A single `*` character [can close emphasis](@) + iff it is part of a [right-flanking delimiter run]. + +4. A single `_` character [can close emphasis] iff + it is part of a [right-flanking delimiter run] + and either (a) not part of a [left-flanking delimiter run] + or (b) part of a [left-flanking delimiter run] + followed by a [Unicode punctuation character]. + +5. A double `**` [can open strong emphasis](@) + iff it is part of a [left-flanking delimiter run]. + +6. A double `__` [can open strong emphasis] iff + it is part of a [left-flanking delimiter run] + and either (a) not part of a [right-flanking delimiter run] + or (b) part of a [right-flanking delimiter run] + preceded by a [Unicode punctuation character]. + +7. A double `**` [can close strong emphasis](@) + iff it is part of a [right-flanking delimiter run]. + +8. A double `__` [can close strong emphasis] iff + it is part of a [right-flanking delimiter run] + and either (a) not part of a [left-flanking delimiter run] + or (b) part of a [left-flanking delimiter run] + followed by a [Unicode punctuation character]. + +9. Emphasis begins with a delimiter that [can open emphasis] and ends + with a delimiter that [can close emphasis], and that uses the same + character (`_` or `*`) as the opening delimiter. The + opening and closing delimiters must belong to separate + [delimiter runs]. If one of the delimiters can both + open and close emphasis, then the sum of the lengths of the + delimiter runs containing the opening and closing delimiters + must not be a multiple of 3 unless both lengths are + multiples of 3. + +10. Strong emphasis begins with a delimiter that + [can open strong emphasis] and ends with a delimiter that + [can close strong emphasis], and that uses the same character + (`_` or `*`) as the opening delimiter. The + opening and closing delimiters must belong to separate + [delimiter runs]. If one of the delimiters can both open + and close strong emphasis, then the sum of the lengths of + the delimiter runs containing the opening and closing + delimiters must not be a multiple of 3 unless both lengths + are multiples of 3. + +11. A literal `*` character cannot occur at the beginning or end of + `*`-delimited emphasis or `**`-delimited strong emphasis, unless it + is backslash-escaped. + +12. A literal `_` character cannot occur at the beginning or end of + `_`-delimited emphasis or `__`-delimited strong emphasis, unless it + is backslash-escaped. + +Where rules 1--12 above are compatible with multiple parsings, +the following principles resolve ambiguity: + +13. The number of nestings should be minimized. Thus, for example, + an interpretation `...` is always preferred to + `...`. + +14. An interpretation `...` is always + preferred to `...`. + +15. When two potential emphasis or strong emphasis spans overlap, + so that the second begins before the first ends and ends after + the first ends, the first takes precedence. Thus, for example, + `*foo _bar* baz_` is parsed as `foo _bar baz_` rather + than `*foo bar* baz`. + +16. When there are two potential emphasis or strong emphasis spans + with the same closing delimiter, the shorter one (the one that + opens later) takes precedence. Thus, for example, + `**foo **bar baz**` is parsed as `**foo bar baz` + rather than `foo **bar baz`. + +17. Inline code spans, links, images, and HTML tags group more tightly + than emphasis. So, when there is a choice between an interpretation + that contains one of these elements and one that does not, the + former always wins. Thus, for example, `*[foo*](bar)` is + parsed as `*foo*` rather than as + `[foo](bar)`. + +These rules can be illustrated through a series of examples. + +Rule 1: + +```````````````````````````````` example +*foo bar* +. +

foo bar

+```````````````````````````````` + + +This is not emphasis, because the opening `*` is followed by +whitespace, and hence not part of a [left-flanking delimiter run]: + +```````````````````````````````` example +a * foo bar* +. +

a * foo bar*

+```````````````````````````````` + + +This is not emphasis, because the opening `*` is preceded +by an alphanumeric and followed by punctuation, and hence +not part of a [left-flanking delimiter run]: + +```````````````````````````````` example +a*"foo"* +. +

a*"foo"*

+```````````````````````````````` + + +Unicode nonbreaking spaces count as whitespace, too: + +```````````````````````````````` example +* a * +. +

* a *

+```````````````````````````````` + + +Unicode symbols count as punctuation, too: + +```````````````````````````````` example +*$*alpha. + +*£*bravo. + +*€*charlie. +. +

*$*alpha.

+

*£*bravo.

+

*€*charlie.

+```````````````````````````````` + + +Intraword emphasis with `*` is permitted: + +```````````````````````````````` example +foo*bar* +. +

foobar

+```````````````````````````````` + + +```````````````````````````````` example +5*6*78 +. +

5678

+```````````````````````````````` + + +Rule 2: + +```````````````````````````````` example +_foo bar_ +. +

foo bar

+```````````````````````````````` + + +This is not emphasis, because the opening `_` is followed by +whitespace: + +```````````````````````````````` example +_ foo bar_ +. +

_ foo bar_

+```````````````````````````````` + + +This is not emphasis, because the opening `_` is preceded +by an alphanumeric and followed by punctuation: + +```````````````````````````````` example +a_"foo"_ +. +

a_"foo"_

+```````````````````````````````` + + +Emphasis with `_` is not allowed inside words: + +```````````````````````````````` example +foo_bar_ +. +

foo_bar_

+```````````````````````````````` + + +```````````````````````````````` example +5_6_78 +. +

5_6_78

+```````````````````````````````` + + +```````````````````````````````` example +пристаням_стремятся_ +. +

пристаням_стремятся_

+```````````````````````````````` + + +Here `_` does not generate emphasis, because the first delimiter run +is right-flanking and the second left-flanking: + +```````````````````````````````` example +aa_"bb"_cc +. +

aa_"bb"_cc

+```````````````````````````````` + + +This is emphasis, even though the opening delimiter is +both left- and right-flanking, because it is preceded by +punctuation: + +```````````````````````````````` example +foo-_(bar)_ +. +

foo-(bar)

+```````````````````````````````` + + +Rule 3: + +This is not emphasis, because the closing delimiter does +not match the opening delimiter: + +```````````````````````````````` example +_foo* +. +

_foo*

+```````````````````````````````` + + +This is not emphasis, because the closing `*` is preceded by +whitespace: + +```````````````````````````````` example +*foo bar * +. +

*foo bar *

+```````````````````````````````` + + +A line ending also counts as whitespace: + +```````````````````````````````` example +*foo bar +* +. +

*foo bar +*

+```````````````````````````````` + + +This is not emphasis, because the second `*` is +preceded by punctuation and followed by an alphanumeric +(hence it is not part of a [right-flanking delimiter run]: + +```````````````````````````````` example +*(*foo) +. +

*(*foo)

+```````````````````````````````` + + +The point of this restriction is more easily appreciated +with this example: + +```````````````````````````````` example +*(*foo*)* +. +

(foo)

+```````````````````````````````` + + +Intraword emphasis with `*` is allowed: + +```````````````````````````````` example +*foo*bar +. +

foobar

+```````````````````````````````` + + + +Rule 4: + +This is not emphasis, because the closing `_` is preceded by +whitespace: + +```````````````````````````````` example +_foo bar _ +. +

_foo bar _

+```````````````````````````````` + + +This is not emphasis, because the second `_` is +preceded by punctuation and followed by an alphanumeric: + +```````````````````````````````` example +_(_foo) +. +

_(_foo)

+```````````````````````````````` + + +This is emphasis within emphasis: + +```````````````````````````````` example +_(_foo_)_ +. +

(foo)

+```````````````````````````````` + + +Intraword emphasis is disallowed for `_`: + +```````````````````````````````` example +_foo_bar +. +

_foo_bar

+```````````````````````````````` + + +```````````````````````````````` example +_пристаням_стремятся +. +

_пристаням_стремятся

+```````````````````````````````` + + +```````````````````````````````` example +_foo_bar_baz_ +. +

foo_bar_baz

+```````````````````````````````` + + +This is emphasis, even though the closing delimiter is +both left- and right-flanking, because it is followed by +punctuation: + +```````````````````````````````` example +_(bar)_. +. +

(bar).

+```````````````````````````````` + + +Rule 5: + +```````````````````````````````` example +**foo bar** +. +

foo bar

+```````````````````````````````` + + +This is not strong emphasis, because the opening delimiter is +followed by whitespace: + +```````````````````````````````` example +** foo bar** +. +

** foo bar**

+```````````````````````````````` + + +This is not strong emphasis, because the opening `**` is preceded +by an alphanumeric and followed by punctuation, and hence +not part of a [left-flanking delimiter run]: + +```````````````````````````````` example +a**"foo"** +. +

a**"foo"**

+```````````````````````````````` + + +Intraword strong emphasis with `**` is permitted: + +```````````````````````````````` example +foo**bar** +. +

foobar

+```````````````````````````````` + + +Rule 6: + +```````````````````````````````` example +__foo bar__ +. +

foo bar

+```````````````````````````````` + + +This is not strong emphasis, because the opening delimiter is +followed by whitespace: + +```````````````````````````````` example +__ foo bar__ +. +

__ foo bar__

+```````````````````````````````` + + +A line ending counts as whitespace: +```````````````````````````````` example +__ +foo bar__ +. +

__ +foo bar__

+```````````````````````````````` + + +This is not strong emphasis, because the opening `__` is preceded +by an alphanumeric and followed by punctuation: + +```````````````````````````````` example +a__"foo"__ +. +

a__"foo"__

+```````````````````````````````` + + +Intraword strong emphasis is forbidden with `__`: + +```````````````````````````````` example +foo__bar__ +. +

foo__bar__

+```````````````````````````````` + + +```````````````````````````````` example +5__6__78 +. +

5__6__78

+```````````````````````````````` + + +```````````````````````````````` example +пристаням__стремятся__ +. +

пристаням__стремятся__

+```````````````````````````````` + + +```````````````````````````````` example +__foo, __bar__, baz__ +. +

foo, bar, baz

+```````````````````````````````` + + +This is strong emphasis, even though the opening delimiter is +both left- and right-flanking, because it is preceded by +punctuation: + +```````````````````````````````` example +foo-__(bar)__ +. +

foo-(bar)

+```````````````````````````````` + + + +Rule 7: + +This is not strong emphasis, because the closing delimiter is preceded +by whitespace: + +```````````````````````````````` example +**foo bar ** +. +

**foo bar **

+```````````````````````````````` + + +(Nor can it be interpreted as an emphasized `*foo bar *`, because of +Rule 11.) + +This is not strong emphasis, because the second `**` is +preceded by punctuation and followed by an alphanumeric: + +```````````````````````````````` example +**(**foo) +. +

**(**foo)

+```````````````````````````````` + + +The point of this restriction is more easily appreciated +with these examples: + +```````````````````````````````` example +*(**foo**)* +. +

(foo)

+```````````````````````````````` + + +```````````````````````````````` example +**Gomphocarpus (*Gomphocarpus physocarpus*, syn. +*Asclepias physocarpa*)** +. +

Gomphocarpus (Gomphocarpus physocarpus, syn. +Asclepias physocarpa)

+```````````````````````````````` + + +```````````````````````````````` example +**foo "*bar*" foo** +. +

foo "bar" foo

+```````````````````````````````` + + +Intraword emphasis: + +```````````````````````````````` example +**foo**bar +. +

foobar

+```````````````````````````````` + + +Rule 8: + +This is not strong emphasis, because the closing delimiter is +preceded by whitespace: + +```````````````````````````````` example +__foo bar __ +. +

__foo bar __

+```````````````````````````````` + + +This is not strong emphasis, because the second `__` is +preceded by punctuation and followed by an alphanumeric: + +```````````````````````````````` example +__(__foo) +. +

__(__foo)

+```````````````````````````````` + + +The point of this restriction is more easily appreciated +with this example: + +```````````````````````````````` example +_(__foo__)_ +. +

(foo)

+```````````````````````````````` + + +Intraword strong emphasis is forbidden with `__`: + +```````````````````````````````` example +__foo__bar +. +

__foo__bar

+```````````````````````````````` + + +```````````````````````````````` example +__пристаням__стремятся +. +

__пристаням__стремятся

+```````````````````````````````` + + +```````````````````````````````` example +__foo__bar__baz__ +. +

foo__bar__baz

+```````````````````````````````` + + +This is strong emphasis, even though the closing delimiter is +both left- and right-flanking, because it is followed by +punctuation: + +```````````````````````````````` example +__(bar)__. +. +

(bar).

+```````````````````````````````` + + +Rule 9: + +Any nonempty sequence of inline elements can be the contents of an +emphasized span. + +```````````````````````````````` example +*foo [bar](/url)* +. +

foo bar

+```````````````````````````````` + + +```````````````````````````````` example +*foo +bar* +. +

foo +bar

+```````````````````````````````` + + +In particular, emphasis and strong emphasis can be nested +inside emphasis: + +```````````````````````````````` example +_foo __bar__ baz_ +. +

foo bar baz

+```````````````````````````````` + + +```````````````````````````````` example +_foo _bar_ baz_ +. +

foo bar baz

+```````````````````````````````` + + +```````````````````````````````` example +__foo_ bar_ +. +

foo bar

+```````````````````````````````` + + +```````````````````````````````` example +*foo *bar** +. +

foo bar

+```````````````````````````````` + + +```````````````````````````````` example +*foo **bar** baz* +. +

foo bar baz

+```````````````````````````````` + +```````````````````````````````` example +*foo**bar**baz* +. +

foobarbaz

+```````````````````````````````` + +Note that in the preceding case, the interpretation + +``` markdown +

foobarbaz

+``` + + +is precluded by the condition that a delimiter that +can both open and close (like the `*` after `foo`) +cannot form emphasis if the sum of the lengths of +the delimiter runs containing the opening and +closing delimiters is a multiple of 3 unless +both lengths are multiples of 3. + + +For the same reason, we don't get two consecutive +emphasis sections in this example: + +```````````````````````````````` example +*foo**bar* +. +

foo**bar

+```````````````````````````````` + + +The same condition ensures that the following +cases are all strong emphasis nested inside +emphasis, even when the interior whitespace is +omitted: + + +```````````````````````````````` example +***foo** bar* +. +

foo bar

+```````````````````````````````` + + +```````````````````````````````` example +*foo **bar*** +. +

foo bar

+```````````````````````````````` + + +```````````````````````````````` example +*foo**bar*** +. +

foobar

+```````````````````````````````` + + +When the lengths of the interior closing and opening +delimiter runs are *both* multiples of 3, though, +they can match to create emphasis: + +```````````````````````````````` example +foo***bar***baz +. +

foobarbaz

+```````````````````````````````` + +```````````````````````````````` example +foo******bar*********baz +. +

foobar***baz

+```````````````````````````````` + + +Indefinite levels of nesting are possible: + +```````````````````````````````` example +*foo **bar *baz* bim** bop* +. +

foo bar baz bim bop

+```````````````````````````````` + + +```````````````````````````````` example +*foo [*bar*](/url)* +. +

foo bar

+```````````````````````````````` + + +There can be no empty emphasis or strong emphasis: + +```````````````````````````````` example +** is not an empty emphasis +. +

** is not an empty emphasis

+```````````````````````````````` + + +```````````````````````````````` example +**** is not an empty strong emphasis +. +

**** is not an empty strong emphasis

+```````````````````````````````` + + + +Rule 10: + +Any nonempty sequence of inline elements can be the contents of an +strongly emphasized span. + +```````````````````````````````` example +**foo [bar](/url)** +. +

foo bar

+```````````````````````````````` + + +```````````````````````````````` example +**foo +bar** +. +

foo +bar

+```````````````````````````````` + + +In particular, emphasis and strong emphasis can be nested +inside strong emphasis: + +```````````````````````````````` example +__foo _bar_ baz__ +. +

foo bar baz

+```````````````````````````````` + + +```````````````````````````````` example +__foo __bar__ baz__ +. +

foo bar baz

+```````````````````````````````` + + +```````````````````````````````` example +____foo__ bar__ +. +

foo bar

+```````````````````````````````` + + +```````````````````````````````` example +**foo **bar**** +. +

foo bar

+```````````````````````````````` + + +```````````````````````````````` example +**foo *bar* baz** +. +

foo bar baz

+```````````````````````````````` + + +```````````````````````````````` example +**foo*bar*baz** +. +

foobarbaz

+```````````````````````````````` + + +```````````````````````````````` example +***foo* bar** +. +

foo bar

+```````````````````````````````` + + +```````````````````````````````` example +**foo *bar*** +. +

foo bar

+```````````````````````````````` + + +Indefinite levels of nesting are possible: + +```````````````````````````````` example +**foo *bar **baz** +bim* bop** +. +

foo bar baz +bim bop

+```````````````````````````````` + + +```````````````````````````````` example +**foo [*bar*](/url)** +. +

foo bar

+```````````````````````````````` + + +There can be no empty emphasis or strong emphasis: + +```````````````````````````````` example +__ is not an empty emphasis +. +

__ is not an empty emphasis

+```````````````````````````````` + + +```````````````````````````````` example +____ is not an empty strong emphasis +. +

____ is not an empty strong emphasis

+```````````````````````````````` + + + +Rule 11: + +```````````````````````````````` example +foo *** +. +

foo ***

+```````````````````````````````` + + +```````````````````````````````` example +foo *\** +. +

foo *

+```````````````````````````````` + + +```````````````````````````````` example +foo *_* +. +

foo _

+```````````````````````````````` + + +```````````````````````````````` example +foo ***** +. +

foo *****

+```````````````````````````````` + + +```````````````````````````````` example +foo **\*** +. +

foo *

+```````````````````````````````` + + +```````````````````````````````` example +foo **_** +. +

foo _

+```````````````````````````````` + + +Note that when delimiters do not match evenly, Rule 11 determines +that the excess literal `*` characters will appear outside of the +emphasis, rather than inside it: + +```````````````````````````````` example +**foo* +. +

*foo

+```````````````````````````````` + + +```````````````````````````````` example +*foo** +. +

foo*

+```````````````````````````````` + + +```````````````````````````````` example +***foo** +. +

*foo

+```````````````````````````````` + + +```````````````````````````````` example +****foo* +. +

***foo

+```````````````````````````````` + + +```````````````````````````````` example +**foo*** +. +

foo*

+```````````````````````````````` + + +```````````````````````````````` example +*foo**** +. +

foo***

+```````````````````````````````` + + + +Rule 12: + +```````````````````````````````` example +foo ___ +. +

foo ___

+```````````````````````````````` + + +```````````````````````````````` example +foo _\__ +. +

foo _

+```````````````````````````````` + + +```````````````````````````````` example +foo _*_ +. +

foo *

+```````````````````````````````` + + +```````````````````````````````` example +foo _____ +. +

foo _____

+```````````````````````````````` + + +```````````````````````````````` example +foo __\___ +. +

foo _

+```````````````````````````````` + + +```````````````````````````````` example +foo __*__ +. +

foo *

+```````````````````````````````` + + +```````````````````````````````` example +__foo_ +. +

_foo

+```````````````````````````````` + + +Note that when delimiters do not match evenly, Rule 12 determines +that the excess literal `_` characters will appear outside of the +emphasis, rather than inside it: + +```````````````````````````````` example +_foo__ +. +

foo_

+```````````````````````````````` + + +```````````````````````````````` example +___foo__ +. +

_foo

+```````````````````````````````` + + +```````````````````````````````` example +____foo_ +. +

___foo

+```````````````````````````````` + + +```````````````````````````````` example +__foo___ +. +

foo_

+```````````````````````````````` + + +```````````````````````````````` example +_foo____ +. +

foo___

+```````````````````````````````` + + +Rule 13 implies that if you want emphasis nested directly inside +emphasis, you must use different delimiters: + +```````````````````````````````` example +**foo** +. +

foo

+```````````````````````````````` + + +```````````````````````````````` example +*_foo_* +. +

foo

+```````````````````````````````` + + +```````````````````````````````` example +__foo__ +. +

foo

+```````````````````````````````` + + +```````````````````````````````` example +_*foo*_ +. +

foo

+```````````````````````````````` + + +However, strong emphasis within strong emphasis is possible without +switching delimiters: + +```````````````````````````````` example +****foo**** +. +

foo

+```````````````````````````````` + + +```````````````````````````````` example +____foo____ +. +

foo

+```````````````````````````````` + + + +Rule 13 can be applied to arbitrarily long sequences of +delimiters: + +```````````````````````````````` example +******foo****** +. +

foo

+```````````````````````````````` + + +Rule 14: + +```````````````````````````````` example +***foo*** +. +

foo

+```````````````````````````````` + + +```````````````````````````````` example +_____foo_____ +. +

foo

+```````````````````````````````` + + +Rule 15: + +```````````````````````````````` example +*foo _bar* baz_ +. +

foo _bar baz_

+```````````````````````````````` + + +```````````````````````````````` example +*foo __bar *baz bim__ bam* +. +

foo bar *baz bim bam

+```````````````````````````````` + + +Rule 16: + +```````````````````````````````` example +**foo **bar baz** +. +

**foo bar baz

+```````````````````````````````` + + +```````````````````````````````` example +*foo *bar baz* +. +

*foo bar baz

+```````````````````````````````` + + +Rule 17: + +```````````````````````````````` example +*[bar*](/url) +. +

*bar*

+```````````````````````````````` + + +```````````````````````````````` example +_foo [bar_](/url) +. +

_foo bar_

+```````````````````````````````` + + +```````````````````````````````` example +* +. +

*

+```````````````````````````````` + + +```````````````````````````````` example +** +. +

**

+```````````````````````````````` + + +```````````````````````````````` example +__ +. +

__

+```````````````````````````````` + + +```````````````````````````````` example +*a `*`* +. +

a *

+```````````````````````````````` + + +```````````````````````````````` example +_a `_`_ +. +

a _

+```````````````````````````````` + + +```````````````````````````````` example +**a +. +

**ahttps://foo.bar/?q=**

+```````````````````````````````` + + +```````````````````````````````` example +__a +. +

__ahttps://foo.bar/?q=__

+```````````````````````````````` + + + +## Links + +A link contains [link text] (the visible text), a [link destination] +(the URI that is the link destination), and optionally a [link title]. +There are two basic kinds of links in Markdown. In [inline links] the +destination and title are given immediately after the link text. In +[reference links] the destination and title are defined elsewhere in +the document. + +A [link text](@) consists of a sequence of zero or more +inline elements enclosed by square brackets (`[` and `]`). The +following rules apply: + +- Links may not contain other links, at any level of nesting. If + multiple otherwise valid link definitions appear nested inside each + other, the inner-most definition is used. + +- Brackets are allowed in the [link text] only if (a) they + are backslash-escaped or (b) they appear as a matched pair of brackets, + with an open bracket `[`, a sequence of zero or more inlines, and + a close bracket `]`. + +- Backtick [code spans], [autolinks], and raw [HTML tags] bind more tightly + than the brackets in link text. Thus, for example, + `` [foo`]` `` could not be a link text, since the second `]` + is part of a code span. + +- The brackets in link text bind more tightly than markers for + [emphasis and strong emphasis]. Thus, for example, `*[foo*](url)` is a link. + +A [link destination](@) consists of either + +- a sequence of zero or more characters between an opening `<` and a + closing `>` that contains no line endings or unescaped + `<` or `>` characters, or + +- a nonempty sequence of characters that does not start with `<`, + does not include [ASCII control characters][ASCII control character] + or [space] character, and includes parentheses only if (a) they are + backslash-escaped or (b) they are part of a balanced pair of + unescaped parentheses. + (Implementations may impose limits on parentheses nesting to + avoid performance issues, but at least three levels of nesting + should be supported.) + +A [link title](@) consists of either + +- a sequence of zero or more characters between straight double-quote + characters (`"`), including a `"` character only if it is + backslash-escaped, or + +- a sequence of zero or more characters between straight single-quote + characters (`'`), including a `'` character only if it is + backslash-escaped, or + +- a sequence of zero or more characters between matching parentheses + (`(...)`), including a `(` or `)` character only if it is + backslash-escaped. + +Although [link titles] may span multiple lines, they may not contain +a [blank line]. + +An [inline link](@) consists of a [link text] followed immediately +by a left parenthesis `(`, an optional [link destination], an optional +[link title], and a right parenthesis `)`. +These four components may be separated by spaces, tabs, and up to one line +ending. +If both [link destination] and [link title] are present, they *must* be +separated by spaces, tabs, and up to one line ending. + +The link's text consists of the inlines contained +in the [link text] (excluding the enclosing square brackets). +The link's URI consists of the link destination, excluding enclosing +`<...>` if present, with backslash-escapes in effect as described +above. The link's title consists of the link title, excluding its +enclosing delimiters, with backslash-escapes in effect as described +above. + +Here is a simple inline link: + +```````````````````````````````` example +[link](/uri "title") +. +

link

+```````````````````````````````` + + +The title, the link text and even +the destination may be omitted: + +```````````````````````````````` example +[link](/uri) +. +

link

+```````````````````````````````` + +```````````````````````````````` example +[](./target.md) +. +

+```````````````````````````````` + + +```````````````````````````````` example +[link]() +. +

link

+```````````````````````````````` + + +```````````````````````````````` example +[link](<>) +. +

link

+```````````````````````````````` + + +```````````````````````````````` example +[]() +. +

+```````````````````````````````` + +The destination can only contain spaces if it is +enclosed in pointy brackets: + +```````````````````````````````` example +[link](/my uri) +. +

[link](/my uri)

+```````````````````````````````` + +```````````````````````````````` example +[link](
) +. +

link

+```````````````````````````````` + +The destination cannot contain line endings, +even if enclosed in pointy brackets: + +```````````````````````````````` example +[link](foo +bar) +. +

[link](foo +bar)

+```````````````````````````````` + +```````````````````````````````` example +[link]() +. +

[link]()

+```````````````````````````````` + +The destination can contain `)` if it is enclosed +in pointy brackets: + +```````````````````````````````` example +[a]() +. +

a

+```````````````````````````````` + +Pointy brackets that enclose links must be unescaped: + +```````````````````````````````` example +[link]() +. +

[link](<foo>)

+```````````````````````````````` + +These are not links, because the opening pointy bracket +is not matched properly: + +```````````````````````````````` example +[a]( +[a](c) +. +

[a](<b)c +[a](<b)c> +[a](c)

+```````````````````````````````` + +Parentheses inside the link destination may be escaped: + +```````````````````````````````` example +[link](\(foo\)) +. +

link

+```````````````````````````````` + +Any number of parentheses are allowed without escaping, as long as they are +balanced: + +```````````````````````````````` example +[link](foo(and(bar))) +. +

link

+```````````````````````````````` + +However, if you have unbalanced parentheses, you need to escape or use the +`<...>` form: + +```````````````````````````````` example +[link](foo(and(bar)) +. +

[link](foo(and(bar))

+```````````````````````````````` + + +```````````````````````````````` example +[link](foo\(and\(bar\)) +. +

link

+```````````````````````````````` + + +```````````````````````````````` example +[link]() +. +

link

+```````````````````````````````` + + +Parentheses and other symbols can also be escaped, as usual +in Markdown: + +```````````````````````````````` example +[link](foo\)\:) +. +

link

+```````````````````````````````` + + +A link can contain fragment identifiers and queries: + +```````````````````````````````` example +[link](#fragment) + +[link](https://example.com#fragment) + +[link](https://example.com?foo=3#frag) +. +

link

+

link

+

link

+```````````````````````````````` + + +Note that a backslash before a non-escapable character is +just a backslash: + +```````````````````````````````` example +[link](foo\bar) +. +

link

+```````````````````````````````` + + +URL-escaping should be left alone inside the destination, as all +URL-escaped characters are also valid URL characters. Entity and +numerical character references in the destination will be parsed +into the corresponding Unicode code points, as usual. These may +be optionally URL-escaped when written as HTML, but this spec +does not enforce any particular policy for rendering URLs in +HTML or other formats. Renderers may make different decisions +about how to escape or normalize URLs in the output. + +```````````````````````````````` example +[link](foo%20bä) +. +

link

+```````````````````````````````` + + +Note that, because titles can often be parsed as destinations, +if you try to omit the destination and keep the title, you'll +get unexpected results: + +```````````````````````````````` example +[link]("title") +. +

link

+```````````````````````````````` + + +Titles may be in single quotes, double quotes, or parentheses: + +```````````````````````````````` example +[link](/url "title") +[link](/url 'title') +[link](/url (title)) +. +

link +link +link

+```````````````````````````````` + + +Backslash escapes and entity and numeric character references +may be used in titles: + +```````````````````````````````` example +[link](/url "title \""") +. +

link

+```````````````````````````````` + + +Titles must be separated from the link using spaces, tabs, and up to one line +ending. +Other [Unicode whitespace] like non-breaking space doesn't work. + +```````````````````````````````` example +[link](/url "title") +. +

link

+```````````````````````````````` + + +Nested balanced quotes are not allowed without escaping: + +```````````````````````````````` example +[link](/url "title "and" title") +. +

[link](/url "title "and" title")

+```````````````````````````````` + + +But it is easy to work around this by using a different quote type: + +```````````````````````````````` example +[link](/url 'title "and" title') +. +

link

+```````````````````````````````` + + +(Note: `Markdown.pl` did allow double quotes inside a double-quoted +title, and its test suite included a test demonstrating this. +But it is hard to see a good rationale for the extra complexity this +brings, since there are already many ways---backslash escaping, +entity and numeric character references, or using a different +quote type for the enclosing title---to write titles containing +double quotes. `Markdown.pl`'s handling of titles has a number +of other strange features. For example, it allows single-quoted +titles in inline links, but not reference links. And, in +reference links but not inline links, it allows a title to begin +with `"` and end with `)`. `Markdown.pl` 1.0.1 even allows +titles with no closing quotation mark, though 1.0.2b8 does not. +It seems preferable to adopt a simple, rational rule that works +the same way in inline links and link reference definitions.) + +Spaces, tabs, and up to one line ending is allowed around the destination and +title: + +```````````````````````````````` example +[link]( /uri + "title" ) +. +

link

+```````````````````````````````` + + +But it is not allowed between the link text and the +following parenthesis: + +```````````````````````````````` example +[link] (/uri) +. +

[link] (/uri)

+```````````````````````````````` + + +The link text may contain balanced brackets, but not unbalanced ones, +unless they are escaped: + +```````````````````````````````` example +[link [foo [bar]]](/uri) +. +

link [foo [bar]]

+```````````````````````````````` + + +```````````````````````````````` example +[link] bar](/uri) +. +

[link] bar](/uri)

+```````````````````````````````` + + +```````````````````````````````` example +[link [bar](/uri) +. +

[link bar

+```````````````````````````````` + + +```````````````````````````````` example +[link \[bar](/uri) +. +

link [bar

+```````````````````````````````` + + +The link text may contain inline content: + +```````````````````````````````` example +[link *foo **bar** `#`*](/uri) +. +

link foo bar #

+```````````````````````````````` + + +```````````````````````````````` example +[![moon](moon.jpg)](/uri) +. +

moon

+```````````````````````````````` + + +However, links may not contain other links, at any level of nesting. + +```````````````````````````````` example +[foo [bar](/uri)](/uri) +. +

[foo bar](/uri)

+```````````````````````````````` + + +```````````````````````````````` example +[foo *[bar [baz](/uri)](/uri)*](/uri) +. +

[foo [bar baz](/uri)](/uri)

+```````````````````````````````` + + +```````````````````````````````` example +![[[foo](uri1)](uri2)](uri3) +. +

[foo](uri2)

+```````````````````````````````` + + +These cases illustrate the precedence of link text grouping over +emphasis grouping: + +```````````````````````````````` example +*[foo*](/uri) +. +

*foo*

+```````````````````````````````` + + +```````````````````````````````` example +[foo *bar](baz*) +. +

foo *bar

+```````````````````````````````` + + +Note that brackets that *aren't* part of links do not take +precedence: + +```````````````````````````````` example +*foo [bar* baz] +. +

foo [bar baz]

+```````````````````````````````` + + +These cases illustrate the precedence of HTML tags, code spans, +and autolinks over link grouping: + +```````````````````````````````` example +[foo +. +

[foo

+```````````````````````````````` + + +```````````````````````````````` example +[foo`](/uri)` +. +

[foo](/uri)

+```````````````````````````````` + + +```````````````````````````````` example +[foo +. +

[foohttps://example.com/?search=](uri)

+```````````````````````````````` + + +There are three kinds of [reference link](@)s: +[full](#full-reference-link), [collapsed](#collapsed-reference-link), +and [shortcut](#shortcut-reference-link). + +A [full reference link](@) +consists of a [link text] immediately followed by a [link label] +that [matches] a [link reference definition] elsewhere in the document. + +A [link label](@) begins with a left bracket (`[`) and ends +with the first right bracket (`]`) that is not backslash-escaped. +Between these brackets there must be at least one character that is not a space, +tab, or line ending. +Unescaped square bracket characters are not allowed inside the +opening and closing square brackets of [link labels]. A link +label can have at most 999 characters inside the square +brackets. + +One label [matches](@) +another just in case their normalized forms are equal. To normalize a +label, strip off the opening and closing brackets, +perform the *Unicode case fold*, strip leading and trailing +spaces, tabs, and line endings, and collapse consecutive internal +spaces, tabs, and line endings to a single space. If there are multiple +matching reference link definitions, the one that comes first in the +document is used. (It is desirable in such cases to emit a warning.) + +The link's URI and title are provided by the matching [link +reference definition]. + +Here is a simple example: + +```````````````````````````````` example +[foo][bar] + +[bar]: /url "title" +. +

foo

+```````````````````````````````` + + +The rules for the [link text] are the same as with +[inline links]. Thus: + +The link text may contain balanced brackets, but not unbalanced ones, +unless they are escaped: + +```````````````````````````````` example +[link [foo [bar]]][ref] + +[ref]: /uri +. +

link [foo [bar]]

+```````````````````````````````` + + +```````````````````````````````` example +[link \[bar][ref] + +[ref]: /uri +. +

link [bar

+```````````````````````````````` + + +The link text may contain inline content: + +```````````````````````````````` example +[link *foo **bar** `#`*][ref] + +[ref]: /uri +. +

link foo bar #

+```````````````````````````````` + + +```````````````````````````````` example +[![moon](moon.jpg)][ref] + +[ref]: /uri +. +

moon

+```````````````````````````````` + + +However, links may not contain other links, at any level of nesting. + +```````````````````````````````` example +[foo [bar](/uri)][ref] + +[ref]: /uri +. +

[foo bar]ref

+```````````````````````````````` + + +```````````````````````````````` example +[foo *bar [baz][ref]*][ref] + +[ref]: /uri +. +

[foo bar baz]ref

+```````````````````````````````` + + +(In the examples above, we have two [shortcut reference links] +instead of one [full reference link].) + +The following cases illustrate the precedence of link text grouping over +emphasis grouping: + +```````````````````````````````` example +*[foo*][ref] + +[ref]: /uri +. +

*foo*

+```````````````````````````````` + + +```````````````````````````````` example +[foo *bar][ref]* + +[ref]: /uri +. +

foo *bar*

+```````````````````````````````` + + +These cases illustrate the precedence of HTML tags, code spans, +and autolinks over link grouping: + +```````````````````````````````` example +[foo + +[ref]: /uri +. +

[foo

+```````````````````````````````` + + +```````````````````````````````` example +[foo`][ref]` + +[ref]: /uri +. +

[foo][ref]

+```````````````````````````````` + + +```````````````````````````````` example +[foo + +[ref]: /uri +. +

[foohttps://example.com/?search=][ref]

+```````````````````````````````` + + +Matching is case-insensitive: + +```````````````````````````````` example +[foo][BaR] + +[bar]: /url "title" +. +

foo

+```````````````````````````````` + + +Unicode case fold is used: + +```````````````````````````````` example +[ẞ] + +[SS]: /url +. +

+```````````````````````````````` + + +Consecutive internal spaces, tabs, and line endings are treated as one space for +purposes of determining matching: + +```````````````````````````````` example +[Foo + bar]: /url + +[Baz][Foo bar] +. +

Baz

+```````````````````````````````` + + +No spaces, tabs, or line endings are allowed between the [link text] and the +[link label]: + +```````````````````````````````` example +[foo] [bar] + +[bar]: /url "title" +. +

[foo] bar

+```````````````````````````````` + + +```````````````````````````````` example +[foo] +[bar] + +[bar]: /url "title" +. +

[foo] +bar

+```````````````````````````````` + + +This is a departure from John Gruber's original Markdown syntax +description, which explicitly allows whitespace between the link +text and the link label. It brings reference links in line with +[inline links], which (according to both original Markdown and +this spec) cannot have whitespace after the link text. More +importantly, it prevents inadvertent capture of consecutive +[shortcut reference links]. If whitespace is allowed between the +link text and the link label, then in the following we will have +a single reference link, not two shortcut reference links, as +intended: + +``` markdown +[foo] +[bar] + +[foo]: /url1 +[bar]: /url2 +``` + +(Note that [shortcut reference links] were introduced by Gruber +himself in a beta version of `Markdown.pl`, but never included +in the official syntax description. Without shortcut reference +links, it is harmless to allow space between the link text and +link label; but once shortcut references are introduced, it is +too dangerous to allow this, as it frequently leads to +unintended results.) + +When there are multiple matching [link reference definitions], +the first is used: + +```````````````````````````````` example +[foo]: /url1 + +[foo]: /url2 + +[bar][foo] +. +

bar

+```````````````````````````````` + + +Note that matching is performed on normalized strings, not parsed +inline content. So the following does not match, even though the +labels define equivalent inline content: + +```````````````````````````````` example +[bar][foo\!] + +[foo!]: /url +. +

[bar][foo!]

+```````````````````````````````` + + +[Link labels] cannot contain brackets, unless they are +backslash-escaped: + +```````````````````````````````` example +[foo][ref[] + +[ref[]: /uri +. +

[foo][ref[]

+

[ref[]: /uri

+```````````````````````````````` + + +```````````````````````````````` example +[foo][ref[bar]] + +[ref[bar]]: /uri +. +

[foo][ref[bar]]

+

[ref[bar]]: /uri

+```````````````````````````````` + + +```````````````````````````````` example +[[[foo]]] + +[[[foo]]]: /url +. +

[[[foo]]]

+

[[[foo]]]: /url

+```````````````````````````````` + + +```````````````````````````````` example +[foo][ref\[] + +[ref\[]: /uri +. +

foo

+```````````````````````````````` + + +Note that in this example `]` is not backslash-escaped: + +```````````````````````````````` example +[bar\\]: /uri + +[bar\\] +. +

bar\

+```````````````````````````````` + + +A [link label] must contain at least one character that is not a space, tab, or +line ending: + +```````````````````````````````` example +[] + +[]: /uri +. +

[]

+

[]: /uri

+```````````````````````````````` + + +```````````````````````````````` example +[ + ] + +[ + ]: /uri +. +

[ +]

+

[ +]: /uri

+```````````````````````````````` + + +A [collapsed reference link](@) +consists of a [link label] that [matches] a +[link reference definition] elsewhere in the +document, followed by the string `[]`. +The contents of the link label are parsed as inlines, +which are used as the link's text. The link's URI and title are +provided by the matching reference link definition. Thus, +`[foo][]` is equivalent to `[foo][foo]`. + +```````````````````````````````` example +[foo][] + +[foo]: /url "title" +. +

foo

+```````````````````````````````` + + +```````````````````````````````` example +[*foo* bar][] + +[*foo* bar]: /url "title" +. +

foo bar

+```````````````````````````````` + + +The link labels are case-insensitive: + +```````````````````````````````` example +[Foo][] + +[foo]: /url "title" +. +

Foo

+```````````````````````````````` + + + +As with full reference links, spaces, tabs, or line endings are not +allowed between the two sets of brackets: + +```````````````````````````````` example +[foo] +[] + +[foo]: /url "title" +. +

foo +[]

+```````````````````````````````` + + +A [shortcut reference link](@) +consists of a [link label] that [matches] a +[link reference definition] elsewhere in the +document and is not followed by `[]` or a link label. +The contents of the link label are parsed as inlines, +which are used as the link's text. The link's URI and title +are provided by the matching link reference definition. +Thus, `[foo]` is equivalent to `[foo][]`. + +```````````````````````````````` example +[foo] + +[foo]: /url "title" +. +

foo

+```````````````````````````````` + + +```````````````````````````````` example +[*foo* bar] + +[*foo* bar]: /url "title" +. +

foo bar

+```````````````````````````````` + + +```````````````````````````````` example +[[*foo* bar]] + +[*foo* bar]: /url "title" +. +

[foo bar]

+```````````````````````````````` + + +```````````````````````````````` example +[[bar [foo] + +[foo]: /url +. +

[[bar foo

+```````````````````````````````` + + +The link labels are case-insensitive: + +```````````````````````````````` example +[Foo] + +[foo]: /url "title" +. +

Foo

+```````````````````````````````` + + +A space after the link text should be preserved: + +```````````````````````````````` example +[foo] bar + +[foo]: /url +. +

foo bar

+```````````````````````````````` + + +If you just want bracketed text, you can backslash-escape the +opening bracket to avoid links: + +```````````````````````````````` example +\[foo] + +[foo]: /url "title" +. +

[foo]

+```````````````````````````````` + + +Note that this is a link, because a link label ends with the first +following closing bracket: + +```````````````````````````````` example +[foo*]: /url + +*[foo*] +. +

*foo*

+```````````````````````````````` + + +Full and collapsed references take precedence over shortcut +references: + +```````````````````````````````` example +[foo][bar] + +[foo]: /url1 +[bar]: /url2 +. +

foo

+```````````````````````````````` + +```````````````````````````````` example +[foo][] + +[foo]: /url1 +. +

foo

+```````````````````````````````` + +Inline links also take precedence: + +```````````````````````````````` example +[foo]() + +[foo]: /url1 +. +

foo

+```````````````````````````````` + +```````````````````````````````` example +[foo](not a link) + +[foo]: /url1 +. +

foo(not a link)

+```````````````````````````````` + +In the following case `[bar][baz]` is parsed as a reference, +`[foo]` as normal text: + +```````````````````````````````` example +[foo][bar][baz] + +[baz]: /url +. +

[foo]bar

+```````````````````````````````` + + +Here, though, `[foo][bar]` is parsed as a reference, since +`[bar]` is defined: + +```````````````````````````````` example +[foo][bar][baz] + +[baz]: /url1 +[bar]: /url2 +. +

foobaz

+```````````````````````````````` + + +Here `[foo]` is not parsed as a shortcut reference, because it +is followed by a link label (even though `[bar]` is not defined): + +```````````````````````````````` example +[foo][bar][baz] + +[baz]: /url1 +[foo]: /url2 +. +

[foo]bar

+```````````````````````````````` + + + +## Images + +Syntax for images is like the syntax for links, with one +difference. Instead of [link text], we have an +[image description](@). The rules for this are the +same as for [link text], except that (a) an +image description starts with `![` rather than `[`, and +(b) an image description may contain links. +An image description has inline elements +as its contents. When an image is rendered to HTML, +this is standardly used as the image's `alt` attribute. + +```````````````````````````````` example +![foo](/url "title") +. +

foo

+```````````````````````````````` + + +```````````````````````````````` example +![foo *bar*] + +[foo *bar*]: train.jpg "train & tracks" +. +

foo bar

+```````````````````````````````` + + +```````````````````````````````` example +![foo ![bar](/url)](/url2) +. +

foo bar

+```````````````````````````````` + + +```````````````````````````````` example +![foo [bar](/url)](/url2) +. +

foo bar

+```````````````````````````````` + + +Though this spec is concerned with parsing, not rendering, it is +recommended that in rendering to HTML, only the plain string content +of the [image description] be used. Note that in +the above example, the alt attribute's value is `foo bar`, not `foo +[bar](/url)` or `foo bar`. Only the plain string +content is rendered, without formatting. + +```````````````````````````````` example +![foo *bar*][] + +[foo *bar*]: train.jpg "train & tracks" +. +

foo bar

+```````````````````````````````` + + +```````````````````````````````` example +![foo *bar*][foobar] + +[FOOBAR]: train.jpg "train & tracks" +. +

foo bar

+```````````````````````````````` + + +```````````````````````````````` example +![foo](train.jpg) +. +

foo

+```````````````````````````````` + + +```````````````````````````````` example +My ![foo bar](/path/to/train.jpg "title" ) +. +

My foo bar

+```````````````````````````````` + + +```````````````````````````````` example +![foo]() +. +

foo

+```````````````````````````````` + + +```````````````````````````````` example +![](/url) +. +

+```````````````````````````````` + + +Reference-style: + +```````````````````````````````` example +![foo][bar] + +[bar]: /url +. +

foo

+```````````````````````````````` + + +```````````````````````````````` example +![foo][bar] + +[BAR]: /url +. +

foo

+```````````````````````````````` + + +Collapsed: + +```````````````````````````````` example +![foo][] + +[foo]: /url "title" +. +

foo

+```````````````````````````````` + + +```````````````````````````````` example +![*foo* bar][] + +[*foo* bar]: /url "title" +. +

foo bar

+```````````````````````````````` + + +The labels are case-insensitive: + +```````````````````````````````` example +![Foo][] + +[foo]: /url "title" +. +

Foo

+```````````````````````````````` + + +As with reference links, spaces, tabs, and line endings, are not allowed +between the two sets of brackets: + +```````````````````````````````` example +![foo] +[] + +[foo]: /url "title" +. +

foo +[]

+```````````````````````````````` + + +Shortcut: + +```````````````````````````````` example +![foo] + +[foo]: /url "title" +. +

foo

+```````````````````````````````` + + +```````````````````````````````` example +![*foo* bar] + +[*foo* bar]: /url "title" +. +

foo bar

+```````````````````````````````` + + +Note that link labels cannot contain unescaped brackets: + +```````````````````````````````` example +![[foo]] + +[[foo]]: /url "title" +. +

![[foo]]

+

[[foo]]: /url "title"

+```````````````````````````````` + + +The link labels are case-insensitive: + +```````````````````````````````` example +![Foo] + +[foo]: /url "title" +. +

Foo

+```````````````````````````````` + + +If you just want a literal `!` followed by bracketed text, you can +backslash-escape the opening `[`: + +```````````````````````````````` example +!\[foo] + +[foo]: /url "title" +. +

![foo]

+```````````````````````````````` + + +If you want a link after a literal `!`, backslash-escape the +`!`: + +```````````````````````````````` example +\![foo] + +[foo]: /url "title" +. +

!foo

+```````````````````````````````` + + +## Autolinks + +[Autolink](@)s are absolute URIs and email addresses inside +`<` and `>`. They are parsed as links, with the URL or email address +as the link label. + +A [URI autolink](@) consists of `<`, followed by an +[absolute URI] followed by `>`. It is parsed as +a link to the URI, with the URI as the link's label. + +An [absolute URI](@), +for these purposes, consists of a [scheme] followed by a colon (`:`) +followed by zero or more characters other than [ASCII control +characters][ASCII control character], [space], `<`, and `>`. +If the URI includes these characters, they must be percent-encoded +(e.g. `%20` for a space). + +For purposes of this spec, a [scheme](@) is any sequence +of 2--32 characters beginning with an ASCII letter and followed +by any combination of ASCII letters, digits, or the symbols plus +("+"), period ("."), or hyphen ("-"). + +Here are some valid autolinks: + +```````````````````````````````` example + +. +

http://foo.bar.baz

+```````````````````````````````` + + +```````````````````````````````` example + +. +

https://foo.bar.baz/test?q=hello&id=22&boolean

+```````````````````````````````` + + +```````````````````````````````` example + +. +

irc://foo.bar:2233/baz

+```````````````````````````````` + + +Uppercase is also fine: + +```````````````````````````````` example + +. +

MAILTO:FOO@BAR.BAZ

+```````````````````````````````` + + +Note that many strings that count as [absolute URIs] for +purposes of this spec are not valid URIs, because their +schemes are not registered or because of other problems +with their syntax: + +```````````````````````````````` example + +. +

a+b+c:d

+```````````````````````````````` + + +```````````````````````````````` example + +. +

made-up-scheme://foo,bar

+```````````````````````````````` + + +```````````````````````````````` example + +. +

https://../

+```````````````````````````````` + + +```````````````````````````````` example + +. +

localhost:5001/foo

+```````````````````````````````` + + +Spaces are not allowed in autolinks: + +```````````````````````````````` example + +. +

<https://foo.bar/baz bim>

+```````````````````````````````` + + +Backslash-escapes do not work inside autolinks: + +```````````````````````````````` example + +. +

https://example.com/\[\

+```````````````````````````````` + + +An [email autolink](@) +consists of `<`, followed by an [email address], +followed by `>`. The link's label is the email address, +and the URL is `mailto:` followed by the email address. + +An [email address](@), +for these purposes, is anything that matches +the [non-normative regex from the HTML5 +spec](https://html.spec.whatwg.org/multipage/forms.html#e-mail-state-(type=email)): + + /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])? + (?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/ + +Examples of email autolinks: + +```````````````````````````````` example + +. +

foo@bar.example.com

+```````````````````````````````` + + +```````````````````````````````` example + +. +

foo+special@Bar.baz-bar0.com

+```````````````````````````````` + + +Backslash-escapes do not work inside email autolinks: + +```````````````````````````````` example + +. +

<foo+@bar.example.com>

+```````````````````````````````` + + +These are not autolinks: + +```````````````````````````````` example +<> +. +

<>

+```````````````````````````````` + + +```````````````````````````````` example +< https://foo.bar > +. +

< https://foo.bar >

+```````````````````````````````` + + +```````````````````````````````` example + +. +

<m:abc>

+```````````````````````````````` + + +```````````````````````````````` example + +. +

<foo.bar.baz>

+```````````````````````````````` + + +```````````````````````````````` example +https://example.com +. +

https://example.com

+```````````````````````````````` + + +```````````````````````````````` example +foo@bar.example.com +. +

foo@bar.example.com

+```````````````````````````````` + + +## Raw HTML + +Text between `<` and `>` that looks like an HTML tag is parsed as a +raw HTML tag and will be rendered in HTML without escaping. +Tag and attribute names are not limited to current HTML tags, +so custom tags (and even, say, DocBook tags) may be used. + +Here is the grammar for tags: + +A [tag name](@) consists of an ASCII letter +followed by zero or more ASCII letters, digits, or +hyphens (`-`). + +An [attribute](@) consists of spaces, tabs, and up to one line ending, +an [attribute name], and an optional +[attribute value specification]. + +An [attribute name](@) +consists of an ASCII letter, `_`, or `:`, followed by zero or more ASCII +letters, digits, `_`, `.`, `:`, or `-`. (Note: This is the XML +specification restricted to ASCII. HTML5 is laxer.) + +An [attribute value specification](@) +consists of optional spaces, tabs, and up to one line ending, +a `=` character, optional spaces, tabs, and up to one line ending, +and an [attribute value]. + +An [attribute value](@) +consists of an [unquoted attribute value], +a [single-quoted attribute value], or a [double-quoted attribute value]. + +An [unquoted attribute value](@) +is a nonempty string of characters not +including spaces, tabs, line endings, `"`, `'`, `=`, `<`, `>`, or `` ` ``. + +A [single-quoted attribute value](@) +consists of `'`, zero or more +characters not including `'`, and a final `'`. + +A [double-quoted attribute value](@) +consists of `"`, zero or more +characters not including `"`, and a final `"`. + +An [open tag](@) consists of a `<` character, a [tag name], +zero or more [attributes], optional spaces, tabs, and up to one line ending, +an optional `/` character, and a `>` character. + +A [closing tag](@) consists of the string ``. + +An [HTML comment](@) consists of ``, ``, or ``, and `-->` (see the +[HTML spec](https://html.spec.whatwg.org/multipage/parsing.html#markup-declaration-open-state)). + +A [processing instruction](@) +consists of the string ``, and the string +`?>`. + +A [declaration](@) consists of the string ``, and the character `>`. + +A [CDATA section](@) consists of +the string ``, and the string `]]>`. + +An [HTML tag](@) consists of an [open tag], a [closing tag], +an [HTML comment], a [processing instruction], a [declaration], +or a [CDATA section]. + +Here are some simple open tags: + +```````````````````````````````` example + +. +

+```````````````````````````````` + + +Empty elements: + +```````````````````````````````` example + +. +

+```````````````````````````````` + + +Whitespace is allowed: + +```````````````````````````````` example + +. +

+```````````````````````````````` + + +With attributes: + +```````````````````````````````` example + +. +

+```````````````````````````````` + + +Custom tag names can be used: + +```````````````````````````````` example +Foo +. +

Foo

+```````````````````````````````` + + +Illegal tag names, not parsed as HTML: + +```````````````````````````````` example +<33> <__> +. +

<33> <__>

+```````````````````````````````` + + +Illegal attribute names: + +```````````````````````````````` example +
+. +

<a h*#ref="hi">

+```````````````````````````````` + + +Illegal attribute values: + +```````````````````````````````` example +
+. +

</a href="foo">

+```````````````````````````````` + + +Comments: + +```````````````````````````````` example +foo +. +

foo

+```````````````````````````````` + +```````````````````````````````` example +foo foo --> + +foo foo --> +. +

foo foo -->

+

foo foo -->

+```````````````````````````````` + + +Processing instructions: + +```````````````````````````````` example +foo +. +

foo

+```````````````````````````````` + + +Declarations: + +```````````````````````````````` example +foo +. +

foo

+```````````````````````````````` + + +CDATA sections: + +```````````````````````````````` example +foo &<]]> +. +

foo &<]]>

+```````````````````````````````` + + +Entity and numeric character references are preserved in HTML +attributes: + +```````````````````````````````` example +foo
+. +

foo

+```````````````````````````````` + + +Backslash escapes do not work in HTML attributes: + +```````````````````````````````` example +foo +. +

foo

+```````````````````````````````` + + +```````````````````````````````` example + +. +

<a href=""">

+```````````````````````````````` + + +## Hard line breaks + +A line ending (not in a code span or HTML tag) that is preceded +by two or more spaces and does not occur at the end of a block +is parsed as a [hard line break](@) (rendered +in HTML as a `
` tag): + +```````````````````````````````` example +foo +baz +. +

foo
+baz

+```````````````````````````````` + + +For a more visible alternative, a backslash before the +[line ending] may be used instead of two or more spaces: + +```````````````````````````````` example +foo\ +baz +. +

foo
+baz

+```````````````````````````````` + + +More than two spaces can be used: + +```````````````````````````````` example +foo +baz +. +

foo
+baz

+```````````````````````````````` + + +Leading spaces at the beginning of the next line are ignored: + +```````````````````````````````` example +foo + bar +. +

foo
+bar

+```````````````````````````````` + + +```````````````````````````````` example +foo\ + bar +. +

foo
+bar

+```````````````````````````````` + + +Hard line breaks can occur inside emphasis, links, and other constructs +that allow inline content: + +```````````````````````````````` example +*foo +bar* +. +

foo
+bar

+```````````````````````````````` + + +```````````````````````````````` example +*foo\ +bar* +. +

foo
+bar

+```````````````````````````````` + + +Hard line breaks do not occur inside code spans + +```````````````````````````````` example +`code +span` +. +

code span

+```````````````````````````````` + + +```````````````````````````````` example +`code\ +span` +. +

code\ span

+```````````````````````````````` + + +or HTML tags: + +```````````````````````````````` example +
+. +

+```````````````````````````````` + + +```````````````````````````````` example + +. +

+```````````````````````````````` + + +Hard line breaks are for separating inline content within a block. +Neither syntax for hard line breaks works at the end of a paragraph or +other block element: + +```````````````````````````````` example +foo\ +. +

foo\

+```````````````````````````````` + + +```````````````````````````````` example +foo +. +

foo

+```````````````````````````````` + + +```````````````````````````````` example +### foo\ +. +

foo\

+```````````````````````````````` + + +```````````````````````````````` example +### foo +. +

foo

+```````````````````````````````` + + +## Soft line breaks + +A regular line ending (not in a code span or HTML tag) that is not +preceded by two or more spaces or a backslash is parsed as a +[softbreak](@). (A soft line break may be rendered in HTML either as a +[line ending] or as a space. The result will be the same in +browsers. In the examples here, a [line ending] will be used.) + +```````````````````````````````` example +foo +baz +. +

foo +baz

+```````````````````````````````` + + +Spaces at the end of the line and beginning of the next line are +removed: + +```````````````````````````````` example +foo + baz +. +

foo +baz

+```````````````````````````````` + + +A conforming parser may render a soft line break in HTML either as a +line ending or as a space. + +A renderer may also provide an option to render soft line breaks +as hard line breaks. + +## Textual content + +Any characters not given an interpretation by the above rules will +be parsed as plain textual content. + +```````````````````````````````` example +hello $.;'there +. +

hello $.;'there

+```````````````````````````````` + + +```````````````````````````````` example +Foo χρῆν +. +

Foo χρῆν

+```````````````````````````````` + + +Internal spaces are preserved verbatim: + +```````````````````````````````` example +Multiple spaces +. +

Multiple spaces

+```````````````````````````````` + + + + +# Appendix: A parsing strategy + +In this appendix we describe some features of the parsing strategy +used in the CommonMark reference implementations. + +## Overview + +Parsing has two phases: + +1. In the first phase, lines of input are consumed and the block +structure of the document---its division into paragraphs, block quotes, +list items, and so on---is constructed. Text is assigned to these +blocks but not parsed. Link reference definitions are parsed and a +map of links is constructed. + +2. In the second phase, the raw text contents of paragraphs and headings +are parsed into sequences of Markdown inline elements (strings, +code spans, links, emphasis, and so on), using the map of link +references constructed in phase 1. + +At each point in processing, the document is represented as a tree of +**blocks**. The root of the tree is a `document` block. The `document` +may have any number of other blocks as **children**. These children +may, in turn, have other blocks as children. The last child of a block +is normally considered **open**, meaning that subsequent lines of input +can alter its contents. (Blocks that are not open are **closed**.) +Here, for example, is a possible document tree, with the open blocks +marked by arrows: + +``` tree +-> document + -> block_quote + paragraph + "Lorem ipsum dolor\nsit amet." + -> list (type=bullet tight=true bullet_char=-) + list_item + paragraph + "Qui *quodsi iracundia*" + -> list_item + -> paragraph + "aliquando id" +``` + +## Phase 1: block structure + +Each line that is processed has an effect on this tree. The line is +analyzed and, depending on its contents, the document may be altered +in one or more of the following ways: + +1. One or more open blocks may be closed. +2. One or more new blocks may be created as children of the + last open block. +3. Text may be added to the last (deepest) open block remaining + on the tree. + +Once a line has been incorporated into the tree in this way, +it can be discarded, so input can be read in a stream. + +For each line, we follow this procedure: + +1. First we iterate through the open blocks, starting with the +root document, and descending through last children down to the last +open block. Each block imposes a condition that the line must satisfy +if the block is to remain open. For example, a block quote requires a +`>` character. A paragraph requires a non-blank line. +In this phase we may match all or just some of the open +blocks. But we cannot close unmatched blocks yet, because we may have a +[lazy continuation line]. + +2. Next, after consuming the continuation markers for existing +blocks, we look for new block starts (e.g. `>` for a block quote). +If we encounter a new block start, we close any blocks unmatched +in step 1 before creating the new block as a child of the last +matched container block. + +3. Finally, we look at the remainder of the line (after block +markers like `>`, list markers, and indentation have been consumed). +This is text that can be incorporated into the last open +block (a paragraph, code block, heading, or raw HTML). + +Setext headings are formed when we see a line of a paragraph +that is a [setext heading underline]. + +Reference link definitions are detected when a paragraph is closed; +the accumulated text lines are parsed to see if they begin with +one or more reference link definitions. Any remainder becomes a +normal paragraph. + +We can see how this works by considering how the tree above is +generated by four lines of Markdown: + +``` markdown +> Lorem ipsum dolor +sit amet. +> - Qui *quodsi iracundia* +> - aliquando id +``` + +At the outset, our document model is just + +``` tree +-> document +``` + +The first line of our text, + +``` markdown +> Lorem ipsum dolor +``` + +causes a `block_quote` block to be created as a child of our +open `document` block, and a `paragraph` block as a child of +the `block_quote`. Then the text is added to the last open +block, the `paragraph`: + +``` tree +-> document + -> block_quote + -> paragraph + "Lorem ipsum dolor" +``` + +The next line, + +``` markdown +sit amet. +``` + +is a "lazy continuation" of the open `paragraph`, so it gets added +to the paragraph's text: + +``` tree +-> document + -> block_quote + -> paragraph + "Lorem ipsum dolor\nsit amet." +``` + +The third line, + +``` markdown +> - Qui *quodsi iracundia* +``` + +causes the `paragraph` block to be closed, and a new `list` block +opened as a child of the `block_quote`. A `list_item` is also +added as a child of the `list`, and a `paragraph` as a child of +the `list_item`. The text is then added to the new `paragraph`: + +``` tree +-> document + -> block_quote + paragraph + "Lorem ipsum dolor\nsit amet." + -> list (type=bullet tight=true bullet_char=-) + -> list_item + -> paragraph + "Qui *quodsi iracundia*" +``` + +The fourth line, + +``` markdown +> - aliquando id +``` + +causes the `list_item` (and its child the `paragraph`) to be closed, +and a new `list_item` opened up as child of the `list`. A `paragraph` +is added as a child of the new `list_item`, to contain the text. +We thus obtain the final tree: + +``` tree +-> document + -> block_quote + paragraph + "Lorem ipsum dolor\nsit amet." + -> list (type=bullet tight=true bullet_char=-) + list_item + paragraph + "Qui *quodsi iracundia*" + -> list_item + -> paragraph + "aliquando id" +``` + +## Phase 2: inline structure + +Once all of the input has been parsed, all open blocks are closed. + +We then "walk the tree," visiting every node, and parse raw +string contents of paragraphs and headings as inlines. At this +point we have seen all the link reference definitions, so we can +resolve reference links as we go. + +``` tree +document + block_quote + paragraph + str "Lorem ipsum dolor" + softbreak + str "sit amet." + list (type=bullet tight=true bullet_char=-) + list_item + paragraph + str "Qui " + emph + str "quodsi iracundia" + list_item + paragraph + str "aliquando id" +``` + +Notice how the [line ending] in the first paragraph has +been parsed as a `softbreak`, and the asterisks in the first list item +have become an `emph`. + +### An algorithm for parsing nested emphasis and links + +By far the trickiest part of inline parsing is handling emphasis, +strong emphasis, links, and images. This is done using the following +algorithm. + +When we're parsing inlines and we hit either + +- a run of `*` or `_` characters, or +- a `[` or `![` + +we insert a text node with these symbols as its literal content, and we +add a pointer to this text node to the [delimiter stack](@). + +The [delimiter stack] is a doubly linked list. Each +element contains a pointer to a text node, plus information about + +- the type of delimiter (`[`, `![`, `*`, `_`) +- the number of delimiters, +- whether the delimiter is "active" (all are active to start), and +- whether the delimiter is a potential opener, a potential closer, + or both (which depends on what sort of characters precede + and follow the delimiters). + +When we hit a `]` character, we call the *look for link or image* +procedure (see below). + +When we hit the end of the input, we call the *process emphasis* +procedure (see below), with `stack_bottom` = NULL. + +#### *look for link or image* + +Starting at the top of the delimiter stack, we look backwards +through the stack for an opening `[` or `![` delimiter. + +- If we don't find one, we return a literal text node `]`. + +- If we do find one, but it's not *active*, we remove the inactive + delimiter from the stack, and return a literal text node `]`. + +- If we find one and it's active, then we parse ahead to see if + we have an inline link/image, reference link/image, collapsed reference + link/image, or shortcut reference link/image. + + + If we don't, then we remove the opening delimiter from the + delimiter stack and return a literal text node `]`. + + + If we do, then + + * We return a link or image node whose children are the inlines + after the text node pointed to by the opening delimiter. + + * We run *process emphasis* on these inlines, with the `[` opener + as `stack_bottom`. + + * We remove the opening delimiter. + + * If we have a link (and not an image), we also set all + `[` delimiters before the opening delimiter to *inactive*. (This + will prevent us from getting links within links.) + +#### *process emphasis* + +Parameter `stack_bottom` sets a lower bound to how far we +descend in the [delimiter stack]. If it is NULL, we can +go all the way to the bottom. Otherwise, we stop before +visiting `stack_bottom`. + +Let `current_position` point to the element on the [delimiter stack] +just above `stack_bottom` (or the first element if `stack_bottom` +is NULL). + +We keep track of the `openers_bottom` for each delimiter +type (`*`, `_`), indexed to the length of the closing delimiter run +(modulo 3) and to whether the closing delimiter can also be an +opener. Initialize this to `stack_bottom`. + +Then we repeat the following until we run out of potential +closers: + +- Move `current_position` forward in the delimiter stack (if needed) + until we find the first potential closer with delimiter `*` or `_`. + (This will be the potential closer closest + to the beginning of the input -- the first one in parse order.) + +- Now, look back in the stack (staying above `stack_bottom` and + the `openers_bottom` for this delimiter type) for the + first matching potential opener ("matching" means same delimiter). + +- If one is found: + + + Figure out whether we have emphasis or strong emphasis: + if both closer and opener spans have length >= 2, we have + strong, otherwise regular. + + + Insert an emph or strong emph node accordingly, after + the text node corresponding to the opener. + + + Remove any delimiters between the opener and closer from + the delimiter stack. + + + Remove 1 (for regular emph) or 2 (for strong emph) delimiters + from the opening and closing text nodes. If they become empty + as a result, remove them and remove the corresponding element + of the delimiter stack. If the closing node is removed, reset + `current_position` to the next element in the stack. + +- If none is found: + + + Set `openers_bottom` to the element before `current_position`. + (We know that there are no openers for this kind of closer up to and + including this point, so this puts a lower bound on future searches.) + + + If the closer at `current_position` is not a potential opener, + remove it from the delimiter stack (since we know it can't + be a closer either). + + + Advance `current_position` to the next element in the stack. + +After we're done, we remove all delimiters above `stack_bottom` from the +delimiter stack. diff --git a/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/test/gh/tests/test_cmark_spec/test_spec.py b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/test/gh/tests/test_cmark_spec/test_spec.py new file mode 100644 index 0000000000000000000000000000000000000000..e51994776e329e560e51a29ba79493161ae9be12 --- /dev/null +++ b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/test/gh/tests/test_cmark_spec/test_spec.py @@ -0,0 +1,36 @@ +"""In this module tests are run against the full test set, +provided by https://github.com/commonmark/CommonMark.git. +""" + +import json +from pathlib import Path + +import pytest + +from markdown_it import MarkdownIt + +SPEC_INPUT = Path(__file__).parent.joinpath("spec.md") +TESTS_INPUT = Path(__file__).parent.joinpath("commonmark.json") + + +def test_file(file_regression): + md = MarkdownIt("commonmark") + file_regression.check(md.render(SPEC_INPUT.read_text()), extension=".html") + + +@pytest.mark.parametrize("entry", json.loads(TESTS_INPUT.read_text())) +def test_spec(entry): + md = MarkdownIt("commonmark") + output = md.render(entry["markdown"]) + expected = entry["html"] + + if entry["example"] == 596: + # this doesn't have any bearing on the output + output = output.replace("mailto", "MAILTO") + if entry["example"] in [218, 239, 240]: + # this doesn't have any bearing on the output + output = output.replace( + "
", "
\n
" + ) + + assert output == expected diff --git a/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/test/gh/tests/test_cmark_spec/test_spec/test_file.html b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/test/gh/tests/test_cmark_spec/test_spec/test_file.html new file mode 100644 index 0000000000000000000000000000000000000000..608735336f004b916fab20511c0728041158cca4 --- /dev/null +++ b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/test/gh/tests/test_cmark_spec/test_spec/test_file.html @@ -0,0 +1,7175 @@ +
+

title: CommonMark Spec +author: John MacFarlane +version: '0.31.2' +date: '2024-01-28' +license: 'CC-BY-SA 4.0' +...

+

Introduction

+

What is Markdown?

+

Markdown is a plain text format for writing structured documents, +based on conventions for indicating formatting in email +and usenet posts. It was developed by John Gruber (with +help from Aaron Swartz) and released in 2004 in the form of a +syntax description +and a Perl script (Markdown.pl) for converting Markdown to +HTML. In the next decade, dozens of implementations were +developed in many languages. Some extended the original +Markdown syntax with conventions for footnotes, tables, and +other document elements. Some allowed Markdown documents to be +rendered in formats other than HTML. Websites like Reddit, +StackOverflow, and GitHub had millions of people using Markdown. +And Markdown started to be used beyond the web, to author books, +articles, slide shows, letters, and lecture notes.

+

What distinguishes Markdown from many other lightweight markup +syntaxes, which are often easier to write, is its readability. +As Gruber writes:

+
+

The overriding design goal for Markdown's formatting syntax is +to make it as readable as possible. The idea is that a +Markdown-formatted document should be publishable as-is, as +plain text, without looking like it's been marked up with tags +or formatting instructions. +(https://daringfireball.net/projects/markdown/)

+
+

The point can be illustrated by comparing a sample of +AsciiDoc with +an equivalent sample of Markdown. Here is a sample of +AsciiDoc from the AsciiDoc manual:

+
1. List item one.
++
+List item one continued with a second paragraph followed by an
+Indented block.
++
+.................
+$ ls *.sh
+$ mv *.sh ~/tmp
+.................
++
+List item continued with a third paragraph.
+
+2. List item two continued with an open block.
++
+--
+This paragraph is part of the preceding list item.
+
+a. This list is nested and does not require explicit item
+continuation.
++
+This paragraph is part of the preceding list item.
+
+b. List item b.
+
+This paragraph belongs to item two of the outer list.
+--
+
+

And here is the equivalent in Markdown:

+
1.  List item one.
+
+    List item one continued with a second paragraph followed by an
+    Indented block.
+
+        $ ls *.sh
+        $ mv *.sh ~/tmp
+
+    List item continued with a third paragraph.
+
+2.  List item two continued with an open block.
+
+    This paragraph is part of the preceding list item.
+
+    1. This list is nested and does not require explicit item continuation.
+
+       This paragraph is part of the preceding list item.
+
+    2. List item b.
+
+    This paragraph belongs to item two of the outer list.
+
+

The AsciiDoc version is, arguably, easier to write. You don't need +to worry about indentation. But the Markdown version is much easier +to read. The nesting of list items is apparent to the eye in the +source, not just in the processed document.

+

Why is a spec needed?

+

John Gruber's canonical description of Markdown's +syntax +does not specify the syntax unambiguously. Here are some examples of +questions it does not answer:

+
    +
  1. +

    How much indentation is needed for a sublist? The spec says that +continuation paragraphs need to be indented four spaces, but is +not fully explicit about sublists. It is natural to think that +they, too, must be indented four spaces, but Markdown.pl does +not require that. This is hardly a "corner case," and divergences +between implementations on this issue often lead to surprises for +users in real documents. (See this comment by John +Gruber.)

    +
  2. +
  3. +

    Is a blank line needed before a block quote or heading? +Most implementations do not require the blank line. However, +this can lead to unexpected results in hard-wrapped text, and +also to ambiguities in parsing (note that some implementations +put the heading inside the blockquote, while others do not). +(John Gruber has also spoken in favor of requiring the blank +lines.)

    +
  4. +
  5. +

    Is a blank line needed before an indented code block? +(Markdown.pl requires it, but this is not mentioned in the +documentation, and some implementations do not require it.)

    +
    paragraph
    +    code?
    +
    +
  6. +
  7. +

    What is the exact rule for determining when list items get +wrapped in <p> tags? Can a list be partially "loose" and partially +"tight"? What should we do with a list like this?

    +
    1. one
    +
    +2. two
    +3. three
    +
    +

    Or this?

    +
    1.  one
    +    - a
    +
    +    - b
    +2.  two
    +
    +

    (There are some relevant comments by John Gruber +here.)

    +
  8. +
  9. +

    Can list markers be indented? Can ordered list markers be right-aligned?

    +
     8. item 1
    + 9. item 2
    +10. item 2a
    +
    +
  10. +
  11. +

    Is this one list with a thematic break in its second item, +or two lists separated by a thematic break?

    +
    * a
    +* * * * *
    +* b
    +
    +
  12. +
  13. +

    When list markers change from numbers to bullets, do we have +two lists or one? (The Markdown syntax description suggests two, +but the perl scripts and many other implementations produce one.)

    +
    1. fee
    +2. fie
    +-  foe
    +-  fum
    +
    +
  14. +
  15. +

    What are the precedence rules for the markers of inline structure? +For example, is the following a valid link, or does the code span +take precedence ?

    +
    [a backtick (`)](/url) and [another backtick (`)](/url).
    +
    +
  16. +
  17. +

    What are the precedence rules for markers of emphasis and strong +emphasis? For example, how should the following be parsed?

    +
    *foo *bar* baz*
    +
    +
  18. +
  19. +

    What are the precedence rules between block-level and inline-level +structure? For example, how should the following be parsed?

    +
    - `a long code span can contain a hyphen like this
    +  - and it can screw things up`
    +
    +
  20. +
  21. +

    Can list items include section headings? (Markdown.pl does not +allow this, but does allow blockquotes to include headings.)

    +
    - # Heading
    +
    +
  22. +
  23. +

    Can list items be empty?

    +
    * a
    +*
    +* b
    +
    +
  24. +
  25. +

    Can link references be defined inside block quotes or list items?

    +
    > Blockquote [foo].
    +>
    +> [foo]: /url
    +
    +
  26. +
  27. +

    If there are multiple definitions for the same reference, which takes +precedence?

    +
    [foo]: /url1
    +[foo]: /url2
    +
    +[foo][]
    +
    +
  28. +
+

In the absence of a spec, early implementers consulted Markdown.pl +to resolve these ambiguities. But Markdown.pl was quite buggy, and +gave manifestly bad results in many cases, so it was not a +satisfactory replacement for a spec.

+

Because there is no unambiguous spec, implementations have diverged +considerably. As a result, users are often surprised to find that +a document that renders one way on one system (say, a GitHub wiki) +renders differently on another (say, converting to docbook using +pandoc). To make matters worse, because nothing in Markdown counts +as a "syntax error," the divergence often isn't discovered right away.

+

About this document

+

This document attempts to specify Markdown syntax unambiguously. +It contains many examples with side-by-side Markdown and +HTML. These are intended to double as conformance tests. An +accompanying script spec_tests.py can be used to run the tests +against any Markdown program:

+
python test/spec_tests.py --spec spec.txt --program PROGRAM
+
+

Since this document describes how Markdown is to be parsed into +an abstract syntax tree, it would have made sense to use an abstract +representation of the syntax tree instead of HTML. But HTML is capable +of representing the structural distinctions we need to make, and the +choice of HTML for the tests makes it possible to run the tests against +an implementation without writing an abstract syntax tree renderer.

+

Note that not every feature of the HTML samples is mandated by +the spec. For example, the spec says what counts as a link +destination, but it doesn't mandate that non-ASCII characters in +the URL be percent-encoded. To use the automatic tests, +implementers will need to provide a renderer that conforms to +the expectations of the spec examples (percent-encoding +non-ASCII characters in URLs). But a conforming implementation +can use a different renderer and may choose not to +percent-encode non-ASCII characters in URLs.

+

This document is generated from a text file, spec.txt, written +in Markdown with a small extension for the side-by-side tests. +The script tools/makespec.py can be used to convert spec.txt into +HTML or CommonMark (which can then be converted into other formats).

+

In the examples, the character is used to represent tabs.

+

Preliminaries

+

Characters and lines

+

Any sequence of [characters] is a valid CommonMark +document.

+

A character is a Unicode code point. Although some +code points (for example, combining accents) do not correspond to +characters in an intuitive sense, all code points count as characters +for purposes of this spec.

+

This spec does not specify an encoding; it thinks of lines as composed +of [characters] rather than bytes. A conforming parser may be limited +to a certain encoding.

+

A line is a sequence of zero or more [characters] +other than line feed (U+000A) or carriage return (U+000D), +followed by a [line ending] or by the end of file.

+

A line ending is a line feed (U+000A), a carriage return +(U+000D) not followed by a line feed, or a carriage return and a +following line feed.

+

A line containing no characters, or a line containing only spaces +(U+0020) or tabs (U+0009), is called a blank line.

+

The following definitions of character classes will be used in this spec:

+

A Unicode whitespace character is a character in the Unicode Zs general +category, or a tab (U+0009), line feed (U+000A), form feed (U+000C), or +carriage return (U+000D).

+

Unicode whitespace is a sequence of one or more +[Unicode whitespace characters].

+

A tab is U+0009.

+

A space is U+0020.

+

An ASCII control character is a character between U+0000–1F (both +including) or U+007F.

+

An ASCII punctuation character +is !, ", #, $, %, &, ', (, ), +*, +, ,, -, ., / (U+0021–2F), +:, ;, <, =, >, ?, @ (U+003A–0040), +[, \, ], ^, _, ` (U+005B–0060), +{, |, }, or ~ (U+007B–007E).

+

A Unicode punctuation character is a character in the Unicode P +(puncuation) or S (symbol) general categories.

+

Tabs

+

Tabs in lines are not expanded to [spaces]. However, +in contexts where spaces help to define block structure, +tabs behave as if they were replaced by spaces with a tab stop +of 4 characters.

+

Thus, for example, a tab can be used instead of four spaces +in an indented code block. (Note, however, that internal +tabs are passed through as literal tabs, not expanded to +spaces.)

+
→foo→baz→→bim
+.
+<pre><code>foo→baz→→bim
+</code></pre>
+
+
  →foo→baz→→bim
+.
+<pre><code>foo→baz→→bim
+</code></pre>
+
+
    a→a
+    ὐ→a
+.
+<pre><code>a→a
+ὐ→a
+</code></pre>
+
+

In the following example, a continuation paragraph of a list +item is indented with a tab; this has exactly the same effect +as indentation with four spaces would:

+
  - foo
+
+→bar
+.
+<ul>
+<li>
+<p>foo</p>
+<p>bar</p>
+</li>
+</ul>
+
+
- foo
+
+→→bar
+.
+<ul>
+<li>
+<p>foo</p>
+<pre><code>  bar
+</code></pre>
+</li>
+</ul>
+
+

Normally the > that begins a block quote may be followed +optionally by a space, which is not considered part of the +content. In the following case > is followed by a tab, +which is treated as if it were expanded into three spaces. +Since one of these spaces is considered part of the +delimiter, foo is considered to be indented six spaces +inside the block quote context, so we get an indented +code block starting with two spaces.

+
>→→foo
+.
+<blockquote>
+<pre><code>  foo
+</code></pre>
+</blockquote>
+
+
-→→foo
+.
+<ul>
+<li>
+<pre><code>  foo
+</code></pre>
+</li>
+</ul>
+
+
    foo
+→bar
+.
+<pre><code>foo
+bar
+</code></pre>
+
+
 - foo
+   - bar
+→ - baz
+.
+<ul>
+<li>foo
+<ul>
+<li>bar
+<ul>
+<li>baz</li>
+</ul>
+</li>
+</ul>
+</li>
+</ul>
+
+
#→Foo
+.
+<h1>Foo</h1>
+
+
*→*→*→
+.
+<hr />
+
+

Insecure characters

+

For security reasons, the Unicode character U+0000 must be replaced +with the REPLACEMENT CHARACTER (U+FFFD).

+

Backslash escapes

+

Any ASCII punctuation character may be backslash-escaped:

+
\!\"\#\$\%\&\'\(\)\*\+\,\-\.\/\:\;\<\=\>\?\@\[\\\]\^\_\`\{\|\}\~
+.
+<p>!&quot;#$%&amp;'()*+,-./:;&lt;=&gt;?@[\]^_`{|}~</p>
+
+

Backslashes before other characters are treated as literal +backslashes:

+
\→\A\a\ \3\φ\«
+.
+<p>\→\A\a\ \3\φ\«</p>
+
+

Escaped characters are treated as regular characters and do +not have their usual Markdown meanings:

+
\*not emphasized*
+\<br/> not a tag
+\[not a link](/foo)
+\`not code`
+1\. not a list
+\* not a list
+\# not a heading
+\[foo]: /url "not a reference"
+\&ouml; not a character entity
+.
+<p>*not emphasized*
+&lt;br/&gt; not a tag
+[not a link](/foo)
+`not code`
+1. not a list
+* not a list
+# not a heading
+[foo]: /url &quot;not a reference&quot;
+&amp;ouml; not a character entity</p>
+
+

If a backslash is itself escaped, the following character is not:

+
\\*emphasis*
+.
+<p>\<em>emphasis</em></p>
+
+

A backslash at the end of the line is a [hard line break]:

+
foo\
+bar
+.
+<p>foo<br />
+bar</p>
+
+

Backslash escapes do not work in code blocks, code spans, autolinks, or +raw HTML:

+
`` \[\` ``
+.
+<p><code>\[\`</code></p>
+
+
    \[\]
+.
+<pre><code>\[\]
+</code></pre>
+
+
~~~
+\[\]
+~~~
+.
+<pre><code>\[\]
+</code></pre>
+
+
<https://example.com?find=\*>
+.
+<p><a href="https://example.com?find=%5C*">https://example.com?find=\*</a></p>
+
+
<a href="/bar\/)">
+.
+<a href="/bar\/)">
+
+

But they work in all other contexts, including URLs and link titles, +link references, and [info strings] in [fenced code blocks]:

+
[foo](/bar\* "ti\*tle")
+.
+<p><a href="/bar*" title="ti*tle">foo</a></p>
+
+
[foo]
+
+[foo]: /bar\* "ti\*tle"
+.
+<p><a href="/bar*" title="ti*tle">foo</a></p>
+
+
``` foo\+bar
+foo
+```
+.
+<pre><code class="language-foo+bar">foo
+</code></pre>
+
+

Entity and numeric character references

+

Valid HTML entity references and numeric character references +can be used in place of the corresponding Unicode character, +with the following exceptions:

+
    +
  • +

    Entity and character references are not recognized in code +blocks and code spans.

    +
  • +
  • +

    Entity and character references cannot stand in place of +special characters that define structural elements in +CommonMark. For example, although &#42; can be used +in place of a literal * character, &#42; cannot replace +* in emphasis delimiters, bullet list markers, or thematic +breaks.

    +
  • +
+

Conforming CommonMark parsers need not store information about +whether a particular character was represented in the source +using a Unicode character or an entity reference.

+

Entity references consist of & + any of the valid +HTML5 entity names + ;. The +document https://html.spec.whatwg.org/entities.json +is used as an authoritative source for the valid entity +references and their corresponding code points.

+
&nbsp; &amp; &copy; &AElig; &Dcaron;
+&frac34; &HilbertSpace; &DifferentialD;
+&ClockwiseContourIntegral; &ngE;
+.
+<p>  &amp; © Æ Ď
+¾ ℋ ⅆ
+∲ ≧̸</p>
+
+

Decimal numeric character +references +consist of &# + a string of 1--7 arabic digits + ;. A +numeric character reference is parsed as the corresponding +Unicode character. Invalid Unicode code points will be replaced by +the REPLACEMENT CHARACTER (U+FFFD). For security reasons, +the code point U+0000 will also be replaced by U+FFFD.

+
&#35; &#1234; &#992; &#0;
+.
+<p># Ӓ Ϡ �</p>
+
+

Hexadecimal numeric character +references consist of &# + +either X or x + a string of 1-6 hexadecimal digits + ;. +They too are parsed as the corresponding Unicode character (this +time specified with a hexadecimal numeral instead of decimal).

+
&#X22; &#XD06; &#xcab;
+.
+<p>&quot; ആ ಫ</p>
+
+

Here are some nonentities:

+
&nbsp &x; &#; &#x;
+&#87654321;
+&#abcdef0;
+&ThisIsNotDefined; &hi?;
+.
+<p>&amp;nbsp &amp;x; &amp;#; &amp;#x;
+&amp;#87654321;
+&amp;#abcdef0;
+&amp;ThisIsNotDefined; &amp;hi?;</p>
+
+

Although HTML5 does accept some entity references +without a trailing semicolon (such as &copy), these are not +recognized here, because it makes the grammar too ambiguous:

+
&copy
+.
+<p>&amp;copy</p>
+
+

Strings that are not on the list of HTML5 named entities are not +recognized as entity references either:

+
&MadeUpEntity;
+.
+<p>&amp;MadeUpEntity;</p>
+
+

Entity and numeric character references are recognized in any +context besides code spans or code blocks, including +URLs, [link titles], and [fenced code block][] [info strings]:

+
<a href="&ouml;&ouml;.html">
+.
+<a href="&ouml;&ouml;.html">
+
+
[foo](/f&ouml;&ouml; "f&ouml;&ouml;")
+.
+<p><a href="/f%C3%B6%C3%B6" title="föö">foo</a></p>
+
+
[foo]
+
+[foo]: /f&ouml;&ouml; "f&ouml;&ouml;"
+.
+<p><a href="/f%C3%B6%C3%B6" title="föö">foo</a></p>
+
+
``` f&ouml;&ouml;
+foo
+```
+.
+<pre><code class="language-föö">foo
+</code></pre>
+
+

Entity and numeric character references are treated as literal +text in code spans and code blocks:

+
`f&ouml;&ouml;`
+.
+<p><code>f&amp;ouml;&amp;ouml;</code></p>
+
+
    f&ouml;f&ouml;
+.
+<pre><code>f&amp;ouml;f&amp;ouml;
+</code></pre>
+
+

Entity and numeric character references cannot be used +in place of symbols indicating structure in CommonMark +documents.

+
&#42;foo&#42;
+*foo*
+.
+<p>*foo*
+<em>foo</em></p>
+
+
&#42; foo
+
+* foo
+.
+<p>* foo</p>
+<ul>
+<li>foo</li>
+</ul>
+
+
foo&#10;&#10;bar
+.
+<p>foo
+
+bar</p>
+
+
&#9;foo
+.
+<p>→foo</p>
+
+
[a](url &quot;tit&quot;)
+.
+<p>[a](url &quot;tit&quot;)</p>
+
+

Blocks and inlines

+

We can think of a document as a sequence of +blocks---structural elements like paragraphs, block +quotations, lists, headings, rules, and code blocks. Some blocks (like +block quotes and list items) contain other blocks; others (like +headings and paragraphs) contain inline content---text, +links, emphasized text, images, code spans, and so on.

+

Precedence

+

Indicators of block structure always take precedence over indicators +of inline structure. So, for example, the following is a list with +two items, not a list with one item containing a code span:

+
- `one
+- two`
+.
+<ul>
+<li>`one</li>
+<li>two`</li>
+</ul>
+
+

This means that parsing can proceed in two steps: first, the block +structure of the document can be discerned; second, text lines inside +paragraphs, headings, and other block constructs can be parsed for inline +structure. The second step requires information about link reference +definitions that will be available only at the end of the first +step. Note that the first step requires processing lines in sequence, +but the second can be parallelized, since the inline parsing of +one block element does not affect the inline parsing of any other.

+

Container blocks and leaf blocks

+

We can divide blocks into two types: +container blocks, +which can contain other blocks, and leaf blocks, +which cannot.

+

Leaf blocks

+

This section describes the different kinds of leaf block that make up a +Markdown document.

+

Thematic breaks

+

A line consisting of optionally up to three spaces of indentation, followed by a +sequence of three or more matching -, _, or * characters, each followed +optionally by any number of spaces or tabs, forms a +thematic break.

+
***
+---
+___
+.
+<hr />
+<hr />
+<hr />
+
+

Wrong characters:

+
+++
+.
+<p>+++</p>
+
+
===
+.
+<p>===</p>
+
+

Not enough characters:

+
--
+**
+__
+.
+<p>--
+**
+__</p>
+
+

Up to three spaces of indentation are allowed:

+
 ***
+  ***
+   ***
+.
+<hr />
+<hr />
+<hr />
+
+

Four spaces of indentation is too many:

+
    ***
+.
+<pre><code>***
+</code></pre>
+
+
Foo
+    ***
+.
+<p>Foo
+***</p>
+
+

More than three characters may be used:

+
_____________________________________
+.
+<hr />
+
+

Spaces and tabs are allowed between the characters:

+
 - - -
+.
+<hr />
+
+
 **  * ** * ** * **
+.
+<hr />
+
+
-     -      -      -
+.
+<hr />
+
+

Spaces and tabs are allowed at the end:

+
- - - -    
+.
+<hr />
+
+

However, no other characters may occur in the line:

+
_ _ _ _ a
+
+a------
+
+---a---
+.
+<p>_ _ _ _ a</p>
+<p>a------</p>
+<p>---a---</p>
+
+

It is required that all of the characters other than spaces or tabs be the same. +So, this is not a thematic break:

+
 *-*
+.
+<p><em>-</em></p>
+
+

Thematic breaks do not need blank lines before or after:

+
- foo
+***
+- bar
+.
+<ul>
+<li>foo</li>
+</ul>
+<hr />
+<ul>
+<li>bar</li>
+</ul>
+
+

Thematic breaks can interrupt a paragraph:

+
Foo
+***
+bar
+.
+<p>Foo</p>
+<hr />
+<p>bar</p>
+
+

If a line of dashes that meets the above conditions for being a +thematic break could also be interpreted as the underline of a [setext +heading], the interpretation as a +[setext heading] takes precedence. Thus, for example, +this is a setext heading, not a paragraph followed by a thematic break:

+
Foo
+---
+bar
+.
+<h2>Foo</h2>
+<p>bar</p>
+
+

When both a thematic break and a list item are possible +interpretations of a line, the thematic break takes precedence:

+
* Foo
+* * *
+* Bar
+.
+<ul>
+<li>Foo</li>
+</ul>
+<hr />
+<ul>
+<li>Bar</li>
+</ul>
+
+

If you want a thematic break in a list item, use a different bullet:

+
- Foo
+- * * *
+.
+<ul>
+<li>Foo</li>
+<li>
+<hr />
+</li>
+</ul>
+
+

ATX headings

+

An ATX heading +consists of a string of characters, parsed as inline content, between an +opening sequence of 1--6 unescaped # characters and an optional +closing sequence of any number of unescaped # characters. +The opening sequence of # characters must be followed by spaces or tabs, or +by the end of line. The optional closing sequence of #s must be preceded by +spaces or tabs and may be followed by spaces or tabs only. The opening +# character may be preceded by up to three spaces of indentation. The raw +contents of the heading are stripped of leading and trailing space or tabs +before being parsed as inline content. The heading level is equal to the number +of # characters in the opening sequence.

+

Simple headings:

+
# foo
+## foo
+### foo
+#### foo
+##### foo
+###### foo
+.
+<h1>foo</h1>
+<h2>foo</h2>
+<h3>foo</h3>
+<h4>foo</h4>
+<h5>foo</h5>
+<h6>foo</h6>
+
+

More than six # characters is not a heading:

+
####### foo
+.
+<p>####### foo</p>
+
+

At least one space or tab is required between the # characters and the +heading's contents, unless the heading is empty. Note that many +implementations currently do not require the space. However, the +space was required by the +original ATX implementation, +and it helps prevent things like the following from being parsed as +headings:

+
#5 bolt
+
+#hashtag
+.
+<p>#5 bolt</p>
+<p>#hashtag</p>
+
+

This is not a heading, because the first # is escaped:

+
\## foo
+.
+<p>## foo</p>
+
+

Contents are parsed as inlines:

+
# foo *bar* \*baz\*
+.
+<h1>foo <em>bar</em> *baz*</h1>
+
+

Leading and trailing spaces or tabs are ignored in parsing inline content:

+
#                  foo                     
+.
+<h1>foo</h1>
+
+

Up to three spaces of indentation are allowed:

+
 ### foo
+  ## foo
+   # foo
+.
+<h3>foo</h3>
+<h2>foo</h2>
+<h1>foo</h1>
+
+

Four spaces of indentation is too many:

+
    # foo
+.
+<pre><code># foo
+</code></pre>
+
+
foo
+    # bar
+.
+<p>foo
+# bar</p>
+
+

A closing sequence of # characters is optional:

+
## foo ##
+  ###   bar    ###
+.
+<h2>foo</h2>
+<h3>bar</h3>
+
+

It need not be the same length as the opening sequence:

+
# foo ##################################
+##### foo ##
+.
+<h1>foo</h1>
+<h5>foo</h5>
+
+

Spaces or tabs are allowed after the closing sequence:

+
### foo ###     
+.
+<h3>foo</h3>
+
+

A sequence of # characters with anything but spaces or tabs following it +is not a closing sequence, but counts as part of the contents of the +heading:

+
### foo ### b
+.
+<h3>foo ### b</h3>
+
+

The closing sequence must be preceded by a space or tab:

+
# foo#
+.
+<h1>foo#</h1>
+
+

Backslash-escaped # characters do not count as part +of the closing sequence:

+
### foo \###
+## foo #\##
+# foo \#
+.
+<h3>foo ###</h3>
+<h2>foo ###</h2>
+<h1>foo #</h1>
+
+

ATX headings need not be separated from surrounding content by blank +lines, and they can interrupt paragraphs:

+
****
+## foo
+****
+.
+<hr />
+<h2>foo</h2>
+<hr />
+
+
Foo bar
+# baz
+Bar foo
+.
+<p>Foo bar</p>
+<h1>baz</h1>
+<p>Bar foo</p>
+
+

ATX headings can be empty:

+
## 
+#
+### ###
+.
+<h2></h2>
+<h1></h1>
+<h3></h3>
+
+

Setext headings

+

A setext heading consists of one or more +lines of text, not interrupted by a blank line, of which the first line does not +have more than 3 spaces of indentation, followed by +a [setext heading underline]. The lines of text must be such +that, were they not followed by the setext heading underline, +they would be interpreted as a paragraph: they cannot be +interpretable as a [code fence], [ATX heading][ATX headings], +[block quote][block quotes], [thematic break][thematic breaks], +[list item][list items], or [HTML block][HTML blocks].

+

A setext heading underline is a sequence of += characters or a sequence of - characters, with no more than 3 +spaces of indentation and any number of trailing spaces or tabs.

+

The heading is a level 1 heading if = characters are used in +the [setext heading underline], and a level 2 heading if - +characters are used. The contents of the heading are the result +of parsing the preceding lines of text as CommonMark inline +content.

+

In general, a setext heading need not be preceded or followed by a +blank line. However, it cannot interrupt a paragraph, so when a +setext heading comes after a paragraph, a blank line is needed between +them.

+

Simple examples:

+
Foo *bar*
+=========
+
+Foo *bar*
+---------
+.
+<h1>Foo <em>bar</em></h1>
+<h2>Foo <em>bar</em></h2>
+
+

The content of the header may span more than one line:

+
Foo *bar
+baz*
+====
+.
+<h1>Foo <em>bar
+baz</em></h1>
+
+

The contents are the result of parsing the headings's raw +content as inlines. The heading's raw content is formed by +concatenating the lines and removing initial and final +spaces or tabs.

+
  Foo *bar
+baz*→
+====
+.
+<h1>Foo <em>bar
+baz</em></h1>
+
+

The underlining can be any length:

+
Foo
+-------------------------
+
+Foo
+=
+.
+<h2>Foo</h2>
+<h1>Foo</h1>
+
+

The heading content can be preceded by up to three spaces of indentation, and +need not line up with the underlining:

+
   Foo
+---
+
+  Foo
+-----
+
+  Foo
+  ===
+.
+<h2>Foo</h2>
+<h2>Foo</h2>
+<h1>Foo</h1>
+
+

Four spaces of indentation is too many:

+
    Foo
+    ---
+
+    Foo
+---
+.
+<pre><code>Foo
+---
+
+Foo
+</code></pre>
+<hr />
+
+

The setext heading underline can be preceded by up to three spaces of +indentation, and may have trailing spaces or tabs:

+
Foo
+   ----      
+.
+<h2>Foo</h2>
+
+

Four spaces of indentation is too many:

+
Foo
+    ---
+.
+<p>Foo
+---</p>
+
+

The setext heading underline cannot contain internal spaces or tabs:

+
Foo
+= =
+
+Foo
+--- -
+.
+<p>Foo
+= =</p>
+<p>Foo</p>
+<hr />
+
+

Trailing spaces or tabs in the content line do not cause a hard line break:

+
Foo  
+-----
+.
+<h2>Foo</h2>
+
+

Nor does a backslash at the end:

+
Foo\
+----
+.
+<h2>Foo\</h2>
+
+

Since indicators of block structure take precedence over +indicators of inline structure, the following are setext headings:

+
`Foo
+----
+`
+
+<a title="a lot
+---
+of dashes"/>
+.
+<h2>`Foo</h2>
+<p>`</p>
+<h2>&lt;a title=&quot;a lot</h2>
+<p>of dashes&quot;/&gt;</p>
+
+

The setext heading underline cannot be a [lazy continuation +line] in a list item or block quote:

+
> Foo
+---
+.
+<blockquote>
+<p>Foo</p>
+</blockquote>
+<hr />
+
+
> foo
+bar
+===
+.
+<blockquote>
+<p>foo
+bar
+===</p>
+</blockquote>
+
+
- Foo
+---
+.
+<ul>
+<li>Foo</li>
+</ul>
+<hr />
+
+

A blank line is needed between a paragraph and a following +setext heading, since otherwise the paragraph becomes part +of the heading's content:

+
Foo
+Bar
+---
+.
+<h2>Foo
+Bar</h2>
+
+

But in general a blank line is not required before or after +setext headings:

+
---
+Foo
+---
+Bar
+---
+Baz
+.
+<hr />
+<h2>Foo</h2>
+<h2>Bar</h2>
+<p>Baz</p>
+
+

Setext headings cannot be empty:

+

+====
+.
+<p>====</p>
+
+

Setext heading text lines must not be interpretable as block +constructs other than paragraphs. So, the line of dashes +in these examples gets interpreted as a thematic break:

+
---
+---
+.
+<hr />
+<hr />
+
+
- foo
+-----
+.
+<ul>
+<li>foo</li>
+</ul>
+<hr />
+
+
    foo
+---
+.
+<pre><code>foo
+</code></pre>
+<hr />
+
+
> foo
+-----
+.
+<blockquote>
+<p>foo</p>
+</blockquote>
+<hr />
+
+

If you want a heading with > foo as its literal text, you can +use backslash escapes:

+
\> foo
+------
+.
+<h2>&gt; foo</h2>
+
+

Compatibility note: Most existing Markdown implementations +do not allow the text of setext headings to span multiple lines. +But there is no consensus about how to interpret

+
Foo
+bar
+---
+baz
+
+

One can find four different interpretations:

+
    +
  1. paragraph "Foo", heading "bar", paragraph "baz"
  2. +
  3. paragraph "Foo bar", thematic break, paragraph "baz"
  4. +
  5. paragraph "Foo bar --- baz"
  6. +
  7. heading "Foo bar", paragraph "baz"
  8. +
+

We find interpretation 4 most natural, and interpretation 4 +increases the expressive power of CommonMark, by allowing +multiline headings. Authors who want interpretation 1 can +put a blank line after the first paragraph:

+
Foo
+
+bar
+---
+baz
+.
+<p>Foo</p>
+<h2>bar</h2>
+<p>baz</p>
+
+

Authors who want interpretation 2 can put blank lines around +the thematic break,

+
Foo
+bar
+
+---
+
+baz
+.
+<p>Foo
+bar</p>
+<hr />
+<p>baz</p>
+
+

or use a thematic break that cannot count as a [setext heading +underline], such as

+
Foo
+bar
+* * *
+baz
+.
+<p>Foo
+bar</p>
+<hr />
+<p>baz</p>
+
+

Authors who want interpretation 3 can use backslash escapes:

+
Foo
+bar
+\---
+baz
+.
+<p>Foo
+bar
+---
+baz</p>
+
+

Indented code blocks

+

An indented code block is composed of one or more +[indented chunks] separated by blank lines. +An indented chunk is a sequence of non-blank lines, +each preceded by four or more spaces of indentation. The contents of the code +block are the literal contents of the lines, including trailing +[line endings], minus four spaces of indentation. +An indented code block has no [info string].

+

An indented code block cannot interrupt a paragraph, so there must be +a blank line between a paragraph and a following indented code block. +(A blank line is not needed, however, between a code block and a following +paragraph.)

+
    a simple
+      indented code block
+.
+<pre><code>a simple
+  indented code block
+</code></pre>
+
+

If there is any ambiguity between an interpretation of indentation +as a code block and as indicating that material belongs to a [list +item][list items], the list item interpretation takes precedence:

+
  - foo
+
+    bar
+.
+<ul>
+<li>
+<p>foo</p>
+<p>bar</p>
+</li>
+</ul>
+
+
1.  foo
+
+    - bar
+.
+<ol>
+<li>
+<p>foo</p>
+<ul>
+<li>bar</li>
+</ul>
+</li>
+</ol>
+
+

The contents of a code block are literal text, and do not get parsed +as Markdown:

+
    <a/>
+    *hi*
+
+    - one
+.
+<pre><code>&lt;a/&gt;
+*hi*
+
+- one
+</code></pre>
+
+

Here we have three chunks separated by blank lines:

+
    chunk1
+
+    chunk2
+  
+ 
+ 
+    chunk3
+.
+<pre><code>chunk1
+
+chunk2
+
+
+
+chunk3
+</code></pre>
+
+

Any initial spaces or tabs beyond four spaces of indentation will be included in +the content, even in interior blank lines:

+
    chunk1
+      
+      chunk2
+.
+<pre><code>chunk1
+  
+  chunk2
+</code></pre>
+
+

An indented code block cannot interrupt a paragraph. (This +allows hanging indents and the like.)

+
Foo
+    bar
+
+.
+<p>Foo
+bar</p>
+
+

However, any non-blank line with fewer than four spaces of indentation ends +the code block immediately. So a paragraph may occur immediately +after indented code:

+
    foo
+bar
+.
+<pre><code>foo
+</code></pre>
+<p>bar</p>
+
+

And indented code can occur immediately before and after other kinds of +blocks:

+
# Heading
+    foo
+Heading
+------
+    foo
+----
+.
+<h1>Heading</h1>
+<pre><code>foo
+</code></pre>
+<h2>Heading</h2>
+<pre><code>foo
+</code></pre>
+<hr />
+
+

The first line can be preceded by more than four spaces of indentation:

+
        foo
+    bar
+.
+<pre><code>    foo
+bar
+</code></pre>
+
+

Blank lines preceding or following an indented code block +are not included in it:

+

+    
+    foo
+    
+
+.
+<pre><code>foo
+</code></pre>
+
+

Trailing spaces or tabs are included in the code block's content:

+
    foo  
+.
+<pre><code>foo  
+</code></pre>
+
+

Fenced code blocks

+

A code fence is a sequence +of at least three consecutive backtick characters (`) or +tildes (~). (Tildes and backticks cannot be mixed.) +A fenced code block +begins with a code fence, preceded by up to three spaces of indentation.

+

The line with the opening code fence may optionally contain some text +following the code fence; this is trimmed of leading and trailing +spaces or tabs and called the info string. If the [info string] comes +after a backtick fence, it may not contain any backtick +characters. (The reason for this restriction is that otherwise +some inline code would be incorrectly interpreted as the +beginning of a fenced code block.)

+

The content of the code block consists of all subsequent lines, until +a closing [code fence] of the same type as the code block +began with (backticks or tildes), and with at least as many backticks +or tildes as the opening code fence. If the leading code fence is +preceded by N spaces of indentation, then up to N spaces of indentation are +removed from each line of the content (if present). (If a content line is not +indented, it is preserved unchanged. If it is indented N spaces or less, all +of the indentation is removed.)

+

The closing code fence may be preceded by up to three spaces of indentation, and +may be followed only by spaces or tabs, which are ignored. If the end of the +containing block (or document) is reached and no closing code fence +has been found, the code block contains all of the lines after the +opening code fence until the end of the containing block (or +document). (An alternative spec would require backtracking in the +event that a closing code fence is not found. But this makes parsing +much less efficient, and there seems to be no real downside to the +behavior described here.)

+

A fenced code block may interrupt a paragraph, and does not require +a blank line either before or after.

+

The content of a code fence is treated as literal text, not parsed +as inlines. The first word of the [info string] is typically used to +specify the language of the code sample, and rendered in the class +attribute of the code tag. However, this spec does not mandate any +particular treatment of the [info string].

+

Here is a simple example with backticks:

+
```
+<
+ >
+```
+.
+<pre><code>&lt;
+ &gt;
+</code></pre>
+
+

With tildes:

+
~~~
+<
+ >
+~~~
+.
+<pre><code>&lt;
+ &gt;
+</code></pre>
+
+

Fewer than three backticks is not enough:

+
``
+foo
+``
+.
+<p><code>foo</code></p>
+
+

The closing code fence must use the same character as the opening +fence:

+
```
+aaa
+~~~
+```
+.
+<pre><code>aaa
+~~~
+</code></pre>
+
+
~~~
+aaa
+```
+~~~
+.
+<pre><code>aaa
+```
+</code></pre>
+
+

The closing code fence must be at least as long as the opening fence:

+
````
+aaa
+```
+``````
+.
+<pre><code>aaa
+```
+</code></pre>
+
+
~~~~
+aaa
+~~~
+~~~~
+.
+<pre><code>aaa
+~~~
+</code></pre>
+
+

Unclosed code blocks are closed by the end of the document +(or the enclosing [block quote][block quotes] or [list item][list items]):

+
```
+.
+<pre><code></code></pre>
+
+
`````
+
+```
+aaa
+.
+<pre><code>
+```
+aaa
+</code></pre>
+
+
> ```
+> aaa
+
+bbb
+.
+<blockquote>
+<pre><code>aaa
+</code></pre>
+</blockquote>
+<p>bbb</p>
+
+

A code block can have all empty lines as its content:

+
```
+
+  
+```
+.
+<pre><code>
+  
+</code></pre>
+
+

A code block can be empty:

+
```
+```
+.
+<pre><code></code></pre>
+
+

Fences can be indented. If the opening fence is indented, +content lines will have equivalent opening indentation removed, +if present:

+
 ```
+ aaa
+aaa
+```
+.
+<pre><code>aaa
+aaa
+</code></pre>
+
+
  ```
+aaa
+  aaa
+aaa
+  ```
+.
+<pre><code>aaa
+aaa
+aaa
+</code></pre>
+
+
   ```
+   aaa
+    aaa
+  aaa
+   ```
+.
+<pre><code>aaa
+ aaa
+aaa
+</code></pre>
+
+

Four spaces of indentation is too many:

+
    ```
+    aaa
+    ```
+.
+<pre><code>```
+aaa
+```
+</code></pre>
+
+

Closing fences may be preceded by up to three spaces of indentation, and their +indentation need not match that of the opening fence:

+
```
+aaa
+  ```
+.
+<pre><code>aaa
+</code></pre>
+
+
   ```
+aaa
+  ```
+.
+<pre><code>aaa
+</code></pre>
+
+

This is not a closing fence, because it is indented 4 spaces:

+
```
+aaa
+    ```
+.
+<pre><code>aaa
+    ```
+</code></pre>
+
+

Code fences (opening and closing) cannot contain internal spaces or tabs:

+
``` ```
+aaa
+.
+<p><code> </code>
+aaa</p>
+
+
~~~~~~
+aaa
+~~~ ~~
+.
+<pre><code>aaa
+~~~ ~~
+</code></pre>
+
+

Fenced code blocks can interrupt paragraphs, and can be followed +directly by paragraphs, without a blank line between:

+
foo
+```
+bar
+```
+baz
+.
+<p>foo</p>
+<pre><code>bar
+</code></pre>
+<p>baz</p>
+
+

Other blocks can also occur before and after fenced code blocks +without an intervening blank line:

+
foo
+---
+~~~
+bar
+~~~
+# baz
+.
+<h2>foo</h2>
+<pre><code>bar
+</code></pre>
+<h1>baz</h1>
+
+

An [info string] can be provided after the opening code fence. +Although this spec doesn't mandate any particular treatment of +the info string, the first word is typically used to specify +the language of the code block. In HTML output, the language is +normally indicated by adding a class to the code element consisting +of language- followed by the language name.

+
```ruby
+def foo(x)
+  return 3
+end
+```
+.
+<pre><code class="language-ruby">def foo(x)
+  return 3
+end
+</code></pre>
+
+
~~~~    ruby startline=3 $%@#$
+def foo(x)
+  return 3
+end
+~~~~~~~
+.
+<pre><code class="language-ruby">def foo(x)
+  return 3
+end
+</code></pre>
+
+
````;
+````
+.
+<pre><code class="language-;"></code></pre>
+
+

[Info strings] for backtick code blocks cannot contain backticks:

+
``` aa ```
+foo
+.
+<p><code>aa</code>
+foo</p>
+
+

[Info strings] for tilde code blocks can contain backticks and tildes:

+
~~~ aa ``` ~~~
+foo
+~~~
+.
+<pre><code class="language-aa">foo
+</code></pre>
+
+

Closing code fences cannot have [info strings]:

+
```
+``` aaa
+```
+.
+<pre><code>``` aaa
+</code></pre>
+
+

HTML blocks

+

An HTML block is a group of lines that is treated +as raw HTML (and will not be escaped in HTML output).

+

There are seven kinds of [HTML block], which can be defined by their +start and end conditions. The block begins with a line that meets a +start condition (after up to three optional spaces of indentation). +It ends with the first subsequent line that meets a matching +end condition, or the last line of the document, or the last line of +the container block containing the current HTML +block, if no line is encountered that meets the [end condition]. If +the first line meets both the [start condition] and the [end +condition], the block will contain just that line.

+
    +
  1. +

    Start condition: line begins with the string <pre, +<script, <style, or <textarea (case-insensitive), followed by a space, +a tab, the string >, or the end of the line.
    +End condition: line contains an end tag +</pre>, </script>, </style>, or </textarea> (case-insensitive; it +need not match the start tag).

    +
  2. +
  3. +

    Start condition: line begins with the string <!--.
    +End condition: line contains the string -->.

    +
  4. +
  5. +

    Start condition: line begins with the string <?.
    +End condition: line contains the string ?>.

    +
  6. +
  7. +

    Start condition: line begins with the string <! +followed by an ASCII letter.
    +End condition: line contains the character >.

    +
  8. +
  9. +

    Start condition: line begins with the string +<![CDATA[.
    +End condition: line contains the string ]]>.

    +
  10. +
  11. +

    Start condition: line begins with the string < or </ +followed by one of the strings (case-insensitive) address, +article, aside, base, basefont, blockquote, body, +caption, center, col, colgroup, dd, details, dialog, +dir, div, dl, dt, fieldset, figcaption, figure, +footer, form, frame, frameset, +h1, h2, h3, h4, h5, h6, head, header, hr, +html, iframe, legend, li, link, main, menu, menuitem, +nav, noframes, ol, optgroup, option, p, param, +search, section, summary, table, tbody, td, +tfoot, th, thead, title, tr, track, ul, followed +by a space, a tab, the end of the line, the string >, or +the string />.
    +End condition: line is followed by a [blank line].

    +
  12. +
  13. +

    Start condition: line begins with a complete [open tag] +(with any [tag name] other than pre, script, +style, or textarea) or a complete [closing tag], +followed by zero or more spaces and tabs, followed by the end of the line.
    +End condition: line is followed by a [blank line].

    +
  14. +
+

HTML blocks continue until they are closed by their appropriate +[end condition], or the last line of the document or other container +block. This means any HTML within an HTML +block that might otherwise be recognised as a start condition will +be ignored by the parser and passed through as-is, without changing +the parser's state.

+

For instance, <pre> within an HTML block started by <table> will not affect +the parser state; as the HTML block was started in by start condition 6, it +will end at any blank line. This can be surprising:

+
<table><tr><td>
+<pre>
+**Hello**,
+
+_world_.
+</pre>
+</td></tr></table>
+.
+<table><tr><td>
+<pre>
+**Hello**,
+<p><em>world</em>.
+</pre></p>
+</td></tr></table>
+
+

In this case, the HTML block is terminated by the blank line — the **Hello** +text remains verbatim — and regular parsing resumes, with a paragraph, +emphasised world and inline and block HTML following.

+

All types of [HTML blocks] except type 7 may interrupt +a paragraph. Blocks of type 7 may not interrupt a paragraph. +(This restriction is intended to prevent unwanted interpretation +of long tags inside a wrapped paragraph as starting HTML blocks.)

+

Some simple examples follow. Here are some basic HTML blocks +of type 6:

+
<table>
+  <tr>
+    <td>
+           hi
+    </td>
+  </tr>
+</table>
+
+okay.
+.
+<table>
+  <tr>
+    <td>
+           hi
+    </td>
+  </tr>
+</table>
+<p>okay.</p>
+
+
 <div>
+  *hello*
+         <foo><a>
+.
+ <div>
+  *hello*
+         <foo><a>
+
+

A block can also start with a closing tag:

+
</div>
+*foo*
+.
+</div>
+*foo*
+
+

Here we have two HTML blocks with a Markdown paragraph between them:

+
<DIV CLASS="foo">
+
+*Markdown*
+
+</DIV>
+.
+<DIV CLASS="foo">
+<p><em>Markdown</em></p>
+</DIV>
+
+

The tag on the first line can be partial, as long +as it is split where there would be whitespace:

+
<div id="foo"
+  class="bar">
+</div>
+.
+<div id="foo"
+  class="bar">
+</div>
+
+
<div id="foo" class="bar
+  baz">
+</div>
+.
+<div id="foo" class="bar
+  baz">
+</div>
+
+

An open tag need not be closed:

+
<div>
+*foo*
+
+*bar*
+.
+<div>
+*foo*
+<p><em>bar</em></p>
+
+

A partial tag need not even be completed (garbage +in, garbage out):

+
<div id="foo"
+*hi*
+.
+<div id="foo"
+*hi*
+
+
<div class
+foo
+.
+<div class
+foo
+
+

The initial tag doesn't even need to be a valid +tag, as long as it starts like one:

+
<div *???-&&&-<---
+*foo*
+.
+<div *???-&&&-<---
+*foo*
+
+

In type 6 blocks, the initial tag need not be on a line by +itself:

+
<div><a href="bar">*foo*</a></div>
+.
+<div><a href="bar">*foo*</a></div>
+
+
<table><tr><td>
+foo
+</td></tr></table>
+.
+<table><tr><td>
+foo
+</td></tr></table>
+
+

Everything until the next blank line or end of document +gets included in the HTML block. So, in the following +example, what looks like a Markdown code block +is actually part of the HTML block, which continues until a blank +line or the end of the document is reached:

+
<div></div>
+``` c
+int x = 33;
+```
+.
+<div></div>
+``` c
+int x = 33;
+```
+
+

To start an [HTML block] with a tag that is not in the +list of block-level tags in (6), you must put the tag by +itself on the first line (and it must be complete):

+
<a href="foo">
+*bar*
+</a>
+.
+<a href="foo">
+*bar*
+</a>
+
+

In type 7 blocks, the [tag name] can be anything:

+
<Warning>
+*bar*
+</Warning>
+.
+<Warning>
+*bar*
+</Warning>
+
+
<i class="foo">
+*bar*
+</i>
+.
+<i class="foo">
+*bar*
+</i>
+
+
</ins>
+*bar*
+.
+</ins>
+*bar*
+
+

These rules are designed to allow us to work with tags that +can function as either block-level or inline-level tags. +The <del> tag is a nice example. We can surround content with +<del> tags in three different ways. In this case, we get a raw +HTML block, because the <del> tag is on a line by itself:

+
<del>
+*foo*
+</del>
+.
+<del>
+*foo*
+</del>
+
+

In this case, we get a raw HTML block that just includes +the <del> tag (because it ends with the following blank +line). So the contents get interpreted as CommonMark:

+
<del>
+
+*foo*
+
+</del>
+.
+<del>
+<p><em>foo</em></p>
+</del>
+
+

Finally, in this case, the <del> tags are interpreted +as [raw HTML] inside the CommonMark paragraph. (Because +the tag is not on a line by itself, we get inline HTML +rather than an [HTML block].)

+
<del>*foo*</del>
+.
+<p><del><em>foo</em></del></p>
+
+

HTML tags designed to contain literal content +(pre, script, style, textarea), comments, processing instructions, +and declarations are treated somewhat differently. +Instead of ending at the first blank line, these blocks +end at the first line containing a corresponding end tag. +As a result, these blocks can contain blank lines:

+

A pre tag (type 1):

+
<pre language="haskell"><code>
+import Text.HTML.TagSoup
+
+main :: IO ()
+main = print $ parseTags tags
+</code></pre>
+okay
+.
+<pre language="haskell"><code>
+import Text.HTML.TagSoup
+
+main :: IO ()
+main = print $ parseTags tags
+</code></pre>
+<p>okay</p>
+
+

A script tag (type 1):

+
<script type="text/javascript">
+// JavaScript example
+
+document.getElementById("demo").innerHTML = "Hello JavaScript!";
+</script>
+okay
+.
+<script type="text/javascript">
+// JavaScript example
+
+document.getElementById("demo").innerHTML = "Hello JavaScript!";
+</script>
+<p>okay</p>
+
+

A textarea tag (type 1):

+
<textarea>
+
+*foo*
+
+_bar_
+
+</textarea>
+.
+<textarea>
+
+*foo*
+
+_bar_
+
+</textarea>
+
+

A style tag (type 1):

+
<style
+  type="text/css">
+h1 {color:red;}
+
+p {color:blue;}
+</style>
+okay
+.
+<style
+  type="text/css">
+h1 {color:red;}
+
+p {color:blue;}
+</style>
+<p>okay</p>
+
+

If there is no matching end tag, the block will end at the +end of the document (or the enclosing [block quote][block quotes] +or [list item][list items]):

+
<style
+  type="text/css">
+
+foo
+.
+<style
+  type="text/css">
+
+foo
+
+
> <div>
+> foo
+
+bar
+.
+<blockquote>
+<div>
+foo
+</blockquote>
+<p>bar</p>
+
+
- <div>
+- foo
+.
+<ul>
+<li>
+<div>
+</li>
+<li>foo</li>
+</ul>
+
+

The end tag can occur on the same line as the start tag:

+
<style>p{color:red;}</style>
+*foo*
+.
+<style>p{color:red;}</style>
+<p><em>foo</em></p>
+
+
<!-- foo -->*bar*
+*baz*
+.
+<!-- foo -->*bar*
+<p><em>baz</em></p>
+
+

Note that anything on the last line after the +end tag will be included in the [HTML block]:

+
<script>
+foo
+</script>1. *bar*
+.
+<script>
+foo
+</script>1. *bar*
+
+

A comment (type 2):

+
<!-- Foo
+
+bar
+   baz -->
+okay
+.
+<!-- Foo
+
+bar
+   baz -->
+<p>okay</p>
+
+

A processing instruction (type 3):

+
<?php
+
+  echo '>';
+
+?>
+okay
+.
+<?php
+
+  echo '>';
+
+?>
+<p>okay</p>
+
+

A declaration (type 4):

+
<!DOCTYPE html>
+.
+<!DOCTYPE html>
+
+

CDATA (type 5):

+
<![CDATA[
+function matchwo(a,b)
+{
+  if (a < b && a < 0) then {
+    return 1;
+
+  } else {
+
+    return 0;
+  }
+}
+]]>
+okay
+.
+<![CDATA[
+function matchwo(a,b)
+{
+  if (a < b && a < 0) then {
+    return 1;
+
+  } else {
+
+    return 0;
+  }
+}
+]]>
+<p>okay</p>
+
+

The opening tag can be preceded by up to three spaces of indentation, but not +four:

+
  <!-- foo -->
+
+    <!-- foo -->
+.
+  <!-- foo -->
+<pre><code>&lt;!-- foo --&gt;
+</code></pre>
+
+
  <div>
+
+    <div>
+.
+  <div>
+<pre><code>&lt;div&gt;
+</code></pre>
+
+

An HTML block of types 1--6 can interrupt a paragraph, and need not be +preceded by a blank line.

+
Foo
+<div>
+bar
+</div>
+.
+<p>Foo</p>
+<div>
+bar
+</div>
+
+

However, a following blank line is needed, except at the end of +a document, and except for blocks of types 1--5, [above][HTML +block]:

+
<div>
+bar
+</div>
+*foo*
+.
+<div>
+bar
+</div>
+*foo*
+
+

HTML blocks of type 7 cannot interrupt a paragraph:

+
Foo
+<a href="bar">
+baz
+.
+<p>Foo
+<a href="bar">
+baz</p>
+
+

This rule differs from John Gruber's original Markdown syntax +specification, which says:

+
+

The only restrictions are that block-level HTML elements — +e.g. <div>, <table>, <pre>, <p>, etc. — must be separated from +surrounding content by blank lines, and the start and end tags of the +block should not be indented with spaces or tabs.

+
+

In some ways Gruber's rule is more restrictive than the one given +here:

+
    +
  • It requires that an HTML block be preceded by a blank line.
  • +
  • It does not allow the start tag to be indented.
  • +
  • It requires a matching end tag, which it also does not allow to +be indented.
  • +
+

Most Markdown implementations (including some of Gruber's own) do not +respect all of these restrictions.

+

There is one respect, however, in which Gruber's rule is more liberal +than the one given here, since it allows blank lines to occur inside +an HTML block. There are two reasons for disallowing them here. +First, it removes the need to parse balanced tags, which is +expensive and can require backtracking from the end of the document +if no matching end tag is found. Second, it provides a very simple +and flexible way of including Markdown content inside HTML tags: +simply separate the Markdown from the HTML using blank lines:

+

Compare:

+
<div>
+
+*Emphasized* text.
+
+</div>
+.
+<div>
+<p><em>Emphasized</em> text.</p>
+</div>
+
+
<div>
+*Emphasized* text.
+</div>
+.
+<div>
+*Emphasized* text.
+</div>
+
+

Some Markdown implementations have adopted a convention of +interpreting content inside tags as text if the open tag has +the attribute markdown=1. The rule given above seems a simpler and +more elegant way of achieving the same expressive power, which is also +much simpler to parse.

+

The main potential drawback is that one can no longer paste HTML +blocks into Markdown documents with 100% reliability. However, +in most cases this will work fine, because the blank lines in +HTML are usually followed by HTML block tags. For example:

+
<table>
+
+<tr>
+
+<td>
+Hi
+</td>
+
+</tr>
+
+</table>
+.
+<table>
+<tr>
+<td>
+Hi
+</td>
+</tr>
+</table>
+
+

There are problems, however, if the inner tags are indented +and separated by spaces, as then they will be interpreted as +an indented code block:

+
<table>
+
+  <tr>
+
+    <td>
+      Hi
+    </td>
+
+  </tr>
+
+</table>
+.
+<table>
+  <tr>
+<pre><code>&lt;td&gt;
+  Hi
+&lt;/td&gt;
+</code></pre>
+  </tr>
+</table>
+
+

Fortunately, blank lines are usually not necessary and can be +deleted. The exception is inside <pre> tags, but as described +[above][HTML blocks], raw HTML blocks starting with <pre> +can contain blank lines.

+

Link reference definitions

+

A link reference definition +consists of a [link label], optionally preceded by up to three spaces of +indentation, followed +by a colon (:), optional spaces or tabs (including up to one +[line ending]), a [link destination], +optional spaces or tabs (including up to one +[line ending]), and an optional [link +title], which if it is present must be separated +from the [link destination] by spaces or tabs. +No further character may occur.

+

A [link reference definition] +does not correspond to a structural element of a document. Instead, it +defines a label which can be used in [reference links] +and reference-style [images] elsewhere in the document. [Link +reference definitions] can come either before or after the links that use +them.

+
[foo]: /url "title"
+
+[foo]
+.
+<p><a href="/url" title="title">foo</a></p>
+
+
   [foo]: 
+      /url  
+           'the title'  
+
+[foo]
+.
+<p><a href="/url" title="the title">foo</a></p>
+
+
[Foo*bar\]]:my_(url) 'title (with parens)'
+
+[Foo*bar\]]
+.
+<p><a href="my_(url)" title="title (with parens)">Foo*bar]</a></p>
+
+
[Foo bar]:
+<my url>
+'title'
+
+[Foo bar]
+.
+<p><a href="my%20url" title="title">Foo bar</a></p>
+
+

The title may extend over multiple lines:

+
[foo]: /url '
+title
+line1
+line2
+'
+
+[foo]
+.
+<p><a href="/url" title="
+title
+line1
+line2
+">foo</a></p>
+
+

However, it may not contain a [blank line]:

+
[foo]: /url 'title
+
+with blank line'
+
+[foo]
+.
+<p>[foo]: /url 'title</p>
+<p>with blank line'</p>
+<p>[foo]</p>
+
+

The title may be omitted:

+
[foo]:
+/url
+
+[foo]
+.
+<p><a href="/url">foo</a></p>
+
+

The link destination may not be omitted:

+
[foo]:
+
+[foo]
+.
+<p>[foo]:</p>
+<p>[foo]</p>
+
+

However, an empty link destination may be specified using +angle brackets:

+
[foo]: <>
+
+[foo]
+.
+<p><a href="">foo</a></p>
+
+

The title must be separated from the link destination by +spaces or tabs:

+
[foo]: <bar>(baz)
+
+[foo]
+.
+<p>[foo]: <bar>(baz)</p>
+<p>[foo]</p>
+
+

Both title and destination can contain backslash escapes +and literal backslashes:

+
[foo]: /url\bar\*baz "foo\"bar\baz"
+
+[foo]
+.
+<p><a href="/url%5Cbar*baz" title="foo&quot;bar\baz">foo</a></p>
+
+

A link can come before its corresponding definition:

+
[foo]
+
+[foo]: url
+.
+<p><a href="url">foo</a></p>
+
+

If there are several matching definitions, the first one takes +precedence:

+
[foo]
+
+[foo]: first
+[foo]: second
+.
+<p><a href="first">foo</a></p>
+
+

As noted in the section on [Links], matching of labels is +case-insensitive (see [matches]).

+
[FOO]: /url
+
+[Foo]
+.
+<p><a href="/url">Foo</a></p>
+
+
[ΑΓΩ]: /φου
+
+[αγω]
+.
+<p><a href="/%CF%86%CE%BF%CF%85">αγω</a></p>
+
+

Whether something is a [link reference definition] is +independent of whether the link reference it defines is +used in the document. Thus, for example, the following +document contains just a link reference definition, and +no visible content:

+
[foo]: /url
+.
+
+

Here is another one:

+
[
+foo
+]: /url
+bar
+.
+<p>bar</p>
+
+

This is not a link reference definition, because there are +characters other than spaces or tabs after the title:

+
[foo]: /url "title" ok
+.
+<p>[foo]: /url &quot;title&quot; ok</p>
+
+

This is a link reference definition, but it has no title:

+
[foo]: /url
+"title" ok
+.
+<p>&quot;title&quot; ok</p>
+
+

This is not a link reference definition, because it is indented +four spaces:

+
    [foo]: /url "title"
+
+[foo]
+.
+<pre><code>[foo]: /url &quot;title&quot;
+</code></pre>
+<p>[foo]</p>
+
+

This is not a link reference definition, because it occurs inside +a code block:

+
```
+[foo]: /url
+```
+
+[foo]
+.
+<pre><code>[foo]: /url
+</code></pre>
+<p>[foo]</p>
+
+

A [link reference definition] cannot interrupt a paragraph.

+
Foo
+[bar]: /baz
+
+[bar]
+.
+<p>Foo
+[bar]: /baz</p>
+<p>[bar]</p>
+
+

However, it can directly follow other block elements, such as headings +and thematic breaks, and it need not be followed by a blank line.

+
# [Foo]
+[foo]: /url
+> bar
+.
+<h1><a href="/url">Foo</a></h1>
+<blockquote>
+<p>bar</p>
+</blockquote>
+
+
[foo]: /url
+bar
+===
+[foo]
+.
+<h1>bar</h1>
+<p><a href="/url">foo</a></p>
+
+
[foo]: /url
+===
+[foo]
+.
+<p>===
+<a href="/url">foo</a></p>
+
+

Several [link reference definitions] +can occur one after another, without intervening blank lines.

+
[foo]: /foo-url "foo"
+[bar]: /bar-url
+  "bar"
+[baz]: /baz-url
+
+[foo],
+[bar],
+[baz]
+.
+<p><a href="/foo-url" title="foo">foo</a>,
+<a href="/bar-url" title="bar">bar</a>,
+<a href="/baz-url">baz</a></p>
+
+

[Link reference definitions] can occur +inside block containers, like lists and block quotations. They +affect the entire document, not just the container in which they +are defined:

+
[foo]
+
+> [foo]: /url
+.
+<p><a href="/url">foo</a></p>
+<blockquote>
+</blockquote>
+
+

Paragraphs

+

A sequence of non-blank lines that cannot be interpreted as other +kinds of blocks forms a paragraph. +The contents of the paragraph are the result of parsing the +paragraph's raw content as inlines. The paragraph's raw content +is formed by concatenating the lines and removing initial and final +spaces or tabs.

+

A simple example with two paragraphs:

+
aaa
+
+bbb
+.
+<p>aaa</p>
+<p>bbb</p>
+
+

Paragraphs can contain multiple lines, but no blank lines:

+
aaa
+bbb
+
+ccc
+ddd
+.
+<p>aaa
+bbb</p>
+<p>ccc
+ddd</p>
+
+

Multiple blank lines between paragraphs have no effect:

+
aaa
+
+
+bbb
+.
+<p>aaa</p>
+<p>bbb</p>
+
+

Leading spaces or tabs are skipped:

+
  aaa
+ bbb
+.
+<p>aaa
+bbb</p>
+
+

Lines after the first may be indented any amount, since indented +code blocks cannot interrupt paragraphs.

+
aaa
+             bbb
+                                       ccc
+.
+<p>aaa
+bbb
+ccc</p>
+
+

However, the first line may be preceded by up to three spaces of indentation. +Four spaces of indentation is too many:

+
   aaa
+bbb
+.
+<p>aaa
+bbb</p>
+
+
    aaa
+bbb
+.
+<pre><code>aaa
+</code></pre>
+<p>bbb</p>
+
+

Final spaces or tabs are stripped before inline parsing, so a paragraph +that ends with two or more spaces will not end with a [hard line +break]:

+
aaa     
+bbb     
+.
+<p>aaa<br />
+bbb</p>
+
+

Blank lines

+

[Blank lines] between block-level elements are ignored, +except for the role they play in determining whether a [list] +is [tight] or [loose].

+

Blank lines at the beginning and end of the document are also ignored.

+
  
+
+aaa
+  
+
+# aaa
+
+  
+.
+<p>aaa</p>
+<h1>aaa</h1>
+
+

Container blocks

+

A container block is a block that has other +blocks as its contents. There are two basic kinds of container blocks: +[block quotes] and [list items]. +[Lists] are meta-containers for [list items].

+

We define the syntax for container blocks recursively. The general +form of the definition is:

+
+

If X is a sequence of blocks, then the result of +transforming X in such-and-such a way is a container of type Y +with these blocks as its content.

+
+

So, we explain what counts as a block quote or list item by explaining +how these can be generated from their contents. This should suffice +to define the syntax, although it does not give a recipe for parsing +these constructions. (A recipe is provided below in the section entitled +A parsing strategy.)

+

Block quotes

+

A block quote marker, +optionally preceded by up to three spaces of indentation, +consists of (a) the character > together with a following space of +indentation, or (b) a single character > not followed by a space of +indentation.

+

The following rules define [block quotes]:

+
    +
  1. +

    Basic case. If a string of lines Ls constitute a sequence +of blocks Bs, then the result of prepending a [block quote +marker] to the beginning of each line in Ls +is a block quote containing Bs.

    +
  2. +
  3. +

    Laziness. If a string of lines Ls constitute a block +quote with contents Bs, then the result of deleting +the initial [block quote marker] from one or +more lines in which the next character other than a space or tab after the +[block quote marker] is [paragraph continuation +text] is a block quote with Bs as its content. +Paragraph continuation text is text +that will be parsed as part of the content of a paragraph, but does +not occur at the beginning of the paragraph.

    +
  4. +
  5. +

    Consecutiveness. A document cannot contain two [block +quotes] in a row unless there is a [blank line] between them.

    +
  6. +
+

Nothing else counts as a block quote.

+

Here is a simple example:

+
> # Foo
+> bar
+> baz
+.
+<blockquote>
+<h1>Foo</h1>
+<p>bar
+baz</p>
+</blockquote>
+
+

The space or tab after the > characters can be omitted:

+
># Foo
+>bar
+> baz
+.
+<blockquote>
+<h1>Foo</h1>
+<p>bar
+baz</p>
+</blockquote>
+
+

The > characters can be preceded by up to three spaces of indentation:

+
   > # Foo
+   > bar
+ > baz
+.
+<blockquote>
+<h1>Foo</h1>
+<p>bar
+baz</p>
+</blockquote>
+
+

Four spaces of indentation is too many:

+
    > # Foo
+    > bar
+    > baz
+.
+<pre><code>&gt; # Foo
+&gt; bar
+&gt; baz
+</code></pre>
+
+

The Laziness clause allows us to omit the > before +[paragraph continuation text]:

+
> # Foo
+> bar
+baz
+.
+<blockquote>
+<h1>Foo</h1>
+<p>bar
+baz</p>
+</blockquote>
+
+

A block quote can contain some lazy and some non-lazy +continuation lines:

+
> bar
+baz
+> foo
+.
+<blockquote>
+<p>bar
+baz
+foo</p>
+</blockquote>
+
+

Laziness only applies to lines that would have been continuations of +paragraphs had they been prepended with [block quote markers]. +For example, the > cannot be omitted in the second line of

+
> foo
+> ---
+
+

without changing the meaning:

+
> foo
+---
+.
+<blockquote>
+<p>foo</p>
+</blockquote>
+<hr />
+
+

Similarly, if we omit the > in the second line of

+
> - foo
+> - bar
+
+

then the block quote ends after the first line:

+
> - foo
+- bar
+.
+<blockquote>
+<ul>
+<li>foo</li>
+</ul>
+</blockquote>
+<ul>
+<li>bar</li>
+</ul>
+
+

For the same reason, we can't omit the > in front of +subsequent lines of an indented or fenced code block:

+
>     foo
+    bar
+.
+<blockquote>
+<pre><code>foo
+</code></pre>
+</blockquote>
+<pre><code>bar
+</code></pre>
+
+
> ```
+foo
+```
+.
+<blockquote>
+<pre><code></code></pre>
+</blockquote>
+<p>foo</p>
+<pre><code></code></pre>
+
+

Note that in the following case, we have a [lazy +continuation line]:

+
> foo
+    - bar
+.
+<blockquote>
+<p>foo
+- bar</p>
+</blockquote>
+
+

To see why, note that in

+
> foo
+>     - bar
+
+

the - bar is indented too far to start a list, and can't +be an indented code block because indented code blocks cannot +interrupt paragraphs, so it is [paragraph continuation text].

+

A block quote can be empty:

+
>
+.
+<blockquote>
+</blockquote>
+
+
>
+>  
+> 
+.
+<blockquote>
+</blockquote>
+
+

A block quote can have initial or final blank lines:

+
>
+> foo
+>  
+.
+<blockquote>
+<p>foo</p>
+</blockquote>
+
+

A blank line always separates block quotes:

+
> foo
+
+> bar
+.
+<blockquote>
+<p>foo</p>
+</blockquote>
+<blockquote>
+<p>bar</p>
+</blockquote>
+
+

(Most current Markdown implementations, including John Gruber's +original Markdown.pl, will parse this example as a single block quote +with two paragraphs. But it seems better to allow the author to decide +whether two block quotes or one are wanted.)

+

Consecutiveness means that if we put these block quotes together, +we get a single block quote:

+
> foo
+> bar
+.
+<blockquote>
+<p>foo
+bar</p>
+</blockquote>
+
+

To get a block quote with two paragraphs, use:

+
> foo
+>
+> bar
+.
+<blockquote>
+<p>foo</p>
+<p>bar</p>
+</blockquote>
+
+

Block quotes can interrupt paragraphs:

+
foo
+> bar
+.
+<p>foo</p>
+<blockquote>
+<p>bar</p>
+</blockquote>
+
+

In general, blank lines are not needed before or after block +quotes:

+
> aaa
+***
+> bbb
+.
+<blockquote>
+<p>aaa</p>
+</blockquote>
+<hr />
+<blockquote>
+<p>bbb</p>
+</blockquote>
+
+

However, because of laziness, a blank line is needed between +a block quote and a following paragraph:

+
> bar
+baz
+.
+<blockquote>
+<p>bar
+baz</p>
+</blockquote>
+
+
> bar
+
+baz
+.
+<blockquote>
+<p>bar</p>
+</blockquote>
+<p>baz</p>
+
+
> bar
+>
+baz
+.
+<blockquote>
+<p>bar</p>
+</blockquote>
+<p>baz</p>
+
+

It is a consequence of the Laziness rule that any number +of initial >s may be omitted on a continuation line of a +nested block quote:

+
> > > foo
+bar
+.
+<blockquote>
+<blockquote>
+<blockquote>
+<p>foo
+bar</p>
+</blockquote>
+</blockquote>
+</blockquote>
+
+
>>> foo
+> bar
+>>baz
+.
+<blockquote>
+<blockquote>
+<blockquote>
+<p>foo
+bar
+baz</p>
+</blockquote>
+</blockquote>
+</blockquote>
+
+

When including an indented code block in a block quote, +remember that the [block quote marker] includes +both the > and a following space of indentation. So five spaces are needed +after the >:

+
>     code
+
+>    not code
+.
+<blockquote>
+<pre><code>code
+</code></pre>
+</blockquote>
+<blockquote>
+<p>not code</p>
+</blockquote>
+
+

List items

+

A list marker is a +[bullet list marker] or an [ordered list marker].

+

A bullet list marker +is a -, +, or * character.

+

An ordered list marker +is a sequence of 1--9 arabic digits (0-9), followed by either a +. character or a ) character. (The reason for the length +limit is that with 10 digits we start seeing integer overflows +in some browsers.)

+

The following rules define [list items]:

+
    +
  1. +

    Basic case. If a sequence of lines Ls constitute a sequence of +blocks Bs starting with a character other than a space or tab, and M is +a list marker of width W followed by 1 ≤ N ≤ 4 spaces of indentation, +then the result of prepending M and the following spaces to the first line +of Ls, and indenting subsequent lines of Ls by W + N spaces, is a +list item with Bs as its contents. The type of the list item +(bullet or ordered) is determined by the type of its list marker. +If the list item is ordered, then it is also assigned a start +number, based on the ordered list marker.

    +

    Exceptions:

    +
      +
    1. When the first list item in a [list] interrupts +a paragraph---that is, when it starts on a line that would +otherwise count as [paragraph continuation text]---then (a) +the lines Ls must not begin with a blank line, and (b) if +the list item is ordered, the start number must be 1.
    2. +
    3. If any line is a [thematic break][thematic breaks] then +that line is not a list item.
    4. +
    +
  2. +
+

For example, let Ls be the lines

+
A paragraph
+with two lines.
+
+    indented code
+
+> A block quote.
+.
+<p>A paragraph
+with two lines.</p>
+<pre><code>indented code
+</code></pre>
+<blockquote>
+<p>A block quote.</p>
+</blockquote>
+
+

And let M be the marker 1., and N = 2. Then rule #1 says +that the following is an ordered list item with start number 1, +and the same contents as Ls:

+
1.  A paragraph
+    with two lines.
+
+        indented code
+
+    > A block quote.
+.
+<ol>
+<li>
+<p>A paragraph
+with two lines.</p>
+<pre><code>indented code
+</code></pre>
+<blockquote>
+<p>A block quote.</p>
+</blockquote>
+</li>
+</ol>
+
+

The most important thing to notice is that the position of +the text after the list marker determines how much indentation +is needed in subsequent blocks in the list item. If the list +marker takes up two spaces of indentation, and there are three spaces between +the list marker and the next character other than a space or tab, then blocks +must be indented five spaces in order to fall under the list +item.

+

Here are some examples showing how far content must be indented to be +put under the list item:

+
- one
+
+ two
+.
+<ul>
+<li>one</li>
+</ul>
+<p>two</p>
+
+
- one
+
+  two
+.
+<ul>
+<li>
+<p>one</p>
+<p>two</p>
+</li>
+</ul>
+
+
 -    one
+
+     two
+.
+<ul>
+<li>one</li>
+</ul>
+<pre><code> two
+</code></pre>
+
+
 -    one
+
+      two
+.
+<ul>
+<li>
+<p>one</p>
+<p>two</p>
+</li>
+</ul>
+
+

It is tempting to think of this in terms of columns: the continuation +blocks must be indented at least to the column of the first character other than +a space or tab after the list marker. However, that is not quite right. +The spaces of indentation after the list marker determine how much relative +indentation is needed. Which column this indentation reaches will depend on +how the list item is embedded in other constructions, as shown by +this example:

+
   > > 1.  one
+>>
+>>     two
+.
+<blockquote>
+<blockquote>
+<ol>
+<li>
+<p>one</p>
+<p>two</p>
+</li>
+</ol>
+</blockquote>
+</blockquote>
+
+

Here two occurs in the same column as the list marker 1., +but is actually contained in the list item, because there is +sufficient indentation after the last containing blockquote marker.

+

The converse is also possible. In the following example, the word two +occurs far to the right of the initial text of the list item, one, but +it is not considered part of the list item, because it is not indented +far enough past the blockquote marker:

+
>>- one
+>>
+  >  > two
+.
+<blockquote>
+<blockquote>
+<ul>
+<li>one</li>
+</ul>
+<p>two</p>
+</blockquote>
+</blockquote>
+
+

Note that at least one space or tab is needed between the list marker and +any following content, so these are not list items:

+
-one
+
+2.two
+.
+<p>-one</p>
+<p>2.two</p>
+
+

A list item may contain blocks that are separated by more than +one blank line.

+
- foo
+
+
+  bar
+.
+<ul>
+<li>
+<p>foo</p>
+<p>bar</p>
+</li>
+</ul>
+
+

A list item may contain any kind of block:

+
1.  foo
+
+    ```
+    bar
+    ```
+
+    baz
+
+    > bam
+.
+<ol>
+<li>
+<p>foo</p>
+<pre><code>bar
+</code></pre>
+<p>baz</p>
+<blockquote>
+<p>bam</p>
+</blockquote>
+</li>
+</ol>
+
+

A list item that contains an indented code block will preserve +empty lines within the code block verbatim.

+
- Foo
+
+      bar
+
+
+      baz
+.
+<ul>
+<li>
+<p>Foo</p>
+<pre><code>bar
+
+
+baz
+</code></pre>
+</li>
+</ul>
+
+

Note that ordered list start numbers must be nine digits or less:

+
123456789. ok
+.
+<ol start="123456789">
+<li>ok</li>
+</ol>
+
+
1234567890. not ok
+.
+<p>1234567890. not ok</p>
+
+

A start number may begin with 0s:

+
0. ok
+.
+<ol start="0">
+<li>ok</li>
+</ol>
+
+
003. ok
+.
+<ol start="3">
+<li>ok</li>
+</ol>
+
+

A start number may not be negative:

+
-1. not ok
+.
+<p>-1. not ok</p>
+
+
    +
  1. Item starting with indented code. If a sequence of lines Ls +constitute a sequence of blocks Bs starting with an indented code +block, and M is a list marker of width W followed by +one space of indentation, then the result of prepending M and the +following space to the first line of Ls, and indenting subsequent lines +of Ls by W + 1 spaces, is a list item with Bs as its contents. +If a line is empty, then it need not be indented. The type of the +list item (bullet or ordered) is determined by the type of its list +marker. If the list item is ordered, then it is also assigned a +start number, based on the ordered list marker.
  2. +
+

An indented code block will have to be preceded by four spaces of indentation +beyond the edge of the region where text will be included in the list item. +In the following case that is 6 spaces:

+
- foo
+
+      bar
+.
+<ul>
+<li>
+<p>foo</p>
+<pre><code>bar
+</code></pre>
+</li>
+</ul>
+
+

And in this case it is 11 spaces:

+
  10.  foo
+
+           bar
+.
+<ol start="10">
+<li>
+<p>foo</p>
+<pre><code>bar
+</code></pre>
+</li>
+</ol>
+
+

If the first block in the list item is an indented code block, +then by rule #2, the contents must be preceded by one space of indentation +after the list marker:

+
    indented code
+
+paragraph
+
+    more code
+.
+<pre><code>indented code
+</code></pre>
+<p>paragraph</p>
+<pre><code>more code
+</code></pre>
+
+
1.     indented code
+
+   paragraph
+
+       more code
+.
+<ol>
+<li>
+<pre><code>indented code
+</code></pre>
+<p>paragraph</p>
+<pre><code>more code
+</code></pre>
+</li>
+</ol>
+
+

Note that an additional space of indentation is interpreted as space +inside the code block:

+
1.      indented code
+
+   paragraph
+
+       more code
+.
+<ol>
+<li>
+<pre><code> indented code
+</code></pre>
+<p>paragraph</p>
+<pre><code>more code
+</code></pre>
+</li>
+</ol>
+
+

Note that rules #1 and #2 only apply to two cases: (a) cases +in which the lines to be included in a list item begin with a +character other than a space or tab, and (b) cases in which +they begin with an indented code +block. In a case like the following, where the first block begins with +three spaces of indentation, the rules do not allow us to form a list item by +indenting the whole thing and prepending a list marker:

+
   foo
+
+bar
+.
+<p>foo</p>
+<p>bar</p>
+
+
-    foo
+
+  bar
+.
+<ul>
+<li>foo</li>
+</ul>
+<p>bar</p>
+
+

This is not a significant restriction, because when a block is preceded by up to +three spaces of indentation, the indentation can always be removed without +a change in interpretation, allowing rule #1 to be applied. So, in +the above case:

+
-  foo
+
+   bar
+.
+<ul>
+<li>
+<p>foo</p>
+<p>bar</p>
+</li>
+</ul>
+
+
    +
  1. Item starting with a blank line. If a sequence of lines Ls +starting with a single [blank line] constitute a (possibly empty) +sequence of blocks Bs, and M is a list marker of width W, +then the result of prepending M to the first line of Ls, and +preceding subsequent lines of Ls by W + 1 spaces of indentation, is a +list item with Bs as its contents. +If a line is empty, then it need not be indented. The type of the +list item (bullet or ordered) is determined by the type of its list +marker. If the list item is ordered, then it is also assigned a +start number, based on the ordered list marker.
  2. +
+

Here are some list items that start with a blank line but are not empty:

+
-
+  foo
+-
+  ```
+  bar
+  ```
+-
+      baz
+.
+<ul>
+<li>foo</li>
+<li>
+<pre><code>bar
+</code></pre>
+</li>
+<li>
+<pre><code>baz
+</code></pre>
+</li>
+</ul>
+
+

When the list item starts with a blank line, the number of spaces +following the list marker doesn't change the required indentation:

+
-   
+  foo
+.
+<ul>
+<li>foo</li>
+</ul>
+
+

A list item can begin with at most one blank line. +In the following example, foo is not part of the list +item:

+
-
+
+  foo
+.
+<ul>
+<li></li>
+</ul>
+<p>foo</p>
+
+

Here is an empty bullet list item:

+
- foo
+-
+- bar
+.
+<ul>
+<li>foo</li>
+<li></li>
+<li>bar</li>
+</ul>
+
+

It does not matter whether there are spaces or tabs following the [list marker]:

+
- foo
+-   
+- bar
+.
+<ul>
+<li>foo</li>
+<li></li>
+<li>bar</li>
+</ul>
+
+

Here is an empty ordered list item:

+
1. foo
+2.
+3. bar
+.
+<ol>
+<li>foo</li>
+<li></li>
+<li>bar</li>
+</ol>
+
+

A list may start or end with an empty list item:

+
*
+.
+<ul>
+<li></li>
+</ul>
+
+

However, an empty list item cannot interrupt a paragraph:

+
foo
+*
+
+foo
+1.
+.
+<p>foo
+*</p>
+<p>foo
+1.</p>
+
+
    +
  1. Indentation. If a sequence of lines Ls constitutes a list item +according to rule #1, #2, or #3, then the result of preceding each line +of Ls by up to three spaces of indentation (the same for each line) also +constitutes a list item with the same contents and attributes. If a line is +empty, then it need not be indented.
  2. +
+

Indented one space:

+
 1.  A paragraph
+     with two lines.
+
+         indented code
+
+     > A block quote.
+.
+<ol>
+<li>
+<p>A paragraph
+with two lines.</p>
+<pre><code>indented code
+</code></pre>
+<blockquote>
+<p>A block quote.</p>
+</blockquote>
+</li>
+</ol>
+
+

Indented two spaces:

+
  1.  A paragraph
+      with two lines.
+
+          indented code
+
+      > A block quote.
+.
+<ol>
+<li>
+<p>A paragraph
+with two lines.</p>
+<pre><code>indented code
+</code></pre>
+<blockquote>
+<p>A block quote.</p>
+</blockquote>
+</li>
+</ol>
+
+

Indented three spaces:

+
   1.  A paragraph
+       with two lines.
+
+           indented code
+
+       > A block quote.
+.
+<ol>
+<li>
+<p>A paragraph
+with two lines.</p>
+<pre><code>indented code
+</code></pre>
+<blockquote>
+<p>A block quote.</p>
+</blockquote>
+</li>
+</ol>
+
+

Four spaces indent gives a code block:

+
    1.  A paragraph
+        with two lines.
+
+            indented code
+
+        > A block quote.
+.
+<pre><code>1.  A paragraph
+    with two lines.
+
+        indented code
+
+    &gt; A block quote.
+</code></pre>
+
+
    +
  1. Laziness. If a string of lines Ls constitute a list +item with contents Bs, then the result of deleting +some or all of the indentation from one or more lines in which the +next character other than a space or tab after the indentation is +[paragraph continuation text] is a +list item with the same contents and attributes. The unindented +lines are called +lazy continuation lines.
  2. +
+

Here is an example with [lazy continuation lines]:

+
  1.  A paragraph
+with two lines.
+
+          indented code
+
+      > A block quote.
+.
+<ol>
+<li>
+<p>A paragraph
+with two lines.</p>
+<pre><code>indented code
+</code></pre>
+<blockquote>
+<p>A block quote.</p>
+</blockquote>
+</li>
+</ol>
+
+

Indentation can be partially deleted:

+
  1.  A paragraph
+    with two lines.
+.
+<ol>
+<li>A paragraph
+with two lines.</li>
+</ol>
+
+

These examples show how laziness can work in nested structures:

+
> 1. > Blockquote
+continued here.
+.
+<blockquote>
+<ol>
+<li>
+<blockquote>
+<p>Blockquote
+continued here.</p>
+</blockquote>
+</li>
+</ol>
+</blockquote>
+
+
> 1. > Blockquote
+> continued here.
+.
+<blockquote>
+<ol>
+<li>
+<blockquote>
+<p>Blockquote
+continued here.</p>
+</blockquote>
+</li>
+</ol>
+</blockquote>
+
+
    +
  1. That's all. Nothing that is not counted as a list item by rules +#1--5 counts as a list item.
  2. +
+

The rules for sublists follow from the general rules +[above][List items]. A sublist must be indented the same number +of spaces of indentation a paragraph would need to be in order to be included +in the list item.

+

So, in this case we need two spaces indent:

+
- foo
+  - bar
+    - baz
+      - boo
+.
+<ul>
+<li>foo
+<ul>
+<li>bar
+<ul>
+<li>baz
+<ul>
+<li>boo</li>
+</ul>
+</li>
+</ul>
+</li>
+</ul>
+</li>
+</ul>
+
+

One is not enough:

+
- foo
+ - bar
+  - baz
+   - boo
+.
+<ul>
+<li>foo</li>
+<li>bar</li>
+<li>baz</li>
+<li>boo</li>
+</ul>
+
+

Here we need four, because the list marker is wider:

+
10) foo
+    - bar
+.
+<ol start="10">
+<li>foo
+<ul>
+<li>bar</li>
+</ul>
+</li>
+</ol>
+
+

Three is not enough:

+
10) foo
+   - bar
+.
+<ol start="10">
+<li>foo</li>
+</ol>
+<ul>
+<li>bar</li>
+</ul>
+
+

A list may be the first block in a list item:

+
- - foo
+.
+<ul>
+<li>
+<ul>
+<li>foo</li>
+</ul>
+</li>
+</ul>
+
+
1. - 2. foo
+.
+<ol>
+<li>
+<ul>
+<li>
+<ol start="2">
+<li>foo</li>
+</ol>
+</li>
+</ul>
+</li>
+</ol>
+
+

A list item can contain a heading:

+
- # Foo
+- Bar
+  ---
+  baz
+.
+<ul>
+<li>
+<h1>Foo</h1>
+</li>
+<li>
+<h2>Bar</h2>
+baz</li>
+</ul>
+
+

Motivation

+

John Gruber's Markdown spec says the following about list items:

+
    +
  1. +

    "List markers typically start at the left margin, but may be indented +by up to three spaces. List markers must be followed by one or more +spaces or a tab."

    +
  2. +
  3. +

    "To make lists look nice, you can wrap items with hanging indents.... +But if you don't want to, you don't have to."

    +
  4. +
  5. +

    "List items may consist of multiple paragraphs. Each subsequent +paragraph in a list item must be indented by either 4 spaces or one +tab."

    +
  6. +
  7. +

    "It looks nice if you indent every line of the subsequent paragraphs, +but here again, Markdown will allow you to be lazy."

    +
  8. +
  9. +

    "To put a blockquote within a list item, the blockquote's > +delimiters need to be indented."

    +
  10. +
  11. +

    "To put a code block within a list item, the code block needs to be +indented twice — 8 spaces or two tabs."

    +
  12. +
+

These rules specify that a paragraph under a list item must be indented +four spaces (presumably, from the left margin, rather than the start of +the list marker, but this is not said), and that code under a list item +must be indented eight spaces instead of the usual four. They also say +that a block quote must be indented, but not by how much; however, the +example given has four spaces indentation. Although nothing is said +about other kinds of block-level content, it is certainly reasonable to +infer that all block elements under a list item, including other +lists, must be indented four spaces. This principle has been called the +four-space rule.

+

The four-space rule is clear and principled, and if the reference +implementation Markdown.pl had followed it, it probably would have +become the standard. However, Markdown.pl allowed paragraphs and +sublists to start with only two spaces indentation, at least on the +outer level. Worse, its behavior was inconsistent: a sublist of an +outer-level list needed two spaces indentation, but a sublist of this +sublist needed three spaces. It is not surprising, then, that different +implementations of Markdown have developed very different rules for +determining what comes under a list item. (Pandoc and python-Markdown, +for example, stuck with Gruber's syntax description and the four-space +rule, while discount, redcarpet, marked, PHP Markdown, and others +followed Markdown.pl's behavior more closely.)

+

Unfortunately, given the divergences between implementations, there +is no way to give a spec for list items that will be guaranteed not +to break any existing documents. However, the spec given here should +correctly handle lists formatted with either the four-space rule or +the more forgiving Markdown.pl behavior, provided they are laid out +in a way that is natural for a human to read.

+

The strategy here is to let the width and indentation of the list marker +determine the indentation necessary for blocks to fall under the list +item, rather than having a fixed and arbitrary number. The writer can +think of the body of the list item as a unit which gets indented to the +right enough to fit the list marker (and any indentation on the list +marker). (The laziness rule, #5, then allows continuation lines to be +unindented if needed.)

+

This rule is superior, we claim, to any rule requiring a fixed level of +indentation from the margin. The four-space rule is clear but +unnatural. It is quite unintuitive that

+
- foo
+
+  bar
+
+  - baz
+
+

should be parsed as two lists with an intervening paragraph,

+
<ul>
+<li>foo</li>
+</ul>
+<p>bar</p>
+<ul>
+<li>baz</li>
+</ul>
+
+

as the four-space rule demands, rather than a single list,

+
<ul>
+<li>
+<p>foo</p>
+<p>bar</p>
+<ul>
+<li>baz</li>
+</ul>
+</li>
+</ul>
+
+

The choice of four spaces is arbitrary. It can be learned, but it is +not likely to be guessed, and it trips up beginners regularly.

+

Would it help to adopt a two-space rule? The problem is that such +a rule, together with the rule allowing up to three spaces of indentation for +the initial list marker, allows text that is indented less than the +original list marker to be included in the list item. For example, +Markdown.pl parses

+
   - one
+
+  two
+
+

as a single list item, with two a continuation paragraph:

+
<ul>
+<li>
+<p>one</p>
+<p>two</p>
+</li>
+</ul>
+
+

and similarly

+
>   - one
+>
+>  two
+
+

as

+
<blockquote>
+<ul>
+<li>
+<p>one</p>
+<p>two</p>
+</li>
+</ul>
+</blockquote>
+
+

This is extremely unintuitive.

+

Rather than requiring a fixed indent from the margin, we could require +a fixed indent (say, two spaces, or even one space) from the list marker (which +may itself be indented). This proposal would remove the last anomaly +discussed. Unlike the spec presented above, it would count the following +as a list item with a subparagraph, even though the paragraph bar +is not indented as far as the first paragraph foo:

+
 10. foo
+
+   bar  
+
+

Arguably this text does read like a list item with bar as a subparagraph, +which may count in favor of the proposal. However, on this proposal indented +code would have to be indented six spaces after the list marker. And this +would break a lot of existing Markdown, which has the pattern:

+
1.  foo
+
+        indented code
+
+

where the code is indented eight spaces. The spec above, by contrast, will +parse this text as expected, since the code block's indentation is measured +from the beginning of foo.

+

The one case that needs special treatment is a list item that starts +with indented code. How much indentation is required in that case, since +we don't have a "first paragraph" to measure from? Rule #2 simply stipulates +that in such cases, we require one space indentation from the list marker +(and then the normal four spaces for the indented code). This will match the +four-space rule in cases where the list marker plus its initial indentation +takes four spaces (a common case), but diverge in other cases.

+

Lists

+

A list is a sequence of one or more +list items [of the same type]. The list items +may be separated by any number of blank lines.

+

Two list items are of the same type +if they begin with a [list marker] of the same type. +Two list markers are of the +same type if (a) they are bullet list markers using the same character +(-, +, or *) or (b) they are ordered list numbers with the same +delimiter (either . or )).

+

A list is an ordered list +if its constituent list items begin with +[ordered list markers], and a +bullet list if its constituent list +items begin with [bullet list markers].

+

The start number +of an [ordered list] is determined by the list number of +its initial list item. The numbers of subsequent list items are +disregarded.

+

A list is loose if any of its constituent +list items are separated by blank lines, or if any of its constituent +list items directly contain two block-level elements with a blank line +between them. Otherwise a list is tight. +(The difference in HTML output is that paragraphs in a loose list are +wrapped in <p> tags, while paragraphs in a tight list are not.)

+

Changing the bullet or ordered list delimiter starts a new list:

+
- foo
+- bar
++ baz
+.
+<ul>
+<li>foo</li>
+<li>bar</li>
+</ul>
+<ul>
+<li>baz</li>
+</ul>
+
+
1. foo
+2. bar
+3) baz
+.
+<ol>
+<li>foo</li>
+<li>bar</li>
+</ol>
+<ol start="3">
+<li>baz</li>
+</ol>
+
+

In CommonMark, a list can interrupt a paragraph. That is, +no blank line is needed to separate a paragraph from a following +list:

+
Foo
+- bar
+- baz
+.
+<p>Foo</p>
+<ul>
+<li>bar</li>
+<li>baz</li>
+</ul>
+
+

Markdown.pl does not allow this, through fear of triggering a list +via a numeral in a hard-wrapped line:

+
The number of windows in my house is
+14.  The number of doors is 6.
+
+

Oddly, though, Markdown.pl does allow a blockquote to +interrupt a paragraph, even though the same considerations might +apply.

+

In CommonMark, we do allow lists to interrupt paragraphs, for +two reasons. First, it is natural and not uncommon for people +to start lists without blank lines:

+
I need to buy
+- new shoes
+- a coat
+- a plane ticket
+
+

Second, we are attracted to a

+
+

principle of uniformity: +if a chunk of text has a certain +meaning, it will continue to have the same meaning when put into a +container block (such as a list item or blockquote).

+
+

(Indeed, the spec for [list items] and [block quotes] presupposes +this principle.) This principle implies that if

+
  * I need to buy
+    - new shoes
+    - a coat
+    - a plane ticket
+
+

is a list item containing a paragraph followed by a nested sublist, +as all Markdown implementations agree it is (though the paragraph +may be rendered without <p> tags, since the list is "tight"), +then

+
I need to buy
+- new shoes
+- a coat
+- a plane ticket
+
+

by itself should be a paragraph followed by a nested sublist.

+

Since it is well established Markdown practice to allow lists to +interrupt paragraphs inside list items, the [principle of +uniformity] requires us to allow this outside list items as +well. (reStructuredText +takes a different approach, requiring blank lines before lists +even inside other list items.)

+

In order to solve the problem of unwanted lists in paragraphs with +hard-wrapped numerals, we allow only lists starting with 1 to +interrupt paragraphs. Thus,

+
The number of windows in my house is
+14.  The number of doors is 6.
+.
+<p>The number of windows in my house is
+14.  The number of doors is 6.</p>
+
+

We may still get an unintended result in cases like

+
The number of windows in my house is
+1.  The number of doors is 6.
+.
+<p>The number of windows in my house is</p>
+<ol>
+<li>The number of doors is 6.</li>
+</ol>
+
+

but this rule should prevent most spurious list captures.

+

There can be any number of blank lines between items:

+
- foo
+
+- bar
+
+
+- baz
+.
+<ul>
+<li>
+<p>foo</p>
+</li>
+<li>
+<p>bar</p>
+</li>
+<li>
+<p>baz</p>
+</li>
+</ul>
+
+
- foo
+  - bar
+    - baz
+
+
+      bim
+.
+<ul>
+<li>foo
+<ul>
+<li>bar
+<ul>
+<li>
+<p>baz</p>
+<p>bim</p>
+</li>
+</ul>
+</li>
+</ul>
+</li>
+</ul>
+
+

To separate consecutive lists of the same type, or to separate a +list from an indented code block that would otherwise be parsed +as a subparagraph of the final list item, you can insert a blank HTML +comment:

+
- foo
+- bar
+
+<!-- -->
+
+- baz
+- bim
+.
+<ul>
+<li>foo</li>
+<li>bar</li>
+</ul>
+<!-- -->
+<ul>
+<li>baz</li>
+<li>bim</li>
+</ul>
+
+
-   foo
+
+    notcode
+
+-   foo
+
+<!-- -->
+
+    code
+.
+<ul>
+<li>
+<p>foo</p>
+<p>notcode</p>
+</li>
+<li>
+<p>foo</p>
+</li>
+</ul>
+<!-- -->
+<pre><code>code
+</code></pre>
+
+

List items need not be indented to the same level. The following +list items will be treated as items at the same list level, +since none is indented enough to belong to the previous list +item:

+
- a
+ - b
+  - c
+   - d
+  - e
+ - f
+- g
+.
+<ul>
+<li>a</li>
+<li>b</li>
+<li>c</li>
+<li>d</li>
+<li>e</li>
+<li>f</li>
+<li>g</li>
+</ul>
+
+
1. a
+
+  2. b
+
+   3. c
+.
+<ol>
+<li>
+<p>a</p>
+</li>
+<li>
+<p>b</p>
+</li>
+<li>
+<p>c</p>
+</li>
+</ol>
+
+

Note, however, that list items may not be preceded by more than +three spaces of indentation. Here - e is treated as a paragraph continuation +line, because it is indented more than three spaces:

+
- a
+ - b
+  - c
+   - d
+    - e
+.
+<ul>
+<li>a</li>
+<li>b</li>
+<li>c</li>
+<li>d
+- e</li>
+</ul>
+
+

And here, 3. c is treated as in indented code block, +because it is indented four spaces and preceded by a +blank line.

+
1. a
+
+  2. b
+
+    3. c
+.
+<ol>
+<li>
+<p>a</p>
+</li>
+<li>
+<p>b</p>
+</li>
+</ol>
+<pre><code>3. c
+</code></pre>
+
+

This is a loose list, because there is a blank line between +two of the list items:

+
- a
+- b
+
+- c
+.
+<ul>
+<li>
+<p>a</p>
+</li>
+<li>
+<p>b</p>
+</li>
+<li>
+<p>c</p>
+</li>
+</ul>
+
+

So is this, with a empty second item:

+
* a
+*
+
+* c
+.
+<ul>
+<li>
+<p>a</p>
+</li>
+<li></li>
+<li>
+<p>c</p>
+</li>
+</ul>
+
+

These are loose lists, even though there are no blank lines between the items, +because one of the items directly contains two block-level elements +with a blank line between them:

+
- a
+- b
+
+  c
+- d
+.
+<ul>
+<li>
+<p>a</p>
+</li>
+<li>
+<p>b</p>
+<p>c</p>
+</li>
+<li>
+<p>d</p>
+</li>
+</ul>
+
+
- a
+- b
+
+  [ref]: /url
+- d
+.
+<ul>
+<li>
+<p>a</p>
+</li>
+<li>
+<p>b</p>
+</li>
+<li>
+<p>d</p>
+</li>
+</ul>
+
+

This is a tight list, because the blank lines are in a code block:

+
- a
+- ```
+  b
+
+
+  ```
+- c
+.
+<ul>
+<li>a</li>
+<li>
+<pre><code>b
+
+
+</code></pre>
+</li>
+<li>c</li>
+</ul>
+
+

This is a tight list, because the blank line is between two +paragraphs of a sublist. So the sublist is loose while +the outer list is tight:

+
- a
+  - b
+
+    c
+- d
+.
+<ul>
+<li>a
+<ul>
+<li>
+<p>b</p>
+<p>c</p>
+</li>
+</ul>
+</li>
+<li>d</li>
+</ul>
+
+

This is a tight list, because the blank line is inside the +block quote:

+
* a
+  > b
+  >
+* c
+.
+<ul>
+<li>a
+<blockquote>
+<p>b</p>
+</blockquote>
+</li>
+<li>c</li>
+</ul>
+
+

This list is tight, because the consecutive block elements +are not separated by blank lines:

+
- a
+  > b
+  ```
+  c
+  ```
+- d
+.
+<ul>
+<li>a
+<blockquote>
+<p>b</p>
+</blockquote>
+<pre><code>c
+</code></pre>
+</li>
+<li>d</li>
+</ul>
+
+

A single-paragraph list is tight:

+
- a
+.
+<ul>
+<li>a</li>
+</ul>
+
+
- a
+  - b
+.
+<ul>
+<li>a
+<ul>
+<li>b</li>
+</ul>
+</li>
+</ul>
+
+

This list is loose, because of the blank line between the +two block elements in the list item:

+
1. ```
+   foo
+   ```
+
+   bar
+.
+<ol>
+<li>
+<pre><code>foo
+</code></pre>
+<p>bar</p>
+</li>
+</ol>
+
+

Here the outer list is loose, the inner list tight:

+
* foo
+  * bar
+
+  baz
+.
+<ul>
+<li>
+<p>foo</p>
+<ul>
+<li>bar</li>
+</ul>
+<p>baz</p>
+</li>
+</ul>
+
+
- a
+  - b
+  - c
+
+- d
+  - e
+  - f
+.
+<ul>
+<li>
+<p>a</p>
+<ul>
+<li>b</li>
+<li>c</li>
+</ul>
+</li>
+<li>
+<p>d</p>
+<ul>
+<li>e</li>
+<li>f</li>
+</ul>
+</li>
+</ul>
+
+

Inlines

+

Inlines are parsed sequentially from the beginning of the character +stream to the end (left to right, in left-to-right languages). +Thus, for example, in

+
`hi`lo`
+.
+<p><code>hi</code>lo`</p>
+
+

hi is parsed as code, leaving the backtick at the end as a literal +backtick.

+

Code spans

+

A backtick string +is a string of one or more backtick characters (`) that is neither +preceded nor followed by a backtick.

+

A code span begins with a backtick string and ends with +a backtick string of equal length. The contents of the code span are +the characters between these two backtick strings, normalized in the +following ways:

+
    +
  • First, [line endings] are converted to [spaces].
  • +
  • If the resulting string both begins and ends with a [space] +character, but does not consist entirely of [space] +characters, a single [space] character is removed from the +front and back. This allows you to include code that begins +or ends with backtick characters, which must be separated by +whitespace from the opening or closing backtick strings.
  • +
+

This is a simple code span:

+
`foo`
+.
+<p><code>foo</code></p>
+
+

Here two backticks are used, because the code contains a backtick. +This example also illustrates stripping of a single leading and +trailing space:

+
`` foo ` bar ``
+.
+<p><code>foo ` bar</code></p>
+
+

This example shows the motivation for stripping leading and trailing +spaces:

+
` `` `
+.
+<p><code>``</code></p>
+
+

Note that only one space is stripped:

+
`  ``  `
+.
+<p><code> `` </code></p>
+
+

The stripping only happens if the space is on both +sides of the string:

+
` a`
+.
+<p><code> a</code></p>
+
+

Only [spaces], and not [unicode whitespace] in general, are +stripped in this way:

+
` b `
+.
+<p><code> b </code></p>
+
+

No stripping occurs if the code span contains only spaces:

+
` `
+`  `
+.
+<p><code> </code>
+<code>  </code></p>
+
+

[Line endings] are treated like spaces:

+
``
+foo
+bar  
+baz
+``
+.
+<p><code>foo bar   baz</code></p>
+
+
``
+foo 
+``
+.
+<p><code>foo </code></p>
+
+

Interior spaces are not collapsed:

+
`foo   bar 
+baz`
+.
+<p><code>foo   bar  baz</code></p>
+
+

Note that browsers will typically collapse consecutive spaces +when rendering <code> elements, so it is recommended that +the following CSS be used:

+
code{white-space: pre-wrap;}
+
+

Note that backslash escapes do not work in code spans. All backslashes +are treated literally:

+
`foo\`bar`
+.
+<p><code>foo\</code>bar`</p>
+
+

Backslash escapes are never needed, because one can always choose a +string of n backtick characters as delimiters, where the code does +not contain any strings of exactly n backtick characters.

+
``foo`bar``
+.
+<p><code>foo`bar</code></p>
+
+
` foo `` bar `
+.
+<p><code>foo `` bar</code></p>
+
+

Code span backticks have higher precedence than any other inline +constructs except HTML tags and autolinks. Thus, for example, this is +not parsed as emphasized text, since the second * is part of a code +span:

+
*foo`*`
+.
+<p>*foo<code>*</code></p>
+
+

And this is not parsed as a link:

+
[not a `link](/foo`)
+.
+<p>[not a <code>link](/foo</code>)</p>
+
+

Code spans, HTML tags, and autolinks have the same precedence. +Thus, this is code:

+
`<a href="`">`
+.
+<p><code>&lt;a href=&quot;</code>&quot;&gt;`</p>
+
+

But this is an HTML tag:

+
<a href="`">`
+.
+<p><a href="`">`</p>
+
+

And this is code:

+
`<https://foo.bar.`baz>`
+.
+<p><code>&lt;https://foo.bar.</code>baz&gt;`</p>
+
+

But this is an autolink:

+
<https://foo.bar.`baz>`
+.
+<p><a href="https://foo.bar.%60baz">https://foo.bar.`baz</a>`</p>
+
+

When a backtick string is not closed by a matching backtick string, +we just have literal backticks:

+
```foo``
+.
+<p>```foo``</p>
+
+
`foo
+.
+<p>`foo</p>
+
+

The following case also illustrates the need for opening and +closing backtick strings to be equal in length:

+
`foo``bar``
+.
+<p>`foo<code>bar</code></p>
+
+

Emphasis and strong emphasis

+

John Gruber's original Markdown syntax +description says:

+
+

Markdown treats asterisks (*) and underscores (_) as indicators of +emphasis. Text wrapped with one * or _ will be wrapped with an HTML +<em> tag; double *'s or _'s will be wrapped with an HTML <strong> +tag.

+
+

This is enough for most users, but these rules leave much undecided, +especially when it comes to nested emphasis. The original +Markdown.pl test suite makes it clear that triple *** and +___ delimiters can be used for strong emphasis, and most +implementations have also allowed the following patterns:

+
***strong emph***
+***strong** in emph*
+***emph* in strong**
+**in strong *emph***
+*in emph **strong***
+
+

The following patterns are less widely supported, but the intent +is clear and they are useful (especially in contexts like bibliography +entries):

+
*emph *with emph* in it*
+**strong **with strong** in it**
+
+

Many implementations have also restricted intraword emphasis to +the * forms, to avoid unwanted emphasis in words containing +internal underscores. (It is best practice to put these in code +spans, but users often do not.)

+
internal emphasis: foo*bar*baz
+no emphasis: foo_bar_baz
+
+

The rules given below capture all of these patterns, while allowing +for efficient parsing strategies that do not backtrack.

+

First, some definitions. A delimiter run is either +a sequence of one or more * characters that is not preceded or +followed by a non-backslash-escaped * character, or a sequence +of one or more _ characters that is not preceded or followed by +a non-backslash-escaped _ character.

+

A left-flanking delimiter run is +a [delimiter run] that is (1) not followed by [Unicode whitespace], +and either (2a) not followed by a [Unicode punctuation character], or +(2b) followed by a [Unicode punctuation character] and +preceded by [Unicode whitespace] or a [Unicode punctuation character]. +For purposes of this definition, the beginning and the end of +the line count as Unicode whitespace.

+

A right-flanking delimiter run is +a [delimiter run] that is (1) not preceded by [Unicode whitespace], +and either (2a) not preceded by a [Unicode punctuation character], or +(2b) preceded by a [Unicode punctuation character] and +followed by [Unicode whitespace] or a [Unicode punctuation character]. +For purposes of this definition, the beginning and the end of +the line count as Unicode whitespace.

+

Here are some examples of delimiter runs.

+
    +
  • +

    left-flanking but not right-flanking:

    +
    ***abc
    +  _abc
    +**"abc"
    + _"abc"
    +
    +
  • +
  • +

    right-flanking but not left-flanking:

    +
     abc***
    + abc_
    +"abc"**
    +"abc"_
    +
    +
  • +
  • +

    Both left and right-flanking:

    +
     abc***def
    +"abc"_"def"
    +
    +
  • +
  • +

    Neither left nor right-flanking:

    +
    abc *** def
    +a _ b
    +
    +
  • +
+

(The idea of distinguishing left-flanking and right-flanking +delimiter runs based on the character before and the character +after comes from Roopesh Chander's +vfmd. +vfmd uses the terminology "emphasis indicator string" instead of "delimiter +run," and its rules for distinguishing left- and right-flanking runs +are a bit more complex than the ones given here.)

+

The following rules define emphasis and strong emphasis:

+
    +
  1. +

    A single * character can open emphasis +iff (if and only if) it is part of a [left-flanking delimiter run].

    +
  2. +
  3. +

    A single _ character [can open emphasis] iff +it is part of a [left-flanking delimiter run] +and either (a) not part of a [right-flanking delimiter run] +or (b) part of a [right-flanking delimiter run] +preceded by a [Unicode punctuation character].

    +
  4. +
  5. +

    A single * character can close emphasis +iff it is part of a [right-flanking delimiter run].

    +
  6. +
  7. +

    A single _ character [can close emphasis] iff +it is part of a [right-flanking delimiter run] +and either (a) not part of a [left-flanking delimiter run] +or (b) part of a [left-flanking delimiter run] +followed by a [Unicode punctuation character].

    +
  8. +
  9. +

    A double ** can open strong emphasis +iff it is part of a [left-flanking delimiter run].

    +
  10. +
  11. +

    A double __ [can open strong emphasis] iff +it is part of a [left-flanking delimiter run] +and either (a) not part of a [right-flanking delimiter run] +or (b) part of a [right-flanking delimiter run] +preceded by a [Unicode punctuation character].

    +
  12. +
  13. +

    A double ** can close strong emphasis +iff it is part of a [right-flanking delimiter run].

    +
  14. +
  15. +

    A double __ [can close strong emphasis] iff +it is part of a [right-flanking delimiter run] +and either (a) not part of a [left-flanking delimiter run] +or (b) part of a [left-flanking delimiter run] +followed by a [Unicode punctuation character].

    +
  16. +
  17. +

    Emphasis begins with a delimiter that [can open emphasis] and ends +with a delimiter that [can close emphasis], and that uses the same +character (_ or *) as the opening delimiter. The +opening and closing delimiters must belong to separate +[delimiter runs]. If one of the delimiters can both +open and close emphasis, then the sum of the lengths of the +delimiter runs containing the opening and closing delimiters +must not be a multiple of 3 unless both lengths are +multiples of 3.

    +
  18. +
  19. +

    Strong emphasis begins with a delimiter that +[can open strong emphasis] and ends with a delimiter that +[can close strong emphasis], and that uses the same character +(_ or *) as the opening delimiter. The +opening and closing delimiters must belong to separate +[delimiter runs]. If one of the delimiters can both open +and close strong emphasis, then the sum of the lengths of +the delimiter runs containing the opening and closing +delimiters must not be a multiple of 3 unless both lengths +are multiples of 3.

    +
  20. +
  21. +

    A literal * character cannot occur at the beginning or end of +*-delimited emphasis or **-delimited strong emphasis, unless it +is backslash-escaped.

    +
  22. +
  23. +

    A literal _ character cannot occur at the beginning or end of +_-delimited emphasis or __-delimited strong emphasis, unless it +is backslash-escaped.

    +
  24. +
+

Where rules 1--12 above are compatible with multiple parsings, +the following principles resolve ambiguity:

+
    +
  1. +

    The number of nestings should be minimized. Thus, for example, +an interpretation <strong>...</strong> is always preferred to +<em><em>...</em></em>.

    +
  2. +
  3. +

    An interpretation <em><strong>...</strong></em> is always +preferred to <strong><em>...</em></strong>.

    +
  4. +
  5. +

    When two potential emphasis or strong emphasis spans overlap, +so that the second begins before the first ends and ends after +the first ends, the first takes precedence. Thus, for example, +*foo _bar* baz_ is parsed as <em>foo _bar</em> baz_ rather +than *foo <em>bar* baz</em>.

    +
  6. +
  7. +

    When there are two potential emphasis or strong emphasis spans +with the same closing delimiter, the shorter one (the one that +opens later) takes precedence. Thus, for example, +**foo **bar baz** is parsed as **foo <strong>bar baz</strong> +rather than <strong>foo **bar baz</strong>.

    +
  8. +
  9. +

    Inline code spans, links, images, and HTML tags group more tightly +than emphasis. So, when there is a choice between an interpretation +that contains one of these elements and one that does not, the +former always wins. Thus, for example, *[foo*](bar) is +parsed as *<a href="bar">foo*</a> rather than as +<em>[foo</em>](bar).

    +
  10. +
+

These rules can be illustrated through a series of examples.

+

Rule 1:

+
*foo bar*
+.
+<p><em>foo bar</em></p>
+
+

This is not emphasis, because the opening * is followed by +whitespace, and hence not part of a [left-flanking delimiter run]:

+
a * foo bar*
+.
+<p>a * foo bar*</p>
+
+

This is not emphasis, because the opening * is preceded +by an alphanumeric and followed by punctuation, and hence +not part of a [left-flanking delimiter run]:

+
a*"foo"*
+.
+<p>a*&quot;foo&quot;*</p>
+
+

Unicode nonbreaking spaces count as whitespace, too:

+
* a *
+.
+<p>* a *</p>
+
+

Unicode symbols count as punctuation, too:

+
*$*alpha.
+
+*£*bravo.
+
+*€*charlie.
+.
+<p>*$*alpha.</p>
+<p>*£*bravo.</p>
+<p>*€*charlie.</p>
+
+

Intraword emphasis with * is permitted:

+
foo*bar*
+.
+<p>foo<em>bar</em></p>
+
+
5*6*78
+.
+<p>5<em>6</em>78</p>
+
+

Rule 2:

+
_foo bar_
+.
+<p><em>foo bar</em></p>
+
+

This is not emphasis, because the opening _ is followed by +whitespace:

+
_ foo bar_
+.
+<p>_ foo bar_</p>
+
+

This is not emphasis, because the opening _ is preceded +by an alphanumeric and followed by punctuation:

+
a_"foo"_
+.
+<p>a_&quot;foo&quot;_</p>
+
+

Emphasis with _ is not allowed inside words:

+
foo_bar_
+.
+<p>foo_bar_</p>
+
+
5_6_78
+.
+<p>5_6_78</p>
+
+
пристаням_стремятся_
+.
+<p>пристаням_стремятся_</p>
+
+

Here _ does not generate emphasis, because the first delimiter run +is right-flanking and the second left-flanking:

+
aa_"bb"_cc
+.
+<p>aa_&quot;bb&quot;_cc</p>
+
+

This is emphasis, even though the opening delimiter is +both left- and right-flanking, because it is preceded by +punctuation:

+
foo-_(bar)_
+.
+<p>foo-<em>(bar)</em></p>
+
+

Rule 3:

+

This is not emphasis, because the closing delimiter does +not match the opening delimiter:

+
_foo*
+.
+<p>_foo*</p>
+
+

This is not emphasis, because the closing * is preceded by +whitespace:

+
*foo bar *
+.
+<p>*foo bar *</p>
+
+

A line ending also counts as whitespace:

+
*foo bar
+*
+.
+<p>*foo bar
+*</p>
+
+

This is not emphasis, because the second * is +preceded by punctuation and followed by an alphanumeric +(hence it is not part of a [right-flanking delimiter run]:

+
*(*foo)
+.
+<p>*(*foo)</p>
+
+

The point of this restriction is more easily appreciated +with this example:

+
*(*foo*)*
+.
+<p><em>(<em>foo</em>)</em></p>
+
+

Intraword emphasis with * is allowed:

+
*foo*bar
+.
+<p><em>foo</em>bar</p>
+
+

Rule 4:

+

This is not emphasis, because the closing _ is preceded by +whitespace:

+
_foo bar _
+.
+<p>_foo bar _</p>
+
+

This is not emphasis, because the second _ is +preceded by punctuation and followed by an alphanumeric:

+
_(_foo)
+.
+<p>_(_foo)</p>
+
+

This is emphasis within emphasis:

+
_(_foo_)_
+.
+<p><em>(<em>foo</em>)</em></p>
+
+

Intraword emphasis is disallowed for _:

+
_foo_bar
+.
+<p>_foo_bar</p>
+
+
_пристаням_стремятся
+.
+<p>_пристаням_стремятся</p>
+
+
_foo_bar_baz_
+.
+<p><em>foo_bar_baz</em></p>
+
+

This is emphasis, even though the closing delimiter is +both left- and right-flanking, because it is followed by +punctuation:

+
_(bar)_.
+.
+<p><em>(bar)</em>.</p>
+
+

Rule 5:

+
**foo bar**
+.
+<p><strong>foo bar</strong></p>
+
+

This is not strong emphasis, because the opening delimiter is +followed by whitespace:

+
** foo bar**
+.
+<p>** foo bar**</p>
+
+

This is not strong emphasis, because the opening ** is preceded +by an alphanumeric and followed by punctuation, and hence +not part of a [left-flanking delimiter run]:

+
a**"foo"**
+.
+<p>a**&quot;foo&quot;**</p>
+
+

Intraword strong emphasis with ** is permitted:

+
foo**bar**
+.
+<p>foo<strong>bar</strong></p>
+
+

Rule 6:

+
__foo bar__
+.
+<p><strong>foo bar</strong></p>
+
+

This is not strong emphasis, because the opening delimiter is +followed by whitespace:

+
__ foo bar__
+.
+<p>__ foo bar__</p>
+
+

A line ending counts as whitespace:

+
__
+foo bar__
+.
+<p>__
+foo bar__</p>
+
+

This is not strong emphasis, because the opening __ is preceded +by an alphanumeric and followed by punctuation:

+
a__"foo"__
+.
+<p>a__&quot;foo&quot;__</p>
+
+

Intraword strong emphasis is forbidden with __:

+
foo__bar__
+.
+<p>foo__bar__</p>
+
+
5__6__78
+.
+<p>5__6__78</p>
+
+
пристаням__стремятся__
+.
+<p>пристаням__стремятся__</p>
+
+
__foo, __bar__, baz__
+.
+<p><strong>foo, <strong>bar</strong>, baz</strong></p>
+
+

This is strong emphasis, even though the opening delimiter is +both left- and right-flanking, because it is preceded by +punctuation:

+
foo-__(bar)__
+.
+<p>foo-<strong>(bar)</strong></p>
+
+

Rule 7:

+

This is not strong emphasis, because the closing delimiter is preceded +by whitespace:

+
**foo bar **
+.
+<p>**foo bar **</p>
+
+

(Nor can it be interpreted as an emphasized *foo bar *, because of +Rule 11.)

+

This is not strong emphasis, because the second ** is +preceded by punctuation and followed by an alphanumeric:

+
**(**foo)
+.
+<p>**(**foo)</p>
+
+

The point of this restriction is more easily appreciated +with these examples:

+
*(**foo**)*
+.
+<p><em>(<strong>foo</strong>)</em></p>
+
+
**Gomphocarpus (*Gomphocarpus physocarpus*, syn.
+*Asclepias physocarpa*)**
+.
+<p><strong>Gomphocarpus (<em>Gomphocarpus physocarpus</em>, syn.
+<em>Asclepias physocarpa</em>)</strong></p>
+
+
**foo "*bar*" foo**
+.
+<p><strong>foo &quot;<em>bar</em>&quot; foo</strong></p>
+
+

Intraword emphasis:

+
**foo**bar
+.
+<p><strong>foo</strong>bar</p>
+
+

Rule 8:

+

This is not strong emphasis, because the closing delimiter is +preceded by whitespace:

+
__foo bar __
+.
+<p>__foo bar __</p>
+
+

This is not strong emphasis, because the second __ is +preceded by punctuation and followed by an alphanumeric:

+
__(__foo)
+.
+<p>__(__foo)</p>
+
+

The point of this restriction is more easily appreciated +with this example:

+
_(__foo__)_
+.
+<p><em>(<strong>foo</strong>)</em></p>
+
+

Intraword strong emphasis is forbidden with __:

+
__foo__bar
+.
+<p>__foo__bar</p>
+
+
__пристаням__стремятся
+.
+<p>__пристаням__стремятся</p>
+
+
__foo__bar__baz__
+.
+<p><strong>foo__bar__baz</strong></p>
+
+

This is strong emphasis, even though the closing delimiter is +both left- and right-flanking, because it is followed by +punctuation:

+
__(bar)__.
+.
+<p><strong>(bar)</strong>.</p>
+
+

Rule 9:

+

Any nonempty sequence of inline elements can be the contents of an +emphasized span.

+
*foo [bar](/url)*
+.
+<p><em>foo <a href="/url">bar</a></em></p>
+
+
*foo
+bar*
+.
+<p><em>foo
+bar</em></p>
+
+

In particular, emphasis and strong emphasis can be nested +inside emphasis:

+
_foo __bar__ baz_
+.
+<p><em>foo <strong>bar</strong> baz</em></p>
+
+
_foo _bar_ baz_
+.
+<p><em>foo <em>bar</em> baz</em></p>
+
+
__foo_ bar_
+.
+<p><em><em>foo</em> bar</em></p>
+
+
*foo *bar**
+.
+<p><em>foo <em>bar</em></em></p>
+
+
*foo **bar** baz*
+.
+<p><em>foo <strong>bar</strong> baz</em></p>
+
+
*foo**bar**baz*
+.
+<p><em>foo<strong>bar</strong>baz</em></p>
+
+

Note that in the preceding case, the interpretation

+
<p><em>foo</em><em>bar<em></em>baz</em></p>
+
+

is precluded by the condition that a delimiter that +can both open and close (like the * after foo) +cannot form emphasis if the sum of the lengths of +the delimiter runs containing the opening and +closing delimiters is a multiple of 3 unless +both lengths are multiples of 3.

+

For the same reason, we don't get two consecutive +emphasis sections in this example:

+
*foo**bar*
+.
+<p><em>foo**bar</em></p>
+
+

The same condition ensures that the following +cases are all strong emphasis nested inside +emphasis, even when the interior whitespace is +omitted:

+
***foo** bar*
+.
+<p><em><strong>foo</strong> bar</em></p>
+
+
*foo **bar***
+.
+<p><em>foo <strong>bar</strong></em></p>
+
+
*foo**bar***
+.
+<p><em>foo<strong>bar</strong></em></p>
+
+

When the lengths of the interior closing and opening +delimiter runs are both multiples of 3, though, +they can match to create emphasis:

+
foo***bar***baz
+.
+<p>foo<em><strong>bar</strong></em>baz</p>
+
+
foo******bar*********baz
+.
+<p>foo<strong><strong><strong>bar</strong></strong></strong>***baz</p>
+
+

Indefinite levels of nesting are possible:

+
*foo **bar *baz* bim** bop*
+.
+<p><em>foo <strong>bar <em>baz</em> bim</strong> bop</em></p>
+
+
*foo [*bar*](/url)*
+.
+<p><em>foo <a href="/url"><em>bar</em></a></em></p>
+
+

There can be no empty emphasis or strong emphasis:

+
** is not an empty emphasis
+.
+<p>** is not an empty emphasis</p>
+
+
**** is not an empty strong emphasis
+.
+<p>**** is not an empty strong emphasis</p>
+
+

Rule 10:

+

Any nonempty sequence of inline elements can be the contents of an +strongly emphasized span.

+
**foo [bar](/url)**
+.
+<p><strong>foo <a href="/url">bar</a></strong></p>
+
+
**foo
+bar**
+.
+<p><strong>foo
+bar</strong></p>
+
+

In particular, emphasis and strong emphasis can be nested +inside strong emphasis:

+
__foo _bar_ baz__
+.
+<p><strong>foo <em>bar</em> baz</strong></p>
+
+
__foo __bar__ baz__
+.
+<p><strong>foo <strong>bar</strong> baz</strong></p>
+
+
____foo__ bar__
+.
+<p><strong><strong>foo</strong> bar</strong></p>
+
+
**foo **bar****
+.
+<p><strong>foo <strong>bar</strong></strong></p>
+
+
**foo *bar* baz**
+.
+<p><strong>foo <em>bar</em> baz</strong></p>
+
+
**foo*bar*baz**
+.
+<p><strong>foo<em>bar</em>baz</strong></p>
+
+
***foo* bar**
+.
+<p><strong><em>foo</em> bar</strong></p>
+
+
**foo *bar***
+.
+<p><strong>foo <em>bar</em></strong></p>
+
+

Indefinite levels of nesting are possible:

+
**foo *bar **baz**
+bim* bop**
+.
+<p><strong>foo <em>bar <strong>baz</strong>
+bim</em> bop</strong></p>
+
+
**foo [*bar*](/url)**
+.
+<p><strong>foo <a href="/url"><em>bar</em></a></strong></p>
+
+

There can be no empty emphasis or strong emphasis:

+
__ is not an empty emphasis
+.
+<p>__ is not an empty emphasis</p>
+
+
____ is not an empty strong emphasis
+.
+<p>____ is not an empty strong emphasis</p>
+
+

Rule 11:

+
foo ***
+.
+<p>foo ***</p>
+
+
foo *\**
+.
+<p>foo <em>*</em></p>
+
+
foo *_*
+.
+<p>foo <em>_</em></p>
+
+
foo *****
+.
+<p>foo *****</p>
+
+
foo **\***
+.
+<p>foo <strong>*</strong></p>
+
+
foo **_**
+.
+<p>foo <strong>_</strong></p>
+
+

Note that when delimiters do not match evenly, Rule 11 determines +that the excess literal * characters will appear outside of the +emphasis, rather than inside it:

+
**foo*
+.
+<p>*<em>foo</em></p>
+
+
*foo**
+.
+<p><em>foo</em>*</p>
+
+
***foo**
+.
+<p>*<strong>foo</strong></p>
+
+
****foo*
+.
+<p>***<em>foo</em></p>
+
+
**foo***
+.
+<p><strong>foo</strong>*</p>
+
+
*foo****
+.
+<p><em>foo</em>***</p>
+
+

Rule 12:

+
foo ___
+.
+<p>foo ___</p>
+
+
foo _\__
+.
+<p>foo <em>_</em></p>
+
+
foo _*_
+.
+<p>foo <em>*</em></p>
+
+
foo _____
+.
+<p>foo _____</p>
+
+
foo __\___
+.
+<p>foo <strong>_</strong></p>
+
+
foo __*__
+.
+<p>foo <strong>*</strong></p>
+
+
__foo_
+.
+<p>_<em>foo</em></p>
+
+

Note that when delimiters do not match evenly, Rule 12 determines +that the excess literal _ characters will appear outside of the +emphasis, rather than inside it:

+
_foo__
+.
+<p><em>foo</em>_</p>
+
+
___foo__
+.
+<p>_<strong>foo</strong></p>
+
+
____foo_
+.
+<p>___<em>foo</em></p>
+
+
__foo___
+.
+<p><strong>foo</strong>_</p>
+
+
_foo____
+.
+<p><em>foo</em>___</p>
+
+

Rule 13 implies that if you want emphasis nested directly inside +emphasis, you must use different delimiters:

+
**foo**
+.
+<p><strong>foo</strong></p>
+
+
*_foo_*
+.
+<p><em><em>foo</em></em></p>
+
+
__foo__
+.
+<p><strong>foo</strong></p>
+
+
_*foo*_
+.
+<p><em><em>foo</em></em></p>
+
+

However, strong emphasis within strong emphasis is possible without +switching delimiters:

+
****foo****
+.
+<p><strong><strong>foo</strong></strong></p>
+
+
____foo____
+.
+<p><strong><strong>foo</strong></strong></p>
+
+

Rule 13 can be applied to arbitrarily long sequences of +delimiters:

+
******foo******
+.
+<p><strong><strong><strong>foo</strong></strong></strong></p>
+
+

Rule 14:

+
***foo***
+.
+<p><em><strong>foo</strong></em></p>
+
+
_____foo_____
+.
+<p><em><strong><strong>foo</strong></strong></em></p>
+
+

Rule 15:

+
*foo _bar* baz_
+.
+<p><em>foo _bar</em> baz_</p>
+
+
*foo __bar *baz bim__ bam*
+.
+<p><em>foo <strong>bar *baz bim</strong> bam</em></p>
+
+

Rule 16:

+
**foo **bar baz**
+.
+<p>**foo <strong>bar baz</strong></p>
+
+
*foo *bar baz*
+.
+<p>*foo <em>bar baz</em></p>
+
+

Rule 17:

+
*[bar*](/url)
+.
+<p>*<a href="/url">bar*</a></p>
+
+
_foo [bar_](/url)
+.
+<p>_foo <a href="/url">bar_</a></p>
+
+
*<img src="foo" title="*"/>
+.
+<p>*<img src="foo" title="*"/></p>
+
+
**<a href="**">
+.
+<p>**<a href="**"></p>
+
+
__<a href="__">
+.
+<p>__<a href="__"></p>
+
+
*a `*`*
+.
+<p><em>a <code>*</code></em></p>
+
+
_a `_`_
+.
+<p><em>a <code>_</code></em></p>
+
+
**a<https://foo.bar/?q=**>
+.
+<p>**a<a href="https://foo.bar/?q=**">https://foo.bar/?q=**</a></p>
+
+
__a<https://foo.bar/?q=__>
+.
+<p>__a<a href="https://foo.bar/?q=__">https://foo.bar/?q=__</a></p>
+
+

Links

+

A link contains [link text] (the visible text), a [link destination] +(the URI that is the link destination), and optionally a [link title]. +There are two basic kinds of links in Markdown. In [inline links] the +destination and title are given immediately after the link text. In +[reference links] the destination and title are defined elsewhere in +the document.

+

A link text consists of a sequence of zero or more +inline elements enclosed by square brackets ([ and ]). The +following rules apply:

+
    +
  • +

    Links may not contain other links, at any level of nesting. If +multiple otherwise valid link definitions appear nested inside each +other, the inner-most definition is used.

    +
  • +
  • +

    Brackets are allowed in the [link text] only if (a) they +are backslash-escaped or (b) they appear as a matched pair of brackets, +with an open bracket [, a sequence of zero or more inlines, and +a close bracket ].

    +
  • +
  • +

    Backtick [code spans], [autolinks], and raw [HTML tags] bind more tightly +than the brackets in link text. Thus, for example, +[foo`]` could not be a link text, since the second ] +is part of a code span.

    +
  • +
  • +

    The brackets in link text bind more tightly than markers for +[emphasis and strong emphasis]. Thus, for example, *[foo*](url) is a link.

    +
  • +
+

A link destination consists of either

+
    +
  • +

    a sequence of zero or more characters between an opening < and a +closing > that contains no line endings or unescaped +< or > characters, or

    +
  • +
  • +

    a nonempty sequence of characters that does not start with <, +does not include [ASCII control characters][ASCII control character] +or [space] character, and includes parentheses only if (a) they are +backslash-escaped or (b) they are part of a balanced pair of +unescaped parentheses. +(Implementations may impose limits on parentheses nesting to +avoid performance issues, but at least three levels of nesting +should be supported.)

    +
  • +
+

A link title consists of either

+
    +
  • +

    a sequence of zero or more characters between straight double-quote +characters ("), including a " character only if it is +backslash-escaped, or

    +
  • +
  • +

    a sequence of zero or more characters between straight single-quote +characters ('), including a ' character only if it is +backslash-escaped, or

    +
  • +
  • +

    a sequence of zero or more characters between matching parentheses +((...)), including a ( or ) character only if it is +backslash-escaped.

    +
  • +
+

Although [link titles] may span multiple lines, they may not contain +a [blank line].

+

An inline link consists of a [link text] followed immediately +by a left parenthesis (, an optional [link destination], an optional +[link title], and a right parenthesis ). +These four components may be separated by spaces, tabs, and up to one line +ending. +If both [link destination] and [link title] are present, they must be +separated by spaces, tabs, and up to one line ending.

+

The link's text consists of the inlines contained +in the [link text] (excluding the enclosing square brackets). +The link's URI consists of the link destination, excluding enclosing +<...> if present, with backslash-escapes in effect as described +above. The link's title consists of the link title, excluding its +enclosing delimiters, with backslash-escapes in effect as described +above.

+

Here is a simple inline link:

+
[link](/uri "title")
+.
+<p><a href="/uri" title="title">link</a></p>
+
+

The title, the link text and even +the destination may be omitted:

+
[link](/uri)
+.
+<p><a href="/uri">link</a></p>
+
+
[](./target.md)
+.
+<p><a href="./target.md"></a></p>
+
+
[link]()
+.
+<p><a href="">link</a></p>
+
+
[link](<>)
+.
+<p><a href="">link</a></p>
+
+
[]()
+.
+<p><a href=""></a></p>
+
+

The destination can only contain spaces if it is +enclosed in pointy brackets:

+
[link](/my uri)
+.
+<p>[link](/my uri)</p>
+
+
[link](</my uri>)
+.
+<p><a href="/my%20uri">link</a></p>
+
+

The destination cannot contain line endings, +even if enclosed in pointy brackets:

+
[link](foo
+bar)
+.
+<p>[link](foo
+bar)</p>
+
+
[link](<foo
+bar>)
+.
+<p>[link](<foo
+bar>)</p>
+
+

The destination can contain ) if it is enclosed +in pointy brackets:

+
[a](<b)c>)
+.
+<p><a href="b)c">a</a></p>
+
+

Pointy brackets that enclose links must be unescaped:

+
[link](<foo\>)
+.
+<p>[link](&lt;foo&gt;)</p>
+
+

These are not links, because the opening pointy bracket +is not matched properly:

+
[a](<b)c
+[a](<b)c>
+[a](<b>c)
+.
+<p>[a](&lt;b)c
+[a](&lt;b)c&gt;
+[a](<b>c)</p>
+
+

Parentheses inside the link destination may be escaped:

+
[link](\(foo\))
+.
+<p><a href="(foo)">link</a></p>
+
+

Any number of parentheses are allowed without escaping, as long as they are +balanced:

+
[link](foo(and(bar)))
+.
+<p><a href="foo(and(bar))">link</a></p>
+
+

However, if you have unbalanced parentheses, you need to escape or use the +<...> form:

+
[link](foo(and(bar))
+.
+<p>[link](foo(and(bar))</p>
+
+
[link](foo\(and\(bar\))
+.
+<p><a href="foo(and(bar)">link</a></p>
+
+
[link](<foo(and(bar)>)
+.
+<p><a href="foo(and(bar)">link</a></p>
+
+

Parentheses and other symbols can also be escaped, as usual +in Markdown:

+
[link](foo\)\:)
+.
+<p><a href="foo):">link</a></p>
+
+

A link can contain fragment identifiers and queries:

+
[link](#fragment)
+
+[link](https://example.com#fragment)
+
+[link](https://example.com?foo=3#frag)
+.
+<p><a href="#fragment">link</a></p>
+<p><a href="https://example.com#fragment">link</a></p>
+<p><a href="https://example.com?foo=3#frag">link</a></p>
+
+

Note that a backslash before a non-escapable character is +just a backslash:

+
[link](foo\bar)
+.
+<p><a href="foo%5Cbar">link</a></p>
+
+

URL-escaping should be left alone inside the destination, as all +URL-escaped characters are also valid URL characters. Entity and +numerical character references in the destination will be parsed +into the corresponding Unicode code points, as usual. These may +be optionally URL-escaped when written as HTML, but this spec +does not enforce any particular policy for rendering URLs in +HTML or other formats. Renderers may make different decisions +about how to escape or normalize URLs in the output.

+
[link](foo%20b&auml;)
+.
+<p><a href="foo%20b%C3%A4">link</a></p>
+
+

Note that, because titles can often be parsed as destinations, +if you try to omit the destination and keep the title, you'll +get unexpected results:

+
[link]("title")
+.
+<p><a href="%22title%22">link</a></p>
+
+

Titles may be in single quotes, double quotes, or parentheses:

+
[link](/url "title")
+[link](/url 'title')
+[link](/url (title))
+.
+<p><a href="/url" title="title">link</a>
+<a href="/url" title="title">link</a>
+<a href="/url" title="title">link</a></p>
+
+

Backslash escapes and entity and numeric character references +may be used in titles:

+
[link](/url "title \"&quot;")
+.
+<p><a href="/url" title="title &quot;&quot;">link</a></p>
+
+

Titles must be separated from the link using spaces, tabs, and up to one line +ending. +Other [Unicode whitespace] like non-breaking space doesn't work.

+
[link](/url "title")
+.
+<p><a href="/url%C2%A0%22title%22">link</a></p>
+
+

Nested balanced quotes are not allowed without escaping:

+
[link](/url "title "and" title")
+.
+<p>[link](/url &quot;title &quot;and&quot; title&quot;)</p>
+
+

But it is easy to work around this by using a different quote type:

+
[link](/url 'title "and" title')
+.
+<p><a href="/url" title="title &quot;and&quot; title">link</a></p>
+
+

(Note: Markdown.pl did allow double quotes inside a double-quoted +title, and its test suite included a test demonstrating this. +But it is hard to see a good rationale for the extra complexity this +brings, since there are already many ways---backslash escaping, +entity and numeric character references, or using a different +quote type for the enclosing title---to write titles containing +double quotes. Markdown.pl's handling of titles has a number +of other strange features. For example, it allows single-quoted +titles in inline links, but not reference links. And, in +reference links but not inline links, it allows a title to begin +with " and end with ). Markdown.pl 1.0.1 even allows +titles with no closing quotation mark, though 1.0.2b8 does not. +It seems preferable to adopt a simple, rational rule that works +the same way in inline links and link reference definitions.)

+

Spaces, tabs, and up to one line ending is allowed around the destination and +title:

+
[link](   /uri
+  "title"  )
+.
+<p><a href="/uri" title="title">link</a></p>
+
+

But it is not allowed between the link text and the +following parenthesis:

+
[link] (/uri)
+.
+<p>[link] (/uri)</p>
+
+

The link text may contain balanced brackets, but not unbalanced ones, +unless they are escaped:

+
[link [foo [bar]]](/uri)
+.
+<p><a href="/uri">link [foo [bar]]</a></p>
+
+
[link] bar](/uri)
+.
+<p>[link] bar](/uri)</p>
+
+
[link [bar](/uri)
+.
+<p>[link <a href="/uri">bar</a></p>
+
+
[link \[bar](/uri)
+.
+<p><a href="/uri">link [bar</a></p>
+
+

The link text may contain inline content:

+
[link *foo **bar** `#`*](/uri)
+.
+<p><a href="/uri">link <em>foo <strong>bar</strong> <code>#</code></em></a></p>
+
+
[![moon](moon.jpg)](/uri)
+.
+<p><a href="/uri"><img src="moon.jpg" alt="moon" /></a></p>
+
+

However, links may not contain other links, at any level of nesting.

+
[foo [bar](/uri)](/uri)
+.
+<p>[foo <a href="/uri">bar</a>](/uri)</p>
+
+
[foo *[bar [baz](/uri)](/uri)*](/uri)
+.
+<p>[foo <em>[bar <a href="/uri">baz</a>](/uri)</em>](/uri)</p>
+
+
![[[foo](uri1)](uri2)](uri3)
+.
+<p><img src="uri3" alt="[foo](uri2)" /></p>
+
+

These cases illustrate the precedence of link text grouping over +emphasis grouping:

+
*[foo*](/uri)
+.
+<p>*<a href="/uri">foo*</a></p>
+
+
[foo *bar](baz*)
+.
+<p><a href="baz*">foo *bar</a></p>
+
+

Note that brackets that aren't part of links do not take +precedence:

+
*foo [bar* baz]
+.
+<p><em>foo [bar</em> baz]</p>
+
+

These cases illustrate the precedence of HTML tags, code spans, +and autolinks over link grouping:

+
[foo <bar attr="](baz)">
+.
+<p>[foo <bar attr="](baz)"></p>
+
+
[foo`](/uri)`
+.
+<p>[foo<code>](/uri)</code></p>
+
+
[foo<https://example.com/?search=](uri)>
+.
+<p>[foo<a href="https://example.com/?search=%5D(uri)">https://example.com/?search=](uri)</a></p>
+
+

There are three kinds of reference links: +full, collapsed, +and shortcut.

+

A full reference link +consists of a [link text] immediately followed by a [link label] +that [matches] a [link reference definition] elsewhere in the document.

+

A link label begins with a left bracket ([) and ends +with the first right bracket (]) that is not backslash-escaped. +Between these brackets there must be at least one character that is not a space, +tab, or line ending. +Unescaped square bracket characters are not allowed inside the +opening and closing square brackets of [link labels]. A link +label can have at most 999 characters inside the square +brackets.

+

One label matches +another just in case their normalized forms are equal. To normalize a +label, strip off the opening and closing brackets, +perform the Unicode case fold, strip leading and trailing +spaces, tabs, and line endings, and collapse consecutive internal +spaces, tabs, and line endings to a single space. If there are multiple +matching reference link definitions, the one that comes first in the +document is used. (It is desirable in such cases to emit a warning.)

+

The link's URI and title are provided by the matching [link +reference definition].

+

Here is a simple example:

+
[foo][bar]
+
+[bar]: /url "title"
+.
+<p><a href="/url" title="title">foo</a></p>
+
+

The rules for the [link text] are the same as with +[inline links]. Thus:

+

The link text may contain balanced brackets, but not unbalanced ones, +unless they are escaped:

+
[link [foo [bar]]][ref]
+
+[ref]: /uri
+.
+<p><a href="/uri">link [foo [bar]]</a></p>
+
+
[link \[bar][ref]
+
+[ref]: /uri
+.
+<p><a href="/uri">link [bar</a></p>
+
+

The link text may contain inline content:

+
[link *foo **bar** `#`*][ref]
+
+[ref]: /uri
+.
+<p><a href="/uri">link <em>foo <strong>bar</strong> <code>#</code></em></a></p>
+
+
[![moon](moon.jpg)][ref]
+
+[ref]: /uri
+.
+<p><a href="/uri"><img src="moon.jpg" alt="moon" /></a></p>
+
+

However, links may not contain other links, at any level of nesting.

+
[foo [bar](/uri)][ref]
+
+[ref]: /uri
+.
+<p>[foo <a href="/uri">bar</a>]<a href="/uri">ref</a></p>
+
+
[foo *bar [baz][ref]*][ref]
+
+[ref]: /uri
+.
+<p>[foo <em>bar <a href="/uri">baz</a></em>]<a href="/uri">ref</a></p>
+
+

(In the examples above, we have two [shortcut reference links] +instead of one [full reference link].)

+

The following cases illustrate the precedence of link text grouping over +emphasis grouping:

+
*[foo*][ref]
+
+[ref]: /uri
+.
+<p>*<a href="/uri">foo*</a></p>
+
+
[foo *bar][ref]*
+
+[ref]: /uri
+.
+<p><a href="/uri">foo *bar</a>*</p>
+
+

These cases illustrate the precedence of HTML tags, code spans, +and autolinks over link grouping:

+
[foo <bar attr="][ref]">
+
+[ref]: /uri
+.
+<p>[foo <bar attr="][ref]"></p>
+
+
[foo`][ref]`
+
+[ref]: /uri
+.
+<p>[foo<code>][ref]</code></p>
+
+
[foo<https://example.com/?search=][ref]>
+
+[ref]: /uri
+.
+<p>[foo<a href="https://example.com/?search=%5D%5Bref%5D">https://example.com/?search=][ref]</a></p>
+
+

Matching is case-insensitive:

+
[foo][BaR]
+
+[bar]: /url "title"
+.
+<p><a href="/url" title="title">foo</a></p>
+
+

Unicode case fold is used:

+
[ẞ]
+
+[SS]: /url
+.
+<p><a href="/url">ẞ</a></p>
+
+

Consecutive internal spaces, tabs, and line endings are treated as one space for +purposes of determining matching:

+
[Foo
+  bar]: /url
+
+[Baz][Foo bar]
+.
+<p><a href="/url">Baz</a></p>
+
+

No spaces, tabs, or line endings are allowed between the [link text] and the +[link label]:

+
[foo] [bar]
+
+[bar]: /url "title"
+.
+<p>[foo] <a href="/url" title="title">bar</a></p>
+
+
[foo]
+[bar]
+
+[bar]: /url "title"
+.
+<p>[foo]
+<a href="/url" title="title">bar</a></p>
+
+

This is a departure from John Gruber's original Markdown syntax +description, which explicitly allows whitespace between the link +text and the link label. It brings reference links in line with +[inline links], which (according to both original Markdown and +this spec) cannot have whitespace after the link text. More +importantly, it prevents inadvertent capture of consecutive +[shortcut reference links]. If whitespace is allowed between the +link text and the link label, then in the following we will have +a single reference link, not two shortcut reference links, as +intended:

+
[foo]
+[bar]
+
+[foo]: /url1
+[bar]: /url2
+
+

(Note that [shortcut reference links] were introduced by Gruber +himself in a beta version of Markdown.pl, but never included +in the official syntax description. Without shortcut reference +links, it is harmless to allow space between the link text and +link label; but once shortcut references are introduced, it is +too dangerous to allow this, as it frequently leads to +unintended results.)

+

When there are multiple matching [link reference definitions], +the first is used:

+
[foo]: /url1
+
+[foo]: /url2
+
+[bar][foo]
+.
+<p><a href="/url1">bar</a></p>
+
+

Note that matching is performed on normalized strings, not parsed +inline content. So the following does not match, even though the +labels define equivalent inline content:

+
[bar][foo\!]
+
+[foo!]: /url
+.
+<p>[bar][foo!]</p>
+
+

[Link labels] cannot contain brackets, unless they are +backslash-escaped:

+
[foo][ref[]
+
+[ref[]: /uri
+.
+<p>[foo][ref[]</p>
+<p>[ref[]: /uri</p>
+
+
[foo][ref[bar]]
+
+[ref[bar]]: /uri
+.
+<p>[foo][ref[bar]]</p>
+<p>[ref[bar]]: /uri</p>
+
+
[[[foo]]]
+
+[[[foo]]]: /url
+.
+<p>[[[foo]]]</p>
+<p>[[[foo]]]: /url</p>
+
+
[foo][ref\[]
+
+[ref\[]: /uri
+.
+<p><a href="/uri">foo</a></p>
+
+

Note that in this example ] is not backslash-escaped:

+
[bar\\]: /uri
+
+[bar\\]
+.
+<p><a href="/uri">bar\</a></p>
+
+

A [link label] must contain at least one character that is not a space, tab, or +line ending:

+
[]
+
+[]: /uri
+.
+<p>[]</p>
+<p>[]: /uri</p>
+
+
[
+ ]
+
+[
+ ]: /uri
+.
+<p>[
+]</p>
+<p>[
+]: /uri</p>
+
+

A collapsed reference link +consists of a [link label] that [matches] a +[link reference definition] elsewhere in the +document, followed by the string []. +The contents of the link label are parsed as inlines, +which are used as the link's text. The link's URI and title are +provided by the matching reference link definition. Thus, +[foo][] is equivalent to [foo][foo].

+
[foo][]
+
+[foo]: /url "title"
+.
+<p><a href="/url" title="title">foo</a></p>
+
+
[*foo* bar][]
+
+[*foo* bar]: /url "title"
+.
+<p><a href="/url" title="title"><em>foo</em> bar</a></p>
+
+

The link labels are case-insensitive:

+
[Foo][]
+
+[foo]: /url "title"
+.
+<p><a href="/url" title="title">Foo</a></p>
+
+

As with full reference links, spaces, tabs, or line endings are not +allowed between the two sets of brackets:

+
[foo] 
+[]
+
+[foo]: /url "title"
+.
+<p><a href="/url" title="title">foo</a>
+[]</p>
+
+

A shortcut reference link +consists of a [link label] that [matches] a +[link reference definition] elsewhere in the +document and is not followed by [] or a link label. +The contents of the link label are parsed as inlines, +which are used as the link's text. The link's URI and title +are provided by the matching link reference definition. +Thus, [foo] is equivalent to [foo][].

+
[foo]
+
+[foo]: /url "title"
+.
+<p><a href="/url" title="title">foo</a></p>
+
+
[*foo* bar]
+
+[*foo* bar]: /url "title"
+.
+<p><a href="/url" title="title"><em>foo</em> bar</a></p>
+
+
[[*foo* bar]]
+
+[*foo* bar]: /url "title"
+.
+<p>[<a href="/url" title="title"><em>foo</em> bar</a>]</p>
+
+
[[bar [foo]
+
+[foo]: /url
+.
+<p>[[bar <a href="/url">foo</a></p>
+
+

The link labels are case-insensitive:

+
[Foo]
+
+[foo]: /url "title"
+.
+<p><a href="/url" title="title">Foo</a></p>
+
+

A space after the link text should be preserved:

+
[foo] bar
+
+[foo]: /url
+.
+<p><a href="/url">foo</a> bar</p>
+
+

If you just want bracketed text, you can backslash-escape the +opening bracket to avoid links:

+
\[foo]
+
+[foo]: /url "title"
+.
+<p>[foo]</p>
+
+

Note that this is a link, because a link label ends with the first +following closing bracket:

+
[foo*]: /url
+
+*[foo*]
+.
+<p>*<a href="/url">foo*</a></p>
+
+

Full and collapsed references take precedence over shortcut +references:

+
[foo][bar]
+
+[foo]: /url1
+[bar]: /url2
+.
+<p><a href="/url2">foo</a></p>
+
+
[foo][]
+
+[foo]: /url1
+.
+<p><a href="/url1">foo</a></p>
+
+

Inline links also take precedence:

+
[foo]()
+
+[foo]: /url1
+.
+<p><a href="">foo</a></p>
+
+
[foo](not a link)
+
+[foo]: /url1
+.
+<p><a href="/url1">foo</a>(not a link)</p>
+
+

In the following case [bar][baz] is parsed as a reference, +[foo] as normal text:

+
[foo][bar][baz]
+
+[baz]: /url
+.
+<p>[foo]<a href="/url">bar</a></p>
+
+

Here, though, [foo][bar] is parsed as a reference, since +[bar] is defined:

+
[foo][bar][baz]
+
+[baz]: /url1
+[bar]: /url2
+.
+<p><a href="/url2">foo</a><a href="/url1">baz</a></p>
+
+

Here [foo] is not parsed as a shortcut reference, because it +is followed by a link label (even though [bar] is not defined):

+
[foo][bar][baz]
+
+[baz]: /url1
+[foo]: /url2
+.
+<p>[foo]<a href="/url1">bar</a></p>
+
+

Images

+

Syntax for images is like the syntax for links, with one +difference. Instead of [link text], we have an +image description. The rules for this are the +same as for [link text], except that (a) an +image description starts with ![ rather than [, and +(b) an image description may contain links. +An image description has inline elements +as its contents. When an image is rendered to HTML, +this is standardly used as the image's alt attribute.

+
![foo](/url "title")
+.
+<p><img src="/url" alt="foo" title="title" /></p>
+
+
![foo *bar*]
+
+[foo *bar*]: train.jpg "train & tracks"
+.
+<p><img src="train.jpg" alt="foo bar" title="train &amp; tracks" /></p>
+
+
![foo ![bar](/url)](/url2)
+.
+<p><img src="/url2" alt="foo bar" /></p>
+
+
![foo [bar](/url)](/url2)
+.
+<p><img src="/url2" alt="foo bar" /></p>
+
+

Though this spec is concerned with parsing, not rendering, it is +recommended that in rendering to HTML, only the plain string content +of the [image description] be used. Note that in +the above example, the alt attribute's value is foo bar, not foo [bar](/url) or foo <a href="/url">bar</a>. Only the plain string +content is rendered, without formatting.

+
![foo *bar*][]
+
+[foo *bar*]: train.jpg "train & tracks"
+.
+<p><img src="train.jpg" alt="foo bar" title="train &amp; tracks" /></p>
+
+
![foo *bar*][foobar]
+
+[FOOBAR]: train.jpg "train & tracks"
+.
+<p><img src="train.jpg" alt="foo bar" title="train &amp; tracks" /></p>
+
+
![foo](train.jpg)
+.
+<p><img src="train.jpg" alt="foo" /></p>
+
+
My ![foo bar](/path/to/train.jpg  "title"   )
+.
+<p>My <img src="/path/to/train.jpg" alt="foo bar" title="title" /></p>
+
+
![foo](<url>)
+.
+<p><img src="url" alt="foo" /></p>
+
+
![](/url)
+.
+<p><img src="/url" alt="" /></p>
+
+

Reference-style:

+
![foo][bar]
+
+[bar]: /url
+.
+<p><img src="/url" alt="foo" /></p>
+
+
![foo][bar]
+
+[BAR]: /url
+.
+<p><img src="/url" alt="foo" /></p>
+
+

Collapsed:

+
![foo][]
+
+[foo]: /url "title"
+.
+<p><img src="/url" alt="foo" title="title" /></p>
+
+
![*foo* bar][]
+
+[*foo* bar]: /url "title"
+.
+<p><img src="/url" alt="foo bar" title="title" /></p>
+
+

The labels are case-insensitive:

+
![Foo][]
+
+[foo]: /url "title"
+.
+<p><img src="/url" alt="Foo" title="title" /></p>
+
+

As with reference links, spaces, tabs, and line endings, are not allowed +between the two sets of brackets:

+
![foo] 
+[]
+
+[foo]: /url "title"
+.
+<p><img src="/url" alt="foo" title="title" />
+[]</p>
+
+

Shortcut:

+
![foo]
+
+[foo]: /url "title"
+.
+<p><img src="/url" alt="foo" title="title" /></p>
+
+
![*foo* bar]
+
+[*foo* bar]: /url "title"
+.
+<p><img src="/url" alt="foo bar" title="title" /></p>
+
+

Note that link labels cannot contain unescaped brackets:

+
![[foo]]
+
+[[foo]]: /url "title"
+.
+<p>![[foo]]</p>
+<p>[[foo]]: /url &quot;title&quot;</p>
+
+

The link labels are case-insensitive:

+
![Foo]
+
+[foo]: /url "title"
+.
+<p><img src="/url" alt="Foo" title="title" /></p>
+
+

If you just want a literal ! followed by bracketed text, you can +backslash-escape the opening [:

+
!\[foo]
+
+[foo]: /url "title"
+.
+<p>![foo]</p>
+
+

If you want a link after a literal !, backslash-escape the +!:

+
\![foo]
+
+[foo]: /url "title"
+.
+<p>!<a href="/url" title="title">foo</a></p>
+
+

Autolinks

+

Autolinks are absolute URIs and email addresses inside +< and >. They are parsed as links, with the URL or email address +as the link label.

+

A URI autolink consists of <, followed by an +[absolute URI] followed by >. It is parsed as +a link to the URI, with the URI as the link's label.

+

An absolute URI, +for these purposes, consists of a [scheme] followed by a colon (:) +followed by zero or more characters other than [ASCII control +characters][ASCII control character], [space], <, and >. +If the URI includes these characters, they must be percent-encoded +(e.g. %20 for a space).

+

For purposes of this spec, a scheme is any sequence +of 2--32 characters beginning with an ASCII letter and followed +by any combination of ASCII letters, digits, or the symbols plus +("+"), period ("."), or hyphen ("-").

+

Here are some valid autolinks:

+
<http://foo.bar.baz>
+.
+<p><a href="http://foo.bar.baz">http://foo.bar.baz</a></p>
+
+
<https://foo.bar.baz/test?q=hello&id=22&boolean>
+.
+<p><a href="https://foo.bar.baz/test?q=hello&amp;id=22&amp;boolean">https://foo.bar.baz/test?q=hello&amp;id=22&amp;boolean</a></p>
+
+
<irc://foo.bar:2233/baz>
+.
+<p><a href="irc://foo.bar:2233/baz">irc://foo.bar:2233/baz</a></p>
+
+

Uppercase is also fine:

+
<MAILTO:FOO@BAR.BAZ>
+.
+<p><a href="MAILTO:FOO@BAR.BAZ">MAILTO:FOO@BAR.BAZ</a></p>
+
+

Note that many strings that count as [absolute URIs] for +purposes of this spec are not valid URIs, because their +schemes are not registered or because of other problems +with their syntax:

+
<a+b+c:d>
+.
+<p><a href="a+b+c:d">a+b+c:d</a></p>
+
+
<made-up-scheme://foo,bar>
+.
+<p><a href="made-up-scheme://foo,bar">made-up-scheme://foo,bar</a></p>
+
+
<https://../>
+.
+<p><a href="https://../">https://../</a></p>
+
+
<localhost:5001/foo>
+.
+<p><a href="localhost:5001/foo">localhost:5001/foo</a></p>
+
+

Spaces are not allowed in autolinks:

+
<https://foo.bar/baz bim>
+.
+<p>&lt;https://foo.bar/baz bim&gt;</p>
+
+

Backslash-escapes do not work inside autolinks:

+
<https://example.com/\[\>
+.
+<p><a href="https://example.com/%5C%5B%5C">https://example.com/\[\</a></p>
+
+

An email autolink +consists of <, followed by an [email address], +followed by >. The link's label is the email address, +and the URL is mailto: followed by the email address.

+

An email address, +for these purposes, is anything that matches +the non-normative regex from the HTML5 +spec:

+
/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?
+(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/
+
+

Examples of email autolinks:

+
<foo@bar.example.com>
+.
+<p><a href="mailto:foo@bar.example.com">foo@bar.example.com</a></p>
+
+
<foo+special@Bar.baz-bar0.com>
+.
+<p><a href="mailto:foo+special@Bar.baz-bar0.com">foo+special@Bar.baz-bar0.com</a></p>
+
+

Backslash-escapes do not work inside email autolinks:

+
<foo\+@bar.example.com>
+.
+<p>&lt;foo+@bar.example.com&gt;</p>
+
+

These are not autolinks:

+
<>
+.
+<p>&lt;&gt;</p>
+
+
< https://foo.bar >
+.
+<p>&lt; https://foo.bar &gt;</p>
+
+
<m:abc>
+.
+<p>&lt;m:abc&gt;</p>
+
+
<foo.bar.baz>
+.
+<p>&lt;foo.bar.baz&gt;</p>
+
+
https://example.com
+.
+<p>https://example.com</p>
+
+
foo@bar.example.com
+.
+<p>foo@bar.example.com</p>
+
+

Raw HTML

+

Text between < and > that looks like an HTML tag is parsed as a +raw HTML tag and will be rendered in HTML without escaping. +Tag and attribute names are not limited to current HTML tags, +so custom tags (and even, say, DocBook tags) may be used.

+

Here is the grammar for tags:

+

A tag name consists of an ASCII letter +followed by zero or more ASCII letters, digits, or +hyphens (-).

+

An attribute consists of spaces, tabs, and up to one line ending, +an [attribute name], and an optional +[attribute value specification].

+

An attribute name +consists of an ASCII letter, _, or :, followed by zero or more ASCII +letters, digits, _, ., :, or -. (Note: This is the XML +specification restricted to ASCII. HTML5 is laxer.)

+

An attribute value specification +consists of optional spaces, tabs, and up to one line ending, +a = character, optional spaces, tabs, and up to one line ending, +and an [attribute value].

+

An attribute value +consists of an [unquoted attribute value], +a [single-quoted attribute value], or a [double-quoted attribute value].

+

An unquoted attribute value +is a nonempty string of characters not +including spaces, tabs, line endings, ", ', =, <, >, or `.

+

A single-quoted attribute value +consists of ', zero or more +characters not including ', and a final '.

+

A double-quoted attribute value +consists of ", zero or more +characters not including ", and a final ".

+

An open tag consists of a < character, a [tag name], +zero or more [attributes], optional spaces, tabs, and up to one line ending, +an optional / character, and a > character.

+

A closing tag consists of the string </, a +[tag name], optional spaces, tabs, and up to one line ending, and the character +>.

+

An HTML comment consists of <!-->, <!--->, or <!--, a string of +characters not including the string -->, and --> (see the +HTML spec).

+

A processing instruction +consists of the string <?, a string +of characters not including the string ?>, and the string +?>.

+

A declaration consists of the string <!, an ASCII letter, zero or more +characters not including the character >, and the character >.

+

A CDATA section consists of +the string <![CDATA[, a string of characters not including the string +]]>, and the string ]]>.

+

An HTML tag consists of an [open tag], a [closing tag], +an [HTML comment], a [processing instruction], a [declaration], +or a [CDATA section].

+

Here are some simple open tags:

+
<a><bab><c2c>
+.
+<p><a><bab><c2c></p>
+
+

Empty elements:

+
<a/><b2/>
+.
+<p><a/><b2/></p>
+
+

Whitespace is allowed:

+
<a  /><b2
+data="foo" >
+.
+<p><a  /><b2
+data="foo" ></p>
+
+

With attributes:

+
<a foo="bar" bam = 'baz <em>"</em>'
+_boolean zoop:33=zoop:33 />
+.
+<p><a foo="bar" bam = 'baz <em>"</em>'
+_boolean zoop:33=zoop:33 /></p>
+
+

Custom tag names can be used:

+
Foo <responsive-image src="foo.jpg" />
+.
+<p>Foo <responsive-image src="foo.jpg" /></p>
+
+

Illegal tag names, not parsed as HTML:

+
<33> <__>
+.
+<p>&lt;33&gt; &lt;__&gt;</p>
+
+

Illegal attribute names:

+
<a h*#ref="hi">
+.
+<p>&lt;a h*#ref=&quot;hi&quot;&gt;</p>
+
+

Illegal attribute values:

+
<a href="hi'> <a href=hi'>
+.
+<p>&lt;a href=&quot;hi'&gt; &lt;a href=hi'&gt;</p>
+
+

Illegal whitespace:

+
< a><
+foo><bar/ >
+<foo bar=baz
+bim!bop />
+.
+<p>&lt; a&gt;&lt;
+foo&gt;&lt;bar/ &gt;
+&lt;foo bar=baz
+bim!bop /&gt;</p>
+
+

Missing whitespace:

+
<a href='bar'title=title>
+.
+<p>&lt;a href='bar'title=title&gt;</p>
+
+

Closing tags:

+
</a></foo >
+.
+<p></a></foo ></p>
+
+

Illegal attributes in closing tag:

+
</a href="foo">
+.
+<p>&lt;/a href=&quot;foo&quot;&gt;</p>
+
+

Comments:

+
foo <!-- this is a --
+comment - with hyphens -->
+.
+<p>foo <!-- this is a --
+comment - with hyphens --></p>
+
+
foo <!--> foo -->
+
+foo <!---> foo -->
+.
+<p>foo <!--> foo --&gt;</p>
+<p>foo <!---> foo --&gt;</p>
+
+

Processing instructions:

+
foo <?php echo $a; ?>
+.
+<p>foo <?php echo $a; ?></p>
+
+

Declarations:

+
foo <!ELEMENT br EMPTY>
+.
+<p>foo <!ELEMENT br EMPTY></p>
+
+

CDATA sections:

+
foo <![CDATA[>&<]]>
+.
+<p>foo <![CDATA[>&<]]></p>
+
+

Entity and numeric character references are preserved in HTML +attributes:

+
foo <a href="&ouml;">
+.
+<p>foo <a href="&ouml;"></p>
+
+

Backslash escapes do not work in HTML attributes:

+
foo <a href="\*">
+.
+<p>foo <a href="\*"></p>
+
+
<a href="\"">
+.
+<p>&lt;a href=&quot;&quot;&quot;&gt;</p>
+
+

Hard line breaks

+

A line ending (not in a code span or HTML tag) that is preceded +by two or more spaces and does not occur at the end of a block +is parsed as a hard line break (rendered +in HTML as a <br /> tag):

+
foo  
+baz
+.
+<p>foo<br />
+baz</p>
+
+

For a more visible alternative, a backslash before the +[line ending] may be used instead of two or more spaces:

+
foo\
+baz
+.
+<p>foo<br />
+baz</p>
+
+

More than two spaces can be used:

+
foo       
+baz
+.
+<p>foo<br />
+baz</p>
+
+

Leading spaces at the beginning of the next line are ignored:

+
foo  
+     bar
+.
+<p>foo<br />
+bar</p>
+
+
foo\
+     bar
+.
+<p>foo<br />
+bar</p>
+
+

Hard line breaks can occur inside emphasis, links, and other constructs +that allow inline content:

+
*foo  
+bar*
+.
+<p><em>foo<br />
+bar</em></p>
+
+
*foo\
+bar*
+.
+<p><em>foo<br />
+bar</em></p>
+
+

Hard line breaks do not occur inside code spans

+
`code  
+span`
+.
+<p><code>code   span</code></p>
+
+
`code\
+span`
+.
+<p><code>code\ span</code></p>
+
+

or HTML tags:

+
<a href="foo  
+bar">
+.
+<p><a href="foo  
+bar"></p>
+
+
<a href="foo\
+bar">
+.
+<p><a href="foo\
+bar"></p>
+
+

Hard line breaks are for separating inline content within a block. +Neither syntax for hard line breaks works at the end of a paragraph or +other block element:

+
foo\
+.
+<p>foo\</p>
+
+
foo  
+.
+<p>foo</p>
+
+
### foo\
+.
+<h3>foo\</h3>
+
+
### foo  
+.
+<h3>foo</h3>
+
+

Soft line breaks

+

A regular line ending (not in a code span or HTML tag) that is not +preceded by two or more spaces or a backslash is parsed as a +softbreak. (A soft line break may be rendered in HTML either as a +[line ending] or as a space. The result will be the same in +browsers. In the examples here, a [line ending] will be used.)

+
foo
+baz
+.
+<p>foo
+baz</p>
+
+

Spaces at the end of the line and beginning of the next line are +removed:

+
foo 
+ baz
+.
+<p>foo
+baz</p>
+
+

A conforming parser may render a soft line break in HTML either as a +line ending or as a space.

+

A renderer may also provide an option to render soft line breaks +as hard line breaks.

+

Textual content

+

Any characters not given an interpretation by the above rules will +be parsed as plain textual content.

+
hello $.;'there
+.
+<p>hello $.;'there</p>
+
+
Foo χρῆν
+.
+<p>Foo χρῆν</p>
+
+

Internal spaces are preserved verbatim:

+
Multiple     spaces
+.
+<p>Multiple     spaces</p>
+
+ +

Appendix: A parsing strategy

+

In this appendix we describe some features of the parsing strategy +used in the CommonMark reference implementations.

+

Overview

+

Parsing has two phases:

+
    +
  1. +

    In the first phase, lines of input are consumed and the block +structure of the document---its division into paragraphs, block quotes, +list items, and so on---is constructed. Text is assigned to these +blocks but not parsed. Link reference definitions are parsed and a +map of links is constructed.

    +
  2. +
  3. +

    In the second phase, the raw text contents of paragraphs and headings +are parsed into sequences of Markdown inline elements (strings, +code spans, links, emphasis, and so on), using the map of link +references constructed in phase 1.

    +
  4. +
+

At each point in processing, the document is represented as a tree of +blocks. The root of the tree is a document block. The document +may have any number of other blocks as children. These children +may, in turn, have other blocks as children. The last child of a block +is normally considered open, meaning that subsequent lines of input +can alter its contents. (Blocks that are not open are closed.) +Here, for example, is a possible document tree, with the open blocks +marked by arrows:

+
-> document
+  -> block_quote
+       paragraph
+         "Lorem ipsum dolor\nsit amet."
+    -> list (type=bullet tight=true bullet_char=-)
+         list_item
+           paragraph
+             "Qui *quodsi iracundia*"
+      -> list_item
+        -> paragraph
+             "aliquando id"
+
+

Phase 1: block structure

+

Each line that is processed has an effect on this tree. The line is +analyzed and, depending on its contents, the document may be altered +in one or more of the following ways:

+
    +
  1. One or more open blocks may be closed.
  2. +
  3. One or more new blocks may be created as children of the +last open block.
  4. +
  5. Text may be added to the last (deepest) open block remaining +on the tree.
  6. +
+

Once a line has been incorporated into the tree in this way, +it can be discarded, so input can be read in a stream.

+

For each line, we follow this procedure:

+
    +
  1. +

    First we iterate through the open blocks, starting with the +root document, and descending through last children down to the last +open block. Each block imposes a condition that the line must satisfy +if the block is to remain open. For example, a block quote requires a +> character. A paragraph requires a non-blank line. +In this phase we may match all or just some of the open +blocks. But we cannot close unmatched blocks yet, because we may have a +[lazy continuation line].

    +
  2. +
  3. +

    Next, after consuming the continuation markers for existing +blocks, we look for new block starts (e.g. > for a block quote). +If we encounter a new block start, we close any blocks unmatched +in step 1 before creating the new block as a child of the last +matched container block.

    +
  4. +
  5. +

    Finally, we look at the remainder of the line (after block +markers like >, list markers, and indentation have been consumed). +This is text that can be incorporated into the last open +block (a paragraph, code block, heading, or raw HTML).

    +
  6. +
+

Setext headings are formed when we see a line of a paragraph +that is a [setext heading underline].

+

Reference link definitions are detected when a paragraph is closed; +the accumulated text lines are parsed to see if they begin with +one or more reference link definitions. Any remainder becomes a +normal paragraph.

+

We can see how this works by considering how the tree above is +generated by four lines of Markdown:

+
> Lorem ipsum dolor
+sit amet.
+> - Qui *quodsi iracundia*
+> - aliquando id
+
+

At the outset, our document model is just

+
-> document
+
+

The first line of our text,

+
> Lorem ipsum dolor
+
+

causes a block_quote block to be created as a child of our +open document block, and a paragraph block as a child of +the block_quote. Then the text is added to the last open +block, the paragraph:

+
-> document
+  -> block_quote
+    -> paragraph
+         "Lorem ipsum dolor"
+
+

The next line,

+
sit amet.
+
+

is a "lazy continuation" of the open paragraph, so it gets added +to the paragraph's text:

+
-> document
+  -> block_quote
+    -> paragraph
+         "Lorem ipsum dolor\nsit amet."
+
+

The third line,

+
> - Qui *quodsi iracundia*
+
+

causes the paragraph block to be closed, and a new list block +opened as a child of the block_quote. A list_item is also +added as a child of the list, and a paragraph as a child of +the list_item. The text is then added to the new paragraph:

+
-> document
+  -> block_quote
+       paragraph
+         "Lorem ipsum dolor\nsit amet."
+    -> list (type=bullet tight=true bullet_char=-)
+      -> list_item
+        -> paragraph
+             "Qui *quodsi iracundia*"
+
+

The fourth line,

+
> - aliquando id
+
+

causes the list_item (and its child the paragraph) to be closed, +and a new list_item opened up as child of the list. A paragraph +is added as a child of the new list_item, to contain the text. +We thus obtain the final tree:

+
-> document
+  -> block_quote
+       paragraph
+         "Lorem ipsum dolor\nsit amet."
+    -> list (type=bullet tight=true bullet_char=-)
+         list_item
+           paragraph
+             "Qui *quodsi iracundia*"
+      -> list_item
+        -> paragraph
+             "aliquando id"
+
+

Phase 2: inline structure

+

Once all of the input has been parsed, all open blocks are closed.

+

We then "walk the tree," visiting every node, and parse raw +string contents of paragraphs and headings as inlines. At this +point we have seen all the link reference definitions, so we can +resolve reference links as we go.

+
document
+  block_quote
+    paragraph
+      str "Lorem ipsum dolor"
+      softbreak
+      str "sit amet."
+    list (type=bullet tight=true bullet_char=-)
+      list_item
+        paragraph
+          str "Qui "
+          emph
+            str "quodsi iracundia"
+      list_item
+        paragraph
+          str "aliquando id"
+
+

Notice how the [line ending] in the first paragraph has +been parsed as a softbreak, and the asterisks in the first list item +have become an emph.

+

An algorithm for parsing nested emphasis and links

+

By far the trickiest part of inline parsing is handling emphasis, +strong emphasis, links, and images. This is done using the following +algorithm.

+

When we're parsing inlines and we hit either

+
    +
  • a run of * or _ characters, or
  • +
  • a [ or ![
  • +
+

we insert a text node with these symbols as its literal content, and we +add a pointer to this text node to the delimiter stack.

+

The [delimiter stack] is a doubly linked list. Each +element contains a pointer to a text node, plus information about

+
    +
  • the type of delimiter ([, ![, *, _)
  • +
  • the number of delimiters,
  • +
  • whether the delimiter is "active" (all are active to start), and
  • +
  • whether the delimiter is a potential opener, a potential closer, +or both (which depends on what sort of characters precede +and follow the delimiters).
  • +
+

When we hit a ] character, we call the look for link or image +procedure (see below).

+

When we hit the end of the input, we call the process emphasis +procedure (see below), with stack_bottom = NULL.

+

look for link or image

+

Starting at the top of the delimiter stack, we look backwards +through the stack for an opening [ or ![ delimiter.

+
    +
  • +

    If we don't find one, we return a literal text node ].

    +
  • +
  • +

    If we do find one, but it's not active, we remove the inactive +delimiter from the stack, and return a literal text node ].

    +
  • +
  • +

    If we find one and it's active, then we parse ahead to see if +we have an inline link/image, reference link/image, collapsed reference +link/image, or shortcut reference link/image.

    +
      +
    • +

      If we don't, then we remove the opening delimiter from the +delimiter stack and return a literal text node ].

      +
    • +
    • +

      If we do, then

      +
        +
      • +

        We return a link or image node whose children are the inlines +after the text node pointed to by the opening delimiter.

        +
      • +
      • +

        We run process emphasis on these inlines, with the [ opener +as stack_bottom.

        +
      • +
      • +

        We remove the opening delimiter.

        +
      • +
      • +

        If we have a link (and not an image), we also set all +[ delimiters before the opening delimiter to inactive. (This +will prevent us from getting links within links.)

        +
      • +
      +
    • +
    +
  • +
+

process emphasis

+

Parameter stack_bottom sets a lower bound to how far we +descend in the [delimiter stack]. If it is NULL, we can +go all the way to the bottom. Otherwise, we stop before +visiting stack_bottom.

+

Let current_position point to the element on the [delimiter stack] +just above stack_bottom (or the first element if stack_bottom +is NULL).

+

We keep track of the openers_bottom for each delimiter +type (*, _), indexed to the length of the closing delimiter run +(modulo 3) and to whether the closing delimiter can also be an +opener. Initialize this to stack_bottom.

+

Then we repeat the following until we run out of potential +closers:

+
    +
  • +

    Move current_position forward in the delimiter stack (if needed) +until we find the first potential closer with delimiter * or _. +(This will be the potential closer closest +to the beginning of the input -- the first one in parse order.)

    +
  • +
  • +

    Now, look back in the stack (staying above stack_bottom and +the openers_bottom for this delimiter type) for the +first matching potential opener ("matching" means same delimiter).

    +
  • +
  • +

    If one is found:

    +
      +
    • +

      Figure out whether we have emphasis or strong emphasis: +if both closer and opener spans have length >= 2, we have +strong, otherwise regular.

      +
    • +
    • +

      Insert an emph or strong emph node accordingly, after +the text node corresponding to the opener.

      +
    • +
    • +

      Remove any delimiters between the opener and closer from +the delimiter stack.

      +
    • +
    • +

      Remove 1 (for regular emph) or 2 (for strong emph) delimiters +from the opening and closing text nodes. If they become empty +as a result, remove them and remove the corresponding element +of the delimiter stack. If the closing node is removed, reset +current_position to the next element in the stack.

      +
    • +
    +
  • +
  • +

    If none is found:

    +
      +
    • +

      Set openers_bottom to the element before current_position. +(We know that there are no openers for this kind of closer up to and +including this point, so this puts a lower bound on future searches.)

      +
    • +
    • +

      If the closer at current_position is not a potential opener, +remove it from the delimiter stack (since we know it can't +be a closer either).

      +
    • +
    • +

      Advance current_position to the next element in the stack.

      +
    • +
    +
  • +
+

After we're done, we remove all delimiters above stack_bottom from the +delimiter stack.

diff --git a/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/test/gh/tests/test_fuzzer.py b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/test/gh/tests/test_fuzzer.py new file mode 100644 index 0000000000000000000000000000000000000000..7286f8ea90969cafe9604f388e3c48e855432f2c --- /dev/null +++ b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/test/gh/tests/test_fuzzer.py @@ -0,0 +1,25 @@ +""" +These tests are in response to reports from: +https://github.com/google/oss-fuzz/tree/master/projects/markdown-it-py + +In the future, perhaps atheris could be directly used here, +but it was not directly apparent how to integrate it into pytest. +""" + +import pytest + +from markdown_it import MarkdownIt + +TESTS = { + 55363: (">```\n>", "
\n
\n
\n"), + 55367: (">-\n>\n>", "
\n
    \n
  • \n
\n
\n"), + 55371: ("[](soH0;!", "

[](so&#4H0;!

\n"), + # 55401: (("?c_" * 100000) + "c_", ""), TODO this does not fail, just takes a long time +} + + +@pytest.mark.parametrize("raw_input,expected", TESTS.values(), ids=TESTS.keys()) +def test_fuzzing(raw_input, expected): + md = MarkdownIt() + md.parse(raw_input) + assert md.render(raw_input) == expected diff --git a/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/test/gh/tests/test_linkify.py b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/test/gh/tests/test_linkify.py new file mode 100644 index 0000000000000000000000000000000000000000..48b1981c7ee051b2f9d53957b96627a52bd35410 --- /dev/null +++ b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/test/gh/tests/test_linkify.py @@ -0,0 +1,20 @@ +from markdown_it import MarkdownIt + + +def test_token_levels(): + mdit = MarkdownIt(options_update={"linkify": True}).enable("linkify") + tokens = mdit.parse("www.python.org") + inline = tokens[1] + assert inline.type == "inline" + assert inline.children + link_open = inline.children[0] + assert link_open.type == "link_open" + link_text = inline.children[1] + assert link_text.type == "text" + link_close = inline.children[2] + assert link_close.type == "link_close" + + # Assert that linkify tokens have correct nesting levels + assert link_open.level == 0 + assert link_text.level == 1 + assert link_close.level == 0 diff --git a/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/test/gh/tests/test_port/fixtures/commonmark_extras.md b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/test/gh/tests/test_port/fixtures/commonmark_extras.md new file mode 100644 index 0000000000000000000000000000000000000000..f0b31dbde9ef46b9ec47eb75de2f018bc63d726c --- /dev/null +++ b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/test/gh/tests/test_port/fixtures/commonmark_extras.md @@ -0,0 +1,751 @@ +Issue commonmark/cmark#383: +. +*****Hello*world**** +. +

**Helloworld

+. + +Issue #246. Double escaping in ALT +. +![&](#) +. +

&

+. + +Strip markdown in ALT tags +. +![*strip* [markdown __in__ alt](#)](#) +. +

strip markdown in alt

+. + +Issue #55: +. +![test] + +![test](foo bar) +. +

![test]

+

![test](foo bar)

+. + + +Reference labels: 'i̇θωkå'.toUpperCase() is 'İΘΩKÅ', but these should still be equivalent +. +[İϴΩKÅ] + +[i̇θωkå]: /url +. +

İϴΩKÅ

+. + + +Reference labels: support ligatures (equivalent according to unicode case folding) +. +[fffifl] + +[fffifl]: /url +. +

fffifl

+. + +Reference can be interrupted by other rules +. +[foo]: /url 'title + - - - +' + +[foo] +. +

[foo]: /url 'title

+
+

'

+

[foo]

+. + +Escape character in link reference title doesn't escape newlines +. +[foo]: /url " +hello +\ +\ +\ +world +" + +[foo] +. +

foo

+. + +Issue #35. `<` should work as punctuation +. +an **(:**
+. +

an (:

+. + + +Should unescape only needed things in link destinations/titles: +. +[test](<\f\o\o\>\\>) + +[test](foo "\\\"\b\a\r") +. +

test

+

test

+. + + +Not a closing tag +. + +. +

</ 123>

+. + + + +Escaping entities in links: +. +[](<"> "&ö") + +[](<\"> "\&\ö") + +[](<\\"> "\\"\\ö") +. +

+

+

+. + + +Checking combination of replaceEntities and unescapeMd: +. +~~~ &&bad;\&\\& +just a funny little fence +~~~ +. +
just a funny little fence
+
+. + +Underscore between punctuation chars should be able to close emphasis. + +. +_(hai)_. +. +

(hai).

+. + +Regression test, should not match emphasis markers in different link tags: +. +[*b]() [c*]() +. +

*b c*

+. + +Those are two separate blockquotes: +. + - > foo + > bar +. +
    +
  • +
    +

    foo

    +
    +
  • +
+
+

bar

+
+. + +Blockquote should terminate itself after paragraph continuation +. +- list + > blockquote +blockquote continuation + - next list item +. +
    +
  • list +
    +

    blockquote +blockquote continuation

    +
    +
      +
    • next list item
    • +
    +
  • +
+. + +Regression test (code block + regular paragraph) +. +> foo +> bar +. +
+
foo
+
+

bar

+
+. + +Regression test (tabs in lists, #830) +. +1. asd + 2. asd + +--- + +1. asd + 2. asd +. +
    +
  1. asd +2. asd
  2. +
+
+
    +
  1. asd +2. asd
  2. +
+. + +Blockquotes inside indented lists should terminate correctly +. + - a + > b + ``` + c + ``` + - d +. +
    +
  • a +
    +

    b

    +
    +
    c
    +
    +
  • +
  • d
  • +
+. + +Don't output empty class here: +. +``` +test +``` +. +
test
+
+. + +Setext header text supports lazy continuations: +. + - foo +bar + === +. +
    +
  • +

    foo +bar

    +
  • +
+. + +But setext header underline doesn't: +. + - foo + bar + === +. +
    +
  • foo +bar +===
  • +
+. + +Tabs should be stripped from the beginning of the line +. + foo + bar + baz +. +

foo +bar +baz

+. + +Tabs should not cause hardbreak, EOL tabs aren't stripped in commonmark 0.27 +. +foo1 +foo2 +bar +. +

foo1 +foo2
+bar

+. + +List item terminating quote should not be paragraph continuation +. +1. foo + > quote +2. bar +. +
    +
  1. foo +
    +

    quote

    +
    +
  2. +
  3. bar
  4. +
+. + +Escaped space is not allowed in link destination, commonmark/CommonMark#493. +. +[link](a\ b) +. +

[link](a\ b)

+. + +Link destination cannot contain '<' +. +[]() + +[]() +. +

[](<foo)

+

+. + +Link title cannot contain '(' when opened with it +. +[](url (xxx()) + +[](url (xxx\()) +. +

[](url (xxx())

+

+. + +Allow EOL in processing instructions, commonmark/commonmark.js#196. +. +a +. +

a

+. + +Allow meta tag in an inline context, commonmark/commonmark-spec#527. +. +City: + + + +. +

City: + + +

+. + +Coverage. Directive can terminate paragraph. +. +a +a

+* +. +

foo@bar.com

+. + + +Coverage. Unpaired nested backtick (silent mode) +. +*`foo* +. +

`foo

+. + + +Coverage. Should continue scanning after closing "```" despite cache +. +```aaa``bbb``ccc```ddd``eee`` +. +

aaa``bbb``cccdddeee

+. + + +Coverage. Entities. +. +*&* + +* * + +*&* +. +

&

+

+

&

+. + + +Coverage. Escape. +. +*\a* +. +

\a

+. + + +Coverage. parseLinkDestination +. +[foo](< +bar>) + +[foo]([foo](< +bar>)

+

[foo](<bar)

+. + + +Coverage. parseLinkTitle +. +[foo](bar "ba) + +[foo](bar "ba\ +z") +. +

[foo](bar "ba)

+

foo

+. + + +Coverage. Image +. +![test]( x ) +. +

test

+. +. +![test][foo] + +[bar]: 123 +. +

![test][foo]

+. +. +![test][[[ + +[bar]: 123 +. +

![test][[[

+. +. +![test]( +. +

![test](

+. + + +Coverage. Link +. +[test]( +. +

[test](

+. + + +Coverage. Reference +. +[ +test\ +]: 123 +foo +bar +. +

foo +bar

+. +. +[ +test +] +. +

[ +test +]

+. +. +> [foo]: bar +[foo] +. +
+

foo

+. + +Coverage. Tabs in blockquotes. +. +> test + + > test + + > test + +> --- +> test + + > --- + > test + + > --- + > test + +> test + + > test + + > test + +> --- +> test + + > --- + > test + + > --- + > test +. +
+
  test
+
+
+
+
 test
+
+
+
+
test
+
+
+
+
+
  test
+
+
+
+
+
 test
+
+
+
+
+
test
+
+
+
+
  	test
+
+
+
+
 	test
+
+
+
+
	test
+
+
+
+
+
  	test
+
+
+
+
+
 	test
+
+
+
+
+
	test
+
+
+. + +Coverage. Tabs in lists. +. +1. foo + + bar +. +
    +
  1. +

    foo

    +
     bar
    +
    +
  2. +
+. + +Coverage. Various tags not interrupting blockquotes because of indentation: +. +> foo + - - - - + +> foo + # not a heading +. +
+

foo +- - - -

+
+
+

foo +# not a heading

+
+. + +Coverage, entities with code > 10FFFF. Made this way for compatibility with commonmark.js. +. +� + +� +. +

+

&#x1100000;

+. + +Issue #696. Blockquotes should remember their level. +. +>>> foo +bar +>>> baz +. +
+
+
+

foo +bar +baz

+
+
+
+. + +Issue #696. Blockquotes should stop when outdented from a list. +. +1. >>> foo + bar +baz + >>> foo + >>> bar + >>> baz +. +
    +
  1. +
    +
    +
    +

    foo +bar +baz +foo

    +
    +
    +
    +
  2. +
+
+
+
+

bar +baz

+
+
+
+. + +Newline in image description +. +There is a newline in this image ![here +it is](https://github.com/executablebooks/) +. +

There is a newline in this image here
+it is

+. + +Issue #772. Header rule should not interfere with html tags. +. + + +
+==
+
+. + +
+==
+
+. + +Issue #205. Space in link destination generates IndexError +. +[Contact](http:// mail.com) + +[Contact](mailto: mail@mail.com) +. +

[Contact](http:// mail.com)

+

[Contact](mailto: mail@mail.com)

+. + +Issue #204. Combination of blockquotes, list and newlines causes an IndexError +. +> QUOTE ++ UNORDERED LIST ITEM + > INDENTED QUOTE + + + +. +
+

QUOTE

+
+
    +
  • UNORDERED LIST ITEM +
    +

    INDENTED QUOTE

    +
    +
  • +
+. diff --git a/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/test/gh/tests/test_port/fixtures/commonmark_spec.md b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/test/gh/tests/test_port/fixtures/commonmark_spec.md new file mode 100644 index 0000000000000000000000000000000000000000..6e5fb4b4d7c7432d3baf9bdb4ca5e2fb32771ff6 --- /dev/null +++ b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/test/gh/tests/test_port/fixtures/commonmark_spec.md @@ -0,0 +1,7840 @@ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 354 + +. + foo baz bim +. +
foo	baz		bim
+
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 361 + +. + foo baz bim +. +
foo	baz		bim
+
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 368 + +. + a a + ὐ a +. +
a	a
+ὐ	a
+
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 381 + +. + - foo + + bar +. +
    +
  • +

    foo

    +

    bar

    +
  • +
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 394 + +. +- foo + + bar +. +
    +
  • +

    foo

    +
      bar
    +
    +
  • +
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 417 + +. +> foo +. +
+
  foo
+
+
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 426 + +. +- foo +. +
    +
  • +
      foo
    +
    +
  • +
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 438 + +. + foo + bar +. +
foo
+bar
+
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 447 + +. + - foo + - bar + - baz +. +
    +
  • foo +
      +
    • bar +
        +
      • baz
      • +
      +
    • +
    +
  • +
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 465 + +. +# Foo +. +

Foo

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 471 + +. +* * * +. +
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 488 + +. +\!\"\#\$\%\&\'\(\)\*\+\,\-\.\/\:\;\<\=\>\?\@\[\\\]\^\_\`\{\|\}\~ +. +

!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 498 + +. +\ \A\a\ \3\φ\« +. +

\ \A\a\ \3\φ\«

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 508 + +. +\*not emphasized* +\
not a tag +\[not a link](/foo) +\`not code` +1\. not a list +\* not a list +\# not a heading +\[foo]: /url "not a reference" +\ö not a character entity +. +

*not emphasized* +<br/> not a tag +[not a link](/foo) +`not code` +1. not a list +* not a list +# not a heading +[foo]: /url "not a reference" +&ouml; not a character entity

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 533 + +. +\\*emphasis* +. +

\emphasis

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 542 + +. +foo\ +bar +. +

foo
+bar

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 554 + +. +`` \[\` `` +. +

\[\`

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 561 + +. + \[\] +. +
\[\]
+
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 569 + +. +~~~ +\[\] +~~~ +. +
\[\]
+
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 579 + +. + +. +

https://example.com?find=\*

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 586 + +. + +. + +. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 596 + +. +[foo](/bar\* "ti\*tle") +. +

foo

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 603 + +. +[foo] + +[foo]: /bar\* "ti\*tle" +. +

foo

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 612 + +. +``` foo\+bar +foo +``` +. +
foo
+
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 648 + +. +  & © Æ Ď +¾ ℋ ⅆ +∲ ≧̸ +. +

  & © Æ Ď +¾ ℋ ⅆ +∲ ≧̸

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 667 + +. +# Ӓ Ϡ � +. +

# Ӓ Ϡ �

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 680 + +. +" ആ ಫ +. +

" ആ ಫ

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 689 + +. +  &x; &#; &#x; +� +&#abcdef0; +&ThisIsNotDefined; &hi?; +. +

&nbsp &x; &#; &#x; +&#87654321; +&#abcdef0; +&ThisIsNotDefined; &hi?;

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 706 + +. +© +. +

&copy

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 716 + +. +&MadeUpEntity; +. +

&MadeUpEntity;

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 727 + +. + +. + +. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 734 + +. +[foo](/föö "föö") +. +

foo

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 741 + +. +[foo] + +[foo]: /föö "föö" +. +

foo

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 750 + +. +``` föö +foo +``` +. +
foo
+
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 763 + +. +`föö` +. +

f&ouml;&ouml;

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 770 + +. + föfö +. +
f&ouml;f&ouml;
+
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 782 + +. +*foo* +*foo* +. +

*foo* +foo

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 790 + +. +* foo + +* foo +. +

* foo

+
    +
  • foo
  • +
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 801 + +. +foo bar +. +

foo + +bar

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 809 + +. + foo +. +

foo

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 816 + +. +[a](url "tit") +. +

[a](url "tit")

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 839 + +. +- `one +- two` +. +
    +
  • `one
  • +
  • two`
  • +
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 878 + +. +*** +--- +___ +. +
+
+
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 891 + +. ++++ +. +

+++

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 898 + +. +=== +. +

===

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 907 + +. +-- +** +__ +. +

-- +** +__

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 920 + +. + *** + *** + *** +. +
+
+
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 933 + +. + *** +. +
***
+
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 941 + +. +Foo + *** +. +

Foo +***

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 952 + +. +_____________________________________ +. +
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 961 + +. + - - - +. +
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 968 + +. + ** * ** * ** * ** +. +
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 975 + +. +- - - - +. +
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 984 + +. +- - - - +. +
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 993 + +. +_ _ _ _ a + +a------ + +---a--- +. +

_ _ _ _ a

+

a------

+

---a---

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 1009 + +. + *-* +. +

-

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 1018 + +. +- foo +*** +- bar +. +
    +
  • foo
  • +
+
+
    +
  • bar
  • +
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 1035 + +. +Foo +*** +bar +. +

Foo

+
+

bar

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 1052 + +. +Foo +--- +bar +. +

Foo

+

bar

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 1065 + +. +* Foo +* * * +* Bar +. +
    +
  • Foo
  • +
+
+
    +
  • Bar
  • +
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 1082 + +. +- Foo +- * * * +. +
    +
  • Foo
  • +
  • +
    +
  • +
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 1111 + +. +# foo +## foo +### foo +#### foo +##### foo +###### foo +. +

foo

+

foo

+

foo

+

foo

+
foo
+
foo
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 1130 + +. +####### foo +. +

####### foo

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 1145 + +. +#5 bolt + +#hashtag +. +

#5 bolt

+

#hashtag

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 1157 + +. +\## foo +. +

## foo

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 1166 + +. +# foo *bar* \*baz\* +. +

foo bar *baz*

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 1175 + +. +# foo +. +

foo

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 1184 + +. + ### foo + ## foo + # foo +. +

foo

+

foo

+

foo

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 1197 + +. + # foo +. +
# foo
+
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 1205 + +. +foo + # bar +. +

foo +# bar

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 1216 + +. +## foo ## + ### bar ### +. +

foo

+

bar

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 1227 + +. +# foo ################################## +##### foo ## +. +

foo

+
foo
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 1238 + +. +### foo ### +. +

foo

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 1249 + +. +### foo ### b +. +

foo ### b

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 1258 + +. +# foo# +. +

foo#

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 1268 + +. +### foo \### +## foo #\## +# foo \# +. +

foo ###

+

foo ###

+

foo #

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 1282 + +. +**** +## foo +**** +. +
+

foo

+
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 1293 + +. +Foo bar +# baz +Bar foo +. +

Foo bar

+

baz

+

Bar foo

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 1306 + +. +## +# +### ### +. +

+

+

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 1346 + +. +Foo *bar* +========= + +Foo *bar* +--------- +. +

Foo bar

+

Foo bar

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 1360 + +. +Foo *bar +baz* +==== +. +

Foo bar +baz

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 1374 + +. + Foo *bar +baz* +==== +. +

Foo bar +baz

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 1386 + +. +Foo +------------------------- + +Foo += +. +

Foo

+

Foo

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 1401 + +. + Foo +--- + + Foo +----- + + Foo + === +. +

Foo

+

Foo

+

Foo

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 1419 + +. + Foo + --- + + Foo +--- +. +
Foo
+---
+
+Foo
+
+
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 1438 + +. +Foo + ---- +. +

Foo

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 1448 + +. +Foo + --- +. +

Foo +---

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 1459 + +. +Foo += = + +Foo +--- - +. +

Foo += =

+

Foo

+
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 1475 + +. +Foo +----- +. +

Foo

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 1485 + +. +Foo\ +---- +. +

Foo\

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 1496 + +. +`Foo +---- +` + + +. +

`Foo

+

`

+

<a title="a lot

+

of dashes"/>

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 1515 + +. +> Foo +--- +. +
+

Foo

+
+
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 1526 + +. +> foo +bar +=== +. +
+

foo +bar +===

+
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 1539 + +. +- Foo +--- +. +
    +
  • Foo
  • +
+
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 1554 + +. +Foo +Bar +--- +. +

Foo +Bar

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 1567 + +. +--- +Foo +--- +Bar +--- +Baz +. +
+

Foo

+

Bar

+

Baz

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 1584 + +. + +==== +. +

====

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 1596 + +. +--- +--- +. +
+
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 1605 + +. +- foo +----- +. +
    +
  • foo
  • +
+
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 1616 + +. + foo +--- +. +
foo
+
+
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 1626 + +. +> foo +----- +. +
+

foo

+
+
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 1640 + +. +\> foo +------ +. +

> foo

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 1671 + +. +Foo + +bar +--- +baz +. +

Foo

+

bar

+

baz

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 1687 + +. +Foo +bar + +--- + +baz +. +

Foo +bar

+
+

baz

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 1705 + +. +Foo +bar +* * * +baz +. +

Foo +bar

+
+

baz

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 1720 + +. +Foo +bar +\--- +baz +. +

Foo +bar +--- +baz

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 1748 + +. + a simple + indented code block +. +
a simple
+  indented code block
+
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 1762 + +. + - foo + + bar +. +
    +
  • +

    foo

    +

    bar

    +
  • +
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 1776 + +. +1. foo + + - bar +. +
    +
  1. +

    foo

    +
      +
    • bar
    • +
    +
  2. +
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 1796 + +. +
+ *hi* + + - one +. +
<a/>
+*hi*
+
+- one
+
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 1812 + +. + chunk1 + + chunk2 + + + + chunk3 +. +
chunk1
+
+chunk2
+
+
+
+chunk3
+
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 1835 + +. + chunk1 + + chunk2 +. +
chunk1
+  
+  chunk2
+
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 1850 + +. +Foo + bar + +. +

Foo +bar

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 1864 + +. + foo +bar +. +
foo
+
+

bar

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 1877 + +. +# Heading + foo +Heading +------ + foo +---- +. +

Heading

+
foo
+
+

Heading

+
foo
+
+
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 1897 + +. + foo + bar +. +
    foo
+bar
+
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 1910 + +. + + + foo + + +. +
foo
+
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 1924 + +. + foo +. +
foo  
+
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 1979 + +. +``` +< + > +``` +. +
<
+ >
+
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 1993 + +. +~~~ +< + > +~~~ +. +
<
+ >
+
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 2006 + +. +`` +foo +`` +. +

foo

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 2017 + +. +``` +aaa +~~~ +``` +. +
aaa
+~~~
+
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 2029 + +. +~~~ +aaa +``` +~~~ +. +
aaa
+```
+
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 2043 + +. +```` +aaa +``` +`````` +. +
aaa
+```
+
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 2055 + +. +~~~~ +aaa +~~~ +~~~~ +. +
aaa
+~~~
+
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 2070 + +. +``` +. +
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 2077 + +. +````` + +``` +aaa +. +

+```
+aaa
+
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 2090 + +. +> ``` +> aaa + +bbb +. +
+
aaa
+
+
+

bbb

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 2106 + +. +``` + + +``` +. +

+  
+
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 2120 + +. +``` +``` +. +
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 2132 + +. + ``` + aaa +aaa +``` +. +
aaa
+aaa
+
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 2144 + +. + ``` +aaa + aaa +aaa + ``` +. +
aaa
+aaa
+aaa
+
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 2158 + +. + ``` + aaa + aaa + aaa + ``` +. +
aaa
+ aaa
+aaa
+
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 2174 + +. + ``` + aaa + ``` +. +
```
+aaa
+```
+
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 2189 + +. +``` +aaa + ``` +. +
aaa
+
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 2199 + +. + ``` +aaa + ``` +. +
aaa
+
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 2211 + +. +``` +aaa + ``` +. +
aaa
+    ```
+
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 2225 + +. +``` ``` +aaa +. +

+aaa

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 2234 + +. +~~~~~~ +aaa +~~~ ~~ +. +
aaa
+~~~ ~~
+
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 2248 + +. +foo +``` +bar +``` +baz +. +

foo

+
bar
+
+

baz

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 2265 + +. +foo +--- +~~~ +bar +~~~ +# baz +. +

foo

+
bar
+
+

baz

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 2287 + +. +```ruby +def foo(x) + return 3 +end +``` +. +
def foo(x)
+  return 3
+end
+
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 2301 + +. +~~~~ ruby startline=3 $%@#$ +def foo(x) + return 3 +end +~~~~~~~ +. +
def foo(x)
+  return 3
+end
+
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 2315 + +. +````; +```` +. +
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 2325 + +. +``` aa ``` +foo +. +

aa +foo

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 2336 + +. +~~~ aa ``` ~~~ +foo +~~~ +. +
foo
+
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 2348 + +. +``` +``` aaa +``` +. +
``` aaa
+
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 2427 + +. +
+
+**Hello**,
+
+_world_.
+
+
+. +
+
+**Hello**,
+

world. +

+
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 2456 + +. + + + + +
+ hi +
+ +okay. +. + + + + +
+ hi +
+

okay.

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 2478 + +. +
+*foo* +. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 2502 + +. +
+ +*Markdown* + +
+. +
+

Markdown

+
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 2518 + +. +
+
+. +
+
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 2529 + +. +
+
+. +
+
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 2541 + +. +
+*foo* + +*bar* +. +
+*foo* +

bar

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 2557 + +. +
+. + +. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 2597 + +. +
+foo +
+. +
+foo +
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 2614 + +. +
+``` c +int x = 33; +``` +. +
+``` c +int x = 33; +``` +. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 2631 + +. + +*bar* + +. + +*bar* + +. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 2644 + +. + +*bar* + +. + +*bar* + +. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 2655 + +. + +*bar* + +. + +*bar* + +. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 2666 + +. + +*bar* +. + +*bar* +. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 2681 + +. + +*foo* + +. + +*foo* + +. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 2696 + +. + + +*foo* + + +. + +

foo

+
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 2714 + +. +*foo* +. +

foo

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 2730 + +. +

+import Text.HTML.TagSoup
+
+main :: IO ()
+main = print $ parseTags tags
+
+okay +. +

+import Text.HTML.TagSoup
+
+main :: IO ()
+main = print $ parseTags tags
+
+

okay

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 2751 + +. + +okay +. + +

okay

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 2770 + +. + +. + +. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 2790 + +. + +okay +. + +

okay

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 2813 + +. + +*foo* +. + +

foo

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 2864 + +. +*bar* +*baz* +. +*bar* +

baz

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 2876 + +. +1. *bar* +. +1. *bar* +. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 2889 + +. + +okay +. + +

okay

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 2907 + +. +'; + +?> +okay +. +'; + +?> +

okay

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 2926 + +. + +. + +. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 2935 + +. + +okay +. + +

okay

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 2969 + +. + + + +. + +
<!-- foo -->
+
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 2980 + +. +
+ +
+. +
+
<div>
+
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 2994 + +. +Foo +
+bar +
+. +

Foo

+
+bar +
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 3011 + +. +
+bar +
+*foo* +. +
+bar +
+*foo* +. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 3026 + +. +Foo + +baz +. +

Foo + +baz

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 3067 + +. +
+ +*Emphasized* text. + +
+. +
+

Emphasized text.

+
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 3080 + +. +
+*Emphasized* text. +
+. +
+*Emphasized* text. +
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 3102 + +. + + + + + + + + +
+Hi +
+. + + + + +
+Hi +
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 3129 + +. + + + + + + + + +
+ Hi +
+. + + +
<td>
+  Hi
+</td>
+
+ +
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 3178 + +. +[foo]: /url "title" + +[foo] +. +

foo

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 3187 + +. + [foo]: + /url + 'the title' + +[foo] +. +

foo

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 3198 + +. +[Foo*bar\]]:my_(url) 'title (with parens)' + +[Foo*bar\]] +. +

Foo*bar]

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 3207 + +. +[Foo bar]: + +'title' + +[Foo bar] +. +

Foo bar

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 3220 + +. +[foo]: /url ' +title +line1 +line2 +' + +[foo] +. +

foo

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 3239 + +. +[foo]: /url 'title + +with blank line' + +[foo] +. +

[foo]: /url 'title

+

with blank line'

+

[foo]

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 3254 + +. +[foo]: +/url + +[foo] +. +

foo

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 3266 + +. +[foo]: + +[foo] +. +

[foo]:

+

[foo]

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 3278 + +. +[foo]: <> + +[foo] +. +

foo

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 3289 + +. +[foo]: (baz) + +[foo] +. +

[foo]: (baz)

+

[foo]

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 3302 + +. +[foo]: /url\bar\*baz "foo\"bar\baz" + +[foo] +. +

foo

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 3313 + +. +[foo] + +[foo]: url +. +

foo

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 3325 + +. +[foo] + +[foo]: first +[foo]: second +. +

foo

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 3338 + +. +[FOO]: /url + +[Foo] +. +

Foo

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 3347 + +. +[ΑΓΩ]: /φου + +[αγω] +. +

αγω

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 3362 + +. +[foo]: /url +. +. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 3370 + +. +[ +foo +]: /url +bar +. +

bar

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 3383 + +. +[foo]: /url "title" ok +. +

[foo]: /url "title" ok

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 3392 + +. +[foo]: /url +"title" ok +. +

"title" ok

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 3403 + +. + [foo]: /url "title" + +[foo] +. +
[foo]: /url "title"
+
+

[foo]

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 3417 + +. +``` +[foo]: /url +``` + +[foo] +. +
[foo]: /url
+
+

[foo]

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 3432 + +. +Foo +[bar]: /baz + +[bar] +. +

Foo +[bar]: /baz

+

[bar]

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 3447 + +. +# [Foo] +[foo]: /url +> bar +. +

Foo

+
+

bar

+
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 3458 + +. +[foo]: /url +bar +=== +[foo] +. +

bar

+

foo

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 3468 + +. +[foo]: /url +=== +[foo] +. +

=== +foo

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 3481 + +. +[foo]: /foo-url "foo" +[bar]: /bar-url + "bar" +[baz]: /baz-url + +[foo], +[bar], +[baz] +. +

foo, +bar, +baz

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 3502 + +. +[foo] + +> [foo]: /url +. +

foo

+
+
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 3524 + +. +aaa + +bbb +. +

aaa

+

bbb

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 3536 + +. +aaa +bbb + +ccc +ddd +. +

aaa +bbb

+

ccc +ddd

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 3552 + +. +aaa + + +bbb +. +

aaa

+

bbb

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 3565 + +. + aaa + bbb +. +

aaa +bbb

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 3577 + +. +aaa + bbb + ccc +. +

aaa +bbb +ccc

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 3591 + +. + aaa +bbb +. +

aaa +bbb

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 3600 + +. + aaa +bbb +. +
aaa
+
+

bbb

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 3614 + +. +aaa +bbb +. +

aaa
+bbb

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 3631 + +. + + +aaa + + +# aaa + + +. +

aaa

+

aaa

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 3699 + +. +> # Foo +> bar +> baz +. +
+

Foo

+

bar +baz

+
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 3714 + +. +># Foo +>bar +> baz +. +
+

Foo

+

bar +baz

+
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 3729 + +. + > # Foo + > bar + > baz +. +
+

Foo

+

bar +baz

+
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 3744 + +. + > # Foo + > bar + > baz +. +
> # Foo
+> bar
+> baz
+
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 3759 + +. +> # Foo +> bar +baz +. +
+

Foo

+

bar +baz

+
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 3775 + +. +> bar +baz +> foo +. +
+

bar +baz +foo

+
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 3799 + +. +> foo +--- +. +
+

foo

+
+
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 3819 + +. +> - foo +- bar +. +
+
    +
  • foo
  • +
+
+
    +
  • bar
  • +
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 3837 + +. +> foo + bar +. +
+
foo
+
+
+
bar
+
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 3850 + +. +> ``` +foo +``` +. +
+
+
+

foo

+
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 3866 + +. +> foo + - bar +. +
+

foo +- bar

+
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 3890 + +. +> +. +
+
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 3898 + +. +> +> +> +. +
+
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 3910 + +. +> +> foo +> +. +
+

foo

+
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 3923 + +. +> foo + +> bar +. +
+

foo

+
+
+

bar

+
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 3945 + +. +> foo +> bar +. +
+

foo +bar

+
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 3958 + +. +> foo +> +> bar +. +
+

foo

+

bar

+
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 3972 + +. +foo +> bar +. +

foo

+
+

bar

+
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 3986 + +. +> aaa +*** +> bbb +. +
+

aaa

+
+
+
+

bbb

+
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 4004 + +. +> bar +baz +. +
+

bar +baz

+
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 4015 + +. +> bar + +baz +. +
+

bar

+
+

baz

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 4027 + +. +> bar +> +baz +. +
+

bar

+
+

baz

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 4043 + +. +> > > foo +bar +. +
+
+
+

foo +bar

+
+
+
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 4058 + +. +>>> foo +> bar +>>baz +. +
+
+
+

foo +bar +baz

+
+
+
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 4080 + +. +> code + +> not code +. +
+
code
+
+
+
+

not code

+
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 4134 + +. +A paragraph +with two lines. + + indented code + +> A block quote. +. +

A paragraph +with two lines.

+
indented code
+
+
+

A block quote.

+
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 4156 + +. +1. A paragraph + with two lines. + + indented code + + > A block quote. +. +
    +
  1. +

    A paragraph +with two lines.

    +
    indented code
    +
    +
    +

    A block quote.

    +
    +
  2. +
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 4189 + +. +- one + + two +. +
    +
  • one
  • +
+

two

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 4201 + +. +- one + + two +. +
    +
  • +

    one

    +

    two

    +
  • +
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 4215 + +. + - one + + two +. +
    +
  • one
  • +
+
 two
+
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 4228 + +. + - one + + two +. +
    +
  • +

    one

    +

    two

    +
  • +
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 4250 + +. + > > 1. one +>> +>> two +. +
+
+
    +
  1. +

    one

    +

    two

    +
  2. +
+
+
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 4277 + +. +>>- one +>> + > > two +. +
+
+
    +
  • one
  • +
+

two

+
+
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 4296 + +. +-one + +2.two +. +

-one

+

2.two

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 4309 + +. +- foo + + + bar +. +
    +
  • +

    foo

    +

    bar

    +
  • +
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 4326 + +. +1. foo + + ``` + bar + ``` + + baz + + > bam +. +
    +
  1. +

    foo

    +
    bar
    +
    +

    baz

    +
    +

    bam

    +
    +
  2. +
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 4354 + +. +- Foo + + bar + + + baz +. +
    +
  • +

    Foo

    +
    bar
    +
    +
    +baz
    +
    +
  • +
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 4376 + +. +123456789. ok +. +
    +
  1. ok
  2. +
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 4385 + +. +1234567890. not ok +. +

1234567890. not ok

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 4394 + +. +0. ok +. +
    +
  1. ok
  2. +
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 4403 + +. +003. ok +. +
    +
  1. ok
  2. +
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 4414 + +. +-1. not ok +. +

-1. not ok

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 4437 + +. +- foo + + bar +. +
    +
  • +

    foo

    +
    bar
    +
    +
  • +
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 4454 + +. + 10. foo + + bar +. +
    +
  1. +

    foo

    +
    bar
    +
    +
  2. +
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 4473 + +. + indented code + +paragraph + + more code +. +
indented code
+
+

paragraph

+
more code
+
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 4488 + +. +1. indented code + + paragraph + + more code +. +
    +
  1. +
    indented code
    +
    +

    paragraph

    +
    more code
    +
    +
  2. +
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 4510 + +. +1. indented code + + paragraph + + more code +. +
    +
  1. +
     indented code
    +
    +

    paragraph

    +
    more code
    +
    +
  2. +
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 4537 + +. + foo + +bar +. +

foo

+

bar

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 4547 + +. +- foo + + bar +. +
    +
  • foo
  • +
+

bar

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 4564 + +. +- foo + + bar +. +
    +
  • +

    foo

    +

    bar

    +
  • +
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 4591 + +. +- + foo +- + ``` + bar + ``` +- + baz +. +
    +
  • foo
  • +
  • +
    bar
    +
    +
  • +
  • +
    baz
    +
    +
  • +
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 4617 + +. +- + foo +. +
    +
  • foo
  • +
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 4631 + +. +- + + foo +. +
    +
  • +
+

foo

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 4645 + +. +- foo +- +- bar +. +
    +
  • foo
  • +
  • +
  • bar
  • +
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 4660 + +. +- foo +- +- bar +. +
    +
  • foo
  • +
  • +
  • bar
  • +
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 4675 + +. +1. foo +2. +3. bar +. +
    +
  1. foo
  2. +
  3. +
  4. bar
  5. +
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 4690 + +. +* +. +
    +
  • +
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 4700 + +. +foo +* + +foo +1. +. +

foo +*

+

foo +1.

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 4722 + +. + 1. A paragraph + with two lines. + + indented code + + > A block quote. +. +
    +
  1. +

    A paragraph +with two lines.

    +
    indented code
    +
    +
    +

    A block quote.

    +
    +
  2. +
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 4746 + +. + 1. A paragraph + with two lines. + + indented code + + > A block quote. +. +
    +
  1. +

    A paragraph +with two lines.

    +
    indented code
    +
    +
    +

    A block quote.

    +
    +
  2. +
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 4770 + +. + 1. A paragraph + with two lines. + + indented code + + > A block quote. +. +
    +
  1. +

    A paragraph +with two lines.

    +
    indented code
    +
    +
    +

    A block quote.

    +
    +
  2. +
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 4794 + +. + 1. A paragraph + with two lines. + + indented code + + > A block quote. +. +
1.  A paragraph
+    with two lines.
+
+        indented code
+
+    > A block quote.
+
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 4824 + +. + 1. A paragraph +with two lines. + + indented code + + > A block quote. +. +
    +
  1. +

    A paragraph +with two lines.

    +
    indented code
    +
    +
    +

    A block quote.

    +
    +
  2. +
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 4848 + +. + 1. A paragraph + with two lines. +. +
    +
  1. A paragraph +with two lines.
  2. +
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 4861 + +. +> 1. > Blockquote +continued here. +. +
+
    +
  1. +
    +

    Blockquote +continued here.

    +
    +
  2. +
+
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 4878 + +. +> 1. > Blockquote +> continued here. +. +
+
    +
  1. +
    +

    Blockquote +continued here.

    +
    +
  2. +
+
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 4906 + +. +- foo + - bar + - baz + - boo +. +
    +
  • foo +
      +
    • bar +
        +
      • baz +
          +
        • boo
        • +
        +
      • +
      +
    • +
    +
  • +
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 4932 + +. +- foo + - bar + - baz + - boo +. +
    +
  • foo
  • +
  • bar
  • +
  • baz
  • +
  • boo
  • +
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 4949 + +. +10) foo + - bar +. +
    +
  1. foo +
      +
    • bar
    • +
    +
  2. +
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 4965 + +. +10) foo + - bar +. +
    +
  1. foo
  2. +
+
    +
  • bar
  • +
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 4980 + +. +- - foo +. +
    +
  • +
      +
    • foo
    • +
    +
  • +
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 4993 + +. +1. - 2. foo +. +
    +
  1. +
      +
    • +
        +
      1. foo
      2. +
      +
    • +
    +
  2. +
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 5012 + +. +- # Foo +- Bar + --- + baz +. +
    +
  • +

    Foo

    +
  • +
  • +

    Bar

    +baz
  • +
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 5248 + +. +- foo +- bar ++ baz +. +
    +
  • foo
  • +
  • bar
  • +
+
    +
  • baz
  • +
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 5263 + +. +1. foo +2. bar +3) baz +. +
    +
  1. foo
  2. +
  3. bar
  4. +
+
    +
  1. baz
  2. +
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 5282 + +. +Foo +- bar +- baz +. +

Foo

+
    +
  • bar
  • +
  • baz
  • +
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 5359 + +. +The number of windows in my house is +14. The number of doors is 6. +. +

The number of windows in my house is +14. The number of doors is 6.

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 5369 + +. +The number of windows in my house is +1. The number of doors is 6. +. +

The number of windows in my house is

+
    +
  1. The number of doors is 6.
  2. +
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 5383 + +. +- foo + +- bar + + +- baz +. +
    +
  • +

    foo

    +
  • +
  • +

    bar

    +
  • +
  • +

    baz

    +
  • +
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 5404 + +. +- foo + - bar + - baz + + + bim +. +
    +
  • foo +
      +
    • bar +
        +
      • +

        baz

        +

        bim

        +
      • +
      +
    • +
    +
  • +
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 5434 + +. +- foo +- bar + + + +- baz +- bim +. +
    +
  • foo
  • +
  • bar
  • +
+ +
    +
  • baz
  • +
  • bim
  • +
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 5455 + +. +- foo + + notcode + +- foo + + + + code +. +
    +
  • +

    foo

    +

    notcode

    +
  • +
  • +

    foo

    +
  • +
+ +
code
+
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 5486 + +. +- a + - b + - c + - d + - e + - f +- g +. +
    +
  • a
  • +
  • b
  • +
  • c
  • +
  • d
  • +
  • e
  • +
  • f
  • +
  • g
  • +
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 5507 + +. +1. a + + 2. b + + 3. c +. +
    +
  1. +

    a

    +
  2. +
  3. +

    b

    +
  4. +
  5. +

    c

    +
  6. +
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 5531 + +. +- a + - b + - c + - d + - e +. +
    +
  • a
  • +
  • b
  • +
  • c
  • +
  • d +- e
  • +
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 5551 + +. +1. a + + 2. b + + 3. c +. +
    +
  1. +

    a

    +
  2. +
  3. +

    b

    +
  4. +
+
3. c
+
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 5574 + +. +- a +- b + +- c +. +
    +
  • +

    a

    +
  • +
  • +

    b

    +
  • +
  • +

    c

    +
  • +
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 5596 + +. +* a +* + +* c +. +
    +
  • +

    a

    +
  • +
  • +
  • +

    c

    +
  • +
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 5618 + +. +- a +- b + + c +- d +. +
    +
  • +

    a

    +
  • +
  • +

    b

    +

    c

    +
  • +
  • +

    d

    +
  • +
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 5640 + +. +- a +- b + + [ref]: /url +- d +. +
    +
  • +

    a

    +
  • +
  • +

    b

    +
  • +
  • +

    d

    +
  • +
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 5663 + +. +- a +- ``` + b + + + ``` +- c +. +
    +
  • a
  • +
  • +
    b
    +
    +
    +
    +
  • +
  • c
  • +
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 5689 + +. +- a + - b + + c +- d +. +
    +
  • a +
      +
    • +

      b

      +

      c

      +
    • +
    +
  • +
  • d
  • +
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 5713 + +. +* a + > b + > +* c +. +
    +
  • a +
    +

    b

    +
    +
  • +
  • c
  • +
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 5733 + +. +- a + > b + ``` + c + ``` +- d +. +
    +
  • a +
    +

    b

    +
    +
    c
    +
    +
  • +
  • d
  • +
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 5756 + +. +- a +. +
    +
  • a
  • +
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 5765 + +. +- a + - b +. +
    +
  • a +
      +
    • b
    • +
    +
  • +
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 5782 + +. +1. ``` + foo + ``` + + bar +. +
    +
  1. +
    foo
    +
    +

    bar

    +
  2. +
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 5801 + +. +* foo + * bar + + baz +. +
    +
  • +

    foo

    +
      +
    • bar
    • +
    +

    baz

    +
  • +
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 5819 + +. +- a + - b + - c + +- d + - e + - f +. +
    +
  • +

    a

    +
      +
    • b
    • +
    • c
    • +
    +
  • +
  • +

    d

    +
      +
    • e
    • +
    • f
    • +
    +
  • +
+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 5853 + +. +`hi`lo` +. +

hilo`

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 5885 + +. +`foo` +. +

foo

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 5896 + +. +`` foo ` bar `` +. +

foo ` bar

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 5906 + +. +` `` ` +. +

``

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 5914 + +. +` `` ` +. +

``

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 5923 + +. +` a` +. +

a

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 5932 + +. +` b ` +. +

 b 

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 5940 + +. +` ` +` ` +. +

  +

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 5951 + +. +`` +foo +bar +baz +`` +. +

foo bar baz

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 5961 + +. +`` +foo +`` +. +

foo

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 5972 + +. +`foo bar +baz` +. +

foo bar baz

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 5989 + +. +`foo\`bar` +. +

foo\bar`

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 6000 + +. +``foo`bar`` +. +

foo`bar

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 6006 + +. +` foo `` bar ` +. +

foo `` bar

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 6018 + +. +*foo`*` +. +

*foo*

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 6027 + +. +[not a `link](/foo`) +. +

[not a link](/foo)

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 6037 + +. +`` +. +

<a href="">`

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 6046 + +. +
` +. +

`

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 6055 + +. +`` +. +

<https://foo.bar.baz>`

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 6064 + +. +` +. +

https://foo.bar.`baz`

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 6074 + +. +```foo`` +. +

```foo``

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 6081 + +. +`foo +. +

`foo

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 6090 + +. +`foo``bar`` +. +

`foobar

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 6307 + +. +*foo bar* +. +

foo bar

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 6317 + +. +a * foo bar* +. +

a * foo bar*

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 6328 + +. +a*"foo"* +. +

a*"foo"*

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 6337 + +. +* a * +. +

* a *

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 6346 + +. +*$*alpha. + +*£*bravo. + +*€*charlie. +. +

*$*alpha.

+

*£*bravo.

+

*€*charlie.

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 6361 + +. +foo*bar* +. +

foobar

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 6368 + +. +5*6*78 +. +

5678

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 6377 + +. +_foo bar_ +. +

foo bar

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 6387 + +. +_ foo bar_ +. +

_ foo bar_

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 6397 + +. +a_"foo"_ +. +

a_"foo"_

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 6406 + +. +foo_bar_ +. +

foo_bar_

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 6413 + +. +5_6_78 +. +

5_6_78

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 6420 + +. +пристаням_стремятся_ +. +

пристаням_стремятся_

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 6430 + +. +aa_"bb"_cc +. +

aa_"bb"_cc

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 6441 + +. +foo-_(bar)_ +. +

foo-(bar)

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 6453 + +. +_foo* +. +

_foo*

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 6463 + +. +*foo bar * +. +

*foo bar *

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 6472 + +. +*foo bar +* +. +

*foo bar +*

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 6485 + +. +*(*foo) +. +

*(*foo)

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 6495 + +. +*(*foo*)* +. +

(foo)

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 6504 + +. +*foo*bar +. +

foobar

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 6517 + +. +_foo bar _ +. +

_foo bar _

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 6527 + +. +_(_foo) +. +

_(_foo)

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 6536 + +. +_(_foo_)_ +. +

(foo)

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 6545 + +. +_foo_bar +. +

_foo_bar

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 6552 + +. +_пристаням_стремятся +. +

_пристаням_стремятся

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 6559 + +. +_foo_bar_baz_ +. +

foo_bar_baz

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 6570 + +. +_(bar)_. +. +

(bar).

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 6579 + +. +**foo bar** +. +

foo bar

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 6589 + +. +** foo bar** +. +

** foo bar**

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 6600 + +. +a**"foo"** +. +

a**"foo"**

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 6609 + +. +foo**bar** +. +

foobar

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 6618 + +. +__foo bar__ +. +

foo bar

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 6628 + +. +__ foo bar__ +. +

__ foo bar__

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 6636 + +. +__ +foo bar__ +. +

__ +foo bar__

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 6648 + +. +a__"foo"__ +. +

a__"foo"__

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 6657 + +. +foo__bar__ +. +

foo__bar__

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 6664 + +. +5__6__78 +. +

5__6__78

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 6671 + +. +пристаням__стремятся__ +. +

пристаням__стремятся__

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 6678 + +. +__foo, __bar__, baz__ +. +

foo, bar, baz

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 6689 + +. +foo-__(bar)__ +. +

foo-(bar)

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 6702 + +. +**foo bar ** +. +

**foo bar **

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 6715 + +. +**(**foo) +. +

**(**foo)

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 6725 + +. +*(**foo**)* +. +

(foo)

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 6732 + +. +**Gomphocarpus (*Gomphocarpus physocarpus*, syn. +*Asclepias physocarpa*)** +. +

Gomphocarpus (Gomphocarpus physocarpus, syn. +Asclepias physocarpa)

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 6741 + +. +**foo "*bar*" foo** +. +

foo "bar" foo

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 6750 + +. +**foo**bar +. +

foobar

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 6762 + +. +__foo bar __ +. +

__foo bar __

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 6772 + +. +__(__foo) +. +

__(__foo)

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 6782 + +. +_(__foo__)_ +. +

(foo)

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 6791 + +. +__foo__bar +. +

__foo__bar

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 6798 + +. +__пристаням__стремятся +. +

__пристаням__стремятся

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 6805 + +. +__foo__bar__baz__ +. +

foo__bar__baz

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 6816 + +. +__(bar)__. +. +

(bar).

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 6828 + +. +*foo [bar](/url)* +. +

foo bar

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 6835 + +. +*foo +bar* +. +

foo +bar

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 6847 + +. +_foo __bar__ baz_ +. +

foo bar baz

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 6854 + +. +_foo _bar_ baz_ +. +

foo bar baz

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 6861 + +. +__foo_ bar_ +. +

foo bar

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 6868 + +. +*foo *bar** +. +

foo bar

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 6875 + +. +*foo **bar** baz* +. +

foo bar baz

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 6881 + +. +*foo**bar**baz* +. +

foobarbaz

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 6905 + +. +*foo**bar* +. +

foo**bar

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 6918 + +. +***foo** bar* +. +

foo bar

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 6925 + +. +*foo **bar*** +. +

foo bar

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 6932 + +. +*foo**bar*** +. +

foobar

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 6943 + +. +foo***bar***baz +. +

foobarbaz

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 6949 + +. +foo******bar*********baz +. +

foobar***baz

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 6958 + +. +*foo **bar *baz* bim** bop* +. +

foo bar baz bim bop

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 6965 + +. +*foo [*bar*](/url)* +. +

foo bar

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 6974 + +. +** is not an empty emphasis +. +

** is not an empty emphasis

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 6981 + +. +**** is not an empty strong emphasis +. +

**** is not an empty strong emphasis

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 6994 + +. +**foo [bar](/url)** +. +

foo bar

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 7001 + +. +**foo +bar** +. +

foo +bar

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 7013 + +. +__foo _bar_ baz__ +. +

foo bar baz

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 7020 + +. +__foo __bar__ baz__ +. +

foo bar baz

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 7027 + +. +____foo__ bar__ +. +

foo bar

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 7034 + +. +**foo **bar**** +. +

foo bar

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 7041 + +. +**foo *bar* baz** +. +

foo bar baz

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 7048 + +. +**foo*bar*baz** +. +

foobarbaz

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 7055 + +. +***foo* bar** +. +

foo bar

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 7062 + +. +**foo *bar*** +. +

foo bar

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 7071 + +. +**foo *bar **baz** +bim* bop** +. +

foo bar baz +bim bop

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 7080 + +. +**foo [*bar*](/url)** +. +

foo bar

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 7089 + +. +__ is not an empty emphasis +. +

__ is not an empty emphasis

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 7096 + +. +____ is not an empty strong emphasis +. +

____ is not an empty strong emphasis

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 7106 + +. +foo *** +. +

foo ***

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 7113 + +. +foo *\** +. +

foo *

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 7120 + +. +foo *_* +. +

foo _

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 7127 + +. +foo ***** +. +

foo *****

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 7134 + +. +foo **\*** +. +

foo *

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 7141 + +. +foo **_** +. +

foo _

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 7152 + +. +**foo* +. +

*foo

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 7159 + +. +*foo** +. +

foo*

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 7166 + +. +***foo** +. +

*foo

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 7173 + +. +****foo* +. +

***foo

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 7180 + +. +**foo*** +. +

foo*

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 7187 + +. +*foo**** +. +

foo***

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 7197 + +. +foo ___ +. +

foo ___

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 7204 + +. +foo _\__ +. +

foo _

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 7211 + +. +foo _*_ +. +

foo *

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 7218 + +. +foo _____ +. +

foo _____

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 7225 + +. +foo __\___ +. +

foo _

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 7232 + +. +foo __*__ +. +

foo *

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 7239 + +. +__foo_ +. +

_foo

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 7250 + +. +_foo__ +. +

foo_

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 7257 + +. +___foo__ +. +

_foo

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 7264 + +. +____foo_ +. +

___foo

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 7271 + +. +__foo___ +. +

foo_

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 7278 + +. +_foo____ +. +

foo___

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 7288 + +. +**foo** +. +

foo

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 7295 + +. +*_foo_* +. +

foo

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 7302 + +. +__foo__ +. +

foo

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 7309 + +. +_*foo*_ +. +

foo

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 7319 + +. +****foo**** +. +

foo

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 7326 + +. +____foo____ +. +

foo

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 7337 + +. +******foo****** +. +

foo

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 7346 + +. +***foo*** +. +

foo

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 7353 + +. +_____foo_____ +. +

foo

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 7362 + +. +*foo _bar* baz_ +. +

foo _bar baz_

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 7369 + +. +*foo __bar *baz bim__ bam* +. +

foo bar *baz bim bam

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 7378 + +. +**foo **bar baz** +. +

**foo bar baz

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 7385 + +. +*foo *bar baz* +. +

*foo bar baz

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 7394 + +. +*[bar*](/url) +. +

*bar*

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 7401 + +. +_foo [bar_](/url) +. +

_foo bar_

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 7408 + +. +* +. +

*

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 7415 + +. +** +. +

**

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 7422 + +. +__ +. +

__

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 7429 + +. +*a `*`* +. +

a *

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 7436 + +. +_a `_`_ +. +

a _

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 7443 + +. +**a +. +

**ahttps://foo.bar/?q=**

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 7450 + +. +__a +. +

__ahttps://foo.bar/?q=__

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 7538 + +. +[link](/uri "title") +. +

link

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 7548 + +. +[link](/uri) +. +

link

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 7554 + +. +[](./target.md) +. +

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 7561 + +. +[link]() +. +

link

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 7568 + +. +[link](<>) +. +

link

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 7575 + +. +[]() +. +

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 7584 + +. +[link](/my uri) +. +

[link](/my uri)

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 7590 + +. +[link](
) +. +

link

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 7599 + +. +[link](foo +bar) +. +

[link](foo +bar)

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 7607 + +. +[link]() +. +

[link]()

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 7618 + +. +[a]() +. +

a

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 7626 + +. +[link]() +. +

[link](<foo>)

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 7635 + +. +[a]( +[a](c) +. +

[a](<b)c +[a](<b)c> +[a](c)

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 7647 + +. +[link](\(foo\)) +. +

link

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 7656 + +. +[link](foo(and(bar))) +. +

link

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 7665 + +. +[link](foo(and(bar)) +. +

[link](foo(and(bar))

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 7672 + +. +[link](foo\(and\(bar\)) +. +

link

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 7679 + +. +[link]() +. +

link

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 7689 + +. +[link](foo\)\:) +. +

link

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 7698 + +. +[link](#fragment) + +[link](https://example.com#fragment) + +[link](https://example.com?foo=3#frag) +. +

link

+

link

+

link

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 7714 + +. +[link](foo\bar) +. +

link

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 7730 + +. +[link](foo%20bä) +. +

link

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 7741 + +. +[link]("title") +. +

link

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 7750 + +. +[link](/url "title") +[link](/url 'title') +[link](/url (title)) +. +

link +link +link

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 7764 + +. +[link](/url "title \""") +. +

link

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 7775 + +. +[link](/url "title") +. +

link

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 7784 + +. +[link](/url "title "and" title") +. +

[link](/url "title "and" title")

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 7793 + +. +[link](/url 'title "and" title') +. +

link

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 7818 + +. +[link]( /uri + "title" ) +. +

link

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 7829 + +. +[link] (/uri) +. +

[link] (/uri)

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 7839 + +. +[link [foo [bar]]](/uri) +. +

link [foo [bar]]

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 7846 + +. +[link] bar](/uri) +. +

[link] bar](/uri)

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 7853 + +. +[link [bar](/uri) +. +

[link bar

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 7860 + +. +[link \[bar](/uri) +. +

link [bar

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 7869 + +. +[link *foo **bar** `#`*](/uri) +. +

link foo bar #

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 7876 + +. +[![moon](moon.jpg)](/uri) +. +

moon

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 7885 + +. +[foo [bar](/uri)](/uri) +. +

[foo bar](/uri)

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 7892 + +. +[foo *[bar [baz](/uri)](/uri)*](/uri) +. +

[foo [bar baz](/uri)](/uri)

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 7899 + +. +![[[foo](uri1)](uri2)](uri3) +. +

[foo](uri2)

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 7909 + +. +*[foo*](/uri) +. +

*foo*

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 7916 + +. +[foo *bar](baz*) +. +

foo *bar

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 7926 + +. +*foo [bar* baz] +. +

foo [bar baz]

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 7936 + +. +[foo +. +

[foo

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 7943 + +. +[foo`](/uri)` +. +

[foo](/uri)

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 7950 + +. +[foo +. +

[foohttps://example.com/?search=](uri)

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 7988 + +. +[foo][bar] + +[bar]: /url "title" +. +

foo

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 8003 + +. +[link [foo [bar]]][ref] + +[ref]: /uri +. +

link [foo [bar]]

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 8012 + +. +[link \[bar][ref] + +[ref]: /uri +. +

link [bar

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 8023 + +. +[link *foo **bar** `#`*][ref] + +[ref]: /uri +. +

link foo bar #

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 8032 + +. +[![moon](moon.jpg)][ref] + +[ref]: /uri +. +

moon

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 8043 + +. +[foo [bar](/uri)][ref] + +[ref]: /uri +. +

[foo bar]ref

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 8052 + +. +[foo *bar [baz][ref]*][ref] + +[ref]: /uri +. +

[foo bar baz]ref

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 8067 + +. +*[foo*][ref] + +[ref]: /uri +. +

*foo*

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 8076 + +. +[foo *bar][ref]* + +[ref]: /uri +. +

foo *bar*

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 8088 + +. +[foo + +[ref]: /uri +. +

[foo

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 8097 + +. +[foo`][ref]` + +[ref]: /uri +. +

[foo][ref]

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 8106 + +. +[foo + +[ref]: /uri +. +

[foohttps://example.com/?search=][ref]

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 8117 + +. +[foo][BaR] + +[bar]: /url "title" +. +

foo

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 8128 + +. +[ẞ] + +[SS]: /url +. +

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 8140 + +. +[Foo + bar]: /url + +[Baz][Foo bar] +. +

Baz

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 8153 + +. +[foo] [bar] + +[bar]: /url "title" +. +

[foo] bar

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 8162 + +. +[foo] +[bar] + +[bar]: /url "title" +. +

[foo] +bar

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 8203 + +. +[foo]: /url1 + +[foo]: /url2 + +[bar][foo] +. +

bar

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 8218 + +. +[bar][foo\!] + +[foo!]: /url +. +

[bar][foo!]

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 8230 + +. +[foo][ref[] + +[ref[]: /uri +. +

[foo][ref[]

+

[ref[]: /uri

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 8240 + +. +[foo][ref[bar]] + +[ref[bar]]: /uri +. +

[foo][ref[bar]]

+

[ref[bar]]: /uri

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 8250 + +. +[[[foo]]] + +[[[foo]]]: /url +. +

[[[foo]]]

+

[[[foo]]]: /url

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 8260 + +. +[foo][ref\[] + +[ref\[]: /uri +. +

foo

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 8271 + +. +[bar\\]: /uri + +[bar\\] +. +

bar\

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 8283 + +. +[] + +[]: /uri +. +

[]

+

[]: /uri

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 8293 + +. +[ + ] + +[ + ]: /uri +. +

[ +]

+

[ +]: /uri

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 8316 + +. +[foo][] + +[foo]: /url "title" +. +

foo

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 8325 + +. +[*foo* bar][] + +[*foo* bar]: /url "title" +. +

foo bar

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 8336 + +. +[Foo][] + +[foo]: /url "title" +. +

Foo

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 8349 + +. +[foo] +[] + +[foo]: /url "title" +. +

foo +[]

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 8369 + +. +[foo] + +[foo]: /url "title" +. +

foo

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 8378 + +. +[*foo* bar] + +[*foo* bar]: /url "title" +. +

foo bar

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 8387 + +. +[[*foo* bar]] + +[*foo* bar]: /url "title" +. +

[foo bar]

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 8396 + +. +[[bar [foo] + +[foo]: /url +. +

[[bar foo

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 8407 + +. +[Foo] + +[foo]: /url "title" +. +

Foo

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 8418 + +. +[foo] bar + +[foo]: /url +. +

foo bar

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 8430 + +. +\[foo] + +[foo]: /url "title" +. +

[foo]

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 8442 + +. +[foo*]: /url + +*[foo*] +. +

*foo*

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 8454 + +. +[foo][bar] + +[foo]: /url1 +[bar]: /url2 +. +

foo

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 8463 + +. +[foo][] + +[foo]: /url1 +. +

foo

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 8473 + +. +[foo]() + +[foo]: /url1 +. +

foo

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 8481 + +. +[foo](not a link) + +[foo]: /url1 +. +

foo(not a link)

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 8492 + +. +[foo][bar][baz] + +[baz]: /url +. +

[foo]bar

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 8504 + +. +[foo][bar][baz] + +[baz]: /url1 +[bar]: /url2 +. +

foobaz

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 8517 + +. +[foo][bar][baz] + +[baz]: /url1 +[foo]: /url2 +. +

[foo]bar

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 8540 + +. +![foo](/url "title") +. +

foo

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 8547 + +. +![foo *bar*] + +[foo *bar*]: train.jpg "train & tracks" +. +

foo bar

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 8556 + +. +![foo ![bar](/url)](/url2) +. +

foo bar

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 8563 + +. +![foo [bar](/url)](/url2) +. +

foo bar

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 8577 + +. +![foo *bar*][] + +[foo *bar*]: train.jpg "train & tracks" +. +

foo bar

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 8586 + +. +![foo *bar*][foobar] + +[FOOBAR]: train.jpg "train & tracks" +. +

foo bar

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 8595 + +. +![foo](train.jpg) +. +

foo

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 8602 + +. +My ![foo bar](/path/to/train.jpg "title" ) +. +

My foo bar

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 8609 + +. +![foo]() +. +

foo

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 8616 + +. +![](/url) +. +

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 8625 + +. +![foo][bar] + +[bar]: /url +. +

foo

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 8634 + +. +![foo][bar] + +[BAR]: /url +. +

foo

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 8645 + +. +![foo][] + +[foo]: /url "title" +. +

foo

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 8654 + +. +![*foo* bar][] + +[*foo* bar]: /url "title" +. +

foo bar

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 8665 + +. +![Foo][] + +[foo]: /url "title" +. +

Foo

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 8677 + +. +![foo] +[] + +[foo]: /url "title" +. +

foo +[]

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 8690 + +. +![foo] + +[foo]: /url "title" +. +

foo

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 8699 + +. +![*foo* bar] + +[*foo* bar]: /url "title" +. +

foo bar

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 8710 + +. +![[foo]] + +[[foo]]: /url "title" +. +

![[foo]]

+

[[foo]]: /url "title"

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 8722 + +. +![Foo] + +[foo]: /url "title" +. +

Foo

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 8734 + +. +!\[foo] + +[foo]: /url "title" +. +

![foo]

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 8746 + +. +\![foo] + +[foo]: /url "title" +. +

!foo

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 8779 + +. + +. +

http://foo.bar.baz

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 8786 + +. + +. +

https://foo.bar.baz/test?q=hello&id=22&boolean

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 8793 + +. + +. +

irc://foo.bar:2233/baz

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 8802 + +. + +. +

MAILTO:FOO@BAR.BAZ

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 8814 + +. + +. +

a+b+c:d

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 8821 + +. + +. +

made-up-scheme://foo,bar

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 8828 + +. + +. +

https://../

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 8835 + +. + +. +

localhost:5001/foo

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 8844 + +. + +. +

<https://foo.bar/baz bim>

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 8853 + +. + +. +

https://example.com/\[\

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 8875 + +. + +. +

foo@bar.example.com

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 8882 + +. + +. +

foo+special@Bar.baz-bar0.com

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 8891 + +. + +. +

<foo+@bar.example.com>

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 8900 + +. +<> +. +

<>

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 8907 + +. +< https://foo.bar > +. +

< https://foo.bar >

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 8914 + +. + +. +

<m:abc>

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 8921 + +. + +. +

<foo.bar.baz>

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 8928 + +. +https://example.com +. +

https://example.com

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 8935 + +. +foo@bar.example.com +. +

foo@bar.example.com

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 9015 + +. + +. +

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 9024 + +. + +. +

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 9033 + +. + +. +

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 9044 + +. + +. +

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 9055 + +. +Foo +. +

Foo

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 9064 + +. +<33> <__> +. +

<33> <__>

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 9073 + +. +
+. +

<a h*#ref="hi">

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 9082 + +. +
+. +

</a href="foo">

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 9133 + +. +foo +. +

foo

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 9141 + +. +foo foo --> + +foo foo --> +. +

foo foo -->

+

foo foo -->

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 9153 + +. +foo +. +

foo

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 9162 + +. +foo +. +

foo

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 9171 + +. +foo &<]]> +. +

foo &<]]>

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 9181 + +. +foo
+. +

foo

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 9190 + +. +foo +. +

foo

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 9197 + +. + +. +

<a href=""">

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 9211 + +. +foo +baz +. +

foo
+baz

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 9223 + +. +foo\ +baz +. +

foo
+baz

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 9234 + +. +foo +baz +. +

foo
+baz

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 9245 + +. +foo + bar +. +

foo
+bar

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 9254 + +. +foo\ + bar +. +

foo
+bar

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 9266 + +. +*foo +bar* +. +

foo
+bar

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 9275 + +. +*foo\ +bar* +. +

foo
+bar

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 9286 + +. +`code +span` +. +

code span

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 9294 + +. +`code\ +span` +. +

code\ span

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 9304 + +. +
+. +

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 9313 + +. + +. +

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 9326 + +. +foo\ +. +

foo\

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 9333 + +. +foo +. +

foo

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 9340 + +. +### foo\ +. +

foo\

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 9347 + +. +### foo +. +

foo

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 9362 + +. +foo +baz +. +

foo +baz

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 9374 + +. +foo + baz +. +

foo +baz

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 9394 + +. +hello $.;'there +. +

hello $.;'there

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 9401 + +. +Foo χρῆν +. +

Foo χρῆν

+. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src line: 9410 + +. +Multiple spaces +. +

Multiple spaces

+. + diff --git a/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/test/gh/tests/test_port/fixtures/disable_code_block.md b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/test/gh/tests/test_port/fixtures/disable_code_block.md new file mode 100644 index 0000000000000000000000000000000000000000..35cf925c697144c98bb134284e06c4abe7b4756c --- /dev/null +++ b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/test/gh/tests/test_port/fixtures/disable_code_block.md @@ -0,0 +1,69 @@ +indent paragraph +. + This is a paragraph, + with multiple lines. + + This paragraph +has variable indents, + like this. +. +

This is a paragraph, +with multiple lines.

+

This paragraph +has variable indents, +like this.

+. + +indent in HTML +. +
+ + Paragraph + +
+. +
+

Paragraph

+
+. + +indent fence +. + ```python + def foo(): + pass + ``` +. +
def foo():
+    pass
+
+. + +indent heading +. + # Heading +. +

Heading

+. + +indent table +. + | foo | bar | + | --- | --- | + | baz | bim | +. + + + + + + + + + + + + + +
foobar
bazbim
+. diff --git a/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/test/gh/tests/test_port/fixtures/fatal.md b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/test/gh/tests/test_port/fixtures/fatal.md new file mode 100644 index 0000000000000000000000000000000000000000..3bcc08e24f237be2cb403a19878fe85d69814779 --- /dev/null +++ b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/test/gh/tests/test_port/fixtures/fatal.md @@ -0,0 +1,41 @@ +Should not throw exception on invalid chars in URL (`*` not allowed in path) [malformed URI] +. +[foo](<%test>) +. +

foo

+. + + +Should not throw exception on broken utf-8 sequence in URL [malformed URI] +. +[foo](%C3) +. +

foo

+. + + +Should not throw exception on broken utf-16 surrogates sequence in URL [malformed URI] +. +[foo](�) +. +

foo

+. + + +Should not hang comments regexp +. +foo +. +

foo <!— xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ->

+

foo

+. + + +Should not hang cdata regexp +. +foo +. +

foo <![CDATA[ xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ]>

+. diff --git a/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/test/gh/tests/test_port/fixtures/issue-fixes.md b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/test/gh/tests/test_port/fixtures/issue-fixes.md new file mode 100644 index 0000000000000000000000000000000000000000..b630fcee0fd7512d3f411160938be0d1bfd95ff1 --- /dev/null +++ b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/test/gh/tests/test_port/fixtures/issue-fixes.md @@ -0,0 +1,56 @@ +#31 empty lines after certain lists raises exception: +. +> a + +- b + + +. +
+

a

+
+
    +
  • b
  • +
+. + +#50 blank lines after block quotes +. +> A Block Quote + +> Another Block Quote + + +. +
+

A Block Quote

+
+
+

Another Block Quote

+
+. + +#80 UnicodeError with codepoints larger than 0xFFFF +. +💬 +. +

💬

+. + +Fix CVE-2023-26303 +. +![![]() +]([) +. +


+

+. + +Fix parsing of incorrect numeric character references +. +[]("y;) "y; +[](#y;) #y; +. +

&#X22y; + &#35y;

+. diff --git a/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/test/gh/tests/test_port/fixtures/linkify.md b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/test/gh/tests/test_port/fixtures/linkify.md new file mode 100644 index 0000000000000000000000000000000000000000..02a23b178bae598c59feb74aa6f0a2b09f3c8a59 --- /dev/null +++ b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/test/gh/tests/test_port/fixtures/linkify.md @@ -0,0 +1,248 @@ +linkify +. +url http://www.youtube.com/watch?v=5Jt5GEr4AYg. +. +

url http://www.youtube.com/watch?v=5Jt5GEr4AYg.

+. + + +don't touch text in links +. +[https://example.com](https://example.com) +. +

https://example.com

+. + + +don't touch text in autolinks +. + +. +

https://example.com

+. + + +don't touch text in html tags +. +https://example.com +. +

https://example.com

+. + +entities inside raw links +. +https://example.com/foo&bar +. +

https://example.com/foo&amp;bar

+. + + +emphasis inside raw links (asterisk, can happen in links with params) +. +https://example.com/foo*bar*baz +. +

https://example.com/foo*bar*baz

+. + + +emphasis inside raw links (underscore) +. +http://example.org/foo._bar_-_baz +. +

http://example.org/foo._bar_-_baz

+. + + +backticks inside raw links +. +https://example.com/foo`bar`baz +. +

https://example.com/foo`bar`baz

+. + + +links inside raw links +. +https://example.com/foo[123](456)bar +. +

https://example.com/foo[123](456)bar

+. + + +escapes not allowed at the start +. +\https://example.com +. +

\https://example.com

+. + + +escapes not allowed at comma +. +https\://example.com +. +

https://example.com

+. + + +escapes not allowed at slashes +. +https:\//aa.org https://bb.org +. +

https://aa.org https://bb.org

+. + + +fuzzy link shouldn't match cc.org +. +https:/\/cc.org +. +

https://cc.org

+. + + +bold links (exclude markup of pairs from link tail) +. +**http://example.com/foobar** +. +

http://example.com/foobar

+. + +match links without protocol +. +www.example.org +. +

www.example.org

+. + +coverage, prefix not valid +. +http:/example.com/ +. +

http:/example.com/

+. + + +coverage, negative link level +. +[https://example.com](https://example.com) +. +

https://example.com

+. + + +emphasis with '*', real link: +. +http://cdecl.ridiculousfish.com/?q=int+%28*f%29+%28float+*%29%3B +. +

http://cdecl.ridiculousfish.com/?q=int+(*f)+(float+*)%3B

+. + +emphasis with '_', real link: +. +https://www.sell.fi/sites/default/files/elainlaakarilehti/tieteelliset_artikkelit/kahkonen_t._et_al.canine_pancreatitis-_review.pdf +. +

https://www.sell.fi/sites/default/files/elainlaakarilehti/tieteelliset_artikkelit/kahkonen_t._et_al.canine_pancreatitis-_review.pdf

+. + +emails +. +test@example.com + +mailto:test@example.com +. +

test@example.com

+

mailto:test@example.com

+. + + +typorgapher should not break href +. +http://example.com/(c) +. +

http://example.com/(c)

+. + +before line +. +before +github.com +. +

before +github.com

+. + +after line +. +github.com +after +. +

github.com +after

+. + +before after lines +. +before +github.com +after +. +

before +github.com +after

+. + +before after lines with blank line +. +before + +github.com + +after +. +

before

+

github.com

+

after

+. + +Don't match escaped +. +google\.com +. +

google.com

+. + +Issue [#300](https://github.com/executablebooks/markdown-it-py/issues/300) emphasis inside raw links (underscore) at beginning of line +. +http://example.org/foo._bar_-_baz This works +. +

http://example.org/foo._bar_-_baz This works

+. + +Issue [#300](https://github.com/executablebooks/markdown-it-py/issues/300) emphasis inside raw links (underscore) at end of line +. +This doesnt http://example.org/foo._bar_-_baz +. +

This doesnt http://example.org/foo._bar_-_baz

+. + +Issue [#300](https://github.com/executablebooks/markdown-it-py/issues/300) emphasis inside raw links (underscore) mix1 +. +While this `does` http://example.org/foo._bar_-_baz, this doesnt http://example.org/foo._bar_-_baz and this **does** http://example.org/foo._bar_-_baz +. +

While this does http://example.org/foo._bar_-_baz, this doesnt http://example.org/foo._bar_-_baz and this does http://example.org/foo._bar_-_baz

+. + +Issue [#300](https://github.com/executablebooks/markdown-it-py/issues/300) emphasis inside raw links (underscore) mix2 +. +This applies to _series of URLs too_ http://example.org/foo._bar_-_baz http://example.org/foo._bar_-_baz, these dont http://example.org/foo._bar_-_baz http://example.org/foo._bar_-_baz and these **do** http://example.org/foo._bar_-_baz http://example.org/foo._bar_-_baz +. +

This applies to series of URLs too http://example.org/foo._bar_-_baz http://example.org/foo._bar_-_baz, these dont http://example.org/foo._bar_-_baz http://example.org/foo._bar_-_baz and these do http://example.org/foo._bar_-_baz http://example.org/foo._bar_-_baz

+. + +emphasis inside raw links (asterisk) at end of line +. +This doesnt http://example.org/foo.*bar*-*baz +. +

This doesnt http://example.org/foo.*bar*-*baz

+. \ No newline at end of file diff --git a/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/test/gh/tests/test_port/fixtures/normalize.md b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/test/gh/tests/test_port/fixtures/normalize.md new file mode 100644 index 0000000000000000000000000000000000000000..4a005089d4a6d13ab687ca49a70ccb763d13b2f4 --- /dev/null +++ b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/test/gh/tests/test_port/fixtures/normalize.md @@ -0,0 +1,39 @@ + +Encode link destination, decode text inside it: + +. + +. +

http://example.com/αβγδ

+. + +. +[foo](http://example.com/α%CE%B2γ%CE%B4) +. +

foo

+. + + +Keep %25 as is because decoding it may break urls, #720 +. + +. +

https://www.google.com/search?q=hello.%252Ehello

+. + + +Don't encode domains in unknown schemas: + +. +[](skype:γγγ) +. +

+. + + +Square brackets are allowed +. +[foo](https://bar]baz.org) +. +

foo

+. diff --git a/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/test/gh/tests/test_port/fixtures/proto.md b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/test/gh/tests/test_port/fixtures/proto.md new file mode 100644 index 0000000000000000000000000000000000000000..87fdccf86e106e4eea079a117fcd5e3ddf762b84 --- /dev/null +++ b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/test/gh/tests/test_port/fixtures/proto.md @@ -0,0 +1,16 @@ +. +[__proto__] + +[__proto__]: blah +. +

proto

+. + + +. +[hasOwnProperty] + +[hasOwnProperty]: blah +. +

hasOwnProperty

+. diff --git a/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/test/gh/tests/test_port/fixtures/punycode.md b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/test/gh/tests/test_port/fixtures/punycode.md new file mode 100644 index 0000000000000000000000000000000000000000..c726e823bb46634b72b3cfb8580caaad8da1718e --- /dev/null +++ b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/test/gh/tests/test_port/fixtures/punycode.md @@ -0,0 +1,77 @@ +Should decode punycode: + +. + +. +

http://☃.net/

+. + +. + +. +

http://☃.net/

+. + +Invalid punycode: + +. + +. +

http://xn--xn.com/

+. + +Invalid punycode (non-ascii): + +. + +. +

http://xn--γ.com/

+. + +Two slashes should start a domain: + +. +[](//☃.net/) +. +

+. + +Should auto-add protocol to autolinks: + +. +test google.com foo +. +

test google.com foo

+. + +Should support IDN in autolinks: + +. +test http://xn--n3h.net/ foo +. +

test http://☃.net/ foo

+. + +. +test http://☃.net/ foo +. +

test http://☃.net/ foo

+. + +. +test //xn--n3h.net/ foo +. +

test //☃.net/ foo

+. + +. +test xn--n3h.net foo +. +

test ☃.net foo

+. + +. +test xn--n3h@xn--n3h.net foo +. +

test xn--n3h@☃.net foo

+. diff --git a/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/test/gh/tests/test_port/fixtures/smartquotes.md b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/test/gh/tests/test_port/fixtures/smartquotes.md new file mode 100644 index 0000000000000000000000000000000000000000..8ed314e2285a8916bf9152037bf0689c3958272f --- /dev/null +++ b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/test/gh/tests/test_port/fixtures/smartquotes.md @@ -0,0 +1,192 @@ +Should parse nested quotes: +. +"foo 'bar' baz" + +'foo 'bar' baz' +. +

“foo ‘bar’ baz”

+

‘foo ‘bar’ baz’

+. + + +Should not overlap quotes: +. +'foo "bar' baz" +. +

‘foo "bar’ baz"

+. + + +Should match quotes on the same level: +. +"foo *bar* baz" +. +

“foo bar baz”

+. + + +Should handle adjacent nested quotes: +. +'"double in single"' + +"'single in double'" +. +

‘“double in single”’

+

“‘single in double’”

+. + + + +Should not match quotes on different levels: +. +*"foo* bar" + +"foo *bar"* + +*"foo* bar *baz"* +. +

"foo bar"

+

"foo bar"

+

"foo bar baz"

+. + +Smartquotes should not overlap with other tags: +. +*foo "bar* *baz" quux* +. +

foo "bar baz" quux

+. + + +Should try and find matching quote in this case: +. +"foo "bar 'baz" +. +

"foo “bar 'baz”

+. + + +Should not touch 'inches' in quotes: +. +"Monitor 21"" and "Monitor"" +. +

“Monitor 21"” and “Monitor”"

+. + + +Should render an apostrophe as a rsquo: +. +This isn't and can't be the best approach to implement this... +. +

This isn’t and can’t be the best approach to implement this…

+. + + +Apostrophe could end the word, that's why original smartypants replaces all of them as rsquo: +. +users' stuff +. +

users’ stuff

+. + +Quotes between punctuation chars: + +. +"(hai)". +. +

“(hai)”.

+. + +Quotes at the start/end of the tokens: +. +"*foo* bar" + +"foo *bar*" + +"*foo bar*" +. +

foo bar”

+

“foo bar

+

foo bar

+. + +Should treat softbreak as a space: +. +"this" +and "that". + +"this" and +"that". +. +

“this” +and “that”.

+

“this” and +“that”.

+. + +Should treat hardbreak as a space: +. +"this"\ +and "that". + +"this" and\ +"that". +. +

“this”
+and “that”.

+

“this” and
+“that”.

+. + +Should allow quotes adjacent to other punctuation characters, #643: +. +The dog---"'man's' best friend" +. +

The dog—“‘man’s’ best friend”

+. + +Should parse quotes adjacent to code block, #677: +. +"test `code`" + +"`code` test" +. +

“test code

+

code test”

+. + +Should parse quotes adjacent to inline html, #677: +. +"test
" + +"
test" +. +

“test

+


test”

+. + +Should be escapable: +. +"foo" + +\"foo" + +"foo\" +. +

“foo”

+

"foo"

+

"foo"

+. + +Should not replace entities: +. +"foo" + +"foo" + +"foo" +. +

"foo"

+

"foo"

+

"foo"

+. diff --git a/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/test/gh/tests/test_port/fixtures/strikethrough.md b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/test/gh/tests/test_port/fixtures/strikethrough.md new file mode 100644 index 0000000000000000000000000000000000000000..ca15b6ff00c687f7a794898d0052c0ba3653ee7d --- /dev/null +++ b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/test/gh/tests/test_port/fixtures/strikethrough.md @@ -0,0 +1,136 @@ +. +~~Strikeout~~ +. +

Strikeout

+. + +. +x ~~~~foo~~ bar~~ +. +

x foo bar

+. + +. +x ~~foo ~~bar~~~~ +. +

x foo bar

+. + +. +x ~~~~foo~~~~ +. +

x foo

+. + +. +x ~~a ~~foo~~~~~~~~~~~bar~~ b~~ + +x ~~a ~~foo~~~~~~~~~~~~bar~~ b~~ +. +

x a foo~~~bar b

+

x a foo~~~~bar b

+. + + +Strikeouts have the same priority as emphases: +. +**~~test**~~ + +~~**test~~** +. +

~~test~~

+

**test**

+. + + +Strikeouts have the same priority as emphases with respect to links: +. +[~~link]()~~ + +~~[link~~]() +. +

~~link~~

+

~~link~~

+. + + +Strikeouts have the same priority as emphases with respect to backticks: +. +~~`code~~` + +`~~code`~~ +. +

~~code~~

+

~~code~~

+. + + +Nested strikeouts: +. +~~foo ~~bar~~ baz~~ + +~~f **o ~~o b~~ a** r~~ +. +

foo bar baz

+

f o o b a r

+. + + +Should not have a whitespace between text and "~~": +. +foo ~~ bar ~~ baz +. +

foo ~~ bar ~~ baz

+. + + +Should parse strikethrough within link tags: +. +[~~foo~~]() +. +

foo

+. + + +Newline should be considered a whitespace: +. +~~test +~~ + +~~ +test~~ + +~~ +test +~~ +. +

~~test +~~

+

~~ +test~~

+

~~ +test +~~

+. + +From CommonMark test suite, replacing `**` with our marker: + +. +a~~"foo"~~ +. +

a~~"foo"~~

+. + +Coverage: single tilde +. +~a~ +. +

~a~

+. + +Regression test for #742: +. +-~~~~;~~~~~~ +. +

-;~~

+. diff --git a/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/test/gh/tests/test_port/fixtures/tables.md b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/test/gh/tests/test_port/fixtures/tables.md new file mode 100644 index 0000000000000000000000000000000000000000..cf83708beeebd42eb593aecc35261e6cc59ef2bb --- /dev/null +++ b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/test/gh/tests/test_port/fixtures/tables.md @@ -0,0 +1,896 @@ +Simple: +. +| Heading 1 | Heading 2 +| --------- | --------- +| Cell 1 | Cell 2 +| Cell 3 | Cell 4 +. + + + + + + + + + + + + + + + + + +
Heading 1Heading 2
Cell 1Cell 2
Cell 3Cell 4
+. + + +Column alignment: +. +| Header 1 | Header 2 | Header 3 | Header 4 | +| :------: | -------: | :------- | -------- | +| Cell 1 | Cell 2 | Cell 3 | Cell 4 | +| Cell 5 | Cell 6 | Cell 7 | Cell 8 | +. + + + + + + + + + + + + + + + + + + + + + + + +
Header 1Header 2Header 3Header 4
Cell 1Cell 2Cell 3Cell 4
Cell 5Cell 6Cell 7Cell 8
+. + + +Nested emphases: +. +Header 1|Header 2|Header 3|Header 4 +:-------|:------:|-------:|-------- +Cell 1 |Cell 2 |Cell 3 |Cell 4 +*Cell 5*|Cell 6 |Cell 7 |Cell 8 +. + + + + + + + + + + + + + + + + + + + + + + + +
Header 1Header 2Header 3Header 4
Cell 1Cell 2Cell 3Cell 4
Cell 5Cell 6Cell 7Cell 8
+. + + +Nested tables inside blockquotes: +. +> foo|foo +> ---|--- +> bar|bar +baz|baz +. +
+ + + + + + + + + + + + + +
foofoo
barbar
+
+

baz|baz

+. + + +Minimal one-column: +. +| foo +|---- +| test2 +. + + + + + + + + + + + +
foo
test2
+. + + +This is parsed as one big table: +. +- foo|foo +---|--- +bar|bar +. + + + + + + + + + + + + + +
- foofoo
barbar
+. + + +Second line should not contain symbols except "-", ":", "|" and " ": +. +foo|foo +-----|-----s +bar|bar +. +

foo|foo +-----|-----s +bar|bar

+. + + +Second line should contain "|" symbol: +. +foo|foo +-----:----- +bar|bar +. +

foo|foo +-----:----- +bar|bar

+. + + +Second line should not have empty columns in the middle: +. +foo|foo +-----||----- +bar|bar +. +

foo|foo +-----||----- +bar|bar

+. + + +Wrong alignment symbol position: +. +foo|foo +-----|-::- +bar|bar +. +

foo|foo +-----|-::- +bar|bar

+. + + +Title line should contain "|" symbol: +. +foo +-----|----- +bar|bar +. +

foo +-----|----- +bar|bar

+. + + +Allow tabs as a separator on 2nd line +. +| foo | bar | +| --- | --- | +| baz | quux | +. + + + + + + + + + + + + + +
foobar
bazquux
+. + + +Should terminate paragraph: +. +paragraph +foo|foo +---|--- +bar|bar +. +

paragraph

+ + + + + + + + + + + + + +
foofoo
barbar
+. + + +Table no longer terminated via row without "|" symbol: +. +foo|foo +---|--- +paragraph +. + + + + + + + + + + + + + +
foofoo
paragraph
+. + + +Delimiter escaping (deprecated): +. +| Heading 1 \\\\| Heading 2 +| --------- | --------- +| Cell\|1\|| Cell\|2 +\| Cell\\\|3 \\| Cell\|4 +. +

| Heading 1 \\| Heading 2 +| --------- | --------- +| Cell|1|| Cell|2 +| Cell\|3 \| Cell|4

+. + +Pipes inside backticks DO split cells, unless `\` escaped: +. +| Heading 1 | Heading 2 +| --------- | --------- +| `Cell\|1` | Cell 2 +| `Cell|3` | Cell 4 +. + + + + + + + + + + + + + + + + + +
Heading 1Heading 2
Cell|1Cell 2
`Cell3`
+. + +Unclosed backticks don't count +. +| Heading 1 | Heading 2 +| --------- | --------- +| Cell 1 | Cell 2 +| `Cell 3| Cell 4 +. + + + + + + + + + + + + + + + + + +
Heading 1Heading 2
Cell 1Cell 2
`Cell 3Cell 4
+. + +Another complicated backticks case +. +| Heading 1 | Heading 2 +| --------- | --------- +| Cell 1 | Cell 2 +| \\\`|\\\` +. + + + + + + + + + + + + + + + + + +
Heading 1Heading 2
Cell 1Cell 2
\`\`
+. + +`\` in tables should not count as escaped backtick +. +# | 1 | 2 +--|--|-- +x | `\` | `x` +. + + + + + + + + + + + + + + + +
#12
x\x
+. + +Tables should handle escaped backticks +. +# | 1 | 2 +--|--|-- +x | \`\` | `x` +. + + + + + + + + + + + + + + + +
#12
x``x
+. + + +An amount of rows might be different across table (issue #171), but header and alignment rows must be equal (#697): +. +| 1 | 2 | +| :-----: | :-----: | +| 3 | 4 | 5 | 6 | +. + + + + + + + + + + + + + +
12
34
+. + + +An amount of rows might be different across the table #2: +. +| 1 | 2 | 3 | 4 | +| :-----: | :-----: | :-----: | :-----: | +| 5 | 6 | +. + + + + + + + + + + + + + + + + + +
1234
56
+. + + +Allow one-column tables (issue #171): +. +| foo | +:-----: +| bar | +. + + + + + + + + + + + +
foo
bar
+. + + +Allow indented tables (issue #325): +. + | Col1a | Col2a | + | ----- | ----- | + | Col1b | Col2b | +. + + + + + + + + + + + + + +
Col1aCol2a
Col1bCol2b
+. + + +Tables should not be indented more than 4 spaces (1st line): +. + | Col1a | Col2a | + | ----- | ----- | + | Col1b | Col2b | +. +
| Col1a | Col2a |
+
+

| ----- | ----- | +| Col1b | Col2b |

+. + + +Tables should not be indented more than 4 spaces (2nd line): +. + | Col1a | Col2a | + | ----- | ----- | + | Col1b | Col2b | +. +

| Col1a | Col2a | +| ----- | ----- | +| Col1b | Col2b |

+. + + +Tables should not be indented more than 4 spaces (3rd line): +. + | Col1a | Col2a | + | ----- | ----- | + | Col1b | Col2b | +. + + + + + + + +
Col1aCol2a
+
| Col1b | Col2b |
+
+. + + +Allow tables with empty body: +. + | Col1a | Col2a | + | ----- | ----- | +. + + + + + + + +
Col1aCol2a
+. + + +Align row should be at least as large as any actual rows: +. +Col1a | Col1b | Col1c +----- | ----- +Col2a | Col2b | Col2c +. +

Col1a | Col1b | Col1c +----- | ----- +Col2a | Col2b | Col2c

+. + +Escaped pipes inside backticks don't split cells: +. +| Heading 1 | Heading 2 +| --------- | --------- +| Cell 1 | Cell 2 +| `Cell 3\|` | Cell 4 +. + + + + + + + + + + + + + + + + + +
Heading 1Heading 2
Cell 1Cell 2
Cell 3|Cell 4
+. + +Escape before escaped Pipes inside backticks don't split cells: +. +| Heading 1 | Heading 2 +| --------- | --------- +| Cell 1 | Cell 2 +| `Cell 3\\|` | Cell 4 +. + + + + + + + + + + + + + + + + + +
Heading 1Heading 2
Cell 1Cell 2
Cell 3\|Cell 4
+. + +Regression test for #721, table in a list indented with tabs: +. +- Level 1 + + - Level 2 + + | Column 1 | Column 2 | + | -------- | -------- | + | abcdefgh | ijklmnop | +. +
    +
  • +

    Level 1

    +
      +
    • +

      Level 2

      + + + + + + + + + + + + + +
      Column 1Column 2
      abcdefghijklmnop
      +
    • +
    +
  • +
+. + +Table without any columns is not a table, #724 +. +| +| +| +. +

| +| +|

+. + +GFM 4.10 Tables (extension), Example 198 +. +| foo | bar | +| --- | --- | +| baz | bim | +. + + + + + + + + + + + + + +
foobar
bazbim
+. + +GFM 4.10 Tables (extension), Example 199 +. +| abc | defghi | +:-: | -----------: +bar | baz +. + + + + + + + + + + + + + +
abcdefghi
barbaz
+. + +GFM 4.10 Tables (extension), Example 200 +. +| f\|oo | +| ------ | +| b `\|` az | +| b **\|** im | +. + + + + + + + + + + + + + + +
f|oo
b | az
b | im
+. + +GFM 4.10 Tables (extension), Example 201 +. +| abc | def | +| --- | --- | +| bar | baz | +> bar +. + + + + + + + + + + + + + +
abcdef
barbaz
+
+

bar

+
+. + +GFM 4.10 Tables (extension), Example 202 +. +| abc | def | +| --- | --- | +| bar | baz | +bar + +bar +. + + + + + + + + + + + + + + + + + +
abcdef
barbaz
bar
+

bar

+. + +GFM 4.10 Tables (extension), Example 203 +. +| abc | def | +| --- | +| bar | +. +

| abc | def | +| --- | +| bar |

+. + +GFM 4.10 Tables (extension), Example 204 +. +| abc | def | +| --- | --- | +| bar | +| bar | baz | boo | +. + + + + + + + + + + + + + + + + + +
abcdef
bar
barbaz
+. + +GFM 4.10 Tables (extension), Example 205 +. +| abc | def | +| --- | --- | +. + + + + + + + +
abcdef
+. + +A list takes precedence in case of ambiguity +. +a | b +- | - +1 | 2 +. +

a | b

+
    +
  • | - +1 | 2
  • +
+. diff --git a/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/test/gh/tests/test_port/fixtures/typographer.md b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/test/gh/tests/test_port/fixtures/typographer.md new file mode 100644 index 0000000000000000000000000000000000000000..23825e5d2191888d2b3958370e1e86e017e6cce1 --- /dev/null +++ b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/test/gh/tests/test_port/fixtures/typographer.md @@ -0,0 +1,130 @@ +. +(bad) +. +

(bad)

+. + +copyright (Lower) +. +(c) +. +

©

+. + +copyright (Upper) +. +(C) +. +

©

+. + +copyright +. +(c) (C) +. +

© ©

+. + + +reserved +. +(r) (R) +. +

® ®

+. + + +trademark +. +(tm) (TM) +. +

™ ™

+. + +plus-minus +. ++-5 +. +

±5

+. + + +ellipsis +. +test.. test... test..... test?..... test!.... +. +

test… test… test… test?.. test!..

+. + + +dupes +. +!!!!!! ???? ,, +. +

!!! ??? ,

+. + + +dupes-ellipsis +. +!... ?... ,... !!!!!!.... ????.... ,,... +. +

!.. ?.. ,… !!!.. ???.. ,…

+. + +copyright should be escapable +. +\(c) +. +

(c)

+. + + +dashes +. +---markdownit --- super--- + +markdownit---awesome + +abc ---- + +--markdownit -- super-- + +markdownit--awesome +. +

—markdownit — super—

+

markdownit—awesome

+

abc ----

+

–markdownit – super–

+

markdownit–awesome

+. + +dashes should be escapable +. +foo \-- bar + +foo -\- bar +. +

foo -- bar

+

foo -- bar

+. + +regression tests for #624 +. +1---2---3 + +1--2--3 + +1 -- -- 3 +. +

1—2—3

+

1–2–3

+

1 – – 3

+. + +shouldn't replace entities +. +(c) (c) (c) +. +

(c) (c) ©

+. diff --git a/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/test/gh/tests/test_port/fixtures/xss.md b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/test/gh/tests/test_port/fixtures/xss.md new file mode 100644 index 0000000000000000000000000000000000000000..7c0512e0c82cbf7ce32f1e4ca3bb4624a630e4e4 --- /dev/null +++ b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/test/gh/tests/test_port/fixtures/xss.md @@ -0,0 +1,128 @@ +. +[normal link](javascript) +. +

normal link

+. + + +Should not allow some protocols in links and images +. +[xss link](javascript:alert(1)) + +[xss link](JAVASCRIPT:alert(1)) + +[xss link](vbscript:alert(1)) + +[xss link](VBSCRIPT:alert(1)) + +[xss link](file:///123) +. +

[xss link](javascript:alert(1))

+

[xss link](JAVASCRIPT:alert(1))

+

[xss link](vbscript:alert(1))

+

[xss link](VBSCRIPT:alert(1))

+

[xss link](file:///123)

+. + + +. +[xss link]("><script>alert("xss")</script>) + +[xss link](Javascript:alert(1)) + +[xss link](&#74;avascript:alert(1)) + +[xss link](\Javascript:alert(1)) +. +

xss link

+

[xss link](Javascript:alert(1))

+

xss link

+

xss link

+. + +. +[xss link]() +. +

[xss link](<javascript:alert(1)>)

+. + +. +[xss link](javascript:alert(1)) +. +

[xss link](javascript:alert(1))

+. + + +Should not allow data-uri except some whitelisted mimes +. +![](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7) +. +

+. + +. +[xss link](data:text/html;base64,PHNjcmlwdD5hbGVydCgnWFNTJyk8L3NjcmlwdD4K) +. +

[xss link](data:text/html;base64,PHNjcmlwdD5hbGVydCgnWFNTJyk8L3NjcmlwdD4K)

+. + +. +[normal link](/javascript:link) +. +

normal link

+. + + +Image parser use the same code base as link. +. +![xss link](javascript:alert(1)) +. +

![xss link](javascript:alert(1))

+. + + +Autolinks +. + + + +. +

<javascript:alert(1)>

+

<javascript:alert(1)>

+. + + +Linkifier +. +javascript:alert(1) + +javascript:alert(1) +. +

javascript:alert(1)

+

javascript:alert(1)

+. + + +References +. +[test]: javascript:alert(1) +. +

[test]: javascript:alert(1)

+. + + +Make sure we decode entities before split: +. +```js custom-class +test1 +``` + +```js custom-class +test2 +``` +. +
test1
+
+
test2
+
+. diff --git a/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/test/gh/tests/test_port/test_fixtures.py b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/test/gh/tests/test_port/test_fixtures.py new file mode 100644 index 0000000000000000000000000000000000000000..74c7ee4deb72be54621defcde2e2d0e4430bdf67 --- /dev/null +++ b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/test/gh/tests/test_port/test_fixtures.py @@ -0,0 +1,126 @@ +from pathlib import Path + +import pytest + +from markdown_it import MarkdownIt +from markdown_it.utils import read_fixture_file + +FIXTURE_PATH = Path(__file__).parent.joinpath("fixtures") + + +@pytest.mark.parametrize( + "line,title,input,expected", + read_fixture_file(FIXTURE_PATH.joinpath("linkify.md")), +) +def test_linkify(line, title, input, expected): + md = MarkdownIt().enable("linkify") + md.options["linkify"] = True + text = md.render(input) + assert text.rstrip() == expected.rstrip() + + # if not install linkify-it-py + md.linkify = None + with pytest.raises(ModuleNotFoundError): + md.render(input) + + +@pytest.mark.parametrize( + "line,title,input,expected", + read_fixture_file(FIXTURE_PATH.joinpath("smartquotes.md")), +) +def test_smartquotes(line, title, input, expected): + md = MarkdownIt().enable("replacements").enable("smartquotes") + md.options["typographer"] = True + text = md.render(input) + assert text.rstrip() == expected.rstrip() + + +@pytest.mark.parametrize( + "line,title,input,expected", + read_fixture_file(FIXTURE_PATH.joinpath("typographer.md")), +) +def test_typographer(line, title, input, expected): + md = MarkdownIt().enable("replacements") + md.options["typographer"] = True + text = md.render(input) + assert text.rstrip() == expected.rstrip() + + +@pytest.mark.parametrize( + "line,title,input,expected", read_fixture_file(FIXTURE_PATH.joinpath("tables.md")) +) +def test_table(line, title, input, expected): + md = MarkdownIt().enable("table") + text = md.render(input) + try: + assert text.rstrip() == expected.rstrip() + except AssertionError: + print(text) + raise + + +@pytest.mark.parametrize( + "line,title,input,expected", + read_fixture_file(FIXTURE_PATH.joinpath("commonmark_extras.md")), +) +def test_commonmark_extras(line, title, input, expected): + md = MarkdownIt("commonmark") + md.options["langPrefix"] = "" + text = md.render(input) + if text.rstrip() != expected.rstrip(): + print(text) + assert text.rstrip() == expected.rstrip() + + +@pytest.mark.parametrize( + "line,title,input,expected", + read_fixture_file(FIXTURE_PATH.joinpath("normalize.md")), +) +def test_normalize_url(line, title, input, expected): + md = MarkdownIt("commonmark") + text = md.render(input) + assert text.rstrip() == expected.rstrip() + + +@pytest.mark.parametrize( + "line,title,input,expected", read_fixture_file(FIXTURE_PATH.joinpath("fatal.md")) +) +def test_fatal(line, title, input, expected): + md = MarkdownIt("commonmark").enable("replacements") + md.options["typographer"] = True + text = md.render(input) + if text.rstrip() != expected.rstrip(): + print(text) + assert text.rstrip() == expected.rstrip() + + +@pytest.mark.parametrize( + "line,title,input,expected", + read_fixture_file(FIXTURE_PATH.joinpath("strikethrough.md")), +) +def test_strikethrough(line, title, input, expected): + md = MarkdownIt().enable("strikethrough") + text = md.render(input) + assert text.rstrip() == expected.rstrip() + + +@pytest.mark.parametrize( + "line,title,input,expected", + read_fixture_file(FIXTURE_PATH.joinpath("disable_code_block.md")), +) +def test_disable_code_block(line, title, input, expected): + md = MarkdownIt().enable("table").disable("code") + text = md.render(input) + print(text.rstrip()) + assert text.rstrip() == expected.rstrip() + + +@pytest.mark.parametrize( + "line,title,input,expected", + read_fixture_file(FIXTURE_PATH.joinpath("issue-fixes.md")), +) +def test_issue_fixes(line, title, input, expected): + md = MarkdownIt() + text = md.render(input) + print(text) + assert text.rstrip() == expected.rstrip() diff --git a/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/test/gh/tests/test_port/test_misc.py b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/test/gh/tests/test_port/test_misc.py new file mode 100644 index 0000000000000000000000000000000000000000..62b5bf85e7cd99251f6a4e7e86f652986bbda562 --- /dev/null +++ b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/test/gh/tests/test_port/test_misc.py @@ -0,0 +1,44 @@ +from markdown_it import MarkdownIt, presets + + +def test_highlight_arguments(): + def highlight_func(str_, lang, attrs): + assert lang == "a" + assert attrs == "b c d" + return "
==" + str_ + "==
" + + conf = presets.commonmark.make() + conf["options"]["highlight"] = highlight_func + md = MarkdownIt(config=conf) + assert md.render("``` a b c d \nhl\n```") == "
==hl\n==
\n" + + +def test_ordered_list_info(): + def type_filter(tokens, type_): + return [t for t in tokens if t.type == type_] + + md = MarkdownIt() + + tokens = md.parse("1. Foo\n2. Bar\n20. Fuzz") + assert len(type_filter(tokens, "ordered_list_open")) == 1 + tokens = type_filter(tokens, "list_item_open") + assert len(tokens) == 3 + assert tokens[0].info == "1" + assert tokens[0].markup == "." + assert tokens[1].info == "2" + assert tokens[1].markup == "." + assert tokens[2].info == "20" + assert tokens[2].markup == "." + + tokens = md.parse(" 1. Foo\n2. Bar\n 20. Fuzz\n 199. Flp") + assert len(type_filter(tokens, "ordered_list_open")) == 1 + tokens = type_filter(tokens, "list_item_open") + assert len(tokens) == 4 + assert tokens[0].info == "1" + assert tokens[0].markup == "." + assert tokens[1].info == "2" + assert tokens[1].markup == "." + assert tokens[2].info == "20" + assert tokens[2].markup == "." + assert tokens[3].info == "199" + assert tokens[3].markup == "." diff --git a/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/test/gh/tests/test_port/test_no_end_newline.py b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/test/gh/tests/test_port/test_no_end_newline.py new file mode 100644 index 0000000000000000000000000000000000000000..5e7cf822ccb464b28ded87d6670242de4afef9f3 --- /dev/null +++ b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/test/gh/tests/test_port/test_no_end_newline.py @@ -0,0 +1,27 @@ +import pytest + +from markdown_it import MarkdownIt + + +@pytest.mark.parametrize( + "input,expected", + [ + ("#", "

\n"), + ("###", "

\n"), + ("` `", "

\n"), + ("``````", "
\n"), + ("-", "
    \n
  • \n
\n"), + ("1.", "
    \n
  1. \n
\n"), + (">", "
\n"), + ("---", "
\n"), + ("

", "

"), + ("p", "

p

\n"), + ("[reference]: /url", ""), + (" indented code block", "
indented code block\n
\n"), + ("> test\n>", "
\n

test

\n
\n"), + ], +) +def test_no_end_newline(input, expected): + md = MarkdownIt() + text = md.render(input) + assert text == expected diff --git a/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/test/gh/tests/test_port/test_references.py b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/test/gh/tests/test_port/test_references.py new file mode 100644 index 0000000000000000000000000000000000000000..97f8a65adbf99dbd48d30d7017b104b7c5e5c71f --- /dev/null +++ b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/test/gh/tests/test_port/test_references.py @@ -0,0 +1,52 @@ +from markdown_it import MarkdownIt + + +def test_ref_definitions(): + md = MarkdownIt() + src = "[a]: abc\n\n[b]: xyz\n\n[b]: ijk" + env = {} # type: ignore + tokens = md.parse(src, env) + assert tokens == [] + assert env == { + "references": { + "A": {"title": "", "href": "abc", "map": [0, 1]}, + "B": {"title": "", "href": "xyz", "map": [2, 3]}, + }, + "duplicate_refs": [{"href": "ijk", "label": "B", "map": [4, 5], "title": ""}], + } + + +def test_use_existing_env(data_regression): + md = MarkdownIt() + src = "[a]\n\n[c]: ijk" + env = { + "references": { + "A": {"title": "", "href": "abc", "map": [0, 1]}, + "B": {"title": "", "href": "xyz", "map": [2, 3]}, + } + } + tokens = md.parse(src, env) + data_regression.check([token.as_dict() for token in tokens]) + assert env == { + "references": { + "A": {"title": "", "href": "abc", "map": [0, 1]}, + "B": {"title": "", "href": "xyz", "map": [2, 3]}, + "C": {"title": "", "href": "ijk", "map": [2, 3]}, + } + } + + +def test_store_labels(data_regression): + md = MarkdownIt() + md.options["store_labels"] = True + src = "[a]\n\n![a]\n\n[a]: ijk" + tokens = md.parse(src) + data_regression.check([token.as_dict() for token in tokens]) + + +def test_inline_definitions(data_regression): + md = MarkdownIt() + md.options["inline_definitions"] = True + src = '[a]: url "title"\n- [a]: url "title"' + tokens = md.parse(src) + data_regression.check([token.as_dict() for token in tokens]) diff --git a/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/test/gh/tests/test_port/test_references/test_inline_definitions.yml b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/test/gh/tests/test_port/test_references/test_inline_definitions.yml new file mode 100644 index 0000000000000000000000000000000000000000..5ec210b1f3a6c2148316498e1788e3c99aff0561 --- /dev/null +++ b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/test/gh/tests/test_port/test_references/test_inline_definitions.yml @@ -0,0 +1,94 @@ +- attrs: null + block: true + children: null + content: '' + hidden: false + info: '' + level: 0 + map: + - 0 + - 1 + markup: '' + meta: + id: A + label: a + title: title + url: url + nesting: 0 + tag: '' + type: definition +- attrs: null + block: true + children: null + content: '' + hidden: false + info: '' + level: 0 + map: + - 1 + - 2 + markup: '-' + meta: {} + nesting: 1 + tag: ul + type: bullet_list_open +- attrs: null + block: true + children: null + content: '' + hidden: false + info: '' + level: 1 + map: + - 1 + - 2 + markup: '-' + meta: {} + nesting: 1 + tag: li + type: list_item_open +- attrs: null + block: true + children: null + content: '' + hidden: false + info: '' + level: 2 + map: + - 1 + - 2 + markup: '' + meta: + id: A + label: a + title: title + url: url + nesting: 0 + tag: '' + type: definition +- attrs: null + block: true + children: null + content: '' + hidden: false + info: '' + level: 1 + map: null + markup: '-' + meta: {} + nesting: -1 + tag: li + type: list_item_close +- attrs: null + block: true + children: null + content: '' + hidden: false + info: '' + level: 0 + map: null + markup: '-' + meta: {} + nesting: -1 + tag: ul + type: bullet_list_close diff --git a/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/test/gh/tests/test_port/test_references/test_store_labels.yml b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/test/gh/tests/test_port/test_references/test_store_labels.yml new file mode 100644 index 0000000000000000000000000000000000000000..79f6f74a31afa5466055708b9240e5fa655882fc --- /dev/null +++ b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/test/gh/tests/test_port/test_references/test_store_labels.yml @@ -0,0 +1,159 @@ +- attrs: null + block: true + children: null + content: '' + hidden: false + info: '' + level: 0 + map: + - 0 + - 1 + markup: '' + meta: {} + nesting: 1 + tag: p + type: paragraph_open +- attrs: null + block: true + children: + - attrs: + - - href + - ijk + block: false + children: null + content: '' + hidden: false + info: '' + level: 0 + map: null + markup: '' + meta: + label: A + nesting: 1 + tag: a + type: link_open + - attrs: null + block: false + children: null + content: a + hidden: false + info: '' + level: 1 + map: null + markup: '' + meta: {} + nesting: 0 + tag: '' + type: text + - attrs: null + block: false + children: null + content: '' + hidden: false + info: '' + level: 0 + map: null + markup: '' + meta: {} + nesting: -1 + tag: a + type: link_close + content: '[a]' + hidden: false + info: '' + level: 1 + map: + - 0 + - 1 + markup: '' + meta: {} + nesting: 0 + tag: '' + type: inline +- attrs: null + block: true + children: null + content: '' + hidden: false + info: '' + level: 0 + map: null + markup: '' + meta: {} + nesting: -1 + tag: p + type: paragraph_close +- attrs: null + block: true + children: null + content: '' + hidden: false + info: '' + level: 0 + map: + - 2 + - 3 + markup: '' + meta: {} + nesting: 1 + tag: p + type: paragraph_open +- attrs: null + block: true + children: + - attrs: + - - src + - ijk + - - alt + - '' + block: false + children: + - attrs: null + block: false + children: null + content: a + hidden: false + info: '' + level: 0 + map: null + markup: '' + meta: {} + nesting: 0 + tag: '' + type: text + content: a + hidden: false + info: '' + level: 0 + map: null + markup: '' + meta: + label: A + nesting: 0 + tag: img + type: image + content: '![a]' + hidden: false + info: '' + level: 1 + map: + - 2 + - 3 + markup: '' + meta: {} + nesting: 0 + tag: '' + type: inline +- attrs: null + block: true + children: null + content: '' + hidden: false + info: '' + level: 0 + map: null + markup: '' + meta: {} + nesting: -1 + tag: p + type: paragraph_close diff --git a/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/test/gh/tests/test_port/test_references/test_use_existing_env.yml b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/test/gh/tests/test_port/test_references/test_use_existing_env.yml new file mode 100644 index 0000000000000000000000000000000000000000..1a7233791a74912c4a5481436745f22d09ff65de --- /dev/null +++ b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/test/gh/tests/test_port/test_references/test_use_existing_env.yml @@ -0,0 +1,84 @@ +- attrs: null + block: true + children: null + content: '' + hidden: false + info: '' + level: 0 + map: + - 0 + - 1 + markup: '' + meta: {} + nesting: 1 + tag: p + type: paragraph_open +- attrs: null + block: true + children: + - attrs: + - - href + - abc + block: false + children: null + content: '' + hidden: false + info: '' + level: 0 + map: null + markup: '' + meta: {} + nesting: 1 + tag: a + type: link_open + - attrs: null + block: false + children: null + content: a + hidden: false + info: '' + level: 1 + map: null + markup: '' + meta: {} + nesting: 0 + tag: '' + type: text + - attrs: null + block: false + children: null + content: '' + hidden: false + info: '' + level: 0 + map: null + markup: '' + meta: {} + nesting: -1 + tag: a + type: link_close + content: '[a]' + hidden: false + info: '' + level: 1 + map: + - 0 + - 1 + markup: '' + meta: {} + nesting: 0 + tag: '' + type: inline +- attrs: null + block: true + children: null + content: '' + hidden: false + info: '' + level: 0 + map: null + markup: '' + meta: {} + nesting: -1 + tag: p + type: paragraph_close diff --git a/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/test/gh/tests/test_tree.py b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/test/gh/tests/test_tree.py new file mode 100644 index 0000000000000000000000000000000000000000..36bd0b67183e902e39287041da8ab6f728edea02 --- /dev/null +++ b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/test/gh/tests/test_tree.py @@ -0,0 +1,102 @@ +from markdown_it import MarkdownIt +from markdown_it.tree import SyntaxTreeNode + +EXAMPLE_MARKDOWN = """ +## Heading here + +Some paragraph text and **emphasis here** and more text here. +""" + + +def test_tree_to_tokens_conversion(): + tokens = MarkdownIt().parse(EXAMPLE_MARKDOWN) + tokens_after_roundtrip = SyntaxTreeNode(tokens).to_tokens() + assert tokens == tokens_after_roundtrip + + +def test_property_passthrough(): + tokens = MarkdownIt().parse(EXAMPLE_MARKDOWN) + heading_open = tokens[0] + tree = SyntaxTreeNode(tokens) + heading_node = tree.children[0] + assert heading_open.tag == heading_node.tag + assert tuple(heading_open.map or ()) == heading_node.map + assert heading_open.level == heading_node.level + assert heading_open.content == heading_node.content + assert heading_open.markup == heading_node.markup + assert heading_open.info == heading_node.info + assert heading_open.meta == heading_node.meta + assert heading_open.block == heading_node.block + assert heading_open.hidden == heading_node.hidden + + +def test_type(): + tokens = MarkdownIt().parse(EXAMPLE_MARKDOWN) + tree = SyntaxTreeNode(tokens) + # Root type is "root" + assert tree.type == "root" + # "_open" suffix must be stripped from nested token type + assert tree.children[0].type == "heading" + assert tree[0].type == "heading" + # For unnested tokens, node type must remain same as token type + assert tree.children[0].children[0].type == "inline" + + +def test_sibling_traverse(): + tokens = MarkdownIt().parse(EXAMPLE_MARKDOWN) + tree = SyntaxTreeNode(tokens) + paragraph_inline_node = tree.children[1].children[0] + text_node = paragraph_inline_node.children[0] + assert text_node.type == "text" + strong_node = text_node.next_sibling + assert strong_node + assert strong_node.type == "strong" + another_text_node = strong_node.next_sibling + assert another_text_node + assert another_text_node.type == "text" + assert another_text_node.next_sibling is None + assert another_text_node.previous_sibling.previous_sibling == text_node # type: ignore + assert text_node.previous_sibling is None + + +def test_pretty(file_regression): + md = MarkdownIt("commonmark") + tokens = md.parse( + """ +# Header + +Here's some text and an image ![title](image.png) + +1. a **list** + +> a *quote* + """ + ) + node = SyntaxTreeNode(tokens) + file_regression.check(node.pretty(indent=2, show_text=True), extension=".xml") + + +def test_pretty_text_special(file_regression): + md = MarkdownIt() + md.disable("text_join") + tree = SyntaxTreeNode(md.parse("foo © bar \\(")) + file_regression.check(tree.pretty(show_text=True), extension=".xml") + + +def test_walk(): + tokens = MarkdownIt().parse(EXAMPLE_MARKDOWN) + tree = SyntaxTreeNode(tokens) + expected_node_types = ( + "root", + "heading", + "inline", + "text", + "paragraph", + "inline", + "text", + "strong", + "text", + "text", + ) + for node, expected_type in zip(tree.walk(), expected_node_types): + assert node.type == expected_type diff --git a/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/test/gh/tests/test_tree/test_pretty.xml b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/test/gh/tests/test_tree/test_pretty.xml new file mode 100644 index 0000000000000000000000000000000000000000..41d399efd963b3252de73d87b74f68f621f37dd8 --- /dev/null +++ b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/test/gh/tests/test_tree/test_pretty.xml @@ -0,0 +1,30 @@ + + + + + Header + + + + Here's some text and an image + + + title + + + + + + a + + + list + +
+ + + + a + + + quote \ No newline at end of file diff --git a/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/test/gh/tests/test_tree/test_pretty_text_special.xml b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/test/gh/tests/test_tree/test_pretty_text_special.xml new file mode 100644 index 0000000000000000000000000000000000000000..211d790cec901828153cf9d8e52cab29b2a52e5e --- /dev/null +++ b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/test/gh/tests/test_tree/test_pretty_text_special.xml @@ -0,0 +1,11 @@ + + + + + foo + + © + + bar + + ( \ No newline at end of file diff --git a/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/test/run_test.py b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/test/run_test.py new file mode 100644 index 0000000000000000000000000000000000000000..d2e2a02e8b8044d168b042fb0220fc6adbd5f756 --- /dev/null +++ b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/test/run_test.py @@ -0,0 +1,27 @@ +print("import: 'markdown_it'") +import markdown_it + +print("import: 'markdown_it.cli'") +import markdown_it.cli + +print("import: 'markdown_it.main'") +import markdown_it.main + +print("import: 'markdown_it.presets'") +import markdown_it.presets + +print("import: 'markdown_it.renderer'") +import markdown_it.renderer + +print("import: 'markdown_it.rules_inline'") +import markdown_it.rules_inline + +print("import: 'markdown_it.token'") +import markdown_it.token + +print("import: 'markdown_it.tree'") +import markdown_it.tree + +print("import: 'markdown_it.utils'") +import markdown_it.utils + diff --git a/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/test/run_test.sh b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/test/run_test.sh new file mode 100644 index 0000000000000000000000000000000000000000..43bdb3b2c756179daa82a98a8c92de827b4d664b --- /dev/null +++ b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/test/run_test.sh @@ -0,0 +1,11 @@ + + +set -ex + + + +pip check +python -c "from importlib.metadata import version; assert(version('markdown-it-py')=='4.0.0')" +pytest -k "not(test_commonmark_extras or test_table_tokens or test_file or test_use_existing_env or test_store_labels or test_inline_definitions or test_pretty or test_pretty_text_special)" -v gh/tests +markdown-it --help +exit 0 diff --git a/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/test/test_time_dependencies.json b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/test/test_time_dependencies.json new file mode 100644 index 0000000000000000000000000000000000000000..0d451afa748ed6e299ad74561a1c8c2b80a65fdc --- /dev/null +++ b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/info/test/test_time_dependencies.json @@ -0,0 +1 @@ +["linkify-it-py", "pytest", "pip"] \ No newline at end of file diff --git a/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/__init__.py b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..9fac279576ebf16e43323f8807db3e6a1e2c79b2 --- /dev/null +++ b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/__init__.py @@ -0,0 +1,6 @@ +"""A Python port of Markdown-It""" + +__all__ = ("MarkdownIt",) +__version__ = "4.0.0" + +from .main import MarkdownIt diff --git a/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/_compat.py b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/_compat.py new file mode 100644 index 0000000000000000000000000000000000000000..9d48db4f9f85e1752cf424c49ee18a6907c3f160 --- /dev/null +++ b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/_compat.py @@ -0,0 +1 @@ +from __future__ import annotations diff --git a/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/_punycode.py b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/_punycode.py new file mode 100644 index 0000000000000000000000000000000000000000..312048bf79c33be8fe58f87453845b2b39614efd --- /dev/null +++ b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/_punycode.py @@ -0,0 +1,67 @@ +# Copyright 2014 Mathias Bynens +# Copyright 2021 Taneli Hukkinen +# +# Permission is hereby granted, free of charge, to any person obtaining +# a copy of this software and associated documentation files (the +# "Software"), to deal in the Software without restriction, including +# without limitation the rights to use, copy, modify, merge, publish, +# distribute, sublicense, and/or sell copies of the Software, and to +# permit persons to whom the Software is furnished to do so, subject to +# the following conditions: +# +# The above copyright notice and this permission notice shall be +# included in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +import codecs +from collections.abc import Callable +import re + +REGEX_SEPARATORS = re.compile(r"[\x2E\u3002\uFF0E\uFF61]") +REGEX_NON_ASCII = re.compile(r"[^\0-\x7E]") + + +def encode(uni: str) -> str: + return codecs.encode(uni, encoding="punycode").decode() + + +def decode(ascii: str) -> str: + return codecs.decode(ascii, encoding="punycode") # type: ignore + + +def map_domain(string: str, fn: Callable[[str], str]) -> str: + parts = string.split("@") + result = "" + if len(parts) > 1: + # In email addresses, only the domain name should be punycoded. Leave + # the local part (i.e. everything up to `@`) intact. + result = parts[0] + "@" + string = parts[1] + labels = REGEX_SEPARATORS.split(string) + encoded = ".".join(fn(label) for label in labels) + return result + encoded + + +def to_unicode(obj: str) -> str: + def mapping(obj: str) -> str: + if obj.startswith("xn--"): + return decode(obj[4:].lower()) + return obj + + return map_domain(obj, mapping) + + +def to_ascii(obj: str) -> str: + def mapping(obj: str) -> str: + if REGEX_NON_ASCII.search(obj): + return "xn--" + encode(obj) + return obj + + return map_domain(obj, mapping) diff --git a/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/cli/__init__.py b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/cli/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/cli/parse.py b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/cli/parse.py new file mode 100644 index 0000000000000000000000000000000000000000..fe346b2f51b055b62966c081139f9706e3295363 --- /dev/null +++ b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/cli/parse.py @@ -0,0 +1,110 @@ +#!/usr/bin/env python +""" +CLI interface to markdown-it-py + +Parse one or more markdown files, convert each to HTML, and print to stdout. +""" + +from __future__ import annotations + +import argparse +from collections.abc import Iterable, Sequence +import sys + +from markdown_it import __version__ +from markdown_it.main import MarkdownIt + +version_str = f"markdown-it-py [version {__version__}]" + + +def main(args: Sequence[str] | None = None) -> int: + namespace = parse_args(args) + if namespace.filenames: + convert(namespace.filenames) + else: + interactive() + return 0 + + +def convert(filenames: Iterable[str]) -> None: + for filename in filenames: + convert_file(filename) + + +def convert_file(filename: str) -> None: + """ + Parse a Markdown file and dump the output to stdout. + """ + try: + with open(filename, encoding="utf8", errors="ignore") as fin: + rendered = MarkdownIt().render(fin.read()) + print(rendered, end="") + except OSError: + sys.stderr.write(f'Cannot open file "{filename}".\n') + sys.exit(1) + + +def interactive() -> None: + """ + Parse user input, dump to stdout, rinse and repeat. + Python REPL style. + """ + print_heading() + contents = [] + more = False + while True: + try: + prompt, more = ("... ", True) if more else (">>> ", True) + contents.append(input(prompt) + "\n") + except EOFError: + print("\n" + MarkdownIt().render("\n".join(contents)), end="") + more = False + contents = [] + except KeyboardInterrupt: + print("\nExiting.") + break + + +def parse_args(args: Sequence[str] | None) -> argparse.Namespace: + """Parse input CLI arguments.""" + parser = argparse.ArgumentParser( + description="Parse one or more markdown files, " + "convert each to HTML, and print to stdout", + # NOTE: Remember to update README.md w/ the output of `markdown-it -h` + epilog=( + f""" +Interactive: + + $ markdown-it + markdown-it-py [version {__version__}] (interactive) + Type Ctrl-D to complete input, or Ctrl-C to exit. + >>> # Example + ... > markdown *input* + ... +

Example

+
+

markdown input

+
+ +Batch: + + $ markdown-it README.md README.footer.md > index.html +""" + ), + formatter_class=argparse.RawDescriptionHelpFormatter, + ) + parser.add_argument("-v", "--version", action="version", version=version_str) + parser.add_argument( + "filenames", nargs="*", help="specify an optional list of files to convert" + ) + return parser.parse_args(args) + + +def print_heading() -> None: + print(f"{version_str} (interactive)") + print("Type Ctrl-D to complete input, or Ctrl-C to exit.") + + +if __name__ == "__main__": + exit_code = main(sys.argv[1:]) + sys.exit(exit_code) diff --git a/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/common/__init__.py b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/common/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/common/entities.py b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/common/entities.py new file mode 100644 index 0000000000000000000000000000000000000000..14d08ec9546995f8eea3e9b83ea896f29ef020cb --- /dev/null +++ b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/common/entities.py @@ -0,0 +1,5 @@ +"""HTML5 entities map: { name -> characters }.""" + +import html.entities + +entities = {name.rstrip(";"): chars for name, chars in html.entities.html5.items()} diff --git a/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/common/html_blocks.py b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/common/html_blocks.py new file mode 100644 index 0000000000000000000000000000000000000000..8a3b0b7d5ab7bc174a3c96cbc8976816278a6c21 --- /dev/null +++ b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/common/html_blocks.py @@ -0,0 +1,69 @@ +"""List of valid html blocks names, according to commonmark spec +http://jgm.github.io/CommonMark/spec.html#html-blocks +""" + +# see https://spec.commonmark.org/0.31.2/#html-blocks +block_names = [ + "address", + "article", + "aside", + "base", + "basefont", + "blockquote", + "body", + "caption", + "center", + "col", + "colgroup", + "dd", + "details", + "dialog", + "dir", + "div", + "dl", + "dt", + "fieldset", + "figcaption", + "figure", + "footer", + "form", + "frame", + "frameset", + "h1", + "h2", + "h3", + "h4", + "h5", + "h6", + "head", + "header", + "hr", + "html", + "iframe", + "legend", + "li", + "link", + "main", + "menu", + "menuitem", + "nav", + "noframes", + "ol", + "optgroup", + "option", + "p", + "param", + "search", + "section", + "summary", + "table", + "tbody", + "td", + "tfoot", + "th", + "thead", + "title", + "tr", + "track", + "ul", +] diff --git a/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/common/html_re.py b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/common/html_re.py new file mode 100644 index 0000000000000000000000000000000000000000..ab822c5fc487c5a494966604a1e89b57a06e0564 --- /dev/null +++ b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/common/html_re.py @@ -0,0 +1,39 @@ +"""Regexps to match html elements""" + +import re + +attr_name = "[a-zA-Z_:][a-zA-Z0-9:._-]*" + +unquoted = "[^\"'=<>`\\x00-\\x20]+" +single_quoted = "'[^']*'" +double_quoted = '"[^"]*"' + +attr_value = "(?:" + unquoted + "|" + single_quoted + "|" + double_quoted + ")" + +attribute = "(?:\\s+" + attr_name + "(?:\\s*=\\s*" + attr_value + ")?)" + +open_tag = "<[A-Za-z][A-Za-z0-9\\-]*" + attribute + "*\\s*\\/?>" + +close_tag = "<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>" +comment = "" +processing = "<[?][\\s\\S]*?[?]>" +declaration = "]*>" +cdata = "" + +HTML_TAG_RE = re.compile( + "^(?:" + + open_tag + + "|" + + close_tag + + "|" + + comment + + "|" + + processing + + "|" + + declaration + + "|" + + cdata + + ")" +) +HTML_OPEN_CLOSE_TAG_STR = "^(?:" + open_tag + "|" + close_tag + ")" +HTML_OPEN_CLOSE_TAG_RE = re.compile(HTML_OPEN_CLOSE_TAG_STR) diff --git a/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/common/normalize_url.py b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/common/normalize_url.py new file mode 100644 index 0000000000000000000000000000000000000000..92720b31621b0f6b4ac853179d886cb58e4e2f36 --- /dev/null +++ b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/common/normalize_url.py @@ -0,0 +1,81 @@ +from __future__ import annotations + +from collections.abc import Callable +from contextlib import suppress +import re +from urllib.parse import quote, unquote, urlparse, urlunparse # noqa: F401 + +import mdurl + +from .. import _punycode + +RECODE_HOSTNAME_FOR = ("http:", "https:", "mailto:") + + +def normalizeLink(url: str) -> str: + """Normalize destination URLs in links + + :: + + [label]: destination 'title' + ^^^^^^^^^^^ + """ + parsed = mdurl.parse(url, slashes_denote_host=True) + + # Encode hostnames in urls like: + # `http://host/`, `https://host/`, `mailto:user@host`, `//host/` + # + # We don't encode unknown schemas, because it's likely that we encode + # something we shouldn't (e.g. `skype:name` treated as `skype:host`) + # + if parsed.hostname and ( + not parsed.protocol or parsed.protocol in RECODE_HOSTNAME_FOR + ): + with suppress(Exception): + parsed = parsed._replace(hostname=_punycode.to_ascii(parsed.hostname)) + + return mdurl.encode(mdurl.format(parsed)) + + +def normalizeLinkText(url: str) -> str: + """Normalize autolink content + + :: + + + ~~~~~~~~~~~ + """ + parsed = mdurl.parse(url, slashes_denote_host=True) + + # Encode hostnames in urls like: + # `http://host/`, `https://host/`, `mailto:user@host`, `//host/` + # + # We don't encode unknown schemas, because it's likely that we encode + # something we shouldn't (e.g. `skype:name` treated as `skype:host`) + # + if parsed.hostname and ( + not parsed.protocol or parsed.protocol in RECODE_HOSTNAME_FOR + ): + with suppress(Exception): + parsed = parsed._replace(hostname=_punycode.to_unicode(parsed.hostname)) + + # add '%' to exclude list because of https://github.com/markdown-it/markdown-it/issues/720 + return mdurl.decode(mdurl.format(parsed), mdurl.DECODE_DEFAULT_CHARS + "%") + + +BAD_PROTO_RE = re.compile(r"^(vbscript|javascript|file|data):") +GOOD_DATA_RE = re.compile(r"^data:image\/(gif|png|jpeg|webp);") + + +def validateLink(url: str, validator: Callable[[str], bool] | None = None) -> bool: + """Validate URL link is allowed in output. + + This validator can prohibit more than really needed to prevent XSS. + It's a tradeoff to keep code simple and to be secure by default. + + Note: url should be normalized at this point, and existing entities decoded. + """ + if validator is not None: + return validator(url) + url = url.strip().lower() + return bool(GOOD_DATA_RE.search(url)) if BAD_PROTO_RE.search(url) else True diff --git a/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/common/utils.py b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/common/utils.py new file mode 100644 index 0000000000000000000000000000000000000000..11bda644c260b714cf010ed44d2ed345de80314e --- /dev/null +++ b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/common/utils.py @@ -0,0 +1,313 @@ +"""Utilities for parsing source text""" + +from __future__ import annotations + +import re +from re import Match +from typing import TypeVar +import unicodedata + +from .entities import entities + + +def charCodeAt(src: str, pos: int) -> int | None: + """ + Returns the Unicode value of the character at the specified location. + + @param - index The zero-based index of the desired character. + If there is no character at the specified index, NaN is returned. + + This was added for compatibility with python + """ + try: + return ord(src[pos]) + except IndexError: + return None + + +def charStrAt(src: str, pos: int) -> str | None: + """ + Returns the Unicode value of the character at the specified location. + + @param - index The zero-based index of the desired character. + If there is no character at the specified index, NaN is returned. + + This was added for compatibility with python + """ + try: + return src[pos] + except IndexError: + return None + + +_ItemTV = TypeVar("_ItemTV") + + +def arrayReplaceAt( + src: list[_ItemTV], pos: int, newElements: list[_ItemTV] +) -> list[_ItemTV]: + """ + Remove element from array and put another array at those position. + Useful for some operations with tokens + """ + return src[:pos] + newElements + src[pos + 1 :] + + +def isValidEntityCode(c: int) -> bool: + # broken sequence + if c >= 0xD800 and c <= 0xDFFF: + return False + # never used + if c >= 0xFDD0 and c <= 0xFDEF: + return False + if ((c & 0xFFFF) == 0xFFFF) or ((c & 0xFFFF) == 0xFFFE): + return False + # control codes + if c >= 0x00 and c <= 0x08: + return False + if c == 0x0B: + return False + if c >= 0x0E and c <= 0x1F: + return False + if c >= 0x7F and c <= 0x9F: + return False + # out of range + return not (c > 0x10FFFF) + + +def fromCodePoint(c: int) -> str: + """Convert ordinal to unicode. + + Note, in the original Javascript two string characters were required, + for codepoints larger than `0xFFFF`. + But Python 3 can represent any unicode codepoint in one character. + """ + return chr(c) + + +# UNESCAPE_MD_RE = re.compile(r'\\([!"#$%&\'()*+,\-.\/:;<=>?@[\\\]^_`{|}~])') +# ENTITY_RE_g = re.compile(r'&([a-z#][a-z0-9]{1,31})', re.IGNORECASE) +UNESCAPE_ALL_RE = re.compile( + r'\\([!"#$%&\'()*+,\-.\/:;<=>?@[\\\]^_`{|}~])' + "|" + r"&([a-z#][a-z0-9]{1,31});", + re.IGNORECASE, +) +DIGITAL_ENTITY_BASE10_RE = re.compile(r"#([0-9]{1,8})") +DIGITAL_ENTITY_BASE16_RE = re.compile(r"#x([a-f0-9]{1,8})", re.IGNORECASE) + + +def replaceEntityPattern(match: str, name: str) -> str: + """Convert HTML entity patterns, + see https://spec.commonmark.org/0.30/#entity-references + """ + if name in entities: + return entities[name] + + code: None | int = None + if pat := DIGITAL_ENTITY_BASE10_RE.fullmatch(name): + code = int(pat.group(1), 10) + elif pat := DIGITAL_ENTITY_BASE16_RE.fullmatch(name): + code = int(pat.group(1), 16) + + if code is not None and isValidEntityCode(code): + return fromCodePoint(code) + + return match + + +def unescapeAll(string: str) -> str: + def replacer_func(match: Match[str]) -> str: + escaped = match.group(1) + if escaped: + return escaped + entity = match.group(2) + return replaceEntityPattern(match.group(), entity) + + if "\\" not in string and "&" not in string: + return string + return UNESCAPE_ALL_RE.sub(replacer_func, string) + + +ESCAPABLE = r"""\\!"#$%&'()*+,./:;<=>?@\[\]^`{}|_~-""" +ESCAPE_CHAR = re.compile(r"\\([" + ESCAPABLE + r"])") + + +def stripEscape(string: str) -> str: + """Strip escape \\ characters""" + return ESCAPE_CHAR.sub(r"\1", string) + + +def escapeHtml(raw: str) -> str: + """Replace special characters "&", "<", ">" and '"' to HTML-safe sequences.""" + # like html.escape, but without escaping single quotes + raw = raw.replace("&", "&") # Must be done first! + raw = raw.replace("<", "<") + raw = raw.replace(">", ">") + raw = raw.replace('"', """) + return raw + + +# ////////////////////////////////////////////////////////////////////////////// + +REGEXP_ESCAPE_RE = re.compile(r"[.?*+^$[\]\\(){}|-]") + + +def escapeRE(string: str) -> str: + string = REGEXP_ESCAPE_RE.sub("\\$&", string) + return string + + +# ////////////////////////////////////////////////////////////////////////////// + + +def isSpace(code: int | None) -> bool: + """Check if character code is a whitespace.""" + return code in (0x09, 0x20) + + +def isStrSpace(ch: str | None) -> bool: + """Check if character is a whitespace.""" + return ch in ("\t", " ") + + +MD_WHITESPACE = { + 0x09, # \t + 0x0A, # \n + 0x0B, # \v + 0x0C, # \f + 0x0D, # \r + 0x20, # space + 0xA0, + 0x1680, + 0x202F, + 0x205F, + 0x3000, +} + + +def isWhiteSpace(code: int) -> bool: + r"""Zs (unicode class) || [\t\f\v\r\n]""" + if code >= 0x2000 and code <= 0x200A: + return True + return code in MD_WHITESPACE + + +# ////////////////////////////////////////////////////////////////////////////// + + +def isPunctChar(ch: str) -> bool: + """Check if character is a punctuation character.""" + return unicodedata.category(ch).startswith(("P", "S")) + + +MD_ASCII_PUNCT = { + 0x21, # /* ! */ + 0x22, # /* " */ + 0x23, # /* # */ + 0x24, # /* $ */ + 0x25, # /* % */ + 0x26, # /* & */ + 0x27, # /* ' */ + 0x28, # /* ( */ + 0x29, # /* ) */ + 0x2A, # /* * */ + 0x2B, # /* + */ + 0x2C, # /* , */ + 0x2D, # /* - */ + 0x2E, # /* . */ + 0x2F, # /* / */ + 0x3A, # /* : */ + 0x3B, # /* ; */ + 0x3C, # /* < */ + 0x3D, # /* = */ + 0x3E, # /* > */ + 0x3F, # /* ? */ + 0x40, # /* @ */ + 0x5B, # /* [ */ + 0x5C, # /* \ */ + 0x5D, # /* ] */ + 0x5E, # /* ^ */ + 0x5F, # /* _ */ + 0x60, # /* ` */ + 0x7B, # /* { */ + 0x7C, # /* | */ + 0x7D, # /* } */ + 0x7E, # /* ~ */ +} + + +def isMdAsciiPunct(ch: int) -> bool: + """Markdown ASCII punctuation characters. + + :: + + !, ", #, $, %, &, ', (, ), *, +, ,, -, ., /, :, ;, <, =, >, ?, @, [, \\, ], ^, _, `, {, |, }, or ~ + + See http://spec.commonmark.org/0.15/#ascii-punctuation-character + + Don't confuse with unicode punctuation !!! It lacks some chars in ascii range. + + """ + return ch in MD_ASCII_PUNCT + + +def normalizeReference(string: str) -> str: + """Helper to unify [reference labels].""" + # Trim and collapse whitespace + # + string = re.sub(r"\s+", " ", string.strip()) + + # In node v10 'ẞ'.toLowerCase() === 'Ṿ', which is presumed to be a bug + # fixed in v12 (couldn't find any details). + # + # So treat this one as a special case + # (remove this when node v10 is no longer supported). + # + # if ('ẞ'.toLowerCase() === 'Ṿ') { + # str = str.replace(/ẞ/g, 'ß') + # } + + # .toLowerCase().toUpperCase() should get rid of all differences + # between letter variants. + # + # Simple .toLowerCase() doesn't normalize 125 code points correctly, + # and .toUpperCase doesn't normalize 6 of them (list of exceptions: + # İ, ϴ, ẞ, Ω, K, Å - those are already uppercased, but have differently + # uppercased versions). + # + # Here's an example showing how it happens. Lets take greek letter omega: + # uppercase U+0398 (Θ), U+03f4 (ϴ) and lowercase U+03b8 (θ), U+03d1 (ϑ) + # + # Unicode entries: + # 0398;GREEK CAPITAL LETTER THETA;Lu;0;L;;;;;N;;;;03B8 + # 03B8;GREEK SMALL LETTER THETA;Ll;0;L;;;;;N;;;0398;;0398 + # 03D1;GREEK THETA SYMBOL;Ll;0;L; 03B8;;;;N;GREEK SMALL LETTER SCRIPT THETA;;0398;;0398 + # 03F4;GREEK CAPITAL THETA SYMBOL;Lu;0;L; 0398;;;;N;;;;03B8 + # + # Case-insensitive comparison should treat all of them as equivalent. + # + # But .toLowerCase() doesn't change ϑ (it's already lowercase), + # and .toUpperCase() doesn't change ϴ (already uppercase). + # + # Applying first lower then upper case normalizes any character: + # '\u0398\u03f4\u03b8\u03d1'.toLowerCase().toUpperCase() === '\u0398\u0398\u0398\u0398' + # + # Note: this is equivalent to unicode case folding; unicode normalization + # is a different step that is not required here. + # + # Final result should be uppercased, because it's later stored in an object + # (this avoid a conflict with Object.prototype members, + # most notably, `__proto__`) + # + return string.lower().upper() + + +LINK_OPEN_RE = re.compile(r"^\s]", flags=re.IGNORECASE) +LINK_CLOSE_RE = re.compile(r"^", flags=re.IGNORECASE) + + +def isLinkOpen(string: str) -> bool: + return bool(LINK_OPEN_RE.search(string)) + + +def isLinkClose(string: str) -> bool: + return bool(LINK_CLOSE_RE.search(string)) diff --git a/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/helpers/__init__.py b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/helpers/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f4e2cd21b94b9ee9ecb0cac21da619233a5258b9 --- /dev/null +++ b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/helpers/__init__.py @@ -0,0 +1,6 @@ +"""Functions for parsing Links""" + +__all__ = ("parseLinkDestination", "parseLinkLabel", "parseLinkTitle") +from .parse_link_destination import parseLinkDestination +from .parse_link_label import parseLinkLabel +from .parse_link_title import parseLinkTitle diff --git a/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/helpers/parse_link_destination.py b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/helpers/parse_link_destination.py new file mode 100644 index 0000000000000000000000000000000000000000..c98323c056e0103a12849671fbbac58dc76de4b4 --- /dev/null +++ b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/helpers/parse_link_destination.py @@ -0,0 +1,83 @@ +""" +Parse link destination +""" + +from ..common.utils import charCodeAt, unescapeAll + + +class _Result: + __slots__ = ("ok", "pos", "str") + + def __init__(self) -> None: + self.ok = False + self.pos = 0 + self.str = "" + + +def parseLinkDestination(string: str, pos: int, maximum: int) -> _Result: + start = pos + result = _Result() + + if charCodeAt(string, pos) == 0x3C: # /* < */ + pos += 1 + while pos < maximum: + code = charCodeAt(string, pos) + if code == 0x0A: # /* \n */) + return result + if code == 0x3C: # / * < * / + return result + if code == 0x3E: # /* > */) { + result.pos = pos + 1 + result.str = unescapeAll(string[start + 1 : pos]) + result.ok = True + return result + + if code == 0x5C and pos + 1 < maximum: # \ + pos += 2 + continue + + pos += 1 + + # no closing '>' + return result + + # this should be ... } else { ... branch + + level = 0 + while pos < maximum: + code = charCodeAt(string, pos) + + if code is None or code == 0x20: + break + + # ascii control characters + if code < 0x20 or code == 0x7F: + break + + if code == 0x5C and pos + 1 < maximum: + if charCodeAt(string, pos + 1) == 0x20: + break + pos += 2 + continue + + if code == 0x28: # /* ( */) + level += 1 + if level > 32: + return result + + if code == 0x29: # /* ) */) + if level == 0: + break + level -= 1 + + pos += 1 + + if start == pos: + return result + if level != 0: + return result + + result.str = unescapeAll(string[start:pos]) + result.pos = pos + result.ok = True + return result diff --git a/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/helpers/parse_link_label.py b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/helpers/parse_link_label.py new file mode 100644 index 0000000000000000000000000000000000000000..c80da5a7ec54521281dac45b66977404f5384491 --- /dev/null +++ b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/helpers/parse_link_label.py @@ -0,0 +1,44 @@ +""" +Parse link label + +this function assumes that first character ("[") already matches +returns the end of the label + +""" + +from markdown_it.rules_inline import StateInline + + +def parseLinkLabel(state: StateInline, start: int, disableNested: bool = False) -> int: + labelEnd = -1 + oldPos = state.pos + found = False + + state.pos = start + 1 + level = 1 + + while state.pos < state.posMax: + marker = state.src[state.pos] + if marker == "]": + level -= 1 + if level == 0: + found = True + break + + prevPos = state.pos + state.md.inline.skipToken(state) + if marker == "[": + if prevPos == state.pos - 1: + # increase level if we find text `[`, + # which is not a part of any token + level += 1 + elif disableNested: + state.pos = oldPos + return -1 + if found: + labelEnd = state.pos + + # restore old state + state.pos = oldPos + + return labelEnd diff --git a/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/helpers/parse_link_title.py b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/helpers/parse_link_title.py new file mode 100644 index 0000000000000000000000000000000000000000..a38ff0d98ac7feaba80fd67f3c8f0d0454dde47f --- /dev/null +++ b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/helpers/parse_link_title.py @@ -0,0 +1,75 @@ +"""Parse link title""" + +from ..common.utils import charCodeAt, unescapeAll + + +class _State: + __slots__ = ("can_continue", "marker", "ok", "pos", "str") + + def __init__(self) -> None: + self.ok = False + """if `true`, this is a valid link title""" + self.can_continue = False + """if `true`, this link can be continued on the next line""" + self.pos = 0 + """if `ok`, it's the position of the first character after the closing marker""" + self.str = "" + """if `ok`, it's the unescaped title""" + self.marker = 0 + """expected closing marker character code""" + + def __str__(self) -> str: + return self.str + + +def parseLinkTitle( + string: str, start: int, maximum: int, prev_state: _State | None = None +) -> _State: + """Parse link title within `str` in [start, max] range, + or continue previous parsing if `prev_state` is defined (equal to result of last execution). + """ + pos = start + state = _State() + + if prev_state is not None: + # this is a continuation of a previous parseLinkTitle call on the next line, + # used in reference links only + state.str = prev_state.str + state.marker = prev_state.marker + else: + if pos >= maximum: + return state + + marker = charCodeAt(string, pos) + + # /* " */ /* ' */ /* ( */ + if marker != 0x22 and marker != 0x27 and marker != 0x28: + return state + + start += 1 + pos += 1 + + # if opening marker is "(", switch it to closing marker ")" + if marker == 0x28: + marker = 0x29 + + state.marker = marker + + while pos < maximum: + code = charCodeAt(string, pos) + if code == state.marker: + state.pos = pos + 1 + state.str += unescapeAll(string[start:pos]) + state.ok = True + return state + elif code == 0x28 and state.marker == 0x29: # /* ( */ /* ) */ + return state + elif code == 0x5C and pos + 1 < maximum: # /* \ */ + pos += 1 + + pos += 1 + + # no closing marker found, but this link title may continue on the next line (for references) + state.can_continue = True + state.str += unescapeAll(string[start:pos]) + return state diff --git a/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/main.py b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/main.py new file mode 100644 index 0000000000000000000000000000000000000000..bf9fd18f3f33a55d5de2fb61bde806a3377d51a8 --- /dev/null +++ b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/main.py @@ -0,0 +1,350 @@ +from __future__ import annotations + +from collections.abc import Callable, Generator, Iterable, Mapping, MutableMapping +from contextlib import contextmanager +from typing import Any, Literal, overload + +from . import helpers, presets +from .common import normalize_url, utils +from .parser_block import ParserBlock +from .parser_core import ParserCore +from .parser_inline import ParserInline +from .renderer import RendererHTML, RendererProtocol +from .rules_core.state_core import StateCore +from .token import Token +from .utils import EnvType, OptionsDict, OptionsType, PresetType + +try: + import linkify_it +except ModuleNotFoundError: + linkify_it = None + + +_PRESETS: dict[str, PresetType] = { + "default": presets.default.make(), + "js-default": presets.js_default.make(), + "zero": presets.zero.make(), + "commonmark": presets.commonmark.make(), + "gfm-like": presets.gfm_like.make(), +} + + +class MarkdownIt: + def __init__( + self, + config: str | PresetType = "commonmark", + options_update: Mapping[str, Any] | None = None, + *, + renderer_cls: Callable[[MarkdownIt], RendererProtocol] = RendererHTML, + ): + """Main parser class + + :param config: name of configuration to load or a pre-defined dictionary + :param options_update: dictionary that will be merged into ``config["options"]`` + :param renderer_cls: the class to load as the renderer: + ``self.renderer = renderer_cls(self) + """ + # add modules + self.utils = utils + self.helpers = helpers + + # initialise classes + self.inline = ParserInline() + self.block = ParserBlock() + self.core = ParserCore() + self.renderer = renderer_cls(self) + self.linkify = linkify_it.LinkifyIt() if linkify_it else None + + # set the configuration + if options_update and not isinstance(options_update, Mapping): + # catch signature change where renderer_cls was not used as a key-word + raise TypeError( + f"options_update should be a mapping: {options_update}" + "\n(Perhaps you intended this to be the renderer_cls?)" + ) + self.configure(config, options_update=options_update) + + def __repr__(self) -> str: + return f"{self.__class__.__module__}.{self.__class__.__name__}()" + + @overload + def __getitem__(self, name: Literal["inline"]) -> ParserInline: ... + + @overload + def __getitem__(self, name: Literal["block"]) -> ParserBlock: ... + + @overload + def __getitem__(self, name: Literal["core"]) -> ParserCore: ... + + @overload + def __getitem__(self, name: Literal["renderer"]) -> RendererProtocol: ... + + @overload + def __getitem__(self, name: str) -> Any: ... + + def __getitem__(self, name: str) -> Any: + return { + "inline": self.inline, + "block": self.block, + "core": self.core, + "renderer": self.renderer, + }[name] + + def set(self, options: OptionsType) -> None: + """Set parser options (in the same format as in constructor). + Probably, you will never need it, but you can change options after constructor call. + + __Note:__ To achieve the best possible performance, don't modify a + `markdown-it` instance options on the fly. If you need multiple configurations + it's best to create multiple instances and initialize each with separate config. + """ + self.options = OptionsDict(options) + + def configure( + self, presets: str | PresetType, options_update: Mapping[str, Any] | None = None + ) -> MarkdownIt: + """Batch load of all options and component settings. + This is an internal method, and you probably will not need it. + But if you will - see available presets and data structure + [here](https://github.com/markdown-it/markdown-it/tree/master/lib/presets) + + We strongly recommend to use presets instead of direct config loads. + That will give better compatibility with next versions. + """ + if isinstance(presets, str): + if presets not in _PRESETS: + raise KeyError(f"Wrong `markdown-it` preset '{presets}', check name") + config = _PRESETS[presets] + else: + config = presets + + if not config: + raise ValueError("Wrong `markdown-it` config, can't be empty") + + options = config.get("options", {}) or {} + if options_update: + options = {**options, **options_update} # type: ignore + + self.set(options) # type: ignore + + if "components" in config: + for name, component in config["components"].items(): + rules = component.get("rules", None) + if rules: + self[name].ruler.enableOnly(rules) + rules2 = component.get("rules2", None) + if rules2: + self[name].ruler2.enableOnly(rules2) + + return self + + def get_all_rules(self) -> dict[str, list[str]]: + """Return the names of all active rules.""" + rules = { + chain: self[chain].ruler.get_all_rules() + for chain in ["core", "block", "inline"] + } + rules["inline2"] = self.inline.ruler2.get_all_rules() + return rules + + def get_active_rules(self) -> dict[str, list[str]]: + """Return the names of all active rules.""" + rules = { + chain: self[chain].ruler.get_active_rules() + for chain in ["core", "block", "inline"] + } + rules["inline2"] = self.inline.ruler2.get_active_rules() + return rules + + def enable( + self, names: str | Iterable[str], ignoreInvalid: bool = False + ) -> MarkdownIt: + """Enable list or rules. (chainable) + + :param names: rule name or list of rule names to enable. + :param ignoreInvalid: set `true` to ignore errors when rule not found. + + It will automatically find appropriate components, + containing rules with given names. If rule not found, and `ignoreInvalid` + not set - throws exception. + + Example:: + + md = MarkdownIt().enable(['sub', 'sup']).disable('smartquotes') + + """ + result = [] + + if isinstance(names, str): + names = [names] + + for chain in ["core", "block", "inline"]: + result.extend(self[chain].ruler.enable(names, True)) + result.extend(self.inline.ruler2.enable(names, True)) + + missed = [name for name in names if name not in result] + if missed and not ignoreInvalid: + raise ValueError(f"MarkdownIt. Failed to enable unknown rule(s): {missed}") + + return self + + def disable( + self, names: str | Iterable[str], ignoreInvalid: bool = False + ) -> MarkdownIt: + """The same as [[MarkdownIt.enable]], but turn specified rules off. (chainable) + + :param names: rule name or list of rule names to disable. + :param ignoreInvalid: set `true` to ignore errors when rule not found. + + """ + result = [] + + if isinstance(names, str): + names = [names] + + for chain in ["core", "block", "inline"]: + result.extend(self[chain].ruler.disable(names, True)) + result.extend(self.inline.ruler2.disable(names, True)) + + missed = [name for name in names if name not in result] + if missed and not ignoreInvalid: + raise ValueError(f"MarkdownIt. Failed to disable unknown rule(s): {missed}") + return self + + @contextmanager + def reset_rules(self) -> Generator[None, None, None]: + """A context manager, that will reset the current enabled rules on exit.""" + chain_rules = self.get_active_rules() + yield + for chain, rules in chain_rules.items(): + if chain != "inline2": + self[chain].ruler.enableOnly(rules) + self.inline.ruler2.enableOnly(chain_rules["inline2"]) + + def add_render_rule( + self, name: str, function: Callable[..., Any], fmt: str = "html" + ) -> None: + """Add a rule for rendering a particular Token type. + + Only applied when ``renderer.__output__ == fmt`` + """ + if self.renderer.__output__ == fmt: + self.renderer.rules[name] = function.__get__(self.renderer) # type: ignore + + def use( + self, plugin: Callable[..., None], *params: Any, **options: Any + ) -> MarkdownIt: + """Load specified plugin with given params into current parser instance. (chainable) + + It's just a sugar to call `plugin(md, params)` with curring. + + Example:: + + def func(tokens, idx): + tokens[idx].content = tokens[idx].content.replace('foo', 'bar') + md = MarkdownIt().use(plugin, 'foo_replace', 'text', func) + + """ + plugin(self, *params, **options) + return self + + def parse(self, src: str, env: EnvType | None = None) -> list[Token]: + """Parse the source string to a token stream + + :param src: source string + :param env: environment sandbox + + Parse input string and return list of block tokens (special token type + "inline" will contain list of inline tokens). + + `env` is used to pass data between "distributed" rules and return additional + metadata like reference info, needed for the renderer. It also can be used to + inject data in specific cases. Usually, you will be ok to pass `{}`, + and then pass updated object to renderer. + """ + env = {} if env is None else env + if not isinstance(env, MutableMapping): + raise TypeError(f"Input data should be a MutableMapping, not {type(env)}") + if not isinstance(src, str): + raise TypeError(f"Input data should be a string, not {type(src)}") + state = StateCore(src, self, env) + self.core.process(state) + return state.tokens + + def render(self, src: str, env: EnvType | None = None) -> Any: + """Render markdown string into html. It does all magic for you :). + + :param src: source string + :param env: environment sandbox + :returns: The output of the loaded renderer + + `env` can be used to inject additional metadata (`{}` by default). + But you will not need it with high probability. See also comment + in [[MarkdownIt.parse]]. + """ + env = {} if env is None else env + return self.renderer.render(self.parse(src, env), self.options, env) + + def parseInline(self, src: str, env: EnvType | None = None) -> list[Token]: + """The same as [[MarkdownIt.parse]] but skip all block rules. + + :param src: source string + :param env: environment sandbox + + It returns the + block tokens list with the single `inline` element, containing parsed inline + tokens in `children` property. Also updates `env` object. + """ + env = {} if env is None else env + if not isinstance(env, MutableMapping): + raise TypeError(f"Input data should be an MutableMapping, not {type(env)}") + if not isinstance(src, str): + raise TypeError(f"Input data should be a string, not {type(src)}") + state = StateCore(src, self, env) + state.inlineMode = True + self.core.process(state) + return state.tokens + + def renderInline(self, src: str, env: EnvType | None = None) -> Any: + """Similar to [[MarkdownIt.render]] but for single paragraph content. + + :param src: source string + :param env: environment sandbox + + Similar to [[MarkdownIt.render]] but for single paragraph content. Result + will NOT be wrapped into `

` tags. + """ + env = {} if env is None else env + return self.renderer.render(self.parseInline(src, env), self.options, env) + + # link methods + + def validateLink(self, url: str) -> bool: + """Validate if the URL link is allowed in output. + + This validator can prohibit more than really needed to prevent XSS. + It's a tradeoff to keep code simple and to be secure by default. + + Note: the url should be normalized at this point, and existing entities decoded. + """ + return normalize_url.validateLink(url) + + def normalizeLink(self, url: str) -> str: + """Normalize destination URLs in links + + :: + + [label]: destination 'title' + ^^^^^^^^^^^ + """ + return normalize_url.normalizeLink(url) + + def normalizeLinkText(self, link: str) -> str: + """Normalize autolink content + + :: + + + ~~~~~~~~~~~ + """ + return normalize_url.normalizeLinkText(link) diff --git a/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/parser_block.py b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/parser_block.py new file mode 100644 index 0000000000000000000000000000000000000000..50a7184cf4746fc86a4e8032efd0604bf819021c --- /dev/null +++ b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/parser_block.py @@ -0,0 +1,113 @@ +"""Block-level tokenizer.""" + +from __future__ import annotations + +from collections.abc import Callable +import logging +from typing import TYPE_CHECKING + +from . import rules_block +from .ruler import Ruler +from .rules_block.state_block import StateBlock +from .token import Token +from .utils import EnvType + +if TYPE_CHECKING: + from markdown_it import MarkdownIt + +LOGGER = logging.getLogger(__name__) + + +RuleFuncBlockType = Callable[[StateBlock, int, int, bool], bool] +"""(state: StateBlock, startLine: int, endLine: int, silent: bool) -> matched: bool) + +`silent` disables token generation, useful for lookahead. +""" + +_rules: list[tuple[str, RuleFuncBlockType, list[str]]] = [ + # First 2 params - rule name & source. Secondary array - list of rules, + # which can be terminated by this one. + ("table", rules_block.table, ["paragraph", "reference"]), + ("code", rules_block.code, []), + ("fence", rules_block.fence, ["paragraph", "reference", "blockquote", "list"]), + ( + "blockquote", + rules_block.blockquote, + ["paragraph", "reference", "blockquote", "list"], + ), + ("hr", rules_block.hr, ["paragraph", "reference", "blockquote", "list"]), + ("list", rules_block.list_block, ["paragraph", "reference", "blockquote"]), + ("reference", rules_block.reference, []), + ("html_block", rules_block.html_block, ["paragraph", "reference", "blockquote"]), + ("heading", rules_block.heading, ["paragraph", "reference", "blockquote"]), + ("lheading", rules_block.lheading, []), + ("paragraph", rules_block.paragraph, []), +] + + +class ParserBlock: + """ + ParserBlock#ruler -> Ruler + + [[Ruler]] instance. Keep configuration of block rules. + """ + + def __init__(self) -> None: + self.ruler = Ruler[RuleFuncBlockType]() + for name, rule, alt in _rules: + self.ruler.push(name, rule, {"alt": alt}) + + def tokenize(self, state: StateBlock, startLine: int, endLine: int) -> None: + """Generate tokens for input range.""" + rules = self.ruler.getRules("") + line = startLine + maxNesting = state.md.options.maxNesting + hasEmptyLines = False + + while line < endLine: + state.line = line = state.skipEmptyLines(line) + if line >= endLine: + break + if state.sCount[line] < state.blkIndent: + # Termination condition for nested calls. + # Nested calls currently used for blockquotes & lists + break + if state.level >= maxNesting: + # If nesting level exceeded - skip tail to the end. + # That's not ordinary situation and we should not care about content. + state.line = endLine + break + + # Try all possible rules. + # On success, rule should: + # - update `state.line` + # - update `state.tokens` + # - return True + for rule in rules: + if rule(state, line, endLine, False): + break + + # set state.tight if we had an empty line before current tag + # i.e. latest empty line should not count + state.tight = not hasEmptyLines + + line = state.line + + # paragraph might "eat" one newline after it in nested lists + if (line - 1) < endLine and state.isEmpty(line - 1): + hasEmptyLines = True + + if line < endLine and state.isEmpty(line): + hasEmptyLines = True + line += 1 + state.line = line + + def parse( + self, src: str, md: MarkdownIt, env: EnvType, outTokens: list[Token] + ) -> list[Token] | None: + """Process input string and push block tokens into `outTokens`.""" + if not src: + return None + state = StateBlock(src, md, env, outTokens) + self.tokenize(state, state.line, state.lineMax) + return state.tokens diff --git a/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/parser_core.py b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/parser_core.py new file mode 100644 index 0000000000000000000000000000000000000000..8f5b921cbd3bed2c85734b44ccd989a0fd0e6788 --- /dev/null +++ b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/parser_core.py @@ -0,0 +1,46 @@ +""" +* class Core +* +* Top-level rules executor. Glues block/inline parsers and does intermediate +* transformations. +""" + +from __future__ import annotations + +from collections.abc import Callable + +from .ruler import Ruler +from .rules_core import ( + block, + inline, + linkify, + normalize, + replace, + smartquotes, + text_join, +) +from .rules_core.state_core import StateCore + +RuleFuncCoreType = Callable[[StateCore], None] + +_rules: list[tuple[str, RuleFuncCoreType]] = [ + ("normalize", normalize), + ("block", block), + ("inline", inline), + ("linkify", linkify), + ("replacements", replace), + ("smartquotes", smartquotes), + ("text_join", text_join), +] + + +class ParserCore: + def __init__(self) -> None: + self.ruler = Ruler[RuleFuncCoreType]() + for name, rule in _rules: + self.ruler.push(name, rule) + + def process(self, state: StateCore) -> None: + """Executes core chain rules.""" + for rule in self.ruler.getRules(""): + rule(state) diff --git a/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/parser_inline.py b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/parser_inline.py new file mode 100644 index 0000000000000000000000000000000000000000..26ec2e636d458fc7a431ddacc8a49c4763613643 --- /dev/null +++ b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/parser_inline.py @@ -0,0 +1,148 @@ +"""Tokenizes paragraph content.""" + +from __future__ import annotations + +from collections.abc import Callable +from typing import TYPE_CHECKING + +from . import rules_inline +from .ruler import Ruler +from .rules_inline.state_inline import StateInline +from .token import Token +from .utils import EnvType + +if TYPE_CHECKING: + from markdown_it import MarkdownIt + + +# Parser rules +RuleFuncInlineType = Callable[[StateInline, bool], bool] +"""(state: StateInline, silent: bool) -> matched: bool) + +`silent` disables token generation, useful for lookahead. +""" +_rules: list[tuple[str, RuleFuncInlineType]] = [ + ("text", rules_inline.text), + ("linkify", rules_inline.linkify), + ("newline", rules_inline.newline), + ("escape", rules_inline.escape), + ("backticks", rules_inline.backtick), + ("strikethrough", rules_inline.strikethrough.tokenize), + ("emphasis", rules_inline.emphasis.tokenize), + ("link", rules_inline.link), + ("image", rules_inline.image), + ("autolink", rules_inline.autolink), + ("html_inline", rules_inline.html_inline), + ("entity", rules_inline.entity), +] + +# Note `rule2` ruleset was created specifically for emphasis/strikethrough +# post-processing and may be changed in the future. +# +# Don't use this for anything except pairs (plugins working with `balance_pairs`). +# +RuleFuncInline2Type = Callable[[StateInline], None] +_rules2: list[tuple[str, RuleFuncInline2Type]] = [ + ("balance_pairs", rules_inline.link_pairs), + ("strikethrough", rules_inline.strikethrough.postProcess), + ("emphasis", rules_inline.emphasis.postProcess), + # rules for pairs separate '**' into its own text tokens, which may be left unused, + # rule below merges unused segments back with the rest of the text + ("fragments_join", rules_inline.fragments_join), +] + + +class ParserInline: + def __init__(self) -> None: + self.ruler = Ruler[RuleFuncInlineType]() + for name, rule in _rules: + self.ruler.push(name, rule) + # Second ruler used for post-processing (e.g. in emphasis-like rules) + self.ruler2 = Ruler[RuleFuncInline2Type]() + for name, rule2 in _rules2: + self.ruler2.push(name, rule2) + + def skipToken(self, state: StateInline) -> None: + """Skip single token by running all rules in validation mode; + returns `True` if any rule reported success + """ + ok = False + pos = state.pos + rules = self.ruler.getRules("") + maxNesting = state.md.options["maxNesting"] + cache = state.cache + + if pos in cache: + state.pos = cache[pos] + return + + if state.level < maxNesting: + for rule in rules: + # Increment state.level and decrement it later to limit recursion. + # It's harmless to do here, because no tokens are created. + # But ideally, we'd need a separate private state variable for this purpose. + state.level += 1 + ok = rule(state, True) + state.level -= 1 + if ok: + break + else: + # Too much nesting, just skip until the end of the paragraph. + # + # NOTE: this will cause links to behave incorrectly in the following case, + # when an amount of `[` is exactly equal to `maxNesting + 1`: + # + # [[[[[[[[[[[[[[[[[[[[[foo]() + # + # TODO: remove this workaround when CM standard will allow nested links + # (we can replace it by preventing links from being parsed in + # validation mode) + # + state.pos = state.posMax + + if not ok: + state.pos += 1 + cache[pos] = state.pos + + def tokenize(self, state: StateInline) -> None: + """Generate tokens for input range.""" + ok = False + rules = self.ruler.getRules("") + end = state.posMax + maxNesting = state.md.options["maxNesting"] + + while state.pos < end: + # Try all possible rules. + # On success, rule should: + # + # - update `state.pos` + # - update `state.tokens` + # - return true + + if state.level < maxNesting: + for rule in rules: + ok = rule(state, False) + if ok: + break + + if ok: + if state.pos >= end: + break + continue + + state.pending += state.src[state.pos] + state.pos += 1 + + if state.pending: + state.pushPending() + + def parse( + self, src: str, md: MarkdownIt, env: EnvType, tokens: list[Token] + ) -> list[Token]: + """Process input string and push inline tokens into `tokens`""" + state = StateInline(src, md, env, tokens) + self.tokenize(state) + rules2 = self.ruler2.getRules("") + for rule in rules2: + rule(state) + return state.tokens diff --git a/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/port.yaml b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/port.yaml new file mode 100644 index 0000000000000000000000000000000000000000..ce2dde95faa6224dfe63ae1673b6c7363a5b3efb --- /dev/null +++ b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/port.yaml @@ -0,0 +1,48 @@ +- package: markdown-it/markdown-it + version: 14.1.0 + commit: 0fe7ccb4b7f30236fb05f623be6924961d296d3d + date: Mar 19, 2024 + notes: + - Rename variables that use python built-in names, e.g. + - `max` -> `maximum` + - `len` -> `length` + - `str` -> `string` + - | + Convert JS `for` loops to `while` loops + this is generally the main difference between the codes, + because in python you can't do e.g. `for {i=1;i PresetType: + config = commonmark.make() + config["components"]["core"]["rules"].append("linkify") + config["components"]["block"]["rules"].append("table") + config["components"]["inline"]["rules"].extend(["strikethrough", "linkify"]) + config["components"]["inline"]["rules2"].append("strikethrough") + config["options"]["linkify"] = True + config["options"]["html"] = True + return config diff --git a/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/presets/commonmark.py b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/presets/commonmark.py new file mode 100644 index 0000000000000000000000000000000000000000..ed0de0fe4dfbad9e3ab82477433805ea0b6650c6 --- /dev/null +++ b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/presets/commonmark.py @@ -0,0 +1,75 @@ +"""Commonmark default options. + +This differs to presets.default, +primarily in that it allows HTML and does not enable components: + +- block: table +- inline: strikethrough +""" + +from ..utils import PresetType + + +def make() -> PresetType: + return { + "options": { + "maxNesting": 20, # Internal protection, recursion limit + "html": True, # Enable HTML tags in source, + # this is just a shorthand for .enable(["html_inline", "html_block"]) + # used by the linkify rule: + "linkify": False, # autoconvert URL-like texts to links + # used by the replacements and smartquotes rules + # Enable some language-neutral replacements + quotes beautification + "typographer": False, + # used by the smartquotes rule: + # Double + single quotes replacement pairs, when typographer enabled, + # and smartquotes on. Could be either a String or an Array. + # + # For example, you can use '«»„“' for Russian, '„“‚‘' for German, + # and ['«\xA0', '\xA0»', '‹\xA0', '\xA0›'] for French (including nbsp). + "quotes": "\u201c\u201d\u2018\u2019", # /* “”‘’ */ + # Renderer specific; these options are used directly in the HTML renderer + "xhtmlOut": True, # Use '/' to close single tags (
) + "breaks": False, # Convert '\n' in paragraphs into
+ "langPrefix": "language-", # CSS language prefix for fenced blocks + # Highlighter function. Should return escaped HTML, + # or '' if the source string is not changed and should be escaped externally. + # If result starts with PresetType: + return { + "options": { + "maxNesting": 100, # Internal protection, recursion limit + "html": False, # Enable HTML tags in source + # this is just a shorthand for .disable(["html_inline", "html_block"]) + # used by the linkify rule: + "linkify": False, # autoconvert URL-like texts to links + # used by the replacements and smartquotes rules: + # Enable some language-neutral replacements + quotes beautification + "typographer": False, + # used by the smartquotes rule: + # Double + single quotes replacement pairs, when typographer enabled, + # and smartquotes on. Could be either a String or an Array. + # For example, you can use '«»„“' for Russian, '„“‚‘' for German, + # and ['«\xA0', '\xA0»', '‹\xA0', '\xA0›'] for French (including nbsp). + "quotes": "\u201c\u201d\u2018\u2019", # /* “”‘’ */ + # Renderer specific; these options are used directly in the HTML renderer + "xhtmlOut": False, # Use '/' to close single tags (
) + "breaks": False, # Convert '\n' in paragraphs into
+ "langPrefix": "language-", # CSS language prefix for fenced blocks + # Highlighter function. Should return escaped HTML, + # or '' if the source string is not changed and should be escaped externally. + # If result starts with PresetType: + return { + "options": { + "maxNesting": 20, # Internal protection, recursion limit + "html": False, # Enable HTML tags in source + # this is just a shorthand for .disable(["html_inline", "html_block"]) + # used by the linkify rule: + "linkify": False, # autoconvert URL-like texts to links + # used by the replacements and smartquotes rules: + # Enable some language-neutral replacements + quotes beautification + "typographer": False, + # used by the smartquotes rule: + # Double + single quotes replacement pairs, when typographer enabled, + # and smartquotes on. Could be either a String or an Array. + # For example, you can use '«»„“' for Russian, '„“‚‘' for German, + # and ['«\xA0', '\xA0»', '‹\xA0', '\xA0›'] for French (including nbsp). + "quotes": "\u201c\u201d\u2018\u2019", # /* “”‘’ */ + # Renderer specific; these options are used directly in the HTML renderer + "xhtmlOut": False, # Use '/' to close single tags (
) + "breaks": False, # Convert '\n' in paragraphs into
+ "langPrefix": "language-", # CSS language prefix for fenced blocks + # Highlighter function. Should return escaped HTML, + # or '' if the source string is not changed and should be escaped externally. + # If result starts with Any: ... + + +class RendererHTML(RendererProtocol): + """Contains render rules for tokens. Can be updated and extended. + + Example: + + Each rule is called as independent static function with fixed signature: + + :: + + class Renderer: + def token_type_name(self, tokens, idx, options, env) { + # ... + return renderedHTML + + :: + + class CustomRenderer(RendererHTML): + def strong_open(self, tokens, idx, options, env): + return '' + def strong_close(self, tokens, idx, options, env): + return '' + + md = MarkdownIt(renderer_cls=CustomRenderer) + + result = md.render(...) + + See https://github.com/markdown-it/markdown-it/blob/master/lib/renderer.js + for more details and examples. + """ + + __output__ = "html" + + def __init__(self, parser: Any = None): + self.rules = { + k: v + for k, v in inspect.getmembers(self, predicate=inspect.ismethod) + if not (k.startswith("render") or k.startswith("_")) + } + + def render( + self, tokens: Sequence[Token], options: OptionsDict, env: EnvType + ) -> str: + """Takes token stream and generates HTML. + + :param tokens: list on block tokens to render + :param options: params of parser instance + :param env: additional data from parsed input + + """ + result = "" + + for i, token in enumerate(tokens): + if token.type == "inline": + if token.children: + result += self.renderInline(token.children, options, env) + elif token.type in self.rules: + result += self.rules[token.type](tokens, i, options, env) + else: + result += self.renderToken(tokens, i, options, env) + + return result + + def renderInline( + self, tokens: Sequence[Token], options: OptionsDict, env: EnvType + ) -> str: + """The same as ``render``, but for single token of `inline` type. + + :param tokens: list on block tokens to render + :param options: params of parser instance + :param env: additional data from parsed input (references, for example) + """ + result = "" + + for i, token in enumerate(tokens): + if token.type in self.rules: + result += self.rules[token.type](tokens, i, options, env) + else: + result += self.renderToken(tokens, i, options, env) + + return result + + def renderToken( + self, + tokens: Sequence[Token], + idx: int, + options: OptionsDict, + env: EnvType, + ) -> str: + """Default token renderer. + + Can be overridden by custom function + + :param idx: token index to render + :param options: params of parser instance + """ + result = "" + needLf = False + token = tokens[idx] + + # Tight list paragraphs + if token.hidden: + return "" + + # Insert a newline between hidden paragraph and subsequent opening + # block-level tag. + # + # For example, here we should insert a newline before blockquote: + # - a + # > + # + if token.block and token.nesting != -1 and idx and tokens[idx - 1].hidden: + result += "\n" + + # Add token name, e.g. ``. + # + needLf = False + + result += ">\n" if needLf else ">" + + return result + + @staticmethod + def renderAttrs(token: Token) -> str: + """Render token attributes to string.""" + result = "" + + for key, value in token.attrItems(): + result += " " + escapeHtml(key) + '="' + escapeHtml(str(value)) + '"' + + return result + + def renderInlineAsText( + self, + tokens: Sequence[Token] | None, + options: OptionsDict, + env: EnvType, + ) -> str: + """Special kludge for image `alt` attributes to conform CommonMark spec. + + Don't try to use it! Spec requires to show `alt` content with stripped markup, + instead of simple escaping. + + :param tokens: list on block tokens to render + :param options: params of parser instance + :param env: additional data from parsed input + """ + result = "" + + for token in tokens or []: + if token.type == "text": + result += token.content + elif token.type == "image": + if token.children: + result += self.renderInlineAsText(token.children, options, env) + elif token.type == "softbreak": + result += "\n" + + return result + + ################################################### + + def code_inline( + self, tokens: Sequence[Token], idx: int, options: OptionsDict, env: EnvType + ) -> str: + token = tokens[idx] + return ( + "" + + escapeHtml(tokens[idx].content) + + "
" + ) + + def code_block( + self, + tokens: Sequence[Token], + idx: int, + options: OptionsDict, + env: EnvType, + ) -> str: + token = tokens[idx] + + return ( + "" + + escapeHtml(tokens[idx].content) + + "

\n" + ) + + def fence( + self, + tokens: Sequence[Token], + idx: int, + options: OptionsDict, + env: EnvType, + ) -> str: + token = tokens[idx] + info = unescapeAll(token.info).strip() if token.info else "" + langName = "" + langAttrs = "" + + if info: + arr = info.split(maxsplit=1) + langName = arr[0] + if len(arr) == 2: + langAttrs = arr[1] + + if options.highlight: + highlighted = options.highlight( + token.content, langName, langAttrs + ) or escapeHtml(token.content) + else: + highlighted = escapeHtml(token.content) + + if highlighted.startswith("" + + highlighted + + "
\n" + ) + + return ( + "
"
+            + highlighted
+            + "
\n" + ) + + def image( + self, + tokens: Sequence[Token], + idx: int, + options: OptionsDict, + env: EnvType, + ) -> str: + token = tokens[idx] + + # "alt" attr MUST be set, even if empty. Because it's mandatory and + # should be placed on proper position for tests. + if token.children: + token.attrSet("alt", self.renderInlineAsText(token.children, options, env)) + else: + token.attrSet("alt", "") + + return self.renderToken(tokens, idx, options, env) + + def hardbreak( + self, tokens: Sequence[Token], idx: int, options: OptionsDict, env: EnvType + ) -> str: + return "
\n" if options.xhtmlOut else "
\n" + + def softbreak( + self, tokens: Sequence[Token], idx: int, options: OptionsDict, env: EnvType + ) -> str: + return ( + ("
\n" if options.xhtmlOut else "
\n") if options.breaks else "\n" + ) + + def text( + self, tokens: Sequence[Token], idx: int, options: OptionsDict, env: EnvType + ) -> str: + return escapeHtml(tokens[idx].content) + + def html_block( + self, tokens: Sequence[Token], idx: int, options: OptionsDict, env: EnvType + ) -> str: + return tokens[idx].content + + def html_inline( + self, tokens: Sequence[Token], idx: int, options: OptionsDict, env: EnvType + ) -> str: + return tokens[idx].content diff --git a/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/ruler.py b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/ruler.py new file mode 100644 index 0000000000000000000000000000000000000000..91ab58044cc9f93c540fc5d7e49a6c704e805d58 --- /dev/null +++ b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/ruler.py @@ -0,0 +1,275 @@ +""" +class Ruler + +Helper class, used by [[MarkdownIt#core]], [[MarkdownIt#block]] and +[[MarkdownIt#inline]] to manage sequences of functions (rules): + +- keep rules in defined order +- assign the name to each rule +- enable/disable rules +- add/replace rules +- allow assign rules to additional named chains (in the same) +- caching lists of active rules + +You will not need use this class directly until write plugins. For simple +rules control use [[MarkdownIt.disable]], [[MarkdownIt.enable]] and +[[MarkdownIt.use]]. +""" + +from __future__ import annotations + +from collections.abc import Iterable +from dataclasses import dataclass, field +from typing import TYPE_CHECKING, Generic, TypedDict, TypeVar +import warnings + +from .utils import EnvType + +if TYPE_CHECKING: + from markdown_it import MarkdownIt + + +class StateBase: + def __init__(self, src: str, md: MarkdownIt, env: EnvType): + self.src = src + self.env = env + self.md = md + + @property + def src(self) -> str: + return self._src + + @src.setter + def src(self, value: str) -> None: + self._src = value + self._srcCharCode: tuple[int, ...] | None = None + + @property + def srcCharCode(self) -> tuple[int, ...]: + warnings.warn( + "StateBase.srcCharCode is deprecated. Use StateBase.src instead.", + DeprecationWarning, + stacklevel=2, + ) + if self._srcCharCode is None: + self._srcCharCode = tuple(ord(c) for c in self._src) + return self._srcCharCode + + +class RuleOptionsType(TypedDict, total=False): + alt: list[str] + + +RuleFuncTv = TypeVar("RuleFuncTv") +"""A rule function, whose signature is dependent on the state type.""" + + +@dataclass(slots=True) +class Rule(Generic[RuleFuncTv]): + name: str + enabled: bool + fn: RuleFuncTv = field(repr=False) + alt: list[str] + + +class Ruler(Generic[RuleFuncTv]): + def __init__(self) -> None: + # List of added rules. + self.__rules__: list[Rule[RuleFuncTv]] = [] + # Cached rule chains. + # First level - chain name, '' for default. + # Second level - diginal anchor for fast filtering by charcodes. + self.__cache__: dict[str, list[RuleFuncTv]] | None = None + + def __find__(self, name: str) -> int: + """Find rule index by name""" + for i, rule in enumerate(self.__rules__): + if rule.name == name: + return i + return -1 + + def __compile__(self) -> None: + """Build rules lookup cache""" + chains = {""} + # collect unique names + for rule in self.__rules__: + if not rule.enabled: + continue + for name in rule.alt: + chains.add(name) + self.__cache__ = {} + for chain in chains: + self.__cache__[chain] = [] + for rule in self.__rules__: + if not rule.enabled: + continue + if chain and (chain not in rule.alt): + continue + self.__cache__[chain].append(rule.fn) + + def at( + self, ruleName: str, fn: RuleFuncTv, options: RuleOptionsType | None = None + ) -> None: + """Replace rule by name with new function & options. + + :param ruleName: rule name to replace. + :param fn: new rule function. + :param options: new rule options (not mandatory). + :raises: KeyError if name not found + """ + index = self.__find__(ruleName) + options = options or {} + if index == -1: + raise KeyError(f"Parser rule not found: {ruleName}") + self.__rules__[index].fn = fn + self.__rules__[index].alt = options.get("alt", []) + self.__cache__ = None + + def before( + self, + beforeName: str, + ruleName: str, + fn: RuleFuncTv, + options: RuleOptionsType | None = None, + ) -> None: + """Add new rule to chain before one with given name. + + :param beforeName: new rule will be added before this one. + :param ruleName: new rule will be added before this one. + :param fn: new rule function. + :param options: new rule options (not mandatory). + :raises: KeyError if name not found + """ + index = self.__find__(beforeName) + options = options or {} + if index == -1: + raise KeyError(f"Parser rule not found: {beforeName}") + self.__rules__.insert( + index, Rule[RuleFuncTv](ruleName, True, fn, options.get("alt", [])) + ) + self.__cache__ = None + + def after( + self, + afterName: str, + ruleName: str, + fn: RuleFuncTv, + options: RuleOptionsType | None = None, + ) -> None: + """Add new rule to chain after one with given name. + + :param afterName: new rule will be added after this one. + :param ruleName: new rule will be added after this one. + :param fn: new rule function. + :param options: new rule options (not mandatory). + :raises: KeyError if name not found + """ + index = self.__find__(afterName) + options = options or {} + if index == -1: + raise KeyError(f"Parser rule not found: {afterName}") + self.__rules__.insert( + index + 1, Rule[RuleFuncTv](ruleName, True, fn, options.get("alt", [])) + ) + self.__cache__ = None + + def push( + self, ruleName: str, fn: RuleFuncTv, options: RuleOptionsType | None = None + ) -> None: + """Push new rule to the end of chain. + + :param ruleName: new rule will be added to the end of chain. + :param fn: new rule function. + :param options: new rule options (not mandatory). + + """ + self.__rules__.append( + Rule[RuleFuncTv](ruleName, True, fn, (options or {}).get("alt", [])) + ) + self.__cache__ = None + + def enable( + self, names: str | Iterable[str], ignoreInvalid: bool = False + ) -> list[str]: + """Enable rules with given names. + + :param names: name or list of rule names to enable. + :param ignoreInvalid: ignore errors when rule not found + :raises: KeyError if name not found and not ignoreInvalid + :return: list of found rule names + """ + if isinstance(names, str): + names = [names] + result: list[str] = [] + for name in names: + idx = self.__find__(name) + if (idx < 0) and ignoreInvalid: + continue + if (idx < 0) and not ignoreInvalid: + raise KeyError(f"Rules manager: invalid rule name {name}") + self.__rules__[idx].enabled = True + result.append(name) + self.__cache__ = None + return result + + def enableOnly( + self, names: str | Iterable[str], ignoreInvalid: bool = False + ) -> list[str]: + """Enable rules with given names, and disable everything else. + + :param names: name or list of rule names to enable. + :param ignoreInvalid: ignore errors when rule not found + :raises: KeyError if name not found and not ignoreInvalid + :return: list of found rule names + """ + if isinstance(names, str): + names = [names] + for rule in self.__rules__: + rule.enabled = False + return self.enable(names, ignoreInvalid) + + def disable( + self, names: str | Iterable[str], ignoreInvalid: bool = False + ) -> list[str]: + """Disable rules with given names. + + :param names: name or list of rule names to enable. + :param ignoreInvalid: ignore errors when rule not found + :raises: KeyError if name not found and not ignoreInvalid + :return: list of found rule names + """ + if isinstance(names, str): + names = [names] + result = [] + for name in names: + idx = self.__find__(name) + if (idx < 0) and ignoreInvalid: + continue + if (idx < 0) and not ignoreInvalid: + raise KeyError(f"Rules manager: invalid rule name {name}") + self.__rules__[idx].enabled = False + result.append(name) + self.__cache__ = None + return result + + def getRules(self, chainName: str = "") -> list[RuleFuncTv]: + """Return array of active functions (rules) for given chain name. + It analyzes rules configuration, compiles caches if not exists and returns result. + + Default chain name is `''` (empty string). It can't be skipped. + That's done intentionally, to keep signature monomorphic for high speed. + + """ + if self.__cache__ is None: + self.__compile__() + assert self.__cache__ is not None + # Chain can be empty, if rules disabled. But we still have to return Array. + return self.__cache__.get(chainName, []) or [] + + def get_all_rules(self) -> list[str]: + """Return all available rule names.""" + return [r.name for r in self.__rules__] + + def get_active_rules(self) -> list[str]: + """Return the active rule names.""" + return [r.name for r in self.__rules__ if r.enabled] diff --git a/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/rules_block/__init__.py b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/rules_block/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..517da2312aa4c2ec89a8ba4c9f061793ef470f1d --- /dev/null +++ b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/rules_block/__init__.py @@ -0,0 +1,27 @@ +__all__ = ( + "StateBlock", + "blockquote", + "code", + "fence", + "heading", + "hr", + "html_block", + "lheading", + "list_block", + "paragraph", + "reference", + "table", +) + +from .blockquote import blockquote +from .code import code +from .fence import fence +from .heading import heading +from .hr import hr +from .html_block import html_block +from .lheading import lheading +from .list import list_block +from .paragraph import paragraph +from .reference import reference +from .state_block import StateBlock +from .table import table diff --git a/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/rules_block/blockquote.py b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/rules_block/blockquote.py new file mode 100644 index 0000000000000000000000000000000000000000..0c9081b9cbd4b49d39d75427fd806e56c485a5fd --- /dev/null +++ b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/rules_block/blockquote.py @@ -0,0 +1,299 @@ +# Block quotes +from __future__ import annotations + +import logging + +from ..common.utils import isStrSpace +from .state_block import StateBlock + +LOGGER = logging.getLogger(__name__) + + +def blockquote(state: StateBlock, startLine: int, endLine: int, silent: bool) -> bool: + LOGGER.debug( + "entering blockquote: %s, %s, %s, %s", state, startLine, endLine, silent + ) + + oldLineMax = state.lineMax + pos = state.bMarks[startLine] + state.tShift[startLine] + max = state.eMarks[startLine] + + if state.is_code_block(startLine): + return False + + # check the block quote marker + try: + if state.src[pos] != ">": + return False + except IndexError: + return False + pos += 1 + + # we know that it's going to be a valid blockquote, + # so no point trying to find the end of it in silent mode + if silent: + return True + + # set offset past spaces and ">" + initial = offset = state.sCount[startLine] + 1 + + try: + second_char: str | None = state.src[pos] + except IndexError: + second_char = None + + # skip one optional space after '>' + if second_char == " ": + # ' > test ' + # ^ -- position start of line here: + pos += 1 + initial += 1 + offset += 1 + adjustTab = False + spaceAfterMarker = True + elif second_char == "\t": + spaceAfterMarker = True + + if (state.bsCount[startLine] + offset) % 4 == 3: + # ' >\t test ' + # ^ -- position start of line here (tab has width==1) + pos += 1 + initial += 1 + offset += 1 + adjustTab = False + else: + # ' >\t test ' + # ^ -- position start of line here + shift bsCount slightly + # to make extra space appear + adjustTab = True + + else: + spaceAfterMarker = False + + oldBMarks = [state.bMarks[startLine]] + state.bMarks[startLine] = pos + + while pos < max: + ch = state.src[pos] + + if isStrSpace(ch): + if ch == "\t": + offset += ( + 4 + - (offset + state.bsCount[startLine] + (1 if adjustTab else 0)) % 4 + ) + else: + offset += 1 + + else: + break + + pos += 1 + + oldBSCount = [state.bsCount[startLine]] + state.bsCount[startLine] = ( + state.sCount[startLine] + 1 + (1 if spaceAfterMarker else 0) + ) + + lastLineEmpty = pos >= max + + oldSCount = [state.sCount[startLine]] + state.sCount[startLine] = offset - initial + + oldTShift = [state.tShift[startLine]] + state.tShift[startLine] = pos - state.bMarks[startLine] + + terminatorRules = state.md.block.ruler.getRules("blockquote") + + oldParentType = state.parentType + state.parentType = "blockquote" + + # Search the end of the block + # + # Block ends with either: + # 1. an empty line outside: + # ``` + # > test + # + # ``` + # 2. an empty line inside: + # ``` + # > + # test + # ``` + # 3. another tag: + # ``` + # > test + # - - - + # ``` + + # for (nextLine = startLine + 1; nextLine < endLine; nextLine++) { + nextLine = startLine + 1 + while nextLine < endLine: + # check if it's outdented, i.e. it's inside list item and indented + # less than said list item: + # + # ``` + # 1. anything + # > current blockquote + # 2. checking this line + # ``` + isOutdented = state.sCount[nextLine] < state.blkIndent + + pos = state.bMarks[nextLine] + state.tShift[nextLine] + max = state.eMarks[nextLine] + + if pos >= max: + # Case 1: line is not inside the blockquote, and this line is empty. + break + + evaluatesTrue = state.src[pos] == ">" and not isOutdented + pos += 1 + if evaluatesTrue: + # This line is inside the blockquote. + + # set offset past spaces and ">" + initial = offset = state.sCount[nextLine] + 1 + + try: + next_char: str | None = state.src[pos] + except IndexError: + next_char = None + + # skip one optional space after '>' + if next_char == " ": + # ' > test ' + # ^ -- position start of line here: + pos += 1 + initial += 1 + offset += 1 + adjustTab = False + spaceAfterMarker = True + elif next_char == "\t": + spaceAfterMarker = True + + if (state.bsCount[nextLine] + offset) % 4 == 3: + # ' >\t test ' + # ^ -- position start of line here (tab has width==1) + pos += 1 + initial += 1 + offset += 1 + adjustTab = False + else: + # ' >\t test ' + # ^ -- position start of line here + shift bsCount slightly + # to make extra space appear + adjustTab = True + + else: + spaceAfterMarker = False + + oldBMarks.append(state.bMarks[nextLine]) + state.bMarks[nextLine] = pos + + while pos < max: + ch = state.src[pos] + + if isStrSpace(ch): + if ch == "\t": + offset += ( + 4 + - ( + offset + + state.bsCount[nextLine] + + (1 if adjustTab else 0) + ) + % 4 + ) + else: + offset += 1 + else: + break + + pos += 1 + + lastLineEmpty = pos >= max + + oldBSCount.append(state.bsCount[nextLine]) + state.bsCount[nextLine] = ( + state.sCount[nextLine] + 1 + (1 if spaceAfterMarker else 0) + ) + + oldSCount.append(state.sCount[nextLine]) + state.sCount[nextLine] = offset - initial + + oldTShift.append(state.tShift[nextLine]) + state.tShift[nextLine] = pos - state.bMarks[nextLine] + + nextLine += 1 + continue + + # Case 2: line is not inside the blockquote, and the last line was empty. + if lastLineEmpty: + break + + # Case 3: another tag found. + terminate = False + + for terminatorRule in terminatorRules: + if terminatorRule(state, nextLine, endLine, True): + terminate = True + break + + if terminate: + # Quirk to enforce "hard termination mode" for paragraphs; + # normally if you call `tokenize(state, startLine, nextLine)`, + # paragraphs will look below nextLine for paragraph continuation, + # but if blockquote is terminated by another tag, they shouldn't + state.lineMax = nextLine + + if state.blkIndent != 0: + # state.blkIndent was non-zero, we now set it to zero, + # so we need to re-calculate all offsets to appear as + # if indent wasn't changed + oldBMarks.append(state.bMarks[nextLine]) + oldBSCount.append(state.bsCount[nextLine]) + oldTShift.append(state.tShift[nextLine]) + oldSCount.append(state.sCount[nextLine]) + state.sCount[nextLine] -= state.blkIndent + + break + + oldBMarks.append(state.bMarks[nextLine]) + oldBSCount.append(state.bsCount[nextLine]) + oldTShift.append(state.tShift[nextLine]) + oldSCount.append(state.sCount[nextLine]) + + # A negative indentation means that this is a paragraph continuation + # + state.sCount[nextLine] = -1 + + nextLine += 1 + + oldIndent = state.blkIndent + state.blkIndent = 0 + + token = state.push("blockquote_open", "blockquote", 1) + token.markup = ">" + token.map = lines = [startLine, 0] + + state.md.block.tokenize(state, startLine, nextLine) + + token = state.push("blockquote_close", "blockquote", -1) + token.markup = ">" + + state.lineMax = oldLineMax + state.parentType = oldParentType + lines[1] = state.line + + # Restore original tShift; this might not be necessary since the parser + # has already been here, but just to make sure we can do that. + for i, item in enumerate(oldTShift): + state.bMarks[i + startLine] = oldBMarks[i] + state.tShift[i + startLine] = item + state.sCount[i + startLine] = oldSCount[i] + state.bsCount[i + startLine] = oldBSCount[i] + + state.blkIndent = oldIndent + + return True diff --git a/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/rules_block/code.py b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/rules_block/code.py new file mode 100644 index 0000000000000000000000000000000000000000..af8a41c8058b1a4887252469bdc6f20f085ad7d5 --- /dev/null +++ b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/rules_block/code.py @@ -0,0 +1,36 @@ +"""Code block (4 spaces padded).""" + +import logging + +from .state_block import StateBlock + +LOGGER = logging.getLogger(__name__) + + +def code(state: StateBlock, startLine: int, endLine: int, silent: bool) -> bool: + LOGGER.debug("entering code: %s, %s, %s, %s", state, startLine, endLine, silent) + + if not state.is_code_block(startLine): + return False + + last = nextLine = startLine + 1 + + while nextLine < endLine: + if state.isEmpty(nextLine): + nextLine += 1 + continue + + if state.is_code_block(nextLine): + nextLine += 1 + last = nextLine + continue + + break + + state.line = last + + token = state.push("code_block", "code", 0) + token.content = state.getLines(startLine, last, 4 + state.blkIndent, False) + "\n" + token.map = [startLine, state.line] + + return True diff --git a/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/rules_block/fence.py b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/rules_block/fence.py new file mode 100644 index 0000000000000000000000000000000000000000..263f1b8de8dcdd0dd736eeafab2d9da34ec2c205 --- /dev/null +++ b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/rules_block/fence.py @@ -0,0 +1,101 @@ +# fences (``` lang, ~~~ lang) +import logging + +from .state_block import StateBlock + +LOGGER = logging.getLogger(__name__) + + +def fence(state: StateBlock, startLine: int, endLine: int, silent: bool) -> bool: + LOGGER.debug("entering fence: %s, %s, %s, %s", state, startLine, endLine, silent) + + haveEndMarker = False + pos = state.bMarks[startLine] + state.tShift[startLine] + maximum = state.eMarks[startLine] + + if state.is_code_block(startLine): + return False + + if pos + 3 > maximum: + return False + + marker = state.src[pos] + + if marker not in ("~", "`"): + return False + + # scan marker length + mem = pos + pos = state.skipCharsStr(pos, marker) + + length = pos - mem + + if length < 3: + return False + + markup = state.src[mem:pos] + params = state.src[pos:maximum] + + if marker == "`" and marker in params: + return False + + # Since start is found, we can report success here in validation mode + if silent: + return True + + # search end of block + nextLine = startLine + + while True: + nextLine += 1 + if nextLine >= endLine: + # unclosed block should be autoclosed by end of document. + # also block seems to be autoclosed by end of parent + break + + pos = mem = state.bMarks[nextLine] + state.tShift[nextLine] + maximum = state.eMarks[nextLine] + + if pos < maximum and state.sCount[nextLine] < state.blkIndent: + # non-empty line with negative indent should stop the list: + # - ``` + # test + break + + try: + if state.src[pos] != marker: + continue + except IndexError: + break + + if state.is_code_block(nextLine): + continue + + pos = state.skipCharsStr(pos, marker) + + # closing code fence must be at least as long as the opening one + if pos - mem < length: + continue + + # make sure tail has spaces only + pos = state.skipSpaces(pos) + + if pos < maximum: + continue + + haveEndMarker = True + # found! + break + + # If a fence has heading spaces, they should be removed from its inner block + length = state.sCount[startLine] + + state.line = nextLine + (1 if haveEndMarker else 0) + + token = state.push("fence", "code", 0) + token.info = params + token.content = state.getLines(startLine + 1, nextLine, length, True) + token.markup = markup + token.map = [startLine, state.line] + + return True diff --git a/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/rules_block/heading.py b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/rules_block/heading.py new file mode 100644 index 0000000000000000000000000000000000000000..afcf9ed458124e52b9b365a6c17440872ffa0975 --- /dev/null +++ b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/rules_block/heading.py @@ -0,0 +1,69 @@ +"""Atex heading (#, ##, ...)""" + +from __future__ import annotations + +import logging + +from ..common.utils import isStrSpace +from .state_block import StateBlock + +LOGGER = logging.getLogger(__name__) + + +def heading(state: StateBlock, startLine: int, endLine: int, silent: bool) -> bool: + LOGGER.debug("entering heading: %s, %s, %s, %s", state, startLine, endLine, silent) + + pos = state.bMarks[startLine] + state.tShift[startLine] + maximum = state.eMarks[startLine] + + if state.is_code_block(startLine): + return False + + ch: str | None = state.src[pos] + + if ch != "#" or pos >= maximum: + return False + + # count heading level + level = 1 + pos += 1 + try: + ch = state.src[pos] + except IndexError: + ch = None + while ch == "#" and pos < maximum and level <= 6: + level += 1 + pos += 1 + try: + ch = state.src[pos] + except IndexError: + ch = None + + if level > 6 or (pos < maximum and not isStrSpace(ch)): + return False + + if silent: + return True + + # Let's cut tails like ' ### ' from the end of string + + maximum = state.skipSpacesBack(maximum, pos) + tmp = state.skipCharsStrBack(maximum, "#", pos) + if tmp > pos and isStrSpace(state.src[tmp - 1]): + maximum = tmp + + state.line = startLine + 1 + + token = state.push("heading_open", "h" + str(level), 1) + token.markup = "########"[:level] + token.map = [startLine, state.line] + + token = state.push("inline", "", 0) + token.content = state.src[pos:maximum].strip() + token.map = [startLine, state.line] + token.children = [] + + token = state.push("heading_close", "h" + str(level), -1) + token.markup = "########"[:level] + + return True diff --git a/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/rules_block/hr.py b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/rules_block/hr.py new file mode 100644 index 0000000000000000000000000000000000000000..fca7d79d2780a5e656e689ac4843b8464b4ab5bd --- /dev/null +++ b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/rules_block/hr.py @@ -0,0 +1,56 @@ +"""Horizontal rule + +At least 3 of these characters on a line * - _ +""" + +import logging + +from ..common.utils import isStrSpace +from .state_block import StateBlock + +LOGGER = logging.getLogger(__name__) + + +def hr(state: StateBlock, startLine: int, endLine: int, silent: bool) -> bool: + LOGGER.debug("entering hr: %s, %s, %s, %s", state, startLine, endLine, silent) + + pos = state.bMarks[startLine] + state.tShift[startLine] + maximum = state.eMarks[startLine] + + if state.is_code_block(startLine): + return False + + try: + marker = state.src[pos] + except IndexError: + return False + pos += 1 + + # Check hr marker + if marker not in ("*", "-", "_"): + return False + + # markers can be mixed with spaces, but there should be at least 3 of them + + cnt = 1 + while pos < maximum: + ch = state.src[pos] + pos += 1 + if ch != marker and not isStrSpace(ch): + return False + if ch == marker: + cnt += 1 + + if cnt < 3: + return False + + if silent: + return True + + state.line = startLine + 1 + + token = state.push("hr", "hr", 0) + token.map = [startLine, state.line] + token.markup = marker * (cnt + 1) + + return True diff --git a/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/rules_block/html_block.py b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/rules_block/html_block.py new file mode 100644 index 0000000000000000000000000000000000000000..3d43f6ee1deb527a42f4d99da40bd052d9b02886 --- /dev/null +++ b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/rules_block/html_block.py @@ -0,0 +1,90 @@ +# HTML block +from __future__ import annotations + +import logging +import re + +from ..common.html_blocks import block_names +from ..common.html_re import HTML_OPEN_CLOSE_TAG_STR +from .state_block import StateBlock + +LOGGER = logging.getLogger(__name__) + +# An array of opening and corresponding closing sequences for html tags, +# last argument defines whether it can terminate a paragraph or not +HTML_SEQUENCES: list[tuple[re.Pattern[str], re.Pattern[str], bool]] = [ + ( + re.compile(r"^<(script|pre|style|textarea)(?=(\s|>|$))", re.IGNORECASE), + re.compile(r"<\/(script|pre|style|textarea)>", re.IGNORECASE), + True, + ), + (re.compile(r"^"), True), + (re.compile(r"^<\?"), re.compile(r"\?>"), True), + (re.compile(r"^"), True), + (re.compile(r"^"), True), + ( + re.compile("^|$))", re.IGNORECASE), + re.compile(r"^$"), + True, + ), + (re.compile(HTML_OPEN_CLOSE_TAG_STR + "\\s*$"), re.compile(r"^$"), False), +] + + +def html_block(state: StateBlock, startLine: int, endLine: int, silent: bool) -> bool: + LOGGER.debug( + "entering html_block: %s, %s, %s, %s", state, startLine, endLine, silent + ) + pos = state.bMarks[startLine] + state.tShift[startLine] + maximum = state.eMarks[startLine] + + if state.is_code_block(startLine): + return False + + if not state.md.options.get("html", None): + return False + + if state.src[pos] != "<": + return False + + lineText = state.src[pos:maximum] + + html_seq = None + for HTML_SEQUENCE in HTML_SEQUENCES: + if HTML_SEQUENCE[0].search(lineText): + html_seq = HTML_SEQUENCE + break + + if not html_seq: + return False + + if silent: + # true if this sequence can be a terminator, false otherwise + return html_seq[2] + + nextLine = startLine + 1 + + # If we are here - we detected HTML block. + # Let's roll down till block end. + if not html_seq[1].search(lineText): + while nextLine < endLine: + if state.sCount[nextLine] < state.blkIndent: + break + + pos = state.bMarks[nextLine] + state.tShift[nextLine] + maximum = state.eMarks[nextLine] + lineText = state.src[pos:maximum] + + if html_seq[1].search(lineText): + if len(lineText) != 0: + nextLine += 1 + break + nextLine += 1 + + state.line = nextLine + + token = state.push("html_block", "", 0) + token.map = [startLine, nextLine] + token.content = state.getLines(startLine, nextLine, state.blkIndent, True) + + return True diff --git a/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/rules_block/lheading.py b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/rules_block/lheading.py new file mode 100644 index 0000000000000000000000000000000000000000..3522207abb680510decdd6c54d0be81401128ad7 --- /dev/null +++ b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/rules_block/lheading.py @@ -0,0 +1,86 @@ +# lheading (---, ==) +import logging + +from .state_block import StateBlock + +LOGGER = logging.getLogger(__name__) + + +def lheading(state: StateBlock, startLine: int, endLine: int, silent: bool) -> bool: + LOGGER.debug("entering lheading: %s, %s, %s, %s", state, startLine, endLine, silent) + + level = None + nextLine = startLine + 1 + ruler = state.md.block.ruler + terminatorRules = ruler.getRules("paragraph") + + if state.is_code_block(startLine): + return False + + oldParentType = state.parentType + state.parentType = "paragraph" # use paragraph to match terminatorRules + + # jump line-by-line until empty one or EOF + while nextLine < endLine and not state.isEmpty(nextLine): + # this would be a code block normally, but after paragraph + # it's considered a lazy continuation regardless of what's there + if state.sCount[nextLine] - state.blkIndent > 3: + nextLine += 1 + continue + + # Check for underline in setext header + if state.sCount[nextLine] >= state.blkIndent: + pos = state.bMarks[nextLine] + state.tShift[nextLine] + maximum = state.eMarks[nextLine] + + if pos < maximum: + marker = state.src[pos] + + if marker in ("-", "="): + pos = state.skipCharsStr(pos, marker) + pos = state.skipSpaces(pos) + + # /* = */ + if pos >= maximum: + level = 1 if marker == "=" else 2 + break + + # quirk for blockquotes, this line should already be checked by that rule + if state.sCount[nextLine] < 0: + nextLine += 1 + continue + + # Some tags can terminate paragraph without empty line. + terminate = False + for terminatorRule in terminatorRules: + if terminatorRule(state, nextLine, endLine, True): + terminate = True + break + if terminate: + break + + nextLine += 1 + + if not level: + # Didn't find valid underline + return False + + content = state.getLines(startLine, nextLine, state.blkIndent, False).strip() + + state.line = nextLine + 1 + + token = state.push("heading_open", "h" + str(level), 1) + token.markup = marker + token.map = [startLine, state.line] + + token = state.push("inline", "", 0) + token.content = content + token.map = [startLine, state.line - 1] + token.children = [] + + token = state.push("heading_close", "h" + str(level), -1) + token.markup = marker + + state.parentType = oldParentType + + return True diff --git a/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/rules_block/list.py b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/rules_block/list.py new file mode 100644 index 0000000000000000000000000000000000000000..d8070d747035dd6b43f11c4bd88d05533b22bc5b --- /dev/null +++ b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/rules_block/list.py @@ -0,0 +1,345 @@ +# Lists +import logging + +from ..common.utils import isStrSpace +from .state_block import StateBlock + +LOGGER = logging.getLogger(__name__) + + +# Search `[-+*][\n ]`, returns next pos after marker on success +# or -1 on fail. +def skipBulletListMarker(state: StateBlock, startLine: int) -> int: + pos = state.bMarks[startLine] + state.tShift[startLine] + maximum = state.eMarks[startLine] + + try: + marker = state.src[pos] + except IndexError: + return -1 + pos += 1 + + if marker not in ("*", "-", "+"): + return -1 + + if pos < maximum: + ch = state.src[pos] + + if not isStrSpace(ch): + # " -test " - is not a list item + return -1 + + return pos + + +# Search `\d+[.)][\n ]`, returns next pos after marker on success +# or -1 on fail. +def skipOrderedListMarker(state: StateBlock, startLine: int) -> int: + start = state.bMarks[startLine] + state.tShift[startLine] + pos = start + maximum = state.eMarks[startLine] + + # List marker should have at least 2 chars (digit + dot) + if pos + 1 >= maximum: + return -1 + + ch = state.src[pos] + pos += 1 + + ch_ord = ord(ch) + # /* 0 */ /* 9 */ + if ch_ord < 0x30 or ch_ord > 0x39: + return -1 + + while True: + # EOL -> fail + if pos >= maximum: + return -1 + + ch = state.src[pos] + pos += 1 + + # /* 0 */ /* 9 */ + ch_ord = ord(ch) + if ch_ord >= 0x30 and ch_ord <= 0x39: + # List marker should have no more than 9 digits + # (prevents integer overflow in browsers) + if pos - start >= 10: + return -1 + + continue + + # found valid marker + if ch in (")", "."): + break + + return -1 + + if pos < maximum: + ch = state.src[pos] + + if not isStrSpace(ch): + # " 1.test " - is not a list item + return -1 + + return pos + + +def markTightParagraphs(state: StateBlock, idx: int) -> None: + level = state.level + 2 + + i = idx + 2 + length = len(state.tokens) - 2 + while i < length: + if state.tokens[i].level == level and state.tokens[i].type == "paragraph_open": + state.tokens[i + 2].hidden = True + state.tokens[i].hidden = True + i += 2 + i += 1 + + +def list_block(state: StateBlock, startLine: int, endLine: int, silent: bool) -> bool: + LOGGER.debug("entering list: %s, %s, %s, %s", state, startLine, endLine, silent) + + isTerminatingParagraph = False + tight = True + + if state.is_code_block(startLine): + return False + + # Special case: + # - item 1 + # - item 2 + # - item 3 + # - item 4 + # - this one is a paragraph continuation + if ( + state.listIndent >= 0 + and state.sCount[startLine] - state.listIndent >= 4 + and state.sCount[startLine] < state.blkIndent + ): + return False + + # limit conditions when list can interrupt + # a paragraph (validation mode only) + # Next list item should still terminate previous list item + # + # This code can fail if plugins use blkIndent as well as lists, + # but I hope the spec gets fixed long before that happens. + # + if ( + silent + and state.parentType == "paragraph" + and state.sCount[startLine] >= state.blkIndent + ): + isTerminatingParagraph = True + + # Detect list type and position after marker + posAfterMarker = skipOrderedListMarker(state, startLine) + if posAfterMarker >= 0: + isOrdered = True + start = state.bMarks[startLine] + state.tShift[startLine] + markerValue = int(state.src[start : posAfterMarker - 1]) + + # If we're starting a new ordered list right after + # a paragraph, it should start with 1. + if isTerminatingParagraph and markerValue != 1: + return False + else: + posAfterMarker = skipBulletListMarker(state, startLine) + if posAfterMarker >= 0: + isOrdered = False + else: + return False + + # If we're starting a new unordered list right after + # a paragraph, first line should not be empty. + if ( + isTerminatingParagraph + and state.skipSpaces(posAfterMarker) >= state.eMarks[startLine] + ): + return False + + # We should terminate list on style change. Remember first one to compare. + markerChar = state.src[posAfterMarker - 1] + + # For validation mode we can terminate immediately + if silent: + return True + + # Start list + listTokIdx = len(state.tokens) + + if isOrdered: + token = state.push("ordered_list_open", "ol", 1) + if markerValue != 1: + token.attrs = {"start": markerValue} + + else: + token = state.push("bullet_list_open", "ul", 1) + + token.map = listLines = [startLine, 0] + token.markup = markerChar + + # + # Iterate list items + # + + nextLine = startLine + prevEmptyEnd = False + terminatorRules = state.md.block.ruler.getRules("list") + + oldParentType = state.parentType + state.parentType = "list" + + while nextLine < endLine: + pos = posAfterMarker + maximum = state.eMarks[nextLine] + + initial = offset = ( + state.sCount[nextLine] + + posAfterMarker + - (state.bMarks[startLine] + state.tShift[startLine]) + ) + + while pos < maximum: + ch = state.src[pos] + + if ch == "\t": + offset += 4 - (offset + state.bsCount[nextLine]) % 4 + elif ch == " ": + offset += 1 + else: + break + + pos += 1 + + contentStart = pos + + # trimming space in "- \n 3" case, indent is 1 here + indentAfterMarker = 1 if contentStart >= maximum else offset - initial + + # If we have more than 4 spaces, the indent is 1 + # (the rest is just indented code block) + if indentAfterMarker > 4: + indentAfterMarker = 1 + + # " - test" + # ^^^^^ - calculating total length of this thing + indent = initial + indentAfterMarker + + # Run subparser & write tokens + token = state.push("list_item_open", "li", 1) + token.markup = markerChar + token.map = itemLines = [startLine, 0] + if isOrdered: + token.info = state.src[start : posAfterMarker - 1] + + # change current state, then restore it after parser subcall + oldTight = state.tight + oldTShift = state.tShift[startLine] + oldSCount = state.sCount[startLine] + + # - example list + # ^ listIndent position will be here + # ^ blkIndent position will be here + # + oldListIndent = state.listIndent + state.listIndent = state.blkIndent + state.blkIndent = indent + + state.tight = True + state.tShift[startLine] = contentStart - state.bMarks[startLine] + state.sCount[startLine] = offset + + if contentStart >= maximum and state.isEmpty(startLine + 1): + # workaround for this case + # (list item is empty, list terminates before "foo"): + # ~~~~~~~~ + # - + # + # foo + # ~~~~~~~~ + state.line = min(state.line + 2, endLine) + else: + # NOTE in list.js this was: + # state.md.block.tokenize(state, startLine, endLine, True) + # but tokeniz does not take the final parameter + state.md.block.tokenize(state, startLine, endLine) + + # If any of list item is tight, mark list as tight + if (not state.tight) or prevEmptyEnd: + tight = False + + # Item become loose if finish with empty line, + # but we should filter last element, because it means list finish + prevEmptyEnd = (state.line - startLine) > 1 and state.isEmpty(state.line - 1) + + state.blkIndent = state.listIndent + state.listIndent = oldListIndent + state.tShift[startLine] = oldTShift + state.sCount[startLine] = oldSCount + state.tight = oldTight + + token = state.push("list_item_close", "li", -1) + token.markup = markerChar + + nextLine = startLine = state.line + itemLines[1] = nextLine + + if nextLine >= endLine: + break + + contentStart = state.bMarks[startLine] + + # + # Try to check if list is terminated or continued. + # + if state.sCount[nextLine] < state.blkIndent: + break + + if state.is_code_block(startLine): + break + + # fail if terminating block found + terminate = False + for terminatorRule in terminatorRules: + if terminatorRule(state, nextLine, endLine, True): + terminate = True + break + + if terminate: + break + + # fail if list has another type + if isOrdered: + posAfterMarker = skipOrderedListMarker(state, nextLine) + if posAfterMarker < 0: + break + start = state.bMarks[nextLine] + state.tShift[nextLine] + else: + posAfterMarker = skipBulletListMarker(state, nextLine) + if posAfterMarker < 0: + break + + if markerChar != state.src[posAfterMarker - 1]: + break + + # Finalize list + if isOrdered: + token = state.push("ordered_list_close", "ol", -1) + else: + token = state.push("bullet_list_close", "ul", -1) + + token.markup = markerChar + + listLines[1] = nextLine + state.line = nextLine + + state.parentType = oldParentType + + # mark paragraphs tight if needed + if tight: + markTightParagraphs(state, listTokIdx) + + return True diff --git a/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/rules_block/paragraph.py b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/rules_block/paragraph.py new file mode 100644 index 0000000000000000000000000000000000000000..30ba877799beb764dc0a603caa21fe6e6b641375 --- /dev/null +++ b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/rules_block/paragraph.py @@ -0,0 +1,66 @@ +"""Paragraph.""" + +import logging + +from .state_block import StateBlock + +LOGGER = logging.getLogger(__name__) + + +def paragraph(state: StateBlock, startLine: int, endLine: int, silent: bool) -> bool: + LOGGER.debug( + "entering paragraph: %s, %s, %s, %s", state, startLine, endLine, silent + ) + + nextLine = startLine + 1 + ruler = state.md.block.ruler + terminatorRules = ruler.getRules("paragraph") + endLine = state.lineMax + + oldParentType = state.parentType + state.parentType = "paragraph" + + # jump line-by-line until empty one or EOF + while nextLine < endLine: + if state.isEmpty(nextLine): + break + # this would be a code block normally, but after paragraph + # it's considered a lazy continuation regardless of what's there + if state.sCount[nextLine] - state.blkIndent > 3: + nextLine += 1 + continue + + # quirk for blockquotes, this line should already be checked by that rule + if state.sCount[nextLine] < 0: + nextLine += 1 + continue + + # Some tags can terminate paragraph without empty line. + terminate = False + for terminatorRule in terminatorRules: + if terminatorRule(state, nextLine, endLine, True): + terminate = True + break + + if terminate: + break + + nextLine += 1 + + content = state.getLines(startLine, nextLine, state.blkIndent, False).strip() + + state.line = nextLine + + token = state.push("paragraph_open", "p", 1) + token.map = [startLine, state.line] + + token = state.push("inline", "", 0) + token.content = content + token.map = [startLine, state.line] + token.children = [] + + token = state.push("paragraph_close", "p", -1) + + state.parentType = oldParentType + + return True diff --git a/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/rules_block/reference.py b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/rules_block/reference.py new file mode 100644 index 0000000000000000000000000000000000000000..ad94d40941ee7cd43c7d3873ac64276a47c15d8b --- /dev/null +++ b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/rules_block/reference.py @@ -0,0 +1,235 @@ +import logging + +from ..common.utils import charCodeAt, isSpace, normalizeReference +from .state_block import StateBlock + +LOGGER = logging.getLogger(__name__) + + +def reference(state: StateBlock, startLine: int, _endLine: int, silent: bool) -> bool: + LOGGER.debug( + "entering reference: %s, %s, %s, %s", state, startLine, _endLine, silent + ) + + pos = state.bMarks[startLine] + state.tShift[startLine] + maximum = state.eMarks[startLine] + nextLine = startLine + 1 + + if state.is_code_block(startLine): + return False + + if state.src[pos] != "[": + return False + + string = state.src[pos : maximum + 1] + + # string = state.getLines(startLine, nextLine, state.blkIndent, False).strip() + maximum = len(string) + + labelEnd = None + pos = 1 + while pos < maximum: + ch = charCodeAt(string, pos) + if ch == 0x5B: # /* [ */ + return False + elif ch == 0x5D: # /* ] */ + labelEnd = pos + break + elif ch == 0x0A: # /* \n */ + if (lineContent := getNextLine(state, nextLine)) is not None: + string += lineContent + maximum = len(string) + nextLine += 1 + elif ch == 0x5C: # /* \ */ + pos += 1 + if ( + pos < maximum + and charCodeAt(string, pos) == 0x0A + and (lineContent := getNextLine(state, nextLine)) is not None + ): + string += lineContent + maximum = len(string) + nextLine += 1 + pos += 1 + + if ( + labelEnd is None or labelEnd < 0 or charCodeAt(string, labelEnd + 1) != 0x3A + ): # /* : */ + return False + + # [label]: destination 'title' + # ^^^ skip optional whitespace here + pos = labelEnd + 2 + while pos < maximum: + ch = charCodeAt(string, pos) + if ch == 0x0A: + if (lineContent := getNextLine(state, nextLine)) is not None: + string += lineContent + maximum = len(string) + nextLine += 1 + elif isSpace(ch): + pass + else: + break + pos += 1 + + # [label]: destination 'title' + # ^^^^^^^^^^^ parse this + destRes = state.md.helpers.parseLinkDestination(string, pos, maximum) + if not destRes.ok: + return False + + href = state.md.normalizeLink(destRes.str) + if not state.md.validateLink(href): + return False + + pos = destRes.pos + + # save cursor state, we could require to rollback later + destEndPos = pos + destEndLineNo = nextLine + + # [label]: destination 'title' + # ^^^ skipping those spaces + start = pos + while pos < maximum: + ch = charCodeAt(string, pos) + if ch == 0x0A: + if (lineContent := getNextLine(state, nextLine)) is not None: + string += lineContent + maximum = len(string) + nextLine += 1 + elif isSpace(ch): + pass + else: + break + pos += 1 + + # [label]: destination 'title' + # ^^^^^^^ parse this + titleRes = state.md.helpers.parseLinkTitle(string, pos, maximum, None) + while titleRes.can_continue: + if (lineContent := getNextLine(state, nextLine)) is None: + break + string += lineContent + pos = maximum + maximum = len(string) + nextLine += 1 + titleRes = state.md.helpers.parseLinkTitle(string, pos, maximum, titleRes) + + if pos < maximum and start != pos and titleRes.ok: + title = titleRes.str + pos = titleRes.pos + else: + title = "" + pos = destEndPos + nextLine = destEndLineNo + + # skip trailing spaces until the rest of the line + while pos < maximum: + ch = charCodeAt(string, pos) + if not isSpace(ch): + break + pos += 1 + + if pos < maximum and charCodeAt(string, pos) != 0x0A and title: + # garbage at the end of the line after title, + # but it could still be a valid reference if we roll back + title = "" + pos = destEndPos + nextLine = destEndLineNo + while pos < maximum: + ch = charCodeAt(string, pos) + if not isSpace(ch): + break + pos += 1 + + if pos < maximum and charCodeAt(string, pos) != 0x0A: + # garbage at the end of the line + return False + + label = normalizeReference(string[1:labelEnd]) + if not label: + # CommonMark 0.20 disallows empty labels + return False + + # Reference can not terminate anything. This check is for safety only. + if silent: + return True + + if "references" not in state.env: + state.env["references"] = {} + + state.line = nextLine + + # note, this is not part of markdown-it JS, but is useful for renderers + if state.md.options.get("inline_definitions", False): + token = state.push("definition", "", 0) + token.meta = { + "id": label, + "title": title, + "url": href, + "label": string[1:labelEnd], + } + token.map = [startLine, state.line] + + if label not in state.env["references"]: + state.env["references"][label] = { + "title": title, + "href": href, + "map": [startLine, state.line], + } + else: + state.env.setdefault("duplicate_refs", []).append( + { + "title": title, + "href": href, + "label": label, + "map": [startLine, state.line], + } + ) + + return True + + +def getNextLine(state: StateBlock, nextLine: int) -> None | str: + endLine = state.lineMax + + if nextLine >= endLine or state.isEmpty(nextLine): + # empty line or end of input + return None + + isContinuation = False + + # this would be a code block normally, but after paragraph + # it's considered a lazy continuation regardless of what's there + if state.is_code_block(nextLine): + isContinuation = True + + # quirk for blockquotes, this line should already be checked by that rule + if state.sCount[nextLine] < 0: + isContinuation = True + + if not isContinuation: + terminatorRules = state.md.block.ruler.getRules("reference") + oldParentType = state.parentType + state.parentType = "reference" + + # Some tags can terminate paragraph without empty line. + terminate = False + for terminatorRule in terminatorRules: + if terminatorRule(state, nextLine, endLine, True): + terminate = True + break + + state.parentType = oldParentType + + if terminate: + # terminated by another block + return None + + pos = state.bMarks[nextLine] + state.tShift[nextLine] + maximum = state.eMarks[nextLine] + + # max + 1 explicitly includes the newline + return state.src[pos : maximum + 1] diff --git a/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/rules_block/state_block.py b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/rules_block/state_block.py new file mode 100644 index 0000000000000000000000000000000000000000..445ad265a01e3f1dededf9f72848686a2b5ee901 --- /dev/null +++ b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/rules_block/state_block.py @@ -0,0 +1,261 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Literal + +from ..common.utils import isStrSpace +from ..ruler import StateBase +from ..token import Token +from ..utils import EnvType + +if TYPE_CHECKING: + from markdown_it.main import MarkdownIt + + +class StateBlock(StateBase): + def __init__( + self, src: str, md: MarkdownIt, env: EnvType, tokens: list[Token] + ) -> None: + self.src = src + + # link to parser instance + self.md = md + + self.env = env + + # + # Internal state variables + # + + self.tokens = tokens + + self.bMarks: list[int] = [] # line begin offsets for fast jumps + self.eMarks: list[int] = [] # line end offsets for fast jumps + # offsets of the first non-space characters (tabs not expanded) + self.tShift: list[int] = [] + self.sCount: list[int] = [] # indents for each line (tabs expanded) + + # An amount of virtual spaces (tabs expanded) between beginning + # of each line (bMarks) and real beginning of that line. + # + # It exists only as a hack because blockquotes override bMarks + # losing information in the process. + # + # It's used only when expanding tabs, you can think about it as + # an initial tab length, e.g. bsCount=21 applied to string `\t123` + # means first tab should be expanded to 4-21%4 === 3 spaces. + # + self.bsCount: list[int] = [] + + # block parser variables + self.blkIndent = 0 # required block content indent (for example, if we are + # inside a list, it would be positioned after list marker) + self.line = 0 # line index in src + self.lineMax = 0 # lines count + self.tight = False # loose/tight mode for lists + self.ddIndent = -1 # indent of the current dd block (-1 if there isn't any) + self.listIndent = -1 # indent of the current list block (-1 if there isn't any) + + # can be 'blockquote', 'list', 'root', 'paragraph' or 'reference' + # used in lists to determine if they interrupt a paragraph + self.parentType = "root" + + self.level = 0 + + # renderer + self.result = "" + + # Create caches + # Generate markers. + indent_found = False + + start = pos = indent = offset = 0 + length = len(self.src) + + for pos, character in enumerate(self.src): + if not indent_found: + if isStrSpace(character): + indent += 1 + + if character == "\t": + offset += 4 - offset % 4 + else: + offset += 1 + continue + else: + indent_found = True + + if character == "\n" or pos == length - 1: + if character != "\n": + pos += 1 + self.bMarks.append(start) + self.eMarks.append(pos) + self.tShift.append(indent) + self.sCount.append(offset) + self.bsCount.append(0) + + indent_found = False + indent = 0 + offset = 0 + start = pos + 1 + + # Push fake entry to simplify cache bounds checks + self.bMarks.append(length) + self.eMarks.append(length) + self.tShift.append(0) + self.sCount.append(0) + self.bsCount.append(0) + + self.lineMax = len(self.bMarks) - 1 # don't count last fake line + + # pre-check if code blocks are enabled, to speed up is_code_block method + self._code_enabled = "code" in self.md["block"].ruler.get_active_rules() + + def __repr__(self) -> str: + return ( + f"{self.__class__.__name__}" + f"(line={self.line},level={self.level},tokens={len(self.tokens)})" + ) + + def push(self, ttype: str, tag: str, nesting: Literal[-1, 0, 1]) -> Token: + """Push new token to "stream".""" + token = Token(ttype, tag, nesting) + token.block = True + if nesting < 0: + self.level -= 1 # closing tag + token.level = self.level + if nesting > 0: + self.level += 1 # opening tag + self.tokens.append(token) + return token + + def isEmpty(self, line: int) -> bool: + """.""" + return (self.bMarks[line] + self.tShift[line]) >= self.eMarks[line] + + def skipEmptyLines(self, from_pos: int) -> int: + """.""" + while from_pos < self.lineMax: + try: + if (self.bMarks[from_pos] + self.tShift[from_pos]) < self.eMarks[ + from_pos + ]: + break + except IndexError: + pass + from_pos += 1 + return from_pos + + def skipSpaces(self, pos: int) -> int: + """Skip spaces from given position.""" + while True: + try: + current = self.src[pos] + except IndexError: + break + if not isStrSpace(current): + break + pos += 1 + return pos + + def skipSpacesBack(self, pos: int, minimum: int) -> int: + """Skip spaces from given position in reverse.""" + if pos <= minimum: + return pos + while pos > minimum: + pos -= 1 + if not isStrSpace(self.src[pos]): + return pos + 1 + return pos + + def skipChars(self, pos: int, code: int) -> int: + """Skip character code from given position.""" + while True: + try: + current = self.srcCharCode[pos] + except IndexError: + break + if current != code: + break + pos += 1 + return pos + + def skipCharsStr(self, pos: int, ch: str) -> int: + """Skip character string from given position.""" + while True: + try: + current = self.src[pos] + except IndexError: + break + if current != ch: + break + pos += 1 + return pos + + def skipCharsBack(self, pos: int, code: int, minimum: int) -> int: + """Skip character code reverse from given position - 1.""" + if pos <= minimum: + return pos + while pos > minimum: + pos -= 1 + if code != self.srcCharCode[pos]: + return pos + 1 + return pos + + def skipCharsStrBack(self, pos: int, ch: str, minimum: int) -> int: + """Skip character string reverse from given position - 1.""" + if pos <= minimum: + return pos + while pos > minimum: + pos -= 1 + if ch != self.src[pos]: + return pos + 1 + return pos + + def getLines(self, begin: int, end: int, indent: int, keepLastLF: bool) -> str: + """Cut lines range from source.""" + line = begin + if begin >= end: + return "" + + queue = [""] * (end - begin) + + i = 1 + while line < end: + lineIndent = 0 + lineStart = first = self.bMarks[line] + last = ( + self.eMarks[line] + 1 + if line + 1 < end or keepLastLF + else self.eMarks[line] + ) + + while (first < last) and (lineIndent < indent): + ch = self.src[first] + if isStrSpace(ch): + if ch == "\t": + lineIndent += 4 - (lineIndent + self.bsCount[line]) % 4 + else: + lineIndent += 1 + elif first - lineStart < self.tShift[line]: + lineIndent += 1 + else: + break + first += 1 + + if lineIndent > indent: + # partially expanding tabs in code blocks, e.g '\t\tfoobar' + # with indent=2 becomes ' \tfoobar' + queue[i - 1] = (" " * (lineIndent - indent)) + self.src[first:last] + else: + queue[i - 1] = self.src[first:last] + + line += 1 + i += 1 + + return "".join(queue) + + def is_code_block(self, line: int) -> bool: + """Check if line is a code block, + i.e. the code block rule is enabled and text is indented by more than 3 spaces. + """ + return self._code_enabled and (self.sCount[line] - self.blkIndent) >= 4 diff --git a/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/rules_block/table.py b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/rules_block/table.py new file mode 100644 index 0000000000000000000000000000000000000000..c52553d8c21265df65e23be253686ef00b3297eb --- /dev/null +++ b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/rules_block/table.py @@ -0,0 +1,250 @@ +# GFM table, https://github.github.com/gfm/#tables-extension- +from __future__ import annotations + +import re + +from ..common.utils import charStrAt, isStrSpace +from .state_block import StateBlock + +headerLineRe = re.compile(r"^:?-+:?$") +enclosingPipesRe = re.compile(r"^\||\|$") + +# Limit the amount of empty autocompleted cells in a table, +# see https://github.com/markdown-it/markdown-it/issues/1000, +# Both pulldown-cmark and commonmark-hs limit the number of cells this way to ~200k. +# We set it to 65k, which can expand user input by a factor of x370 +# (256x256 square is 1.8kB expanded into 650kB). +MAX_AUTOCOMPLETED_CELLS = 0x10000 + + +def getLine(state: StateBlock, line: int) -> str: + pos = state.bMarks[line] + state.tShift[line] + maximum = state.eMarks[line] + + # return state.src.substr(pos, max - pos) + return state.src[pos:maximum] + + +def escapedSplit(string: str) -> list[str]: + result: list[str] = [] + pos = 0 + max = len(string) + isEscaped = False + lastPos = 0 + current = "" + ch = charStrAt(string, pos) + + while pos < max: + if ch == "|": + if not isEscaped: + # pipe separating cells, '|' + result.append(current + string[lastPos:pos]) + current = "" + lastPos = pos + 1 + else: + # escaped pipe, '\|' + current += string[lastPos : pos - 1] + lastPos = pos + + isEscaped = ch == "\\" + pos += 1 + + ch = charStrAt(string, pos) + + result.append(current + string[lastPos:]) + + return result + + +def table(state: StateBlock, startLine: int, endLine: int, silent: bool) -> bool: + tbodyLines = None + + # should have at least two lines + if startLine + 2 > endLine: + return False + + nextLine = startLine + 1 + + if state.sCount[nextLine] < state.blkIndent: + return False + + if state.is_code_block(nextLine): + return False + + # first character of the second line should be '|', '-', ':', + # and no other characters are allowed but spaces; + # basically, this is the equivalent of /^[-:|][-:|\s]*$/ regexp + + pos = state.bMarks[nextLine] + state.tShift[nextLine] + if pos >= state.eMarks[nextLine]: + return False + first_ch = state.src[pos] + pos += 1 + if first_ch not in ("|", "-", ":"): + return False + + if pos >= state.eMarks[nextLine]: + return False + second_ch = state.src[pos] + pos += 1 + if second_ch not in ("|", "-", ":") and not isStrSpace(second_ch): + return False + + # if first character is '-', then second character must not be a space + # (due to parsing ambiguity with list) + if first_ch == "-" and isStrSpace(second_ch): + return False + + while pos < state.eMarks[nextLine]: + ch = state.src[pos] + + if ch not in ("|", "-", ":") and not isStrSpace(ch): + return False + + pos += 1 + + lineText = getLine(state, startLine + 1) + + columns = lineText.split("|") + aligns = [] + for i in range(len(columns)): + t = columns[i].strip() + if not t: + # allow empty columns before and after table, but not in between columns; + # e.g. allow ` |---| `, disallow ` ---||--- ` + if i == 0 or i == len(columns) - 1: + continue + else: + return False + + if not headerLineRe.search(t): + return False + if charStrAt(t, len(t) - 1) == ":": + aligns.append("center" if charStrAt(t, 0) == ":" else "right") + elif charStrAt(t, 0) == ":": + aligns.append("left") + else: + aligns.append("") + + lineText = getLine(state, startLine).strip() + if "|" not in lineText: + return False + if state.is_code_block(startLine): + return False + columns = escapedSplit(lineText) + if columns and columns[0] == "": + columns.pop(0) + if columns and columns[-1] == "": + columns.pop() + + # header row will define an amount of columns in the entire table, + # and align row should be exactly the same (the rest of the rows can differ) + columnCount = len(columns) + if columnCount == 0 or columnCount != len(aligns): + return False + + if silent: + return True + + oldParentType = state.parentType + state.parentType = "table" + + # use 'blockquote' lists for termination because it's + # the most similar to tables + terminatorRules = state.md.block.ruler.getRules("blockquote") + + token = state.push("table_open", "table", 1) + token.map = tableLines = [startLine, 0] + + token = state.push("thead_open", "thead", 1) + token.map = [startLine, startLine + 1] + + token = state.push("tr_open", "tr", 1) + token.map = [startLine, startLine + 1] + + for i in range(len(columns)): + token = state.push("th_open", "th", 1) + if aligns[i]: + token.attrs = {"style": "text-align:" + aligns[i]} + + token = state.push("inline", "", 0) + # note in markdown-it this map was removed in v12.0.0 however, we keep it, + # since it is helpful to propagate to children tokens + token.map = [startLine, startLine + 1] + token.content = columns[i].strip() + token.children = [] + + token = state.push("th_close", "th", -1) + + token = state.push("tr_close", "tr", -1) + token = state.push("thead_close", "thead", -1) + + autocompleted_cells = 0 + nextLine = startLine + 2 + while nextLine < endLine: + if state.sCount[nextLine] < state.blkIndent: + break + + terminate = False + for i in range(len(terminatorRules)): + if terminatorRules[i](state, nextLine, endLine, True): + terminate = True + break + + if terminate: + break + lineText = getLine(state, nextLine).strip() + if not lineText: + break + if state.is_code_block(nextLine): + break + columns = escapedSplit(lineText) + if columns and columns[0] == "": + columns.pop(0) + if columns and columns[-1] == "": + columns.pop() + + # note: autocomplete count can be negative if user specifies more columns than header, + # but that does not affect intended use (which is limiting expansion) + autocompleted_cells += columnCount - len(columns) + if autocompleted_cells > MAX_AUTOCOMPLETED_CELLS: + break + + if nextLine == startLine + 2: + token = state.push("tbody_open", "tbody", 1) + token.map = tbodyLines = [startLine + 2, 0] + + token = state.push("tr_open", "tr", 1) + token.map = [nextLine, nextLine + 1] + + for i in range(columnCount): + token = state.push("td_open", "td", 1) + if aligns[i]: + token.attrs = {"style": "text-align:" + aligns[i]} + + token = state.push("inline", "", 0) + # note in markdown-it this map was removed in v12.0.0 however, we keep it, + # since it is helpful to propagate to children tokens + token.map = [nextLine, nextLine + 1] + try: + token.content = columns[i].strip() if columns[i] else "" + except IndexError: + token.content = "" + token.children = [] + + token = state.push("td_close", "td", -1) + + token = state.push("tr_close", "tr", -1) + + nextLine += 1 + + if tbodyLines: + token = state.push("tbody_close", "tbody", -1) + tbodyLines[1] = nextLine + + token = state.push("table_close", "table", -1) + + tableLines[1] = nextLine + state.parentType = oldParentType + state.line = nextLine + return True diff --git a/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/rules_core/__init__.py b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/rules_core/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e7d775363c6e1d454e73a7e3fff9af3115be4339 --- /dev/null +++ b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/rules_core/__init__.py @@ -0,0 +1,19 @@ +__all__ = ( + "StateCore", + "block", + "inline", + "linkify", + "normalize", + "replace", + "smartquotes", + "text_join", +) + +from .block import block +from .inline import inline +from .linkify import linkify +from .normalize import normalize +from .replacements import replace +from .smartquotes import smartquotes +from .state_core import StateCore +from .text_join import text_join diff --git a/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/rules_core/block.py b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/rules_core/block.py new file mode 100644 index 0000000000000000000000000000000000000000..a6c3bb8d7ae18880fd638690fb5b09beb78b103c --- /dev/null +++ b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/rules_core/block.py @@ -0,0 +1,13 @@ +from ..token import Token +from .state_core import StateCore + + +def block(state: StateCore) -> None: + if state.inlineMode: + token = Token("inline", "", 0) + token.content = state.src + token.map = [0, 1] + token.children = [] + state.tokens.append(token) + else: + state.md.block.parse(state.src, state.md, state.env, state.tokens) diff --git a/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/rules_core/inline.py b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/rules_core/inline.py new file mode 100644 index 0000000000000000000000000000000000000000..c3fd0b5e25dda5d8a5a644cc9e460d0f92ae2d1d --- /dev/null +++ b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/rules_core/inline.py @@ -0,0 +1,10 @@ +from .state_core import StateCore + + +def inline(state: StateCore) -> None: + """Parse inlines""" + for token in state.tokens: + if token.type == "inline": + if token.children is None: + token.children = [] + state.md.inline.parse(token.content, state.md, state.env, token.children) diff --git a/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/rules_core/linkify.py b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/rules_core/linkify.py new file mode 100644 index 0000000000000000000000000000000000000000..efbc9d4c9b1cbada1c936401b3421d73fbff5b64 --- /dev/null +++ b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/rules_core/linkify.py @@ -0,0 +1,149 @@ +from __future__ import annotations + +import re +from typing import Protocol + +from ..common.utils import arrayReplaceAt, isLinkClose, isLinkOpen +from ..token import Token +from .state_core import StateCore + +HTTP_RE = re.compile(r"^http://") +MAILTO_RE = re.compile(r"^mailto:") +TEST_MAILTO_RE = re.compile(r"^mailto:", flags=re.IGNORECASE) + + +def linkify(state: StateCore) -> None: + """Rule for identifying plain-text links.""" + if not state.md.options.linkify: + return + + if not state.md.linkify: + raise ModuleNotFoundError("Linkify enabled but not installed.") + + for inline_token in state.tokens: + if inline_token.type != "inline" or not state.md.linkify.pretest( + inline_token.content + ): + continue + + tokens = inline_token.children + + htmlLinkLevel = 0 + + # We scan from the end, to keep position when new tags added. + # Use reversed logic in links start/end match + assert tokens is not None + i = len(tokens) + while i >= 1: + i -= 1 + assert isinstance(tokens, list) + currentToken = tokens[i] + + # Skip content of markdown links + if currentToken.type == "link_close": + i -= 1 + while ( + tokens[i].level != currentToken.level + and tokens[i].type != "link_open" + ): + i -= 1 + continue + + # Skip content of html tag links + if currentToken.type == "html_inline": + if isLinkOpen(currentToken.content) and htmlLinkLevel > 0: + htmlLinkLevel -= 1 + if isLinkClose(currentToken.content): + htmlLinkLevel += 1 + if htmlLinkLevel > 0: + continue + + if currentToken.type == "text" and state.md.linkify.test( + currentToken.content + ): + text = currentToken.content + links: list[_LinkType] = state.md.linkify.match(text) or [] + + # Now split string to nodes + nodes = [] + level = currentToken.level + lastPos = 0 + + # forbid escape sequence at the start of the string, + # this avoids http\://example.com/ from being linkified as + # http://example.com/ + if ( + links + and links[0].index == 0 + and i > 0 + and tokens[i - 1].type == "text_special" + ): + links = links[1:] + + for link in links: + url = link.url + fullUrl = state.md.normalizeLink(url) + if not state.md.validateLink(fullUrl): + continue + + urlText = link.text + + # Linkifier might send raw hostnames like "example.com", where url + # starts with domain name. So we prepend http:// in those cases, + # and remove it afterwards. + if not link.schema: + urlText = HTTP_RE.sub( + "", state.md.normalizeLinkText("http://" + urlText) + ) + elif link.schema == "mailto:" and TEST_MAILTO_RE.search(urlText): + urlText = MAILTO_RE.sub( + "", state.md.normalizeLinkText("mailto:" + urlText) + ) + else: + urlText = state.md.normalizeLinkText(urlText) + + pos = link.index + + if pos > lastPos: + token = Token("text", "", 0) + token.content = text[lastPos:pos] + token.level = level + nodes.append(token) + + token = Token("link_open", "a", 1) + token.attrs = {"href": fullUrl} + token.level = level + level += 1 + token.markup = "linkify" + token.info = "auto" + nodes.append(token) + + token = Token("text", "", 0) + token.content = urlText + token.level = level + nodes.append(token) + + token = Token("link_close", "a", -1) + level -= 1 + token.level = level + token.markup = "linkify" + token.info = "auto" + nodes.append(token) + + lastPos = link.last_index + + if lastPos < len(text): + token = Token("text", "", 0) + token.content = text[lastPos:] + token.level = level + nodes.append(token) + + inline_token.children = tokens = arrayReplaceAt(tokens, i, nodes) + + +class _LinkType(Protocol): + url: str + text: str + index: int + last_index: int + schema: str | None diff --git a/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/rules_core/normalize.py b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/rules_core/normalize.py new file mode 100644 index 0000000000000000000000000000000000000000..32439243ef6ebfa424d202ed63635983d4c9ea82 --- /dev/null +++ b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/rules_core/normalize.py @@ -0,0 +1,19 @@ +"""Normalize input string.""" + +import re + +from .state_core import StateCore + +# https://spec.commonmark.org/0.29/#line-ending +NEWLINES_RE = re.compile(r"\r\n?|\n") +NULL_RE = re.compile(r"\0") + + +def normalize(state: StateCore) -> None: + # Normalize newlines + string = NEWLINES_RE.sub("\n", state.src) + + # Replace NULL characters + string = NULL_RE.sub("\ufffd", string) + + state.src = string diff --git a/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/rules_core/replacements.py b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/rules_core/replacements.py new file mode 100644 index 0000000000000000000000000000000000000000..bcc9980046bf76723245b1ca2543af132efe5541 --- /dev/null +++ b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/rules_core/replacements.py @@ -0,0 +1,127 @@ +"""Simple typographic replacements + +* ``(c)``, ``(C)`` → © +* ``(tm)``, ``(TM)`` → ™ +* ``(r)``, ``(R)`` → ® +* ``+-`` → ± +* ``...`` → … +* ``?....`` → ?.. +* ``!....`` → !.. +* ``????????`` → ??? +* ``!!!!!`` → !!! +* ``,,,`` → , +* ``--`` → &ndash +* ``---`` → &mdash +""" + +from __future__ import annotations + +import logging +import re + +from ..token import Token +from .state_core import StateCore + +LOGGER = logging.getLogger(__name__) + +# TODO: +# - fractionals 1/2, 1/4, 3/4 -> ½, ¼, ¾ +# - multiplication 2 x 4 -> 2 × 4 + +RARE_RE = re.compile(r"\+-|\.\.|\?\?\?\?|!!!!|,,|--") + +# Workaround for phantomjs - need regex without /g flag, +# or root check will fail every second time +# SCOPED_ABBR_TEST_RE = r"\((c|tm|r)\)" + +SCOPED_ABBR_RE = re.compile(r"\((c|tm|r)\)", flags=re.IGNORECASE) + +PLUS_MINUS_RE = re.compile(r"\+-") + +ELLIPSIS_RE = re.compile(r"\.{2,}") + +ELLIPSIS_QUESTION_EXCLAMATION_RE = re.compile(r"([?!])…") + +QUESTION_EXCLAMATION_RE = re.compile(r"([?!]){4,}") + +COMMA_RE = re.compile(r",{2,}") + +EM_DASH_RE = re.compile(r"(^|[^-])---(?=[^-]|$)", flags=re.MULTILINE) + +EN_DASH_RE = re.compile(r"(^|\s)--(?=\s|$)", flags=re.MULTILINE) + +EN_DASH_INDENT_RE = re.compile(r"(^|[^-\s])--(?=[^-\s]|$)", flags=re.MULTILINE) + + +SCOPED_ABBR = {"c": "©", "r": "®", "tm": "™"} + + +def replaceFn(match: re.Match[str]) -> str: + return SCOPED_ABBR[match.group(1).lower()] + + +def replace_scoped(inlineTokens: list[Token]) -> None: + inside_autolink = 0 + + for token in inlineTokens: + if token.type == "text" and not inside_autolink: + token.content = SCOPED_ABBR_RE.sub(replaceFn, token.content) + + if token.type == "link_open" and token.info == "auto": + inside_autolink -= 1 + + if token.type == "link_close" and token.info == "auto": + inside_autolink += 1 + + +def replace_rare(inlineTokens: list[Token]) -> None: + inside_autolink = 0 + + for token in inlineTokens: + if ( + token.type == "text" + and (not inside_autolink) + and RARE_RE.search(token.content) + ): + # +- -> ± + token.content = PLUS_MINUS_RE.sub("±", token.content) + + # .., ..., ....... -> … + token.content = ELLIPSIS_RE.sub("…", token.content) + + # but ?..... & !..... -> ?.. & !.. + token.content = ELLIPSIS_QUESTION_EXCLAMATION_RE.sub("\\1..", token.content) + token.content = QUESTION_EXCLAMATION_RE.sub("\\1\\1\\1", token.content) + + # ,, ,,, ,,,, -> , + token.content = COMMA_RE.sub(",", token.content) + + # em-dash + token.content = EM_DASH_RE.sub("\\1\u2014", token.content) + + # en-dash + token.content = EN_DASH_RE.sub("\\1\u2013", token.content) + token.content = EN_DASH_INDENT_RE.sub("\\1\u2013", token.content) + + if token.type == "link_open" and token.info == "auto": + inside_autolink -= 1 + + if token.type == "link_close" and token.info == "auto": + inside_autolink += 1 + + +def replace(state: StateCore) -> None: + if not state.md.options.typographer: + return + + for token in state.tokens: + if token.type != "inline": + continue + if token.children is None: + continue + + if SCOPED_ABBR_RE.search(token.content): + replace_scoped(token.children) + + if RARE_RE.search(token.content): + replace_rare(token.children) diff --git a/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/rules_core/smartquotes.py b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/rules_core/smartquotes.py new file mode 100644 index 0000000000000000000000000000000000000000..f9b8b457b6c134f5736fabd3b14dc746e75ab86b --- /dev/null +++ b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/rules_core/smartquotes.py @@ -0,0 +1,202 @@ +"""Convert straight quotation marks to typographic ones""" + +from __future__ import annotations + +import re +from typing import Any + +from ..common.utils import charCodeAt, isMdAsciiPunct, isPunctChar, isWhiteSpace +from ..token import Token +from .state_core import StateCore + +QUOTE_TEST_RE = re.compile(r"['\"]") +QUOTE_RE = re.compile(r"['\"]") +APOSTROPHE = "\u2019" # ’ + + +def replaceAt(string: str, index: int, ch: str) -> str: + # When the index is negative, the behavior is different from the js version. + # But basically, the index will not be negative. + assert index >= 0 + return string[:index] + ch + string[index + 1 :] + + +def process_inlines(tokens: list[Token], state: StateCore) -> None: + stack: list[dict[str, Any]] = [] + + for i, token in enumerate(tokens): + thisLevel = token.level + + j = 0 + for j in range(len(stack))[::-1]: + if stack[j]["level"] <= thisLevel: + break + else: + # When the loop is terminated without a "break". + # Subtract 1 to get the same index as the js version. + j -= 1 + + stack = stack[: j + 1] + + if token.type != "text": + continue + + text = token.content + pos = 0 + maximum = len(text) + + while pos < maximum: + goto_outer = False + lastIndex = pos + t = QUOTE_RE.search(text[lastIndex:]) + if not t: + break + + canOpen = canClose = True + pos = t.start(0) + lastIndex + 1 + isSingle = t.group(0) == "'" + + # Find previous character, + # default to space if it's the beginning of the line + lastChar: None | int = 0x20 + + if t.start(0) + lastIndex - 1 >= 0: + lastChar = charCodeAt(text, t.start(0) + lastIndex - 1) + else: + for j in range(i)[::-1]: + if tokens[j].type == "softbreak" or tokens[j].type == "hardbreak": + break + # should skip all tokens except 'text', 'html_inline' or 'code_inline' + if not tokens[j].content: + continue + + lastChar = charCodeAt(tokens[j].content, len(tokens[j].content) - 1) + break + + # Find next character, + # default to space if it's the end of the line + nextChar: None | int = 0x20 + + if pos < maximum: + nextChar = charCodeAt(text, pos) + else: + for j in range(i + 1, len(tokens)): + # nextChar defaults to 0x20 + if tokens[j].type == "softbreak" or tokens[j].type == "hardbreak": + break + # should skip all tokens except 'text', 'html_inline' or 'code_inline' + if not tokens[j].content: + continue + + nextChar = charCodeAt(tokens[j].content, 0) + break + + isLastPunctChar = lastChar is not None and ( + isMdAsciiPunct(lastChar) or isPunctChar(chr(lastChar)) + ) + isNextPunctChar = nextChar is not None and ( + isMdAsciiPunct(nextChar) or isPunctChar(chr(nextChar)) + ) + + isLastWhiteSpace = lastChar is not None and isWhiteSpace(lastChar) + isNextWhiteSpace = nextChar is not None and isWhiteSpace(nextChar) + + if isNextWhiteSpace: # noqa: SIM114 + canOpen = False + elif isNextPunctChar and not (isLastWhiteSpace or isLastPunctChar): + canOpen = False + + if isLastWhiteSpace: # noqa: SIM114 + canClose = False + elif isLastPunctChar and not (isNextWhiteSpace or isNextPunctChar): + canClose = False + + if nextChar == 0x22 and t.group(0) == '"': # 0x22: " # noqa: SIM102 + if ( + lastChar is not None and lastChar >= 0x30 and lastChar <= 0x39 + ): # 0x30: 0, 0x39: 9 + # special case: 1"" - count first quote as an inch + canClose = canOpen = False + + if canOpen and canClose: + # Replace quotes in the middle of punctuation sequence, but not + # in the middle of the words, i.e.: + # + # 1. foo " bar " baz - not replaced + # 2. foo-"-bar-"-baz - replaced + # 3. foo"bar"baz - not replaced + canOpen = isLastPunctChar + canClose = isNextPunctChar + + if not canOpen and not canClose: + # middle of word + if isSingle: + token.content = replaceAt( + token.content, t.start(0) + lastIndex, APOSTROPHE + ) + continue + + if canClose: + # this could be a closing quote, rewind the stack to get a match + for j in range(len(stack))[::-1]: + item = stack[j] + if stack[j]["level"] < thisLevel: + break + if item["single"] == isSingle and stack[j]["level"] == thisLevel: + item = stack[j] + + if isSingle: + openQuote = state.md.options.quotes[2] + closeQuote = state.md.options.quotes[3] + else: + openQuote = state.md.options.quotes[0] + closeQuote = state.md.options.quotes[1] + + # replace token.content *before* tokens[item.token].content, + # because, if they are pointing at the same token, replaceAt + # could mess up indices when quote length != 1 + token.content = replaceAt( + token.content, t.start(0) + lastIndex, closeQuote + ) + tokens[item["token"]].content = replaceAt( + tokens[item["token"]].content, item["pos"], openQuote + ) + + pos += len(closeQuote) - 1 + if item["token"] == i: + pos += len(openQuote) - 1 + + text = token.content + maximum = len(text) + + stack = stack[:j] + goto_outer = True + break + if goto_outer: + goto_outer = False + continue + + if canOpen: + stack.append( + { + "token": i, + "pos": t.start(0) + lastIndex, + "single": isSingle, + "level": thisLevel, + } + ) + elif canClose and isSingle: + token.content = replaceAt( + token.content, t.start(0) + lastIndex, APOSTROPHE + ) + + +def smartquotes(state: StateCore) -> None: + if not state.md.options.typographer: + return + + for token in state.tokens: + if token.type != "inline" or not QUOTE_RE.search(token.content): + continue + if token.children is not None: + process_inlines(token.children, state) diff --git a/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/rules_core/state_core.py b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/rules_core/state_core.py new file mode 100644 index 0000000000000000000000000000000000000000..a938041d992fdf7ae3f2843a2e0f9ef298c45790 --- /dev/null +++ b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/rules_core/state_core.py @@ -0,0 +1,25 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING + +from ..ruler import StateBase +from ..token import Token +from ..utils import EnvType + +if TYPE_CHECKING: + from markdown_it import MarkdownIt + + +class StateCore(StateBase): + def __init__( + self, + src: str, + md: MarkdownIt, + env: EnvType, + tokens: list[Token] | None = None, + ) -> None: + self.src = src + self.md = md # link to parser instance + self.env = env + self.tokens: list[Token] = tokens or [] + self.inlineMode = False diff --git a/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/rules_core/text_join.py b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/rules_core/text_join.py new file mode 100644 index 0000000000000000000000000000000000000000..5379f6d7a8e9ea3ee27a6462a4108a26549ae520 --- /dev/null +++ b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/rules_core/text_join.py @@ -0,0 +1,35 @@ +"""Join raw text tokens with the rest of the text + +This is set as a separate rule to provide an opportunity for plugins +to run text replacements after text join, but before escape join. + +For example, `\\:)` shouldn't be replaced with an emoji. +""" + +from __future__ import annotations + +from ..token import Token +from .state_core import StateCore + + +def text_join(state: StateCore) -> None: + """Join raw text for escape sequences (`text_special`) tokens with the rest of the text""" + + for inline_token in state.tokens[:]: + if inline_token.type != "inline": + continue + + # convert text_special to text and join all adjacent text nodes + new_tokens: list[Token] = [] + for child_token in inline_token.children or []: + if child_token.type == "text_special": + child_token.type = "text" + if ( + child_token.type == "text" + and new_tokens + and new_tokens[-1].type == "text" + ): + new_tokens[-1].content += child_token.content + else: + new_tokens.append(child_token) + inline_token.children = new_tokens diff --git a/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/rules_inline/__init__.py b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/rules_inline/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..d82ef8fbcca54eab4bbb40e8410104eef7a27f57 --- /dev/null +++ b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/rules_inline/__init__.py @@ -0,0 +1,31 @@ +__all__ = ( + "StateInline", + "autolink", + "backtick", + "emphasis", + "entity", + "escape", + "fragments_join", + "html_inline", + "image", + "link", + "link_pairs", + "linkify", + "newline", + "strikethrough", + "text", +) +from . import emphasis, strikethrough +from .autolink import autolink +from .backticks import backtick +from .balance_pairs import link_pairs +from .entity import entity +from .escape import escape +from .fragments_join import fragments_join +from .html_inline import html_inline +from .image import image +from .link import link +from .linkify import linkify +from .newline import newline +from .state_inline import StateInline +from .text import text diff --git a/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/rules_inline/autolink.py b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/rules_inline/autolink.py new file mode 100644 index 0000000000000000000000000000000000000000..6546e2502f93a1b38a49c3fd728963a156cf0243 --- /dev/null +++ b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/rules_inline/autolink.py @@ -0,0 +1,77 @@ +# Process autolinks '' +import re + +from .state_inline import StateInline + +EMAIL_RE = re.compile( + r"^([a-zA-Z0-9.!#$%&\'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)$" +) +AUTOLINK_RE = re.compile(r"^([a-zA-Z][a-zA-Z0-9+.\-]{1,31}):([^<>\x00-\x20]*)$") + + +def autolink(state: StateInline, silent: bool) -> bool: + pos = state.pos + + if state.src[pos] != "<": + return False + + start = state.pos + maximum = state.posMax + + while True: + pos += 1 + if pos >= maximum: + return False + + ch = state.src[pos] + + if ch == "<": + return False + if ch == ">": + break + + url = state.src[start + 1 : pos] + + if AUTOLINK_RE.search(url) is not None: + fullUrl = state.md.normalizeLink(url) + if not state.md.validateLink(fullUrl): + return False + + if not silent: + token = state.push("link_open", "a", 1) + token.attrs = {"href": fullUrl} + token.markup = "autolink" + token.info = "auto" + + token = state.push("text", "", 0) + token.content = state.md.normalizeLinkText(url) + + token = state.push("link_close", "a", -1) + token.markup = "autolink" + token.info = "auto" + + state.pos += len(url) + 2 + return True + + if EMAIL_RE.search(url) is not None: + fullUrl = state.md.normalizeLink("mailto:" + url) + if not state.md.validateLink(fullUrl): + return False + + if not silent: + token = state.push("link_open", "a", 1) + token.attrs = {"href": fullUrl} + token.markup = "autolink" + token.info = "auto" + + token = state.push("text", "", 0) + token.content = state.md.normalizeLinkText(url) + + token = state.push("link_close", "a", -1) + token.markup = "autolink" + token.info = "auto" + + state.pos += len(url) + 2 + return True + + return False diff --git a/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/rules_inline/backticks.py b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/rules_inline/backticks.py new file mode 100644 index 0000000000000000000000000000000000000000..fc60d6b15cdfa7012a05bcf1ccbb06f44d870dfd --- /dev/null +++ b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/rules_inline/backticks.py @@ -0,0 +1,72 @@ +# Parse backticks +import re + +from .state_inline import StateInline + +regex = re.compile("^ (.+) $") + + +def backtick(state: StateInline, silent: bool) -> bool: + pos = state.pos + + if state.src[pos] != "`": + return False + + start = pos + pos += 1 + maximum = state.posMax + + # scan marker length + while pos < maximum and (state.src[pos] == "`"): + pos += 1 + + marker = state.src[start:pos] + openerLength = len(marker) + + if state.backticksScanned and state.backticks.get(openerLength, 0) <= start: + if not silent: + state.pending += marker + state.pos += openerLength + return True + + matchStart = matchEnd = pos + + # Nothing found in the cache, scan until the end of the line (or until marker is found) + while True: + try: + matchStart = state.src.index("`", matchEnd) + except ValueError: + break + matchEnd = matchStart + 1 + + # scan marker length + while matchEnd < maximum and (state.src[matchEnd] == "`"): + matchEnd += 1 + + closerLength = matchEnd - matchStart + + if closerLength == openerLength: + # Found matching closer length. + if not silent: + token = state.push("code_inline", "code", 0) + token.markup = marker + token.content = state.src[pos:matchStart].replace("\n", " ") + if ( + token.content.startswith(" ") + and token.content.endswith(" ") + and len(token.content.strip()) > 0 + ): + token.content = token.content[1:-1] + state.pos = matchEnd + return True + + # Some different length found, put it in cache as upper limit of where closer can be found + state.backticks[closerLength] = matchStart + + # Scanned through the end, didn't find anything + state.backticksScanned = True + + if not silent: + state.pending += marker + state.pos += openerLength + return True diff --git a/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/rules_inline/balance_pairs.py b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/rules_inline/balance_pairs.py new file mode 100644 index 0000000000000000000000000000000000000000..9c63b27f7186eb99c61938d27309fda7e900b88d --- /dev/null +++ b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/rules_inline/balance_pairs.py @@ -0,0 +1,138 @@ +"""Balance paired characters (*, _, etc) in inline tokens.""" + +from __future__ import annotations + +from .state_inline import Delimiter, StateInline + + +def processDelimiters(state: StateInline, delimiters: list[Delimiter]) -> None: + """For each opening emphasis-like marker find a matching closing one.""" + if not delimiters: + return + + openersBottom = {} + maximum = len(delimiters) + + # headerIdx is the first delimiter of the current (where closer is) delimiter run + headerIdx = 0 + lastTokenIdx = -2 # needs any value lower than -1 + jumps: list[int] = [] + closerIdx = 0 + while closerIdx < maximum: + closer = delimiters[closerIdx] + + jumps.append(0) + + # markers belong to same delimiter run if: + # - they have adjacent tokens + # - AND markers are the same + # + if ( + delimiters[headerIdx].marker != closer.marker + or lastTokenIdx != closer.token - 1 + ): + headerIdx = closerIdx + lastTokenIdx = closer.token + + # Length is only used for emphasis-specific "rule of 3", + # if it's not defined (in strikethrough or 3rd party plugins), + # we can default it to 0 to disable those checks. + # + closer.length = closer.length or 0 + + if not closer.close: + closerIdx += 1 + continue + + # Previously calculated lower bounds (previous fails) + # for each marker, each delimiter length modulo 3, + # and for whether this closer can be an opener; + # https://github.com/commonmark/cmark/commit/34250e12ccebdc6372b8b49c44fab57c72443460 + if closer.marker not in openersBottom: + openersBottom[closer.marker] = [-1, -1, -1, -1, -1, -1] + + minOpenerIdx = openersBottom[closer.marker][ + (3 if closer.open else 0) + (closer.length % 3) + ] + + openerIdx = headerIdx - jumps[headerIdx] - 1 + + newMinOpenerIdx = openerIdx + + while openerIdx > minOpenerIdx: + opener = delimiters[openerIdx] + + if opener.marker != closer.marker: + openerIdx -= jumps[openerIdx] + 1 + continue + + if opener.open and opener.end < 0: + isOddMatch = False + + # from spec: + # + # If one of the delimiters can both open and close emphasis, then the + # sum of the lengths of the delimiter runs containing the opening and + # closing delimiters must not be a multiple of 3 unless both lengths + # are multiples of 3. + # + if ( + (opener.close or closer.open) + and ((opener.length + closer.length) % 3 == 0) + and (opener.length % 3 != 0 or closer.length % 3 != 0) + ): + isOddMatch = True + + if not isOddMatch: + # If previous delimiter cannot be an opener, we can safely skip + # the entire sequence in future checks. This is required to make + # sure algorithm has linear complexity (see *_*_*_*_*_... case). + # + if openerIdx > 0 and not delimiters[openerIdx - 1].open: + lastJump = jumps[openerIdx - 1] + 1 + else: + lastJump = 0 + + jumps[closerIdx] = closerIdx - openerIdx + lastJump + jumps[openerIdx] = lastJump + + closer.open = False + opener.end = closerIdx + opener.close = False + newMinOpenerIdx = -1 + + # treat next token as start of run, + # it optimizes skips in **<...>**a**<...>** pathological case + lastTokenIdx = -2 + + break + + openerIdx -= jumps[openerIdx] + 1 + + if newMinOpenerIdx != -1: + # If match for this delimiter run failed, we want to set lower bound for + # future lookups. This is required to make sure algorithm has linear + # complexity. + # + # See details here: + # https:#github.com/commonmark/cmark/issues/178#issuecomment-270417442 + # + openersBottom[closer.marker][ + (3 if closer.open else 0) + ((closer.length or 0) % 3) + ] = newMinOpenerIdx + + closerIdx += 1 + + +def link_pairs(state: StateInline) -> None: + tokens_meta = state.tokens_meta + maximum = len(state.tokens_meta) + + processDelimiters(state, state.delimiters) + + curr = 0 + while curr < maximum: + curr_meta = tokens_meta[curr] + if curr_meta and "delimiters" in curr_meta: + processDelimiters(state, curr_meta["delimiters"]) + curr += 1 diff --git a/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/rules_inline/emphasis.py b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/rules_inline/emphasis.py new file mode 100644 index 0000000000000000000000000000000000000000..9a98f9e216c94db0217e986270aaaa72fcc99f7f --- /dev/null +++ b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/rules_inline/emphasis.py @@ -0,0 +1,102 @@ +# Process *this* and _that_ +# +from __future__ import annotations + +from .state_inline import Delimiter, StateInline + + +def tokenize(state: StateInline, silent: bool) -> bool: + """Insert each marker as a separate text token, and add it to delimiter list""" + start = state.pos + marker = state.src[start] + + if silent: + return False + + if marker not in ("_", "*"): + return False + + scanned = state.scanDelims(state.pos, marker == "*") + + for _ in range(scanned.length): + token = state.push("text", "", 0) + token.content = marker + state.delimiters.append( + Delimiter( + marker=ord(marker), + length=scanned.length, + token=len(state.tokens) - 1, + end=-1, + open=scanned.can_open, + close=scanned.can_close, + ) + ) + + state.pos += scanned.length + + return True + + +def _postProcess(state: StateInline, delimiters: list[Delimiter]) -> None: + i = len(delimiters) - 1 + while i >= 0: + startDelim = delimiters[i] + + # /* _ */ /* * */ + if startDelim.marker != 0x5F and startDelim.marker != 0x2A: + i -= 1 + continue + + # Process only opening markers + if startDelim.end == -1: + i -= 1 + continue + + endDelim = delimiters[startDelim.end] + + # If the previous delimiter has the same marker and is adjacent to this one, + # merge those into one strong delimiter. + # + # `whatever` -> `whatever` + # + isStrong = ( + i > 0 + and delimiters[i - 1].end == startDelim.end + 1 + # check that first two markers match and adjacent + and delimiters[i - 1].marker == startDelim.marker + and delimiters[i - 1].token == startDelim.token - 1 + # check that last two markers are adjacent (we can safely assume they match) + and delimiters[startDelim.end + 1].token == endDelim.token + 1 + ) + + ch = chr(startDelim.marker) + + token = state.tokens[startDelim.token] + token.type = "strong_open" if isStrong else "em_open" + token.tag = "strong" if isStrong else "em" + token.nesting = 1 + token.markup = ch + ch if isStrong else ch + token.content = "" + + token = state.tokens[endDelim.token] + token.type = "strong_close" if isStrong else "em_close" + token.tag = "strong" if isStrong else "em" + token.nesting = -1 + token.markup = ch + ch if isStrong else ch + token.content = "" + + if isStrong: + state.tokens[delimiters[i - 1].token].content = "" + state.tokens[delimiters[startDelim.end + 1].token].content = "" + i -= 1 + + i -= 1 + + +def postProcess(state: StateInline) -> None: + """Walk through delimiter list and replace text tokens with tags.""" + _postProcess(state, state.delimiters) + + for token in state.tokens_meta: + if token and "delimiters" in token: + _postProcess(state, token["delimiters"]) diff --git a/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/rules_inline/entity.py b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/rules_inline/entity.py new file mode 100644 index 0000000000000000000000000000000000000000..ec9d39650e5bc533e694d3d6699677068d22c69f --- /dev/null +++ b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/rules_inline/entity.py @@ -0,0 +1,53 @@ +# Process html entity - {, ¯, ", ... +import re + +from ..common.entities import entities +from ..common.utils import fromCodePoint, isValidEntityCode +from .state_inline import StateInline + +DIGITAL_RE = re.compile(r"^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));", re.IGNORECASE) +NAMED_RE = re.compile(r"^&([a-z][a-z0-9]{1,31});", re.IGNORECASE) + + +def entity(state: StateInline, silent: bool) -> bool: + pos = state.pos + maximum = state.posMax + + if state.src[pos] != "&": + return False + + if pos + 1 >= maximum: + return False + + if state.src[pos + 1] == "#": + if match := DIGITAL_RE.search(state.src[pos:]): + if not silent: + match1 = match.group(1) + code = ( + int(match1[1:], 16) if match1[0].lower() == "x" else int(match1, 10) + ) + + token = state.push("text_special", "", 0) + token.content = ( + fromCodePoint(code) + if isValidEntityCode(code) + else fromCodePoint(0xFFFD) + ) + token.markup = match.group(0) + token.info = "entity" + + state.pos += len(match.group(0)) + return True + + else: + if (match := NAMED_RE.search(state.src[pos:])) and match.group(1) in entities: + if not silent: + token = state.push("text_special", "", 0) + token.content = entities[match.group(1)] + token.markup = match.group(0) + token.info = "entity" + + state.pos += len(match.group(0)) + return True + + return False diff --git a/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/rules_inline/escape.py b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/rules_inline/escape.py new file mode 100644 index 0000000000000000000000000000000000000000..0fca6c84e035b83b21d5224be92fd4973f25b80b --- /dev/null +++ b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/rules_inline/escape.py @@ -0,0 +1,93 @@ +""" +Process escaped chars and hardbreaks +""" + +from ..common.utils import isStrSpace +from .state_inline import StateInline + + +def escape(state: StateInline, silent: bool) -> bool: + """Process escaped chars and hardbreaks.""" + pos = state.pos + maximum = state.posMax + + if state.src[pos] != "\\": + return False + + pos += 1 + + # '\' at the end of the inline block + if pos >= maximum: + return False + + ch1 = state.src[pos] + ch1_ord = ord(ch1) + if ch1 == "\n": + if not silent: + state.push("hardbreak", "br", 0) + pos += 1 + # skip leading whitespaces from next line + while pos < maximum: + ch = state.src[pos] + if not isStrSpace(ch): + break + pos += 1 + + state.pos = pos + return True + + escapedStr = state.src[pos] + + if ch1_ord >= 0xD800 and ch1_ord <= 0xDBFF and pos + 1 < maximum: + ch2 = state.src[pos + 1] + ch2_ord = ord(ch2) + if ch2_ord >= 0xDC00 and ch2_ord <= 0xDFFF: + escapedStr += ch2 + pos += 1 + + origStr = "\\" + escapedStr + + if not silent: + token = state.push("text_special", "", 0) + token.content = escapedStr if ch1 in _ESCAPED else origStr + token.markup = origStr + token.info = "escape" + + state.pos = pos + 1 + return True + + +_ESCAPED = { + "!", + '"', + "#", + "$", + "%", + "&", + "'", + "(", + ")", + "*", + "+", + ",", + "-", + ".", + "/", + ":", + ";", + "<", + "=", + ">", + "?", + "@", + "[", + "\\", + "]", + "^", + "_", + "`", + "{", + "|", + "}", + "~", +} diff --git a/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/rules_inline/fragments_join.py b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/rules_inline/fragments_join.py new file mode 100644 index 0000000000000000000000000000000000000000..f795c1364b8ac098b7a17f34cd31d7070280cf36 --- /dev/null +++ b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/rules_inline/fragments_join.py @@ -0,0 +1,43 @@ +from .state_inline import StateInline + + +def fragments_join(state: StateInline) -> None: + """ + Clean up tokens after emphasis and strikethrough postprocessing: + merge adjacent text nodes into one and re-calculate all token levels + + This is necessary because initially emphasis delimiter markers (``*, _, ~``) + are treated as their own separate text tokens. Then emphasis rule either + leaves them as text (needed to merge with adjacent text) or turns them + into opening/closing tags (which messes up levels inside). + """ + level = 0 + maximum = len(state.tokens) + + curr = last = 0 + while curr < maximum: + # re-calculate levels after emphasis/strikethrough turns some text nodes + # into opening/closing tags + if state.tokens[curr].nesting < 0: + level -= 1 # closing tag + state.tokens[curr].level = level + if state.tokens[curr].nesting > 0: + level += 1 # opening tag + + if ( + state.tokens[curr].type == "text" + and curr + 1 < maximum + and state.tokens[curr + 1].type == "text" + ): + # collapse two adjacent text nodes + state.tokens[curr + 1].content = ( + state.tokens[curr].content + state.tokens[curr + 1].content + ) + else: + if curr != last: + state.tokens[last] = state.tokens[curr] + last += 1 + curr += 1 + + if curr != last: + del state.tokens[last:] diff --git a/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/rules_inline/html_inline.py b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/rules_inline/html_inline.py new file mode 100644 index 0000000000000000000000000000000000000000..9065e1d034da76270f7d3f1ba528132c8d57d341 --- /dev/null +++ b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/rules_inline/html_inline.py @@ -0,0 +1,43 @@ +# Process html tags +from ..common.html_re import HTML_TAG_RE +from ..common.utils import isLinkClose, isLinkOpen +from .state_inline import StateInline + + +def isLetter(ch: int) -> bool: + lc = ch | 0x20 # to lower case + # /* a */ and /* z */ + return (lc >= 0x61) and (lc <= 0x7A) + + +def html_inline(state: StateInline, silent: bool) -> bool: + pos = state.pos + + if not state.md.options.get("html", None): + return False + + # Check start + maximum = state.posMax + if state.src[pos] != "<" or pos + 2 >= maximum: + return False + + # Quick fail on second char + ch = state.src[pos + 1] + if ch not in ("!", "?", "/") and not isLetter(ord(ch)): # /* / */ + return False + + match = HTML_TAG_RE.search(state.src[pos:]) + if not match: + return False + + if not silent: + token = state.push("html_inline", "", 0) + token.content = state.src[pos : pos + len(match.group(0))] + + if isLinkOpen(token.content): + state.linkLevel += 1 + if isLinkClose(token.content): + state.linkLevel -= 1 + + state.pos += len(match.group(0)) + return True diff --git a/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/rules_inline/image.py b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/rules_inline/image.py new file mode 100644 index 0000000000000000000000000000000000000000..005105b1c7ed1a93772c62af8bd5ef54d97dfebe --- /dev/null +++ b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/rules_inline/image.py @@ -0,0 +1,148 @@ +# Process ![image]( "title") +from __future__ import annotations + +from ..common.utils import isStrSpace, normalizeReference +from ..token import Token +from .state_inline import StateInline + + +def image(state: StateInline, silent: bool) -> bool: + label = None + href = "" + oldPos = state.pos + max = state.posMax + + if state.src[state.pos] != "!": + return False + + if state.pos + 1 < state.posMax and state.src[state.pos + 1] != "[": + return False + + labelStart = state.pos + 2 + labelEnd = state.md.helpers.parseLinkLabel(state, state.pos + 1, False) + + # parser failed to find ']', so it's not a valid link + if labelEnd < 0: + return False + + pos = labelEnd + 1 + + if pos < max and state.src[pos] == "(": + # + # Inline link + # + + # [link]( "title" ) + # ^^ skipping these spaces + pos += 1 + while pos < max: + ch = state.src[pos] + if not isStrSpace(ch) and ch != "\n": + break + pos += 1 + + if pos >= max: + return False + + # [link]( "title" ) + # ^^^^^^ parsing link destination + start = pos + res = state.md.helpers.parseLinkDestination(state.src, pos, state.posMax) + if res.ok: + href = state.md.normalizeLink(res.str) + if state.md.validateLink(href): + pos = res.pos + else: + href = "" + + # [link]( "title" ) + # ^^ skipping these spaces + start = pos + while pos < max: + ch = state.src[pos] + if not isStrSpace(ch) and ch != "\n": + break + pos += 1 + + # [link]( "title" ) + # ^^^^^^^ parsing link title + res = state.md.helpers.parseLinkTitle(state.src, pos, state.posMax, None) + if pos < max and start != pos and res.ok: + title = res.str + pos = res.pos + + # [link]( "title" ) + # ^^ skipping these spaces + while pos < max: + ch = state.src[pos] + if not isStrSpace(ch) and ch != "\n": + break + pos += 1 + else: + title = "" + + if pos >= max or state.src[pos] != ")": + state.pos = oldPos + return False + + pos += 1 + + else: + # + # Link reference + # + if "references" not in state.env: + return False + + # /* [ */ + if pos < max and state.src[pos] == "[": + start = pos + 1 + pos = state.md.helpers.parseLinkLabel(state, pos) + if pos >= 0: + label = state.src[start:pos] + pos += 1 + else: + pos = labelEnd + 1 + else: + pos = labelEnd + 1 + + # covers label == '' and label == undefined + # (collapsed reference link and shortcut reference link respectively) + if not label: + label = state.src[labelStart:labelEnd] + + label = normalizeReference(label) + + ref = state.env["references"].get(label, None) + if not ref: + state.pos = oldPos + return False + + href = ref["href"] + title = ref["title"] + + # + # We found the end of the link, and know for a fact it's a valid link + # so all that's left to do is to call tokenizer. + # + if not silent: + content = state.src[labelStart:labelEnd] + + tokens: list[Token] = [] + state.md.inline.parse(content, state.md, state.env, tokens) + + token = state.push("image", "img", 0) + token.attrs = {"src": href, "alt": ""} + token.children = tokens or None + token.content = content + + if title: + token.attrSet("title", title) + + # note, this is not part of markdown-it JS, but is useful for renderers + if label and state.md.options.get("store_labels", False): + token.meta["label"] = label + + state.pos = pos + state.posMax = max + return True diff --git a/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/rules_inline/link.py b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/rules_inline/link.py new file mode 100644 index 0000000000000000000000000000000000000000..2e92c7d83629f00283b5ed885637c8c4a851ffc7 --- /dev/null +++ b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/rules_inline/link.py @@ -0,0 +1,149 @@ +# Process [link]( "stuff") + +from ..common.utils import isStrSpace, normalizeReference +from .state_inline import StateInline + + +def link(state: StateInline, silent: bool) -> bool: + href = "" + title = "" + label = None + oldPos = state.pos + maximum = state.posMax + start = state.pos + parseReference = True + + if state.src[state.pos] != "[": + return False + + labelStart = state.pos + 1 + labelEnd = state.md.helpers.parseLinkLabel(state, state.pos, True) + + # parser failed to find ']', so it's not a valid link + if labelEnd < 0: + return False + + pos = labelEnd + 1 + + if pos < maximum and state.src[pos] == "(": + # + # Inline link + # + + # might have found a valid shortcut link, disable reference parsing + parseReference = False + + # [link]( "title" ) + # ^^ skipping these spaces + pos += 1 + while pos < maximum: + ch = state.src[pos] + if not isStrSpace(ch) and ch != "\n": + break + pos += 1 + + if pos >= maximum: + return False + + # [link]( "title" ) + # ^^^^^^ parsing link destination + start = pos + res = state.md.helpers.parseLinkDestination(state.src, pos, state.posMax) + if res.ok: + href = state.md.normalizeLink(res.str) + if state.md.validateLink(href): + pos = res.pos + else: + href = "" + + # [link]( "title" ) + # ^^ skipping these spaces + start = pos + while pos < maximum: + ch = state.src[pos] + if not isStrSpace(ch) and ch != "\n": + break + pos += 1 + + # [link]( "title" ) + # ^^^^^^^ parsing link title + res = state.md.helpers.parseLinkTitle(state.src, pos, state.posMax) + if pos < maximum and start != pos and res.ok: + title = res.str + pos = res.pos + + # [link]( "title" ) + # ^^ skipping these spaces + while pos < maximum: + ch = state.src[pos] + if not isStrSpace(ch) and ch != "\n": + break + pos += 1 + + if pos >= maximum or state.src[pos] != ")": + # parsing a valid shortcut link failed, fallback to reference + parseReference = True + + pos += 1 + + if parseReference: + # + # Link reference + # + if "references" not in state.env: + return False + + if pos < maximum and state.src[pos] == "[": + start = pos + 1 + pos = state.md.helpers.parseLinkLabel(state, pos) + if pos >= 0: + label = state.src[start:pos] + pos += 1 + else: + pos = labelEnd + 1 + + else: + pos = labelEnd + 1 + + # covers label == '' and label == undefined + # (collapsed reference link and shortcut reference link respectively) + if not label: + label = state.src[labelStart:labelEnd] + + label = normalizeReference(label) + + ref = state.env["references"].get(label, None) + if not ref: + state.pos = oldPos + return False + + href = ref["href"] + title = ref["title"] + + # + # We found the end of the link, and know for a fact it's a valid link + # so all that's left to do is to call tokenizer. + # + if not silent: + state.pos = labelStart + state.posMax = labelEnd + + token = state.push("link_open", "a", 1) + token.attrs = {"href": href} + + if title: + token.attrSet("title", title) + + # note, this is not part of markdown-it JS, but is useful for renderers + if label and state.md.options.get("store_labels", False): + token.meta["label"] = label + + state.linkLevel += 1 + state.md.inline.tokenize(state) + state.linkLevel -= 1 + + token = state.push("link_close", "a", -1) + + state.pos = pos + state.posMax = maximum + return True diff --git a/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/rules_inline/linkify.py b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/rules_inline/linkify.py new file mode 100644 index 0000000000000000000000000000000000000000..3669396e3e7d51c125678f45a862139fe3b3fd9d --- /dev/null +++ b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/rules_inline/linkify.py @@ -0,0 +1,62 @@ +"""Process links like https://example.org/""" + +import re + +from .state_inline import StateInline + +# RFC3986: scheme = ALPHA *( ALPHA / DIGIT / "+" / "-" / "." ) +SCHEME_RE = re.compile(r"(?:^|[^a-z0-9.+-])([a-z][a-z0-9.+-]*)$", re.IGNORECASE) + + +def linkify(state: StateInline, silent: bool) -> bool: + """Rule for identifying plain-text links.""" + if not state.md.options.linkify: + return False + if state.linkLevel > 0: + return False + if not state.md.linkify: + raise ModuleNotFoundError("Linkify enabled but not installed.") + + pos = state.pos + maximum = state.posMax + + if ( + (pos + 3) > maximum + or state.src[pos] != ":" + or state.src[pos + 1] != "/" + or state.src[pos + 2] != "/" + ): + return False + + if not (match := SCHEME_RE.search(state.pending)): + return False + + proto = match.group(1) + if not (link := state.md.linkify.match_at_start(state.src[pos - len(proto) :])): + return False + url: str = link.url + + # disallow '*' at the end of the link (conflicts with emphasis) + url = url.rstrip("*") + + full_url = state.md.normalizeLink(url) + if not state.md.validateLink(full_url): + return False + + if not silent: + state.pending = state.pending[: -len(proto)] + + token = state.push("link_open", "a", 1) + token.attrs = {"href": full_url} + token.markup = "linkify" + token.info = "auto" + + token = state.push("text", "", 0) + token.content = state.md.normalizeLinkText(url) + + token = state.push("link_close", "a", -1) + token.markup = "linkify" + token.info = "auto" + + state.pos += len(url) - len(proto) + return True diff --git a/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/rules_inline/newline.py b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/rules_inline/newline.py new file mode 100644 index 0000000000000000000000000000000000000000..d05ee6dac712a2211ab24f90dbea64a99e4d80b0 --- /dev/null +++ b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/rules_inline/newline.py @@ -0,0 +1,44 @@ +"""Proceess '\n'.""" + +from ..common.utils import charStrAt, isStrSpace +from .state_inline import StateInline + + +def newline(state: StateInline, silent: bool) -> bool: + pos = state.pos + + if state.src[pos] != "\n": + return False + + pmax = len(state.pending) - 1 + maximum = state.posMax + + # ' \n' -> hardbreak + # Lookup in pending chars is bad practice! Don't copy to other rules! + # Pending string is stored in concat mode, indexed lookups will cause + # conversion to flat mode. + if not silent: + if pmax >= 0 and charStrAt(state.pending, pmax) == " ": + if pmax >= 1 and charStrAt(state.pending, pmax - 1) == " ": + # Find whitespaces tail of pending chars. + ws = pmax - 1 + while ws >= 1 and charStrAt(state.pending, ws - 1) == " ": + ws -= 1 + state.pending = state.pending[:ws] + + state.push("hardbreak", "br", 0) + else: + state.pending = state.pending[:-1] + state.push("softbreak", "br", 0) + + else: + state.push("softbreak", "br", 0) + + pos += 1 + + # skip heading spaces for next line + while pos < maximum and isStrSpace(state.src[pos]): + pos += 1 + + state.pos = pos + return True diff --git a/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/rules_inline/state_inline.py b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/rules_inline/state_inline.py new file mode 100644 index 0000000000000000000000000000000000000000..50dc41294d6b3df03f73bfb40d740ea4ba36c8ee --- /dev/null +++ b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/rules_inline/state_inline.py @@ -0,0 +1,165 @@ +from __future__ import annotations + +from collections import namedtuple +from dataclasses import dataclass +from typing import TYPE_CHECKING, Any, Literal + +from ..common.utils import isMdAsciiPunct, isPunctChar, isWhiteSpace +from ..ruler import StateBase +from ..token import Token +from ..utils import EnvType + +if TYPE_CHECKING: + from markdown_it import MarkdownIt + + +@dataclass(slots=True) +class Delimiter: + # Char code of the starting marker (number). + marker: int + + # Total length of these series of delimiters. + length: int + + # A position of the token this delimiter corresponds to. + token: int + + # If this delimiter is matched as a valid opener, `end` will be + # equal to its position, otherwise it's `-1`. + end: int + + # Boolean flags that determine if this delimiter could open or close + # an emphasis. + open: bool + close: bool + + level: bool | None = None + + +Scanned = namedtuple("Scanned", ["can_open", "can_close", "length"]) + + +class StateInline(StateBase): + def __init__( + self, src: str, md: MarkdownIt, env: EnvType, outTokens: list[Token] + ) -> None: + self.src = src + self.env = env + self.md = md + self.tokens = outTokens + self.tokens_meta: list[dict[str, Any] | None] = [None] * len(outTokens) + + self.pos = 0 + self.posMax = len(self.src) + self.level = 0 + self.pending = "" + self.pendingLevel = 0 + + # Stores { start: end } pairs. Useful for backtrack + # optimization of pairs parse (emphasis, strikes). + self.cache: dict[int, int] = {} + + # List of emphasis-like delimiters for current tag + self.delimiters: list[Delimiter] = [] + + # Stack of delimiter lists for upper level tags + self._prev_delimiters: list[list[Delimiter]] = [] + + # backticklength => last seen position + self.backticks: dict[int, int] = {} + self.backticksScanned = False + + # Counter used to disable inline linkify-it execution + # inside and markdown links + self.linkLevel = 0 + + def __repr__(self) -> str: + return ( + f"{self.__class__.__name__}" + f"(pos=[{self.pos} of {self.posMax}], token={len(self.tokens)})" + ) + + def pushPending(self) -> Token: + token = Token("text", "", 0) + token.content = self.pending + token.level = self.pendingLevel + self.tokens.append(token) + self.pending = "" + return token + + def push(self, ttype: str, tag: str, nesting: Literal[-1, 0, 1]) -> Token: + """Push new token to "stream". + If pending text exists - flush it as text token + """ + if self.pending: + self.pushPending() + + token = Token(ttype, tag, nesting) + token_meta = None + + if nesting < 0: + # closing tag + self.level -= 1 + self.delimiters = self._prev_delimiters.pop() + + token.level = self.level + + if nesting > 0: + # opening tag + self.level += 1 + self._prev_delimiters.append(self.delimiters) + self.delimiters = [] + token_meta = {"delimiters": self.delimiters} + + self.pendingLevel = self.level + self.tokens.append(token) + self.tokens_meta.append(token_meta) + return token + + def scanDelims(self, start: int, canSplitWord: bool) -> Scanned: + """ + Scan a sequence of emphasis-like markers, and determine whether + it can start an emphasis sequence or end an emphasis sequence. + + - start - position to scan from (it should point at a valid marker); + - canSplitWord - determine if these markers can be found inside a word + + """ + pos = start + maximum = self.posMax + marker = self.src[start] + + # treat beginning of the line as a whitespace + lastChar = self.src[start - 1] if start > 0 else " " + + while pos < maximum and self.src[pos] == marker: + pos += 1 + + count = pos - start + + # treat end of the line as a whitespace + nextChar = self.src[pos] if pos < maximum else " " + + isLastPunctChar = isMdAsciiPunct(ord(lastChar)) or isPunctChar(lastChar) + isNextPunctChar = isMdAsciiPunct(ord(nextChar)) or isPunctChar(nextChar) + + isLastWhiteSpace = isWhiteSpace(ord(lastChar)) + isNextWhiteSpace = isWhiteSpace(ord(nextChar)) + + left_flanking = not ( + isNextWhiteSpace + or (isNextPunctChar and not (isLastWhiteSpace or isLastPunctChar)) + ) + right_flanking = not ( + isLastWhiteSpace + or (isLastPunctChar and not (isNextWhiteSpace or isNextPunctChar)) + ) + + can_open = left_flanking and ( + canSplitWord or (not right_flanking) or isLastPunctChar + ) + can_close = right_flanking and ( + canSplitWord or (not left_flanking) or isNextPunctChar + ) + + return Scanned(can_open, can_close, count) diff --git a/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/rules_inline/strikethrough.py b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/rules_inline/strikethrough.py new file mode 100644 index 0000000000000000000000000000000000000000..ec816281d49b23d0774bf91db6600d996aaf8b06 --- /dev/null +++ b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/rules_inline/strikethrough.py @@ -0,0 +1,127 @@ +# ~~strike through~~ +from __future__ import annotations + +from .state_inline import Delimiter, StateInline + + +def tokenize(state: StateInline, silent: bool) -> bool: + """Insert each marker as a separate text token, and add it to delimiter list""" + start = state.pos + ch = state.src[start] + + if silent: + return False + + if ch != "~": + return False + + scanned = state.scanDelims(state.pos, True) + length = scanned.length + + if length < 2: + return False + + if length % 2: + token = state.push("text", "", 0) + token.content = ch + length -= 1 + + i = 0 + while i < length: + token = state.push("text", "", 0) + token.content = ch + ch + state.delimiters.append( + Delimiter( + marker=ord(ch), + length=0, # disable "rule of 3" length checks meant for emphasis + token=len(state.tokens) - 1, + end=-1, + open=scanned.can_open, + close=scanned.can_close, + ) + ) + + i += 2 + + state.pos += scanned.length + + return True + + +def _postProcess(state: StateInline, delimiters: list[Delimiter]) -> None: + loneMarkers = [] + maximum = len(delimiters) + + i = 0 + while i < maximum: + startDelim = delimiters[i] + + if startDelim.marker != 0x7E: # /* ~ */ + i += 1 + continue + + if startDelim.end == -1: + i += 1 + continue + + endDelim = delimiters[startDelim.end] + + token = state.tokens[startDelim.token] + token.type = "s_open" + token.tag = "s" + token.nesting = 1 + token.markup = "~~" + token.content = "" + + token = state.tokens[endDelim.token] + token.type = "s_close" + token.tag = "s" + token.nesting = -1 + token.markup = "~~" + token.content = "" + + if ( + state.tokens[endDelim.token - 1].type == "text" + and state.tokens[endDelim.token - 1].content == "~" + ): + loneMarkers.append(endDelim.token - 1) + + i += 1 + + # If a marker sequence has an odd number of characters, it's split + # like this: `~~~~~` -> `~` + `~~` + `~~`, leaving one marker at the + # start of the sequence. + # + # So, we have to move all those markers after subsequent s_close tags. + # + while loneMarkers: + i = loneMarkers.pop() + j = i + 1 + + while (j < len(state.tokens)) and (state.tokens[j].type == "s_close"): + j += 1 + + j -= 1 + + if i != j: + token = state.tokens[j] + state.tokens[j] = state.tokens[i] + state.tokens[i] = token + + +def postProcess(state: StateInline) -> None: + """Walk through delimiter list and replace text tokens with tags.""" + tokens_meta = state.tokens_meta + maximum = len(state.tokens_meta) + _postProcess(state, state.delimiters) + + curr = 0 + while curr < maximum: + try: + curr_meta = tokens_meta[curr] + except IndexError: + pass + else: + if curr_meta and "delimiters" in curr_meta: + _postProcess(state, curr_meta["delimiters"]) + curr += 1 diff --git a/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/rules_inline/text.py b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/rules_inline/text.py new file mode 100644 index 0000000000000000000000000000000000000000..18b2fcc7a8f5a40d4820df53838d29fcce833f3f --- /dev/null +++ b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/rules_inline/text.py @@ -0,0 +1,62 @@ +import functools +import re + +# Skip text characters for text token, place those to pending buffer +# and increment current pos +from .state_inline import StateInline + +# Rule to skip pure text +# '{}$%@~+=:' reserved for extensions + +# !!!! Don't confuse with "Markdown ASCII Punctuation" chars +# http://spec.commonmark.org/0.15/#ascii-punctuation-character + + +_TerminatorChars = { + "\n", + "!", + "#", + "$", + "%", + "&", + "*", + "+", + "-", + ":", + "<", + "=", + ">", + "@", + "[", + "\\", + "]", + "^", + "_", + "`", + "{", + "}", + "~", +} + + +@functools.cache +def _terminator_char_regex() -> re.Pattern[str]: + return re.compile("[" + re.escape("".join(_TerminatorChars)) + "]") + + +def text(state: StateInline, silent: bool) -> bool: + pos = state.pos + posMax = state.posMax + + terminator_char = _terminator_char_regex().search(state.src, pos) + pos = terminator_char.start() if terminator_char else posMax + + if pos == state.pos: + return False + + if not silent: + state.pending += state.src[state.pos : pos] + + state.pos = pos + + return True diff --git a/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/token.py b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/token.py new file mode 100644 index 0000000000000000000000000000000000000000..d6d0b4530d283f4fb925ca4e95c75eef0818117d --- /dev/null +++ b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/token.py @@ -0,0 +1,178 @@ +from __future__ import annotations + +from collections.abc import Callable, MutableMapping +import dataclasses as dc +from typing import Any, Literal +import warnings + + +def convert_attrs(value: Any) -> Any: + """Convert Token.attrs set as ``None`` or ``[[key, value], ...]`` to a dict. + + This improves compatibility with upstream markdown-it. + """ + if not value: + return {} + if isinstance(value, list): + return dict(value) + return value + + +@dc.dataclass(slots=True) +class Token: + type: str + """Type of the token (string, e.g. "paragraph_open")""" + + tag: str + """HTML tag name, e.g. 'p'""" + + nesting: Literal[-1, 0, 1] + """Level change (number in {-1, 0, 1} set), where: + - `1` means the tag is opening + - `0` means the tag is self-closing + - `-1` means the tag is closing + """ + + attrs: dict[str, str | int | float] = dc.field(default_factory=dict) + """HTML attributes. + Note this differs from the upstream "list of lists" format, + although than an instance can still be initialised with this format. + """ + + map: list[int] | None = None + """Source map info. Format: `[ line_begin, line_end ]`""" + + level: int = 0 + """Nesting level, the same as `state.level`""" + + children: list[Token] | None = None + """Array of child nodes (inline and img tokens).""" + + content: str = "" + """Inner content, in the case of a self-closing tag (code, html, fence, etc.),""" + + markup: str = "" + """'*' or '_' for emphasis, fence string for fence, etc.""" + + info: str = "" + """Additional information: + - Info string for "fence" tokens + - The value "auto" for autolink "link_open" and "link_close" tokens + - The string value of the item marker for ordered-list "list_item_open" tokens + """ + + meta: dict[Any, Any] = dc.field(default_factory=dict) + """A place for plugins to store any arbitrary data""" + + block: bool = False + """True for block-level tokens, false for inline tokens. + Used in renderer to calculate line breaks + """ + + hidden: bool = False + """If true, ignore this element when rendering. + Used for tight lists to hide paragraphs. + """ + + def __post_init__(self) -> None: + self.attrs = convert_attrs(self.attrs) + + def attrIndex(self, name: str) -> int: + warnings.warn( # noqa: B028 + "Token.attrIndex should not be used, since Token.attrs is a dictionary", + UserWarning, + ) + if name not in self.attrs: + return -1 + return list(self.attrs.keys()).index(name) + + def attrItems(self) -> list[tuple[str, str | int | float]]: + """Get (key, value) list of attrs.""" + return list(self.attrs.items()) + + def attrPush(self, attrData: tuple[str, str | int | float]) -> None: + """Add `[ name, value ]` attribute to list. Init attrs if necessary.""" + name, value = attrData + self.attrSet(name, value) + + def attrSet(self, name: str, value: str | int | float) -> None: + """Set `name` attribute to `value`. Override old value if exists.""" + self.attrs[name] = value + + def attrGet(self, name: str) -> None | str | int | float: + """Get the value of attribute `name`, or null if it does not exist.""" + return self.attrs.get(name, None) + + def attrJoin(self, name: str, value: str) -> None: + """Join value to existing attribute via space. + Or create new attribute if not exists. + Useful to operate with token classes. + """ + if name in self.attrs: + current = self.attrs[name] + if not isinstance(current, str): + raise TypeError( + f"existing attr 'name' is not a str: {self.attrs[name]}" + ) + self.attrs[name] = f"{current} {value}" + else: + self.attrs[name] = value + + def copy(self, **changes: Any) -> Token: + """Return a shallow copy of the instance.""" + return dc.replace(self, **changes) + + def as_dict( + self, + *, + children: bool = True, + as_upstream: bool = True, + meta_serializer: Callable[[dict[Any, Any]], Any] | None = None, + filter: Callable[[str, Any], bool] | None = None, + dict_factory: Callable[..., MutableMapping[str, Any]] = dict, + ) -> MutableMapping[str, Any]: + """Return the token as a dictionary. + + :param children: Also convert children to dicts + :param as_upstream: Ensure the output dictionary is equal to that created by markdown-it + For example, attrs are converted to null or lists + :param meta_serializer: hook for serializing ``Token.meta`` + :param filter: A callable whose return code determines whether an + attribute or element is included (``True``) or dropped (``False``). + Is called with the (key, value) pair. + :param dict_factory: A callable to produce dictionaries from. + For example, to produce ordered dictionaries instead of normal Python + dictionaries, pass in ``collections.OrderedDict``. + + """ + mapping = dict_factory((f.name, getattr(self, f.name)) for f in dc.fields(self)) + if filter: + mapping = dict_factory((k, v) for k, v in mapping.items() if filter(k, v)) + if as_upstream and "attrs" in mapping: + mapping["attrs"] = ( + None + if not mapping["attrs"] + else [[k, v] for k, v in mapping["attrs"].items()] + ) + if meta_serializer and "meta" in mapping: + mapping["meta"] = meta_serializer(mapping["meta"]) + if children and mapping.get("children", None): + mapping["children"] = [ + child.as_dict( + children=children, + filter=filter, + dict_factory=dict_factory, + as_upstream=as_upstream, + meta_serializer=meta_serializer, + ) + for child in mapping["children"] + ] + return mapping + + @classmethod + def from_dict(cls, dct: MutableMapping[str, Any]) -> Token: + """Convert a dict to a Token.""" + token = cls(**dct) + if token.children: + token.children = [cls.from_dict(c) for c in token.children] # type: ignore[arg-type] + return token diff --git a/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/tree.py b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/tree.py new file mode 100644 index 0000000000000000000000000000000000000000..5369157bc3caeda3ca53c5cdaaef28a94e47c522 --- /dev/null +++ b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/tree.py @@ -0,0 +1,333 @@ +"""A tree representation of a linear markdown-it token stream. + +This module is not part of upstream JavaScript markdown-it. +""" + +from __future__ import annotations + +from collections.abc import Generator, Sequence +import textwrap +from typing import Any, NamedTuple, TypeVar, overload + +from .token import Token + + +class _NesterTokens(NamedTuple): + opening: Token + closing: Token + + +_NodeType = TypeVar("_NodeType", bound="SyntaxTreeNode") + + +class SyntaxTreeNode: + """A Markdown syntax tree node. + + A class that can be used to construct a tree representation of a linear + `markdown-it-py` token stream. + + Each node in the tree represents either: + - root of the Markdown document + - a single unnested `Token` + - a `Token` "_open" and "_close" token pair, and the tokens nested in + between + """ + + def __init__( + self, tokens: Sequence[Token] = (), *, create_root: bool = True + ) -> None: + """Initialize a `SyntaxTreeNode` from a token stream. + + If `create_root` is True, create a root node for the document. + """ + # Only nodes representing an unnested token have self.token + self.token: Token | None = None + + # Only containers have nester tokens + self.nester_tokens: _NesterTokens | None = None + + # Root node does not have self.parent + self._parent: Any = None + + # Empty list unless a non-empty container, or unnested token that has + # children (i.e. inline or img) + self._children: list[Any] = [] + + if create_root: + self._set_children_from_tokens(tokens) + return + + if not tokens: + raise ValueError( + "Can only create root from empty token sequence." + " Set `create_root=True`." + ) + elif len(tokens) == 1: + inline_token = tokens[0] + if inline_token.nesting: + raise ValueError( + "Unequal nesting level at the start and end of token stream." + ) + self.token = inline_token + if inline_token.children: + self._set_children_from_tokens(inline_token.children) + else: + self.nester_tokens = _NesterTokens(tokens[0], tokens[-1]) + self._set_children_from_tokens(tokens[1:-1]) + + def __repr__(self) -> str: + return f"{type(self).__name__}({self.type})" + + @overload + def __getitem__(self: _NodeType, item: int) -> _NodeType: ... + + @overload + def __getitem__(self: _NodeType, item: slice) -> list[_NodeType]: ... + + def __getitem__(self: _NodeType, item: int | slice) -> _NodeType | list[_NodeType]: + return self.children[item] + + def to_tokens(self: _NodeType) -> list[Token]: + """Recover the linear token stream.""" + + def recursive_collect_tokens(node: _NodeType, token_list: list[Token]) -> None: + if node.type == "root": + for child in node.children: + recursive_collect_tokens(child, token_list) + elif node.token: + token_list.append(node.token) + else: + assert node.nester_tokens + token_list.append(node.nester_tokens.opening) + for child in node.children: + recursive_collect_tokens(child, token_list) + token_list.append(node.nester_tokens.closing) + + tokens: list[Token] = [] + recursive_collect_tokens(self, tokens) + return tokens + + @property + def children(self: _NodeType) -> list[_NodeType]: + return self._children + + @children.setter + def children(self: _NodeType, value: list[_NodeType]) -> None: + self._children = value + + @property + def parent(self: _NodeType) -> _NodeType | None: + return self._parent # type: ignore + + @parent.setter + def parent(self: _NodeType, value: _NodeType | None) -> None: + self._parent = value + + @property + def is_root(self) -> bool: + """Is the node a special root node?""" + return not (self.token or self.nester_tokens) + + @property + def is_nested(self) -> bool: + """Is this node nested?. + + Returns `True` if the node represents a `Token` pair and tokens in the + sequence between them, where `Token.nesting` of the first `Token` in + the pair is 1 and nesting of the other `Token` is -1. + """ + return bool(self.nester_tokens) + + @property + def siblings(self: _NodeType) -> Sequence[_NodeType]: + """Get siblings of the node. + + Gets the whole group of siblings, including self. + """ + if not self.parent: + return [self] + return self.parent.children + + @property + def type(self) -> str: + """Get a string type of the represented syntax. + + - "root" for root nodes + - `Token.type` if the node represents an unnested token + - `Token.type` of the opening token, with "_open" suffix stripped, if + the node represents a nester token pair + """ + if self.is_root: + return "root" + if self.token: + return self.token.type + assert self.nester_tokens + return self.nester_tokens.opening.type.removesuffix("_open") + + @property + def next_sibling(self: _NodeType) -> _NodeType | None: + """Get the next node in the sequence of siblings. + + Returns `None` if this is the last sibling. + """ + self_index = self.siblings.index(self) + if self_index + 1 < len(self.siblings): + return self.siblings[self_index + 1] + return None + + @property + def previous_sibling(self: _NodeType) -> _NodeType | None: + """Get the previous node in the sequence of siblings. + + Returns `None` if this is the first sibling. + """ + self_index = self.siblings.index(self) + if self_index - 1 >= 0: + return self.siblings[self_index - 1] + return None + + def _add_child( + self, + tokens: Sequence[Token], + ) -> None: + """Make a child node for `self`.""" + child = type(self)(tokens, create_root=False) + child.parent = self + self.children.append(child) + + def _set_children_from_tokens(self, tokens: Sequence[Token]) -> None: + """Convert the token stream to a tree structure and set the resulting + nodes as children of `self`.""" + reversed_tokens = list(reversed(tokens)) + while reversed_tokens: + token = reversed_tokens.pop() + + if not token.nesting: + self._add_child([token]) + continue + if token.nesting != 1: + raise ValueError("Invalid token nesting") + + nested_tokens = [token] + nesting = 1 + while reversed_tokens and nesting: + token = reversed_tokens.pop() + nested_tokens.append(token) + nesting += token.nesting + if nesting: + raise ValueError(f"unclosed tokens starting {nested_tokens[0]}") + + self._add_child(nested_tokens) + + def pretty( + self, *, indent: int = 2, show_text: bool = False, _current: int = 0 + ) -> str: + """Create an XML style string of the tree.""" + prefix = " " * _current + text = prefix + f"<{self.type}" + if not self.is_root and self.attrs: + text += " " + " ".join(f"{k}={v!r}" for k, v in self.attrs.items()) + text += ">" + if ( + show_text + and not self.is_root + and self.type in ("text", "text_special") + and self.content + ): + text += "\n" + textwrap.indent(self.content, prefix + " " * indent) + for child in self.children: + text += "\n" + child.pretty( + indent=indent, show_text=show_text, _current=_current + indent + ) + return text + + def walk( + self: _NodeType, *, include_self: bool = True + ) -> Generator[_NodeType, None, None]: + """Recursively yield all descendant nodes in the tree starting at self. + + The order mimics the order of the underlying linear token + stream (i.e. depth first). + """ + if include_self: + yield self + for child in self.children: + yield from child.walk(include_self=True) + + # NOTE: + # The values of the properties defined below directly map to properties + # of the underlying `Token`s. A root node does not translate to a `Token` + # object, so calling these property getters on a root node will raise an + # `AttributeError`. + # + # There is no mapping for `Token.nesting` because the `is_nested` property + # provides that data, and can be called on any node type, including root. + + def _attribute_token(self) -> Token: + """Return the `Token` that is used as the data source for the + properties defined below.""" + if self.token: + return self.token + if self.nester_tokens: + return self.nester_tokens.opening + raise AttributeError("Root node does not have the accessed attribute") + + @property + def tag(self) -> str: + """html tag name, e.g. \"p\" """ + return self._attribute_token().tag + + @property + def attrs(self) -> dict[str, str | int | float]: + """Html attributes.""" + return self._attribute_token().attrs + + def attrGet(self, name: str) -> None | str | int | float: + """Get the value of attribute `name`, or null if it does not exist.""" + return self._attribute_token().attrGet(name) + + @property + def map(self) -> tuple[int, int] | None: + """Source map info. Format: `tuple[ line_begin, line_end ]`""" + map_ = self._attribute_token().map + if map_: + # Type ignore because `Token`s attribute types are not perfect + return tuple(map_) # type: ignore + return None + + @property + def level(self) -> int: + """nesting level, the same as `state.level`""" + return self._attribute_token().level + + @property + def content(self) -> str: + """In a case of self-closing tag (code, html, fence, etc.), it + has contents of this tag.""" + return self._attribute_token().content + + @property + def markup(self) -> str: + """'*' or '_' for emphasis, fence string for fence, etc.""" + return self._attribute_token().markup + + @property + def info(self) -> str: + """fence infostring""" + return self._attribute_token().info + + @property + def meta(self) -> dict[Any, Any]: + """A place for plugins to store an arbitrary data.""" + return self._attribute_token().meta + + @property + def block(self) -> bool: + """True for block-level tokens, false for inline tokens.""" + return self._attribute_token().block + + @property + def hidden(self) -> bool: + """If it's true, ignore this element when rendering. + Used for tight lists to hide paragraphs.""" + return self._attribute_token().hidden diff --git a/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/utils.py b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/utils.py new file mode 100644 index 0000000000000000000000000000000000000000..2571a15861271f25e60fd5dd414af3ac5b450ad3 --- /dev/null +++ b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it/utils.py @@ -0,0 +1,186 @@ +from __future__ import annotations + +from collections.abc import Callable, Iterable, MutableMapping +from collections.abc import MutableMapping as MutableMappingABC +from pathlib import Path +from typing import TYPE_CHECKING, Any, TypedDict, cast + +if TYPE_CHECKING: + from typing_extensions import NotRequired + + +EnvType = MutableMapping[str, Any] # note: could use TypeAlias in python 3.10 +"""Type for the environment sandbox used in parsing and rendering, +which stores mutable variables for use by plugins and rules. +""" + + +class OptionsType(TypedDict): + """Options for parsing.""" + + maxNesting: int + """Internal protection, recursion limit.""" + html: bool + """Enable HTML tags in source.""" + linkify: bool + """Enable autoconversion of URL-like texts to links.""" + typographer: bool + """Enable smartquotes and replacements.""" + quotes: str + """Quote characters.""" + xhtmlOut: bool + """Use '/' to close single tags (
).""" + breaks: bool + """Convert newlines in paragraphs into
.""" + langPrefix: str + """CSS language prefix for fenced blocks.""" + highlight: Callable[[str, str, str], str] | None + """Highlighter function: (content, lang, attrs) -> str.""" + store_labels: NotRequired[bool] + """Store link label in link/image token's metadata (under Token.meta['label']). + + This is a Python only option, and is intended for the use of round-trip parsing. + """ + + +class PresetType(TypedDict): + """Preset configuration for markdown-it.""" + + options: OptionsType + """Options for parsing.""" + components: MutableMapping[str, MutableMapping[str, list[str]]] + """Components for parsing and rendering.""" + + +class OptionsDict(MutableMappingABC): # type: ignore + """A dictionary, with attribute access to core markdownit configuration options.""" + + # Note: ideally we would probably just remove attribute access entirely, + # but we keep it for backwards compatibility. + + def __init__(self, options: OptionsType) -> None: + self._options = cast(OptionsType, dict(options)) + + def __getitem__(self, key: str) -> Any: + return self._options[key] # type: ignore[literal-required] + + def __setitem__(self, key: str, value: Any) -> None: + self._options[key] = value # type: ignore[literal-required] + + def __delitem__(self, key: str) -> None: + del self._options[key] # type: ignore + + def __iter__(self) -> Iterable[str]: # type: ignore + return iter(self._options) + + def __len__(self) -> int: + return len(self._options) + + def __repr__(self) -> str: + return repr(self._options) + + def __str__(self) -> str: + return str(self._options) + + @property + def maxNesting(self) -> int: + """Internal protection, recursion limit.""" + return self._options["maxNesting"] + + @maxNesting.setter + def maxNesting(self, value: int) -> None: + self._options["maxNesting"] = value + + @property + def html(self) -> bool: + """Enable HTML tags in source.""" + return self._options["html"] + + @html.setter + def html(self, value: bool) -> None: + self._options["html"] = value + + @property + def linkify(self) -> bool: + """Enable autoconversion of URL-like texts to links.""" + return self._options["linkify"] + + @linkify.setter + def linkify(self, value: bool) -> None: + self._options["linkify"] = value + + @property + def typographer(self) -> bool: + """Enable smartquotes and replacements.""" + return self._options["typographer"] + + @typographer.setter + def typographer(self, value: bool) -> None: + self._options["typographer"] = value + + @property + def quotes(self) -> str: + """Quote characters.""" + return self._options["quotes"] + + @quotes.setter + def quotes(self, value: str) -> None: + self._options["quotes"] = value + + @property + def xhtmlOut(self) -> bool: + """Use '/' to close single tags (
).""" + return self._options["xhtmlOut"] + + @xhtmlOut.setter + def xhtmlOut(self, value: bool) -> None: + self._options["xhtmlOut"] = value + + @property + def breaks(self) -> bool: + """Convert newlines in paragraphs into
.""" + return self._options["breaks"] + + @breaks.setter + def breaks(self, value: bool) -> None: + self._options["breaks"] = value + + @property + def langPrefix(self) -> str: + """CSS language prefix for fenced blocks.""" + return self._options["langPrefix"] + + @langPrefix.setter + def langPrefix(self, value: str) -> None: + self._options["langPrefix"] = value + + @property + def highlight(self) -> Callable[[str, str, str], str] | None: + """Highlighter function: (content, langName, langAttrs) -> escaped HTML.""" + return self._options["highlight"] + + @highlight.setter + def highlight(self, value: Callable[[str, str, str], str] | None) -> None: + self._options["highlight"] = value + + +def read_fixture_file(path: str | Path) -> list[list[Any]]: + text = Path(path).read_text(encoding="utf-8") + tests = [] + section = 0 + last_pos = 0 + lines = text.splitlines(keepends=True) + for i in range(len(lines)): + if lines[i].rstrip() == ".": + if section == 0: + tests.append([i, lines[i - 1].strip()]) + section = 1 + elif section == 1: + tests[-1].append("".join(lines[last_pos + 1 : i])) + section = 2 + elif section == 2: + tests[-1].append("".join(lines[last_pos + 1 : i])) + section = 0 + + last_pos = i + return tests diff --git a/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it_py-4.0.0.dist-info/INSTALLER b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it_py-4.0.0.dist-info/INSTALLER new file mode 100644 index 0000000000000000000000000000000000000000..f79e4cb9aaf0b2d9e8ba78861e2071317b2384b3 --- /dev/null +++ b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it_py-4.0.0.dist-info/INSTALLER @@ -0,0 +1 @@ +conda \ No newline at end of file diff --git a/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it_py-4.0.0.dist-info/METADATA b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it_py-4.0.0.dist-info/METADATA new file mode 100644 index 0000000000000000000000000000000000000000..0f2b466a638a34e304c69fb7976ab05a736d9ab8 --- /dev/null +++ b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it_py-4.0.0.dist-info/METADATA @@ -0,0 +1,219 @@ +Metadata-Version: 2.4 +Name: markdown-it-py +Version: 4.0.0 +Summary: Python port of markdown-it. Markdown parsing, done right! +Keywords: markdown,lexer,parser,commonmark,markdown-it +Author-email: Chris Sewell +Requires-Python: >=3.10 +Description-Content-Type: text/markdown +Classifier: Development Status :: 5 - Production/Stable +Classifier: Intended Audience :: Developers +Classifier: License :: OSI Approved :: MIT License +Classifier: Programming Language :: Python :: 3 +Classifier: Programming Language :: Python :: 3.10 +Classifier: Programming Language :: Python :: 3.11 +Classifier: Programming Language :: Python :: 3.12 +Classifier: Programming Language :: Python :: 3.13 +Classifier: Programming Language :: Python :: Implementation :: CPython +Classifier: Programming Language :: Python :: Implementation :: PyPy +Classifier: Topic :: Software Development :: Libraries :: Python Modules +Classifier: Topic :: Text Processing :: Markup +License-File: LICENSE +License-File: LICENSE.markdown-it +Requires-Dist: mdurl~=0.1 +Requires-Dist: psutil ; extra == "benchmarking" +Requires-Dist: pytest ; extra == "benchmarking" +Requires-Dist: pytest-benchmark ; extra == "benchmarking" +Requires-Dist: commonmark~=0.9 ; extra == "compare" +Requires-Dist: markdown~=3.4 ; extra == "compare" +Requires-Dist: mistletoe~=1.0 ; extra == "compare" +Requires-Dist: mistune~=3.0 ; extra == "compare" +Requires-Dist: panflute~=2.3 ; extra == "compare" +Requires-Dist: markdown-it-pyrs ; extra == "compare" +Requires-Dist: linkify-it-py>=1,<3 ; extra == "linkify" +Requires-Dist: mdit-py-plugins>=0.5.0 ; extra == "plugins" +Requires-Dist: gprof2dot ; extra == "profiling" +Requires-Dist: mdit-py-plugins>=0.5.0 ; extra == "rtd" +Requires-Dist: myst-parser ; extra == "rtd" +Requires-Dist: pyyaml ; extra == "rtd" +Requires-Dist: sphinx ; extra == "rtd" +Requires-Dist: sphinx-copybutton ; extra == "rtd" +Requires-Dist: sphinx-design ; extra == "rtd" +Requires-Dist: sphinx-book-theme~=1.0 ; extra == "rtd" +Requires-Dist: jupyter_sphinx ; extra == "rtd" +Requires-Dist: ipykernel ; extra == "rtd" +Requires-Dist: coverage ; extra == "testing" +Requires-Dist: pytest ; extra == "testing" +Requires-Dist: pytest-cov ; extra == "testing" +Requires-Dist: pytest-regressions ; extra == "testing" +Requires-Dist: requests ; extra == "testing" +Project-URL: Documentation, https://markdown-it-py.readthedocs.io +Project-URL: Homepage, https://github.com/executablebooks/markdown-it-py +Provides-Extra: benchmarking +Provides-Extra: compare +Provides-Extra: linkify +Provides-Extra: plugins +Provides-Extra: profiling +Provides-Extra: rtd +Provides-Extra: testing + +# markdown-it-py + +[![Github-CI][github-ci]][github-link] +[![Coverage Status][codecov-badge]][codecov-link] +[![PyPI][pypi-badge]][pypi-link] +[![Conda][conda-badge]][conda-link] +[![PyPI - Downloads][install-badge]][install-link] + +

+ markdown-it-py icon +

+ +> Markdown parser done right. + +- Follows the __[CommonMark spec](http://spec.commonmark.org/)__ for baseline parsing +- Configurable syntax: you can add new rules and even replace existing ones. +- Pluggable: Adds syntax extensions to extend the parser (see the [plugin list][md-plugins]). +- High speed (see our [benchmarking tests][md-performance]) +- Easy to configure for [security][md-security] +- Member of [Google's Assured Open Source Software](https://cloud.google.com/assured-open-source-software/docs/supported-packages) + +This is a Python port of [markdown-it], and some of its associated plugins. +For more details see: . + +For details on [markdown-it] itself, see: + +- The __[Live demo](https://markdown-it.github.io)__ +- [The markdown-it README][markdown-it-readme] + +**See also:** [markdown-it-pyrs](https://github.com/chrisjsewell/markdown-it-pyrs) for an experimental Rust binding, +for even more speed! + +## Installation + +### PIP + +```bash +pip install markdown-it-py[plugins] +``` + +or with extras + +```bash +pip install markdown-it-py[linkify,plugins] +``` + +### Conda + +```bash +conda install -c conda-forge markdown-it-py +``` + +or with extras + +```bash +conda install -c conda-forge markdown-it-py linkify-it-py mdit-py-plugins +``` + +## Usage + +### Python API Usage + +Render markdown to HTML with markdown-it-py and a custom configuration +with and without plugins and features: + +```python +from markdown_it import MarkdownIt +from mdit_py_plugins.front_matter import front_matter_plugin +from mdit_py_plugins.footnote import footnote_plugin + +md = ( + MarkdownIt('commonmark', {'breaks':True,'html':True}) + .use(front_matter_plugin) + .use(footnote_plugin) + .enable('table') +) +text = (""" +--- +a: 1 +--- + +a | b +- | - +1 | 2 + +A footnote [^1] + +[^1]: some details +""") +tokens = md.parse(text) +html_text = md.render(text) + +## To export the html to a file, uncomment the lines below: +# from pathlib import Path +# Path("output.html").write_text(html_text) +``` + +### Command-line Usage + +Render markdown to HTML with markdown-it-py from the +command-line: + +```console +usage: markdown-it [-h] [-v] [filenames [filenames ...]] + +Parse one or more markdown files, convert each to HTML, and print to stdout + +positional arguments: + filenames specify an optional list of files to convert + +optional arguments: + -h, --help show this help message and exit + -v, --version show program's version number and exit + +Interactive: + + $ markdown-it + markdown-it-py [version 0.0.0] (interactive) + Type Ctrl-D to complete input, or Ctrl-C to exit. + >>> # Example + ... > markdown *input* + ... +

Example

+
+

markdown input

+
+ +Batch: + + $ markdown-it README.md README.footer.md > index.html + +``` + +## References / Thanks + +Big thanks to the authors of [markdown-it]: + +- Alex Kocharin [github/rlidwka](https://github.com/rlidwka) +- Vitaly Puzrin [github/puzrin](https://github.com/puzrin) + +Also [John MacFarlane](https://github.com/jgm) for his work on the CommonMark spec and reference implementations. + +[github-ci]: https://github.com/executablebooks/markdown-it-py/actions/workflows/tests.yml/badge.svg?branch=master +[github-link]: https://github.com/executablebooks/markdown-it-py +[pypi-badge]: https://img.shields.io/pypi/v/markdown-it-py.svg +[pypi-link]: https://pypi.org/project/markdown-it-py +[conda-badge]: https://anaconda.org/conda-forge/markdown-it-py/badges/version.svg +[conda-link]: https://anaconda.org/conda-forge/markdown-it-py +[codecov-badge]: https://codecov.io/gh/executablebooks/markdown-it-py/branch/master/graph/badge.svg +[codecov-link]: https://codecov.io/gh/executablebooks/markdown-it-py +[install-badge]: https://img.shields.io/pypi/dw/markdown-it-py?label=pypi%20installs +[install-link]: https://pypistats.org/packages/markdown-it-py + +[CommonMark spec]: http://spec.commonmark.org/ +[markdown-it]: https://github.com/markdown-it/markdown-it +[markdown-it-readme]: https://github.com/markdown-it/markdown-it/blob/master/README.md +[md-security]: https://markdown-it-py.readthedocs.io/en/latest/security.html +[md-performance]: https://markdown-it-py.readthedocs.io/en/latest/performance.html +[md-plugins]: https://markdown-it-py.readthedocs.io/en/latest/plugins.html + diff --git a/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it_py-4.0.0.dist-info/RECORD b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it_py-4.0.0.dist-info/RECORD new file mode 100644 index 0000000000000000000000000000000000000000..0eaeb51f64831d4b3c5e88e0450dc384e7df9d31 --- /dev/null +++ b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it_py-4.0.0.dist-info/RECORD @@ -0,0 +1,144 @@ +../../../bin/markdown-it,sha256=YKaApGc6hVpeda-e2PrkGghFBv8LXx7rhVugyuhNzHg,476 +markdown_it/__init__.py,sha256=R7fMvDxageYJ4Q6doBcimogy1ctcV1eBuCFu5Pr8bbA,114 +markdown_it/__pycache__/__init__.cpython-313.pyc,, +markdown_it/__pycache__/_compat.cpython-313.pyc,, +markdown_it/__pycache__/_punycode.cpython-313.pyc,, +markdown_it/__pycache__/main.cpython-313.pyc,, +markdown_it/__pycache__/parser_block.cpython-313.pyc,, +markdown_it/__pycache__/parser_core.cpython-313.pyc,, +markdown_it/__pycache__/parser_inline.cpython-313.pyc,, +markdown_it/__pycache__/renderer.cpython-313.pyc,, +markdown_it/__pycache__/ruler.cpython-313.pyc,, +markdown_it/__pycache__/token.cpython-313.pyc,, +markdown_it/__pycache__/tree.cpython-313.pyc,, +markdown_it/__pycache__/utils.cpython-313.pyc,, +markdown_it/_compat.py,sha256=U4S_2y3zgLZVfMenHRaJFBW8yqh2mUBuI291LGQVOJ8,35 +markdown_it/_punycode.py,sha256=JvSOZJ4VKr58z7unFGM0KhfTxqHMk2w8gglxae2QszM,2373 +markdown_it/cli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +markdown_it/cli/__pycache__/__init__.cpython-313.pyc,, +markdown_it/cli/__pycache__/parse.cpython-313.pyc,, +markdown_it/cli/parse.py,sha256=Un3N7fyGHhZAQouGVnRx-WZcpKwEK2OF08rzVAEBie8,2881 +markdown_it/common/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +markdown_it/common/__pycache__/__init__.cpython-313.pyc,, +markdown_it/common/__pycache__/entities.cpython-313.pyc,, +markdown_it/common/__pycache__/html_blocks.cpython-313.pyc,, +markdown_it/common/__pycache__/html_re.cpython-313.pyc,, +markdown_it/common/__pycache__/normalize_url.cpython-313.pyc,, +markdown_it/common/__pycache__/utils.cpython-313.pyc,, +markdown_it/common/entities.py,sha256=EYRCmUL7ZU1FRGLSXQlPx356lY8EUBdFyx96eSGc6d0,157 +markdown_it/common/html_blocks.py,sha256=QXbUDMoN9lXLgYFk2DBYllnLiFukL6dHn2X98Y6Wews,986 +markdown_it/common/html_re.py,sha256=FggAEv9IL8gHQqsGTkHcf333rTojwG0DQJMH9oVu0fU,926 +markdown_it/common/normalize_url.py,sha256=avOXnLd9xw5jU1q5PLftjAM9pvGx8l9QDEkmZSyrMgg,2568 +markdown_it/common/utils.py,sha256=pMgvMOE3ZW-BdJ7HfuzlXNKyD1Ivk7jHErc2J_B8J5M,8734 +markdown_it/helpers/__init__.py,sha256=YH2z7dS0WUc_9l51MWPvrLtFoBPh4JLGw58OuhGRCK0,253 +markdown_it/helpers/__pycache__/__init__.cpython-313.pyc,, +markdown_it/helpers/__pycache__/parse_link_destination.cpython-313.pyc,, +markdown_it/helpers/__pycache__/parse_link_label.cpython-313.pyc,, +markdown_it/helpers/__pycache__/parse_link_title.cpython-313.pyc,, +markdown_it/helpers/parse_link_destination.py,sha256=u-xxWVP3g1s7C1bQuQItiYyDrYoYHJzXaZXPgr-o6mY,1906 +markdown_it/helpers/parse_link_label.py,sha256=PIHG6ZMm3BUw0a2m17lCGqNrl3vaz911tuoGviWD3I4,1037 +markdown_it/helpers/parse_link_title.py,sha256=jkLoYQMKNeX9bvWQHkaSroiEo27HylkEUNmj8xBRlp4,2273 +markdown_it/main.py,sha256=vzuT23LJyKrPKNyHKKAbOHkNWpwIldOGUM-IGsv2DHM,12732 +markdown_it/parser_block.py,sha256=-MyugXB63Te71s4NcSQZiK5bE6BHkdFyZv_bviuatdI,3939 +markdown_it/parser_core.py,sha256=SRmJjqe8dC6GWzEARpWba59cBmxjCr3Gsg8h29O8sQk,1016 +markdown_it/parser_inline.py,sha256=y0jCig8CJxQO7hBz0ZY3sGvPlAKTohOwIgaqnlSaS5A,5024 +markdown_it/port.yaml,sha256=jt_rdwOnfocOV5nc35revTybAAQMIp_-1fla_527sVE,2447 +markdown_it/presets/__init__.py,sha256=22vFtwJEY7iqFRtgVZ-pJthcetfpr1Oig8XOF9x1328,970 +markdown_it/presets/__pycache__/__init__.cpython-313.pyc,, +markdown_it/presets/__pycache__/commonmark.cpython-313.pyc,, +markdown_it/presets/__pycache__/default.cpython-313.pyc,, +markdown_it/presets/__pycache__/zero.cpython-313.pyc,, +markdown_it/presets/commonmark.py,sha256=ygfb0R7WQ_ZoyQP3df-B0EnYMqNXCVOSw9SAdMjsGow,2869 +markdown_it/presets/default.py,sha256=FfKVUI0HH3M-_qy6RwotLStdC4PAaAxE7Dq0_KQtRtc,1811 +markdown_it/presets/zero.py,sha256=okXWTBEI-2nmwx5XKeCjxInRf65oC11gahtRl-QNtHM,2113 +markdown_it/py.typed,sha256=8PjyZ1aVoQpRVvt71muvuq5qE-jTFZkK-GLHkhdebmc,26 +markdown_it/renderer.py,sha256=Lzr0glqd5oxFL10DOfjjW8kg4Gp41idQ4viEQaE47oA,9947 +markdown_it/ruler.py,sha256=eMAtWGRAfSM33aiJed0k5923BEkuMVsMq1ct8vU-ql4,9142 +markdown_it/rules_block/__init__.py,sha256=SQpg0ocmsHeILPAWRHhzgLgJMKIcNkQyELH13o_6Ktc,553 +markdown_it/rules_block/__pycache__/__init__.cpython-313.pyc,, +markdown_it/rules_block/__pycache__/blockquote.cpython-313.pyc,, +markdown_it/rules_block/__pycache__/code.cpython-313.pyc,, +markdown_it/rules_block/__pycache__/fence.cpython-313.pyc,, +markdown_it/rules_block/__pycache__/heading.cpython-313.pyc,, +markdown_it/rules_block/__pycache__/hr.cpython-313.pyc,, +markdown_it/rules_block/__pycache__/html_block.cpython-313.pyc,, +markdown_it/rules_block/__pycache__/lheading.cpython-313.pyc,, +markdown_it/rules_block/__pycache__/list.cpython-313.pyc,, +markdown_it/rules_block/__pycache__/paragraph.cpython-313.pyc,, +markdown_it/rules_block/__pycache__/reference.cpython-313.pyc,, +markdown_it/rules_block/__pycache__/state_block.cpython-313.pyc,, +markdown_it/rules_block/__pycache__/table.cpython-313.pyc,, +markdown_it/rules_block/blockquote.py,sha256=7uymS36dcrned3DsIaRcqcbFU1NlymhvsZpEXTD3_n8,8887 +markdown_it/rules_block/code.py,sha256=iTAxv0U1-MDhz88M1m1pi2vzOhEMSEROsXMo2Qq--kU,860 +markdown_it/rules_block/fence.py,sha256=BJgU-PqZ4vAlCqGcrc8UtdLpJJyMeRWN-G-Op-zxrMc,2537 +markdown_it/rules_block/heading.py,sha256=4Lh15rwoVsQjE1hVhpbhidQ0k9xKHihgjAeYSbwgO5k,1745 +markdown_it/rules_block/hr.py,sha256=QCoY5kImaQRvF7PyP8OoWft6A8JVH1v6MN-0HR9Ikpg,1227 +markdown_it/rules_block/html_block.py,sha256=wA8pb34LtZr1BkIATgGKQBIGX5jQNOkwZl9UGEqvb5M,2721 +markdown_it/rules_block/lheading.py,sha256=fWoEuUo7S2svr5UMKmyQMkh0hheYAHg2gMM266Mogs4,2625 +markdown_it/rules_block/list.py,sha256=gIodkAJFyOIyKCZCj5lAlL7jIj5kAzrDb-K-2MFNplY,9668 +markdown_it/rules_block/paragraph.py,sha256=9pmCwA7eMu4LBdV4fWKzC4EdwaOoaGw2kfeYSQiLye8,1819 +markdown_it/rules_block/reference.py,sha256=ue1qZbUaUP0GIvwTjh6nD1UtCij8uwsIMuYW1xBkckc,6983 +markdown_it/rules_block/state_block.py,sha256=HowsQyy5hGUibH4HRZWKfLIlXeDUnuWL7kpF0-rSwoM,8422 +markdown_it/rules_block/table.py,sha256=8nMd9ONGOffER7BXmc9kbbhxkLjtpX79dVLR0iatGnM,7682 +markdown_it/rules_core/__init__.py,sha256=QFGBe9TUjnRQJDU7xY4SQYpxyTHNwg8beTSwXpNGRjE,394 +markdown_it/rules_core/__pycache__/__init__.cpython-313.pyc,, +markdown_it/rules_core/__pycache__/block.cpython-313.pyc,, +markdown_it/rules_core/__pycache__/inline.cpython-313.pyc,, +markdown_it/rules_core/__pycache__/linkify.cpython-313.pyc,, +markdown_it/rules_core/__pycache__/normalize.cpython-313.pyc,, +markdown_it/rules_core/__pycache__/replacements.cpython-313.pyc,, +markdown_it/rules_core/__pycache__/smartquotes.cpython-313.pyc,, +markdown_it/rules_core/__pycache__/state_core.cpython-313.pyc,, +markdown_it/rules_core/__pycache__/text_join.cpython-313.pyc,, +markdown_it/rules_core/block.py,sha256=0_JY1CUy-H2OooFtIEZAACtuoGUMohgxo4Z6A_UinSg,372 +markdown_it/rules_core/inline.py,sha256=9oWmeBhJHE7x47oJcN9yp6UsAZtrEY_A-VmfoMvKld4,325 +markdown_it/rules_core/linkify.py,sha256=mjQqpk_lHLh2Nxw4UFaLxa47Fgi-OHnmDamlgXnhmv0,5141 +markdown_it/rules_core/normalize.py,sha256=AJm4femtFJ_QBnM0dzh0UNqTTJk9K6KMtwRPaioZFqM,403 +markdown_it/rules_core/replacements.py,sha256=CH75mie-tdzdLKQtMBuCTcXAl1ijegdZGfbV_Vk7st0,3471 +markdown_it/rules_core/smartquotes.py,sha256=izK9fSyuTzA-zAUGkRkz9KwwCQWo40iRqcCKqOhFbEE,7443 +markdown_it/rules_core/state_core.py,sha256=HqWZCUr5fW7xG6jeQZDdO0hE9hxxyl3_-bawgOy57HY,570 +markdown_it/rules_core/text_join.py,sha256=rLXxNuLh_es5RvH31GsXi7en8bMNO9UJ5nbJMDBPltY,1173 +markdown_it/rules_inline/__init__.py,sha256=qqHZk6-YE8Rc12q6PxvVKBaxv2wmZeeo45H1XMR_Vxs,696 +markdown_it/rules_inline/__pycache__/__init__.cpython-313.pyc,, +markdown_it/rules_inline/__pycache__/autolink.cpython-313.pyc,, +markdown_it/rules_inline/__pycache__/backticks.cpython-313.pyc,, +markdown_it/rules_inline/__pycache__/balance_pairs.cpython-313.pyc,, +markdown_it/rules_inline/__pycache__/emphasis.cpython-313.pyc,, +markdown_it/rules_inline/__pycache__/entity.cpython-313.pyc,, +markdown_it/rules_inline/__pycache__/escape.cpython-313.pyc,, +markdown_it/rules_inline/__pycache__/fragments_join.cpython-313.pyc,, +markdown_it/rules_inline/__pycache__/html_inline.cpython-313.pyc,, +markdown_it/rules_inline/__pycache__/image.cpython-313.pyc,, +markdown_it/rules_inline/__pycache__/link.cpython-313.pyc,, +markdown_it/rules_inline/__pycache__/linkify.cpython-313.pyc,, +markdown_it/rules_inline/__pycache__/newline.cpython-313.pyc,, +markdown_it/rules_inline/__pycache__/state_inline.cpython-313.pyc,, +markdown_it/rules_inline/__pycache__/strikethrough.cpython-313.pyc,, +markdown_it/rules_inline/__pycache__/text.cpython-313.pyc,, +markdown_it/rules_inline/autolink.py,sha256=pPoqJY8i99VtFn7KgUzMackMeq1hytzioVvWs-VQPRo,2065 +markdown_it/rules_inline/backticks.py,sha256=J7bezjjNxiXlKqvHc0fJkHZwH7-2nBsXVjcKydk8E4M,2037 +markdown_it/rules_inline/balance_pairs.py,sha256=5zgBiGidqdiWmt7Io_cuZOYh5EFEfXrYRce8RXg5m7o,4852 +markdown_it/rules_inline/emphasis.py,sha256=7aDLZx0Jlekuvbu3uEUTDhJp00Z0Pj6g4C3-VLhI8Co,3123 +markdown_it/rules_inline/entity.py,sha256=CE8AIGMi5isEa24RNseo0wRmTTaj5YLbgTFdDmBesAU,1651 +markdown_it/rules_inline/escape.py,sha256=KGulwrP5FnqZM7GXY8lf7pyVv0YkR59taZDeHb5cmKg,1659 +markdown_it/rules_inline/fragments_join.py,sha256=_3JbwWYJz74gRHeZk6T8edVJT2IVSsi7FfmJJlieQlA,1493 +markdown_it/rules_inline/html_inline.py,sha256=SBg6HR0HRqCdrkkec0dfOYuQdAqyfeLRFLeQggtgjvg,1130 +markdown_it/rules_inline/image.py,sha256=Wbsg7jgnOtKXIwXGNJOlG7ORThkMkBVolxItC0ph6C0,4141 +markdown_it/rules_inline/link.py,sha256=2oD-fAdB0xyxDRtZLTjzLeWbzJ1k9bbPVQmohb58RuI,4258 +markdown_it/rules_inline/linkify.py,sha256=ifH6sb5wE8PGMWEw9Sr4x0DhMVfNOEBCfFSwKll2O-s,1706 +markdown_it/rules_inline/newline.py,sha256=329r0V3aDjzNtJcvzA3lsFYjzgBrShLAV5uf9hwQL_M,1297 +markdown_it/rules_inline/state_inline.py,sha256=d-menFzbz5FDy1JNgGBF-BASasnVI-9RuOxWz9PnKn4,5003 +markdown_it/rules_inline/strikethrough.py,sha256=pwcPlyhkh5pqFVxRCSrdW5dNCIOtU4eDit7TVDTPIVA,3214 +markdown_it/rules_inline/text.py,sha256=FQqaQRUqbnMLO9ZSWPWQUMEKH6JqWSSSmlZ5Ii9P48o,1119 +markdown_it/token.py,sha256=cWrt9kodfPdizHq_tYrzyIZNtJYNMN1813DPNlunwTg,6381 +markdown_it/tree.py,sha256=56Cdbwu2Aiks7kNYqO_fQZWpPb_n48CUllzjQQfgu1Y,11111 +markdown_it/utils.py,sha256=lVLeX7Af3GaNFfxmMgUbsn5p7cXbwhLq7RSf56UWuRE,5687 +markdown_it_py-4.0.0.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4 +markdown_it_py-4.0.0.dist-info/METADATA,sha256=6fyqHi2vP5bYQKCfuqo5T-qt83o22Ip7a2tnJIfGW_s,7288 +markdown_it_py-4.0.0.dist-info/RECORD,, +markdown_it_py-4.0.0.dist-info/REQUESTED,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +markdown_it_py-4.0.0.dist-info/WHEEL,sha256=G2gURzTEtmeR8nrdXUJfNiB3VYVxigPQ-bEQujpNiNs,82 +markdown_it_py-4.0.0.dist-info/direct_url.json,sha256=jdayX0bxK06TWcLx10Dw3NqKaipMj3eGzS-eaOGbHPI,100 +markdown_it_py-4.0.0.dist-info/entry_points.txt,sha256=T81l7fHQ3pllpQ4wUtQK6a8g_p6wxQbnjKVHCk2WMG4,58 +markdown_it_py-4.0.0.dist-info/licenses/LICENSE,sha256=SiJg1uLND1oVGh6G2_59PtVSseK-q_mUHBulxJy85IQ,1078 +markdown_it_py-4.0.0.dist-info/licenses/LICENSE.markdown-it,sha256=eSxIxahJoV_fnjfovPnm0d0TsytGxkKnSKCkapkZ1HM,1073 diff --git a/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it_py-4.0.0.dist-info/REQUESTED b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it_py-4.0.0.dist-info/REQUESTED new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it_py-4.0.0.dist-info/WHEEL b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it_py-4.0.0.dist-info/WHEEL new file mode 100644 index 0000000000000000000000000000000000000000..d8b9936dad9ab2513fa6979f411560d3b6b57e37 --- /dev/null +++ b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it_py-4.0.0.dist-info/WHEEL @@ -0,0 +1,4 @@ +Wheel-Version: 1.0 +Generator: flit 3.12.0 +Root-Is-Purelib: true +Tag: py3-none-any diff --git a/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it_py-4.0.0.dist-info/direct_url.json b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it_py-4.0.0.dist-info/direct_url.json new file mode 100644 index 0000000000000000000000000000000000000000..3acfdd0e36b72b630e4a6bcd5b8b446a31b65421 --- /dev/null +++ b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it_py-4.0.0.dist-info/direct_url.json @@ -0,0 +1 @@ +{"dir_info": {}, "url": "file:///home/task_176700162971740/croot/markdown-it-py_1767001650253/work"} \ No newline at end of file diff --git a/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it_py-4.0.0.dist-info/entry_points.txt b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it_py-4.0.0.dist-info/entry_points.txt new file mode 100644 index 0000000000000000000000000000000000000000..7d829cd792a5d754844f433c6a8dd499564fdcbf --- /dev/null +++ b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it_py-4.0.0.dist-info/entry_points.txt @@ -0,0 +1,3 @@ +[console_scripts] +markdown-it=markdown_it.cli.parse:main + diff --git a/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it_py-4.0.0.dist-info/licenses/LICENSE b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it_py-4.0.0.dist-info/licenses/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..582ddf59e08277fe6e78cee924d2c84805fe36fe --- /dev/null +++ b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it_py-4.0.0.dist-info/licenses/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2020 ExecutableBookProject + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it_py-4.0.0.dist-info/licenses/LICENSE.markdown-it b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it_py-4.0.0.dist-info/licenses/LICENSE.markdown-it new file mode 100644 index 0000000000000000000000000000000000000000..7ffa058cb78f8fb9beb974d9fd429004d2d2e585 --- /dev/null +++ b/miniconda3/pkgs/markdown-it-py-4.0.0-py313h06a4308_1/lib/python3.13/site-packages/markdown_it_py-4.0.0.dist-info/licenses/LICENSE.markdown-it @@ -0,0 +1,22 @@ +Copyright (c) 2014 Vitaly Puzrin, Alex Kocharin. + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. diff --git a/miniconda3/pkgs/mdurl-0.1.2-py313h06a4308_0/info/about.json b/miniconda3/pkgs/mdurl-0.1.2-py313h06a4308_0/info/about.json new file mode 100644 index 0000000000000000000000000000000000000000..445b9b3bc29335ee2344d1712f2c114c2ff828cc --- /dev/null +++ b/miniconda3/pkgs/mdurl-0.1.2-py313h06a4308_0/info/about.json @@ -0,0 +1,160 @@ +{ + "channels": [ + "https://repo.anaconda.com/pkgs/main", + "https://repo.anaconda.com/pkgs/r", + "https://repo.anaconda.com/pkgs/main" + ], + "conda_build_version": "25.1.2", + "conda_version": "25.1.1", + "description": "This is a Python port of the JavaScript mdurl package. See the upstream README.md file for API documentation.", + "dev_url": "https://github.com/executablebooks/mdurl", + "doc_url": "https://github.com/executablebooks/mdurl/blob/master/README.md", + "env_vars": { + "CIO_TEST": "" + }, + "extra": { + "copy_test_source_files": true, + "final": true, + "recipe-maintainers": [ + "chrisjsewell" + ] + }, + "home": "https://github.com/executablebooks/mdurl", + "identifiers": [], + "keywords": [], + "license": "MIT", + "license_family": "MIT", + "license_file": "LICENSE", + "root_pkgs": [ + "_libgcc_mutex 0.1 main", + "ca-certificates 2025.9.9 h06a4308_0", + "ld_impl_linux-64 2.40 h12ee557_0", + "libstdcxx-ng 11.2.0 h1234567_1", + "nlohmann_json 3.11.2 h6a678d5_0", + "pybind11-abi 5 hd3eb1b0_0", + "tzdata 2025a h04d1e81_0", + "libgomp 11.2.0 h1234567_1", + "_openmp_mutex 5.1 1_gnu", + "libgcc-ng 11.2.0 h1234567_1", + "bzip2 1.0.8 h5eee18b_6", + "c-ares 1.19.1 h5eee18b_0", + "cpp-expected 1.1.0 hdb19cb5_0", + "expat 2.6.4 h6a678d5_0", + "fmt 9.1.0 hdb19cb5_1", + "icu 73.1 h6a678d5_0", + "libev 4.33 h7f8727e_1", + "libffi 3.4.4 h6a678d5_1", + "libuuid 1.41.5 h5eee18b_0", + "lz4-c 1.9.4 h6a678d5_1", + "ncurses 6.4 h6a678d5_0", + "liblief 0.12.3 h6a678d5_0", + "reproc 14.2.4 h6a678d5_2", + "simdjson 3.10.1 hdb19cb5_0", + "xz 5.4.6 h5eee18b_1", + "yaml-cpp 0.8.0 h6a678d5_1", + "zlib 1.2.13 h5eee18b_1", + "libedit 3.1.20230828 h5eee18b_0", + "libnghttp2 1.57.0 h2d74bed_0", + "libssh2 1.11.1 h251f7ec_0", + "libxml2 2.13.5 hfdd30dd_0", + "pcre2 10.42 hebb0a14_1", + "readline 8.2 h5eee18b_0", + "reproc-cpp 14.2.4 h6a678d5_2", + "spdlog 1.11.0 hdb19cb5_0", + "tk 8.6.14 h39e8969_0", + "zstd 1.5.6 hc292b87_0", + "krb5 1.20.1 h143b758_1", + "libarchive 3.7.7 hfab0078_0", + "libsolv 0.7.30 he621ea3_1", + "sqlite 3.45.3 h5eee18b_0", + "libcurl 8.11.1 hc9e6f67_0", + "python 3.12.9 h5148396_0", + "libmamba 2.0.5 haf1ee3a_1", + "menuinst 2.2.0 py312h06a4308_1", + "anaconda-anon-usage 0.5.0 py312hfc0e8ea_100", + "annotated-types 0.6.0 py312h06a4308_0", + "archspec 0.2.3 pyhd3eb1b0_0", + "boltons 24.1.0 py312h06a4308_0", + "brotli-python 1.0.9 py312h6a678d5_9", + "charset-normalizer 3.3.2 pyhd3eb1b0_0", + "distro 1.9.0 py312h06a4308_0", + "frozendict 2.4.2 py312h06a4308_0", + "idna 3.7 py312h06a4308_0", + "jsonpointer 2.1 pyhd3eb1b0_0", + "libmambapy 2.0.5 py312hdb19cb5_1", + "mdurl 0.1.0 py312h06a4308_0", + "packaging 24.2 py312h06a4308_0", + "platformdirs 3.10.0 py312h06a4308_0", + "pluggy 1.5.0 py312h06a4308_0", + "pycosat 0.6.6 py312h5eee18b_2", + "pycparser 2.21 pyhd3eb1b0_0", + "pygments 2.15.1 py312h06a4308_1", + "pysocks 1.7.1 py312h06a4308_0", + "ruamel.yaml.clib 0.2.8 py312h5eee18b_0", + "setuptools 75.8.0 py312h06a4308_0", + "tqdm 4.67.1 py312he106c6f_0", + "truststore 0.10.0 py312h06a4308_0", + "typing_extensions 4.12.2 py312h06a4308_0", + "wheel 0.45.1 py312h06a4308_0", + "cffi 1.17.1 py312h1fdaa30_1", + "jsonpatch 1.33 py312h06a4308_1", + "markdown-it-py 2.2.0 py312h06a4308_1", + "pip 25.0 py312h06a4308_0", + "ruamel.yaml 0.18.6 py312h5eee18b_0", + "typing-extensions 4.12.2 py312h06a4308_0", + "urllib3 2.3.0 py312h06a4308_0", + "cryptography 43.0.3 py312h7825ff9_1", + "pydantic-core 2.27.1 py312h4aa5aa6_0", + "requests 2.32.3 py312h06a4308_1", + "rich 13.9.4 py312h06a4308_0", + "zstandard 0.23.0 py312h2c38b39_1", + "conda-content-trust 0.2.0 py312h06a4308_1", + "conda-package-streaming 0.11.0 py312h06a4308_0", + "pydantic 2.10.3 py312h06a4308_0", + "conda-package-handling 2.4.0 py312h06a4308_0", + "conda 25.1.1 py312h06a4308_0", + "conda-anaconda-tos 0.1.2 py312h06a4308_0", + "conda-libmamba-solver 25.1.1 pyhd3eb1b0_0", + "libsodium 1.0.18 h7b6447c_0", + "openssl 3.0.17 h5eee18b_0", + "patch 2.8 hb25bd0a_0", + "patchelf 0.17.2 h6a678d5_0", + "yaml 0.2.5 h7b6447c_0", + "argcomplete 3.6.2 py312h06a4308_0", + "attrs 24.3.0 py312h06a4308_0", + "certifi 2025.8.3 py312h06a4308_0", + "chardet 5.2.0 py312h06a4308_0", + "click 8.2.1 py312h06a4308_0", + "filelock 3.17.0 py312h06a4308_0", + "jmespath 1.0.1 py312h06a4308_0", + "markupsafe 3.0.2 py312h5eee18b_0", + "more-itertools 10.3.0 py312h06a4308_0", + "pkginfo 1.12.0 py312h06a4308_0", + "psutil 7.0.0 py312hee96239_0", + "py-lief 0.12.3 py312h6a678d5_0", + "python-libarchive-c 5.1 pyhd3eb1b0_0", + "pytz 2025.2 py312h06a4308_0", + "pyyaml 6.0.2 py312h5eee18b_0", + "rpds-py 0.22.3 py312h4aa5aa6_0", + "six 1.17.0 py312h06a4308_0", + "soupsieve 2.5 py312h06a4308_0", + "tomlkit 0.13.2 py312h06a4308_0", + "xmltodict 0.14.2 py312h06a4308_0", + "jinja2 3.1.6 py312h06a4308_0", + "python-dateutil 2.9.0post0 py312h06a4308_2", + "referencing 0.30.2 py312h06a4308_0", + "yq 3.4.3 py312h06a4308_0", + "beautifulsoup4 4.13.5 py312h06a4308_0", + "botocore 1.37.10 py312h06a4308_0", + "jsonschema-specifications 2023.7.1 py312h06a4308_0", + "pynacl 1.5.0 py312h5eee18b_1", + "jsonschema 4.25.0 py312h06a4308_0", + "s3transfer 0.11.2 py312h06a4308_0", + "boto3 1.37.10 py312h06a4308_0", + "conda-anaconda-telemetry 0.3.0 pyhd3eb1b0_1", + "conda-index 0.5.0 py312h06a4308_0", + "conda-build 25.1.2 py312h06a4308_0" + ], + "summary": "This is a Python port of the JavaScript mdurl package. See the upstream README.md file for API documentation.", + "tags": [] +} \ No newline at end of file diff --git a/miniconda3/pkgs/mdurl-0.1.2-py313h06a4308_0/info/files b/miniconda3/pkgs/mdurl-0.1.2-py313h06a4308_0/info/files new file mode 100644 index 0000000000000000000000000000000000000000..1f7b96a4eb6f677325ec34a1583710650cea8074 --- /dev/null +++ b/miniconda3/pkgs/mdurl-0.1.2-py313h06a4308_0/info/files @@ -0,0 +1,20 @@ +lib/python3.13/site-packages/mdurl-0.1.2.dist-info/INSTALLER +lib/python3.13/site-packages/mdurl-0.1.2.dist-info/METADATA +lib/python3.13/site-packages/mdurl-0.1.2.dist-info/RECORD +lib/python3.13/site-packages/mdurl-0.1.2.dist-info/REQUESTED +lib/python3.13/site-packages/mdurl-0.1.2.dist-info/WHEEL +lib/python3.13/site-packages/mdurl-0.1.2.dist-info/direct_url.json +lib/python3.13/site-packages/mdurl-0.1.2.dist-info/licenses/LICENSE +lib/python3.13/site-packages/mdurl/__init__.py +lib/python3.13/site-packages/mdurl/__pycache__/__init__.cpython-313.pyc +lib/python3.13/site-packages/mdurl/__pycache__/_decode.cpython-313.pyc +lib/python3.13/site-packages/mdurl/__pycache__/_encode.cpython-313.pyc +lib/python3.13/site-packages/mdurl/__pycache__/_format.cpython-313.pyc +lib/python3.13/site-packages/mdurl/__pycache__/_parse.cpython-313.pyc +lib/python3.13/site-packages/mdurl/__pycache__/_url.cpython-313.pyc +lib/python3.13/site-packages/mdurl/_decode.py +lib/python3.13/site-packages/mdurl/_encode.py +lib/python3.13/site-packages/mdurl/_format.py +lib/python3.13/site-packages/mdurl/_parse.py +lib/python3.13/site-packages/mdurl/_url.py +lib/python3.13/site-packages/mdurl/py.typed diff --git a/miniconda3/pkgs/mdurl-0.1.2-py313h06a4308_0/info/git b/miniconda3/pkgs/mdurl-0.1.2-py313h06a4308_0/info/git new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/miniconda3/pkgs/mdurl-0.1.2-py313h06a4308_0/info/hash_input.json b/miniconda3/pkgs/mdurl-0.1.2-py313h06a4308_0/info/hash_input.json new file mode 100644 index 0000000000000000000000000000000000000000..54f8fb2da41bdb4962a008606b017773d2fef48e --- /dev/null +++ b/miniconda3/pkgs/mdurl-0.1.2-py313h06a4308_0/info/hash_input.json @@ -0,0 +1,4 @@ +{ + "target_platform": "linux-64", + "channel_targets": "defaults" +} \ No newline at end of file diff --git a/miniconda3/pkgs/mdurl-0.1.2-py313h06a4308_0/info/index.json b/miniconda3/pkgs/mdurl-0.1.2-py313h06a4308_0/info/index.json new file mode 100644 index 0000000000000000000000000000000000000000..28ee91ae1b83c0a79997d4cfb55f34c9638dfe9a --- /dev/null +++ b/miniconda3/pkgs/mdurl-0.1.2-py313h06a4308_0/info/index.json @@ -0,0 +1,16 @@ +{ + "arch": "x86_64", + "build": "py313h06a4308_0", + "build_number": 0, + "depends": [ + "python >=3.13,<3.14.0a0", + "python_abi 3.13.* *_cp313" + ], + "license": "MIT", + "license_family": "MIT", + "name": "mdurl", + "platform": "linux", + "subdir": "linux-64", + "timestamp": 1758552191170, + "version": "0.1.2" +} \ No newline at end of file diff --git a/miniconda3/pkgs/mdurl-0.1.2-py313h06a4308_0/info/licenses/LICENSE b/miniconda3/pkgs/mdurl-0.1.2-py313h06a4308_0/info/licenses/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..2a920c59d8abdd485a774087915986448495fd7c --- /dev/null +++ b/miniconda3/pkgs/mdurl-0.1.2-py313h06a4308_0/info/licenses/LICENSE @@ -0,0 +1,46 @@ +Copyright (c) 2015 Vitaly Puzrin, Alex Kocharin. +Copyright (c) 2021 Taneli Hukkinen + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +-------------------------------------------------------------------------------- + +.parse() is based on Joyent's node.js `url` code: + +Copyright Joyent, Inc. and other Node contributors. All rights reserved. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. diff --git a/miniconda3/pkgs/mdurl-0.1.2-py313h06a4308_0/info/paths.json b/miniconda3/pkgs/mdurl-0.1.2-py313h06a4308_0/info/paths.json new file mode 100644 index 0000000000000000000000000000000000000000..194d3e3a4c98a7f16ebb63d2c0a217c349eb92f3 --- /dev/null +++ b/miniconda3/pkgs/mdurl-0.1.2-py313h06a4308_0/info/paths.json @@ -0,0 +1,125 @@ +{ + "paths": [ + { + "_path": "lib/python3.13/site-packages/mdurl-0.1.2.dist-info/INSTALLER", + "path_type": "hardlink", + "sha256": "d0edee15f91b406f3f99726e44eb990be6e34fd0345b52b910c568e0eef6a2a8", + "size_in_bytes": 5 + }, + { + "_path": "lib/python3.13/site-packages/mdurl-0.1.2.dist-info/METADATA", + "path_type": "hardlink", + "sha256": "ab7bc2a105a2de8bac01911fc44422d9ed0e1596c799bbbad43e559cb11ef85d", + "size_in_bytes": 1660 + }, + { + "_path": "lib/python3.13/site-packages/mdurl-0.1.2.dist-info/RECORD", + "path_type": "hardlink", + "sha256": "005d89c1497ab41b92918de65032465ed908c07db4b6738b278645fa065898d9", + "size_in_bytes": 1340 + }, + { + "_path": "lib/python3.13/site-packages/mdurl-0.1.2.dist-info/REQUESTED", + "path_type": "hardlink", + "sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "size_in_bytes": 0 + }, + { + "_path": "lib/python3.13/site-packages/mdurl-0.1.2.dist-info/WHEEL", + "path_type": "hardlink", + "sha256": "1b68144734c4b66791f27add5d425f3620775585718a03d0f9b110ba3a4d88db", + "size_in_bytes": 82 + }, + { + "_path": "lib/python3.13/site-packages/mdurl-0.1.2.dist-info/direct_url.json", + "path_type": "hardlink", + "sha256": "65fc5311e07ffa27f156cddc9d40ac296b131ff13c4becf9787c93ed452af80d", + "size_in_bytes": 95 + }, + { + "_path": "lib/python3.13/site-packages/mdurl-0.1.2.dist-info/licenses/LICENSE", + "path_type": "hardlink", + "sha256": "7c605df6e28667a9603118e98274f64a49ce3eed0d26fccce9534a345e0ef955", + "size_in_bytes": 2338 + }, + { + "_path": "lib/python3.13/site-packages/mdurl/__init__.py", + "path_type": "hardlink", + "sha256": "d6fa44f3d3725e7888459342ff87fa04f9b751be1b3e7b637f2ca12d147ba295", + "size_in_bytes": 547 + }, + { + "_path": "lib/python3.13/site-packages/mdurl/__pycache__/__init__.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "8431fd0d067b4e09990b8653c2d2a768231e80e6c938df7604395c044b6a8772", + "size_in_bytes": 605 + }, + { + "_path": "lib/python3.13/site-packages/mdurl/__pycache__/_decode.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "98428882af948abcb2ad805464ebf2c1e446e2c29b1392f56510d754723e972c", + "size_in_bytes": 3760 + }, + { + "_path": "lib/python3.13/site-packages/mdurl/__pycache__/_encode.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "1bec6fa9cbbb5bd531680fb47dc4c1dab65ccf4fb69181fda3fc3f7c857658fa", + "size_in_bytes": 2867 + }, + { + "_path": "lib/python3.13/site-packages/mdurl/__pycache__/_format.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "aa8766ebaca4a1800f784c2d647d36dde8cfc429abfd45a333922b95ade1c37c", + "size_in_bytes": 1247 + }, + { + "_path": "lib/python3.13/site-packages/mdurl/__pycache__/_parse.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "a20555a56b70f0fe89c702768d87106a12d812584ca9a6db664a101ad4ee6c3f", + "size_in_bytes": 7650 + }, + { + "_path": "lib/python3.13/site-packages/mdurl/__pycache__/_url.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "64bb552d9a55db3594497a5b5f4b2b65f2bf15bcafac3915a30e7e4213a7c607", + "size_in_bytes": 686 + }, + { + "_path": "lib/python3.13/site-packages/mdurl/_decode.py", + "path_type": "hardlink", + "sha256": "dd0fe00d0a94fff4ef0dbbbbc7e6fd2e36d5978416cb983fa85c258dcbaf37f6", + "size_in_bytes": 3004 + }, + { + "_path": "lib/python3.13/site-packages/mdurl/_encode.py", + "path_type": "hardlink", + "sha256": "82824b505b75878ad564daaa9bdb75e4dc365be6c55d8404cb7691d352265afb", + "size_in_bytes": 2602 + }, + { + "_path": "lib/python3.13/site-packages/mdurl/_format.py", + "path_type": "hardlink", + "sha256": "c5972dd2675e3d70341f7900ab18c6b650793bce86df90c060c1a4038e02981e", + "size_in_bytes": 626 + }, + { + "_path": "lib/python3.13/site-packages/mdurl/_parse.py", + "path_type": "hardlink", + "sha256": "7b365290cdbfe0d436671d38eec11d7091bb3584111478992bb63c20d1c5cf06", + "size_in_bytes": 11374 + }, + { + "_path": "lib/python3.13/site-packages/mdurl/_url.py", + "path_type": "hardlink", + "sha256": "e6442745037603f1b8b2f2e747365c1b46dfa03f406c1ad80d7a2eb031d9df3d", + "size_in_bytes": 284 + }, + { + "_path": "lib/python3.13/site-packages/mdurl/py.typed", + "path_type": "hardlink", + "sha256": "f0f8f2675695a10a5156fb7bd66bafbaae6a13e8d315990af862c792175e6e67", + "size_in_bytes": 26 + } + ], + "paths_version": 1 +} \ No newline at end of file diff --git a/miniconda3/pkgs/mdurl-0.1.2-py313h06a4308_0/info/recipe/conda_build_config.yaml b/miniconda3/pkgs/mdurl-0.1.2-py313h06a4308_0/info/recipe/conda_build_config.yaml new file mode 100644 index 0000000000000000000000000000000000000000..c104ceffae0ee6616062b011c9a871dbcbec85ec --- /dev/null +++ b/miniconda3/pkgs/mdurl-0.1.2-py313h06a4308_0/info/recipe/conda_build_config.yaml @@ -0,0 +1,28 @@ +c_compiler: gcc +channel_targets: defaults +cpu_optimization_target: nocona +cran_mirror: https://cran.r-project.org +cxx_compiler: gxx +extend_keys: +- extend_keys +- pin_run_as_build +- ignore_version +- ignore_build_only_deps +fortran_compiler: gfortran +ignore_build_only_deps: +- python +- numpy +lua: '5' +numpy: '1.26' +perl: 5.26.2 +pin_run_as_build: + python: + max_pin: x.x + min_pin: x.x + r-base: + max_pin: x.x + min_pin: x.x +platform: linux-64 +python: '3.13' +r_base: '3.5' +target_platform: linux-64 diff --git a/miniconda3/pkgs/mdurl-0.1.2-py313h06a4308_0/info/recipe/meta.yaml b/miniconda3/pkgs/mdurl-0.1.2-py313h06a4308_0/info/recipe/meta.yaml new file mode 100644 index 0000000000000000000000000000000000000000..0123c619aa342b67faebb92749289cc523e21ef1 --- /dev/null +++ b/miniconda3/pkgs/mdurl-0.1.2-py313h06a4308_0/info/recipe/meta.yaml @@ -0,0 +1,90 @@ +# This file created by conda-build 25.1.2 +# meta.yaml template originally from: +# /home/task_175855216352428/mdurl-feedstock/recipe, last modified Mon Sep 22 14:42:45 2025 +# ------------------------------------------------ + +package: + name: mdurl + version: 0.1.2 +source: + - sha256: bb413d29f5eea38f31dd4754dd7377d4465116fb207585f97bf925588687c1ba + url: https://pypi.org/packages/source/m/mdurl/mdurl-0.1.2.tar.gz + - folder: gh + sha256: 99d4fabddab7ee4a05fa458deb1a6f0d009966e4631c50d1b875767a1cd3896d + url: https://github.com/executablebooks/mdurl/archive/refs/tags/0.1.2.tar.gz +build: + number: '0' + script: /home/task_175855216352428/conda-bld/mdurl_1758552176751/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_p/bin/python + -m pip install . -vv --no-deps --no-build-isolation + string: py313h06a4308_0 +requirements: + host: + - _libgcc_mutex 0.1 main + - _openmp_mutex 5.1 1_gnu + - bzip2 1.0.8 h5eee18b_6 + - ca-certificates 2025.9.9 h06a4308_0 + - expat 2.7.1 h6a678d5_0 + - flit-core 3.12.0 py313hee27c6d_0 + - ld_impl_linux-64 2.40 h12ee557_0 + - libffi 3.4.4 h6a678d5_1 + - libgcc-ng 11.2.0 h1234567_1 + - libgomp 11.2.0 h1234567_1 + - libmpdec 4.0.0 h5eee18b_0 + - libstdcxx-ng 11.2.0 h1234567_1 + - libuuid 1.41.5 h5eee18b_0 + - libxcb 1.17.0 h9b100fa_0 + - libzlib 1.3.1 hb25bd0a_0 + - ncurses 6.5 h7934f7d_0 + - openssl 3.0.17 h5eee18b_0 + - pip 25.2 pyhc872135_0 + - pthread-stubs 0.3 h0ce48e5_1 + - python 3.13.7 h7e8bc2b_100_cp313 + - python_abi 3.13 1_cp313 + - readline 8.3 hc2a1206_0 + - setuptools 78.1.1 py313h06a4308_0 + - sqlite 3.50.2 hb25bd0a_1 + - tk 8.6.15 h54e0aa7_0 + - tzdata 2025b h04d1e81_0 + - wheel 0.45.1 py313h06a4308_0 + - xorg-libx11 1.8.12 h9b100fa_1 + - xorg-libxau 1.0.12 h9b100fa_0 + - xorg-libxdmcp 1.1.5 h9b100fa_0 + - xorg-xorgproto 2024.1 h5eee18b_1 + - xz 5.6.4 h5eee18b_1 + - zlib 1.3.1 hb25bd0a_0 + run: + - python >=3.13,<3.14.0a0 + - python_abi 3.13.* *_cp313 +test: + commands: + - pip check + - python -c "from importlib.metadata import version; assert(version('mdurl')=='0.1.2')" + - pytest -v gh/tests + imports: + - mdurl + - mdurl._decode + - mdurl._encode + - mdurl._format + - mdurl._parse + - mdurl._url + requires: + - pip + - pytest + source_files: + - gh/tests +about: + description: This is a Python port of the JavaScript mdurl package. See the upstream + README.md file for API documentation. + dev_url: https://github.com/executablebooks/mdurl + doc_url: https://github.com/executablebooks/mdurl/blob/master/README.md + home: https://github.com/executablebooks/mdurl + license: MIT + license_family: MIT + license_file: LICENSE + summary: This is a Python port of the JavaScript mdurl package. See the upstream + README.md file for API documentation. +extra: + copy_test_source_files: true + final: true + recipe-maintainers: + - chrisjsewell diff --git a/miniconda3/pkgs/mdurl-0.1.2-py313h06a4308_0/info/recipe/meta.yaml.template b/miniconda3/pkgs/mdurl-0.1.2-py313h06a4308_0/info/recipe/meta.yaml.template new file mode 100644 index 0000000000000000000000000000000000000000..ef66da9e6baaa7f0b1b50ac5bc34112ef1e0c42d --- /dev/null +++ b/miniconda3/pkgs/mdurl-0.1.2-py313h06a4308_0/info/recipe/meta.yaml.template @@ -0,0 +1,58 @@ +{% set name = "mdurl" %} +{% set version = "0.1.2" %} + +package: + name: {{ name|lower }} + version: {{ version }} + +source: + - url: https://pypi.org/packages/source/{{ name[0] }}/{{ name }}/{{ name }}-{{ version }}.tar.gz + sha256: bb413d29f5eea38f31dd4754dd7377d4465116fb207585f97bf925588687c1ba + - url: https://github.com/executablebooks/{{ name }}/archive/refs/tags/{{ version }}.tar.gz + sha256: 99d4fabddab7ee4a05fa458deb1a6f0d009966e4631c50d1b875767a1cd3896d + folder: gh + +build: + number: 0 + script: {{ PYTHON }} -m pip install . -vv --no-deps --no-build-isolation + skip: true # [py<37] + +requirements: + host: + - python + - pip + - flit-core >=3.2.0,<4 + run: + - python + +test: + source_files: + - gh/tests + imports: + - mdurl + - mdurl._decode + - mdurl._encode + - mdurl._format + - mdurl._parse + - mdurl._url + requires: + - pip + - pytest + commands: + - pip check + - python -c "from importlib.metadata import version; assert(version('{{ name }}')=='{{ version }}')" + - pytest -v gh/tests + +about: + home: https://github.com/executablebooks/mdurl + license: MIT + license_family: MIT + license_file: LICENSE + summary: This is a Python port of the JavaScript mdurl package. See the upstream README.md file for API documentation. + description: This is a Python port of the JavaScript mdurl package. See the upstream README.md file for API documentation. + dev_url: https://github.com/executablebooks/mdurl + doc_url: https://github.com/executablebooks/mdurl/blob/master/README.md + +extra: + recipe-maintainers: + - chrisjsewell diff --git a/miniconda3/pkgs/mdurl-0.1.2-py313h06a4308_0/info/repodata_record.json b/miniconda3/pkgs/mdurl-0.1.2-py313h06a4308_0/info/repodata_record.json new file mode 100644 index 0000000000000000000000000000000000000000..e6210c582b612f01dddddfa014aaa74dd914b1da --- /dev/null +++ b/miniconda3/pkgs/mdurl-0.1.2-py313h06a4308_0/info/repodata_record.json @@ -0,0 +1,23 @@ +{ + "arch": "x86_64", + "build": "py313h06a4308_0", + "build_number": 0, + "channel": "https://repo.anaconda.com/pkgs/main/linux-64/", + "constrains": [], + "depends": [ + "python >=3.13,<3.14.0a0", + "python_abi 3.13.* *_cp313" + ], + "fn": "mdurl-0.1.2-py313h06a4308_0.conda", + "license": "MIT", + "license_family": "MIT", + "md5": "39da6986b50a3eb3cbf60c9883f4b92e", + "name": "mdurl", + "platform": "linux", + "sha256": "b4af3847be42fd97001227f10b8e6347aefb45199bcf5f358e870f4c43cbdd9a", + "size": 26871, + "subdir": "linux-64", + "timestamp": 1758552191000, + "url": "https://repo.anaconda.com/pkgs/main/linux-64/mdurl-0.1.2-py313h06a4308_0.conda", + "version": "0.1.2" +} \ No newline at end of file diff --git a/miniconda3/pkgs/mdurl-0.1.2-py313h06a4308_0/info/test/gh/tests/__init__.py b/miniconda3/pkgs/mdurl-0.1.2-py313h06a4308_0/info/test/gh/tests/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/miniconda3/pkgs/mdurl-0.1.2-py313h06a4308_0/info/test/gh/tests/decode.js b/miniconda3/pkgs/mdurl-0.1.2-py313h06a4308_0/info/test/gh/tests/decode.js new file mode 100644 index 0000000000000000000000000000000000000000..c9457babe0d8fa05542ae5661f81dd2717d26962 --- /dev/null +++ b/miniconda3/pkgs/mdurl-0.1.2-py313h06a4308_0/info/test/gh/tests/decode.js @@ -0,0 +1,123 @@ +// TODO: port to Python +'use strict'; + + +var assert = require('assert'); +var decode = require('../decode'); + +function encodeBinary(str) { + var result = ''; + + str = str.replace(/\s+/g, ''); + while (str.length) { + result = '%' + ('0' + parseInt(str.slice(-8), 2).toString(16)).slice(-2) + result; + str = str.slice(0, -8); + } + + return result; +} + +var samples = { + '00000000': true, + '01010101': true, + '01111111': true, + + // invalid as 1st byte + '10000000': true, + '10111111': true, + + // invalid sequences, 2nd byte should be >= 0x80 + '11000111 01010101': false, + '11100011 01010101': false, + '11110001 01010101': false, + + // invalid sequences, 2nd byte should be < 0xc0 + '11000111 11000000': false, + '11100011 11000000': false, + '11110001 11000000': false, + + // invalid 3rd byte + '11100011 10010101 01010101': false, + '11110001 10010101 01010101': false, + + // invalid 4th byte + '11110001 10010101 10010101 01010101': false, + + // valid sequences + '11000111 10101010': true, + '11100011 10101010 10101010': true, + '11110001 10101010 10101010 10101010': true, + + // minimal chars with given length + '11000010 10000000': true, + '11100000 10100000 10000000': true, + + // impossible sequences + '11000001 10111111': false, + '11100000 10011111 10111111': false, + '11000001 10000000': false, + '11100000 10010000 10000000': false, + + // maximum chars with given length + '11011111 10111111': true, + '11101111 10111111 10111111': true, + + '11110000 10010000 10000000 10000000': true, + '11110000 10010000 10001111 10001111': true, + '11110100 10001111 10110000 10000000': true, + '11110100 10001111 10111111 10111111': true, + + // too low + '11110000 10001111 10111111 10111111': false, + + // too high + '11110100 10010000 10000000 10000000': false, + '11110100 10011111 10111111 10111111': false, + + // surrogate range + '11101101 10011111 10111111': true, + '11101101 10100000 10000000': false, + '11101101 10111111 10111111': false, + '11101110 10000000 10000000': true +}; + +describe('decode', function() { + it('should decode %xx', function() { + assert.equal(decode('x%20xx%20%2520'), 'x xx %20'); + }); + + it('should not decode invalid sequences', function() { + assert.equal(decode('%2g%z1%%'), '%2g%z1%%'); + }); + + it('should not decode reservedSet', function() { + assert.equal(decode('%20%25%20', '%'), ' %25 '); + assert.equal(decode('%20%25%20', ' '), '%20%%20'); + assert.equal(decode('%20%25%20', ' %'), '%20%25%20'); + }); + + describe('utf8', function() { + Object.keys(samples).forEach(function(k) { + it(k, function() { + var res1, res2, + er = null, + str = encodeBinary(k); + + try { + res1 = decodeURIComponent(str); + } catch(e) { + er = e; + } + + res2 = decode(str); + + if (er) { + assert.notEqual(res2.indexOf('\ufffd'), -1); + } else { + assert.equal(res1, res2); + assert.equal(res2.indexOf('\ufffd'), -1); + } + }); + }); + }); +}); diff --git a/miniconda3/pkgs/mdurl-0.1.2-py313h06a4308_0/info/test/gh/tests/fixtures/__init__.py b/miniconda3/pkgs/mdurl-0.1.2-py313h06a4308_0/info/test/gh/tests/fixtures/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/miniconda3/pkgs/mdurl-0.1.2-py313h06a4308_0/info/test/gh/tests/fixtures/url.py b/miniconda3/pkgs/mdurl-0.1.2-py313h06a4308_0/info/test/gh/tests/fixtures/url.py new file mode 100644 index 0000000000000000000000000000000000000000..29431ec03acb2c9c4704cc104ca2f7e25aa1c1b0 --- /dev/null +++ b/miniconda3/pkgs/mdurl-0.1.2-py313h06a4308_0/info/test/gh/tests/fixtures/url.py @@ -0,0 +1,610 @@ +# Copyright Joyent, Inc. and other Node contributors. +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the +# "Software"), to deal in the Software without restriction, including +# without limitation the rights to use, copy, modify, merge, publish, +# distribute, sublicense, and/or sell copies of the Software, and to permit +# persons to whom the Software is furnished to do so, subject to the +# following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +# NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +# DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +# OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +# USE OR OTHER DEALINGS IN THE SOFTWARE. + + +# URLs to parse, and expected data +# { url : parsed } +PARSED = { + "//some_path": {"pathname": "//some_path"}, + "HTTP://www.example.com/": { + "protocol": "HTTP:", + "slashes": True, + "hostname": "www.example.com", + "pathname": "/", + }, + "HTTP://www.example.com": { + "protocol": "HTTP:", + "slashes": True, + "hostname": "www.example.com", + "pathname": "", + }, + "http://www.ExAmPlE.com/": { + "protocol": "http:", + "slashes": True, + "hostname": "www.ExAmPlE.com", + "pathname": "/", + }, + "http://user:pw@www.ExAmPlE.com/": { + "protocol": "http:", + "slashes": True, + "auth": "user:pw", + "hostname": "www.ExAmPlE.com", + "pathname": "/", + }, + "http://USER:PW@www.ExAmPlE.com/": { + "protocol": "http:", + "slashes": True, + "auth": "USER:PW", + "hostname": "www.ExAmPlE.com", + "pathname": "/", + }, + "http://user@www.example.com/": { + "protocol": "http:", + "slashes": True, + "auth": "user", + "hostname": "www.example.com", + "pathname": "/", + }, + "http://user%3Apw@www.example.com/": { + "protocol": "http:", + "slashes": True, + "auth": "user%3Apw", + "hostname": "www.example.com", + "pathname": "/", + }, + "http://x.com/path?that's#all, folks": { + "protocol": "http:", + "hostname": "x.com", + "slashes": True, + "search": "?that's", + "pathname": "/path", + "hash": "#all, folks", + }, + "HTTP://X.COM/Y": { + "protocol": "HTTP:", + "slashes": True, + "hostname": "X.COM", + "pathname": "/Y", + }, + # + not an invalid host character + # per https://url.spec.whatwg.org/#host-parsing + "http://x.y.com+a/b/c": { + "protocol": "http:", + "slashes": True, + "hostname": "x.y.com+a", + "pathname": "/b/c", + }, + # an unexpected invalid char in the hostname. + "HtTp://x.y.cOm;a/b/c?d=e#f gi": { + "protocol": "HtTp:", + "slashes": True, + "hostname": "x.y.cOm", + "pathname": ";a/b/c", + "search": "?d=e", + "hash": "#f gi", + }, + # make sure that we don't accidentally lcast the path parts. + "HtTp://x.y.cOm;A/b/c?d=e#f gi": { + "protocol": "HtTp:", + "slashes": True, + "hostname": "x.y.cOm", + "pathname": ";A/b/c", + "search": "?d=e", + "hash": "#f gi", + }, + "http://x...y...#p": { + "protocol": "http:", + "slashes": True, + "hostname": "x...y...", + "hash": "#p", + "pathname": "", + }, + 'http://x/p/"quoted"': { + "protocol": "http:", + "slashes": True, + "hostname": "x", + "pathname": '/p/"quoted"', + }, + " Is a URL!": { + "pathname": " Is a URL!" + }, + "http://www.narwhaljs.org/blog/categories?id=news": { + "protocol": "http:", + "slashes": True, + "hostname": "www.narwhaljs.org", + "search": "?id=news", + "pathname": "/blog/categories", + }, + "http://mt0.google.com/vt/lyrs=m@114&hl=en&src=api&x=2&y=2&z=3&s=": { + "protocol": "http:", + "slashes": True, + "hostname": "mt0.google.com", + "pathname": "/vt/lyrs=m@114&hl=en&src=api&x=2&y=2&z=3&s=", + }, + "http://mt0.google.com/vt/lyrs=m@114???&hl=en&src=api&x=2&y=2&z=3&s=": { + "protocol": "http:", + "slashes": True, + "hostname": "mt0.google.com", + "search": "???&hl=en&src=api&x=2&y=2&z=3&s=", + "pathname": "/vt/lyrs=m@114", + }, + "http://user:pass@mt0.google.com/vt/lyrs=m@114???&hl=en&src=api&x=2&y=2&z=3&s=": { + "protocol": "http:", + "slashes": True, + "auth": "user:pass", + "hostname": "mt0.google.com", + "search": "???&hl=en&src=api&x=2&y=2&z=3&s=", + "pathname": "/vt/lyrs=m@114", + }, + "file:///etc/passwd": { + "slashes": True, + "protocol": "file:", + "pathname": "/etc/passwd", + "hostname": "", + }, + "file://localhost/etc/passwd": { + "protocol": "file:", + "slashes": True, + "pathname": "/etc/passwd", + "hostname": "localhost", + }, + "file://foo/etc/passwd": { + "protocol": "file:", + "slashes": True, + "pathname": "/etc/passwd", + "hostname": "foo", + }, + "file:///etc/node/": { + "slashes": True, + "protocol": "file:", + "pathname": "/etc/node/", + "hostname": "", + }, + "file://localhost/etc/node/": { + "protocol": "file:", + "slashes": True, + "pathname": "/etc/node/", + "hostname": "localhost", + }, + "file://foo/etc/node/": { + "protocol": "file:", + "slashes": True, + "pathname": "/etc/node/", + "hostname": "foo", + }, + "http:/baz/../foo/bar": {"protocol": "http:", "pathname": "/baz/../foo/bar"}, + "http://user:pass@example.com:8000/foo/bar?baz=quux#frag": { + "protocol": "http:", + "slashes": True, + "auth": "user:pass", + "port": "8000", + "hostname": "example.com", + "hash": "#frag", + "search": "?baz=quux", + "pathname": "/foo/bar", + }, + "//user:pass@example.com:8000/foo/bar?baz=quux#frag": { + "slashes": True, + "auth": "user:pass", + "port": "8000", + "hostname": "example.com", + "hash": "#frag", + "search": "?baz=quux", + "pathname": "/foo/bar", + }, + "/foo/bar?baz=quux#frag": { + "hash": "#frag", + "search": "?baz=quux", + "pathname": "/foo/bar", + }, + "http:/foo/bar?baz=quux#frag": { + "protocol": "http:", + "hash": "#frag", + "search": "?baz=quux", + "pathname": "/foo/bar", + }, + "mailto:foo@bar.com?subject=hello": { + "protocol": "mailto:", + "auth": "foo", + "hostname": "bar.com", + "search": "?subject=hello", + }, + "javascript:alert('hello');": { + "protocol": "javascript:", + "pathname": "alert('hello');", + }, + "xmpp:isaacschlueter@jabber.org": { + "protocol": "xmpp:", + "auth": "isaacschlueter", + "hostname": "jabber.org", + }, + "http://atpass:foo%40bar@127.0.0.1:8080/path?search=foo#bar": { + "protocol": "http:", + "slashes": True, + "auth": "atpass:foo%40bar", + "hostname": "127.0.0.1", + "port": "8080", + "pathname": "/path", + "search": "?search=foo", + "hash": "#bar", + }, + "svn+ssh://foo/bar": { + "hostname": "foo", + "protocol": "svn+ssh:", + "pathname": "/bar", + "slashes": True, + }, + "dash-test://foo/bar": { + "hostname": "foo", + "protocol": "dash-test:", + "pathname": "/bar", + "slashes": True, + }, + "dash-test:foo/bar": { + "hostname": "foo", + "protocol": "dash-test:", + "pathname": "/bar", + }, + "dot.test://foo/bar": { + "hostname": "foo", + "protocol": "dot.test:", + "pathname": "/bar", + "slashes": True, + }, + "dot.test:foo/bar": { + "hostname": "foo", + "protocol": "dot.test:", + "pathname": "/bar", + }, + # IDNA tests + "http://www.日本語.com/": { + "protocol": "http:", + "slashes": True, + "hostname": "www.日本語.com", + "pathname": "/", + }, + "http://example.Bücher.com/": { + "protocol": "http:", + "slashes": True, + "hostname": "example.Bücher.com", + "pathname": "/", + }, + "http://www.Äffchen.com/": { + "protocol": "http:", + "slashes": True, + "hostname": "www.Äffchen.com", + "pathname": "/", + }, + "http://www.Äffchen.cOm;A/b/c?d=e#f gi": { + "protocol": "http:", + "slashes": True, + "hostname": "www.Äffchen.cOm", + "pathname": ";A/b/c", + "search": "?d=e", + "hash": "#f gi", + }, + "http://SÉLIER.COM/": { + "protocol": "http:", + "slashes": True, + "hostname": "SÉLIER.COM", + "pathname": "/", + }, + "http://ليهمابتكلموشعربي؟.ي؟/": { + "protocol": "http:", + "slashes": True, + "hostname": "ليهمابتكلموشعربي؟.ي؟", + "pathname": "/", + }, + "http://➡.ws/➡": { + "protocol": "http:", + "slashes": True, + "hostname": "➡.ws", + "pathname": "/➡", + }, + "http://bucket_name.s3.amazonaws.com/image.jpg": { + "protocol": "http:", + "slashes": True, + "hostname": "bucket_name.s3.amazonaws.com", + "pathname": "/image.jpg", + }, + "git+http://github.com/joyent/node.git": { + "protocol": "git+http:", + "slashes": True, + "hostname": "github.com", + "pathname": "/joyent/node.git", + }, + # if local1@domain1 is uses as a relative URL it may + # be parse into auth@hostname, but here there is no + # way to make it work in url.parse, I add the test to be explicit + "local1@domain1": {"pathname": "local1@domain1"}, + # While this may seem counter-intuitive, a browser will parse + #
as a path. + "www.example.com": {"pathname": "www.example.com"}, + # ipv6 support + "[fe80::1]": {"pathname": "[fe80::1]"}, + "coap://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]": { + "protocol": "coap:", + "slashes": True, + "hostname": "FEDC:BA98:7654:3210:FEDC:BA98:7654:3210", + }, + "coap://[1080:0:0:0:8:800:200C:417A]:61616/": { + "protocol": "coap:", + "slashes": True, + "port": "61616", + "hostname": "1080:0:0:0:8:800:200C:417A", + "pathname": "/", + }, + "http://user:password@[3ffe:2a00:100:7031::1]:8080": { + "protocol": "http:", + "slashes": True, + "auth": "user:password", + "port": "8080", + "hostname": "3ffe:2a00:100:7031::1", + "pathname": "", + }, + "coap://u:p@[::192.9.5.5]:61616/.well-known/r?n=Temperature": { + "protocol": "coap:", + "slashes": True, + "auth": "u:p", + "port": "61616", + "hostname": "::192.9.5.5", + "search": "?n=Temperature", + "pathname": "/.well-known/r", + }, + # empty port + "http://example.com:": { + "protocol": "http:", + "slashes": True, + "hostname": "example.com", + "pathname": ":", + }, + "http://example.com:/a/b.html": { + "protocol": "http:", + "slashes": True, + "hostname": "example.com", + "pathname": ":/a/b.html", + }, + "http://example.com:?a=b": { + "protocol": "http:", + "slashes": True, + "hostname": "example.com", + "search": "?a=b", + "pathname": ":", + }, + "http://example.com:#abc": { + "protocol": "http:", + "slashes": True, + "hostname": "example.com", + "hash": "#abc", + "pathname": ":", + }, + "http://[fe80::1]:/a/b?a=b#abc": { + "protocol": "http:", + "slashes": True, + "hostname": "fe80::1", + "search": "?a=b", + "hash": "#abc", + "pathname": ":/a/b", + }, + "http://-lovemonsterz.tumblr.com/rss": { + "protocol": "http:", + "slashes": True, + "hostname": "-lovemonsterz.tumblr.com", + "pathname": "/rss", + }, + "http://-lovemonsterz.tumblr.com:80/rss": { + "protocol": "http:", + "slashes": True, + "port": "80", + "hostname": "-lovemonsterz.tumblr.com", + "pathname": "/rss", + }, + "http://user:pass@-lovemonsterz.tumblr.com/rss": { + "protocol": "http:", + "slashes": True, + "auth": "user:pass", + "hostname": "-lovemonsterz.tumblr.com", + "pathname": "/rss", + }, + "http://user:pass@-lovemonsterz.tumblr.com:80/rss": { + "protocol": "http:", + "slashes": True, + "auth": "user:pass", + "port": "80", + "hostname": "-lovemonsterz.tumblr.com", + "pathname": "/rss", + }, + "http://_jabber._tcp.google.com/test": { + "protocol": "http:", + "slashes": True, + "hostname": "_jabber._tcp.google.com", + "pathname": "/test", + }, + "http://user:pass@_jabber._tcp.google.com/test": { + "protocol": "http:", + "slashes": True, + "auth": "user:pass", + "hostname": "_jabber._tcp.google.com", + "pathname": "/test", + }, + "http://_jabber._tcp.google.com:80/test": { + "protocol": "http:", + "slashes": True, + "port": "80", + "hostname": "_jabber._tcp.google.com", + "pathname": "/test", + }, + "http://user:pass@_jabber._tcp.google.com:80/test": { + "protocol": "http:", + "slashes": True, + "auth": "user:pass", + "port": "80", + "hostname": "_jabber._tcp.google.com", + "pathname": "/test", + }, + "http://x:1/' <>\"`/{}|\\^~`/": { + "protocol": "http:", + "slashes": True, + "port": "1", + "hostname": "x", + "pathname": "/' <>\"`/{}|\\^~`/", + }, + "http://a@b@c/": { + "protocol": "http:", + "slashes": True, + "auth": "a@b", + "hostname": "c", + "pathname": "/", + }, + "http://a@b?@c": { + "protocol": "http:", + "slashes": True, + "auth": "a", + "hostname": "b", + "pathname": "", + "search": "?@c", + }, + "http://a\r\" \t\n<'b:b@c\r\nd/e?f": { + "protocol": "http:", + "slashes": True, + "auth": "a\r\" \t\n<'b:b", + "hostname": "c", + "search": "?f", + "pathname": "\r\nd/e", + }, + # git urls used by npm + "git+ssh://git@github.com:npm/npm": { + "protocol": "git+ssh:", + "slashes": True, + "auth": "git", + "hostname": "github.com", + "pathname": ":npm/npm", + }, + "http://example.com?foo=bar#frag": { + "protocol": "http:", + "slashes": True, + "hostname": "example.com", + "hash": "#frag", + "search": "?foo=bar", + "pathname": "", + }, + "http://example.com?foo=@bar#frag": { + "protocol": "http:", + "slashes": True, + "hostname": "example.com", + "hash": "#frag", + "search": "?foo=@bar", + "pathname": "", + }, + "http://example.com?foo=/bar/#frag": { + "protocol": "http:", + "slashes": True, + "hostname": "example.com", + "hash": "#frag", + "search": "?foo=/bar/", + "pathname": "", + }, + "http://example.com?foo=?bar/#frag": { + "protocol": "http:", + "slashes": True, + "hostname": "example.com", + "hash": "#frag", + "search": "?foo=?bar/", + "pathname": "", + }, + "http://example.com#frag=?bar/#frag": { + "protocol": "http:", + "slashes": True, + "hostname": "example.com", + "hash": "#frag=?bar/#frag", + "pathname": "", + }, + 'http://google.com" onload="alert(42)/': { + "hostname": "google.com", + "protocol": "http:", + "slashes": True, + "pathname": '" onload="alert(42)/', + }, + "http://a.com/a/b/c?s#h": { + "protocol": "http:", + "slashes": True, + "pathname": "/a/b/c", + "hostname": "a.com", + "hash": "#h", + "search": "?s", + }, + "http://atpass:foo%40bar@127.0.0.1/": { + "auth": "atpass:foo%40bar", + "slashes": True, + "hostname": "127.0.0.1", + "protocol": "http:", + "pathname": "/", + }, + "http://atslash%2F%40:%2F%40@foo/": { + "auth": "atslash%2F%40:%2F%40", + "hostname": "foo", + "protocol": "http:", + "pathname": "/", + "slashes": True, + }, + # ipv6 support + "coap:u:p@[::1]:61616/.well-known/r?n=Temperature": { + "protocol": "coap:", + "auth": "u:p", + "hostname": "::1", + "port": "61616", + "pathname": "/.well-known/r", + "search": "?n=Temperature", + }, + "coap:[fedc:ba98:7654:3210:fedc:ba98:7654:3210]:61616/s/stopButton": { + "hostname": "fedc:ba98:7654:3210:fedc:ba98:7654:3210", + "port": "61616", + "protocol": "coap:", + "pathname": "/s/stopButton", + }, + # encode context-specific delimiters in path and query, but do not touch + # other non-delimiter chars like `%`. + # + # `?` and `#` in path and search + "http://ex.com/foo%3F100%m%23r?abc=the%231?&foo=bar#frag": { + "protocol": "http:", + "hostname": "ex.com", + "hash": "#frag", + "search": "?abc=the%231?&foo=bar", + "pathname": "/foo%3F100%m%23r", + "slashes": True, + }, + # `?` and `#` in search only + "http://ex.com/fooA100%mBr?abc=the%231?&foo=bar#frag": { + "protocol": "http:", + "hostname": "ex.com", + "hash": "#frag", + "search": "?abc=the%231?&foo=bar", + "pathname": "/fooA100%mBr", + "slashes": True, + }, + # + "http://": { + "protocol": "http:", + "hostname": "", + "slashes": True, + }, +} diff --git a/miniconda3/pkgs/mdurl-0.1.2-py313h06a4308_0/info/test/gh/tests/requirements.txt b/miniconda3/pkgs/mdurl-0.1.2-py313h06a4308_0/info/test/gh/tests/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..6f055500b20176c5818ede4885ac80b272f62ec8 --- /dev/null +++ b/miniconda3/pkgs/mdurl-0.1.2-py313h06a4308_0/info/test/gh/tests/requirements.txt @@ -0,0 +1,3 @@ +pytest +pytest-randomly +pytest-cov diff --git a/miniconda3/pkgs/mdurl-0.1.2-py313h06a4308_0/info/test/gh/tests/test_decode.py b/miniconda3/pkgs/mdurl-0.1.2-py313h06a4308_0/info/test/gh/tests/test_decode.py new file mode 100644 index 0000000000000000000000000000000000000000..bc58ce0a0a07183bda5dfae1016b525aa9601ac4 --- /dev/null +++ b/miniconda3/pkgs/mdurl-0.1.2-py313h06a4308_0/info/test/gh/tests/test_decode.py @@ -0,0 +1,5 @@ +from mdurl import decode + + +def test_decode_multi_byte(): + assert decode("https://host.invalid/%F0%9F%91%A9") == "https://host.invalid/👩" diff --git a/miniconda3/pkgs/mdurl-0.1.2-py313h06a4308_0/info/test/gh/tests/test_encode.py b/miniconda3/pkgs/mdurl-0.1.2-py313h06a4308_0/info/test/gh/tests/test_encode.py new file mode 100644 index 0000000000000000000000000000000000000000..7414bac634a742cd56bcbcea2dc8b03b581d5866 --- /dev/null +++ b/miniconda3/pkgs/mdurl-0.1.2-py313h06a4308_0/info/test/gh/tests/test_encode.py @@ -0,0 +1,50 @@ +import pytest + +from mdurl import encode + + +@pytest.mark.parametrize( + "input_,expected", + [ + pytest.param("%%%", "%25%25%25", id="should encode percent"), + pytest.param("\r\n", "%0D%0A", id="should encode control chars"), + pytest.param("?#", "?#", id="should not encode parts of an url"), + pytest.param("[]^", "%5B%5D%5E", id="should not encode []^ - commonmark tests"), + pytest.param("my url", "my%20url", id="should encode spaces"), + pytest.param("φου", "%CF%86%CE%BF%CF%85", id="should encode unicode"), + pytest.param( + "%FG", "%25FG", id="should encode % if it doesn't start a valid escape seq" + ), + pytest.param( + "%00%FF", "%00%FF", id="should preserve non-utf8 encoded characters" + ), + pytest.param( + "\x00\x7F\x80", + "%00%7F%C2%80", + id="should encode characters on the cache borders", + ), # protects against off-by-one in cache implementation + ], +) +def test_encode(input_, expected): + assert encode(input_) == expected + + +def test_encode_arguments(): + assert encode("!@#$", exclude="@$") == "%21@%23$" + assert encode("%20%2G", keep_escaped=True) == "%20%252G" + assert encode("%20%2G", keep_escaped=False) == "%2520%252G" + assert encode("!@%25", exclude="@", keep_escaped=False) == "%21@%2525" + + +def test_encode_surrogates(): + # bad surrogates (high) + assert encode("\uD800foo") == "%EF%BF%BDfoo" + assert encode("foo\uD800") == "foo%EF%BF%BD" + + # bad surrogates (low) + assert encode("\uDD00foo") == "%EF%BF%BDfoo" + assert encode("foo\uDD00") == "foo%EF%BF%BD" + + # valid one + # (the codepoint is "D800 DD00" in UTF-16BE) + assert encode("𐄀") == "%F0%90%84%80" diff --git a/miniconda3/pkgs/mdurl-0.1.2-py313h06a4308_0/info/test/gh/tests/test_format.py b/miniconda3/pkgs/mdurl-0.1.2-py313h06a4308_0/info/test/gh/tests/test_format.py new file mode 100644 index 0000000000000000000000000000000000000000..0cf12191c450bf864099a448dde6b89793ea883a --- /dev/null +++ b/miniconda3/pkgs/mdurl-0.1.2-py313h06a4308_0/info/test/gh/tests/test_format.py @@ -0,0 +1,10 @@ +import pytest + +from mdurl import format, parse +from tests.fixtures.url import PARSED as FIXTURES + + +@pytest.mark.parametrize("url", FIXTURES.keys()) +def test_format(url): + parsed = parse(url) + assert format(parsed) == url diff --git a/miniconda3/pkgs/mdurl-0.1.2-py313h06a4308_0/info/test/gh/tests/test_parse.py b/miniconda3/pkgs/mdurl-0.1.2-py313h06a4308_0/info/test/gh/tests/test_parse.py new file mode 100644 index 0000000000000000000000000000000000000000..aa4ae44648e67a048f0b20280d7cc7a4903f5006 --- /dev/null +++ b/miniconda3/pkgs/mdurl-0.1.2-py313h06a4308_0/info/test/gh/tests/test_parse.py @@ -0,0 +1,26 @@ +import pytest + +from mdurl import parse +from tests.fixtures.url import PARSED as FIXTURES + + +def is_url_and_dict_equal(url, url_dict): + return ( + url.protocol == url_dict.get("protocol") + and url.slashes == url_dict.get("slashes", False) + and url.auth == url_dict.get("auth") + and url.port == url_dict.get("port") + and url.hostname == url_dict.get("hostname") + and url.hash == url_dict.get("hash") + and url.search == url_dict.get("search") + and url.pathname == url_dict.get("pathname") + ) + + +@pytest.mark.parametrize( + "url,expected_dict", + FIXTURES.items(), +) +def test_parse(url, expected_dict): + parsed = parse(url) + assert is_url_and_dict_equal(parsed, expected_dict) diff --git a/miniconda3/pkgs/mdurl-0.1.2-py313h06a4308_0/info/test/run_test.py b/miniconda3/pkgs/mdurl-0.1.2-py313h06a4308_0/info/test/run_test.py new file mode 100644 index 0000000000000000000000000000000000000000..4b64378505ae9a9a497d747cf39e3485a7289e0f --- /dev/null +++ b/miniconda3/pkgs/mdurl-0.1.2-py313h06a4308_0/info/test/run_test.py @@ -0,0 +1,18 @@ +print("import: 'mdurl'") +import mdurl + +print("import: 'mdurl._decode'") +import mdurl._decode + +print("import: 'mdurl._encode'") +import mdurl._encode + +print("import: 'mdurl._format'") +import mdurl._format + +print("import: 'mdurl._parse'") +import mdurl._parse + +print("import: 'mdurl._url'") +import mdurl._url + diff --git a/miniconda3/pkgs/mdurl-0.1.2-py313h06a4308_0/info/test/run_test.sh b/miniconda3/pkgs/mdurl-0.1.2-py313h06a4308_0/info/test/run_test.sh new file mode 100644 index 0000000000000000000000000000000000000000..c8664c187168ab41ff01335216fadd5c0ea146c7 --- /dev/null +++ b/miniconda3/pkgs/mdurl-0.1.2-py313h06a4308_0/info/test/run_test.sh @@ -0,0 +1,10 @@ + + +set -ex + + + +pip check +python -c "from importlib.metadata import version; assert(version('mdurl')=='0.1.2')" +pytest -v gh/tests +exit 0 diff --git a/miniconda3/pkgs/mdurl-0.1.2-py313h06a4308_0/info/test/test_time_dependencies.json b/miniconda3/pkgs/mdurl-0.1.2-py313h06a4308_0/info/test/test_time_dependencies.json new file mode 100644 index 0000000000000000000000000000000000000000..d148ef6e9c8542d5f2035b58b19f01b91b024856 --- /dev/null +++ b/miniconda3/pkgs/mdurl-0.1.2-py313h06a4308_0/info/test/test_time_dependencies.json @@ -0,0 +1 @@ +["pip", "pytest"] \ No newline at end of file diff --git a/miniconda3/pkgs/mdurl-0.1.2-py313h06a4308_0/lib/python3.13/site-packages/mdurl-0.1.2.dist-info/INSTALLER b/miniconda3/pkgs/mdurl-0.1.2-py313h06a4308_0/lib/python3.13/site-packages/mdurl-0.1.2.dist-info/INSTALLER new file mode 100644 index 0000000000000000000000000000000000000000..f79e4cb9aaf0b2d9e8ba78861e2071317b2384b3 --- /dev/null +++ b/miniconda3/pkgs/mdurl-0.1.2-py313h06a4308_0/lib/python3.13/site-packages/mdurl-0.1.2.dist-info/INSTALLER @@ -0,0 +1 @@ +conda \ No newline at end of file diff --git a/miniconda3/pkgs/mdurl-0.1.2-py313h06a4308_0/lib/python3.13/site-packages/mdurl-0.1.2.dist-info/METADATA b/miniconda3/pkgs/mdurl-0.1.2-py313h06a4308_0/lib/python3.13/site-packages/mdurl-0.1.2.dist-info/METADATA new file mode 100644 index 0000000000000000000000000000000000000000..635d84897abf2d079ef84a7a729b5d4d7ceb2a3b --- /dev/null +++ b/miniconda3/pkgs/mdurl-0.1.2-py313h06a4308_0/lib/python3.13/site-packages/mdurl-0.1.2.dist-info/METADATA @@ -0,0 +1,33 @@ +Metadata-Version: 2.4 +Name: mdurl +Version: 0.1.2 +Summary: Markdown URL utilities +Keywords: markdown,commonmark +Author-email: Taneli Hukkinen +Requires-Python: >=3.7 +Description-Content-Type: text/markdown +Classifier: License :: OSI Approved :: MIT License +Classifier: Operating System :: MacOS +Classifier: Operating System :: Microsoft :: Windows +Classifier: Operating System :: POSIX :: Linux +Classifier: Programming Language :: Python :: 3 :: Only +Classifier: Programming Language :: Python :: 3.7 +Classifier: Programming Language :: Python :: 3.8 +Classifier: Programming Language :: Python :: 3.9 +Classifier: Programming Language :: Python :: 3.10 +Classifier: Programming Language :: Python :: Implementation :: CPython +Classifier: Programming Language :: Python :: Implementation :: PyPy +Classifier: Topic :: Software Development :: Libraries :: Python Modules +Classifier: Typing :: Typed +License-File: LICENSE +Project-URL: Homepage, https://github.com/executablebooks/mdurl + +# mdurl + +[![Build Status](https://github.com/executablebooks/mdurl/workflows/Tests/badge.svg?branch=master)](https://github.com/executablebooks/mdurl/actions?query=workflow%3ATests+branch%3Amaster+event%3Apush) +[![codecov.io](https://codecov.io/gh/executablebooks/mdurl/branch/master/graph/badge.svg)](https://codecov.io/gh/executablebooks/mdurl) +[![PyPI version](https://img.shields.io/pypi/v/mdurl)](https://pypi.org/project/mdurl) + +This is a Python port of the JavaScript [mdurl](https://www.npmjs.com/package/mdurl) package. +See the [upstream README.md file](https://github.com/markdown-it/mdurl/blob/master/README.md) for API documentation. + diff --git a/miniconda3/pkgs/mdurl-0.1.2-py313h06a4308_0/lib/python3.13/site-packages/mdurl-0.1.2.dist-info/RECORD b/miniconda3/pkgs/mdurl-0.1.2-py313h06a4308_0/lib/python3.13/site-packages/mdurl-0.1.2.dist-info/RECORD new file mode 100644 index 0000000000000000000000000000000000000000..a5030004b67a736406bd1d1c98c32bb81ad9fa5d --- /dev/null +++ b/miniconda3/pkgs/mdurl-0.1.2-py313h06a4308_0/lib/python3.13/site-packages/mdurl-0.1.2.dist-info/RECORD @@ -0,0 +1,20 @@ +mdurl-0.1.2.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4 +mdurl-0.1.2.dist-info/METADATA,sha256=q3vCoQWi3ousAZEfxEQi2e0OFZbHmbu61D5VnLEe-F0,1660 +mdurl-0.1.2.dist-info/RECORD,, +mdurl-0.1.2.dist-info/REQUESTED,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +mdurl-0.1.2.dist-info/WHEEL,sha256=G2gURzTEtmeR8nrdXUJfNiB3VYVxigPQ-bEQujpNiNs,82 +mdurl-0.1.2.dist-info/direct_url.json,sha256=ZfxTEeB_-ifxVs3cnUCsKWsTH_E8S-z5eHyT7UUq-A0,95 +mdurl-0.1.2.dist-info/licenses/LICENSE,sha256=fGBd9uKGZ6lgMRjpgnT2SknOPu0NJvzM6VNKNF4O-VU,2338 +mdurl/__init__.py,sha256=1vpE89NyXniIRZNC_4f6BPm3Ub4bPntjfyyhLRR7opU,547 +mdurl/__pycache__/__init__.cpython-313.pyc,, +mdurl/__pycache__/_decode.cpython-313.pyc,, +mdurl/__pycache__/_encode.cpython-313.pyc,, +mdurl/__pycache__/_format.cpython-313.pyc,, +mdurl/__pycache__/_parse.cpython-313.pyc,, +mdurl/__pycache__/_url.cpython-313.pyc,, +mdurl/_decode.py,sha256=3Q_gDQqU__TvDbu7x-b9LjbVl4QWy5g_qFwljcuvN_Y,3004 +mdurl/_encode.py,sha256=goJLUFt1h4rVZNqqm9t15Nw2W-bFXYQEy3aR01ImWvs,2602 +mdurl/_format.py,sha256=xZct0mdePXA0H3kAqxjGtlB5O86G35DAYMGkA44CmB4,626 +mdurl/_parse.py,sha256=ezZSkM2_4NQ2Zx047sEdcJG7NYQRFHiZK7Y8INHFzwY,11374 +mdurl/_url.py,sha256=5kQnRQN2A_G4svLnRzZcG0bfoD9AbBrYDXousDHZ3z0,284 +mdurl/py.typed,sha256=8PjyZ1aVoQpRVvt71muvuq5qE-jTFZkK-GLHkhdebmc,26 diff --git a/miniconda3/pkgs/mdurl-0.1.2-py313h06a4308_0/lib/python3.13/site-packages/mdurl-0.1.2.dist-info/REQUESTED b/miniconda3/pkgs/mdurl-0.1.2-py313h06a4308_0/lib/python3.13/site-packages/mdurl-0.1.2.dist-info/REQUESTED new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/miniconda3/pkgs/mdurl-0.1.2-py313h06a4308_0/lib/python3.13/site-packages/mdurl-0.1.2.dist-info/WHEEL b/miniconda3/pkgs/mdurl-0.1.2-py313h06a4308_0/lib/python3.13/site-packages/mdurl-0.1.2.dist-info/WHEEL new file mode 100644 index 0000000000000000000000000000000000000000..d8b9936dad9ab2513fa6979f411560d3b6b57e37 --- /dev/null +++ b/miniconda3/pkgs/mdurl-0.1.2-py313h06a4308_0/lib/python3.13/site-packages/mdurl-0.1.2.dist-info/WHEEL @@ -0,0 +1,4 @@ +Wheel-Version: 1.0 +Generator: flit 3.12.0 +Root-Is-Purelib: true +Tag: py3-none-any diff --git a/miniconda3/pkgs/mdurl-0.1.2-py313h06a4308_0/lib/python3.13/site-packages/mdurl-0.1.2.dist-info/direct_url.json b/miniconda3/pkgs/mdurl-0.1.2-py313h06a4308_0/lib/python3.13/site-packages/mdurl-0.1.2.dist-info/direct_url.json new file mode 100644 index 0000000000000000000000000000000000000000..ca8b874655ed263901b2c63ef6d03c3c5d5803db --- /dev/null +++ b/miniconda3/pkgs/mdurl-0.1.2-py313h06a4308_0/lib/python3.13/site-packages/mdurl-0.1.2.dist-info/direct_url.json @@ -0,0 +1 @@ +{"dir_info": {}, "url": "file:///home/task_175855216352428/conda-bld/mdurl_1758552176751/work"} \ No newline at end of file diff --git a/miniconda3/pkgs/mdurl-0.1.2-py313h06a4308_0/lib/python3.13/site-packages/mdurl-0.1.2.dist-info/licenses/LICENSE b/miniconda3/pkgs/mdurl-0.1.2-py313h06a4308_0/lib/python3.13/site-packages/mdurl-0.1.2.dist-info/licenses/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..2a920c59d8abdd485a774087915986448495fd7c --- /dev/null +++ b/miniconda3/pkgs/mdurl-0.1.2-py313h06a4308_0/lib/python3.13/site-packages/mdurl-0.1.2.dist-info/licenses/LICENSE @@ -0,0 +1,46 @@ +Copyright (c) 2015 Vitaly Puzrin, Alex Kocharin. +Copyright (c) 2021 Taneli Hukkinen + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +-------------------------------------------------------------------------------- + +.parse() is based on Joyent's node.js `url` code: + +Copyright Joyent, Inc. and other Node contributors. All rights reserved. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. diff --git a/miniconda3/pkgs/mdurl-0.1.2-py313h06a4308_0/lib/python3.13/site-packages/mdurl/__init__.py b/miniconda3/pkgs/mdurl-0.1.2-py313h06a4308_0/lib/python3.13/site-packages/mdurl/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cdbb640e004cef0e950a656a53d92d89d82c7472 --- /dev/null +++ b/miniconda3/pkgs/mdurl-0.1.2-py313h06a4308_0/lib/python3.13/site-packages/mdurl/__init__.py @@ -0,0 +1,18 @@ +__all__ = ( + "decode", + "DECODE_DEFAULT_CHARS", + "DECODE_COMPONENT_CHARS", + "encode", + "ENCODE_DEFAULT_CHARS", + "ENCODE_COMPONENT_CHARS", + "format", + "parse", + "URL", +) +__version__ = "0.1.2" # DO NOT EDIT THIS LINE MANUALLY. LET bump2version UTILITY DO IT + +from mdurl._decode import DECODE_COMPONENT_CHARS, DECODE_DEFAULT_CHARS, decode +from mdurl._encode import ENCODE_COMPONENT_CHARS, ENCODE_DEFAULT_CHARS, encode +from mdurl._format import format +from mdurl._parse import url_parse as parse +from mdurl._url import URL diff --git a/miniconda3/pkgs/mdurl-0.1.2-py313h06a4308_0/lib/python3.13/site-packages/mdurl/_decode.py b/miniconda3/pkgs/mdurl-0.1.2-py313h06a4308_0/lib/python3.13/site-packages/mdurl/_decode.py new file mode 100644 index 0000000000000000000000000000000000000000..9b50a2dde976a6d43491ec6f20d12e60f6f6597f --- /dev/null +++ b/miniconda3/pkgs/mdurl-0.1.2-py313h06a4308_0/lib/python3.13/site-packages/mdurl/_decode.py @@ -0,0 +1,104 @@ +from __future__ import annotations + +from collections.abc import Sequence +import functools +import re + +DECODE_DEFAULT_CHARS = ";/?:@&=+$,#" +DECODE_COMPONENT_CHARS = "" + +decode_cache: dict[str, list[str]] = {} + + +def get_decode_cache(exclude: str) -> Sequence[str]: + if exclude in decode_cache: + return decode_cache[exclude] + + cache: list[str] = [] + decode_cache[exclude] = cache + + for i in range(128): + ch = chr(i) + cache.append(ch) + + for i in range(len(exclude)): + ch_code = ord(exclude[i]) + cache[ch_code] = "%" + ("0" + hex(ch_code)[2:].upper())[-2:] + + return cache + + +# Decode percent-encoded string. +# +def decode(string: str, exclude: str = DECODE_DEFAULT_CHARS) -> str: + cache = get_decode_cache(exclude) + repl_func = functools.partial(repl_func_with_cache, cache=cache) + return re.sub(r"(%[a-f0-9]{2})+", repl_func, string, flags=re.IGNORECASE) + + +def repl_func_with_cache(match: re.Match, cache: Sequence[str]) -> str: + seq = match.group() + result = "" + + i = 0 + l = len(seq) # noqa: E741 + while i < l: + b1 = int(seq[i + 1 : i + 3], 16) + + if b1 < 0x80: + result += cache[b1] + i += 3 # emulate JS for loop statement3 + continue + + if (b1 & 0xE0) == 0xC0 and (i + 3 < l): + # 110xxxxx 10xxxxxx + b2 = int(seq[i + 4 : i + 6], 16) + + if (b2 & 0xC0) == 0x80: + all_bytes = bytes((b1, b2)) + try: + result += all_bytes.decode() + except UnicodeDecodeError: + result += "\ufffd" * 2 + + i += 3 + i += 3 # emulate JS for loop statement3 + continue + + if (b1 & 0xF0) == 0xE0 and (i + 6 < l): + # 1110xxxx 10xxxxxx 10xxxxxx + b2 = int(seq[i + 4 : i + 6], 16) + b3 = int(seq[i + 7 : i + 9], 16) + + if (b2 & 0xC0) == 0x80 and (b3 & 0xC0) == 0x80: + all_bytes = bytes((b1, b2, b3)) + try: + result += all_bytes.decode() + except UnicodeDecodeError: + result += "\ufffd" * 3 + + i += 6 + i += 3 # emulate JS for loop statement3 + continue + + if (b1 & 0xF8) == 0xF0 and (i + 9 < l): + # 111110xx 10xxxxxx 10xxxxxx 10xxxxxx + b2 = int(seq[i + 4 : i + 6], 16) + b3 = int(seq[i + 7 : i + 9], 16) + b4 = int(seq[i + 10 : i + 12], 16) + + if (b2 & 0xC0) == 0x80 and (b3 & 0xC0) == 0x80 and (b4 & 0xC0) == 0x80: + all_bytes = bytes((b1, b2, b3, b4)) + try: + result += all_bytes.decode() + except UnicodeDecodeError: + result += "\ufffd" * 4 + + i += 9 + i += 3 # emulate JS for loop statement3 + continue + + result += "\ufffd" + i += 3 # emulate JS for loop statement3 + + return result diff --git a/miniconda3/pkgs/mdurl-0.1.2-py313h06a4308_0/lib/python3.13/site-packages/mdurl/_encode.py b/miniconda3/pkgs/mdurl-0.1.2-py313h06a4308_0/lib/python3.13/site-packages/mdurl/_encode.py new file mode 100644 index 0000000000000000000000000000000000000000..bc2e5b917afe9e9ecaa6f11af7a9ac82704d3914 --- /dev/null +++ b/miniconda3/pkgs/mdurl-0.1.2-py313h06a4308_0/lib/python3.13/site-packages/mdurl/_encode.py @@ -0,0 +1,85 @@ +from __future__ import annotations + +from collections.abc import Sequence +from string import ascii_letters, digits, hexdigits +from urllib.parse import quote as encode_uri_component + +ASCII_LETTERS_AND_DIGITS = ascii_letters + digits + +ENCODE_DEFAULT_CHARS = ";/?:@&=+$,-_.!~*'()#" +ENCODE_COMPONENT_CHARS = "-_.!~*'()" + +encode_cache: dict[str, list[str]] = {} + + +# Create a lookup array where anything but characters in `chars` string +# and alphanumeric chars is percent-encoded. +def get_encode_cache(exclude: str) -> Sequence[str]: + if exclude in encode_cache: + return encode_cache[exclude] + + cache: list[str] = [] + encode_cache[exclude] = cache + + for i in range(128): + ch = chr(i) + + if ch in ASCII_LETTERS_AND_DIGITS: + # always allow unencoded alphanumeric characters + cache.append(ch) + else: + cache.append("%" + ("0" + hex(i)[2:].upper())[-2:]) + + for i in range(len(exclude)): + cache[ord(exclude[i])] = exclude[i] + + return cache + + +# Encode unsafe characters with percent-encoding, skipping already +# encoded sequences. +# +# - string - string to encode +# - exclude - list of characters to ignore (in addition to a-zA-Z0-9) +# - keepEscaped - don't encode '%' in a correct escape sequence (default: true) +def encode( + string: str, exclude: str = ENCODE_DEFAULT_CHARS, *, keep_escaped: bool = True +) -> str: + result = "" + + cache = get_encode_cache(exclude) + + l = len(string) # noqa: E741 + i = 0 + while i < l: + code = ord(string[i]) + + # % + if keep_escaped and code == 0x25 and i + 2 < l: + if all(c in hexdigits for c in string[i + 1 : i + 3]): + result += string[i : i + 3] + i += 2 + i += 1 # JS for loop statement3 + continue + + if code < 128: + result += cache[code] + i += 1 # JS for loop statement3 + continue + + if code >= 0xD800 and code <= 0xDFFF: + if code >= 0xD800 and code <= 0xDBFF and i + 1 < l: + next_code = ord(string[i + 1]) + if next_code >= 0xDC00 and next_code <= 0xDFFF: + result += encode_uri_component(string[i] + string[i + 1]) + i += 1 + i += 1 # JS for loop statement3 + continue + result += "%EF%BF%BD" + i += 1 # JS for loop statement3 + continue + + result += encode_uri_component(string[i]) + i += 1 # JS for loop statement3 + + return result diff --git a/miniconda3/pkgs/mdurl-0.1.2-py313h06a4308_0/lib/python3.13/site-packages/mdurl/_format.py b/miniconda3/pkgs/mdurl-0.1.2-py313h06a4308_0/lib/python3.13/site-packages/mdurl/_format.py new file mode 100644 index 0000000000000000000000000000000000000000..12524ca626065183ec9974f3d7d08dadd4a7d3e8 --- /dev/null +++ b/miniconda3/pkgs/mdurl-0.1.2-py313h06a4308_0/lib/python3.13/site-packages/mdurl/_format.py @@ -0,0 +1,27 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from mdurl._url import URL + + +def format(url: URL) -> str: # noqa: A001 + result = "" + + result += url.protocol or "" + result += "//" if url.slashes else "" + result += url.auth + "@" if url.auth else "" + + if url.hostname and ":" in url.hostname: + # ipv6 address + result += "[" + url.hostname + "]" + else: + result += url.hostname or "" + + result += ":" + url.port if url.port else "" + result += url.pathname or "" + result += url.search or "" + result += url.hash or "" + + return result diff --git a/miniconda3/pkgs/mdurl-0.1.2-py313h06a4308_0/lib/python3.13/site-packages/mdurl/_parse.py b/miniconda3/pkgs/mdurl-0.1.2-py313h06a4308_0/lib/python3.13/site-packages/mdurl/_parse.py new file mode 100644 index 0000000000000000000000000000000000000000..ffeeac768dca3bff60c55c9b1f0bc0fbb4cec7b1 --- /dev/null +++ b/miniconda3/pkgs/mdurl-0.1.2-py313h06a4308_0/lib/python3.13/site-packages/mdurl/_parse.py @@ -0,0 +1,304 @@ +# Copyright Joyent, Inc. and other Node contributors. +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the +# "Software"), to deal in the Software without restriction, including +# without limitation the rights to use, copy, modify, merge, publish, +# distribute, sublicense, and/or sell copies of the Software, and to permit +# persons to whom the Software is furnished to do so, subject to the +# following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +# NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +# DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +# OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +# USE OR OTHER DEALINGS IN THE SOFTWARE. + + +# Changes from joyent/node: +# +# 1. No leading slash in paths, +# e.g. in `url.parse('http://foo?bar')` pathname is ``, not `/` +# +# 2. Backslashes are not replaced with slashes, +# so `http:\\example.org\` is treated like a relative path +# +# 3. Trailing colon is treated like a part of the path, +# i.e. in `http://example.org:foo` pathname is `:foo` +# +# 4. Nothing is URL-encoded in the resulting object, +# (in joyent/node some chars in auth and paths are encoded) +# +# 5. `url.parse()` does not have `parseQueryString` argument +# +# 6. Removed extraneous result properties: `host`, `path`, `query`, etc., +# which can be constructed using other parts of the url. + +from __future__ import annotations + +from collections import defaultdict +import re + +from mdurl._url import URL + +# Reference: RFC 3986, RFC 1808, RFC 2396 + +# define these here so at least they only have to be +# compiled once on the first module load. +PROTOCOL_PATTERN = re.compile(r"^([a-z0-9.+-]+:)", flags=re.IGNORECASE) +PORT_PATTERN = re.compile(r":[0-9]*$") + +# Special case for a simple path URL +SIMPLE_PATH_PATTERN = re.compile(r"^(//?(?!/)[^?\s]*)(\?[^\s]*)?$") + +# RFC 2396: characters reserved for delimiting URLs. +# We actually just auto-escape these. +DELIMS = ("<", ">", '"', "`", " ", "\r", "\n", "\t") + +# RFC 2396: characters not allowed for various reasons. +UNWISE = ("{", "}", "|", "\\", "^", "`") + DELIMS + +# Allowed by RFCs, but cause of XSS attacks. Always escape these. +AUTO_ESCAPE = ("'",) + UNWISE +# Characters that are never ever allowed in a hostname. +# Note that any invalid chars are also handled, but these +# are the ones that are *expected* to be seen, so we fast-path +# them. +NON_HOST_CHARS = ("%", "/", "?", ";", "#") + AUTO_ESCAPE +HOST_ENDING_CHARS = ("/", "?", "#") +HOSTNAME_MAX_LEN = 255 +HOSTNAME_PART_PATTERN = re.compile(r"^[+a-z0-9A-Z_-]{0,63}$") +HOSTNAME_PART_START = re.compile(r"^([+a-z0-9A-Z_-]{0,63})(.*)$") +# protocols that can allow "unsafe" and "unwise" chars. + +# protocols that never have a hostname. +HOSTLESS_PROTOCOL = defaultdict( + bool, + { + "javascript": True, + "javascript:": True, + }, +) +# protocols that always contain a // bit. +SLASHED_PROTOCOL = defaultdict( + bool, + { + "http": True, + "https": True, + "ftp": True, + "gopher": True, + "file": True, + "http:": True, + "https:": True, + "ftp:": True, + "gopher:": True, + "file:": True, + }, +) + + +class MutableURL: + def __init__(self) -> None: + self.protocol: str | None = None + self.slashes: bool = False + self.auth: str | None = None + self.port: str | None = None + self.hostname: str | None = None + self.hash: str | None = None + self.search: str | None = None + self.pathname: str | None = None + + def parse(self, url: str, slashes_denote_host: bool) -> "MutableURL": + lower_proto = "" + slashes = False + rest = url + + # trim before proceeding. + # This is to support parse stuff like " http://foo.com \n" + rest = rest.strip() + + if not slashes_denote_host and len(url.split("#")) == 1: + # Try fast path regexp + simple_path = SIMPLE_PATH_PATTERN.match(rest) + if simple_path: + self.pathname = simple_path.group(1) + if simple_path.group(2): + self.search = simple_path.group(2) + return self + + proto = "" + proto_match = PROTOCOL_PATTERN.match(rest) + if proto_match: + proto = proto_match.group() + lower_proto = proto.lower() + self.protocol = proto + rest = rest[len(proto) :] + + # figure out if it's got a host + # user@server is *always* interpreted as a hostname, and url + # resolution will treat //foo/bar as host=foo,path=bar because that's + # how the browser resolves relative URLs. + if slashes_denote_host or proto or re.search(r"^//[^@/]+@[^@/]+", rest): + slashes = rest.startswith("//") + if slashes and not (proto and HOSTLESS_PROTOCOL[proto]): + rest = rest[2:] + self.slashes = True + + if not HOSTLESS_PROTOCOL[proto] and ( + slashes or (proto and not SLASHED_PROTOCOL[proto]) + ): + + # there's a hostname. + # the first instance of /, ?, ;, or # ends the host. + # + # If there is an @ in the hostname, then non-host chars *are* allowed + # to the left of the last @ sign, unless some host-ending character + # comes *before* the @-sign. + # URLs are obnoxious. + # + # ex: + # http://a@b@c/ => user:a@b host:c + # http://a@b?@c => user:a host:c path:/?@c + + # v0.12 TODO(isaacs): This is not quite how Chrome does things. + # Review our test case against browsers more comprehensively. + + # find the first instance of any hostEndingChars + host_end = -1 + for i in range(len(HOST_ENDING_CHARS)): + hec = rest.find(HOST_ENDING_CHARS[i]) + if hec != -1 and (host_end == -1 or hec < host_end): + host_end = hec + + # at this point, either we have an explicit point where the + # auth portion cannot go past, or the last @ char is the decider. + if host_end == -1: + # atSign can be anywhere. + at_sign = rest.rfind("@") + else: + # atSign must be in auth portion. + # http://a@b/c@d => host:b auth:a path:/c@d + at_sign = rest.rfind("@", 0, host_end + 1) + + # Now we have a portion which is definitely the auth. + # Pull that off. + if at_sign != -1: + auth = rest[:at_sign] + rest = rest[at_sign + 1 :] + self.auth = auth + + # the host is the remaining to the left of the first non-host char + host_end = -1 + for i in range(len(NON_HOST_CHARS)): + hec = rest.find(NON_HOST_CHARS[i]) + if hec != -1 and (host_end == -1 or hec < host_end): + host_end = hec + # if we still have not hit it, then the entire thing is a host. + if host_end == -1: + host_end = len(rest) + + if host_end > 0 and rest[host_end - 1] == ":": + host_end -= 1 + host = rest[:host_end] + rest = rest[host_end:] + + # pull out port. + self.parse_host(host) + + # we've indicated that there is a hostname, + # so even if it's empty, it has to be present. + self.hostname = self.hostname or "" + + # if hostname begins with [ and ends with ] + # assume that it's an IPv6 address. + ipv6_hostname = self.hostname.startswith("[") and self.hostname.endswith( + "]" + ) + + # validate a little. + if not ipv6_hostname: + hostparts = self.hostname.split(".") + l = len(hostparts) # noqa: E741 + i = 0 + while i < l: + part = hostparts[i] + if not part: + i += 1 # emulate statement3 in JS for loop + continue + if not HOSTNAME_PART_PATTERN.search(part): + newpart = "" + k = len(part) + j = 0 + while j < k: + if ord(part[j]) > 127: + # we replace non-ASCII char with a temporary placeholder + # we need this to make sure size of hostname is not + # broken by replacing non-ASCII by nothing + newpart += "x" + else: + newpart += part[j] + j += 1 # emulate statement3 in JS for loop + + # we test again with ASCII char only + if not HOSTNAME_PART_PATTERN.search(newpart): + valid_parts = hostparts[:i] + not_host = hostparts[i + 1 :] + bit = HOSTNAME_PART_START.search(part) + if bit: + valid_parts.append(bit.group(1)) + not_host.insert(0, bit.group(2)) + if not_host: + rest = ".".join(not_host) + rest + self.hostname = ".".join(valid_parts) + break + i += 1 # emulate statement3 in JS for loop + + if len(self.hostname) > HOSTNAME_MAX_LEN: + self.hostname = "" + + # strip [ and ] from the hostname + # the host field still retains them, though + if ipv6_hostname: + self.hostname = self.hostname[1:-1] + + # chop off from the tail first. + hash = rest.find("#") # noqa: A001 + if hash != -1: + # got a fragment string. + self.hash = rest[hash:] + rest = rest[:hash] + qm = rest.find("?") + if qm != -1: + self.search = rest[qm:] + rest = rest[:qm] + if rest: + self.pathname = rest + if SLASHED_PROTOCOL[lower_proto] and self.hostname and not self.pathname: + self.pathname = "" + + return self + + def parse_host(self, host: str) -> None: + port_match = PORT_PATTERN.search(host) + if port_match: + port = port_match.group() + if port != ":": + self.port = port[1:] + host = host[: -len(port)] + if host: + self.hostname = host + + +def url_parse(url: URL | str, *, slashes_denote_host: bool = False) -> URL: + if isinstance(url, URL): + return url + u = MutableURL() + u.parse(url, slashes_denote_host) + return URL( + u.protocol, u.slashes, u.auth, u.port, u.hostname, u.hash, u.search, u.pathname + ) diff --git a/miniconda3/pkgs/mdurl-0.1.2-py313h06a4308_0/lib/python3.13/site-packages/mdurl/_url.py b/miniconda3/pkgs/mdurl-0.1.2-py313h06a4308_0/lib/python3.13/site-packages/mdurl/_url.py new file mode 100644 index 0000000000000000000000000000000000000000..f866e7a179c8854e37c9bba6294f48681e5d99d7 --- /dev/null +++ b/miniconda3/pkgs/mdurl-0.1.2-py313h06a4308_0/lib/python3.13/site-packages/mdurl/_url.py @@ -0,0 +1,14 @@ +from __future__ import annotations + +from typing import NamedTuple + + +class URL(NamedTuple): + protocol: str | None + slashes: bool + auth: str | None + port: str | None + hostname: str | None + hash: str | None # noqa: A003 + search: str | None + pathname: str | None diff --git a/miniconda3/pkgs/mdurl-0.1.2-py313h06a4308_0/lib/python3.13/site-packages/mdurl/py.typed b/miniconda3/pkgs/mdurl-0.1.2-py313h06a4308_0/lib/python3.13/site-packages/mdurl/py.typed new file mode 100644 index 0000000000000000000000000000000000000000..7632ecf77545c5e5501cb3fc5719df0761104ca2 --- /dev/null +++ b/miniconda3/pkgs/mdurl-0.1.2-py313h06a4308_0/lib/python3.13/site-packages/mdurl/py.typed @@ -0,0 +1 @@ +# Marker file for PEP 561 diff --git a/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/bin/menuinst b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/bin/menuinst new file mode 100644 index 0000000000000000000000000000000000000000..c65c72787830d234def1ee1f2275d072fc08ed87 --- /dev/null +++ b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/bin/menuinst @@ -0,0 +1,11 @@ +#!/home/task_176538230483207/conda-bld/menuinst_1765382366331/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehol/bin/python + +# -*- coding: utf-8 -*- +import re +import sys + +from menuinst.cli import main + +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/info/about.json b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/info/about.json new file mode 100644 index 0000000000000000000000000000000000000000..59f80f994fdb0f858d876b90c4fc3c2f568f00dc --- /dev/null +++ b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/info/about.json @@ -0,0 +1,179 @@ +{ + "channels": [ + "https://repo.anaconda.com/pkgs/main", + "https://repo.anaconda.com/pkgs/r", + "https://repo.anaconda.com/pkgs/r" + ], + "conda_build_version": "25.1.2", + "conda_version": "25.1.1", + "description": "This package provides cross platform menu item installation for conda packages.\n\nIf a conda package ships a menuinst JSON document under $PREFIX/Menu, conda will invoke\nmenuinst to process the JSON file and install the menu items in your operating system.\nThe menu items are removed when the package is uninstalled.\n", + "dev_url": "https://github.com/conda/menuinst", + "doc_url": "https://conda.github.io/menuinst", + "env_vars": { + "CIO_TEST": "" + }, + "extra": { + "copy_test_source_files": true, + "final": true, + "recipe-maintainers": [ + "goanpeca", + "jakirkham", + "carlodri", + "isuruf", + "jaimergp" + ] + }, + "home": "https://github.com/conda/menuinst", + "identifiers": [], + "keywords": [], + "license": "BSD-3-Clause AND MIT", + "license_family": "BSD", + "license_file": [ + "LICENSE.txt", + "menuinst/_vendor/apipkg/LICENSE" + ], + "root_pkgs": [ + "_libgcc_mutex 0.1 main", + "ca-certificates 2025.11.4 h06a4308_0", + "ld_impl_linux-64 2.40 h12ee557_0", + "libstdcxx-ng 11.2.0 h1234567_1", + "nlohmann_json 3.11.2 h6a678d5_0", + "pybind11-abi 5 hd3eb1b0_0", + "tzdata 2025a h04d1e81_0", + "libgomp 11.2.0 h1234567_1", + "_openmp_mutex 5.1 1_gnu", + "libgcc-ng 11.2.0 h1234567_1", + "bzip2 1.0.8 h5eee18b_6", + "c-ares 1.19.1 h5eee18b_0", + "cpp-expected 1.1.0 hdb19cb5_0", + "expat 2.7.3 h3385a95_0", + "fmt 9.1.0 hdb19cb5_1", + "icu 73.1 h6a678d5_0", + "libev 4.33 h7f8727e_1", + "libffi 3.4.4 h6a678d5_1", + "libuuid 1.41.5 h5eee18b_0", + "lz4-c 1.9.4 h6a678d5_1", + "ncurses 6.4 h6a678d5_0", + "reproc 14.2.4 h6a678d5_2", + "simdjson 3.10.1 hdb19cb5_0", + "xz 5.4.6 h5eee18b_1", + "yaml-cpp 0.8.0 h6a678d5_1", + "zlib 1.2.13 h5eee18b_1", + "libedit 3.1.20230828 h5eee18b_0", + "libnghttp2 1.57.0 h2d74bed_0", + "libssh2 1.11.1 h251f7ec_0", + "libxml2 2.13.5 hfdd30dd_0", + "pcre2 10.42 hebb0a14_1", + "readline 8.2 h5eee18b_0", + "reproc-cpp 14.2.4 h6a678d5_2", + "spdlog 1.11.0 hdb19cb5_0", + "patch 2.8 hb25bd0a_0", + "zstd 1.5.6 hc292b87_0", + "krb5 1.20.1 h143b758_1", + "libarchive 3.7.7 hfab0078_0", + "libsolv 0.7.30 he621ea3_1", + "sqlite 3.45.3 h5eee18b_0", + "python 3.12.9 h5148396_0", + "libmamba 2.0.5 haf1ee3a_1", + "menuinst 2.2.0 py312h06a4308_1", + "anaconda-anon-usage 0.5.0 py312hfc0e8ea_100", + "annotated-types 0.6.0 py312h06a4308_0", + "archspec 0.2.3 pyhd3eb1b0_0", + "boltons 24.1.0 py312h06a4308_0", + "brotli-python 1.0.9 py312h6a678d5_9", + "charset-normalizer 3.3.2 pyhd3eb1b0_0", + "distro 1.9.0 py312h06a4308_0", + "frozendict 2.4.2 py312h06a4308_0", + "idna 3.7 py312h06a4308_0", + "jsonpointer 2.1 pyhd3eb1b0_0", + "libmambapy 2.0.5 py312hdb19cb5_1", + "mdurl 0.1.0 py312h06a4308_0", + "packaging 24.2 py312h06a4308_0", + "platformdirs 3.10.0 py312h06a4308_0", + "pluggy 1.5.0 py312h06a4308_0", + "pycosat 0.6.6 py312h5eee18b_2", + "pycparser 2.21 pyhd3eb1b0_0", + "pygments 2.15.1 py312h06a4308_1", + "pysocks 1.7.1 py312h06a4308_0", + "ruamel.yaml.clib 0.2.8 py312h5eee18b_0", + "setuptools 75.8.0 py312h06a4308_0", + "tqdm 4.67.1 py312he106c6f_0", + "truststore 0.10.0 py312h06a4308_0", + "typing_extensions 4.12.2 py312h06a4308_0", + "wheel 0.45.1 py312h06a4308_0", + "cffi 1.17.1 py312h1fdaa30_1", + "jsonpatch 1.33 py312h06a4308_1", + "markdown-it-py 2.2.0 py312h06a4308_1", + "pip 25.0 py312h06a4308_0", + "ruamel.yaml 0.18.6 py312h5eee18b_0", + "typing-extensions 4.12.2 py312h06a4308_0", + "urllib3 2.3.0 py312h06a4308_0", + "cryptography 43.0.3 py312h7825ff9_1", + "pydantic-core 2.27.1 py312h4aa5aa6_0", + "requests 2.32.3 py312h06a4308_1", + "rich 13.9.4 py312h06a4308_0", + "zstandard 0.23.0 py312h2c38b39_1", + "conda-content-trust 0.2.0 py312h06a4308_1", + "conda-package-streaming 0.11.0 py312h06a4308_0", + "pydantic 2.10.3 py312h06a4308_0", + "conda-package-handling 2.4.0 py312h06a4308_0", + "conda 25.1.1 py312h06a4308_0", + "conda-anaconda-tos 0.1.2 py312h06a4308_0", + "conda-libmamba-solver 25.1.1 pyhd3eb1b0_0", + "libiconv 1.16 h5eee18b_3", + "liblief 0.12.3 h6a678d5_0", + "libsodium 1.0.20 heac8642_0", + "libunistring 1.3 hb25bd0a_0", + "openssl 3.0.18 hd6dcaed_0", + "patchelf 0.17.2 h6a678d5_0", + "perl 5.40.2 0_h5eee18b_perl5", + "pthread-stubs 0.3 h0ce48e5_1", + "xorg-libxau 1.0.12 h9b100fa_0", + "xorg-libxdmcp 1.1.5 h9b100fa_0", + "xorg-xorgproto 2024.1 h5eee18b_1", + "yaml 0.2.5 h7b6447c_0", + "libxcb 1.17.0 h9b100fa_0", + "gettext 0.21.0 hedfda30_2", + "xorg-libx11 1.8.12 h9b100fa_1", + "libidn2 2.3.8 hf80d704_0", + "tk 8.6.15 h54e0aa7_0", + "libcurl 8.16.0 heebcbe5_0", + "git 2.51.0 pl5382h000ed5b_0", + "argcomplete 3.6.2 py312h06a4308_0", + "attrs 25.4.0 py312h06a4308_2", + "certifi 2025.10.5 py312h06a4308_0", + "chardet 5.2.0 py312h06a4308_0", + "click 8.2.1 py312h06a4308_0", + "filelock 3.20.0 py312h06a4308_0", + "jmespath 1.0.1 py312h06a4308_0", + "markupsafe 3.0.2 py312h5eee18b_0", + "more-itertools 10.8.0 py312h06a4308_0", + "pkginfo 1.12.0 py312h06a4308_0", + "psutil 7.0.0 py312hee96239_1", + "py-lief 0.12.3 py312h6a678d5_0", + "python-libarchive-c 5.1 pyhd3eb1b0_0", + "pytz 2025.2 py312h06a4308_0", + "pyyaml 6.0.2 py312h5eee18b_0", + "rpds-py 0.28.0 py312h498d7c9_0", + "six 1.17.0 py312h06a4308_0", + "soupsieve 2.5 py312h06a4308_0", + "tomlkit 0.13.2 py312h06a4308_0", + "xmltodict 0.14.2 py312h06a4308_0", + "jinja2 3.1.6 py312h06a4308_0", + "python-dateutil 2.9.0post0 py312h06a4308_2", + "referencing 0.37.0 py312h06a4308_0", + "yq 3.4.3 py312h06a4308_0", + "beautifulsoup4 4.13.5 py312h06a4308_0", + "botocore 1.40.54 py312h06a4308_0", + "jsonschema-specifications 2023.7.1 py312h06a4308_1", + "pynacl 1.5.0 py312h2630517_2", + "jsonschema 4.25.0 py312h06a4308_1", + "s3transfer 0.14.0 py312h06a4308_0", + "boto3 1.40.54 py312h06a4308_0", + "conda-anaconda-telemetry 0.3.0 pyhd3eb1b0_1", + "conda-index 0.5.0 py312h06a4308_0", + "conda-build 25.1.2 py312h06a4308_0" + ], + "summary": "cross platform install of menu items", + "tags": [] +} \ No newline at end of file diff --git a/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/info/files b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/info/files new file mode 100644 index 0000000000000000000000000000000000000000..83c08fcbce4e5d520a60258b4936a43f1f48f9f7 --- /dev/null +++ b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/info/files @@ -0,0 +1,91 @@ +bin/menuinst +lib/python3.13/site-packages/menuinst-2.4.2.dist-info/INSTALLER +lib/python3.13/site-packages/menuinst-2.4.2.dist-info/METADATA +lib/python3.13/site-packages/menuinst-2.4.2.dist-info/RECORD +lib/python3.13/site-packages/menuinst-2.4.2.dist-info/REQUESTED +lib/python3.13/site-packages/menuinst-2.4.2.dist-info/WHEEL +lib/python3.13/site-packages/menuinst-2.4.2.dist-info/direct_url.json +lib/python3.13/site-packages/menuinst-2.4.2.dist-info/entry_points.txt +lib/python3.13/site-packages/menuinst-2.4.2.dist-info/licenses/AUTHORS.md +lib/python3.13/site-packages/menuinst-2.4.2.dist-info/licenses/LICENSE.txt +lib/python3.13/site-packages/menuinst-2.4.2.dist-info/top_level.txt +lib/python3.13/site-packages/menuinst/__init__.py +lib/python3.13/site-packages/menuinst/__main__.py +lib/python3.13/site-packages/menuinst/__pycache__/__init__.cpython-313.pyc +lib/python3.13/site-packages/menuinst/__pycache__/__main__.cpython-313.pyc +lib/python3.13/site-packages/menuinst/__pycache__/_schema.cpython-313.pyc +lib/python3.13/site-packages/menuinst/__pycache__/_version.cpython-313.pyc +lib/python3.13/site-packages/menuinst/__pycache__/api.cpython-313.pyc +lib/python3.13/site-packages/menuinst/__pycache__/conda_plugin.cpython-313.pyc +lib/python3.13/site-packages/menuinst/__pycache__/utils.cpython-313.pyc +lib/python3.13/site-packages/menuinst/_legacy/__init__.py +lib/python3.13/site-packages/menuinst/_legacy/__pycache__/__init__.cpython-313.pyc +lib/python3.13/site-packages/menuinst/_legacy/__pycache__/cwp.cpython-313.pyc +lib/python3.13/site-packages/menuinst/_legacy/__pycache__/main.cpython-313.pyc +lib/python3.13/site-packages/menuinst/_legacy/__pycache__/utils.cpython-313.pyc +lib/python3.13/site-packages/menuinst/_legacy/__pycache__/win32.cpython-313.pyc +lib/python3.13/site-packages/menuinst/_legacy/cwp.py +lib/python3.13/site-packages/menuinst/_legacy/main.py +lib/python3.13/site-packages/menuinst/_legacy/utils.py +lib/python3.13/site-packages/menuinst/_legacy/win32.py +lib/python3.13/site-packages/menuinst/_schema.py +lib/python3.13/site-packages/menuinst/_vendor/apipkg/LICENSE +lib/python3.13/site-packages/menuinst/_vendor/apipkg/__init__.py +lib/python3.13/site-packages/menuinst/_vendor/apipkg/__pycache__/__init__.cpython-313.pyc +lib/python3.13/site-packages/menuinst/_vendor/apipkg/__pycache__/_alias_module.cpython-313.pyc +lib/python3.13/site-packages/menuinst/_vendor/apipkg/__pycache__/_importing.cpython-313.pyc +lib/python3.13/site-packages/menuinst/_vendor/apipkg/__pycache__/_module.cpython-313.pyc +lib/python3.13/site-packages/menuinst/_vendor/apipkg/__pycache__/_syncronized.cpython-313.pyc +lib/python3.13/site-packages/menuinst/_vendor/apipkg/__pycache__/_version.cpython-313.pyc +lib/python3.13/site-packages/menuinst/_vendor/apipkg/_alias_module.py +lib/python3.13/site-packages/menuinst/_vendor/apipkg/_importing.py +lib/python3.13/site-packages/menuinst/_vendor/apipkg/_module.py +lib/python3.13/site-packages/menuinst/_vendor/apipkg/_syncronized.py +lib/python3.13/site-packages/menuinst/_vendor/apipkg/_version.py +lib/python3.13/site-packages/menuinst/_vendor/apipkg/py.typed +lib/python3.13/site-packages/menuinst/_version.py +lib/python3.13/site-packages/menuinst/api.py +lib/python3.13/site-packages/menuinst/cli/__init__.py +lib/python3.13/site-packages/menuinst/cli/__pycache__/__init__.cpython-313.pyc +lib/python3.13/site-packages/menuinst/cli/__pycache__/cli.cpython-313.pyc +lib/python3.13/site-packages/menuinst/cli/cli.py +lib/python3.13/site-packages/menuinst/conda_plugin.py +lib/python3.13/site-packages/menuinst/data/appkit_launcher_arm64 +lib/python3.13/site-packages/menuinst/data/appkit_launcher_x86_64 +lib/python3.13/site-packages/menuinst/data/menuinst-1-0-0.default.json +lib/python3.13/site-packages/menuinst/data/menuinst-1-0-0.schema.json +lib/python3.13/site-packages/menuinst/data/menuinst-1-0-1.default.json +lib/python3.13/site-packages/menuinst/data/menuinst-1-0-1.schema.json +lib/python3.13/site-packages/menuinst/data/menuinst-1-0-2.default.json +lib/python3.13/site-packages/menuinst/data/menuinst-1-0-2.schema.json +lib/python3.13/site-packages/menuinst/data/menuinst-1-1-0.default.json +lib/python3.13/site-packages/menuinst/data/menuinst-1-1-0.schema.json +lib/python3.13/site-packages/menuinst/data/menuinst-1-1-1.default.json +lib/python3.13/site-packages/menuinst/data/menuinst-1-1-1.schema.json +lib/python3.13/site-packages/menuinst/data/menuinst-1-1-2.default.json +lib/python3.13/site-packages/menuinst/data/menuinst-1-1-2.schema.json +lib/python3.13/site-packages/menuinst/data/menuinst-1-1-3.default.json +lib/python3.13/site-packages/menuinst/data/menuinst-1-1-3.schema.json +lib/python3.13/site-packages/menuinst/data/menuinst.default.json +lib/python3.13/site-packages/menuinst/data/menuinst.schema.json +lib/python3.13/site-packages/menuinst/data/osx_launcher_arm64 +lib/python3.13/site-packages/menuinst/data/osx_launcher_x86_64 +lib/python3.13/site-packages/menuinst/platforms/__init__.py +lib/python3.13/site-packages/menuinst/platforms/__pycache__/__init__.cpython-313.pyc +lib/python3.13/site-packages/menuinst/platforms/__pycache__/base.cpython-313.pyc +lib/python3.13/site-packages/menuinst/platforms/__pycache__/linux.cpython-313.pyc +lib/python3.13/site-packages/menuinst/platforms/__pycache__/osx.cpython-313.pyc +lib/python3.13/site-packages/menuinst/platforms/__pycache__/win.cpython-313.pyc +lib/python3.13/site-packages/menuinst/platforms/base.py +lib/python3.13/site-packages/menuinst/platforms/linux.py +lib/python3.13/site-packages/menuinst/platforms/osx.py +lib/python3.13/site-packages/menuinst/platforms/win.py +lib/python3.13/site-packages/menuinst/platforms/win_utils/__init__.py +lib/python3.13/site-packages/menuinst/platforms/win_utils/__pycache__/__init__.cpython-313.pyc +lib/python3.13/site-packages/menuinst/platforms/win_utils/__pycache__/knownfolders.cpython-313.pyc +lib/python3.13/site-packages/menuinst/platforms/win_utils/__pycache__/registry.cpython-313.pyc +lib/python3.13/site-packages/menuinst/platforms/win_utils/__pycache__/win_elevate.cpython-313.pyc +lib/python3.13/site-packages/menuinst/platforms/win_utils/knownfolders.py +lib/python3.13/site-packages/menuinst/platforms/win_utils/registry.py +lib/python3.13/site-packages/menuinst/platforms/win_utils/win_elevate.py +lib/python3.13/site-packages/menuinst/utils.py diff --git a/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/info/git b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/info/git new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/info/has_prefix b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/info/has_prefix new file mode 100644 index 0000000000000000000000000000000000000000..8f4c1891a7672f511f4d0f3fae2426c0a8f46c0b --- /dev/null +++ b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/info/has_prefix @@ -0,0 +1 @@ +/home/task_176538230483207/conda-bld/menuinst_1765382366331/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehol text bin/menuinst diff --git a/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/info/hash_input.json b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/info/hash_input.json new file mode 100644 index 0000000000000000000000000000000000000000..e1489271625fa4f5548417553f3725447d4df321 --- /dev/null +++ b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/info/hash_input.json @@ -0,0 +1,4 @@ +{ + "channel_targets": "defaults", + "target_platform": "linux-64" +} \ No newline at end of file diff --git a/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/info/index.json b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/info/index.json new file mode 100644 index 0000000000000000000000000000000000000000..f2dffa61d60861ab13fe223499141c16397594b1 --- /dev/null +++ b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/info/index.json @@ -0,0 +1,16 @@ +{ + "arch": "x86_64", + "build": "py313h06a4308_1", + "build_number": 1, + "depends": [ + "python >=3.13,<3.14.0a0", + "python_abi 3.13.* *_cp313" + ], + "license": "BSD-3-Clause AND MIT", + "license_family": "BSD", + "name": "menuinst", + "platform": "linux", + "subdir": "linux-64", + "timestamp": 1765382387320, + "version": "2.4.2" +} \ No newline at end of file diff --git a/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/info/licenses/LICENSE.txt b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/info/licenses/LICENSE.txt new file mode 100644 index 0000000000000000000000000000000000000000..eb19a522addf870a8804c3221d20fa2bf8127d89 --- /dev/null +++ b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/info/licenses/LICENSE.txt @@ -0,0 +1,24 @@ +(c) 2016 Continuum Analytics, Inc. / http://continuum.io +All Rights Reserved + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of Continuum Analytics, Inc. nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL CONTINUUM ANALYTICS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/info/licenses/menuinst/_vendor/apipkg/LICENSE b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/info/licenses/menuinst/_vendor/apipkg/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..ff33b8f7ca0b1c05bb0bdc546aa760c8e78757be --- /dev/null +++ b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/info/licenses/menuinst/_vendor/apipkg/LICENSE @@ -0,0 +1,18 @@ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. diff --git a/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/info/paths.json b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/info/paths.json new file mode 100644 index 0000000000000000000000000000000000000000..d06709f712e064932b6638f2179144d468b86623 --- /dev/null +++ b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/info/paths.json @@ -0,0 +1,553 @@ +{ + "paths": [ + { + "_path": "bin/menuinst", + "file_mode": "text", + "path_type": "hardlink", + "prefix_placeholder": "/home/task_176538230483207/conda-bld/menuinst_1765382366331/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehol", + "sha256": "02eb42662e1dbde724daa165101ec9d7b1a2cf0183032de0bb3f95ead8e7c06f", + "size_in_bytes": 465 + }, + { + "_path": "lib/python3.13/site-packages/menuinst-2.4.2.dist-info/INSTALLER", + "path_type": "hardlink", + "sha256": "d0edee15f91b406f3f99726e44eb990be6e34fd0345b52b910c568e0eef6a2a8", + "size_in_bytes": 5 + }, + { + "_path": "lib/python3.13/site-packages/menuinst-2.4.2.dist-info/METADATA", + "path_type": "hardlink", + "sha256": "e0d4672e72c77987c8e25844e4994aca64e953626e8b402d3d000ee1b1e2bafb", + "size_in_bytes": 4863 + }, + { + "_path": "lib/python3.13/site-packages/menuinst-2.4.2.dist-info/RECORD", + "path_type": "hardlink", + "sha256": "d922482a44fad1f088bcaafa4942db7af819dd0c8e0daf8fbb55437f3b1b04f8", + "size_in_bytes": 7242 + }, + { + "_path": "lib/python3.13/site-packages/menuinst-2.4.2.dist-info/REQUESTED", + "path_type": "hardlink", + "sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "size_in_bytes": 0 + }, + { + "_path": "lib/python3.13/site-packages/menuinst-2.4.2.dist-info/WHEEL", + "path_type": "hardlink", + "sha256": "ff309ddcdd65ebd02bc724dbf2bcc4a0ff53a5b61792a44548d383e4ebb19d3b", + "size_in_bytes": 91 + }, + { + "_path": "lib/python3.13/site-packages/menuinst-2.4.2.dist-info/direct_url.json", + "path_type": "hardlink", + "sha256": "77381ebca00768e0ae652a18cba75542006b25f997fb062166d6885c8ff90f08", + "size_in_bytes": 98 + }, + { + "_path": "lib/python3.13/site-packages/menuinst-2.4.2.dist-info/entry_points.txt", + "path_type": "hardlink", + "sha256": "ba5e7f7524674c76d3bd601251b12bcc5f076729c7df6856a23ead24c3c5c5f9", + "size_in_bytes": 89 + }, + { + "_path": "lib/python3.13/site-packages/menuinst-2.4.2.dist-info/licenses/AUTHORS.md", + "path_type": "hardlink", + "sha256": "7e0e62449711691aaddba65cfd50d2ffdf618404a97803d6b4818c346aac37e6", + "size_in_bytes": 709 + }, + { + "_path": "lib/python3.13/site-packages/menuinst-2.4.2.dist-info/licenses/LICENSE.txt", + "path_type": "hardlink", + "sha256": "911b693bb34494db6bd2c24f591674633fe99b8bc1442bc3fcf5121a0a82fae5", + "size_in_bytes": 1530 + }, + { + "_path": "lib/python3.13/site-packages/menuinst-2.4.2.dist-info/top_level.txt", + "path_type": "hardlink", + "sha256": "f6f1c69885158f9dacec991ad444ddb401bd2d644232a5f9151ae5391de7873e", + "size_in_bytes": 9 + }, + { + "_path": "lib/python3.13/site-packages/menuinst/__init__.py", + "path_type": "hardlink", + "sha256": "00298c234a718cb64c179269c9122d7b15324df9e78037ba22988a4ffd218e09", + "size_in_bytes": 1614 + }, + { + "_path": "lib/python3.13/site-packages/menuinst/__main__.py", + "path_type": "hardlink", + "sha256": "3129adff95e0f38b87ab34cddfc27082c7892bcaec267ff5d40f160fdf55b44a", + "size_in_bytes": 61 + }, + { + "_path": "lib/python3.13/site-packages/menuinst/__pycache__/__init__.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "60657d208a6af8d740e3d92434783694a01b3f076e39c69e8c8cdf52f75509c3", + "size_in_bytes": 1423 + }, + { + "_path": "lib/python3.13/site-packages/menuinst/__pycache__/__main__.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "6fb4b9c3e3636ad0a3d2f68da77c65b4be5845cf0596f223c1d0b10f93172476", + "size_in_bytes": 247 + }, + { + "_path": "lib/python3.13/site-packages/menuinst/__pycache__/_schema.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "084f2be90c75478a36f432eb3c07d177dee1cd4a6fc59ad16e10ff526c55ade9", + "size_in_bytes": 29034 + }, + { + "_path": "lib/python3.13/site-packages/menuinst/__pycache__/_version.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "899bdaf14d7d8f27a983ec5d2902cb32969ce64820b8d0488f3a17daad7019e0", + "size_in_bytes": 764 + }, + { + "_path": "lib/python3.13/site-packages/menuinst/__pycache__/api.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "e2fd662b6abe20ea4d77eb2f1b14fe8861053280c1b936be79e9dc2f3293fca4", + "size_in_bytes": 7775 + }, + { + "_path": "lib/python3.13/site-packages/menuinst/__pycache__/conda_plugin.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "5f931608d8f3cf2befc3df3a1adccc2d3abdf9d824ceb2c1b0cf3f64e46ba997", + "size_in_bytes": 2956 + }, + { + "_path": "lib/python3.13/site-packages/menuinst/__pycache__/utils.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "0f764142eefc7dc79479dbb370afed66a6fc52721a3c71cdf6ddcef5a48bf2c9", + "size_in_bytes": 18304 + }, + { + "_path": "lib/python3.13/site-packages/menuinst/_legacy/__init__.py", + "path_type": "hardlink", + "sha256": "d60d57e8085f4dfdf5f55bcd13c9367c7930f06a988d2e2b9e5da85e43101b9e", + "size_in_bytes": 2879 + }, + { + "_path": "lib/python3.13/site-packages/menuinst/_legacy/__pycache__/__init__.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "755e8e454fa30c53829efa6ad0c13aa130ac112c37c111954c83535728a58792", + "size_in_bytes": 3400 + }, + { + "_path": "lib/python3.13/site-packages/menuinst/_legacy/__pycache__/cwp.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "d04f4bf00f418328a1dc4f5e299aebbf7897f50f24d0803afd35f283e7bd57f6", + "size_in_bytes": 2376 + }, + { + "_path": "lib/python3.13/site-packages/menuinst/_legacy/__pycache__/main.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "3dfaa58f69d200ac4157166da271e195e41878998b2ed085fea90b311315325e", + "size_in_bytes": 1359 + }, + { + "_path": "lib/python3.13/site-packages/menuinst/_legacy/__pycache__/utils.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "86698d920210864625457f1fd19ad76caf1c355f144d3da67fddcb3227710578", + "size_in_bytes": 894 + }, + { + "_path": "lib/python3.13/site-packages/menuinst/_legacy/__pycache__/win32.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "f2cdedcc4c925ca7a3efa252db50703e75e3c1ea2b771021209edcab0a52a536", + "size_in_bytes": 14275 + }, + { + "_path": "lib/python3.13/site-packages/menuinst/_legacy/cwp.py", + "path_type": "hardlink", + "sha256": "137c278ebebdb1e2b5993d8c0b5902e2ae18425c816275f45c5b3a79b15c47ec", + "size_in_bytes": 1873 + }, + { + "_path": "lib/python3.13/site-packages/menuinst/_legacy/main.py", + "path_type": "hardlink", + "sha256": "21dcf0c60356accc82063a7f1f3c4525681539d7a700dbee7a0eb2b28eaf08b6", + "size_in_bytes": 693 + }, + { + "_path": "lib/python3.13/site-packages/menuinst/_legacy/utils.py", + "path_type": "hardlink", + "sha256": "654768af0a358adbf8df074b003c954cfdfa888077ce0a1d622adfe034baced2", + "size_in_bytes": 522 + }, + { + "_path": "lib/python3.13/site-packages/menuinst/_legacy/win32.py", + "path_type": "hardlink", + "sha256": "48c6c2f997ba3a7c017c13abd946fd97d7b87599dbdcdbf1c3780d84583e63a3", + "size_in_bytes": 11169 + }, + { + "_path": "lib/python3.13/site-packages/menuinst/_schema.py", + "path_type": "hardlink", + "sha256": "100a88a0561d35da94c0c186a1f05a438bde25495738ef22a34b6ea6fdf1c10c", + "size_in_bytes": 28278 + }, + { + "_path": "lib/python3.13/site-packages/menuinst/_vendor/apipkg/LICENSE", + "path_type": "hardlink", + "sha256": "e89eed1074d3a943198ba139b80844f5b445b860bba74a8aeadc0610566164ea", + "size_in_bytes": 1054 + }, + { + "_path": "lib/python3.13/site-packages/menuinst/_vendor/apipkg/__init__.py", + "path_type": "hardlink", + "sha256": "4d23679f7be7ba1bcee076c1e9fddee0a8e9571907c954def9116243bf8b67a5", + "size_in_bytes": 1123 + }, + { + "_path": "lib/python3.13/site-packages/menuinst/_vendor/apipkg/__pycache__/__init__.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "9b9b8db9ec1eaae6d959755d03218bc865ad7211ba6b41ba23db9f750cd3af79", + "size_in_bytes": 1615 + }, + { + "_path": "lib/python3.13/site-packages/menuinst/_vendor/apipkg/__pycache__/_alias_module.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "012889ff5b3bfba80f8b8726e9daee812cb706c6b337ced3ceb8d5e0fbcb3a8a", + "size_in_bytes": 2380 + }, + { + "_path": "lib/python3.13/site-packages/menuinst/_vendor/apipkg/__pycache__/_importing.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "5daf72bb4274a5811199690e7c869a30b9e623a529cbdbb590262dc667a96a4e", + "size_in_bytes": 1659 + }, + { + "_path": "lib/python3.13/site-packages/menuinst/_vendor/apipkg/__pycache__/_module.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "31ba40e2c2797fd4dba30c59a6f9f1e207fb8a8178f69c8d79aa35708667e5bd", + "size_in_bytes": 7891 + }, + { + "_path": "lib/python3.13/site-packages/menuinst/_vendor/apipkg/__pycache__/_syncronized.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "df19b7f4a7a1bb6201d22b45e25447efc02102cd1a1a5ec998a3919d8378703b", + "size_in_bytes": 908 + }, + { + "_path": "lib/python3.13/site-packages/menuinst/_vendor/apipkg/__pycache__/_version.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "2371cceafb64ad4895f5e5790d1204d873cd373c1ebb9b228112ee24a2b4fe1d", + "size_in_bytes": 226 + }, + { + "_path": "lib/python3.13/site-packages/menuinst/_vendor/apipkg/_alias_module.py", + "path_type": "hardlink", + "sha256": "19ae291945defd417373822dacd99831459cf460b862dbf9b0737d40f9da5836", + "size_in_bytes": 1186 + }, + { + "_path": "lib/python3.13/site-packages/menuinst/_vendor/apipkg/_importing.py", + "path_type": "hardlink", + "sha256": "25fed44677085569ff50163977555af3ee54f52edfa007b34a6756c781c0ccfa", + "size_in_bytes": 1067 + }, + { + "_path": "lib/python3.13/site-packages/menuinst/_vendor/apipkg/_module.py", + "path_type": "hardlink", + "sha256": "bd5dfabd1654a6004efe8e70476e2e7d308cfc20aa2993c6640e8fdc5c07d5d1", + "size_in_bytes": 6897 + }, + { + "_path": "lib/python3.13/site-packages/menuinst/_vendor/apipkg/_syncronized.py", + "path_type": "hardlink", + "sha256": "d46bfe8b2292eed31e1ed6ba55d62b27b8f23155380403fef745a274b827a577", + "size_in_bytes": 484 + }, + { + "_path": "lib/python3.13/site-packages/menuinst/_vendor/apipkg/_version.py", + "path_type": "hardlink", + "sha256": "03ba5eeb031f9c58d3c50b27ae22d5f3f25d6dbb8192b377567c8afa54be4c10", + "size_in_bytes": 142 + }, + { + "_path": "lib/python3.13/site-packages/menuinst/_vendor/apipkg/py.typed", + "path_type": "hardlink", + "sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "size_in_bytes": 0 + }, + { + "_path": "lib/python3.13/site-packages/menuinst/_version.py", + "path_type": "hardlink", + "sha256": "4602cb144f69e4df2e06407847470b94d9257a0b0fc4e14cde469131943083f4", + "size_in_bytes": 704 + }, + { + "_path": "lib/python3.13/site-packages/menuinst/api.py", + "path_type": "hardlink", + "sha256": "b3c204216fa706b5869e6b47503a52041660e65bc355eef08b2ad3c2d253d5c2", + "size_in_bytes": 6074 + }, + { + "_path": "lib/python3.13/site-packages/menuinst/cli/__init__.py", + "path_type": "hardlink", + "sha256": "a0ab02a688904925f1e7b0c6b3655f63378ed6e9094317469d5fb6842dc12343", + "size_in_bytes": 42 + }, + { + "_path": "lib/python3.13/site-packages/menuinst/cli/__pycache__/__init__.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "e84a17e1556a534e98afab50ad7a72eb3dca7a944468069c56b7d8deaa5dfd79", + "size_in_bytes": 212 + }, + { + "_path": "lib/python3.13/site-packages/menuinst/cli/__pycache__/cli.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "d5152ba23a885c2f3b0d57a8a76112d9d2efadcf4468909758127a0d454c71fb", + "size_in_bytes": 3773 + }, + { + "_path": "lib/python3.13/site-packages/menuinst/cli/cli.py", + "path_type": "hardlink", + "sha256": "60ea9cc59723aa231def80e69d2a373a0949e2b97e124f7c77a524687a4e12fb", + "size_in_bytes": 2738 + }, + { + "_path": "lib/python3.13/site-packages/menuinst/conda_plugin.py", + "path_type": "hardlink", + "sha256": "1b5675d557f2cc4bcd1ab3baa8b8295db7c3b2375719275c84eb4f0ad3681362", + "size_in_bytes": 1895 + }, + { + "_path": "lib/python3.13/site-packages/menuinst/data/appkit_launcher_arm64", + "path_type": "hardlink", + "sha256": "4b698d34ebc702ddfcdcc6f1fc4d3c18109b220a48b363fdb5eafc2436e6a495", + "size_in_bytes": 112012 + }, + { + "_path": "lib/python3.13/site-packages/menuinst/data/appkit_launcher_x86_64", + "path_type": "hardlink", + "sha256": "579e20340ab76800c92d28a1f49c34074abf51a8baf71e38a3faefc89bc666ed", + "size_in_bytes": 100192 + }, + { + "_path": "lib/python3.13/site-packages/menuinst/data/menuinst-1-0-0.default.json", + "path_type": "hardlink", + "sha256": "62b861783a7e0141b152dd76dfb727fd9ec33f96b7458a71270093a6b3bad6c3", + "size_in_bytes": 1871 + }, + { + "_path": "lib/python3.13/site-packages/menuinst/data/menuinst-1-0-0.schema.json", + "path_type": "hardlink", + "sha256": "1a552dd3a502f602b983e3633d73c40f39c705417f1665beece6c86783139313", + "size_in_bytes": 17558 + }, + { + "_path": "lib/python3.13/site-packages/menuinst/data/menuinst-1-0-1.default.json", + "path_type": "hardlink", + "sha256": "718fbbeffa5ea984f4e10411c737dbe57abdf99aabd697e11a9b59e4b33daa08", + "size_in_bytes": 1963 + }, + { + "_path": "lib/python3.13/site-packages/menuinst/data/menuinst-1-0-1.schema.json", + "path_type": "hardlink", + "sha256": "f6dfceb80935ec5c564ee96a8a47be3a3b1b9a3b207a105f74db06fe6ebf5643", + "size_in_bytes": 18963 + }, + { + "_path": "lib/python3.13/site-packages/menuinst/data/menuinst-1-0-2.default.json", + "path_type": "hardlink", + "sha256": "c456f6e588658a88eaa0b01067b8523cced635bff644b0b5017b904302e9eccd", + "size_in_bytes": 2000 + }, + { + "_path": "lib/python3.13/site-packages/menuinst/data/menuinst-1-0-2.schema.json", + "path_type": "hardlink", + "sha256": "3d182630ee8b19ebbfa8cedd14fcea4f8e3cbc357464c6b1821a6d545fb898b8", + "size_in_bytes": 48313 + }, + { + "_path": "lib/python3.13/site-packages/menuinst/data/menuinst-1-1-0.default.json", + "path_type": "hardlink", + "sha256": "7a7bfc1c2c09602fc9e6e9d2df2b5637585c9b8282b7ecfabecc232b33eef529", + "size_in_bytes": 1953 + }, + { + "_path": "lib/python3.13/site-packages/menuinst/data/menuinst-1-1-0.schema.json", + "path_type": "hardlink", + "sha256": "65c9ea4fc4b36272946b270fcab30d354795383cf348bbb19cea947c6f658795", + "size_in_bytes": 48394 + }, + { + "_path": "lib/python3.13/site-packages/menuinst/data/menuinst-1-1-1.default.json", + "path_type": "hardlink", + "sha256": "1343e47b3e47211e781654fb4ef2ccb3e7075217a12f5fc33790df2adcabc7cf", + "size_in_bytes": 1953 + }, + { + "_path": "lib/python3.13/site-packages/menuinst/data/menuinst-1-1-1.schema.json", + "path_type": "hardlink", + "sha256": "944d5ab4636ee9be1c7b77cab0f88f21f4b35e1461c563d22aae05cb0a74c1e6", + "size_in_bytes": 60707 + }, + { + "_path": "lib/python3.13/site-packages/menuinst/data/menuinst-1-1-2.default.json", + "path_type": "hardlink", + "sha256": "d43b9a8cd9599192a646f63bdc2fef8deb90b9ed3c31f4212e4ddb7fc4601752", + "size_in_bytes": 2143 + }, + { + "_path": "lib/python3.13/site-packages/menuinst/data/menuinst-1-1-2.schema.json", + "path_type": "hardlink", + "sha256": "5d41e2ce7c20144d5a5caed05a8fcb8780776974c861f7ab1545d820020ee0c7", + "size_in_bytes": 63381 + }, + { + "_path": "lib/python3.13/site-packages/menuinst/data/menuinst-1-1-3.default.json", + "path_type": "hardlink", + "sha256": "e8530dd85cb6a8fe23206122fa158ae78dfa5b461aa3dd3c9904f5fc64ccfe30", + "size_in_bytes": 2179 + }, + { + "_path": "lib/python3.13/site-packages/menuinst/data/menuinst-1-1-3.schema.json", + "path_type": "hardlink", + "sha256": "f3fa7a9bf806b6157398bc06f78476b41801257e7ea954ba3076a529ceb7a51a", + "size_in_bytes": 64025 + }, + { + "_path": "lib/python3.13/site-packages/menuinst/data/menuinst.default.json", + "path_type": "hardlink", + "sha256": "c456f6e588658a88eaa0b01067b8523cced635bff644b0b5017b904302e9eccd", + "size_in_bytes": 2000 + }, + { + "_path": "lib/python3.13/site-packages/menuinst/data/menuinst.schema.json", + "path_type": "hardlink", + "sha256": "3d182630ee8b19ebbfa8cedd14fcea4f8e3cbc357464c6b1821a6d545fb898b8", + "size_in_bytes": 48313 + }, + { + "_path": "lib/python3.13/site-packages/menuinst/data/osx_launcher_arm64", + "path_type": "hardlink", + "sha256": "6d65c9030110c09c859e8d452465ee16549ff6d79ed143d64d82aa57703e4767", + "size_in_bytes": 67616 + }, + { + "_path": "lib/python3.13/site-packages/menuinst/data/osx_launcher_x86_64", + "path_type": "hardlink", + "sha256": "eacd37a429aef8104f425748fb5878727d6b6d7536c74e987b34069d1bd60da5", + "size_in_bytes": 8920 + }, + { + "_path": "lib/python3.13/site-packages/menuinst/platforms/__init__.py", + "path_type": "hardlink", + "sha256": "2aceb9cbf779fd2b9e023c06dbc861f5ab016620052aaecfddbe4c7cf31da811", + "size_in_bytes": 744 + }, + { + "_path": "lib/python3.13/site-packages/menuinst/platforms/__pycache__/__init__.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "6cf64965719323fa186c06bc1bbacf56dc06070d90503cb848d76801aac47ab1", + "size_in_bytes": 1088 + }, + { + "_path": "lib/python3.13/site-packages/menuinst/platforms/__pycache__/base.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "c00e2e17e2e00c743a7de812c7f2d5397ecf1816726812274579f1d30d8619e7", + "size_in_bytes": 14346 + }, + { + "_path": "lib/python3.13/site-packages/menuinst/platforms/__pycache__/linux.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "9cff6395a9ee2c97f48fbe888098874cbef922af44ff38d1d5f4310a14ba1fa3", + "size_in_bytes": 25768 + }, + { + "_path": "lib/python3.13/site-packages/menuinst/platforms/__pycache__/osx.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "e9b16a93a47f245326fd6d8136c907fa66c2d2385a846c8dd59a91dc541af072", + "size_in_bytes": 19542 + }, + { + "_path": "lib/python3.13/site-packages/menuinst/platforms/__pycache__/win.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "5e79d30a0960bc79b67fc30efb7e9ca13ff772322cd4d24920722b5720a313fe", + "size_in_bytes": 28187 + }, + { + "_path": "lib/python3.13/site-packages/menuinst/platforms/base.py", + "path_type": "hardlink", + "sha256": "27777744e6b3c643d730aa92331cc5484123a9f9250bd0c53df618a597e558ec", + "size_in_bytes": 9620 + }, + { + "_path": "lib/python3.13/site-packages/menuinst/platforms/linux.py", + "path_type": "hardlink", + "sha256": "02c66ad9cdc45596c0cef6d4d6c98443866b975163faafccb35184bc7c080c68", + "size_in_bytes": 17275 + }, + { + "_path": "lib/python3.13/site-packages/menuinst/platforms/osx.py", + "path_type": "hardlink", + "sha256": "11cb86ed88b1fe6e56fabdc13d5fc5a97b23b0beb05f2e995e1c6ed7d896e31b", + "size_in_bytes": 13739 + }, + { + "_path": "lib/python3.13/site-packages/menuinst/platforms/win.py", + "path_type": "hardlink", + "sha256": "6bf8144387f1bf3292bb83f8227561d3956c22aa6c492b548fd366e889dc9994", + "size_in_bytes": 22152 + }, + { + "_path": "lib/python3.13/site-packages/menuinst/platforms/win_utils/__init__.py", + "path_type": "hardlink", + "sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "size_in_bytes": 0 + }, + { + "_path": "lib/python3.13/site-packages/menuinst/platforms/win_utils/__pycache__/__init__.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "28099c50dec70e5a8dcc834328269f9809e440543c28bc427f8c1a0756e716e7", + "size_in_bytes": 166 + }, + { + "_path": "lib/python3.13/site-packages/menuinst/platforms/win_utils/__pycache__/knownfolders.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "aad3bfc4f536d62484a99586b113701ad8d8b32d2b3ae9486def7ca15ff3423b", + "size_in_bytes": 17134 + }, + { + "_path": "lib/python3.13/site-packages/menuinst/platforms/win_utils/__pycache__/registry.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "d2793fc2981c9891cbb28ccd4bf2095693185c6ca380de3bf9ac8ec27b6752a3", + "size_in_bytes": 9237 + }, + { + "_path": "lib/python3.13/site-packages/menuinst/platforms/win_utils/__pycache__/win_elevate.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "29274623c68ba99d3343a2f1252a3f548957a52e9abe6f50e9e3e765190120c2", + "size_in_bytes": 5838 + }, + { + "_path": "lib/python3.13/site-packages/menuinst/platforms/win_utils/knownfolders.py", + "path_type": "hardlink", + "sha256": "69ddef3b07ae37124ca2740cc500894a7ec80538453e338a10f090ab19b5b59a", + "size_in_bytes": 15353 + }, + { + "_path": "lib/python3.13/site-packages/menuinst/platforms/win_utils/registry.py", + "path_type": "hardlink", + "sha256": "aeded538e83dc02883302435ee4b022ef8d9012b4a9a87c7e240e0aa6dde1935", + "size_in_bytes": 7722 + }, + { + "_path": "lib/python3.13/site-packages/menuinst/platforms/win_utils/win_elevate.py", + "path_type": "hardlink", + "sha256": "86cfc39fa54239bd65fd8eac21382c351dd17365c90cd5eef5ac6e790f72aefb", + "size_in_bytes": 5068 + }, + { + "_path": "lib/python3.13/site-packages/menuinst/utils.py", + "path_type": "hardlink", + "sha256": "4756ce4243d9d6efc8eaa7ed73d2d4262f49dd36a659b65cc1dd8c600536e782", + "size_in_bytes": 18019 + } + ], + "paths_version": 1 +} \ No newline at end of file diff --git a/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/info/recipe/conda_build_config.yaml b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/info/recipe/conda_build_config.yaml new file mode 100644 index 0000000000000000000000000000000000000000..eb481a2a0835b046a3d49c656fd8e5fe86c64db3 --- /dev/null +++ b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/info/recipe/conda_build_config.yaml @@ -0,0 +1,28 @@ +c_compiler: gcc +channel_targets: defaults +cpu_optimization_target: nocona +cran_mirror: https://cran.r-project.org +cxx_compiler: gxx +extend_keys: +- ignore_build_only_deps +- pin_run_as_build +- extend_keys +- ignore_version +fortran_compiler: gfortran +ignore_build_only_deps: +- numpy +- python +lua: '5' +numpy: '1.26' +perl: 5.26.2 +pin_run_as_build: + python: + max_pin: x.x + min_pin: x.x + r-base: + max_pin: x.x + min_pin: x.x +platform: linux-64 +python: '3.13' +r_base: '3.5' +target_platform: linux-64 diff --git a/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/info/recipe/meta.yaml b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/info/recipe/meta.yaml new file mode 100644 index 0000000000000000000000000000000000000000..a4cbe84fa92c7233b19fbfda6c848dc3e494c4d4 --- /dev/null +++ b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/info/recipe/meta.yaml @@ -0,0 +1,143 @@ +# This file created by conda-build 25.1.2 +# meta.yaml template originally from: +# /home/task_176538230483207/menuinst-feedstock/recipe, last modified Wed Dec 10 15:59:09 2025 +# ------------------------------------------------ + +package: + name: menuinst + version: 2.4.2 +source: + sha256: 66d5be6bd84b1f7629b5318c1364940f03c7a1058981c47d4268f107ac04ff56 + url: https://github.com/conda/menuinst/archive/2.4.2.tar.gz +build: + entry_points: + - menuinst = menuinst.cli:main + missing_dso_whitelist: null + number: '1' + script: + - rm -f "/home/task_176538230483207/conda-bld/menuinst_1765382366331/work/menuinst/data/osx_launcher_*" + - rm -f "/home/task_176538230483207/conda-bld/menuinst_1765382366331/work/menuinst/data/appkit_launcher_*" + - /home/task_176538230483207/conda-bld/menuinst_1765382366331/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehol/bin/python + -m pip install . -vv --no-build-isolation --no-deps + string: py313h06a4308_1 +requirements: + build: + - _libgcc_mutex 0.1 main + - _openmp_mutex 5.1 1_gnu + - bzip2 1.0.8 h5eee18b_6 + - ca-certificates 2025.12.2 h06a4308_0 + - expat 2.7.3 h7354ed3_4 + - ld_impl_linux-64 2.44 h153f514_2 + - libexpat 2.7.3 h7354ed3_4 + - libffi 3.4.4 h6a678d5_1 + - libgcc 15.2.0 h69a1729_7 + - libgcc-ng 15.2.0 h166f726_7 + - libgomp 15.2.0 h4751f2c_7 + - libmpdec 4.0.0 h5eee18b_0 + - libstdcxx 15.2.0 h39759b7_7 + - libstdcxx-ng 15.2.0 hc03a8fd_7 + - libuuid 1.41.5 h5eee18b_0 + - libxcb 1.17.0 h9b100fa_0 + - libzlib 1.3.1 hb25bd0a_0 + - ncurses 6.5 h7934f7d_0 + - openssl 3.0.18 hd6dcaed_0 + - pthread-stubs 0.3 h0ce48e5_1 + - python 3.13.10 hcf712cf_100_cp313 + - python_abi 3.13 3_cp313 + - readline 8.3 hc2a1206_0 + - sqlite 3.51.0 h2a70700_0 + - tk 8.6.15 h54e0aa7_0 + - tzdata 2025b h04d1e81_0 + - xorg-libx11 1.8.12 h9b100fa_1 + - xorg-libxau 1.0.12 h9b100fa_0 + - xorg-libxdmcp 1.1.5 h9b100fa_0 + - xorg-xorgproto 2024.1 h5eee18b_1 + - xz 5.6.4 h5eee18b_1 + - zlib 1.3.1 hb25bd0a_0 + host: + - _libgcc_mutex 0.1 main + - _openmp_mutex 5.1 1_gnu + - bzip2 1.0.8 h5eee18b_6 + - ca-certificates 2025.12.2 h06a4308_0 + - expat 2.7.3 h7354ed3_4 + - ld_impl_linux-64 2.44 h153f514_2 + - libexpat 2.7.3 h7354ed3_4 + - libffi 3.4.4 h6a678d5_1 + - libgcc 15.2.0 h69a1729_7 + - libgcc-ng 15.2.0 h166f726_7 + - libgomp 15.2.0 h4751f2c_7 + - libmpdec 4.0.0 h5eee18b_0 + - libstdcxx 15.2.0 h39759b7_7 + - libstdcxx-ng 15.2.0 hc03a8fd_7 + - libuuid 1.41.5 h5eee18b_0 + - libxcb 1.17.0 h9b100fa_0 + - libzlib 1.3.1 hb25bd0a_0 + - ncurses 6.5 h7934f7d_0 + - openssl 3.0.18 hd6dcaed_0 + - packaging 25.0 py313h06a4308_1 + - pip 25.3 pyhc872135_0 + - pthread-stubs 0.3 h0ce48e5_1 + - python 3.13.10 hcf712cf_100_cp313 + - python_abi 3.13 3_cp313 + - readline 8.3 hc2a1206_0 + - setuptools 80.9.0 py313h06a4308_0 + - setuptools-scm 9.2.2 py313h06a4308_0 + - setuptools_scm 9.2.2 hd3eb1b0_0 + - sqlite 3.51.0 h2a70700_0 + - tk 8.6.15 h54e0aa7_0 + - toml 0.10.2 pyhd3eb1b0_0 + - tzdata 2025b h04d1e81_0 + - wheel 0.45.1 py313h06a4308_0 + - xorg-libx11 1.8.12 h9b100fa_1 + - xorg-libxau 1.0.12 h9b100fa_0 + - xorg-libxdmcp 1.1.5 h9b100fa_0 + - xorg-xorgproto 2024.1 h5eee18b_1 + - xz 5.6.4 h5eee18b_1 + - zlib 1.3.1 hb25bd0a_0 + run: + - python >=3.13,<3.14.0a0 + - python_abi 3.13.* *_cp313 +test: + imports: + - menuinst + - menuinst.api + requires: + - conda + - pip + - pydantic >=2 + - pytest + - pytest-mock + source_files: + - tests +about: + description: 'This package provides cross platform menu item installation for conda + packages. + + + If a conda package ships a menuinst JSON document under $PREFIX/Menu, conda will + invoke + + menuinst to process the JSON file and install the menu items in your operating + system. + + The menu items are removed when the package is uninstalled. + + ' + dev_url: https://github.com/conda/menuinst + doc_url: https://conda.github.io/menuinst + home: https://github.com/conda/menuinst + license: BSD-3-Clause AND MIT + license_family: BSD + license_file: + - LICENSE.txt + - menuinst/_vendor/apipkg/LICENSE + summary: cross platform install of menu items +extra: + copy_test_source_files: true + final: true + recipe-maintainers: + - carlodri + - goanpeca + - isuruf + - jaimergp + - jakirkham diff --git a/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/info/recipe/meta.yaml.template b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/info/recipe/meta.yaml.template new file mode 100644 index 0000000000000000000000000000000000000000..0d37c3275a7ea690a00d9db9346d45b854e6f733 --- /dev/null +++ b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/info/recipe/meta.yaml.template @@ -0,0 +1,89 @@ +{% set name = "menuinst" %} +{% set version = "2.4.2" %} + +package: + name: {{ name }} + version: {{ version }} + +source: + url: https://github.com/conda/{{ name }}/archive/{{ version }}.tar.gz + sha256: 66d5be6bd84b1f7629b5318c1364940f03c7a1058981c47d4268f107ac04ff56 + +build: + number: 1 + skip: true # [py<39] + script: + # Apparently these files make the post-build linkage analysis crash + # and we should not need them on Windows + - del /q "{{ SRC_DIR }}\\menuinst\\data\\osx_launcher_*" # [win] + - del /q "{{ SRC_DIR }}\\menuinst\\data\\appkit_launcher_*" # [win] + # Delete in Linux too because we don't need them there + - rm -f "{{ SRC_DIR }}/menuinst/data/osx_launcher_*" # [linux] + - rm -f "{{ SRC_DIR }}/menuinst/data/appkit_launcher_*" # [linux] + - {{ PYTHON }} -m pip install . -vv --no-build-isolation --no-deps + # menuinst v1 expects cwp.py in PREFIX; backwards compat fix + - copy "%SP_DIR%\\menuinst\\_legacy\cwp.py" "%PREFIX%\\" # [win] + skip_compile_pyc: # [win] + - cwp.py # [win] + missing_dso_whitelist: + - "**/libswift*" # [osx] + entry_points: + - menuinst = menuinst.cli:main + +requirements: + build: + - python + - {{ stdlib('c') }} # [win] + - {{ compiler('c') }} # [win] + - {{ compiler('cxx') }} # [win] + host: + - python + - pip + - wheel + - setuptools_scm >=6.2 + - setuptools >=45 + - toml + run: + - python + +test: + source_files: + - tests + imports: + - menuinst + - menuinst.api + - menuinst._legacy # [win] + - menuinst.platforms.win_utils.winshortcut # [win] + # Test commands are moved to run_test.bat and run_test.sh + requires: + - pip + - conda # [py<314] + - pydantic >=2 # [py<314] + - pytest + - pytest-mock + + +about: + home: https://github.com/conda/menuinst + license: BSD-3-Clause AND MIT + license_family: BSD + license_file: + - LICENSE.txt + - menuinst/_vendor/apipkg/LICENSE + summary: cross platform install of menu items + description: | + This package provides cross platform menu item installation for conda packages. + + If a conda package ships a menuinst JSON document under $PREFIX/Menu, conda will invoke + menuinst to process the JSON file and install the menu items in your operating system. + The menu items are removed when the package is uninstalled. + doc_url: https://conda.github.io/menuinst + dev_url: https://github.com/conda/menuinst + +extra: + recipe-maintainers: + - goanpeca + - jakirkham + - carlodri + - isuruf + - jaimergp diff --git a/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/info/recipe/run_test.bat b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/info/recipe/run_test.bat new file mode 100644 index 0000000000000000000000000000000000000000..1cf37da514ae3ddbb7b0f41452e8a485864b83aa --- /dev/null +++ b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/info/recipe/run_test.bat @@ -0,0 +1,21 @@ +@ECHO ON + +:: Pip check +"%PYTHON%" -m pip check +IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL% + +:: Create a .nonadmin file so that the menuinst tests +:: do not try to run with admin privileges +echo. > "%PREFIX%\.nonadmin" +IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL% + +:: Run tests only if Python is NOT 3.14 +if not "%PYTHON_VERSION%"=="3.14" ( + echo Running tests for Python %PYTHON_VERSION% + :: Cannot run tests in test_schema.py because hypothesis-jsonschema is not on defaults + :: Cannot run others because privilege elevation is not possible on the build platform + pytest tests\ -vvv --ignore=tests\test_schema.py --ignore=tests\test_elevation.py -k "not test_create_and_remove_shortcut" + if %ERRORLEVEL% neq 0 exit /b %ERRORLEVEL% +) else ( + echo Skipping tests on Python 3.14+ +) \ No newline at end of file diff --git a/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/info/recipe/run_test.sh b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/info/recipe/run_test.sh new file mode 100644 index 0000000000000000000000000000000000000000..dc09b927a19a5f4895c727aa8fa978b35c3de402 --- /dev/null +++ b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/info/recipe/run_test.sh @@ -0,0 +1,24 @@ +#!/bin/bash +set -euxo pipefail + +# Pip check +$PYTHON -m pip check + +# Verify launcher files are present on macOS +if [[ "$(uname)" == "Darwin" ]]; then + SP_DIR="$(python -c 'import site; print(site.getsitepackages()[0])')" + test -f "${SP_DIR}/menuinst/data/appkit_launcher_arm64" + test -f "${SP_DIR}/menuinst/data/appkit_launcher_x86_64" + test -f "${SP_DIR}/menuinst/data/osx_launcher_arm64" + test -f "${SP_DIR}/menuinst/data/osx_launcher_x86_64" +fi + + +if [[ "$PYTHON_VERSION" < "3.14" ]]; then + # Run tests + # Cannot run tests in test_schema.py because hypothesis-jsonschema is not on defaults + # Cannot run others because privilege elevation is not possible on the build platform + pytest tests/ -vvv --ignore=tests/test_schema.py --ignore=tests/test_elevation.py +else + echo Skipping tests on Python 3.14+ +fi \ No newline at end of file diff --git a/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/info/repodata_record.json b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/info/repodata_record.json new file mode 100644 index 0000000000000000000000000000000000000000..41598667165bbf8acecfb1a52a6ab827dec7b992 --- /dev/null +++ b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/info/repodata_record.json @@ -0,0 +1,23 @@ +{ + "arch": "x86_64", + "build": "py313h06a4308_1", + "build_number": 1, + "channel": "https://repo.anaconda.com/pkgs/main/linux-64/", + "constrains": [], + "depends": [ + "python >=3.13,<3.14.0a0", + "python_abi 3.13.* *_cp313" + ], + "fn": "menuinst-2.4.2-py313h06a4308_1.conda", + "license": "BSD-3-Clause AND MIT", + "license_family": "BSD", + "md5": "3c19869ee69743cd3e6ed44610f7b845", + "name": "menuinst", + "platform": "linux", + "sha256": "4a7cbe8e343d05ea964f6b390b4e8e876423080ddc8efee42da96255a8e45dc8", + "size": 257750, + "subdir": "linux-64", + "timestamp": 1765382387000, + "url": "https://repo.anaconda.com/pkgs/main/linux-64/menuinst-2.4.2-py313h06a4308_1.conda", + "version": "2.4.2" +} \ No newline at end of file diff --git a/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/info/test/run_test.py b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/info/test/run_test.py new file mode 100644 index 0000000000000000000000000000000000000000..cda01aa22dc0ede09c5b7e27aea3a54bf27c62a5 --- /dev/null +++ b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/info/test/run_test.py @@ -0,0 +1,6 @@ +print("import: 'menuinst'") +import menuinst + +print("import: 'menuinst.api'") +import menuinst.api + diff --git a/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/info/test/run_test.sh b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/info/test/run_test.sh new file mode 100644 index 0000000000000000000000000000000000000000..dc09b927a19a5f4895c727aa8fa978b35c3de402 --- /dev/null +++ b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/info/test/run_test.sh @@ -0,0 +1,24 @@ +#!/bin/bash +set -euxo pipefail + +# Pip check +$PYTHON -m pip check + +# Verify launcher files are present on macOS +if [[ "$(uname)" == "Darwin" ]]; then + SP_DIR="$(python -c 'import site; print(site.getsitepackages()[0])')" + test -f "${SP_DIR}/menuinst/data/appkit_launcher_arm64" + test -f "${SP_DIR}/menuinst/data/appkit_launcher_x86_64" + test -f "${SP_DIR}/menuinst/data/osx_launcher_arm64" + test -f "${SP_DIR}/menuinst/data/osx_launcher_x86_64" +fi + + +if [[ "$PYTHON_VERSION" < "3.14" ]]; then + # Run tests + # Cannot run tests in test_schema.py because hypothesis-jsonschema is not on defaults + # Cannot run others because privilege elevation is not possible on the build platform + pytest tests/ -vvv --ignore=tests/test_schema.py --ignore=tests/test_elevation.py +else + echo Skipping tests on Python 3.14+ +fi \ No newline at end of file diff --git a/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/info/test/test_time_dependencies.json b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/info/test/test_time_dependencies.json new file mode 100644 index 0000000000000000000000000000000000000000..74b76462dd3480b38269f3bcb0b96d9b3714603b --- /dev/null +++ b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/info/test/test_time_dependencies.json @@ -0,0 +1 @@ +["pytest-mock", "pip", "pytest", "pydantic >=2", "conda"] \ No newline at end of file diff --git a/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/info/test/tests/_legacy/menu-windows.json b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/info/test/tests/_legacy/menu-windows.json new file mode 100644 index 0000000000000000000000000000000000000000..6810e06680608132a9a590d00108fb9faced4696 --- /dev/null +++ b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/info/test/tests/_legacy/menu-windows.json @@ -0,0 +1,12 @@ +{ + "menu_name": "Anaconda${PY_VER} ${PLATFORM} - Test Menu", + "menu_items": + [ + { + "name": "Anaconda Prompt", + "system": "%windir%\\system32\\cmd.exe", + "scriptarguments": ["/C", "${ROOT_PREFIX}\\Scripts\\activate.bat", "${PREFIX}"], + "icon": "${MENU_DIR}/Iconleak-Atrous-Console.ico" + } + ] +} diff --git a/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/info/test/tests/_legacy/sys-prefix.json b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/info/test/tests/_legacy/sys-prefix.json new file mode 100644 index 0000000000000000000000000000000000000000..9e070236aaec62445bd68a27931e2027fd1e365a --- /dev/null +++ b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/info/test/tests/_legacy/sys-prefix.json @@ -0,0 +1,15 @@ +{ + "menu_name": "Sys Prefix", + "menu_items": + [ + { + "name": "Sys Prefix", + "script": "${PREFIX}/python.exe", + "scriptarguments": [ + "-c", + "import sys; f = open(r'__OUTPUT_FILE__', 'w'); f.write(sys.prefix); f.close()" + ], + "workdir": "${PERSONALDIR}" + } + ] +} diff --git a/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/info/test/tests/_legacy/test_cwp.py b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/info/test/tests/_legacy/test_cwp.py new file mode 100644 index 0000000000000000000000000000000000000000..1222a17f77718d526087ac5fb5313db85573b38b --- /dev/null +++ b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/info/test/tests/_legacy/test_cwp.py @@ -0,0 +1,21 @@ +import sys +from subprocess import check_output + +import pytest + +cwp = pytest.importorskip("menuinst._legacy.cwp", reason="Windows only") + + +def test_cwp(): + out = check_output( + [ + sys.executable, + cwp.__file__, + sys.prefix, + "python", + "-c", + "import sys; print(sys.prefix)", + ], + text=True, + ) + assert out.strip() == sys.prefix diff --git a/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/info/test/tests/_legacy/test_menu_creation.py b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/info/test/tests/_legacy/test_menu_creation.py new file mode 100644 index 0000000000000000000000000000000000000000..78ec2cbafb772971d3d6dd156bd46c0d23ccf822 --- /dev/null +++ b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/info/test/tests/_legacy/test_menu_creation.py @@ -0,0 +1,70 @@ +import os +import sys + +import pytest + +if sys.platform == "win32": + import menuinst._legacy as menuinst + from menuinst._legacy.win32 import dirs_src + + +def file_exist(mode, name): + file = os.path.join( + dirs_src[mode]['start'][0], 'Anaconda3 (64-bit) - Test Menu', '%s.lnk' % name + ) + return os.path.exists(file) + + +menu_dir = os.path.dirname(__file__) + + +@pytest.mark.skipif(sys.platform != "win32", reason="Windows-only tests") +class TestWindowsShortcuts(object): + def test_install_folders_exist(self): + for mode in ["user", "system"]: + for path, _ in dirs_src[mode].values(): + assert os.path.exists(path) + + def test_create_and_remove_shortcut(self): + nonadmin = os.path.join(sys.prefix, ".nonadmin") + shortcut = os.path.join(menu_dir, "menu-windows.json") + has_nonadmin = os.path.exists(nonadmin) + name = 'Anaconda Prompt' + for mode in ["user", "system"]: + if mode == "user": + open(nonadmin, 'a').close() + menuinst.install(shortcut, remove=False) + assert file_exist(mode, name) + menuinst.install(shortcut, remove=True) + assert not file_exist(mode, name) + if os.path.exists(nonadmin): + os.remove(nonadmin) + if has_nonadmin: + open(nonadmin, 'a').close() + + def test_create_shortcut_env(self, conda_cli): + nonadmin = os.path.join(sys.prefix, ".nonadmin") + open(nonadmin, 'a').close() + shortcut = os.path.join(menu_dir, "menu-windows.json") + test_env_name = 'test_env' + conda_cli("create", "-y", "-n", test_env_name, "python") + prefix = os.path.join(sys.prefix, 'envs', test_env_name) + name = 'Anaconda Prompt (%s)' % test_env_name + menuinst.install(shortcut, prefix=prefix, remove=False) + assert file_exist('user', name) + menuinst.install(shortcut, prefix=prefix, remove=True) + assert not file_exist('user', name) + conda_cli("remove", "-y", "-n", test_env_name, "--all") + + def test_root_prefix(self, conda_cli): + nonadmin = os.path.join(sys.prefix, ".nonadmin") + open(nonadmin, 'a').close() + shortcut = os.path.join(menu_dir, "menu-windows.json") + root_prefix = os.path.join(menu_dir, 'temp_env') + conda_cli("create", "-y", "-p", root_prefix, "python") + name = 'Anaconda Prompt (%s)' % os.path.split(sys.prefix)[1] + menuinst.install(shortcut, remove=False, root_prefix=root_prefix) + assert file_exist('user', name) + menuinst.install(shortcut, remove=True, root_prefix=root_prefix) + assert not file_exist('user', name) + conda_cli("remove", "-y", "-p", root_prefix, "--all") diff --git a/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/info/test/tests/_legacy/test_win32.py b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/info/test/tests/_legacy/test_win32.py new file mode 100644 index 0000000000000000000000000000000000000000..67d5080b29203f33d906ed293e3cccd06669c000 --- /dev/null +++ b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/info/test/tests/_legacy/test_win32.py @@ -0,0 +1,27 @@ +# -*- coding: utf-8 -*- +from __future__ import absolute_import, division, print_function, unicode_literals + +import sys +from logging import getLogger + +import pytest + +if sys.platform == "win32": + from menuinst._legacy.win32 import quote_args + +log = getLogger(__name__) + + +@pytest.mark.skipif(sys.platform != "win32", reason="Windows-only tests") +def test_quote_args_1(): + args = [ + "%windir%\\System32\\cmd.exe", + "/K", + "c:\\Users\\Francisco García Carrión Martínez\\Anaconda 3\\Scripts\\activate.bat", + "c:\\Users\\Francisco García Carrión Martínez\\Anaconda 3", + ] + assert quote_args(args) == [ + "\"%windir%\\System32\\cmd.exe\"", + "/K", + "\"\"c:\\Users\\Francisco García Carrión Martínez\\Anaconda 3\\Scripts\\activate.bat\" \"c:\\Users\\Francisco García Carrión Martínez\\Anaconda 3\"\"", # noqa + ] diff --git a/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/info/test/tests/conftest.py b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/info/test/tests/conftest.py new file mode 100644 index 0000000000000000000000000000000000000000..062b94a06c3ec7a8d632cc2252b48d4941745468 --- /dev/null +++ b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/info/test/tests/conftest.py @@ -0,0 +1,95 @@ +import json +import logging +import os +import shutil +from pathlib import Path +from subprocess import check_output +from tempfile import TemporaryDirectory + +import py +import pytest + +from menuinst.platforms.base import platform_key + +logging.basicConfig(level=logging.DEBUG) + +pytest_plugins = ("conda.testing.fixtures",) + +os.environ["PYTEST_IN_USE"] = "1" +DATA = Path(__file__).parent / "data" +LEGACY = Path(__file__).parent / "_legacy" +PLATFORM = platform_key() + + +def base_prefix(): + prefix = os.environ.get("CONDA_ROOT", os.environ.get("MAMBA_ROOT_PREFIX")) + if not prefix: + prefix = json.loads(check_output(["conda", "info", "--json"]))["root_prefix"] + return prefix + + +BASE_PREFIX = base_prefix() + + +@pytest.fixture() +def delete_files(): + paths = [] + yield paths + for path in paths: + path = Path(path) + # If the list contains duplicates, a path may already have been deleted. + if not path.exists(): + continue + try: + if path.is_dir(): + shutil.rmtree(path) + else: + path.unlink() + except IOError: + logging.warning("Could not delete %s", path, exc_info=True) + + +@pytest.fixture(scope="function") +def tmpdir(tmpdir, request): + Path(str(tmpdir)).mkdir(parents=True, exist_ok=True) + tmpdir = TemporaryDirectory(dir=str(tmpdir)) + request.addfinalizer(tmpdir.cleanup) + return py.path.local(tmpdir.name) + + +@pytest.fixture(autouse=True) +def mock_locations(monkeypatch, tmp_path): + from menuinst.platforms.linux import LinuxMenu + from menuinst.platforms.osx import MacOSMenuItem + + if os.name == "nt": + from menuinst.platforms import win as win_platform + from menuinst.platforms.win_utils import knownfolders + + def windows_locations(preferred_mode, check_other_mode, key): + return tmp_path / preferred_mode / key + + monkeypatch.setattr(knownfolders, "folder_path", windows_locations) + monkeypatch.setattr(win_platform, "windows_folder_path", windows_locations) + + def osx_base_location(self): + if self.menu.mode == "user": + return tmp_path / "user" + return tmp_path / "system" + + if not os.environ.get("CI"): + monkeypatch.setattr(MacOSMenuItem, "_base_location", osx_base_location) + + # For Linux + if not os.environ.get("CI"): + monkeypatch.setattr(LinuxMenu, "_system_config_directory", tmp_path / "system" / "config") + monkeypatch.setattr(LinuxMenu, "_system_data_directory", tmp_path / "system" / "data") + monkeypatch.setenv("XDG_CONFIG_HOME", str(tmp_path / "user" / "config")) + monkeypatch.setenv("XDG_DATA_HOME", str(tmp_path / "user" / "data")) + + +@pytest.fixture() +def run_as_user(monkeypatch): + from menuinst import utils as menuinst_utils + + monkeypatch.setattr(menuinst_utils, "user_is_admin", lambda: False) diff --git a/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/info/test/tests/data/jsons/entitlements.json b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/info/test/tests/data/jsons/entitlements.json new file mode 100644 index 0000000000000000000000000000000000000000..9ce9c5494f3435cc4c90bc131c35b2bd302154a8 --- /dev/null +++ b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/info/test/tests/data/jsons/entitlements.json @@ -0,0 +1,38 @@ +{ + "$schema": "https://raw.githubusercontent.com/conda/menuinst/refs/heads/main/menuinst/data/menuinst.schema.json", + "menu_name": "Example with entitlements", + "menu_items": [ + { + "name": "Example with entitlements on macOS", + "description": "This examples include entitlements on macOS, which require code signing.", + "icon": null, + "command": [ + "echo", + "entitlements" + ], + "platforms": { + "osx": { + "CFBundleName": "Entitlements", + "CFBundleDisplayName": "My Example with entitlements on macOS", + "entitlements": [ + "com.apple.security.files.user-selected.read-write" + ], + "LSBackgroundOnly": false, + "LSEnvironment": { + "example_var": "example_value" + }, + "LSMinimumSystemVersion": "10.4.0", + "NSAudioCaptureUsageDescription": "Audio test", + "NSCameraUsageDescription": "Camera test", + "NSMainCameraUsageDescription": "Main camera test", + "NSMicrophoneUsageDescription": "Mic check", + "NSSupportsAutomaticGraphicsSwitching": false, + "info_plist_extra": { + "NSRequiresAquaSystemAppearance": "NO", + "NSHighResolutionCapable": true + } + } + } + } + ] +} diff --git a/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/info/test/tests/data/jsons/example-3.invalid.json b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/info/test/tests/data/jsons/example-3.invalid.json new file mode 100644 index 0000000000000000000000000000000000000000..1a2791827a71886e2baed9f1f3f879309c478225 --- /dev/null +++ b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/info/test/tests/data/jsons/example-3.invalid.json @@ -0,0 +1,19 @@ +{ + "$schema": "https://raw.githubusercontent.com/conda/menuinst/refs/heads/main/menuinst/data/menuinst.schema.json", + "menu_name": "Example 2", + "menu_items": [ + { + "name": "Example", + "description": "This is invalid because platforms. cannot be a boolean", + "icon": null, + "command": [ + "python", + "-m", + "this" + ], + "platforms": { + "win": false + } + } + ] +} diff --git a/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/info/test/tests/data/jsons/file_types.json b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/info/test/tests/data/jsons/file_types.json new file mode 100644 index 0000000000000000000000000000000000000000..e6c0e3d809d848c2e89307e7d7a18276ebef800b --- /dev/null +++ b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/info/test/tests/data/jsons/file_types.json @@ -0,0 +1,74 @@ +{ + "$schema": "https://raw.githubusercontent.com/conda/menuinst/refs/heads/main/menuinst/data/menuinst.schema.json", + "menu_name": "Example with file type association", + "menu_items": [ + { + "name": "FileTypeAssociation", + "description": "Testing file type association", + "icon": null, + "command": [ + "{{ PYTHON }}", + "-c", + "import sys, pathlib as p; p.Path(r'__OUTPUT_FILE__').write_text(sys.argv[1])" + ], + "platforms": { + "win": { + "icon": "doesnotexistbutitsok.{{ ICON_EXT }}", + "command": [ + "{{ PYTHON }}", + "-c", + "import sys, pathlib as p; p.Path(r'__OUTPUT_FILE__').write_text(r'%1')" + ], + "file_extensions": [ + ".menuinst" + ] + }, + "linux": { + "command": [ + "{{ PYTHON }}", + "-c", + "import sys, pathlib as p; p.Path(r'__OUTPUT_FILE__').write_text(r'%f')" + ], + "MimeType": [ + "application/x-menuinst" + ], + "glob_patterns": { + "application/x-menuinst": "*.menuinst" + } + }, + "osx": { + "command": [ + "bash", + "-c", + "nc -l 40257 > __OUTPUT_FILE__" + ], + "event_handler": "for i in 1 2 3 4 5; do echo \"$*\" | nc 127.0.0.1 40257 && break || sleep 1; done", + "CFBundleDocumentTypes": [ + { + "CFBundleTypeName": "org.conda.menuinst.filetype-example", + "CFBundleTypeRole": "Viewer", + "LSItemContentTypes": [ + "org.conda.menuinst.main-file-uti" + ], + "LSHandlerRank": "Default" + } + ], + "UTExportedTypeDeclarations": [ + { + "UTTypeConformsTo": [ + "public.data", + "public.content" + ], + "UTTypeIdentifier": "org.conda.menuinst.main-file-uti", + "UTTypeTagSpecification": { + "public.filename-extension": [ + "menuinst" + ] + } + } + ] + } + } + } + ] +} diff --git a/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/info/test/tests/data/jsons/file_types_no_event_handler.json b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/info/test/tests/data/jsons/file_types_no_event_handler.json new file mode 100644 index 0000000000000000000000000000000000000000..27440593746e4dbce76d413ecbf3696f0ca6f46f --- /dev/null +++ b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/info/test/tests/data/jsons/file_types_no_event_handler.json @@ -0,0 +1,49 @@ +{ + "$schema": "https://raw.githubusercontent.com/conda/menuinst/refs/heads/main/menuinst/data/menuinst.schema.json", + "menu_name": "Example with file type association and no event handler (macOS only)", + "menu_items": [ + { + "name": "FileTypeAssociationNoEventHandler", + "description": "Testing file type association without event handler", + "icon": null, + "command": [ + "{{ PYTHON }}", + "-c", + "import sys, pathlib as p; p.Path(r'__OUTPUT_FILE__').write_text(sys.argv[1])" + ], + "platforms": { + "osx": { + "command": [ + "bash", + "-c", + "nc -l 40258 > __OUTPUT_FILE__" + ], + "CFBundleDocumentTypes": [ + { + "CFBundleTypeName": "org.conda.menuinst.filetype-example-no-event-handler", + "CFBundleTypeRole": "Viewer", + "LSItemContentTypes": [ + "org.conda.menuinst.main-file-util-no-event-handler" + ], + "LSHandlerRank": "Default" + } + ], + "UTExportedTypeDeclarations": [ + { + "UTTypeConformsTo": [ + "public.data", + "public.content" + ], + "UTTypeIdentifier": "org.conda.menuinst.main-file-util-no-event-handler", + "UTTypeTagSpecification": { + "public.filename-extension": [ + "menuinst-no-event-handler" + ] + } + } + ] + } + } + } + ] +} diff --git a/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/info/test/tests/data/jsons/menu-name.json b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/info/test/tests/data/jsons/menu-name.json new file mode 100644 index 0000000000000000000000000000000000000000..9eb85f7c3def47b89d60a263bfbd3ea202e0964e --- /dev/null +++ b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/info/test/tests/data/jsons/menu-name.json @@ -0,0 +1,39 @@ +{ + "$schema": "https://raw.githubusercontent.com/conda/menuinst/refs/heads/main/menuinst/data/menuinst.schema.json", + "menu_name": "Package", + "menu_items": [ + { + "name": { + "target_environment_is_base": "A", + "target_environment_is_not_base": "A_not_in_base" + }, + "description": "This will echo environment variables for test purposes", + "icon": null, + "command": [ + "echo", + "A" + ], + "activate": false, + "platforms": { + "win": {}, + "linux": {}, + "osx": {} + } + }, + { + "name": "B", + "description": "This will echo environment variables for test purposes", + "icon": null, + "command": [ + "echo", + "B" + ], + "activate": false, + "platforms": { + "win": {}, + "linux": {}, + "osx": {} + } + } + ] +} diff --git a/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/info/test/tests/data/jsons/no-platforms.json b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/info/test/tests/data/jsons/no-platforms.json new file mode 100644 index 0000000000000000000000000000000000000000..6e5dad650a7442a42c42d0ff625f0551fda53107 --- /dev/null +++ b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/info/test/tests/data/jsons/no-platforms.json @@ -0,0 +1,17 @@ +{ + "$schema": "https://raw.githubusercontent.com/conda/menuinst/refs/heads/main/menuinst/data/menuinst.schema.json", + "menu_name": "NoPlatforms", + "menu_items": [ + { + "name": "NoPlatforms", + "description": "This won't install to any platform because the 'platforms' key is empty.", + "icon": null, + "command": [ + "python", + "-m", + "this" + ], + "platforms": {} + } + ] +} diff --git a/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/info/test/tests/data/jsons/osx_symlinks.json b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/info/test/tests/data/jsons/osx_symlinks.json new file mode 100644 index 0000000000000000000000000000000000000000..275fd19fd9722025981a177417d1d3642c40e38b --- /dev/null +++ b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/info/test/tests/data/jsons/osx_symlinks.json @@ -0,0 +1,23 @@ +{ + "$schema": "https://raw.githubusercontent.com/conda/menuinst/refs/heads/main/menuinst/data/menuinst.schema.json", + "menu_name": "Example with macOS symlinks", + "menu_items": [ + { + "name": "Example with symlinks on macOS", + "description": "This examples include symlinks on macOS, which require code signing.", + "icon": null, + "command": [ + "{{ MENU_ITEM_LOCATION }}/Contents/Resources/python", + "-c", + "import sys; print(sys.executable)" + ], + "platforms": { + "osx": { + "link_in_bundle": { + "{{ PREFIX }}/bin/python": "{{ MENU_ITEM_LOCATION }}/Contents/Resources/python" + } + } + } + } + ] +} diff --git a/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/info/test/tests/data/jsons/precommands.json b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/info/test/tests/data/jsons/precommands.json new file mode 100644 index 0000000000000000000000000000000000000000..d4561ecef7a9e07ea1c4928ae114685c3c6fcdad --- /dev/null +++ b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/info/test/tests/data/jsons/precommands.json @@ -0,0 +1,29 @@ +{ + "$schema": "https://raw.githubusercontent.com/conda/menuinst/refs/heads/main/menuinst/data/menuinst.schema.json", + "menu_name": "Example with precommands", + "menu_items": [ + { + "name": "Precommands", + "description": "This examples run some logic before activation.", + "icon": null, + "precommand": "export TEST_VAR=\"rhododendron and bees\"", + "command": [ + "echo", + "$TEST_VAR" + ], + "platforms": { + "win": { + "precommand": "set \"TEST_VAR=rhododendron and bees\"", + "command": [ + "echo", + "%TEST_VAR%>", + "__OUTPUT_FILE__" + ], + "description": "A space is needed after the > redirection, but if it's added in the same argument, it will trigger extra quoting that will break the syntax." + }, + "linux": {}, + "osx": {} + } + } + ] +} diff --git a/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/info/test/tests/data/jsons/sys-prefix.json b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/info/test/tests/data/jsons/sys-prefix.json new file mode 100644 index 0000000000000000000000000000000000000000..551f75e898ba967832fe61ddb6908b8b65c7b188 --- /dev/null +++ b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/info/test/tests/data/jsons/sys-prefix.json @@ -0,0 +1,31 @@ +{ + "$schema": "https://raw.githubusercontent.com/conda/menuinst/refs/heads/main/menuinst/data/menuinst.schema.json", + "menu_name": "Sys.Prefix {{ DISTRIBUTION_NAME }}", + "menu_items": [ + { + "name": "Sys.Prefix", + "description": "This will install to Windows and Linux with default options. MacOS has a custom option.", + "icon": null, + "command": [ + "{{ PYTHON }}", + "-c", + "import sys; print(sys.prefix)" + ], + "activate": false, + "platforms": { + "win": { + "command": [ + "{{ PYTHON }}", + "-c", + "import sys; f = open(r'__OUTPUT_FILE__', 'w'); f.write(sys.prefix); f.close()" + ], + "description": "Note how __OUTPUT_FILE__ is using raw-strings. Otherwise the backslashes are not properly escaped." + }, + "linux": {}, + "osx": { + "CFBundleName": "Sys Prefix" + } + } + } + ] +} diff --git a/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/info/test/tests/data/jsons/url_protocols.json b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/info/test/tests/data/jsons/url_protocols.json new file mode 100644 index 0000000000000000000000000000000000000000..af8f6c35ccd0d29ba4a9f27efcdfe40a4ea9a947 --- /dev/null +++ b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/info/test/tests/data/jsons/url_protocols.json @@ -0,0 +1,55 @@ +{ + "$schema": "https://raw.githubusercontent.com/conda/menuinst/refs/heads/main/menuinst/data/menuinst.schema.json", + "menu_name": "Example with file custom URL association", + "menu_items": [ + { + "name": "CustomURLAssociation", + "description": "Testing OS integrations with file types and custom URLs", + "icon": null, + "command": [ + "{{ PYTHON }}", + "-c", + "import sys, pathlib as p; p.Path(r'__OUTPUT_FILE__').write_text(sys.argv[1])" + ], + "platforms": { + "win": { + "command": [ + "{{ PYTHON }}", + "-c", + "import sys, pathlib as p; p.Path(r'__OUTPUT_FILE__').write_text(r'%1')" + ], + "url_protocols": [ + "menuinst" + ] + }, + "linux": { + "command": [ + "{{ PYTHON }}", + "-c", + "import sys, pathlib as p; p.Path(r'__OUTPUT_FILE__').write_text(r'%u')" + ], + "MimeType": [ + "x-scheme-handler/menuinst" + ] + }, + "osx": { + "command": [ + "bash", + "-c", + "nc -l 40256 > __OUTPUT_FILE__" + ], + "event_handler": "for i in 1 2 3 4 5; do echo \"$*\" | nc 127.0.0.1 40256 && break || sleep 1; done", + "CFBundleURLTypes": [ + { + "CFBundleURLName": "my-protocol-handler.menuinst", + "CFBundleURLSchemes": [ + "menuinst" + ] + } + ], + "CFBundleIdentifier": "org.conda.menuinst.url-protocol-example" + } + } + } + ] +} diff --git a/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/info/test/tests/data/jsons/windows-terminal.json b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/info/test/tests/data/jsons/windows-terminal.json new file mode 100644 index 0000000000000000000000000000000000000000..795e66b3ab8c9a0f390cd5771dced1ba701f39ba --- /dev/null +++ b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/info/test/tests/data/jsons/windows-terminal.json @@ -0,0 +1,37 @@ +{ + "$schema": "https://raw.githubusercontent.com/conda/menuinst/refs/heads/main/menuinst/data/menuinst.schema.json", + "menu_name": "Package", + "menu_items": [ + { + "name": "A", + "description": "Package A", + "icon": null, + "activate": false, + "command": [ + "testcommand_a.exe" + ], + "platforms": { + "win": { + "desktop": false, + "quicklaunch": false, + "terminal_profile": "A Terminal" + } + } + }, + { + "name": "B", + "description": "Package B", + "icon": null, + "activate": false, + "command": [ + "testcommand_b.exe" + ], + "platforms": { + "win": { + "desktop": false, + "quicklaunch": false + } + } + } + ] +} diff --git a/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/info/test/tests/data/jsons/working-dir.json b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/info/test/tests/data/jsons/working-dir.json new file mode 100644 index 0000000000000000000000000000000000000000..095131f243fae8851635467200ee0501289823fb --- /dev/null +++ b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/info/test/tests/data/jsons/working-dir.json @@ -0,0 +1,35 @@ +{ + "$schema": "https://raw.githubusercontent.com/conda/menuinst/refs/heads/main/menuinst/data/menuinst.schema.json", + "menu_name": "Sys.Prefix {{ DISTRIBUTION_NAME }}", + "menu_items": [ + { + "name": "Sys.Prefix", + "description": "This will install to Windows and Linux with default options. MacOS has a custom option.", + "icon": null, + "command": [ + "{{ PYTHON }}", + "-c", + "import sys; print(sys.prefix)" + ], + "activate": false, + "platforms": { + "win": { + "command": [ + "{{ PYTHON }}", + "-c", + "import sys; f = open(r'__OUTPUT_FILE__', 'w'); f.write(sys.prefix); f.close()" + ], + "description": "Note how __OUTPUT_FILE__ is using raw-strings. Otherwise the backslashes are not properly escaped.", + "working_dir": "%TEMP%/working_dir_test" + }, + "linux": { + "working_dir": "${TMP}/working_dir_test" + }, + "osx": { + "CFBundleName": "Sys Prefix", + "working_dir": "${TMPDIR}/working_dir_test" + } + } + } + ] +} diff --git a/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/info/test/tests/data/pkgs/package_1/LICENSE b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/info/test/tests/data/pkgs/package_1/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..f178eaa4b2d1eff7bcf08035c6b058a697fc90e6 --- /dev/null +++ b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/info/test/tests/data/pkgs/package_1/LICENSE @@ -0,0 +1,26 @@ +Copyright 2021, Jaime Rodríguez-Guerra + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation and/or +other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its contributors +may be used to endorse or promote products derived from this software without +specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/info/test/tests/data/pkgs/package_1/menu.json b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/info/test/tests/data/pkgs/package_1/menu.json new file mode 100644 index 0000000000000000000000000000000000000000..4f60052b23a42928df392ca98fe5b54cf0a4c49b --- /dev/null +++ b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/info/test/tests/data/pkgs/package_1/menu.json @@ -0,0 +1,53 @@ +{ + "$schema": "https://json-schema.org/draft-07/schema", + "$id": "https://schemas.conda.io/menuinst-1.schema.json", + "menu_name": "Package 1", + "menu_items": [ + { + "name": "A", + "description": "This will echo environment variables for test purposes", + "icon": null, + "command": [ + "echo", + "${CONDA_PREFIX:-N/A}" + ], + "platforms": { + "win": { + "terminal": true, + "command": [ + "cmd", + "/V:ON", + "/C", + "echo", + "!CONDA_PREFIX!" + ] + }, + "linux": {}, + "osx": {} + } + }, + { + "name": "B", + "description": "This one does not preactivate the environment", + "icon": null, + "command": [ + "echo", + "${CONDA_PREFIX:-N/A}" + ], + "activate": false, + "platforms": { + "win": { + "command": [ + "cmd", + "/V:ON", + "/C", + "echo", + "!CONDA_PREFIX!" + ] + }, + "linux": {}, + "osx": {} + } + } + ] +} diff --git a/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/info/test/tests/data/pkgs/package_1/meta.yaml b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/info/test/tests/data/pkgs/package_1/meta.yaml new file mode 100644 index 0000000000000000000000000000000000000000..0b71d30db352fa48afe2000eecfb318b7ef73d4e --- /dev/null +++ b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/info/test/tests/data/pkgs/package_1/meta.yaml @@ -0,0 +1,27 @@ +package: + name: package_1 + version: "0.1" + +source: + path: "." + +build: + noarch: generic + number: 0 + script: + - mkdir {{ PREFIX }}/Menu # [unix] + - cp {{ RECIPE_DIR }}/menu.json {{ PREFIX }}/Menu/package_1.json # [unix] + +requirements: + host: + - xz +test: + commands: + - test -f ${CONDA_PREFIX}/Menu/package_1.json # [unix] + +about: + home: http://github.com/conda/menuinst + license: BSD-3-Clause + license_family: BSD + license_file: LICENSE + summary: a test package for menuinst diff --git a/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/info/test/tests/requirements.txt b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/info/test/tests/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..b8bb8893201ce6af031f4abea19cedd62be21a39 --- /dev/null +++ b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/info/test/tests/requirements.txt @@ -0,0 +1,11 @@ +python +pip +conda +# see https://github.com/conda/conda/issues/15287 +conda-libmamba-solver>=25.4.0 +pydantic>=2 +pytest +pytest-cov +pytest-mock +hypothesis +hypothesis-jsonschema diff --git a/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/info/test/tests/test_api.py b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/info/test/tests/test_api.py new file mode 100644 index 0000000000000000000000000000000000000000..d704215e173711a985ad617d2eecf78f92d7542f --- /dev/null +++ b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/info/test/tests/test_api.py @@ -0,0 +1,527 @@ +"""""" + +import json +import os +import plistlib +import shlex +import subprocess +import sys +import warnings +from pathlib import Path +from tempfile import NamedTemporaryFile, mkdtemp +from time import sleep, time +from typing import Iterable, Tuple +from xml.etree import ElementTree + +import pytest +from conftest import DATA, PLATFORM + +from menuinst.api import install, remove +from menuinst.platforms import Menu, MenuItem +from menuinst.platforms.osx import _lsregister +from menuinst.utils import DEFAULT_PREFIX, logged_run, slugify, user_is_admin + + +def _poll_for_file_contents(path, timeout=30): + t0 = time() + while not os.path.isfile(path): + sleep(1) + if time() >= t0 + timeout / 2: + raise RuntimeError(f"Timeout. File '{path}' was not created!") + + out = "" + while not (out := Path(path).read_text()): + sleep(1) + if time() >= t0 + timeout: + raise RuntimeError(f"Timeout. File '{path}' was empty!") + return out + + +def check_output_from_shortcut( + delete_files, + json_path, + remove_after=True, + expected_output=None, + action="run_shortcut", + file_to_open=None, + url_to_open=None, +) -> Tuple[Path, Iterable[Path], Path, str]: + assert action in ("run_shortcut", "open_file", "open_url", None) + + output = None + output_file = None + abs_json_path = DATA / "jsons" / json_path + contents = abs_json_path.read_text() + if "__OUTPUT_FILE__" in contents: + with NamedTemporaryFile(suffix=json_path, mode="w", delete=False) as tmp: + output_file = str(Path(tmp.name).resolve()) + ".out" + contents = contents.replace("__OUTPUT_FILE__", output_file.replace("\\", "\\\\")) + tmp.write(contents) + abs_json_path = tmp.name + delete_files.append(abs_json_path) + + tmp_base_path = mkdtemp() + delete_files.append(tmp_base_path) + (Path(tmp_base_path) / ".nonadmin").touch() + paths = install(abs_json_path, base_prefix=tmp_base_path) + try: + if action == "run_shortcut": + if PLATFORM == "win": + lnk = next(p for p in paths if p.suffix == ".lnk") + assert lnk.is_file() + os.startfile(lnk) + output = _poll_for_file_contents(output_file) + else: + if PLATFORM == "linux": + desktop = next(p for p in paths if p.suffix == ".desktop") + with open(desktop) as f: + for line in f: + if line.startswith("Exec="): + cmd = shlex.split(line.split("=", 1)[1].strip()) + break + else: + raise ValueError("Didn't find Exec line") + elif PLATFORM == "osx": + app_location = paths[0] + executable = next( + p + for p in (app_location / "Contents" / "MacOS").iterdir() + if not p.name.endswith("-script") + ) + cmd = [str(executable)] + process = logged_run(cmd, check=True) + output = process.stdout + elif action is not None: + if action == "open_file": + assert file_to_open is not None + with NamedTemporaryFile(suffix=file_to_open, delete=False) as f: + # file cannot be empty; otherwise mimetype detection fails on Linux + f.write(b"1234") + delete_files.append(f.name) + arg = f.name + elif action == "open_url": + assert url_to_open is not None + arg = url_to_open + app_location = paths[0] + cmd = { + "linux": ["xdg-open"], + "osx": ["open"], + "win": ["cmd", "/C", "start"], + }[PLATFORM] + process = logged_run([*cmd, arg], check=True) + output = _poll_for_file_contents(output_file) + finally: + if paths: + delete_files += list(paths) + if remove_after: + remove(abs_json_path, base_prefix=tmp_base_path) + if PLATFORM == "osx" and action in ("open_file", "open_url"): + _lsregister( + "-kill", + "-r", + "-domain", + "local", + "-domain", + "user", + "-domain", + "system", + ) + sleep(5) + if "menuinst" in _lsregister("-dump", log=False).stdout: + warnings.warn( + "menuinst still registered with LaunchServices! " + "This usually fixes itself after a couple minutes. " + "Run '/System/Library/Frameworks/CoreServices.framework/Frameworks/" + "LaunchServices.framework/Support/lsregister -dump | grep menuinst' " + "to double check." + ) + + if expected_output is not None: + assert output.strip() == expected_output + + return abs_json_path, paths, tmp_base_path, output + + +def test_install_prefix(delete_files): + check_output_from_shortcut(delete_files, "sys-prefix.json", expected_output=sys.prefix) + + +def test_install_remove(tmp_path, delete_files): + metadata = DATA / "jsons" / "sys-prefix.json" + (tmp_path / ".nonadmin").touch() + paths = set(install(metadata, target_prefix=tmp_path, base_prefix=tmp_path, _mode="user")) + delete_files.extend(paths) + files_found = set(filter(lambda x: x.exists(), paths)) + assert files_found == paths + if PLATFORM != "osx": + metadata_2 = json.loads(metadata.read_text()) + metadata_2["menu_items"][0]["name"] = "Sys.Prefix.2" + paths_2 = set( + install(metadata_2, target_prefix=tmp_path, base_prefix=tmp_path, _mode="user") + ) + delete_files.extend(paths_2) + files_found = set(filter(lambda x: x.exists(), paths_2.union(paths))) + assert files_found == paths_2.union(paths) + remove(metadata_2, target_prefix=tmp_path, base_prefix=tmp_path, _mode="user") + files_found = set(filter(lambda x: x.exists(), paths_2.union(paths))) + assert files_found == paths + remove(metadata, target_prefix=tmp_path, base_prefix=tmp_path, _mode="user") + files_found = set(filter(lambda x: x.exists(), paths)) + assert files_found == set() + + +def test_remove_for_user_as_admin(tmp_path, delete_files, monkeypatch): + from menuinst import api as menuinst_api + from menuinst import utils as menuinst_utils + + metadata = DATA / "jsons" / "sys-prefix.json" + # Ensure that we install as user + monkeypatch.setattr(menuinst_utils, "user_is_admin", lambda: False) + (tmp_path / ".nonadmin").touch() + paths = set(install(metadata, target_prefix=tmp_path, base_prefix=tmp_path)) + delete_files.extend(paths) + files_found = set(filter(lambda x: x.exists(), paths)) + assert files_found == paths + + # Ensure that menuinst thinks we uninstall as admin + monkeypatch.setattr(menuinst_utils, "user_is_admin", lambda: True) + monkeypatch.setattr(menuinst_api, "user_is_admin", lambda: True) + remove(metadata, target_prefix=tmp_path, base_prefix=tmp_path) + files_found = set(filter(lambda x: x.exists(), paths)) + assert files_found == set() + + +def test_overwrite_existing_shortcuts(delete_files, caplog): + """Test that overwriting shortcuts works without errors by running installation twice.""" + check_output_from_shortcut( + delete_files, + "precommands.json", + remove_after=False, + ) + if PLATFORM == "osx": + with pytest.raises(RuntimeError): + check_output_from_shortcut( + delete_files, + "precommands.json", + remove_after=True, + ) + else: + caplog.clear() + check_output_from_shortcut( + delete_files, + "precommands.json", + remove_after=True, + ) + assert any(line.startswith("Overwriting existing") for line in caplog.messages) + + +@pytest.mark.skipif(PLATFORM == "osx", reason="No menu names on MacOS") +def test_placeholders_in_menu_name(tmp_path, delete_files): + _, paths, tmp_base_path, _ = check_output_from_shortcut( + delete_files, + "sys-prefix.json", + expected_output=sys.prefix, + remove_after=False, + ) + if PLATFORM == "win": + for path in paths: + if path.suffix == ".lnk" and path.parent.parent.name == "start": + assert path.parent.name == f"Sys.Prefix {Path(tmp_base_path).name}" + break + else: + raise AssertionError("Didn't find Start Menu") + elif PLATFORM == "linux": + if user_is_admin(): + if os.environ.get("CI"): + config_directory = Path("/etc/xdg") + data_directory = Path("/usr/share") + else: + config_directory = tmp_path / "system" / "config" + data_directory = tmp_path / "system" / "data" + else: + config_directory = Path(os.environ.get("XDG_CONFIG_HOME", "~/.config")).expanduser() + data_directory = Path(os.environ.get("XDG_DATA_HOME", "~/.local/share")).expanduser() + desktop_directory = data_directory / "desktop-directories" + menu_config_location = ( + config_directory + / "menus" + / f"{os.environ.get('XDG_MENU_PREFIX', '')}applications.menu" + ) + rendered_name = f"Sys.Prefix {Path(tmp_base_path).name}" + slugified_name = slugify(rendered_name) + + entry_file = desktop_directory / f"{slugified_name}.directory" + assert entry_file.exists() + entry = entry_file.read_text().splitlines() + assert f"Name={rendered_name}" in entry + + tree = ElementTree.parse(menu_config_location) + root = tree.getroot() + assert rendered_name in [elt.text for elt in root.findall("Menu/Name")] + assert f"{slugified_name}.directory" in [ + elt.text for elt in root.findall("Menu/Directory") + ] + assert rendered_name in [elt.text for elt in root.findall("Menu/Include/Category")] + + +def test_precommands(delete_files): + check_output_from_shortcut( + delete_files, "precommands.json", expected_output="rhododendron and bees" + ) + + +@pytest.mark.skipif(PLATFORM != "osx", reason="macOS only") +def test_entitlements(delete_files): + json_path, paths, *_ = check_output_from_shortcut( + delete_files, "entitlements.json", remove_after=False, expected_output="entitlements" + ) + # verify signature + app_dir = next(p for p in paths if p.name.endswith(".app")) + subprocess.check_call(["/usr/bin/codesign", "--verbose", "--verify", str(app_dir)]) + + launcher = next( + p for p in (app_dir / "Contents" / "MacOS").iterdir() if not p.name.endswith("-script") + ) + subprocess.check_call(["/usr/bin/codesign", "--verbose", "--verify", str(launcher)]) + + for path in app_dir.rglob("Info.plist"): + plist = plistlib.loads(path.read_bytes()) + assert plist + assert "entitlements" not in plist + break + else: + raise AssertionError("Didn't find Info.plist") + + for path in app_dir.rglob("Entitlements.plist"): + plist = plistlib.loads(path.read_bytes()) + assert plist + break + else: + raise AssertionError("Didn't find Entitlements.plist") + + remove(json_path) + + +@pytest.mark.skipif(PLATFORM != "osx", reason="macOS only") +def test_no_entitlements_no_signature(delete_files): + json_path, paths, *_ = check_output_from_shortcut( + delete_files, "sys-prefix.json", remove_after=False, expected_output=sys.prefix + ) + app_dir = next(p for p in paths if p.name.endswith(".app")) + launcher = next( + p for p in (app_dir / "Contents" / "MacOS").iterdir() if not p.name.endswith("-script") + ) + with pytest.raises(subprocess.CalledProcessError): + subprocess.check_call(["/usr/bin/codesign", "--verbose", "--verify", str(app_dir)]) + with pytest.raises(subprocess.CalledProcessError): + subprocess.check_call(["/usr/bin/codesign", "--verbose", "--verify", str(launcher)]) + remove(json_path) + + +@pytest.mark.skipif(PLATFORM != "osx", reason="macOS only") +def test_info_plist(delete_files): + json_path, paths, *_ = check_output_from_shortcut( + delete_files, "entitlements.json", remove_after=False, expected_output="entitlements" + ) + metadata = json.loads(json_path.read_text()) + menu_item = next((item for item in metadata.get("menu_items", [])), None) + assert menu_item + plist_data = menu_item.get("platforms", {}).get("osx", {}) + assert plist_data + assert "info_plist_extra" in plist_data + for key, val in plist_data["info_plist_extra"].items(): + plist_data[key] = val + del plist_data["info_plist_extra"] + app_dir = next(p for p in paths if p.name.endswith(".app")) + + missing_items = [] + incorrect_items = {} + for path in app_dir.rglob("Info.plist"): + plist = plistlib.loads(path.read_bytes()) + assert plist + for key, value in plist_data.items(): + if key == "entitlements": + continue + if key not in plist: + missing_items.append(key) + elif plist[key] != value: + incorrect_items[key] = {"expected": value, "found": plist[key]} + break + else: + raise AssertionError("Didn't find file") + + assert missing_items == [] + assert incorrect_items == {} + + remove(json_path) + + +@pytest.mark.skipif(PLATFORM != "osx", reason="macOS only") +def test_info_plist_duplicate(): + menu = Menu("") + menu_item = MenuItem( + menu, + { + "name": "plist_duplicate", + "command": [], + "platforms": { + "osx": { + "LSBackgroundOnly": False, + "info_plist_extra": { + "LSBackgroundOnly": True, + }, + }, + }, + }, + ) + with pytest.raises(ValueError): + menu_item.create() + + +@pytest.mark.skipif(PLATFORM != "osx", reason="macOS only") +def test_osx_symlinks(delete_files): + json_path, paths, _, output = check_output_from_shortcut( + delete_files, "osx_symlinks.json", remove_after=False + ) + app_dir = next(p for p in paths if p.name.endswith(".app")) + symlinked_python = app_dir / "Contents" / "Resources" / "python" + assert output.strip() == str(symlinked_python) + assert symlinked_python.resolve() == (Path(DEFAULT_PREFIX) / "bin" / "python").resolve() + remove(json_path) + + +def _dump_ls_services(): + lsservicesplist = Path( + os.environ["HOME"], + "Library/Preferences/com.apple.LaunchServices/com.apple.launchservices.secure.plist", + ) + plist = plistlib.loads(lsservicesplist.read_bytes()) + print(json.dumps(plist, indent=2)) + + +@pytest.mark.skipif("CI" not in os.environ, reason="Only run on CI. Export CI=1 to run locally.") +def test_file_type_association(delete_files): + test_file = "test.menuinst" + *_, output = check_output_from_shortcut( + delete_files, + "file_types.json", + action="open_file", + file_to_open=test_file, + ) + assert output.strip().endswith(test_file) + + +@pytest.mark.skipif(sys.platform != "darwin", reason="Only run on macOS") +@pytest.mark.skipif("CI" not in os.environ, reason="Only run on CI. Export CI=1 to run locally.") +def test_file_type_association_no_event_handler(delete_files, request): + test_file = "test.menuinst-no-event-handler" + abs_json_path, paths, tmp_base_path, _ = check_output_from_shortcut( + delete_files, + "file_types_no_event_handler.json", + action=None, + file_to_open=test_file, + remove_after=False, + ) + request.addfinalizer(lambda: remove(abs_json_path, base_prefix=tmp_base_path)) + app_dir = next(p for p in paths if p.name.endswith(".app")) + info = app_dir / "Contents" / "Info.plist" + plist = plistlib.loads(info.read_bytes()) + cf_bundle_type_name = "org.conda.menuinst.filetype-example-no-event-handler" + assert plist["CFBundleDocumentTypes"][0]["CFBundleTypeName"] == cf_bundle_type_name + + +@pytest.mark.skipif("CI" not in os.environ, reason="Only run on CI. Export CI=1 to run locally.") +def test_url_protocol_association(delete_files): + url = "menuinst://test/" + check_output_from_shortcut( + delete_files, + "url_protocols.json", + action="open_url", + url_to_open=url, + expected_output=url, + ) + + +@pytest.mark.skipif(PLATFORM != "win", reason="Windows only") +def test_windows_terminal_profiles(tmp_path, run_as_user): + settings_file = Path( + tmp_path, "user", "localappdata", "Microsoft", "Windows Terminal", "settings.json" + ) + settings_file.parent.mkdir(parents=True) + (tmp_path / ".nonadmin").touch() + metadata_file = DATA / "jsons" / "windows-terminal.json" + install(metadata_file, target_prefix=tmp_path, base_prefix=tmp_path) + try: + settings = json.loads(settings_file.read_text()) + profiles = { + profile.get("name", ""): profile.get("commandline", "") + for profile in settings.get("profiles", {}).get("list", []) + } + assert profiles.get("A Terminal") == "testcommand_a.exe" + assert "B" not in profiles + except Exception as exc: + remove(metadata_file, target_prefix=tmp_path, base_prefix=tmp_path) + raise exc + else: + remove(metadata_file, target_prefix=tmp_path, base_prefix=tmp_path) + + +@pytest.mark.parametrize("target_env_is_base", (True, False)) +def test_name_dictionary(target_env_is_base): + tmp_base_path = mkdtemp() + tmp_target_path = tmp_base_path if target_env_is_base else mkdtemp() + (Path(tmp_base_path) / ".nonadmin").touch() + if not target_env_is_base: + (Path(tmp_target_path) / ".nonadmin").touch() + abs_json_path = DATA / "jsons" / "menu-name.json" + menu_items = install(abs_json_path, target_prefix=tmp_target_path, base_prefix=tmp_base_path) + try: + if PLATFORM == "linux": + expected = { + "package_a" if target_env_is_base else "package_a-not-in-base", + "package_b", + "package", + } + else: + expected = { + "A" if target_env_is_base else "A_not_in_base", + "B", + } + if PLATFORM == "win": + expected.update(["Package"]) + item_names = {item.stem for item in menu_items} + assert item_names == expected + finally: + remove(abs_json_path, target_prefix=tmp_target_path, base_prefix=tmp_base_path) + + +def test_vars_in_working_dir(tmp_path, monkeypatch, delete_files): + if PLATFORM == "win": + expected_directory = Path(os.environ["TEMP"], "working_dir_test") + elif PLATFORM == "osx": + expected_directory = Path(os.environ["TMPDIR"], "working_dir_test") + else: + # Linux often does not have an environment variable for the tmp directory + monkeypatch.setenv("TMP", "/tmp") + expected_directory = Path("/tmp/working_dir_test") + delete_files.append(expected_directory) + datafile = str(DATA / "jsons" / "working-dir.json") + try: + install(datafile, base_prefix=tmp_path, target_prefix=tmp_path) + assert expected_directory.exists() + finally: + remove(datafile, base_prefix=tmp_path, target_prefix=tmp_path) + + +def test_platforms(): + menu_item = MenuItem( + None, + { + "name": "", + "command": [], + "platforms": {"win": {}, "linux": None}, + }, + ) + assert menu_item.enabled_for_platform("win32") + assert not menu_item.enabled_for_platform("linux") + assert not menu_item.enabled_for_platform("darwin") diff --git a/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/info/test/tests/test_backwards_compatibility.py b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/info/test/tests/test_backwards_compatibility.py new file mode 100644 index 0000000000000000000000000000000000000000..429fa51a7fc50669497b2761d93d2c86b767ee53 --- /dev/null +++ b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/info/test/tests/test_backwards_compatibility.py @@ -0,0 +1,37 @@ +import os + +import pytest +from conftest import DATA, LEGACY + +if os.name != "nt": + pytest.skip("Windows only", allow_module_level=True) + + +def test_import_paths(): + """Imports used by conda <=23.7.2. Ensure they still work.""" + from menuinst.knownfolders import FOLDERID, get_folder_path # noqa: F401 + from menuinst.win32 import dirs_src # noqa: F401 + from menuinst.win_elevate import isUserAdmin, runAsAdmin # noqa: F401 + from menuinst.winshortcut import create_shortcut # noqa: F401 + + import menuinst._legacy.cwp # noqa: F401 + import menuinst._legacy.main # noqa: F401 + import menuinst._legacy.utils # noqa: F401 + import menuinst._legacy.win32 # noqa: F401 + from menuinst import install # noqa: F401 + + +@pytest.mark.skipif("CI" not in os.environ, reason="Only run on CI. Export CI=1 to run locally.") +@pytest.mark.parametrize( + "json_path", + [ + pytest.param(str(DATA / "jsons" / "sys-prefix.json"), id="v2"), + pytest.param(str(LEGACY / "sys-prefix.json"), id="v1"), + ], +) +def test_install_prefix_compat(tmp_path, json_path): + from menuinst.api import _install_adapter + + (tmp_path / ".nonadmin").touch() + _install_adapter(json_path, prefix=str(tmp_path)) + _install_adapter(json_path, remove=True, prefix=str(tmp_path)) diff --git a/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/info/test/tests/test_cli.py b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/info/test/tests/test_cli.py new file mode 100644 index 0000000000000000000000000000000000000000..2279fd5500fbf3b0d04c8e4c5396ebf2c4b7c0a1 --- /dev/null +++ b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/info/test/tests/test_cli.py @@ -0,0 +1,116 @@ +from __future__ import annotations + +import json +from typing import TYPE_CHECKING + +import pytest +from conftest import DATA + +from menuinst.api import install, remove +from menuinst.cli import main as menuinst_main + +if TYPE_CHECKING: + from pathlib import Path + + +def _setup_menu_directory(prefix: Path) -> dict[str, set[Path]]: + packages = { + "sys-prefix": "sys-prefix.json", + "menu": "sys-prefix-menu_menu.json", + "suffix": "sys-prefix_suffix.json", + } + source = DATA / "jsons" / "sys-prefix.json" + metadata = json.loads(source.read_text()) + menu_dir = prefix / "Menu" + menu_dir.mkdir(exist_ok=True, parents=True) + menu_files = {} + for package, dest in packages.items(): + metadata_package = metadata.copy() + metadata_package["menu_items"][0]["name"] += f"_{package}" + dest_path = menu_dir / dest + dest_path.write_text(json.dumps(metadata_package)) + # The CLI uses _install_adapter (which returns None) to be compatible with v1 shortcuts. + # So, use installing and removing as a workaround to detect expected files. + paths = set(install(dest_path, target_prefix=prefix, base_prefix=prefix, _mode="user")) + menu_files[package] = paths + files_found = set(filter(lambda x: x.exists(), paths)) + assert files_found == paths + remove(dest_path, target_prefix=prefix, base_prefix=prefix, _mode="user") + files_found = set(filter(lambda x: x.exists(), paths)) + assert files_found == set() + return menu_files + + +def test_cli_packages(tmp_path: Path, delete_files: list[Path], run_as_user: None): + (tmp_path / ".nonadmin").touch() + menu_files = _setup_menu_directory(tmp_path) + for files in menu_files.values(): + delete_files.extend(files) + # The delete_files fixture contains all expected files + expected_files = set(delete_files) + + menuinst_main( + ["--install", "sys-prefix", "--prefix", str(tmp_path), "--root-prefix", str(tmp_path)] + ) + files_found = set(filter(lambda x: x.exists(), expected_files)) + assert files_found == menu_files["sys-prefix"] + menuinst_main( + [ + "--install", + "sys-prefix-menu", + "sys-prefix_suffix.json", + "--prefix", + str(tmp_path), + "--root-prefix", + str(tmp_path), + ] + ) + files_found = set(filter(lambda x: x.exists(), expected_files)) + assert files_found == expected_files + menuinst_main( + [ + "--remove", + "sys-prefix-menu", + "sys-prefix_suffix.json", + "--prefix", + str(tmp_path), + "--root-prefix", + str(tmp_path), + ] + ) + files_found = set(filter(lambda x: x.exists(), expected_files)) + assert files_found == menu_files["sys-prefix"] + menuinst_main( + ["--remove", "sys-prefix", "--prefix", str(tmp_path), "--root-prefix", str(tmp_path)] + ) + files_found = set(filter(lambda x: x.exists(), expected_files)) + assert files_found == set() + + +def test_cli_all(tmp_path: Path, delete_files: list[Path], run_as_user: None) -> None: + (tmp_path / ".nonadmin").touch() + menu_files = _setup_menu_directory(tmp_path) + for files in menu_files.values(): + delete_files.extend(files) + # The delete_files fixture contains all expected files + expected_files = set(delete_files) + + menuinst_main(["--install", "--prefix", str(tmp_path), "--root-prefix", str(tmp_path)]) + files_found = set(filter(lambda x: x.exists(), expected_files)) + assert files_found == expected_files + menuinst_main(["--remove", "--prefix", str(tmp_path), "--root-prefix", str(tmp_path)]) + files_found = set(filter(lambda x: x.exists(), expected_files)) + assert files_found == set() + + +@pytest.mark.parametrize( + "argv", + ( + pytest.param(["--install"], id="prefix missing"), + pytest.param(["--prefix", "/tmp/somewhere"], id="install/remove missing"), + ), +) +def test_cli_errors(argv: list[str]) -> None: + with pytest.raises(SystemExit) as exc: + menuinst_main(argv) + assert exc.value.code == 2 diff --git a/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/info/test/tests/test_conda.py b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/info/test/tests/test_conda.py new file mode 100644 index 0000000000000000000000000000000000000000..be21554a7f8dba208aa900e15961e49b90e0c4fd --- /dev/null +++ b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/info/test/tests/test_conda.py @@ -0,0 +1,178 @@ +""" +Integration tests with conda +""" + +import json +import os +import sys +from contextlib import contextmanager +from pathlib import Path +from subprocess import check_output +from tempfile import NamedTemporaryFile + +import pytest +from conda.models.version import VersionOrder +from conftest import BASE_PREFIX, DATA, PLATFORM + +from menuinst._schema import validate +from menuinst.platforms import Menu, MenuItem + +ENV_VARS = { + k: v + for (k, v) in os.environ.copy().items() + if not k.startswith(("CONDA", "_CONDA", "MAMBA", "_MAMBA")) +} +ENV_VARS["CONDA_VERBOSITY"] = "3" + +pytest_plugins = ["conda.testing.fixtures"] + + +@contextmanager +def new_environment(tmpdir, conda_cli, *packages): + try: + prefix = str(tmpdir / "prefix") + print("--- CREATING", prefix, "---") + stdout, stderr, retcode = conda_cli( + "create", "-p", prefix, "-y", "--offline", *[str(p) for p in packages] + ) + assert not retcode + for stream in (stdout, stderr): + if "menuinst Exception" in stream: + raise RuntimeError( + f"Creation command exited with 0 but stdout contained exception:\n{stream}" + ) + + yield prefix + finally: + print("--- REMOVING", prefix, "---") + stdout, stderr, retcode = conda_cli("remove", "-p", prefix, "--offline", "--all", "-y") + assert not retcode + for stream in (stdout, stderr): + if "menuinst Exception" in stream: + raise RuntimeError( + f"Deletion Command exited with 0 but stdout contained exception:\n{stream}" + ) + + +@contextmanager +def install_package_1(tmpdir, conda_cli): + """ + This package is shipped with the test data and contains two menu items. + + Both will echo the `CONDA_PREFIX` environment variable. However, the + first one preactivates the environment, while the second does not. This + means that the first shortcut will successfully echo the prefix path, + while the second one will be empty (Windows) or "N/A" (Unix). + """ + with new_environment( + tmpdir, conda_cli, DATA / "pkgs" / "noarch" / "package_1-0.1-0.tar.bz2" + ) as prefix: + menu_file = Path(prefix) / "Menu" / "package_1.json" + with open(menu_file) as f: + meta = json.load(f) + assert len(meta["menu_items"]) == 2 + assert menu_file.is_file() + yield prefix, menu_file + assert not menu_file.is_file() + + +def test_conda_recent_enough(): + data = json.loads(check_output([sys.executable, "-I", "-m", "conda", "info", "--json"])) + assert VersionOrder(data["conda_version"]) >= VersionOrder("4.12a0") + + +@pytest.mark.skipif(PLATFORM != "linux", reason="Linux only") +def test_package_1_linux(tmpdir, conda_cli): + applications_menu = ( + Path(tmpdir) + / "config" + / "menus" + / f"{os.environ.get('XDG_MENU_PREFIX', '')}applications.menu" + ) + if applications_menu.is_file(): + original_xml = applications_menu.read_text() + else: + original_xml = None + with install_package_1(tmpdir, conda_cli) as (prefix, menu_file): + meta = validate(menu_file) + menu = Menu(meta.menu_name, str(prefix), BASE_PREFIX) + menu_items = [item.dict() for item in meta.menu_items] + items = [menu] + + # First case, activation is on, output should be the prefix path + # Second case, activation is off, output should be N/A + for item, expected_output in zip(menu_items, (str(prefix), "N/A")): + item = MenuItem(menu, item) + items.append(item) + command = item._command() + print(command) + print("-----") + output = check_output(command, shell=True, universal_newlines=True, env=ENV_VARS) + assert output.strip() == expected_output + + assert not Path(prefix).exists() + for item in items: + for path in item._paths(): + assert not path.exists() + + if original_xml: + assert original_xml == applications_menu.read_text() + + +@pytest.mark.skipif(PLATFORM != "osx", reason="MacOS only") +def test_package_1_osx(tmpdir, conda_cli): + with install_package_1(tmpdir, conda_cli) as (prefix, menu_file): + meta = validate(menu_file) + menu_items = [item.dict() for item in meta.menu_items] + menu = Menu(meta.menu_name, str(prefix), BASE_PREFIX) + items = [menu] + # First case, activation is on, output should be the prefix path + # Second case, activation is off, output should be N/A + for item, expected_output in zip(menu_items, (str(prefix), "N/A")): + item = MenuItem(menu, item) + items.append(item) + script = item._write_script( + script_path=NamedTemporaryFile(suffix=".sh", delete=False).name + ) + print(item._command()) + print("-------------") + output = check_output(["bash", script], universal_newlines=True, env=ENV_VARS) + Path(script).unlink() + assert output.strip() == expected_output + + assert not Path(prefix).exists() + for item in items: + for path in item._paths(): + assert not path.exists() + + +@pytest.mark.skipif(PLATFORM != "win", reason="Windows only") +def test_package_1_windows(tmpdir, conda_cli): + with install_package_1(tmpdir, conda_cli) as (prefix, menu_file): + meta = validate(menu_file) + menu = Menu(meta.menu_name, str(prefix), BASE_PREFIX) + menu_items = [item.dict() for item in meta.menu_items] + items = [menu] + # First case, activation is on, output should be the prefix path + # Second case, activation is off, output should be empty + for item, expected_output in zip(menu_items, (str(prefix), "!CONDA_PREFIX!")): + item = MenuItem(menu, item) + items.append(item) + script = item._write_script( + script_path=NamedTemporaryFile(suffix=".bat", delete=False).name + ) + print(item._command()) + print("-------------") + output = check_output( + ["cmd.exe", "/C", f"conda deactivate && conda deactivate && {script}"], + universal_newlines=True, + env=ENV_VARS, + ) + Path(script).unlink() + output = output.replace("ECHO is off.", "") + assert output.splitlines()[0].strip() == expected_output + + assert not Path(prefix).exists() + for item in items: + for path in item._paths(): + assert not path.exists() diff --git a/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/info/test/tests/test_conda_plugin.py b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/info/test/tests/test_conda_plugin.py new file mode 100644 index 0000000000000000000000000000000000000000..66f6ddefc4d1936a796afbb231049b72cf053b0a --- /dev/null +++ b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/info/test/tests/test_conda_plugin.py @@ -0,0 +1,79 @@ +from __future__ import annotations + +import shutil +from typing import TYPE_CHECKING + +import pytest +from conda.base.context import context +from conftest import DATA + +from menuinst.api import install, remove +from menuinst.conda_plugin import conda_subcommands + +if TYPE_CHECKING: + from pathlib import Path + + from conda.testing.fixtures import CondaCLIFixture, TmpEnvFixture + + +def test_subcommands_hook() -> None: + subcommands = list(conda_subcommands()) + assert len(subcommands) == 1 + assert subcommands[0].name == "menuinst" + assert "menuinst" in context.plugin_manager.get_subcommands() + + +def test_subcommand_menuinst(conda_cli: CondaCLIFixture) -> None: + with pytest.raises(SystemExit) as exc: + stdout, stderr, errorcode = conda_cli("menuinst", "--help") + assert stdout + assert not stderr + assert not errorcode + assert exc.value.code == 0 + + +@pytest.mark.parametrize("prefix_method", ("prefix", "name", "envvar")) +def test_plugin_install_remove( + conda_cli: CondaCLIFixture, + tmp_env: TmpEnvFixture, + monkeypatch: pytest.MonkeyPatch, + prefix_method: str, + delete_files: list[Path], +): + with tmp_env() as prefix: + if prefix_method == "prefix": + prefix_cmd = ["-p", str(prefix)] + elif prefix_method == "name": + # The temporary environment becomes the base environment + prefix_cmd = ["-n", "base"] + else: + prefix_cmd = [] + monkeypatch.setenv("CONDA_PREFIX", str(prefix)) + menu_dir = prefix / "Menu" + menu_dir.mkdir(exist_ok=True, parents=True) + metadata_file = DATA / "jsons" / "sys-prefix.json" + dest_path = menu_dir / metadata_file.name + shutil.copy(metadata_file, dest_path) + # The plug-in uses the CLIm which calls _install_adapter. + # That function returns None to be compatible with v1 shortcuts. + # So, use installing and removing as a workaround to detect expected files. + paths = set(install(dest_path, target_prefix=prefix, base_prefix=prefix, _mode="user")) + delete_files.extend(paths) + files_found = set(filter(lambda x: x.exists(), paths)) + assert files_found == paths + remove(dest_path, target_prefix=prefix, base_prefix=prefix, _mode="user") + files_found = set(filter(lambda x: x.exists(), paths)) + assert files_found == set() + + conda_cli("menuinst", "--install", *prefix_cmd, "--root-prefix", str(prefix)) + files_found = set(filter(lambda x: x.exists(), paths)) + assert files_found == paths + conda_cli("menuinst", "--remove", *prefix_cmd, "--root-prefix", str(prefix)) + files_found = set(filter(lambda x: x.exists(), paths)) + assert files_found == set() + + +def test_plugin_cli_error(conda_cli: CondaCLIFixture, monkeypatch: pytest.MonkeyPatch): + monkeypatch.delenv("CONDA_PREFIX", raising=False) + with pytest.raises(ValueError): + conda_cli("menuinst", "--install") diff --git a/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/info/test/tests/test_data.py b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/info/test/tests/test_data.py new file mode 100644 index 0000000000000000000000000000000000000000..b0dbe6909757d1cbcdab7fb65612c9d5e75ffad4 --- /dev/null +++ b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/info/test/tests/test_data.py @@ -0,0 +1,27 @@ +"""Ensure JSON schemas are up-to-date with code""" + +import json + +from menuinst._schema import SCHEMA_VERSION, dump_default_to_json, dump_schema_to_json +from menuinst.platforms.base import SCHEMA_VERSION as SCHEMA_VERSION_BASE +from menuinst.utils import data_path + + +def test_schema_is_up_to_date(): + with open(data_path(f"menuinst-{SCHEMA_VERSION}.schema.json")) as f: + in_file = json.load(f) + in_code = dump_schema_to_json(write=False) + assert in_file == in_code + + +def test_defaults_are_up_to_date(): + with open(data_path(f"menuinst-{SCHEMA_VERSION}.default.json")) as f: + in_file = json.load(f) + in_code = dump_default_to_json(write=False) + assert in_file == in_code + + +def test_schema_versions_in_sync(): + assert SCHEMA_VERSION_BASE == SCHEMA_VERSION, ( + "meninst._schema and menuinst.platforms.base must have the same 'SCHEMA_VERSION' value" + ) diff --git a/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/info/test/tests/test_elevation.py b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/info/test/tests/test_elevation.py new file mode 100644 index 0000000000000000000000000000000000000000..dadd442ad52c9b42e2bab593a3902ffe644b516b --- /dev/null +++ b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/info/test/tests/test_elevation.py @@ -0,0 +1,46 @@ +import os + +from menuinst.utils import _test_elevation, elevate_as_needed, user_is_admin + + +def test_elevation(tmp_path, capfd): + os.environ["MENUINST_TEST"] = "TEST" + if os.name == "nt": + on_ci = os.environ.get("CI") + is_admin = user_is_admin() + if not on_ci: + # Windows runners on GHA always run as admin + assert not is_admin + + _test_elevation(target_prefix=str(tmp_path), base_prefix=str(tmp_path)) + output = (tmp_path / "_test_output.txt").read_text().strip() + if on_ci: + assert output.endswith("env_var: TEST _mode: user") + else: + assert output.endswith("user_is_admin(): False env_var: TEST _mode: user") + + elevate_as_needed(_test_elevation)(target_prefix=str(tmp_path), base_prefix=str(tmp_path)) + output = (tmp_path / "_test_output.txt").read_text().strip() + if on_ci: + assert output.endswith("env_var: TEST _mode: system") + else: + assert output.endswith("user_is_admin(): True env_var: TEST _mode: system") + else: + assert not user_is_admin() # We need to start as a non-root user + + _test_elevation(str(tmp_path)) + assert capfd.readouterr().out.strip() == "user_is_admin(): False env_var: TEST _mode: user" + + # make tmp_path not writable by the current user to force elevation + tmp_path.chmod(0o500) + elevate_as_needed(_test_elevation)(target_prefix=str(tmp_path), base_prefix=str(tmp_path)) + assert ( + capfd.readouterr().out.strip() == "user_is_admin(): True env_var: TEST _mode: system" + ) + assert not (tmp_path / ".nonadmin").exists() + + # restore permissions + tmp_path.chmod(0o700) + elevate_as_needed(_test_elevation)(target_prefix=str(tmp_path), base_prefix=str(tmp_path)) + assert capfd.readouterr().out.strip() == "user_is_admin(): False env_var: TEST _mode: user" + assert (tmp_path / ".nonadmin").exists() diff --git a/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/info/test/tests/test_schema.py b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/info/test/tests/test_schema.py new file mode 100644 index 0000000000000000000000000000000000000000..af5efa878db8552863160803ba38990d12ecdfb5 --- /dev/null +++ b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/info/test/tests/test_schema.py @@ -0,0 +1,37 @@ +import pytest +from conftest import DATA + +# from hypothesis import given, settings, HealthCheck +# from hypothesis_jsonschema import from_schema +from pydantic import ValidationError as ValidationErrorV2 +from pydantic.v1 import ValidationError as ValidationErrorV1 + +from menuinst._schema import BasePlatformSpecific, MenuItem, validate + +# # suppress_health_check=3 --> too_slow +# @settings(max_examples=100, suppress_health_check=[HealthCheck.too_slow]) +# @given(from_schema(MenuInstSchema.schema())) +# def test_schema_can_be_loaded(value): +# assert value + + +@pytest.mark.parametrize( + "path", [pytest.param(path, id=path.name) for path in sorted((DATA / "jsons").glob("*.json"))] +) +def test_examples(path): + if "invalid" in path.name: + with pytest.raises((ValidationErrorV1, ValidationErrorV2)): + assert validate(path) + else: + assert validate(path) + + +def test_MenuItemMetadata_synced_with_OptionalMenuItemMetadata(): + fields_as_required = MenuItem.model_fields.copy() + fields_as_required.pop("platforms", None) + fields_as_optional = BasePlatformSpecific.model_fields + assert fields_as_required.keys() == fields_as_optional.keys() + for (_, required), (_, optional) in zip( + sorted(fields_as_required.items()), sorted(fields_as_optional.items()) + ): + assert required.description == optional.description diff --git a/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/info/test/tests/test_windows_registry.py b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/info/test/tests/test_windows_registry.py new file mode 100644 index 0000000000000000000000000000000000000000..ca9b63ea7a11add590af840efb41618640e142e7 --- /dev/null +++ b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/info/test/tests/test_windows_registry.py @@ -0,0 +1,141 @@ +import logging +import os +import time +from pathlib import Path + +import pytest + +registry = pytest.importorskip("menuinst.platforms.win_utils.registry") + + +def test_file_extensions(tmp_path: Path, request): + """ + We will register a custom, random extension. + The command will only echo the input path to a known output location. + After "opening" an empty file with that extension, the output file + should contain the file path we opened! + + We then clean up and make sure that opening that file doesn't + create the output file. + """ + name = str(hash(str(tmp_path)))[:6] + extension = f".menuinst-{name}" + identifier = f"menuinst.assoc.menuinst-{name}" + + def cleanup(): + # This key is not normally cleaned up because another programs might + # be using it, but since we know these are synthetic and made up, + # we try not to pollute the registry too much + registry._reg_exe("delete", rf"HKCU\Software\Classes\.menuinst-{name}") + + request.addfinalizer(cleanup) + + registry.register_file_extension( + extension=extension, + identifier=identifier, + command=rf'cmd.exe /Q /D /V:ON /C "echo %1>{tmp_path}\output.txt"', + mode="user", + ) + input_file = tmp_path / f"input.menuinst-{name}" + output_file = tmp_path / "output.txt" + try: + input_file.touch() + os.startfile(input_file) + t0 = time.time() + while time.time() - t0 <= 10: # wait 10 seconds + try: + assert output_file.read_text().strip() == str(input_file) + except IOError: + time.sleep(1) + if not output_file.exists(): + raise AssertionError("Output file was never created") + finally: + registry.unregister_file_extension(extension=extension, identifier=identifier, mode="user") + + output_file.unlink() + try: + os.startfile(input_file) + except OSError as e: + # Windows may raise a COM error if the runner is not headless + assert e.winerror < 0, f"Unexpected error: {e}" + else: + t0 = time.time() + while time.time() - t0 <= 3: # wait up to 3 seconds + time.sleep(1) + assert not output_file.exists() + + +def test_unregister_file_extension_error(capsys, request): + """ + Unregister a file extension that has not been registered and check that the + appropriate log message is reported. + """ + + def cleanup(): + registry.log.handlers.clear() + registry.log.setLevel(logging.NOTSET) + + request.addfinalizer(cleanup) + + registry.log.addHandler(logging.StreamHandler()) + registry.log.setLevel("DEBUG") + + identifier = "menuinst.assoc.menuinst-foo" + + registry.unregister_file_extension( + extension=".menuinst-bar", identifier=identifier, mode="user" + ) + captured = capsys.readouterr() + assert ( + captured.err.strip() + == "Handler 'menuinst.assoc.menuinst-foo' is not associated with extension '.menuinst-bar'" + ) + + +def test_protocols(tmp_path): + """ + We will register a custom, random protocol. + The command will only echo the input path to a known output location. + After "opening" a fake URL with that protocol, the output file + should contain the file path we opened! + + We then clean up and make sure that opening that file doesn't + create the output file. + """ + name = str(hash(str(tmp_path)))[:6] + registry.register_url_protocol( + protocol=f"menuinst-{name}", + command=rf'cmd.exe /Q /D /V:ON /C "echo %1>{tmp_path}\output.txt"', + identifier=f"menuinst.protocol.menuinst-{name}", + mode="user", + ) + input_url = f"menuinst-{name}://fake-value" + output_file = tmp_path / "output.txt" + os.startfile(input_url) + try: + t0 = time.time() + while time.time() - t0 <= 10: # wait 10 seconds + try: + assert output_file.read_text().strip().rstrip("/") == input_url.rstrip("/") + except IOError: + time.sleep(1) + if not output_file.exists(): + raise AssertionError("Output file was never created") + finally: + registry.unregister_url_protocol( + protocol=f"menuinst-{name}", + identifier=f"menuinst.protocol.menuinst-{name}", + mode="user", + ) + + output_file.unlink() + try: + os.startfile(input_url) + except OSError as e: + # Windows may raise a COM error if the runner is not headless + assert e.winerror < 0, f"Unexpected error: {e}" + else: + t0 = time.time() + while time.time() - t0 <= 3: # wait up to 3 seconds + time.sleep(1) + assert not output_file.exists() diff --git a/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst-2.4.2.dist-info/INSTALLER b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst-2.4.2.dist-info/INSTALLER new file mode 100644 index 0000000000000000000000000000000000000000..f79e4cb9aaf0b2d9e8ba78861e2071317b2384b3 --- /dev/null +++ b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst-2.4.2.dist-info/INSTALLER @@ -0,0 +1 @@ +conda \ No newline at end of file diff --git a/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst-2.4.2.dist-info/METADATA b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst-2.4.2.dist-info/METADATA new file mode 100644 index 0000000000000000000000000000000000000000..d2e924691b925aba580c749580f798afa1edbca4 --- /dev/null +++ b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst-2.4.2.dist-info/METADATA @@ -0,0 +1,75 @@ +Metadata-Version: 2.4 +Name: menuinst +Version: 2.4.2 +Summary: cross platform install of menu items +License: (c) 2016 Continuum Analytics, Inc. / http://continuum.io + All Rights Reserved + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of Continuum Analytics, Inc. nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL CONTINUUM ANALYTICS BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Project-URL: repository, https://github.com/conda/menuinst +Requires-Python: >=3.9 +Description-Content-Type: text/markdown +License-File: LICENSE.txt +License-File: AUTHORS.md +Dynamic: license-file + +# menuinst: cross platform menu item installation + +This package provides cross platform menu item installation for `conda` packages. + +If a conda package ships a [menuinst JSON document][reference] under `$PREFIX/Menu`, `conda` will invoke +`menuinst` to process the JSON file and install the menu items in your operating system. +The menu items are removed when the package is uninstalled. + +The following formats are supported: + +- Windows: `.lnk` files in the Start menu. Optionally, also in the Desktop and Quick Launch. +- macOS: `.app` bundles in the Applications folder. +- Linux: `.desktop` files as defined in the XDG standard. + +## Documentation + +Documentation is available at https://conda.github.io/menuinst/. + +## History + +This package was originally developed and maintained by Enthought under the name AppInst. The name +appinst is a rename of what used to be called 'wininst'. + +`menuinst` v1 was only supported on Windows. Legacy code existed in v1 for Linux and OS X - use at your own risk. It may mess up your menus. + +`menuinst` v2 is a backwards-compatible rewrite to address cross-platform compatibility under a +unified JSON schema, as discussed in [CEP-11][CEP-11]. The Windows bits of the v1 code are still +available under the `menuinst._legacy` subpackage. + +## Build status + +| [![Build status](https://github.com/conda/menuinst/actions/workflows/tests.yml/badge.svg)](https://github.com/conda/menuinst/actions/workflows/tests.yml) [![Docs status](https://github.com/conda/menuinst/actions/workflows/docs.yml/badge.svg)](https://github.com/conda/menuinst/actions/workflows/docs.yml) [![codecov](https://codecov.io/gh/conda/menuinst/branch/main/graph/badge.svg)](https://codecov.io/gh/conda/menuinst) [![pre-commit.ci status](https://results.pre-commit.ci/badge/github/conda/menuinst/main.svg)](https://results.pre-commit.ci/latest/github/conda/menuinst/main) | [![Anaconda-Server Badge](https://anaconda.org/conda-canary/menuinst/badges/latest_release_date.svg)](https://anaconda.org/conda-canary/menuinst) | +| --- | :-: | +| [`conda install defaults::menuinst`](https://anaconda.org/anaconda/menuinst) | [![Anaconda-Server Badge](https://anaconda.org/anaconda/menuinst/badges/version.svg)](https://anaconda.org/anaconda/menuinst) | +| [`conda install conda-forge::menuinst`](https://anaconda.org/conda-forge/menuinst) | [![Anaconda-Server Badge](https://anaconda.org/conda-forge/menuinst/badges/version.svg)](https://anaconda.org/conda-forge/menuinst) | +| [`conda install conda-canary/label/dev::menuinst`](https://anaconda.org/conda-canary/menuinst) | [![Anaconda-Server Badge](https://anaconda.org/conda-canary/menuinst/badges/version.svg)](https://anaconda.org/conda-canary/menuinst) | + +[CEP-11]: https://github.com/conda-incubator/ceps/blob/3da0fb0ece/cep-11.md +[reference]: https://conda.github.io/menuinst/reference/ diff --git a/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst-2.4.2.dist-info/RECORD b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst-2.4.2.dist-info/RECORD new file mode 100644 index 0000000000000000000000000000000000000000..636c61fe00aec260fc3fde0575a11c4e7f12ecc3 --- /dev/null +++ b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst-2.4.2.dist-info/RECORD @@ -0,0 +1,91 @@ +../../../bin/menuinst,sha256=lKfBWfFuFx7BUntHgzcDzTjAOp9vLuB3aJLxpaHykLk,467 +menuinst-2.4.2.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4 +menuinst-2.4.2.dist-info/METADATA,sha256=4NRnLnLHeYfI4lhE5JlKymTpU2Jui0AtPQAO4bHiuvs,4863 +menuinst-2.4.2.dist-info/RECORD,, +menuinst-2.4.2.dist-info/REQUESTED,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +menuinst-2.4.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91 +menuinst-2.4.2.dist-info/direct_url.json,sha256=dzgevKAHaOCuZSoYy6dVQgBrJfmX-wYhZtaIXI_5Dwg,98 +menuinst-2.4.2.dist-info/entry_points.txt,sha256=ul5_dSRnTHbTvWASUbErzF8HZynH32hWoj6tJMPFxfk,89 +menuinst-2.4.2.dist-info/licenses/AUTHORS.md,sha256=fg5iRJcRaRqt26Zc_VDS_99hhASpeAPWtIGMNGqsN-Y,709 +menuinst-2.4.2.dist-info/licenses/LICENSE.txt,sha256=kRtpO7NElNtr0sJPWRZ0Yz_pm4vBRCvD_PUSGgqC-uU,1530 +menuinst-2.4.2.dist-info/top_level.txt,sha256=9vHGmIUVj52s7Jka1ETdtAG9LWRCMqX5FRrlOR3nhz4,9 +menuinst/__init__.py,sha256=ACmMI0pxjLZMF5JpyRItexUyTfnngDe6IpiKT_0hjgk,1614 +menuinst/__main__.py,sha256=MSmt_5Xg84uHqzTN38JwgseJK8rsJn_11A8WD99VtEo,61 +menuinst/__pycache__/__init__.cpython-313.pyc,, +menuinst/__pycache__/__main__.cpython-313.pyc,, +menuinst/__pycache__/_schema.cpython-313.pyc,, +menuinst/__pycache__/_version.cpython-313.pyc,, +menuinst/__pycache__/api.cpython-313.pyc,, +menuinst/__pycache__/conda_plugin.cpython-313.pyc,, +menuinst/__pycache__/utils.cpython-313.pyc,, +menuinst/_legacy/__init__.py,sha256=1g1X6AhfTf319VvNE8k2fHkw8GqYjS4rnl2oXkMQG54,2879 +menuinst/_legacy/__pycache__/__init__.cpython-313.pyc,, +menuinst/_legacy/__pycache__/cwp.cpython-313.pyc,, +menuinst/_legacy/__pycache__/main.cpython-313.pyc,, +menuinst/_legacy/__pycache__/utils.cpython-313.pyc,, +menuinst/_legacy/__pycache__/win32.cpython-313.pyc,, +menuinst/_legacy/cwp.py,sha256=E3wnjr69seK1mT2MC1kC4q4YQlyBYnX0XFs6ebFcR-w,1873 +menuinst/_legacy/main.py,sha256=IdzwxgNWrMyCBjp_HzxFJWgVOdenANvueg6yso6vCLY,693 +menuinst/_legacy/utils.py,sha256=ZUdorwo1itv43wdLADyVTP36iIB3zgodYirf4DS6ztI,522 +menuinst/_legacy/win32.py,sha256=SMbC-Ze6OnwBfBOr2Ub9l9e4dZnb3Nvxw3gNhFg-Y6M,11169 +menuinst/_schema.py,sha256=EAqIoFYdNdqUwMGGofBaQ4veJUlXOO8io0tupv3xwQw,28278 +menuinst/_vendor/apipkg/LICENSE,sha256=6J7tEHTTqUMZi6E5uAhE9bRFuGC7p0qK6twGEFZhZOo,1054 +menuinst/_vendor/apipkg/__init__.py,sha256=TSNnn3vnuhvO4HbB6f3e4KjpVxkHyVTe-RFiQ7-LZ6U,1123 +menuinst/_vendor/apipkg/__pycache__/__init__.cpython-313.pyc,, +menuinst/_vendor/apipkg/__pycache__/_alias_module.cpython-313.pyc,, +menuinst/_vendor/apipkg/__pycache__/_importing.cpython-313.pyc,, +menuinst/_vendor/apipkg/__pycache__/_module.cpython-313.pyc,, +menuinst/_vendor/apipkg/__pycache__/_syncronized.cpython-313.pyc,, +menuinst/_vendor/apipkg/__pycache__/_version.cpython-313.pyc,, +menuinst/_vendor/apipkg/_alias_module.py,sha256=Ga4pGUXe_UFzc4ItrNmYMUWc9GC4Ytv5sHN9QPnaWDY,1186 +menuinst/_vendor/apipkg/_importing.py,sha256=Jf7URncIVWn_UBY5d1Va8-5U9S7foAezSmdWx4HAzPo,1067 +menuinst/_vendor/apipkg/_module.py,sha256=vV36vRZUpgBO_o5wR24ufTCM_CCqKZPGZA6P3FwH1dE,6897 +menuinst/_vendor/apipkg/_syncronized.py,sha256=1Gv-iyKS7tMeHta6VdYrJ7jyMVU4BAP-90WidLgnpXc,484 +menuinst/_vendor/apipkg/_version.py,sha256=A7pe6wMfnFjTxQsnriLV8_JdbbuBkrN3VnyK-lS-TBA,142 +menuinst/_vendor/apipkg/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +menuinst/_version.py,sha256=RgLLFE9p5N8uBkB4R0cLlNklegsPxOFM3kaRMZQwg_Q,704 +menuinst/api.py,sha256=s8IEIW-nBrWGnmtHUDpSBBZg5lvDVe7wiyrTwtJT1cI,6074 +menuinst/cli/__init__.py,sha256=oKsCpoiQSSXx57DGs2VfYzeO1ukJQxdGnV-2hC3BI0M,42 +menuinst/cli/__pycache__/__init__.cpython-313.pyc,, +menuinst/cli/__pycache__/cli.cpython-313.pyc,, +menuinst/cli/cli.py,sha256=YOqcxZcjqiMd74DmnSo3OglJ4rl-Ek98d6UkaHpOEvs,2738 +menuinst/conda_plugin.py,sha256=G1Z11VfyzEvNGrO6qLgpXbfDsjdXGSdchOtPCtNoE2I,1895 +menuinst/data/appkit_launcher_arm64,sha256=S2mNNOvHAt383Mbx_E08GBCbIgpIs2P9ter8JDbmpJU,112012 +menuinst/data/appkit_launcher_x86_64,sha256=V54gNAq3aADJLSih9Jw0B0q_Uai69x44o_rvyJvGZu0,100192 +menuinst/data/menuinst-1-0-0.default.json,sha256=YrhheDp-AUGxUt1237cn_Z7DP5a3RYpxJwCTprO61sM,1871 +menuinst/data/menuinst-1-0-0.schema.json,sha256=GlUt06UC9gK5g-NjPXPEDznHBUF_FmW-7ObIZ4MTkxM,17558 +menuinst/data/menuinst-1-0-1.default.json,sha256=cY-77_peqYT04QQRxzfb5Xq9-Zqr1pfhGptZ5LM9qgg,1963 +menuinst/data/menuinst-1-0-1.schema.json,sha256=9t_OuAk17FxWTulqike-OjsbmjsgehBfdNsG_m6_VkM,18963 +menuinst/data/menuinst-1-0-2.default.json,sha256=xFb25YhliojqoLAQZ7hSPM7WNb_2RLC1AXuQQwLp7M0,2000 +menuinst/data/menuinst-1-0-2.schema.json,sha256=PRgmMO6LGeu_qM7dFPzqT448vDV0ZMaxghptVF-4mLg,48313 +menuinst/data/menuinst-1-1-0.default.json,sha256=env8HCwJYC_J5unS3ytWN1hcm4KCt-z6vswjKzPu9Sk,1953 +menuinst/data/menuinst-1-1-0.schema.json,sha256=ZcnqT8SzYnKUaycPyrMNNUeVODzzSLuxnOqUfG9lh5U,48394 +menuinst/data/menuinst-1-1-1.default.json,sha256=E0Pkez5HIR54FlT7TvLMs-cHUhehL1_DN5DfKtyrx88,1953 +menuinst/data/menuinst-1-1-1.schema.json,sha256=lE1atGNu6b4ce3fKsPiPIfSzXhRhxWPSKq4Fywp0weY,60707 +menuinst/data/menuinst-1-1-2.default.json,sha256=1DuajNlZkZKmRvY73C_vjeuQue08MfQhLk3bf8RgF1I,2143 +menuinst/data/menuinst-1-1-2.schema.json,sha256=XUHiznwgFE1aXK7QWo_Lh4B3aXTIYferFUXYIAIO4Mc,63381 +menuinst/data/menuinst-1-1-3.default.json,sha256=6FMN2Fy2qP4jIGEi-hWK5436W0Yao908mQT1_GTM_jA,2179 +menuinst/data/menuinst-1-1-3.schema.json,sha256=8_p6m_gGthVzmLwG94R2tBgBJX5-qVS6MHalKc63pRo,64025 +menuinst/data/menuinst.default.json,sha256=xFb25YhliojqoLAQZ7hSPM7WNb_2RLC1AXuQQwLp7M0,2000 +menuinst/data/menuinst.schema.json,sha256=PRgmMO6LGeu_qM7dFPzqT448vDV0ZMaxghptVF-4mLg,48313 +menuinst/data/osx_launcher_arm64,sha256=bWXJAwEQwJyFno1FJGXuFlSf9tee0UPWTYKqV3A-R2c,67616 +menuinst/data/osx_launcher_x86_64,sha256=6s03pCmu-BBPQldI-1h4cn1rbXU2x06YezQGnRvWDaU,8920 +menuinst/platforms/__init__.py,sha256=Ks65y_d5_SueAjwG28hh9asBZiAFKq7P3b5MfPMdqBE,744 +menuinst/platforms/__pycache__/__init__.cpython-313.pyc,, +menuinst/platforms/__pycache__/base.cpython-313.pyc,, +menuinst/platforms/__pycache__/linux.cpython-313.pyc,, +menuinst/platforms/__pycache__/osx.cpython-313.pyc,, +menuinst/platforms/__pycache__/win.cpython-313.pyc,, +menuinst/platforms/base.py,sha256=J3d3ROazxkPXMKqSMxzFSEEjqfklC9DFPfYYpZflWOw,9620 +menuinst/platforms/linux.py,sha256=AsZq2c3EVZbAzvbU1smEQ4Zrl1Fj-q_Ms1GEvHwIDGg,17275 +menuinst/platforms/osx.py,sha256=EcuG7Yix_m5W-r3BPV_FqXsjsL6wXy6ZXhxu19iW4xs,13739 +menuinst/platforms/win.py,sha256=a_gUQ4fxvzKSu4P4InVh05VsIqpsSStUj9Nm6IncmZQ,22152 +menuinst/platforms/win_utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +menuinst/platforms/win_utils/__pycache__/__init__.cpython-313.pyc,, +menuinst/platforms/win_utils/__pycache__/knownfolders.cpython-313.pyc,, +menuinst/platforms/win_utils/__pycache__/registry.cpython-313.pyc,, +menuinst/platforms/win_utils/__pycache__/win_elevate.cpython-313.pyc,, +menuinst/platforms/win_utils/knownfolders.py,sha256=ad3vOweuNxJMonQMxQCJSn7IBThFPjOKEPCQqxm1tZo,15353 +menuinst/platforms/win_utils/registry.py,sha256=rt7VOOg9wCiDMCQ17ksCLvjZAStKmofH4kDgqm3eGTU,7722 +menuinst/platforms/win_utils/win_elevate.py,sha256=hs_Dn6VCOb1l_Y6sITgsNR3Rc2XJDNXu9axueQ9yrvs,5068 +menuinst/utils.py,sha256=R1bOQkPZ1u_I6qftc9LUJi9J3TamWbZcwd2MYAU254I,18019 diff --git a/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst-2.4.2.dist-info/REQUESTED b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst-2.4.2.dist-info/REQUESTED new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst-2.4.2.dist-info/WHEEL b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst-2.4.2.dist-info/WHEEL new file mode 100644 index 0000000000000000000000000000000000000000..e7fa31b6f3f78deb1022c1f7927f07d4d16da822 --- /dev/null +++ b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst-2.4.2.dist-info/WHEEL @@ -0,0 +1,5 @@ +Wheel-Version: 1.0 +Generator: setuptools (80.9.0) +Root-Is-Purelib: true +Tag: py3-none-any + diff --git a/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst-2.4.2.dist-info/direct_url.json b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst-2.4.2.dist-info/direct_url.json new file mode 100644 index 0000000000000000000000000000000000000000..1fadee2393724f3d54a68c4dd28d989784fbd9f6 --- /dev/null +++ b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst-2.4.2.dist-info/direct_url.json @@ -0,0 +1 @@ +{"dir_info": {}, "url": "file:///home/task_176538230483207/conda-bld/menuinst_1765382366331/work"} \ No newline at end of file diff --git a/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst-2.4.2.dist-info/entry_points.txt b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst-2.4.2.dist-info/entry_points.txt new file mode 100644 index 0000000000000000000000000000000000000000..75e4b1bceaa5ef81e8725fb783bcb40f999d3261 --- /dev/null +++ b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst-2.4.2.dist-info/entry_points.txt @@ -0,0 +1,5 @@ +[conda] +menuinst = menuinst.conda_plugin + +[console_scripts] +menuinst = menuinst.cli:main diff --git a/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst-2.4.2.dist-info/licenses/AUTHORS.md b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst-2.4.2.dist-info/licenses/AUTHORS.md new file mode 100644 index 0000000000000000000000000000000000000000..7c0c73015d06c3d30803afebf54f3ad6bbed75f5 --- /dev/null +++ b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst-2.4.2.dist-info/licenses/AUTHORS.md @@ -0,0 +1,42 @@ +All of the people who have made at least one contribution to menuinst. +Authors are sorted alphabetically. + +* Aaron Meurer +* Ashley Anderson +* Cheng H. Lee +* Connor Martin +* Daniel Bast +* Daniel McCloy +* David Li +* Eric Larson +* Eric Prestat +* Ilan Schnell +* Isuru Fernando +* JTignor-Raltron +* Jaida Rice +* Jaime Rodríguez-Guerra +* Jannis Leidel +* Jason McCampbell +* Kai Tietz +* Kale Franz +* Ken Odegard +* Klaus Zimmermann +* Marco Esters +* Mark Wiebe +* Martin Chilvers +* Mike Sarahan +* Nehal J Wani +* Pankaj Pandey +* Prabhu Ramachandran +* Ray Donnelly +* Robin +* Ryan Clary +* Shaun Walbridge +* Sophia Castellarin +* Trent Nelson +* ccasey +* conda-bot +* dependabot[bot] +* dmartin +* dpeterson +* pre-commit-ci[bot] diff --git a/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst-2.4.2.dist-info/licenses/LICENSE.txt b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst-2.4.2.dist-info/licenses/LICENSE.txt new file mode 100644 index 0000000000000000000000000000000000000000..eb19a522addf870a8804c3221d20fa2bf8127d89 --- /dev/null +++ b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst-2.4.2.dist-info/licenses/LICENSE.txt @@ -0,0 +1,24 @@ +(c) 2016 Continuum Analytics, Inc. / http://continuum.io +All Rights Reserved + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of Continuum Analytics, Inc. nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL CONTINUUM ANALYTICS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst-2.4.2.dist-info/top_level.txt b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst-2.4.2.dist-info/top_level.txt new file mode 100644 index 0000000000000000000000000000000000000000..37251bb09c3fa0f2779ad9f32773162c21da9111 --- /dev/null +++ b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst-2.4.2.dist-info/top_level.txt @@ -0,0 +1 @@ +menuinst diff --git a/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst/__init__.py b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..1be80ad67042d312fe96bf4440c9ff19ba07cc23 --- /dev/null +++ b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst/__init__.py @@ -0,0 +1,47 @@ +""" """ + +import os +from logging import basicConfig, getLogger + +from .api import _install_adapter as install + +try: + from ._version import __version__ +except ImportError: + __version__ = "dev" + +log = getLogger(__name__) +if os.environ.get("MENUINST_DEBUG"): + basicConfig(level="DEBUG") + +__all__ = ["install", "__version__"] + + +# Compatibility forwarders for menuinst v1.x (Windows only) +if os.name == "nt": + from ._vendor.apipkg import initpkg + + initpkg( + __name__, + exportdefs={ + "win32": { + "dirs_src": "menuinst.platforms.win_utils.knownfolders:dirs_src", + }, + "knownfolders": { + "get_folder_path": "menuinst.platforms.win_utils.knownfolders:get_folder_path", + "FOLDERID": "menuinst.platforms.win_utils.knownfolders:FOLDERID", + }, + "winshortcut": { + "create_shortcut": "menuinst.platforms.win_utils.winshortcut:create_shortcut", + }, + "win_elevate": { + "runAsAdmin": "menuinst.platforms.win_utils.win_elevate:runAsAdmin", + "isUserAdmin": "menuinst.platforms.win_utils.win_elevate:isUserAdmin", + }, + }, + # Calling initpkg WILL CLEAR the 'menuinst' top-level namespace, and only then will add + # the exportdefs contents! If we want to keep something defined in this module, we MUST + # make sure it's added in the 'attr' dictionary below. + # __spec__ is needed for pyinstaller packaging + attr={"__version__": __version__, "install": install, "__spec__": __spec__}, + ) diff --git a/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst/__main__.py b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst/__main__.py new file mode 100644 index 0000000000000000000000000000000000000000..9ae637f13cd528a1823ec240ed01b3bdaaa19967 --- /dev/null +++ b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst/__main__.py @@ -0,0 +1,4 @@ +from .cli import main + +if __name__ == "__main__": + main() diff --git a/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst/_legacy/__init__.py b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst/_legacy/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..9726eabf6d1abaeb25a30ecf5f202107e09b7e96 --- /dev/null +++ b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst/_legacy/__init__.py @@ -0,0 +1,87 @@ +# Copyright (c) 2008-2011 by Enthought, Inc. +# Copyright (c) 2013-2015 Continuum Analytics, Inc. +# All rights reserved. + +from __future__ import absolute_import + +import json +import logging +import sys +from os.path import abspath, basename, exists, join + +try: + from .._version import __version__ +except ImportError: + __version__ = "dev" + +from ..utils import DEFAULT_BASE_PREFIX, DEFAULT_PREFIX, python_executable + +if sys.platform == 'win32': + from ..platforms.win_utils.win_elevate import isUserAdmin, runAsAdmin + from .win32 import Menu, ShortCut + + +def _install(path, remove=False, prefix=None, mode=None, root_prefix=None): + prefix = prefix or DEFAULT_PREFIX + root_prefix = root_prefix or DEFAULT_BASE_PREFIX + if abspath(prefix) == abspath(root_prefix): + env_name = None + else: + env_name = basename(prefix) + + data = json.load(open(path)) + try: + menu_name = data['menu_name'] + except KeyError: + menu_name = 'Python-%d.%d' % sys.version_info[:2] + + shortcuts = data['menu_items'] + m = Menu(menu_name, prefix=prefix, env_name=env_name, mode=mode, root_prefix=root_prefix) + if remove: + for sc in shortcuts: + ShortCut(m, sc).remove() + m.remove() + else: + m.create() + for sc in shortcuts: + ShortCut(m, sc).create() + + +def install(path, remove=False, prefix=None, recursing=False, root_prefix=None): + """ + Install Menu and shortcuts + + # Specifying `root_prefix` is used with conda-standalone, because we can't use + # `sys.prefix`, therefore we need to specify it + """ + prefix = prefix or DEFAULT_PREFIX + root_prefix = root_prefix or DEFAULT_BASE_PREFIX + if not sys.platform == 'win32': + raise RuntimeError("menuinst._legacy is only supported on Windows.") + + if not exists(join(prefix, ".nonadmin")) and not exists(join(root_prefix, ".nonadmin")): + if isUserAdmin(): + _install(path, remove, prefix, mode='system', root_prefix=root_prefix) + else: + retcode = 1 + try: + if not recursing: + retcode = runAsAdmin( + [ + *python_executable(), + '-c', + "import menuinst; menuinst.install(%r, %r, %r, %r, %r)" + % (path, bool(remove), prefix, True, root_prefix), + ] + ) + except OSError: + pass + + if retcode != 0: + logging.warning( + "Insufficient permissions to write menu folder. " + "Falling back to user location" + ) + _install(path, remove, prefix, mode='user', root_prefix=root_prefix) + else: + _install(path, remove, prefix, mode='user', root_prefix=root_prefix) diff --git a/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst/_legacy/cwp.py b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst/_legacy/cwp.py new file mode 100644 index 0000000000000000000000000000000000000000..93d56282bfbe3eed4c00e30670a52a28558f1856 --- /dev/null +++ b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst/_legacy/cwp.py @@ -0,0 +1,56 @@ +# this script is used on windows to wrap shortcuts so that they are executed within an environment +# It only sets the appropriate prefix PATH entries - it does not actually activate environments + +import argparse +import os +import subprocess +import sys +from os.path import join, pathsep + +# this must be an absolute import since the cwp.py script is copied to $PREFIX +from menuinst.knownfolders import FOLDERID, get_folder_path + + +def main(argv=None): + # call as: python cwp.py [--no-console] PREFIX ARGs... + parser = argparse.ArgumentParser() + parser.add_argument( + "--no-console", action="store_true", help="Create subprocess with CREATE_NO_WINDOW flag." + ) + parser.add_argument("prefix", help="Prefix to be 'activated' before calling `args`.") + parser.add_argument( + "args", nargs=argparse.REMAINDER, help="Command (and arguments) to be executed." + ) + parsed_args = parser.parse_args(argv) + + no_console = parsed_args.no_console + prefix = parsed_args.prefix + args = parsed_args.args + + new_paths = pathsep.join( + [ + prefix, + join(prefix, "Library", "mingw-w64", "bin"), + join(prefix, "Library", "usr", "bin"), + join(prefix, "Library", "bin"), + join(prefix, "Scripts"), + ] + ) + env = os.environ.copy() + env["PATH"] = new_paths + pathsep + env["PATH"] + env["CONDA_PREFIX"] = prefix + + documents_folder, exception = get_folder_path(FOLDERID.Documents) + if exception: + documents_folder, exception = get_folder_path(FOLDERID.PublicDocuments) + if not exception: + os.chdir(documents_folder) + + creationflags = {} + if no_console: + creationflags["creationflags"] = getattr(subprocess, "CREATE_NO_WINDOW", 0x08000000) + sys.exit(subprocess.call(args, env=env, **creationflags)) + + +if __name__ == "__main__": + main() diff --git a/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst/_legacy/main.py b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst/_legacy/main.py new file mode 100644 index 0000000000000000000000000000000000000000..6c62f2aa52e565c496783b9f0b969548e4d79314 --- /dev/null +++ b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst/_legacy/main.py @@ -0,0 +1,30 @@ +import sys +from os.path import join + +from .. import __version__, install +from ..utils import DEFAULT_PREFIX + + +def main(): + from optparse import OptionParser + + p = OptionParser(usage="usage: %prog [options] MENU_FILE", description="install a menu item") + + p.add_option('-p', '--prefix', action="store", default=DEFAULT_PREFIX) + + p.add_option('--remove', action="store_true") + + p.add_option('--version', action="store_true") + + opts, args = p.parse_args() + + if opts.version: + sys.stdout.write("menuinst: %s\n" % __version__) + return + + for arg in args: + install(join(opts.prefix, arg), opts.remove, opts.prefix) + + +if __name__ == '__main__': + main() diff --git a/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst/_legacy/utils.py b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst/_legacy/utils.py new file mode 100644 index 0000000000000000000000000000000000000000..c5911a44705168bf5f87ec6284fc961bc9006d41 --- /dev/null +++ b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst/_legacy/utils.py @@ -0,0 +1,21 @@ +import os +import shutil +from os.path import isdir, isfile, islink + + +def rm_empty_dir(path): + try: + os.rmdir(path) + except OSError: # directory might not exist or not be empty + pass + + +def rm_rf(path): + if islink(path) or isfile(path): + # Note that we have to check if the destination is a link because + # exists('/path/to/dead-link') will return False, although + # islink('/path/to/dead-link') is True. + os.unlink(path) + + elif isdir(path): + shutil.rmtree(path) diff --git a/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst/_legacy/win32.py b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst/_legacy/win32.py new file mode 100644 index 0000000000000000000000000000000000000000..b33f2d7f59edf1d86d2fb440b86ca82adeba5e3e --- /dev/null +++ b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst/_legacy/win32.py @@ -0,0 +1,325 @@ +# Copyright (c) 2008-2011 by Enthought, Inc. +# Copyright (c) 2013-2017 Continuum Analytics, Inc. +# All rights reserved. + +from __future__ import absolute_import, unicode_literals + +import ctypes +import locale +import logging +import os +import sys +from os.path import exists, isdir, join + +from ..platforms.win_utils.knownfolders import dirs_src, folder_path +from ..platforms.win_utils.winshortcut import create_shortcut +from ..utils import DEFAULT_BASE_PREFIX +from .utils import rm_empty_dir, rm_rf + +# This allows debugging installer issues using DebugView from Microsoft. +OutputDebugString = ctypes.windll.kernel32.OutputDebugStringW +OutputDebugString.argtypes = [ctypes.c_wchar_p] + + +class DbgViewHandler(logging.Handler): + def emit(self, record): + OutputDebugString(self.format(record)) + + +logger = logging.getLogger("menuinst_win32") +logger.setLevel(logging.DEBUG) +stream_handler = logging.StreamHandler() +stream_handler.setLevel(logging.WARNING) +dbgview = DbgViewHandler() +dbgview.setLevel(logging.DEBUG) +logger.addHandler(dbgview) +logger.addHandler(stream_handler) + + +def quoted(s): + """ + quotes a string if necessary. + """ + # strip any existing quotes + s = s.strip(u'"') + # don't add quotes for minus or leading space + if s[0] in (u'-', u' '): + return s + if u' ' in s or u'/' in s: + return u'"%s"' % s + else: + return s + + +def ensure_pad(name, pad="_"): + """ + + Examples: + >>> ensure_pad('conda') + '_conda_' + + """ + if not name or name[0] == name[-1] == pad: + return name + else: + return "%s%s%s" % (pad, name, pad) + + +def to_unicode(var, codec=locale.getpreferredencoding()): + if not codec: + codec = "utf-8" + if hasattr(var, "decode"): + var = var.decode(codec) + return var + + +def to_bytes(var, codec=locale.getpreferredencoding()): + if isinstance(var, bytes): + return var + if not codec: + codec = "utf-8" + if hasattr(var, "encode"): + var = var.encode(codec) + return var + + +unicode_root_prefix = to_unicode(DEFAULT_BASE_PREFIX) +if u'\\envs\\' in unicode_root_prefix: + logger.warning('menuinst called from non-root env %s', unicode_root_prefix) + + +def substitute_env_variables(text, dir): + # When conda is using Menuinst, only the root conda installation ever + # calls menuinst. Thus, these calls to sys refer to the root conda + # installation, NOT the child environment + py_major_ver = sys.version_info[0] + py_bitness = 8 * tuple.__itemsize__ + + env_prefix = to_unicode(dir['prefix']) + root_prefix = to_unicode(dir['root_prefix']) + text = to_unicode(text) + env_name = to_unicode(dir['env_name']) + + for a, b in ( + (u'${PREFIX}', env_prefix), + (u'${ROOT_PREFIX}', root_prefix), + (u'${DISTRIBUTION_NAME}', os.path.split(root_prefix)[-1]), + ( + u'${PYTHON_SCRIPTS}', + os.path.normpath(join(env_prefix, u'Scripts')).replace(u"\\", u"/"), + ), + (u'${MENU_DIR}', join(env_prefix, u'Menu')), + (u'${PERSONALDIR}', dir['documents']), + (u'${USERPROFILE}', dir['profile']), + (u'${ENV_NAME}', env_name), + (u'${PY_VER}', u'%d' % (py_major_ver)), + (u'${PLATFORM}', u"(%s-bit)" % py_bitness), + ): + if b: + text = text.replace(a, b) + return text + + +class Menu(object): + def __init__( + self, + name, + prefix=unicode_root_prefix, + env_name=u"", + mode=None, + root_prefix=unicode_root_prefix, + ): + """ + Prefix is the system prefix to be used -- this is needed since + there is the possibility of a different Python's packages being managed. + """ + + # bytestrings passed in need to become unicode + self.prefix = to_unicode(prefix) + self.root_prefix = to_unicode(root_prefix) + used_mode = ( + mode if mode else ('user' if exists(join(self.prefix, u'.nonadmin')) else 'system') + ) + logger.debug( + "Menu: name: '%s', prefix: '%s', env_name: '%s', mode: '%s', used_mode: '%s', root_prefix: '%s'" # noqa + % (name, self.prefix, env_name, mode, used_mode, root_prefix) + ) + try: + self.set_dir(name, self.prefix, env_name, used_mode, root_prefix) + except WindowsError: + # We get here if we aren't elevated. This is different from + # permissions: a user can have permission, but elevation is still + # required. If the process isn't elevated, we get the + # WindowsError + if 'user' in dirs_src and used_mode == 'system': + logger.warning( + "Insufficient permissions to write menu folder. " + "Falling back to user location" + ) + try: + self.set_dir(name, self.prefix, env_name, 'user') + except: # noqa + pass + else: + logger.fatal("Unable to create AllUsers menu folder") + + def set_dir(self, name, prefix, env_name, mode, root_prefix): + self.mode = mode + self.dir = dict() + # I have chickened out on allowing check_other_mode. Really there needs + # to be 3 distinct cases that 'menuinst' cares about: + # priv-user doing system install + # priv-user doing user-only install + # non-priv-user doing user-only install + # (priv-user only exists in an AllUsers installation). + check_other_mode = False + for k, v in dirs_src[mode].items(): + # We may want to cache self.dir to some files, one for AllUsers + # (system) installs and one for each subsequent user install? + self.dir[k] = folder_path(mode, check_other_mode, k) + self.dir['prefix'] = prefix + self.dir['root_prefix'] = root_prefix + self.dir['env_name'] = env_name + folder_name = substitute_env_variables(name, self.dir) + self.path = join(self.dir["start"], folder_name) + self.create() + + def create(self): + if not isdir(self.path): + os.mkdir(self.path) + + def remove(self): + rm_empty_dir(self.path) + + +def extend_script_args(args, shortcut): + try: + args.append(shortcut['scriptargument']) + except KeyError: + pass + try: + args.extend(shortcut['scriptarguments']) + except KeyError: + pass + + +def quote_args(args): + # cmd.exe /K or /C expects a single string argument and requires + # doubled-up quotes when any sub-arguments have spaces: + # https://stackoverflow.com/a/6378038/3257826 + if ( + len(args) > 2 + and ("CMD.EXE" in args[0].upper() or "%COMSPEC%" in args[0].upper()) + and (args[1].upper() == '/K' or args[1].upper() == '/C') + and any(' ' in arg for arg in args[2:]) + ): + args = [ + ensure_pad(args[0], '"'), # cmd.exe + args[1], # /K or /C + '"%s"' % (' '.join(ensure_pad(arg, '"') for arg in args[2:])), # double-quoted + ] + else: + args = [quoted(arg) for arg in args] + return args + + +class ShortCut(object): + def __init__(self, menu, shortcut): + self.menu = menu + self.shortcut = shortcut + + def remove(self): + self.create(remove=True) + + def create(self, remove=False): + # Substitute env variables early because we may need to escape spaces in the value. + args = [] + fix_win_slashes = [0] + prefix = self.menu.prefix.replace('/', '\\') + unicode_root_prefix = self.menu.root_prefix.replace('/', '\\') + root_py = join(unicode_root_prefix, u"python.exe") + root_pyw = join(unicode_root_prefix, u"pythonw.exe") + env_py = join(prefix, u"python.exe") + env_pyw = join(prefix, u"pythonw.exe") + cwp_py = [root_py, join(unicode_root_prefix, u'cwp.py'), prefix, env_py] + cwp_pyw = [root_pyw, join(unicode_root_prefix, u'cwp.py'), prefix, env_pyw] + if "pywscript" in self.shortcut: + args = cwp_pyw + fix_win_slashes = [len(args)] + args += self.shortcut["pywscript"].split() + elif "pyscript" in self.shortcut: + args = cwp_py + fix_win_slashes = [len(args)] + args += self.shortcut["pyscript"].split() + elif "webbrowser" in self.shortcut: + args = [root_pyw, '-m', 'webbrowser', '-t', self.shortcut['webbrowser']] + elif "script" in self.shortcut: + # It is unclear whether running through cwp.py is what we want here. In + # the long term I would rather this was made an explicit choice. + args = [root_py, join(unicode_root_prefix, u'cwp.py'), prefix] + fix_win_slashes = [len(args)] + args += self.shortcut["script"].split() + extend_script_args(args, self.shortcut) + elif "system" in self.shortcut: + args = self.shortcut["system"].split() + extend_script_args(args, self.shortcut) + else: + raise Exception("Nothing to do: %r" % self.shortcut) + args = [substitute_env_variables(arg, self.menu.dir) for arg in args] + for fws in fix_win_slashes: + args[fws] = args[fws].replace('/', '\\') + + args = quote_args(args) + + cmd = args[0] + args = args[1:] + logger.debug('Shortcut cmd is %s, args are %s' % (cmd, args)) + workdir = self.shortcut.get('workdir', '') + icon = self.shortcut.get('icon', '') + + workdir = substitute_env_variables(workdir, self.menu.dir) + icon = substitute_env_variables(icon, self.menu.dir) + + # Fix up the '/' to '\' + workdir = workdir.replace('/', '\\') + icon = icon.replace('/', '\\') + + # Create the working directory if it doesn't exist + if workdir: + if not isdir(workdir): + os.makedirs(workdir) + else: + workdir = '%HOMEPATH%' + + # Menu link + dst_dirs = [self.menu.path] + + # Desktop link + if self.shortcut.get('desktop'): + dst_dirs.append(self.menu.dir['desktop']) + + # Quicklaunch link + if self.shortcut.get('quicklaunch') and 'quicklaunch' in self.menu.dir: + dst_dirs.append(self.menu.dir['quicklaunch']) + + name_suffix = ( + " ({})".format(self.menu.dir['env_name']) if self.menu.dir['env_name'] else "" + ) + for dst_dir in dst_dirs: + name = substitute_env_variables(self.shortcut['name'], self.menu.dir) + dst = join(dst_dir, name + name_suffix + '.lnk') + if remove: + rm_rf(dst) + else: + # The API for the call to 'create_shortcut' has 3 + # required arguments (path, description and filename) + # and 4 optional ones (args, working_dir, icon_path and + # icon_index). + create_shortcut( + u'' + cmd, + u'' + name + name_suffix, + u'' + dst, + u' '.join(arg for arg in args), + u'' + workdir, + u'' + icon, + ) diff --git a/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst/_schema.py b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst/_schema.py new file mode 100644 index 0000000000000000000000000000000000000000..bda0b9d357728b30966d1f27f6864ab9ad82a66b --- /dev/null +++ b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst/_schema.py @@ -0,0 +1,823 @@ +""" +Generate JSON schemas from pydantic models +""" + +# flake8: noqa +# pyright: reportInvalidTypeForm=false, reportCallIssue=false, reportGeneralTypeIssues=false + +import json +import os +import re +from inspect import cleandoc +from logging import getLogger +from pathlib import Path +from pprint import pprint +from typing import Annotated, Any, Dict, List, Literal, Optional, Union + +from pydantic import BaseModel as _BaseModel +from pydantic import Field as _Field +from pydantic import ConfigDict +from pydantic.types import conlist + + +log = getLogger(__name__) +SCHEMA_DIALECT = "http://json-schema.org/draft-07/schema#" +# We follow schemaver +SCHEMA_VERSION = "1-1-3" +SCHEMA_URL = f"https://schemas.conda.org/menuinst-{SCHEMA_VERSION}.schema.json" + + +def _clean_description(description: str) -> str: + # The regex below only replaces newlines surrounded by non-newlines + description = re.sub(r'(?`. + + See [AppUserModelID docs]( + https://learn.microsoft.com/en-us/windows/win32/shell/appids#how-to-form-an-application-defined-appusermodelid) + for more information on the required string format. + """ + ), + ) + + +class Linux(BasePlatformSpecific): + """ + Linux-specific instructions. + + Check the [Desktop entry specification]( + https://specifications.freedesktop.org/desktop-entry-spec/latest/recognized-keys.html) + for more details. + """ + + Categories: Optional[Union[List[str], Annotated[str, Field(pattern=r"^.+;$")]]] = Field( + None, + description=( + """ + Categories in which the entry should be shown in a menu. + See 'Registered categories' in the [Menu Spec]( + http://www.freedesktop.org/Standards/menu-spec). + """ + ), + ) + DBusActivatable: Optional[bool] = Field( + None, + description=( + """ + A boolean value specifying if D-Bus activation is supported for this application. + """ + ), + ) + GenericName: Optional[str] = Field( + None, + description=( + """ + Generic name of the application; e.g. if the name is 'conda', + this would be 'Package Manager'. + """ + ), + ) + Hidden: Optional[bool] = Field( + None, + description=("Disable shortcut, signaling a missing resource."), + ) + Implements: Optional[Union[List[str], Annotated[str, Field(pattern=r"^.+;$")]]] = Field( + None, + description=( + """ + List of supported interfaces. See 'Interfaces' in [Desktop Entry Spec]( + https://specifications.freedesktop.org/desktop-entry-spec/latest/interfaces.html). + """ + ), + ) + Keywords: Optional[Union[List[str], Annotated[str, Field(pattern=r"^.+;$")]]] = Field( + None, + description=("Additional terms to describe this shortcut to aid in searching."), + ) + MimeType: Optional[Union[List[str], Annotated[str, Field(pattern=r"^.+;$")]]] = Field( + None, + description=( + """ + The MIME type(s) supported by this application. + Note this includes file types and URL protocols. + For URL protocols, use `x-scheme-handler/your-protocol-here`. + For example, if you want to register `menuinst:`, you would + include `x-scheme-handler/menuinst`. + """ + ), + ) + NoDisplay: Optional[bool] = Field( + None, + description=( + """ + Do not show this item in the menu. Useful to associate MIME types + and other registrations, without having an actual clickable item. + Not to be confused with 'Hidden'. + """ + ), + ) + NotShowIn: Optional[Union[List[str], Annotated[str, Field(pattern=r"^.+;$")]]] = Field( + None, + description=( + """ + Desktop environments that should NOT display this item. + It'll check against `$XDG_CURRENT_DESKTOP`. + """ + ), + ) + OnlyShowIn: Optional[Union[List[str], Annotated[str, Field(pattern=r"^.+;$")]]] = Field( + None, + description=( + """ + Desktop environments that should display this item. + It'll check against `$XDG_CURRENT_DESKTOP`. + """ + ), + ) + PrefersNonDefaultGPU: Optional[bool] = Field( + None, + description=( + """ + Hint that the app prefers to be run on a more powerful discrete GPU if available. + """ + ), + ) + SingleMainWindow: Optional[bool] = Field( + None, + description=( + """ + Do not show the 'New Window' option in the app's context menu. + """ + ), + ) + StartupNotify: Optional[bool] = Field( + None, + description=( + """ + Advanced. See [Startup Notification spec]( + https://www.freedesktop.org/wiki/Specifications/startup-notification-spec/). + """ + ), + ) + StartupWMClass: Optional[str] = Field( + None, + description=( + """ + Advanced. See [Startup Notification spec]( + https://www.freedesktop.org/wiki/Specifications/startup-notification-spec/). + """ + ), + ) + TryExec: Optional[str] = Field( + None, + description=( + """ + Filename or absolute path to an executable file on disk used to + determine if the program is actually installed and can be run. If the test + fails, the shortcut might be ignored / hidden. + """ + ), + ) + glob_patterns: Optional[Dict[str, Annotated[str, Field(pattern=r".*\*.*")]]] = Field( + None, + description=( + """ + Map of custom MIME types to their corresponding glob patterns (e.g. `*.txt`). + Only needed if you define custom MIME types in `MimeType`. + """ + ), + ) + + +class MacOS(BasePlatformSpecific): + """ + Mac-specific instructions. Check these URLs for more info: + + - `CF*` keys: see [Core Foundation Keys](https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html) + - `LS*` keys: see [Launch Services Keys](https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/LaunchServicesKeys.html) + - `entitlements`: see [Entitlements documentation](https://developer.apple.com/documentation/bundleresources/entitlements) + """ + + class CFBundleURLTypesModel(BaseModel): + "Describes a URL scheme associated with the app." + + CFBundleTypeRole: Optional[Literal["Editor", "Viewer", "Shell", "None"]] = Field( + None, + description=("This key specifies the app's role with respect to the URL."), + ) + CFBundleURLSchemes: List[str] = Field( + ..., + description=("URL schemes / protocols handled by this type (e.g. 'mailto')."), + ) + CFBundleURLName: Optional[str] = Field( + None, + description=("Abstract name for this URL type. Uniqueness recommended."), + ) + CFBundleURLIconFile: Optional[str] = Field( + None, + description=("Name of the icon image file (minus the .icns extension)."), + ) + + class CFBundleDocumentTypesModel(BaseModel): + "Describes a document type associated with the app." + + CFBundleTypeIconFile: Optional[str] = Field( + None, + description=("Name of the icon image file (minus the .icns extension)."), + ) + CFBundleTypeName: str = Field( + ..., + description=("Abstract name for this document type. Uniqueness recommended."), + ) + CFBundleTypeRole: Optional[Literal["Editor", "Viewer", "Shell", "None"]] = Field( + None, description=("This key specifies the app's role with respect to the type.") + ) + LSItemContentTypes: List[str] = Field( + ..., + description=( + """ + List of UTI strings defining a supported file type; e.g. for PNG files, use + 'public.png'. See [UTI Reference]( + https://developer.apple.com/library/archive/documentation/Miscellaneous/Reference/UTIRef/Articles/System-DeclaredUniformTypeIdentifiers.html) + for more info about the system-defined UTIs. Custom UTIs can be defined via + 'UTExportedTypeDeclarations'. UTIs defined by other apps (not the system) need to + be imported via 'UTImportedTypeDeclarations'. + + See [Fun with UTIs](https://www.cocoanetics.com/2012/09/fun-with-uti/) for more + info. + """ + ), + ) + LSHandlerRank: Literal["Owner", "Default", "Alternate"] = Field( + ..., + description=( + """ + Determines how Launch Services ranks this app among the apps + that declare themselves editors or viewers of files of this type. + """ + ), + ) + + class UTTypeDeclarationModel(BaseModel): + UTTypeConformsTo: List[str] = Field( + ..., + description=("The Uniform Type Identifier types that this type conforms to."), + ) + UTTypeDescription: Optional[str] = Field( + None, + description=("A description for this type."), + ) + UTTypeIconFile: Optional[str] = Field( + None, + description=("The bundle icon resource to associate with this type."), + ) + UTTypeIdentifier: str = Field( + ..., + description=("The Uniform Type Identifier to assign to this type."), + ) + UTTypeReferenceURL: Optional[str] = Field( + None, + description=("The webpage for a reference document that describes this type."), + ) + UTTypeTagSpecification: Dict[str, List[str]] = Field( + ..., + description=("A dictionary defining one or more equivalent type identifiers."), + ) + + CFBundleDisplayName: Optional[str] = Field( + None, + description=( + """ + Display name of the bundle, visible to users and used by Siri. If + not provided, 'menuinst' will use the 'name' field. + """ + ), + ) + CFBundleIdentifier: Optional[Annotated[str, Field(pattern=r"^[A-z0-9\-\.]+$")]] = Field( + None, + description=( + """ + Unique identifier for the shortcut. Typically uses a reverse-DNS format. + If not provided, 'menuinst' will generate one from the 'name' field. + """ + ), + ) + CFBundleName: Optional[Annotated[str, Field(max_length=16)]] = Field( + None, + description=( + """ + Short name of the bundle. May be used if `CFBundleDisplayName` is + absent. If not provided, 'menuinst' will generate one from the 'name' field. + """ + ), + ) + CFBundleSpokenName: Optional[str] = Field( + None, + description=( + """ + Suitable replacement for text-to-speech operations on the app. + For example, 'my app one two three' instead of 'MyApp123'. + """ + ), + ) + CFBundleVersion: Optional[Annotated[str, Field(pattern=r"^\S+$")]] = Field( + None, + description=( + """ + Build version number for the bundle. In the context of 'menuinst' + this can be used to signal a new version of the menu item for the same + application version. + """ + ), + ) + CFBundleURLTypes: Optional[List[CFBundleURLTypesModel]] = Field( + None, + description=( + """ + URL types supported by this app. Requires macOS 10.14.4 or above. + Refer to `event_handler` if your application does not have support + for Apple Events handling. + """ + ), + ) + CFBundleDocumentTypes: Optional[List[CFBundleDocumentTypesModel]] = Field( + None, + description=( + """ + Document types supported by this app. Requires macOS 10.14.4 or above. + Refer to `event_handler` if your application does not have support + for Apple Events handling. + """ + ), + ) + LSApplicationCategoryType: Optional[Annotated[str, Field(pattern=r"^public\.app-category\.\S+$")]] = Field( + None, + description=( + "The App Store uses this string to determine the appropriate categorization." + ), + ) + LSBackgroundOnly: Optional[bool] = Field( + None, + description=("Specifies whether this app runs only in the background."), + ) + LSEnvironment: Optional[Dict[str, str]] = Field( + None, + description=("List of key-value pairs used to define environment variables."), + ) + LSMinimumSystemVersion: Optional[Annotated[str, Field(pattern=r"^\d+\.\d+\.\d+$")]] = Field( + None, + description=( + """ + Minimum version of macOS required for this app to run, as `x.y.z`. + For example, for macOS v10.4 and later, use `10.4.0`. + """ + ), + ) + LSMultipleInstancesProhibited: Optional[bool] = Field( + None, + description=( + """ + Whether an app is prohibited from running simultaneously in multiple user sessions. + """ + ), + ) + LSRequiresNativeExecution: Optional[bool] = Field( + None, + description=( + """ + If true, prevent a universal binary from being run under + Rosetta emulation on an Intel-based Mac. + """ + ), + ) + NSAudioCaptureUsageDescription: Optional[str] = Field( + None, + description=( + "A message describing why an app is requesting access to capture system audio." + ), + ) + NSCameraUsageDescription: Optional[str] = Field( + None, + description=( + "A message describing why an app is requesting access to the device's camera." + ), + ) + NSMainCameraUsageDescription: Optional[str] = Field( + None, + description=( + "A message describing why an app is requesting access to the device's main camera." + ), + ) + NSMicrophoneUsageDescription: Optional[str] = Field( + None, + description=( + "A message describing why an app is requesting access to the device's microphone." + ), + ) + NSSupportsAutomaticGraphicsSwitching: Optional[bool] = Field( + None, + description=("If true, allows an OpenGL app to utilize the integrated GPU."), + ) + UTExportedTypeDeclarations: Optional[List[UTTypeDeclarationModel]] = Field( + None, + description=("The uniform type identifiers owned and exported by the app."), + ) + UTImportedTypeDeclarations: Optional[List[UTTypeDeclarationModel]] = Field( + None, + description=( + "The uniform type identifiers inherently supported, but not owned, by the app." + ), + ) + entitlements: Optional[List[Annotated[str, Field(pattern=r"[a-z0-9\.\-]+")]]] = Field( + None, + description=( + """ + List of permissions to request for the launched application. See [the entitlements docs]( + https://developer.apple.com/documentation/bundleresources/entitlements) for a full + list of possible values. + """ + ), + ) + info_plist_extra: Optional[Dict[NonEmptyString, Any]] = ( + Field( + None, + description=( + """ + Set of extra properties for the Info.plist file. + These properties are not validated by `menuinst.` + """ + ), + ) + ) + link_in_bundle: Optional[Dict[NonEmptyString, Annotated[str, Field(pattern=r"^[^/]+.*")]]] = ( + Field( + None, + description=( + """ + Paths that should be symlinked into the shortcut app bundle. + It takes a mapping of source to destination paths. Destination paths must be + relative. Placeholder `{{ MENU_ITEM_LOCATION }}` can be useful. + """ + ), + ) + ) + event_handler: Optional[NonEmptyString] = Field( + None, + description=( + """ + Required shell script logic to handle opened URL payloads. + Note this feature requires macOS 10.14.4 or above. + Using this key will inject a custom Swift launcher in the `.app` bundle + to listen to Apple Events and forward them to your application. + If your app is already handling Apple Events (e.g. via Qt's + `QFileOpenEvent`), you do not need this. + """ + ), + ) + + +class Platforms(BaseModel): + """ + Platform specific options. + + Note each of these fields supports the same keys as the top-level `MenuItem` + (sans `platforms` itself), in case overrides are needed. + """ + + linux: Optional[Linux] = Field( + None, + description=("Options for Linux. See `Linux` model for details."), + ) + osx: Optional[MacOS] = Field( + None, + description=("Options for macOS. See `MacOS` model for details."), + ) + win: Optional[Windows] = Field( + None, + description=("Options for Windows. See `Windows` model for details."), + ) + + +class MenuItem(BaseModel): + "Instructions to create a menu item across operating systems." + + name: Union[NonEmptyString, MenuItemNameDict] = Field( + ..., + description=( + """ + The name of the menu item. Can be a dictionary if the name depends on + installation parameters. See `MenuItemNameDict` for details. + """ + ), + ) + description: str = Field( + ..., + description=("A longer description of the menu item. Shown on popup messages."), + ) + command: conlist(str, min_length=1) = Field( + ..., + description=( + """ + Command to run with the menu item, expressed as a + list of strings where each string is an argument. + """ + ), + ) + icon: Optional[NonEmptyString] = Field( + None, + description=("Path to the file representing or containing the icon."), + ) + precommand: Optional[NonEmptyString] = Field( + None, + description=( + """ + (Simple, preferrably single-line) logic to run before the command is run. + Runs before the environment is activated, if that applies. + """ + ), + ) + precreate: Optional[NonEmptyString] = Field( + None, + description=( + """ + (Simple, preferrably single-line) logic to run before the shortcut is created. + """ + ), + ) + working_dir: Optional[NonEmptyString] = Field( + None, + description=( + """ + Working directory for the running process. + Defaults to user directory on each platform. + """ + ), + ) + activate: Optional[bool] = Field( + True, + description=("Whether to activate the target environment before running `command`."), + ) + terminal: Optional[bool] = Field( + False, + description=( + """ + Whether run the program in a terminal/console or not. + On Windows, it only has an effect if `activate` is true. + On MacOS, the application will ignore command-line arguments. + """ + ), + ) + platforms: Platforms = Field( + description=( + """ + Platform-specific options. Presence of a platform field enables + menu items in that platform. + """ + ), + ) + +class MenuInstSchema(BaseModel): + "Metadata required to create menu items across operating systems with `menuinst`." + + model_config: ConfigDict = ConfigDict( + extra="forbid", + json_schema_extra={ + "$schema": SCHEMA_DIALECT, + "$id": SCHEMA_URL, + "$version": SCHEMA_VERSION, + }, + ) + + id_: NonEmptyString = Field( + SCHEMA_URL, + description="DEPRECATED. Use ``$schema``.", + alias="$id", + deprecated=True, + ) + schema_: NonEmptyString = Field( + SCHEMA_URL, + description="Version of the menuinst schema to validate against.", + alias="$schema", + ) + menu_name: NonEmptyString = Field( + ..., + description=("Name for the category containing the items specified in `menu_items`."), + ) + menu_items: conlist(MenuItem, min_length=1) = Field( + ..., + description=("List of menu entries to create across main desktop systems."), + ) + + +def dump_schema_to_json(write=True): + schema = MenuInstSchema.model_json_schema() + if write: + here = Path(__file__).parent + schema_str = json.dumps(schema, indent=2) + print(schema_str) + with open(here / "data" / f"menuinst-{SCHEMA_VERSION}.schema.json", "w") as f: + f.write(schema_str) + f.write("\n") + return schema + + +def dump_default_to_json(write=True): + here = Path(__file__).parent + default_item = MenuItem( + name="REQUIRED", + description="REQUIRED", + command=["REQUIRED"], + platforms={ + "win": Windows().model_dump(), + "osx": MacOS().model_dump(), + "linux": Linux().model_dump(), + }, + ) + default = MenuInstSchema(menu_name="REQUIRED", menu_items=[default_item]).model_dump() + default["$schema"] = SCHEMA_URL + default.pop("id_", None) + default.pop("schema_", None) + for platform_value in default["menu_items"][0]["platforms"].values(): + for key in list(platform_value.keys()): + if key in MenuItem.model_fields: + platform_value.pop(key) + if write: + pprint(default) + with open(here / "data" / f"menuinst-{SCHEMA_VERSION}.default.json", "w") as f: + json.dump(default, f, indent=2) + f.write("\n") + return default + + +def validate(metadata_or_path): + if isinstance(metadata_or_path, (str, Path)): + with open(metadata_or_path) as f: + metadata = json.load(f) + else: + metadata = metadata_or_path + return MenuInstSchema(**metadata) + + +if __name__ == "__main__": + dump_schema_to_json() + dump_default_to_json() diff --git a/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst/_vendor/apipkg/LICENSE b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst/_vendor/apipkg/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..ff33b8f7ca0b1c05bb0bdc546aa760c8e78757be --- /dev/null +++ b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst/_vendor/apipkg/LICENSE @@ -0,0 +1,18 @@ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. diff --git a/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst/_vendor/apipkg/__init__.py b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst/_vendor/apipkg/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..efd65767f14a5cbf9fa58db5a23f92e93d965ce5 --- /dev/null +++ b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst/_vendor/apipkg/__init__.py @@ -0,0 +1,39 @@ +""" +apipkg: control the exported namespace of a Python package. + +see https://pypi.python.org/pypi/apipkg + +(c) holger krekel, 2009 - MIT license +""" +from __future__ import annotations + +__all__ = ["initpkg", "ApiModule", "AliasModule", "__version__", "distribution_version"] +import sys +from typing import Any + +from ._alias_module import AliasModule +from ._importing import distribution_version as distribution_version +from ._module import _initpkg +from ._module import ApiModule +from ._version import version as __version__ + + +def initpkg( + pkgname: str, + exportdefs: dict[str, Any], + attr: dict[str, object] | None = None, + eager: bool = False, +) -> ApiModule: + """initialize given package from the export definitions.""" + attr = attr or {} + mod = sys.modules.get(pkgname) + + mod = _initpkg(mod, pkgname, exportdefs, attr=attr) + + # eagerload in bypthon to avoid their monkeypatching breaking packages + if "bpython" in sys.modules or eager: + for module in list(sys.modules.values()): + if isinstance(module, ApiModule): + getattr(module, "__dict__") + + return mod diff --git a/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst/_vendor/apipkg/_alias_module.py b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst/_vendor/apipkg/_alias_module.py new file mode 100644 index 0000000000000000000000000000000000000000..a6f219aedfbcb34d1cfeba68942c9d8e9ce42309 --- /dev/null +++ b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst/_vendor/apipkg/_alias_module.py @@ -0,0 +1,41 @@ +from __future__ import annotations + +from types import ModuleType + +from ._importing import importobj + + +def AliasModule(modname: str, modpath: str, attrname: str | None = None) -> ModuleType: + + cached_obj: object | None = None + + def getmod() -> object: + nonlocal cached_obj + if cached_obj is None: + cached_obj = importobj(modpath, attrname) + return cached_obj + + x = modpath + ("." + attrname if attrname else "") + repr_result = f"" + + class AliasModule(ModuleType): + def __repr__(self) -> str: + return repr_result + + def __getattribute__(self, name: str) -> object: + try: + return getattr(getmod(), name) + except ImportError: + if modpath == "pytest" and attrname is None: + # hack for pylibs py.test + return None + else: + raise + + def __setattr__(self, name: str, value: object) -> None: + setattr(getmod(), name, value) + + def __delattr__(self, name: str) -> None: + delattr(getmod(), name) + + return AliasModule(str(modname)) diff --git a/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst/_vendor/apipkg/_importing.py b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst/_vendor/apipkg/_importing.py new file mode 100644 index 0000000000000000000000000000000000000000..ea4587054e6dc0bb6977a385687f376ccc03cbe8 --- /dev/null +++ b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst/_vendor/apipkg/_importing.py @@ -0,0 +1,41 @@ +from __future__ import annotations + +import os +import sys + + +def _py_abspath(path: str) -> str: + """ + special version of abspath + that will leave paths from jython jars alone + """ + if path.startswith("__pyclasspath__"): + return path + else: + return os.path.abspath(path) + + +def distribution_version(name: str) -> str | None: + """try to get the version of the named distribution, + returns None on failure""" + if sys.version_info >= (3, 8): + from importlib.metadata import PackageNotFoundError, version + else: + from importlib_metadata import PackageNotFoundError, version + try: + return version(name) + except PackageNotFoundError: + return None + + +def importobj(modpath: str, attrname: str | None) -> object: + """imports a module, then resolves the attrname on it""" + module = __import__(modpath, None, None, ["__doc__"]) + if not attrname: + return module + + retval = module + names = attrname.split(".") + for x in names: + retval = getattr(retval, x) + return retval diff --git a/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst/_vendor/apipkg/_module.py b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst/_vendor/apipkg/_module.py new file mode 100644 index 0000000000000000000000000000000000000000..5088034b6e8bd0d875d00e2390a47cfe06feda1a --- /dev/null +++ b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst/_vendor/apipkg/_module.py @@ -0,0 +1,184 @@ +from __future__ import annotations + +import sys +import threading +from types import ModuleType +from typing import Any +from typing import Callable +from typing import cast +from typing import Iterable + +from ._importing import _py_abspath +from ._importing import importobj +from ._syncronized import _synchronized +from menuinst._vendor.apipkg import AliasModule + + +class ApiModule(ModuleType): + """the magical lazy-loading module standing""" + + def __docget(self) -> str | None: + try: + return self.__doc + except AttributeError: + if "__doc__" in self.__map__: + return cast(str, self.__makeattr("__doc__")) + else: + return None + + def __docset(self, value: str) -> None: + self.__doc = value + + __doc__ = property(__docget, __docset) # type: ignore + __map__: dict[str, tuple[str, str]] + + def __init__( + self, + name: str, + importspec: dict[str, Any], + implprefix: str | None = None, + attr: dict[str, Any] | None = None, + ) -> None: + super().__init__(name) + self.__name__ = name + self.__all__ = [x for x in importspec if x != "__onfirstaccess__"] + self.__map__ = {} + self.__implprefix__ = implprefix or name + if attr: + for name, val in attr.items(): + setattr(self, name, val) + for name, importspec in importspec.items(): + if isinstance(importspec, dict): + subname = f"{self.__name__}.{name}" + apimod = ApiModule(subname, importspec, implprefix) + sys.modules[subname] = apimod + setattr(self, name, apimod) + else: + parts = importspec.split(":") + modpath = parts.pop(0) + attrname = parts and parts[0] or "" + if modpath[0] == ".": + modpath = implprefix + modpath + + if not attrname: + subname = f"{self.__name__}.{name}" + apimod = AliasModule(subname, modpath) + sys.modules[subname] = apimod + if "." not in name: + setattr(self, name, apimod) + else: + self.__map__[name] = (modpath, attrname) + + def __repr__(self): + repr_list = [f"") + return "".join(repr_list) + + @_synchronized + def __makeattr(self, name, isgetattr=False): + """lazily compute value for name or raise AttributeError if unknown.""" + target = None + if "__onfirstaccess__" in self.__map__: + target = self.__map__.pop("__onfirstaccess__") + fn = cast(Callable[[], None], importobj(*target)) + fn() + try: + modpath, attrname = self.__map__[name] + except KeyError: + # __getattr__ is called when the attribute does not exist, but it may have + # been set by the onfirstaccess call above. Infinite recursion is not + # possible as __onfirstaccess__ is removed before the call (unless the call + # adds __onfirstaccess__ to __map__ explicitly, which is not our problem) + if target is not None and name != "__onfirstaccess__": + return getattr(self, name) + # Attribute may also have been set during a concurrent call to __getattr__ + # which executed after this call was already waiting on the lock. Check + # for a recently set attribute while avoiding infinite recursion: + # * Don't call __getattribute__ if __makeattr was called from a data + # descriptor such as the __doc__ or __dict__ properties, since data + # descriptors are called as part of object.__getattribute__ + # * Only call __getattribute__ if there is a possibility something has set + # the attribute we're looking for since __getattr__ was called + if threading is not None and isgetattr: + return super().__getattribute__(name) + raise AttributeError(name) + else: + result = importobj(modpath, attrname) + setattr(self, name, result) + # in a recursive-import situation a double-del can happen + self.__map__.pop(name, None) + return result + + def __getattr__(self, name): + return self.__makeattr(name, isgetattr=True) + + def __dir__(self) -> Iterable[str]: + yield from super().__dir__() + yield from self.__map__ + + @property + def __dict__(self) -> dict[str, Any]: # type: ignore + # force all the content of the module + # to be loaded when __dict__ is read + dictdescr = ModuleType.__dict__["__dict__"] # type: ignore + ns: dict[str, Any] = dictdescr.__get__(self) + if ns is not None: + hasattr(self, "some") + for name in self.__all__: + try: + self.__makeattr(name) + except AttributeError: + pass + return ns + + +_PRESERVED_MODULE_ATTRS = { + "__file__", + "__version__", + "__loader__", + "__path__", + "__package__", + "__doc__", + "__spec__", + "__dict__", +} + + +def _initpkg(mod: ModuleType | None, pkgname, exportdefs, attr=None) -> ApiModule: + """Helper for initpkg. + + Python 3.3+ uses finer grained locking for imports, and checks sys.modules before + acquiring the lock to avoid the overhead of the fine-grained locking. This + introduces a race condition when a module is imported by multiple threads + concurrently - some threads will see the initial module and some the replacement + ApiModule. We avoid this by updating the existing module in-place. + + """ + if mod is None: + d = {"__file__": None, "__spec__": None} + d.update(attr) + mod = ApiModule(pkgname, exportdefs, implprefix=pkgname, attr=d) + sys.modules[pkgname] = mod + return mod + else: + f = getattr(mod, "__file__", None) + if f: + f = _py_abspath(f) + mod.__file__ = f + if hasattr(mod, "__path__"): + mod.__path__ = [_py_abspath(p) for p in mod.__path__] + if "__doc__" in exportdefs and hasattr(mod, "__doc__"): + del mod.__doc__ + for name in dir(mod): + if name not in _PRESERVED_MODULE_ATTRS: + delattr(mod, name) + + # Updating class of existing module as per importlib.util.LazyLoader + mod.__class__ = ApiModule + apimod = cast(ApiModule, mod) + ApiModule.__init__(apimod, pkgname, exportdefs, implprefix=pkgname, attr=attr) + return apimod diff --git a/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst/_vendor/apipkg/_syncronized.py b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst/_vendor/apipkg/_syncronized.py new file mode 100644 index 0000000000000000000000000000000000000000..71d3c2cb207dea7664d39a536ba0de09342e0466 --- /dev/null +++ b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst/_vendor/apipkg/_syncronized.py @@ -0,0 +1,18 @@ +from __future__ import annotations + +import functools +import threading + + +def _synchronized(wrapped_function): + """Decorator to synchronise __getattr__ calls.""" + + # Lock shared between all instances of ApiModule to avoid possible deadlocks + lock = threading.RLock() + + @functools.wraps(wrapped_function) + def synchronized_wrapper_function(*args, **kwargs): + with lock: + return wrapped_function(*args, **kwargs) + + return synchronized_wrapper_function diff --git a/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst/_vendor/apipkg/_version.py b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst/_vendor/apipkg/_version.py new file mode 100644 index 0000000000000000000000000000000000000000..773afd396bfcaf4f0d3f3e283c8817feca2884d1 --- /dev/null +++ b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst/_vendor/apipkg/_version.py @@ -0,0 +1,5 @@ +# coding: utf-8 +# file generated by setuptools_scm +# don't change, don't track in version control +version = '3.0.1' +version_tuple = (3, 0, 1) diff --git a/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst/_vendor/apipkg/py.typed b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst/_vendor/apipkg/py.typed new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst/_version.py b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst/_version.py new file mode 100644 index 0000000000000000000000000000000000000000..acbc7a52ebe84d42a9fc54f6b0bf59adce170b3c --- /dev/null +++ b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst/_version.py @@ -0,0 +1,34 @@ +# file generated by setuptools-scm +# don't change, don't track in version control + +__all__ = [ + "__version__", + "__version_tuple__", + "version", + "version_tuple", + "__commit_id__", + "commit_id", +] + +TYPE_CHECKING = False +if TYPE_CHECKING: + from typing import Tuple + from typing import Union + + VERSION_TUPLE = Tuple[Union[int, str], ...] + COMMIT_ID = Union[str, None] +else: + VERSION_TUPLE = object + COMMIT_ID = object + +version: str +__version__: str +__version_tuple__: VERSION_TUPLE +version_tuple: VERSION_TUPLE +commit_id: COMMIT_ID +__commit_id__: COMMIT_ID + +__version__ = version = '2.4.2' +__version_tuple__ = version_tuple = (2, 4, 2) + +__commit_id__ = commit_id = None diff --git a/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst/api.py b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst/api.py new file mode 100644 index 0000000000000000000000000000000000000000..b711b1077f8aa0d92f2006c895072ad6156bec0b --- /dev/null +++ b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst/api.py @@ -0,0 +1,191 @@ +""" """ + +from __future__ import annotations + +import json +import os +import sys +import warnings +from logging import getLogger +from pathlib import Path +from typing import Callable, Union + +from .platforms import Menu, MenuItem +from .utils import ( + DEFAULT_BASE_PREFIX, + DEFAULT_PREFIX, + _UserOrSystem, + elevate_as_needed, + user_is_admin, +) + +log = getLogger(__name__) + + +__all__ = [ + "install", + "remove", + "install_all", + "remove_all", +] + + +def _maybe_try_user(base_prefix: str, target_prefix: str) -> bool: + if not user_is_admin(): + return False + if Path(target_prefix, ".nonadmin").is_file(): + return True + return Path(base_prefix, ".nonadmin").is_file() + + +def _load( + metadata_or_path: os.PathLike | dict, + target_prefix: str | None = None, + base_prefix: str | None = None, + _mode: _UserOrSystem = "user", +) -> tuple[Menu, list[MenuItem]]: + target_prefix = target_prefix or DEFAULT_PREFIX + base_prefix = base_prefix or DEFAULT_BASE_PREFIX + if isinstance(metadata_or_path, (str, Path)): + with open(metadata_or_path) as f: + metadata = json.load(f) + else: + metadata = metadata_or_path + menu = Menu(metadata["menu_name"], target_prefix, base_prefix, _mode) + menu_items = [MenuItem(menu, item) for item in metadata["menu_items"]] + return menu, menu_items + + +@elevate_as_needed +def install( + metadata_or_path: Union[os.PathLike, dict], + *, + target_prefix: str | None = None, + base_prefix: str | None = None, + _mode: _UserOrSystem = "user", +) -> list[os.PathLike]: + target_prefix = target_prefix or DEFAULT_PREFIX + base_prefix = base_prefix or DEFAULT_BASE_PREFIX + menu, menu_items = _load(metadata_or_path, target_prefix, base_prefix, _mode) + if not any(item.enabled_for_platform() for item in menu_items): + warnings.warn(f"Metadata for {menu.name} is not enabled for {sys.platform}") + return [] + + paths = [] + paths += menu.create() + for menu_item in menu_items: + paths += menu_item.create() + + return paths + + +@elevate_as_needed +def remove( + metadata_or_path: Union[os.PathLike, dict], + *, + target_prefix: str | None = None, + base_prefix: str | None = None, + _mode: _UserOrSystem = "user", +) -> list[os.PathLike]: + target_prefix = target_prefix or DEFAULT_PREFIX + base_prefix = base_prefix or DEFAULT_BASE_PREFIX + menu, menu_items = _load(metadata_or_path, target_prefix, base_prefix, _mode) + if not any(item.enabled_for_platform() for item in menu_items): + warnings.warn(f"Metadata for {menu.name} is not enabled for {sys.platform}") + return [] + + paths = [] + for menu_item in menu_items: + paths += menu_item.remove() + paths += menu.remove() + + if not paths and _maybe_try_user(target_prefix, base_prefix): + menu, menu_items = _load(metadata_or_path, target_prefix, base_prefix, "user") + for menu_item in menu_items: + paths += menu_item.remove() + paths += menu.remove() + + return paths + + +@elevate_as_needed +def install_all( + *, + target_prefix: str | None = None, + base_prefix: str | None = None, + filter: Callable | None = None, + _mode: _UserOrSystem = "user", +) -> list[tuple[os.PathLike]]: + target_prefix = target_prefix or DEFAULT_PREFIX + base_prefix = base_prefix or DEFAULT_BASE_PREFIX + return _process_all(install, target_prefix, base_prefix, filter, _mode) + + +@elevate_as_needed +def remove_all( + *, + target_prefix: str | None = None, + base_prefix: str | None = None, + filter: Callable | None = None, + _mode: _UserOrSystem = "user", +) -> list[tuple[os.PathLike]]: + target_prefix = target_prefix or DEFAULT_PREFIX + base_prefix = base_prefix or DEFAULT_BASE_PREFIX + return _process_all(remove, target_prefix, base_prefix, filter, _mode) + + +def _process_all( + function: Callable[ + [Union[os.PathLike, dict], str | None, str | None, _UserOrSystem], list[os.PathLike] + ], + target_prefix: str | None = None, + base_prefix: str | None = None, + filter: Callable | None = None, + _mode: _UserOrSystem = "user", +) -> list[tuple[os.PathLike]]: + target_prefix = target_prefix or DEFAULT_PREFIX + base_prefix = base_prefix or DEFAULT_BASE_PREFIX + jsons = (Path(target_prefix) / "Menu").glob("*.json") + results = [] + for path in jsons: + if filter is not None and filter(path): + results.append(function(path, target_prefix, base_prefix, _mode)) + return results + + +_api_remove = remove # alias to prevent shadowing in the function below + + +def _install_adapter(path: str, remove: bool = False, prefix: str = DEFAULT_PREFIX, **kwargs): + """ + This function is only here as a legacy adapter for menuinst v1.x. + Please use `menuinst.api` functions instead. + """ + if os.name == "nt": + path = path.replace("/", "\\") + json_path = os.path.join(prefix, path) + with open(json_path) as f: + metadata = json.load(f) + if "$schema" not in metadata and "$id" not in metadata: # old style JSON + from ._legacy import install as _legacy_install + + if os.name == "nt": + kwargs.setdefault("root_prefix", kwargs.pop("base_prefix", DEFAULT_BASE_PREFIX)) + if kwargs["root_prefix"] is None: + kwargs["root_prefix"] = DEFAULT_BASE_PREFIX + _legacy_install(json_path, remove=remove, prefix=prefix, **kwargs) + else: + log.warning( + "menuinst._legacy is only supported on Windows. " + "Switch to the new-style menu definitions " + "for cross-platform compatibility." + ) + else: + # patch kwargs to reroute root_prefix to base_prefix + kwargs.setdefault("base_prefix", kwargs.pop("root_prefix", DEFAULT_BASE_PREFIX)) + if kwargs["base_prefix"] is None: + kwargs["base_prefix"] = DEFAULT_BASE_PREFIX + if remove: + _api_remove(metadata, target_prefix=prefix, **kwargs) + else: + install(metadata, target_prefix=prefix, **kwargs) diff --git a/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst/cli/__init__.py b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst/cli/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ed32c05eb7a24557e824c24abb90233b27ddf678 --- /dev/null +++ b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst/cli/__init__.py @@ -0,0 +1,3 @@ +from .cli import main + +__all__ = ["main"] diff --git a/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst/cli/cli.py b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst/cli/cli.py new file mode 100644 index 0000000000000000000000000000000000000000..133eb8548a6a541967dd53d7fc75a0ef9491de39 --- /dev/null +++ b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst/cli/cli.py @@ -0,0 +1,99 @@ +from __future__ import annotations + +import argparse +import re +import sys +from pathlib import Path + +from ..api import _install_adapter + +_MENU_RE = re.compile(r"(?:[-\._]menu)?\.json$", re.IGNORECASE) + + +def _add_install_group(parser: argparse.ArgumentParser) -> None: + install_group = parser.add_mutually_exclusive_group(required=True) + install_group.add_argument( + "--install", + nargs="*", + metavar="PKG", + help="create menu items for the given metadata JSON files or packages; " + "if none are given, create menu items for all packages " + "in the prefix", + ) + install_group.add_argument( + "--remove", + nargs="*", + metavar="PKG", + help="remove menu items for the given metadata JSON files or packages; " + "if none are given, remove menu items for all packages " + "in the prefix", + ) + + +def _add_prefix(parser: argparse.ArgumentParser): + parser.add_argument( + "--prefix", + required=True, + help="The prefix containing the shortcuts metadate inside `Menu`", + ) + + +def _add_root_prefix(parser: argparse.ArgumentParser): + parser.add_argument( + "--root-prefix", + help="The menuinst base/root prefix", + ) + + +def configure_parser(parser: argparse.ArgumentParser) -> None: + _add_prefix(parser) + _add_install_group(parser) + _add_root_prefix(parser) + + +def install( + prefix: Path, + root_prefix: str | None = None, + install_shortcuts: list[str] | None = None, + remove_shortcuts: list[str] | None = None, +): + packages = None + if install_shortcuts is not None: + packages = install_shortcuts + remove = False + elif remove_shortcuts is not None: + packages = remove_shortcuts + remove = True + else: + raise argparse.ArgumentError(None, "Must select shortcuts to install or remove.") + + if root_prefix: + root_prefix = str(Path(root_prefix).expanduser().resolve()) + + for json_path in (prefix / "Menu").glob("*.json"): + if ( + packages + and json_path.name not in packages + and _MENU_RE.sub("", json_path.name) not in packages + ): + continue + _install_adapter( + str(json_path), remove=remove, prefix=str(prefix), root_prefix=root_prefix + ) + + +def main(argv: list[str] | None = None): + argv = sys.argv[1:] if argv is None else argv + parser = argparse.ArgumentParser() + configure_parser(parser) + args = parser.parse_args(argv) + install( + Path(args.prefix).expanduser().resolve(), + root_prefix=args.root_prefix, + install_shortcuts=args.install, + remove_shortcuts=args.remove, + ) + + +if __name__ == "__main__": + main() diff --git a/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst/conda_plugin.py b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst/conda_plugin.py new file mode 100644 index 0000000000000000000000000000000000000000..328bc354d9b37ea99991068fd689b8e854695e3b --- /dev/null +++ b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst/conda_plugin.py @@ -0,0 +1,59 @@ +from __future__ import annotations + +import os +from pathlib import Path +from typing import TYPE_CHECKING + +from .cli.cli import _add_install_group, _add_root_prefix, install + +try: + from conda.base.context import context, locate_prefix_by_name, reset_context + from conda.cli.helpers import add_parser_prefix + from conda.plugins.hookspec import hookimpl + from conda.plugins.types import CondaSubcommand +except ImportError as e: + raise ImportError("Plugin requires `conda` to be installed.") from e + +if TYPE_CHECKING: + from argparse import ArgumentParser, Namespace + from collections.abc import Iterator + + +def configure_parser(parser: ArgumentParser): + _add_install_group(parser) + add_parser_prefix(parser) + _add_root_prefix(parser) + + +def execute(args: Namespace): + root_prefix = args.root_prefix + if root_prefix: + root_prefix = str(Path(root_prefix).expanduser().resolve()) + + if args.prefix: + prefix_raw = args.prefix + elif args.name: + if root_prefix: + os.environ["CONDA_ROOT_PREFIX"] = root_prefix + reset_context(search_path=context._search_path, argparse_args=context._argparse_args) + prefix_raw = locate_prefix_by_name(args.name) + elif not (prefix_raw := os.environ.get("CONDA_PREFIX")): + raise ValueError("No active prefix found and no --prefix or --name given.") + prefix = Path(prefix_raw).expanduser().resolve() + install( + prefix, + install_shortcuts=args.install, + remove_shortcuts=args.remove, + root_prefix=root_prefix, + ) + + +@hookimpl +def conda_subcommands() -> Iterator[CondaSubcommand]: + """Return a list of subcommands for the plugin.""" + yield CondaSubcommand( + name="menuinst", + action=execute, + summary="A subcommand for installing and removing shortcuts via menuinst.", + configure_parser=configure_parser, + ) diff --git a/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst/data/menuinst-1-0-0.default.json b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst/data/menuinst-1-0-0.default.json new file mode 100644 index 0000000000000000000000000000000000000000..b220ad39118131774470cfb959bf8760d68ac878 --- /dev/null +++ b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst/data/menuinst-1-0-0.default.json @@ -0,0 +1,66 @@ +{ + "id_": "https://schemas.conda.io/menuinst-1.schema.json", + "schema_": "https://json-schema.org/draft-07/schema", + "menu_name": "REQUIRED", + "menu_items": [ + { + "name": "REQUIRED", + "description": "REQUIRED", + "command": [ + "REQUIRED" + ], + "icon": null, + "precommand": null, + "precreate": null, + "working_dir": null, + "activate": true, + "terminal": false, + "platforms": { + "linux": { + "Categories": null, + "DBusActivatable": null, + "GenericName": null, + "Hidden": null, + "Implements": null, + "Keywords": null, + "MimeType": null, + "NoDisplay": null, + "NotShowIn": null, + "OnlyShowIn": null, + "PrefersNonDefaultGPU": null, + "StartupNotify": null, + "StartupWMClass": null, + "TryExec": null, + "glob_patterns": null + }, + "osx": { + "CFBundleDisplayName": null, + "CFBundleIdentifier": null, + "CFBundleName": null, + "CFBundleSpokenName": null, + "CFBundleVersion": null, + "CFBundleURLTypes": null, + "CFBundleDocumentTypes": null, + "LSApplicationCategoryType": null, + "LSBackgroundOnly": null, + "LSEnvironment": null, + "LSMinimumSystemVersion": null, + "LSMultipleInstancesProhibited": null, + "LSRequiresNativeExecution": null, + "UTExportedTypeDeclarations": null, + "UTImportedTypeDeclarations": null, + "entitlements": null, + "link_in_bundle": null, + "event_handler": null + }, + "win": { + "desktop": true, + "quicklaunch": true, + "url_protocols": null, + "file_extensions": null, + "app_user_model_id": null + } + } + } + ] +} diff --git a/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst/data/menuinst-1-0-0.schema.json b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst/data/menuinst-1-0-0.schema.json new file mode 100644 index 0000000000000000000000000000000000000000..b76b8ba7bf99c2962ff4395827584996db11f437 --- /dev/null +++ b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst/data/menuinst-1-0-0.schema.json @@ -0,0 +1,676 @@ +{ + "title": "MenuInstSchema", + "description": "Metadata required to create menu items across operating systems with ``menuinst``.", + "type": "object", + "properties": { + "$id": { + "title": "$Id", + "description": "Version of the menuinst schema.", + "enum": [ + "https://schemas.conda.io/menuinst-1.schema.json" + ], + "type": "string" + }, + "$schema": { + "title": "$Schema", + "description": "Standard of the JSON schema we adhere to.", + "enum": [ + "https://json-schema.org/draft-07/schema" + ], + "type": "string" + }, + "menu_name": { + "title": "Menu Name", + "minLength": 1, + "type": "string" + }, + "menu_items": { + "title": "Menu Items", + "minItems": 1, + "type": "array", + "items": { + "$ref": "#/definitions/MenuItem" + } + } + }, + "required": [ + "$id", + "$schema", + "menu_name", + "menu_items" + ], + "additionalProperties": false, + "definitions": { + "Linux": { + "title": "Linux", + "description": "Linux-specific instructions.\n\nCheck the `Desktop entry specification `__ for more details.\n\n.. desktop-entry-spec: https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html#recognized-keys", + "type": "object", + "properties": { + "name": { + "title": "Name", + "minLength": 1, + "type": "string" + }, + "description": { + "title": "Description", + "type": "string" + }, + "icon": { + "title": "Icon", + "minLength": 1, + "type": "string" + }, + "command": { + "title": "Command", + "minItems": 1, + "type": "array", + "items": { + "type": "string" + } + }, + "working_dir": { + "title": "Working Dir", + "minLength": 1, + "type": "string" + }, + "precommand": { + "title": "Precommand", + "minLength": 1, + "type": "string" + }, + "precreate": { + "title": "Precreate", + "minLength": 1, + "type": "string" + }, + "activate": { + "title": "Activate", + "type": "boolean" + }, + "terminal": { + "title": "Terminal", + "type": "boolean" + }, + "Categories": { + "title": "Categories", + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "string", + "pattern": "^.+;$" + } + ] + }, + "DBusActivatable": { + "title": "Dbusactivatable", + "type": "boolean" + }, + "GenericName": { + "title": "Genericname", + "type": "string" + }, + "Hidden": { + "title": "Hidden", + "type": "boolean" + }, + "Implements": { + "title": "Implements", + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "string", + "pattern": "^.+;$" + } + ] + }, + "Keywords": { + "title": "Keywords", + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "string", + "pattern": "^.+;$" + } + ] + }, + "MimeType": { + "title": "Mimetype", + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "string", + "pattern": "^.+;$" + } + ] + }, + "NoDisplay": { + "title": "Nodisplay", + "type": "boolean" + }, + "NotShowIn": { + "title": "Notshowin", + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "string", + "pattern": "^.+;$" + } + ] + }, + "OnlyShowIn": { + "title": "Onlyshowin", + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "string", + "pattern": "^.+;$" + } + ] + }, + "PrefersNonDefaultGPU": { + "title": "Prefersnondefaultgpu", + "type": "boolean" + }, + "StartupNotify": { + "title": "Startupnotify", + "type": "boolean" + }, + "StartupWMClass": { + "title": "Startupwmclass", + "type": "string" + }, + "TryExec": { + "title": "Tryexec", + "type": "string" + }, + "glob_patterns": { + "title": "Glob Patterns", + "type": "object", + "additionalProperties": { + "type": "string", + "pattern": ".*\\*.*" + } + } + }, + "additionalProperties": false + }, + "CFBundleURLTypesModel": { + "title": "CFBundleURLTypesModel", + "description": "Describes a URL scheme associated with the app.", + "type": "object", + "properties": { + "CFBundleTypeRole": { + "title": "Cfbundletyperole", + "enum": [ + "Editor", + "Viewer", + "Shell", + "None" + ], + "type": "string" + }, + "CFBundleURLSchemes": { + "title": "Cfbundleurlschemes", + "type": "array", + "items": { + "type": "string" + } + }, + "CFBundleURLName": { + "title": "Cfbundleurlname", + "type": "string" + }, + "CFBundleURLIconFile": { + "title": "Cfbundleurliconfile", + "type": "string" + } + }, + "required": [ + "CFBundleURLSchemes" + ], + "additionalProperties": false + }, + "CFBundleDocumentTypesModel": { + "title": "CFBundleDocumentTypesModel", + "description": "Describes a document type associated with the app.", + "type": "object", + "properties": { + "CFBundleTypeIconFile": { + "title": "Cfbundletypeiconfile", + "type": "string" + }, + "CFBundleTypeName": { + "title": "Cfbundletypename", + "type": "string" + }, + "CFBundleTypeRole": { + "title": "Cfbundletyperole", + "enum": [ + "Editor", + "Viewer", + "Shell", + "None" + ], + "type": "string" + }, + "LSItemContentTypes": { + "title": "Lsitemcontenttypes", + "type": "array", + "items": { + "type": "string" + } + }, + "LSHandlerRank": { + "title": "Lshandlerrank", + "enum": [ + "Owner", + "Default", + "Alternate" + ], + "type": "string" + } + }, + "required": [ + "CFBundleTypeName", + "LSItemContentTypes", + "LSHandlerRank" + ], + "additionalProperties": false + }, + "UTTypeDeclarationModel": { + "title": "UTTypeDeclarationModel", + "type": "object", + "properties": { + "UTTypeConformsTo": { + "title": "Uttypeconformsto", + "type": "array", + "items": { + "type": "string" + } + }, + "UTTypeDescription": { + "title": "Uttypedescription", + "type": "string" + }, + "UTTypeIconFile": { + "title": "Uttypeiconfile", + "type": "string" + }, + "UTTypeIdentifier": { + "title": "Uttypeidentifier", + "type": "string" + }, + "UTTypeReferenceURL": { + "title": "Uttypereferenceurl", + "type": "string" + }, + "UTTypeTagSpecification": { + "title": "Uttypetagspecification", + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "required": [ + "UTTypeConformsTo", + "UTTypeIdentifier", + "UTTypeTagSpecification" + ], + "additionalProperties": false + }, + "MacOS": { + "title": "MacOS", + "description": "Mac-specific instructions. Check these URLs for more info:\n\n- ``CF*`` keys: see `Core Foundation Keys `_\n- ``LS*`` keys: see `Launch Services Keys `_\n- ``entitlements``: see `entitlements docs `_\n\n.. _cf-keys: https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html\n.. _ls-keys: https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/LaunchServicesKeys.html\n.. _entitlements-docs: https://developer.apple.com/documentation/bundleresources/entitlements.", + "type": "object", + "properties": { + "name": { + "title": "Name", + "minLength": 1, + "type": "string" + }, + "description": { + "title": "Description", + "type": "string" + }, + "icon": { + "title": "Icon", + "minLength": 1, + "type": "string" + }, + "command": { + "title": "Command", + "minItems": 1, + "type": "array", + "items": { + "type": "string" + } + }, + "working_dir": { + "title": "Working Dir", + "minLength": 1, + "type": "string" + }, + "precommand": { + "title": "Precommand", + "minLength": 1, + "type": "string" + }, + "precreate": { + "title": "Precreate", + "minLength": 1, + "type": "string" + }, + "activate": { + "title": "Activate", + "type": "boolean" + }, + "terminal": { + "title": "Terminal", + "type": "boolean" + }, + "CFBundleDisplayName": { + "title": "Cfbundledisplayname", + "type": "string" + }, + "CFBundleIdentifier": { + "title": "Cfbundleidentifier", + "pattern": "^[A-z0-9\\-\\.]+$", + "type": "string" + }, + "CFBundleName": { + "title": "Cfbundlename", + "maxLength": 16, + "type": "string" + }, + "CFBundleSpokenName": { + "title": "Cfbundlespokenname", + "type": "string" + }, + "CFBundleVersion": { + "title": "Cfbundleversion", + "pattern": "^\\S+$", + "type": "string" + }, + "CFBundleURLTypes": { + "title": "Cfbundleurltypes", + "type": "array", + "items": { + "$ref": "#/definitions/CFBundleURLTypesModel" + } + }, + "CFBundleDocumentTypes": { + "title": "Cfbundledocumenttypes", + "type": "array", + "items": { + "$ref": "#/definitions/CFBundleDocumentTypesModel" + } + }, + "LSApplicationCategoryType": { + "title": "Lsapplicationcategorytype", + "pattern": "^public\\.app-category\\.\\S+$", + "type": "string" + }, + "LSBackgroundOnly": { + "title": "Lsbackgroundonly", + "type": "boolean" + }, + "LSEnvironment": { + "title": "Lsenvironment", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "LSMinimumSystemVersion": { + "title": "Lsminimumsystemversion", + "pattern": "^\\d+\\.\\d+\\.\\d+$", + "type": "string" + }, + "LSMultipleInstancesProhibited": { + "title": "Lsmultipleinstancesprohibited", + "type": "boolean" + }, + "LSRequiresNativeExecution": { + "title": "Lsrequiresnativeexecution", + "type": "boolean" + }, + "UTExportedTypeDeclarations": { + "title": "Utexportedtypedeclarations", + "type": "array", + "items": { + "$ref": "#/definitions/UTTypeDeclarationModel" + } + }, + "UTImportedTypeDeclarations": { + "title": "Utimportedtypedeclarations", + "type": "array", + "items": { + "$ref": "#/definitions/UTTypeDeclarationModel" + } + }, + "entitlements": { + "title": "Entitlements", + "type": "array", + "items": { + "type": "string", + "pattern": "[a-z0-9\\.\\-]+" + } + }, + "link_in_bundle": { + "title": "Link In Bundle", + "type": "object", + "additionalProperties": { + "type": "string", + "pattern": "^(?!\\/)(?!\\.\\./).*" + } + }, + "event_handler": { + "title": "Event Handler", + "minLength": 1, + "type": "string" + } + }, + "additionalProperties": false + }, + "Windows": { + "title": "Windows", + "description": "Windows-specific instructions. You can override global keys here if needed", + "type": "object", + "properties": { + "name": { + "title": "Name", + "minLength": 1, + "type": "string" + }, + "description": { + "title": "Description", + "type": "string" + }, + "icon": { + "title": "Icon", + "minLength": 1, + "type": "string" + }, + "command": { + "title": "Command", + "minItems": 1, + "type": "array", + "items": { + "type": "string" + } + }, + "working_dir": { + "title": "Working Dir", + "minLength": 1, + "type": "string" + }, + "precommand": { + "title": "Precommand", + "minLength": 1, + "type": "string" + }, + "precreate": { + "title": "Precreate", + "minLength": 1, + "type": "string" + }, + "activate": { + "title": "Activate", + "type": "boolean" + }, + "terminal": { + "title": "Terminal", + "type": "boolean" + }, + "desktop": { + "title": "Desktop", + "default": true, + "type": "boolean" + }, + "quicklaunch": { + "title": "Quicklaunch", + "default": true, + "type": "boolean" + }, + "url_protocols": { + "title": "Url Protocols", + "type": "array", + "items": { + "type": "string", + "pattern": "\\S+" + } + }, + "file_extensions": { + "title": "File Extensions", + "type": "array", + "items": { + "type": "string", + "pattern": "\\.\\S*" + } + }, + "app_user_model_id": { + "title": "App User Model Id", + "maxLength": 128, + "pattern": "\\S+\\.\\S+", + "type": "string" + } + }, + "additionalProperties": false + }, + "Platforms": { + "title": "Platforms", + "description": "Platform specific options.\n\nNote each of these fields supports the same keys as the top-level :class:`MenuItem`\n(sans ``platforms`` itself), in case overrides are needed.", + "type": "object", + "properties": { + "linux": { + "$ref": "#/definitions/Linux" + }, + "osx": { + "$ref": "#/definitions/MacOS" + }, + "win": { + "$ref": "#/definitions/Windows" + } + }, + "additionalProperties": false + }, + "MenuItem": { + "title": "MenuItem", + "description": "Instructions to create a menu item across operating systems.", + "type": "object", + "properties": { + "name": { + "title": "Name", + "minLength": 1, + "type": "string" + }, + "description": { + "title": "Description", + "type": "string" + }, + "command": { + "title": "Command", + "minItems": 1, + "type": "array", + "items": { + "type": "string" + } + }, + "icon": { + "title": "Icon", + "minLength": 1, + "type": "string" + }, + "precommand": { + "title": "Precommand", + "minLength": 1, + "type": "string" + }, + "precreate": { + "title": "Precreate", + "minLength": 1, + "type": "string" + }, + "working_dir": { + "title": "Working Dir", + "minLength": 1, + "type": "string" + }, + "activate": { + "title": "Activate", + "default": true, + "type": "boolean" + }, + "terminal": { + "title": "Terminal", + "default": false, + "type": "boolean" + }, + "platforms": { + "$ref": "#/definitions/Platforms" + } + }, + "required": [ + "name", + "description", + "command", + "platforms" + ], + "additionalProperties": false + } + } +} diff --git a/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst/data/menuinst-1-0-1.default.json b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst/data/menuinst-1-0-1.default.json new file mode 100644 index 0000000000000000000000000000000000000000..c9acad433d51244392ad0cea1d18aacb9c8912f1 --- /dev/null +++ b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst/data/menuinst-1-0-1.default.json @@ -0,0 +1,68 @@ +{ + "id_": "https://schemas.conda.io/menuinst-1.schema.json", + "schema_": "https://json-schema.org/draft-07/schema", + "menu_name": "REQUIRED", + "menu_items": [ + { + "name": "REQUIRED", + "description": "REQUIRED", + "command": [ + "REQUIRED" + ], + "icon": null, + "precommand": null, + "precreate": null, + "working_dir": null, + "activate": true, + "terminal": false, + "platforms": { + "linux": { + "Categories": null, + "DBusActivatable": null, + "GenericName": null, + "Hidden": null, + "Implements": null, + "Keywords": null, + "MimeType": null, + "NoDisplay": null, + "NotShowIn": null, + "OnlyShowIn": null, + "PrefersNonDefaultGPU": null, + "StartupNotify": null, + "StartupWMClass": null, + "TryExec": null, + "glob_patterns": null + }, + "osx": { + "CFBundleDisplayName": null, + "CFBundleIdentifier": null, + "CFBundleName": null, + "CFBundleSpokenName": null, + "CFBundleVersion": null, + "CFBundleURLTypes": null, + "CFBundleDocumentTypes": null, + "LSApplicationCategoryType": null, + "LSBackgroundOnly": null, + "LSEnvironment": null, + "LSMinimumSystemVersion": null, + "LSMultipleInstancesProhibited": null, + "LSRequiresNativeExecution": null, + "NSSupportsAutomaticGraphicsSwitching": null, + "UTExportedTypeDeclarations": null, + "UTImportedTypeDeclarations": null, + "entitlements": null, + "link_in_bundle": null, + "event_handler": null + }, + "win": { + "desktop": true, + "quicklaunch": true, + "terminal_profile": null, + "url_protocols": null, + "file_extensions": null, + "app_user_model_id": null + } + } + } + ] +} diff --git a/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst/data/menuinst-1-0-1.schema.json b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst/data/menuinst-1-0-1.schema.json new file mode 100644 index 0000000000000000000000000000000000000000..9e49980bf18b012d3f140ee05cf8a8403d8fa370 --- /dev/null +++ b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst/data/menuinst-1-0-1.schema.json @@ -0,0 +1,731 @@ +{ + "title": "MenuInstSchema", + "description": "Metadata required to create menu items across operating systems with ``menuinst``.", + "type": "object", + "properties": { + "$id": { + "title": "$Id", + "description": "Version of the menuinst schema.", + "enum": [ + "https://schemas.conda.io/menuinst-1.schema.json" + ], + "type": "string" + }, + "$schema": { + "title": "$Schema", + "description": "Standard of the JSON schema we adhere to.", + "enum": [ + "https://json-schema.org/draft-07/schema" + ], + "type": "string" + }, + "menu_name": { + "title": "Menu Name", + "minLength": 1, + "type": "string" + }, + "menu_items": { + "title": "Menu Items", + "minItems": 1, + "type": "array", + "items": { + "$ref": "#/definitions/MenuItem" + } + } + }, + "required": [ + "$id", + "$schema", + "menu_name", + "menu_items" + ], + "additionalProperties": false, + "definitions": { + "MenuItemNameDict": { + "title": "MenuItemNameDict", + "description": "Variable menu item name.\nUse this dictionary if the menu item name depends on installation parameters\nsuch as the target environment.", + "type": "object", + "properties": { + "target_environment_is_base": { + "title": "Target Environment Is Base", + "minLength": 1, + "type": "string" + }, + "target_environment_is_not_base": { + "title": "Target Environment Is Not Base", + "minLength": 1, + "type": "string" + } + }, + "additionalProperties": false + }, + "Linux": { + "title": "Linux", + "description": "Linux-specific instructions.\n\nCheck the `Desktop entry specification\n`__\nfor more details.", + "type": "object", + "properties": { + "name": { + "title": "Name", + "anyOf": [ + { + "type": "string", + "minLength": 1 + }, + { + "$ref": "#/definitions/MenuItemNameDict" + } + ] + }, + "description": { + "title": "Description", + "type": "string" + }, + "icon": { + "title": "Icon", + "minLength": 1, + "type": "string" + }, + "command": { + "title": "Command", + "minItems": 1, + "type": "array", + "items": { + "type": "string" + } + }, + "working_dir": { + "title": "Working Dir", + "minLength": 1, + "type": "string" + }, + "precommand": { + "title": "Precommand", + "minLength": 1, + "type": "string" + }, + "precreate": { + "title": "Precreate", + "minLength": 1, + "type": "string" + }, + "activate": { + "title": "Activate", + "type": "boolean" + }, + "terminal": { + "title": "Terminal", + "type": "boolean" + }, + "Categories": { + "title": "Categories", + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "string", + "pattern": "^.+;$" + } + ] + }, + "DBusActivatable": { + "title": "Dbusactivatable", + "type": "boolean" + }, + "GenericName": { + "title": "Genericname", + "type": "string" + }, + "Hidden": { + "title": "Hidden", + "type": "boolean" + }, + "Implements": { + "title": "Implements", + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "string", + "pattern": "^.+;$" + } + ] + }, + "Keywords": { + "title": "Keywords", + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "string", + "pattern": "^.+;$" + } + ] + }, + "MimeType": { + "title": "Mimetype", + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "string", + "pattern": "^.+;$" + } + ] + }, + "NoDisplay": { + "title": "Nodisplay", + "type": "boolean" + }, + "NotShowIn": { + "title": "Notshowin", + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "string", + "pattern": "^.+;$" + } + ] + }, + "OnlyShowIn": { + "title": "Onlyshowin", + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "string", + "pattern": "^.+;$" + } + ] + }, + "PrefersNonDefaultGPU": { + "title": "Prefersnondefaultgpu", + "type": "boolean" + }, + "StartupNotify": { + "title": "Startupnotify", + "type": "boolean" + }, + "StartupWMClass": { + "title": "Startupwmclass", + "type": "string" + }, + "TryExec": { + "title": "Tryexec", + "type": "string" + }, + "glob_patterns": { + "title": "Glob Patterns", + "type": "object", + "additionalProperties": { + "type": "string", + "pattern": ".*\\*.*" + } + } + }, + "additionalProperties": false + }, + "CFBundleURLTypesModel": { + "title": "CFBundleURLTypesModel", + "description": "Describes a URL scheme associated with the app.", + "type": "object", + "properties": { + "CFBundleTypeRole": { + "title": "Cfbundletyperole", + "enum": [ + "Editor", + "Viewer", + "Shell", + "None" + ], + "type": "string" + }, + "CFBundleURLSchemes": { + "title": "Cfbundleurlschemes", + "type": "array", + "items": { + "type": "string" + } + }, + "CFBundleURLName": { + "title": "Cfbundleurlname", + "type": "string" + }, + "CFBundleURLIconFile": { + "title": "Cfbundleurliconfile", + "type": "string" + } + }, + "required": [ + "CFBundleURLSchemes" + ], + "additionalProperties": false + }, + "CFBundleDocumentTypesModel": { + "title": "CFBundleDocumentTypesModel", + "description": "Describes a document type associated with the app.", + "type": "object", + "properties": { + "CFBundleTypeIconFile": { + "title": "Cfbundletypeiconfile", + "type": "string" + }, + "CFBundleTypeName": { + "title": "Cfbundletypename", + "type": "string" + }, + "CFBundleTypeRole": { + "title": "Cfbundletyperole", + "enum": [ + "Editor", + "Viewer", + "Shell", + "None" + ], + "type": "string" + }, + "LSItemContentTypes": { + "title": "Lsitemcontenttypes", + "type": "array", + "items": { + "type": "string" + } + }, + "LSHandlerRank": { + "title": "Lshandlerrank", + "enum": [ + "Owner", + "Default", + "Alternate" + ], + "type": "string" + } + }, + "required": [ + "CFBundleTypeName", + "LSItemContentTypes", + "LSHandlerRank" + ], + "additionalProperties": false + }, + "UTTypeDeclarationModel": { + "title": "UTTypeDeclarationModel", + "type": "object", + "properties": { + "UTTypeConformsTo": { + "title": "Uttypeconformsto", + "type": "array", + "items": { + "type": "string" + } + }, + "UTTypeDescription": { + "title": "Uttypedescription", + "type": "string" + }, + "UTTypeIconFile": { + "title": "Uttypeiconfile", + "type": "string" + }, + "UTTypeIdentifier": { + "title": "Uttypeidentifier", + "type": "string" + }, + "UTTypeReferenceURL": { + "title": "Uttypereferenceurl", + "type": "string" + }, + "UTTypeTagSpecification": { + "title": "Uttypetagspecification", + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "required": [ + "UTTypeConformsTo", + "UTTypeIdentifier", + "UTTypeTagSpecification" + ], + "additionalProperties": false + }, + "MacOS": { + "title": "MacOS", + "description": "Mac-specific instructions. Check these URLs for more info:\n\n- ``CF*`` keys: see `Core Foundation Keys `__\n- ``LS*`` keys: see `Launch Services Keys `__\n- ``entitlements``: see `Entitlements documentation `__", + "type": "object", + "properties": { + "name": { + "title": "Name", + "anyOf": [ + { + "type": "string", + "minLength": 1 + }, + { + "$ref": "#/definitions/MenuItemNameDict" + } + ] + }, + "description": { + "title": "Description", + "type": "string" + }, + "icon": { + "title": "Icon", + "minLength": 1, + "type": "string" + }, + "command": { + "title": "Command", + "minItems": 1, + "type": "array", + "items": { + "type": "string" + } + }, + "working_dir": { + "title": "Working Dir", + "minLength": 1, + "type": "string" + }, + "precommand": { + "title": "Precommand", + "minLength": 1, + "type": "string" + }, + "precreate": { + "title": "Precreate", + "minLength": 1, + "type": "string" + }, + "activate": { + "title": "Activate", + "type": "boolean" + }, + "terminal": { + "title": "Terminal", + "type": "boolean" + }, + "CFBundleDisplayName": { + "title": "Cfbundledisplayname", + "type": "string" + }, + "CFBundleIdentifier": { + "title": "Cfbundleidentifier", + "pattern": "^[A-z0-9\\-\\.]+$", + "type": "string" + }, + "CFBundleName": { + "title": "Cfbundlename", + "maxLength": 16, + "type": "string" + }, + "CFBundleSpokenName": { + "title": "Cfbundlespokenname", + "type": "string" + }, + "CFBundleVersion": { + "title": "Cfbundleversion", + "pattern": "^\\S+$", + "type": "string" + }, + "CFBundleURLTypes": { + "title": "Cfbundleurltypes", + "type": "array", + "items": { + "$ref": "#/definitions/CFBundleURLTypesModel" + } + }, + "CFBundleDocumentTypes": { + "title": "Cfbundledocumenttypes", + "type": "array", + "items": { + "$ref": "#/definitions/CFBundleDocumentTypesModel" + } + }, + "LSApplicationCategoryType": { + "title": "Lsapplicationcategorytype", + "pattern": "^public\\.app-category\\.\\S+$", + "type": "string" + }, + "LSBackgroundOnly": { + "title": "Lsbackgroundonly", + "type": "boolean" + }, + "LSEnvironment": { + "title": "Lsenvironment", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "LSMinimumSystemVersion": { + "title": "Lsminimumsystemversion", + "pattern": "^\\d+\\.\\d+\\.\\d+$", + "type": "string" + }, + "LSMultipleInstancesProhibited": { + "title": "Lsmultipleinstancesprohibited", + "type": "boolean" + }, + "LSRequiresNativeExecution": { + "title": "Lsrequiresnativeexecution", + "type": "boolean" + }, + "NSSupportsAutomaticGraphicsSwitching": { + "title": "Nssupportsautomaticgraphicsswitching", + "type": "boolean" + }, + "UTExportedTypeDeclarations": { + "title": "Utexportedtypedeclarations", + "type": "array", + "items": { + "$ref": "#/definitions/UTTypeDeclarationModel" + } + }, + "UTImportedTypeDeclarations": { + "title": "Utimportedtypedeclarations", + "type": "array", + "items": { + "$ref": "#/definitions/UTTypeDeclarationModel" + } + }, + "entitlements": { + "title": "Entitlements", + "type": "array", + "items": { + "type": "string", + "pattern": "[a-z0-9\\.\\-]+" + } + }, + "link_in_bundle": { + "title": "Link In Bundle", + "type": "object", + "additionalProperties": { + "type": "string", + "pattern": "^(?!\\/)(?!\\.\\./).*" + } + }, + "event_handler": { + "title": "Event Handler", + "minLength": 1, + "type": "string" + } + }, + "additionalProperties": false + }, + "Windows": { + "title": "Windows", + "description": "Windows-specific instructions. You can override global keys here if needed", + "type": "object", + "properties": { + "name": { + "title": "Name", + "anyOf": [ + { + "type": "string", + "minLength": 1 + }, + { + "$ref": "#/definitions/MenuItemNameDict" + } + ] + }, + "description": { + "title": "Description", + "type": "string" + }, + "icon": { + "title": "Icon", + "minLength": 1, + "type": "string" + }, + "command": { + "title": "Command", + "minItems": 1, + "type": "array", + "items": { + "type": "string" + } + }, + "working_dir": { + "title": "Working Dir", + "minLength": 1, + "type": "string" + }, + "precommand": { + "title": "Precommand", + "minLength": 1, + "type": "string" + }, + "precreate": { + "title": "Precreate", + "minLength": 1, + "type": "string" + }, + "activate": { + "title": "Activate", + "type": "boolean" + }, + "terminal": { + "title": "Terminal", + "type": "boolean" + }, + "desktop": { + "title": "Desktop", + "default": true, + "type": "boolean" + }, + "quicklaunch": { + "title": "Quicklaunch", + "default": true, + "type": "boolean" + }, + "terminal_profile": { + "title": "Terminal Profile", + "minLength": 1, + "type": "string" + }, + "url_protocols": { + "title": "Url Protocols", + "type": "array", + "items": { + "type": "string", + "pattern": "\\S+" + } + }, + "file_extensions": { + "title": "File Extensions", + "type": "array", + "items": { + "type": "string", + "pattern": "\\.\\S*" + } + }, + "app_user_model_id": { + "title": "App User Model Id", + "maxLength": 128, + "pattern": "\\S+\\.\\S+", + "type": "string" + } + }, + "additionalProperties": false + }, + "Platforms": { + "title": "Platforms", + "description": "Platform specific options.\n\nNote each of these fields supports the same keys as the top-level :class:`MenuItem`\n(sans ``platforms`` itself), in case overrides are needed.", + "type": "object", + "properties": { + "linux": { + "$ref": "#/definitions/Linux" + }, + "osx": { + "$ref": "#/definitions/MacOS" + }, + "win": { + "$ref": "#/definitions/Windows" + } + }, + "additionalProperties": false + }, + "MenuItem": { + "title": "MenuItem", + "description": "Instructions to create a menu item across operating systems.", + "type": "object", + "properties": { + "name": { + "title": "Name", + "anyOf": [ + { + "type": "string", + "minLength": 1 + }, + { + "$ref": "#/definitions/MenuItemNameDict" + } + ] + }, + "description": { + "title": "Description", + "type": "string" + }, + "command": { + "title": "Command", + "minItems": 1, + "type": "array", + "items": { + "type": "string" + } + }, + "icon": { + "title": "Icon", + "minLength": 1, + "type": "string" + }, + "precommand": { + "title": "Precommand", + "minLength": 1, + "type": "string" + }, + "precreate": { + "title": "Precreate", + "minLength": 1, + "type": "string" + }, + "working_dir": { + "title": "Working Dir", + "minLength": 1, + "type": "string" + }, + "activate": { + "title": "Activate", + "default": true, + "type": "boolean" + }, + "terminal": { + "title": "Terminal", + "default": false, + "type": "boolean" + }, + "platforms": { + "$ref": "#/definitions/Platforms" + } + }, + "required": [ + "name", + "description", + "command", + "platforms" + ], + "additionalProperties": false + } + } +} diff --git a/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst/data/menuinst-1-0-2.default.json b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst/data/menuinst-1-0-2.default.json new file mode 100644 index 0000000000000000000000000000000000000000..489958b1556fd2c556625563ebdc1086f8dc9575 --- /dev/null +++ b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst/data/menuinst-1-0-2.default.json @@ -0,0 +1,69 @@ +{ + "id_": "https://schemas.conda.io/menuinst-1.schema.json", + "schema_": "https://json-schema.org/draft-07/schema", + "menu_name": "REQUIRED", + "menu_items": [ + { + "name": "REQUIRED", + "description": "REQUIRED", + "command": [ + "REQUIRED" + ], + "icon": null, + "precommand": null, + "precreate": null, + "working_dir": null, + "activate": true, + "terminal": false, + "platforms": { + "linux": { + "Categories": null, + "DBusActivatable": null, + "GenericName": null, + "Hidden": null, + "Implements": null, + "Keywords": null, + "MimeType": null, + "NoDisplay": null, + "NotShowIn": null, + "OnlyShowIn": null, + "PrefersNonDefaultGPU": null, + "SingleMainWindow": null, + "StartupNotify": null, + "StartupWMClass": null, + "TryExec": null, + "glob_patterns": null + }, + "osx": { + "CFBundleDisplayName": null, + "CFBundleIdentifier": null, + "CFBundleName": null, + "CFBundleSpokenName": null, + "CFBundleVersion": null, + "CFBundleURLTypes": null, + "CFBundleDocumentTypes": null, + "LSApplicationCategoryType": null, + "LSBackgroundOnly": null, + "LSEnvironment": null, + "LSMinimumSystemVersion": null, + "LSMultipleInstancesProhibited": null, + "LSRequiresNativeExecution": null, + "NSSupportsAutomaticGraphicsSwitching": null, + "UTExportedTypeDeclarations": null, + "UTImportedTypeDeclarations": null, + "entitlements": null, + "link_in_bundle": null, + "event_handler": null + }, + "win": { + "desktop": true, + "quicklaunch": false, + "terminal_profile": null, + "url_protocols": null, + "file_extensions": null, + "app_user_model_id": null + } + } + } + ] +} diff --git a/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst/data/menuinst-1-0-2.schema.json b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst/data/menuinst-1-0-2.schema.json new file mode 100644 index 0000000000000000000000000000000000000000..8491ce9f6938c2ecd69036ad32b5b0caa7fb4efc --- /dev/null +++ b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst/data/menuinst-1-0-2.schema.json @@ -0,0 +1,967 @@ +{ + "title": "MenuInstSchema", + "description": "Metadata required to create menu items across operating systems with `menuinst`.", + "type": "object", + "properties": { + "$id": { + "title": "$Id", + "description": "Version of the menuinst schema.", + "markdownDescription": "Version of the menuinst schema.", + "enum": [ + "https://schemas.conda.io/menuinst-1.schema.json" + ], + "type": "string" + }, + "$schema": { + "title": "$Schema", + "description": "Standard of the JSON schema we adhere to.", + "markdownDescription": "Standard of the JSON schema we adhere to.", + "enum": [ + "https://json-schema.org/draft-07/schema" + ], + "type": "string" + }, + "menu_name": { + "title": "Menu Name", + "description": "Name for the category containing the items specified in `menu_items`.", + "markdownDescription": "Name for the category containing the items specified in `menu_items`.", + "minLength": 1, + "type": "string" + }, + "menu_items": { + "title": "Menu Items", + "description": "List of menu entries to create across main desktop systems.", + "markdownDescription": "List of menu entries to create across main desktop systems.", + "minItems": 1, + "type": "array", + "items": { + "$ref": "#/definitions/MenuItem" + } + } + }, + "required": [ + "$id", + "$schema", + "menu_name", + "menu_items" + ], + "additionalProperties": false, + "markdownDescription": "Metadata required to create menu items across operating systems with `menuinst`.", + "definitions": { + "MenuItemNameDict": { + "title": "MenuItemNameDict", + "description": "Variable menu item name. Use this dictionary if the menu item name depends on installation parameters such as the target environment.", + "type": "object", + "properties": { + "target_environment_is_base": { + "title": "Target Environment Is Base", + "description": "Name when target environment is the base environment.", + "markdownDescription": "Name when target environment is the base environment.", + "minLength": 1, + "type": "string" + }, + "target_environment_is_not_base": { + "title": "Target Environment Is Not Base", + "description": "Name when target environment is not the base environment.", + "markdownDescription": "Name when target environment is not the base environment.", + "minLength": 1, + "type": "string" + } + }, + "additionalProperties": false, + "markdownDescription": "Variable menu item name. Use this dictionary if the menu item name depends on installation parameters such as the target environment." + }, + "Linux": { + "title": "Linux", + "description": "Linux-specific instructions.\n\nCheck the [Desktop entry specification]( https://specifications.freedesktop.org/desktop-entry-spec/latest/recognized-keys.html) for more details.", + "type": "object", + "properties": { + "name": { + "title": "Name", + "description": "The name of the menu item. Can be a dictionary if the name depends on installation parameters. See `MenuItemNameDict` for details.", + "markdownDescription": "The name of the menu item. Can be a dictionary if the name depends on installation parameters. See `MenuItemNameDict` for details.", + "anyOf": [ + { + "type": "string", + "minLength": 1 + }, + { + "$ref": "#/definitions/MenuItemNameDict" + } + ] + }, + "description": { + "title": "Description", + "description": "A longer description of the menu item. Shown on popup messages.", + "markdownDescription": "A longer description of the menu item. Shown on popup messages.", + "type": "string" + }, + "icon": { + "title": "Icon", + "description": "Path to the file representing or containing the icon.", + "markdownDescription": "Path to the file representing or containing the icon.", + "minLength": 1, + "type": "string" + }, + "command": { + "title": "Command", + "description": "Command to run with the menu item, expressed as a list of strings where each string is an argument.", + "markdownDescription": "Command to run with the menu item, expressed as a list of strings where each string is an argument.", + "minItems": 1, + "type": "array", + "items": { + "type": "string" + } + }, + "working_dir": { + "title": "Working Dir", + "description": "Working directory for the running process. Defaults to user directory on each platform.", + "markdownDescription": "Working directory for the running process. Defaults to user directory on each platform.", + "minLength": 1, + "type": "string" + }, + "precommand": { + "title": "Precommand", + "description": "(Simple, preferrably single-line) logic to run before the command is run. Runs before the environment is activated, if that applies.", + "markdownDescription": "(Simple, preferrably single-line) logic to run before the command is run. Runs before the environment is activated, if that applies.", + "minLength": 1, + "type": "string" + }, + "precreate": { + "title": "Precreate", + "description": "(Simple, preferrably single-line) logic to run before the shortcut is created.", + "markdownDescription": "(Simple, preferrably single-line) logic to run before the shortcut is created.", + "minLength": 1, + "type": "string" + }, + "activate": { + "title": "Activate", + "description": "Whether to activate the target environment before running `command`.", + "markdownDescription": "Whether to activate the target environment before running `command`.", + "type": "boolean" + }, + "terminal": { + "title": "Terminal", + "description": "Whether run the program in a terminal/console or not. On Windows, it only has an effect if `activate` is true. On MacOS, the application will ignore command-line arguments.", + "markdownDescription": "Whether run the program in a terminal/console or not. On Windows, it only has an effect if `activate` is true. On MacOS, the application will ignore command-line arguments.", + "type": "boolean" + }, + "Categories": { + "title": "Categories", + "description": "Categories in which the entry should be shown in a menu. See 'Registered categories' in the [Menu Spec]( http://www.freedesktop.org/Standards/menu-spec).", + "markdownDescription": "Categories in which the entry should be shown in a menu. See 'Registered categories' in the [Menu Spec]( http://www.freedesktop.org/Standards/menu-spec).", + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "string", + "pattern": "^.+;$" + } + ] + }, + "DBusActivatable": { + "title": "Dbusactivatable", + "description": "A boolean value specifying if D-Bus activation is supported for this application.", + "markdownDescription": "A boolean value specifying if D-Bus activation is supported for this application.", + "type": "boolean" + }, + "GenericName": { + "title": "Genericname", + "description": "Generic name of the application; e.g. if the name is 'conda', this would be 'Package Manager'.", + "markdownDescription": "Generic name of the application; e.g. if the name is 'conda', this would be 'Package Manager'.", + "type": "string" + }, + "Hidden": { + "title": "Hidden", + "description": "Disable shortcut, signaling a missing resource.", + "markdownDescription": "Disable shortcut, signaling a missing resource.", + "type": "boolean" + }, + "Implements": { + "title": "Implements", + "description": "List of supported interfaces. See 'Interfaces' in [Desktop Entry Spec]( https://specifications.freedesktop.org/desktop-entry-spec/latest/interfaces.html).", + "markdownDescription": "List of supported interfaces. See 'Interfaces' in [Desktop Entry Spec]( https://specifications.freedesktop.org/desktop-entry-spec/latest/interfaces.html).", + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "string", + "pattern": "^.+;$" + } + ] + }, + "Keywords": { + "title": "Keywords", + "description": "Additional terms to describe this shortcut to aid in searching.", + "markdownDescription": "Additional terms to describe this shortcut to aid in searching.", + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "string", + "pattern": "^.+;$" + } + ] + }, + "MimeType": { + "title": "Mimetype", + "description": "The MIME type(s) supported by this application. Note this includes file types and URL protocols. For URL protocols, use `x-scheme-handler/your-protocol-here`. For example, if you want to register `menuinst:`, you would include `x-scheme-handler/menuinst`.", + "markdownDescription": "The MIME type(s) supported by this application. Note this includes file types and URL protocols. For URL protocols, use `x-scheme-handler/your-protocol-here`. For example, if you want to register `menuinst:`, you would include `x-scheme-handler/menuinst`.", + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "string", + "pattern": "^.+;$" + } + ] + }, + "NoDisplay": { + "title": "Nodisplay", + "description": "Do not show this item in the menu. Useful to associate MIME types and other registrations, without having an actual clickable item. Not to be confused with 'Hidden'.", + "markdownDescription": "Do not show this item in the menu. Useful to associate MIME types and other registrations, without having an actual clickable item. Not to be confused with 'Hidden'.", + "type": "boolean" + }, + "NotShowIn": { + "title": "Notshowin", + "description": "Desktop environments that should NOT display this item. It'll check against `$XDG_CURRENT_DESKTOP`.", + "markdownDescription": "Desktop environments that should NOT display this item. It'll check against `$XDG_CURRENT_DESKTOP`.", + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "string", + "pattern": "^.+;$" + } + ] + }, + "OnlyShowIn": { + "title": "Onlyshowin", + "description": "Desktop environments that should display this item. It'll check against `$XDG_CURRENT_DESKTOP`.", + "markdownDescription": "Desktop environments that should display this item. It'll check against `$XDG_CURRENT_DESKTOP`.", + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "string", + "pattern": "^.+;$" + } + ] + }, + "PrefersNonDefaultGPU": { + "title": "Prefersnondefaultgpu", + "description": "Hint that the app prefers to be run on a more powerful discrete GPU if available.", + "markdownDescription": "Hint that the app prefers to be run on a more powerful discrete GPU if available.", + "type": "boolean" + }, + "SingleMainWindow": { + "title": "Singlemainwindow", + "description": "Do not show the 'New Window' option in the app's context menu.", + "markdownDescription": "Do not show the 'New Window' option in the app's context menu.", + "type": "boolean" + }, + "StartupNotify": { + "title": "Startupnotify", + "description": "Advanced. See [Startup Notification spec]( https://www.freedesktop.org/wiki/Specifications/startup-notification-spec/).", + "markdownDescription": "Advanced. See [Startup Notification spec]( https://www.freedesktop.org/wiki/Specifications/startup-notification-spec/).", + "type": "boolean" + }, + "StartupWMClass": { + "title": "Startupwmclass", + "description": "Advanced. See [Startup Notification spec]( https://www.freedesktop.org/wiki/Specifications/startup-notification-spec/).", + "markdownDescription": "Advanced. See [Startup Notification spec]( https://www.freedesktop.org/wiki/Specifications/startup-notification-spec/).", + "type": "string" + }, + "TryExec": { + "title": "Tryexec", + "description": "Filename or absolute path to an executable file on disk used to determine if the program is actually installed and can be run. If the test fails, the shortcut might be ignored / hidden.", + "markdownDescription": "Filename or absolute path to an executable file on disk used to determine if the program is actually installed and can be run. If the test fails, the shortcut might be ignored / hidden.", + "type": "string" + }, + "glob_patterns": { + "title": "Glob Patterns", + "description": "Map of custom MIME types to their corresponding glob patterns (e.g. `*.txt`). Only needed if you define custom MIME types in `MimeType`.", + "markdownDescription": "Map of custom MIME types to their corresponding glob patterns (e.g. `*.txt`). Only needed if you define custom MIME types in `MimeType`.", + "type": "object", + "additionalProperties": { + "type": "string", + "pattern": ".*\\*.*" + } + } + }, + "additionalProperties": false, + "markdownDescription": "Linux-specific instructions.\n\nCheck the [Desktop entry specification]( https://specifications.freedesktop.org/desktop-entry-spec/latest/recognized-keys.html) for more details." + }, + "CFBundleURLTypesModel": { + "title": "CFBundleURLTypesModel", + "description": "Describes a URL scheme associated with the app.", + "type": "object", + "properties": { + "CFBundleTypeRole": { + "title": "Cfbundletyperole", + "description": "This key specifies the app's role with respect to the URL.", + "markdownDescription": "This key specifies the app's role with respect to the URL.", + "enum": [ + "Editor", + "Viewer", + "Shell", + "None" + ], + "type": "string" + }, + "CFBundleURLSchemes": { + "title": "Cfbundleurlschemes", + "description": "URL schemes / protocols handled by this type (e.g. 'mailto').", + "markdownDescription": "URL schemes / protocols handled by this type (e.g. 'mailto').", + "type": "array", + "items": { + "type": "string" + } + }, + "CFBundleURLName": { + "title": "Cfbundleurlname", + "description": "Abstract name for this URL type. Uniqueness recommended.", + "markdownDescription": "Abstract name for this URL type. Uniqueness recommended.", + "type": "string" + }, + "CFBundleURLIconFile": { + "title": "Cfbundleurliconfile", + "description": "Name of the icon image file (minus the .icns extension).", + "markdownDescription": "Name of the icon image file (minus the .icns extension).", + "type": "string" + } + }, + "required": [ + "CFBundleURLSchemes" + ], + "additionalProperties": false, + "markdownDescription": "Describes a URL scheme associated with the app." + }, + "CFBundleDocumentTypesModel": { + "title": "CFBundleDocumentTypesModel", + "description": "Describes a document type associated with the app.", + "type": "object", + "properties": { + "CFBundleTypeIconFile": { + "title": "Cfbundletypeiconfile", + "description": "Name of the icon image file (minus the .icns extension).", + "markdownDescription": "Name of the icon image file (minus the .icns extension).", + "type": "string" + }, + "CFBundleTypeName": { + "title": "Cfbundletypename", + "description": "Abstract name for this document type. Uniqueness recommended.", + "markdownDescription": "Abstract name for this document type. Uniqueness recommended.", + "type": "string" + }, + "CFBundleTypeRole": { + "title": "Cfbundletyperole", + "description": "This key specifies the app's role with respect to the type.", + "markdownDescription": "This key specifies the app's role with respect to the type.", + "enum": [ + "Editor", + "Viewer", + "Shell", + "None" + ], + "type": "string" + }, + "LSItemContentTypes": { + "title": "Lsitemcontenttypes", + "description": "List of UTI strings defining a supported file type; e.g. for PNG files, use 'public.png'. See [UTI Reference]( https://developer.apple.com/library/archive/documentation/Miscellaneous/Reference/UTIRef/Articles/System-DeclaredUniformTypeIdentifiers.html) for more info about the system-defined UTIs. Custom UTIs can be defined via 'UTExportedTypeDeclarations'. UTIs defined by other apps (not the system) need to be imported via 'UTImportedTypeDeclarations'.\n\nSee [Fun with UTIs](https://www.cocoanetics.com/2012/09/fun-with-uti/) for more info.", + "markdownDescription": "List of UTI strings defining a supported file type; e.g. for PNG files, use 'public.png'. See [UTI Reference]( https://developer.apple.com/library/archive/documentation/Miscellaneous/Reference/UTIRef/Articles/System-DeclaredUniformTypeIdentifiers.html) for more info about the system-defined UTIs. Custom UTIs can be defined via 'UTExportedTypeDeclarations'. UTIs defined by other apps (not the system) need to be imported via 'UTImportedTypeDeclarations'.\n\nSee [Fun with UTIs](https://www.cocoanetics.com/2012/09/fun-with-uti/) for more info.", + "type": "array", + "items": { + "type": "string" + } + }, + "LSHandlerRank": { + "title": "Lshandlerrank", + "description": "Determines how Launch Services ranks this app among the apps that declare themselves editors or viewers of files of this type.", + "markdownDescription": "Determines how Launch Services ranks this app among the apps that declare themselves editors or viewers of files of this type.", + "enum": [ + "Owner", + "Default", + "Alternate" + ], + "type": "string" + } + }, + "required": [ + "CFBundleTypeName", + "LSItemContentTypes", + "LSHandlerRank" + ], + "additionalProperties": false, + "markdownDescription": "Describes a document type associated with the app." + }, + "UTTypeDeclarationModel": { + "title": "UTTypeDeclarationModel", + "type": "object", + "properties": { + "UTTypeConformsTo": { + "title": "Uttypeconformsto", + "description": "The Uniform Type Identifier types that this type conforms to.", + "markdownDescription": "The Uniform Type Identifier types that this type conforms to.", + "type": "array", + "items": { + "type": "string" + } + }, + "UTTypeDescription": { + "title": "Uttypedescription", + "description": "A description for this type.", + "markdownDescription": "A description for this type.", + "type": "string" + }, + "UTTypeIconFile": { + "title": "Uttypeiconfile", + "description": "The bundle icon resource to associate with this type.", + "markdownDescription": "The bundle icon resource to associate with this type.", + "type": "string" + }, + "UTTypeIdentifier": { + "title": "Uttypeidentifier", + "description": "The Uniform Type Identifier to assign to this type.", + "markdownDescription": "The Uniform Type Identifier to assign to this type.", + "type": "string" + }, + "UTTypeReferenceURL": { + "title": "Uttypereferenceurl", + "description": "The webpage for a reference document that describes this type.", + "markdownDescription": "The webpage for a reference document that describes this type.", + "type": "string" + }, + "UTTypeTagSpecification": { + "title": "Uttypetagspecification", + "description": "A dictionary defining one or more equivalent type identifiers.", + "markdownDescription": "A dictionary defining one or more equivalent type identifiers.", + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "required": [ + "UTTypeConformsTo", + "UTTypeIdentifier", + "UTTypeTagSpecification" + ], + "additionalProperties": false + }, + "MacOS": { + "title": "MacOS", + "description": "Mac-specific instructions. Check these URLs for more info:\n\n- `CF*` keys: see [Core Foundation Keys](https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html) - `LS*` keys: see [Launch Services Keys](https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/LaunchServicesKeys.html) - `entitlements`: see [Entitlements documentation](https://developer.apple.com/documentation/bundleresources/entitlements)", + "type": "object", + "properties": { + "name": { + "title": "Name", + "description": "The name of the menu item. Can be a dictionary if the name depends on installation parameters. See `MenuItemNameDict` for details.", + "markdownDescription": "The name of the menu item. Can be a dictionary if the name depends on installation parameters. See `MenuItemNameDict` for details.", + "anyOf": [ + { + "type": "string", + "minLength": 1 + }, + { + "$ref": "#/definitions/MenuItemNameDict" + } + ] + }, + "description": { + "title": "Description", + "description": "A longer description of the menu item. Shown on popup messages.", + "markdownDescription": "A longer description of the menu item. Shown on popup messages.", + "type": "string" + }, + "icon": { + "title": "Icon", + "description": "Path to the file representing or containing the icon.", + "markdownDescription": "Path to the file representing or containing the icon.", + "minLength": 1, + "type": "string" + }, + "command": { + "title": "Command", + "description": "Command to run with the menu item, expressed as a list of strings where each string is an argument.", + "markdownDescription": "Command to run with the menu item, expressed as a list of strings where each string is an argument.", + "minItems": 1, + "type": "array", + "items": { + "type": "string" + } + }, + "working_dir": { + "title": "Working Dir", + "description": "Working directory for the running process. Defaults to user directory on each platform.", + "markdownDescription": "Working directory for the running process. Defaults to user directory on each platform.", + "minLength": 1, + "type": "string" + }, + "precommand": { + "title": "Precommand", + "description": "(Simple, preferrably single-line) logic to run before the command is run. Runs before the environment is activated, if that applies.", + "markdownDescription": "(Simple, preferrably single-line) logic to run before the command is run. Runs before the environment is activated, if that applies.", + "minLength": 1, + "type": "string" + }, + "precreate": { + "title": "Precreate", + "description": "(Simple, preferrably single-line) logic to run before the shortcut is created.", + "markdownDescription": "(Simple, preferrably single-line) logic to run before the shortcut is created.", + "minLength": 1, + "type": "string" + }, + "activate": { + "title": "Activate", + "description": "Whether to activate the target environment before running `command`.", + "markdownDescription": "Whether to activate the target environment before running `command`.", + "type": "boolean" + }, + "terminal": { + "title": "Terminal", + "description": "Whether run the program in a terminal/console or not. On Windows, it only has an effect if `activate` is true. On MacOS, the application will ignore command-line arguments.", + "markdownDescription": "Whether run the program in a terminal/console or not. On Windows, it only has an effect if `activate` is true. On MacOS, the application will ignore command-line arguments.", + "type": "boolean" + }, + "CFBundleDisplayName": { + "title": "Cfbundledisplayname", + "description": "Display name of the bundle, visible to users and used by Siri. If not provided, 'menuinst' will use the 'name' field.", + "markdownDescription": "Display name of the bundle, visible to users and used by Siri. If not provided, 'menuinst' will use the 'name' field.", + "type": "string" + }, + "CFBundleIdentifier": { + "title": "Cfbundleidentifier", + "description": "Unique identifier for the shortcut. Typically uses a reverse-DNS format. If not provided, 'menuinst' will generate one from the 'name' field.", + "markdownDescription": "Unique identifier for the shortcut. Typically uses a reverse-DNS format. If not provided, 'menuinst' will generate one from the 'name' field.", + "pattern": "^[A-z0-9\\-\\.]+$", + "type": "string" + }, + "CFBundleName": { + "title": "Cfbundlename", + "description": "Short name of the bundle. May be used if `CFBundleDisplayName` is absent. If not provided, 'menuinst' will generate one from the 'name' field.", + "markdownDescription": "Short name of the bundle. May be used if `CFBundleDisplayName` is absent. If not provided, 'menuinst' will generate one from the 'name' field.", + "maxLength": 16, + "type": "string" + }, + "CFBundleSpokenName": { + "title": "Cfbundlespokenname", + "description": "Suitable replacement for text-to-speech operations on the app. For example, 'my app one two three' instead of 'MyApp123'.", + "markdownDescription": "Suitable replacement for text-to-speech operations on the app. For example, 'my app one two three' instead of 'MyApp123'.", + "type": "string" + }, + "CFBundleVersion": { + "title": "Cfbundleversion", + "description": "Build version number for the bundle. In the context of 'menuinst' this can be used to signal a new version of the menu item for the same application version.", + "markdownDescription": "Build version number for the bundle. In the context of 'menuinst' this can be used to signal a new version of the menu item for the same application version.", + "pattern": "^\\S+$", + "type": "string" + }, + "CFBundleURLTypes": { + "title": "Cfbundleurltypes", + "description": "URL types supported by this app. Requires setting `event_handler` too. Note this feature requires macOS 10.14.4 or above.", + "markdownDescription": "URL types supported by this app. Requires setting `event_handler` too. Note this feature requires macOS 10.14.4 or above.", + "type": "array", + "items": { + "$ref": "#/definitions/CFBundleURLTypesModel" + } + }, + "CFBundleDocumentTypes": { + "title": "Cfbundledocumenttypes", + "description": "Document types supported by this app. Requires setting `event_handler` too. Requires macOS 10.14.4 or above.", + "markdownDescription": "Document types supported by this app. Requires setting `event_handler` too. Requires macOS 10.14.4 or above.", + "type": "array", + "items": { + "$ref": "#/definitions/CFBundleDocumentTypesModel" + } + }, + "LSApplicationCategoryType": { + "title": "Lsapplicationcategorytype", + "description": "The App Store uses this string to determine the appropriate categorization.", + "markdownDescription": "The App Store uses this string to determine the appropriate categorization.", + "pattern": "^public\\.app-category\\.\\S+$", + "type": "string" + }, + "LSBackgroundOnly": { + "title": "Lsbackgroundonly", + "description": "Specifies whether this app runs only in the background.", + "markdownDescription": "Specifies whether this app runs only in the background.", + "type": "boolean" + }, + "LSEnvironment": { + "title": "Lsenvironment", + "description": "List of key-value pairs used to define environment variables.", + "markdownDescription": "List of key-value pairs used to define environment variables.", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "LSMinimumSystemVersion": { + "title": "Lsminimumsystemversion", + "description": "Minimum version of macOS required for this app to run, as `x.y.z`. For example, for macOS v10.4 and later, use `10.4.0`.", + "markdownDescription": "Minimum version of macOS required for this app to run, as `x.y.z`. For example, for macOS v10.4 and later, use `10.4.0`.", + "pattern": "^\\d+\\.\\d+\\.\\d+$", + "type": "string" + }, + "LSMultipleInstancesProhibited": { + "title": "Lsmultipleinstancesprohibited", + "description": "Whether an app is prohibited from running simultaneously in multiple user sessions.", + "markdownDescription": "Whether an app is prohibited from running simultaneously in multiple user sessions.", + "type": "boolean" + }, + "LSRequiresNativeExecution": { + "title": "Lsrequiresnativeexecution", + "description": "If true, prevent a universal binary from being run under Rosetta emulation on an Intel-based Mac.", + "markdownDescription": "If true, prevent a universal binary from being run under Rosetta emulation on an Intel-based Mac.", + "type": "boolean" + }, + "NSSupportsAutomaticGraphicsSwitching": { + "title": "Nssupportsautomaticgraphicsswitching", + "description": "If true, allows an OpenGL app to utilize the integrated GPU.", + "markdownDescription": "If true, allows an OpenGL app to utilize the integrated GPU.", + "type": "boolean" + }, + "UTExportedTypeDeclarations": { + "title": "Utexportedtypedeclarations", + "description": "The uniform type identifiers owned and exported by the app.", + "markdownDescription": "The uniform type identifiers owned and exported by the app.", + "type": "array", + "items": { + "$ref": "#/definitions/UTTypeDeclarationModel" + } + }, + "UTImportedTypeDeclarations": { + "title": "Utimportedtypedeclarations", + "description": "The uniform type identifiers inherently supported, but not owned, by the app.", + "markdownDescription": "The uniform type identifiers inherently supported, but not owned, by the app.", + "type": "array", + "items": { + "$ref": "#/definitions/UTTypeDeclarationModel" + } + }, + "entitlements": { + "title": "Entitlements", + "description": "List of permissions to request for the launched application. See [the entitlements docs]( https://developer.apple.com/documentation/bundleresources/entitlements) for a full list of possible values.", + "markdownDescription": "List of permissions to request for the launched application. See [the entitlements docs]( https://developer.apple.com/documentation/bundleresources/entitlements) for a full list of possible values.", + "type": "array", + "items": { + "type": "string", + "pattern": "[a-z0-9\\.\\-]+" + } + }, + "link_in_bundle": { + "title": "Link In Bundle", + "description": "Paths that should be symlinked into the shortcut app bundle. It takes a mapping of source to destination paths. Destination paths must be relative. Placeholder `{{ MENU_ITEM_LOCATION }}` can be useful.", + "markdownDescription": "Paths that should be symlinked into the shortcut app bundle. It takes a mapping of source to destination paths. Destination paths must be relative. Placeholder `{{ MENU_ITEM_LOCATION }}` can be useful.", + "type": "object", + "additionalProperties": { + "type": "string", + "pattern": "^(?!\\/)(?!\\.\\./).*" + } + }, + "event_handler": { + "title": "Event Handler", + "description": "Required shell script logic to handle opened URL payloads. Note this feature requires macOS 10.14.4 or above.", + "markdownDescription": "Required shell script logic to handle opened URL payloads. Note this feature requires macOS 10.14.4 or above.", + "minLength": 1, + "type": "string" + } + }, + "additionalProperties": false, + "markdownDescription": "Mac-specific instructions. Check these URLs for more info:\n\n- `CF*` keys: see [Core Foundation Keys](https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html) - `LS*` keys: see [Launch Services Keys](https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/LaunchServicesKeys.html) - `entitlements`: see [Entitlements documentation](https://developer.apple.com/documentation/bundleresources/entitlements)" + }, + "Windows": { + "title": "Windows", + "description": "Windows-specific instructions. You can override global keys here if needed", + "type": "object", + "properties": { + "name": { + "title": "Name", + "description": "The name of the menu item. Can be a dictionary if the name depends on installation parameters. See `MenuItemNameDict` for details.", + "markdownDescription": "The name of the menu item. Can be a dictionary if the name depends on installation parameters. See `MenuItemNameDict` for details.", + "anyOf": [ + { + "type": "string", + "minLength": 1 + }, + { + "$ref": "#/definitions/MenuItemNameDict" + } + ] + }, + "description": { + "title": "Description", + "description": "A longer description of the menu item. Shown on popup messages.", + "markdownDescription": "A longer description of the menu item. Shown on popup messages.", + "type": "string" + }, + "icon": { + "title": "Icon", + "description": "Path to the file representing or containing the icon.", + "markdownDescription": "Path to the file representing or containing the icon.", + "minLength": 1, + "type": "string" + }, + "command": { + "title": "Command", + "description": "Command to run with the menu item, expressed as a list of strings where each string is an argument.", + "markdownDescription": "Command to run with the menu item, expressed as a list of strings where each string is an argument.", + "minItems": 1, + "type": "array", + "items": { + "type": "string" + } + }, + "working_dir": { + "title": "Working Dir", + "description": "Working directory for the running process. Defaults to user directory on each platform.", + "markdownDescription": "Working directory for the running process. Defaults to user directory on each platform.", + "minLength": 1, + "type": "string" + }, + "precommand": { + "title": "Precommand", + "description": "(Simple, preferrably single-line) logic to run before the command is run. Runs before the environment is activated, if that applies.", + "markdownDescription": "(Simple, preferrably single-line) logic to run before the command is run. Runs before the environment is activated, if that applies.", + "minLength": 1, + "type": "string" + }, + "precreate": { + "title": "Precreate", + "description": "(Simple, preferrably single-line) logic to run before the shortcut is created.", + "markdownDescription": "(Simple, preferrably single-line) logic to run before the shortcut is created.", + "minLength": 1, + "type": "string" + }, + "activate": { + "title": "Activate", + "description": "Whether to activate the target environment before running `command`.", + "markdownDescription": "Whether to activate the target environment before running `command`.", + "type": "boolean" + }, + "terminal": { + "title": "Terminal", + "description": "Whether run the program in a terminal/console or not. On Windows, it only has an effect if `activate` is true. On MacOS, the application will ignore command-line arguments.", + "markdownDescription": "Whether run the program in a terminal/console or not. On Windows, it only has an effect if `activate` is true. On MacOS, the application will ignore command-line arguments.", + "type": "boolean" + }, + "desktop": { + "title": "Desktop", + "description": "Whether to create a desktop icon in addition to the Start Menu item.", + "default": true, + "markdownDescription": "Whether to create a desktop icon in addition to the Start Menu item.", + "type": "boolean" + }, + "quicklaunch": { + "title": "Quicklaunch", + "description": "DEPRECATED. Whether to create a quick launch icon in addition to the Start Menu item.", + "default": false, + "deprecated": true, + "markdownDescription": "DEPRECATED. Whether to create a quick launch icon in addition to the Start Menu item.", + "type": "boolean" + }, + "terminal_profile": { + "title": "Terminal Profile", + "description": "Name of the Windows Terminal profile to create. This name must be unique across multiple installations because menuinst will overwrite Terminal profiles with the same name.", + "markdownDescription": "Name of the Windows Terminal profile to create. This name must be unique across multiple installations because menuinst will overwrite Terminal profiles with the same name.", + "minLength": 1, + "type": "string" + }, + "url_protocols": { + "title": "Url Protocols", + "description": "URL protocols that will be associated with this program.", + "markdownDescription": "URL protocols that will be associated with this program.", + "type": "array", + "items": { + "type": "string", + "pattern": "\\S+" + } + }, + "file_extensions": { + "title": "File Extensions", + "description": "File extensions that will be associated with this program.", + "markdownDescription": "File extensions that will be associated with this program.", + "type": "array", + "items": { + "type": "string", + "pattern": "\\.\\S*" + } + }, + "app_user_model_id": { + "title": "App User Model Id", + "description": "Identifier used in Windows 7 and above to associate processes, files and windows with a particular application. If your shortcut produces duplicated icons, you need to define this field. If not set, it will default to `Menuinst.`.\n\nSee [AppUserModelID docs]( https://learn.microsoft.com/en-us/windows/win32/shell/appids#how-to-form-an-application-defined-appusermodelid) for more information on the required string format.", + "markdownDescription": "Identifier used in Windows 7 and above to associate processes, files and windows with a particular application. If your shortcut produces duplicated icons, you need to define this field. If not set, it will default to `Menuinst.`.\n\nSee [AppUserModelID docs]( https://learn.microsoft.com/en-us/windows/win32/shell/appids#how-to-form-an-application-defined-appusermodelid) for more information on the required string format.", + "maxLength": 128, + "pattern": "\\S+\\.\\S+", + "type": "string" + } + }, + "additionalProperties": false, + "markdownDescription": "Windows-specific instructions. You can override global keys here if needed" + }, + "Platforms": { + "title": "Platforms", + "description": "Platform specific options.\n\nNote each of these fields supports the same keys as the top-level `MenuItem` (sans `platforms` itself), in case overrides are needed.", + "type": "object", + "properties": { + "linux": { + "title": "Linux", + "description": "Options for Linux. See `Linux` model for details.", + "markdownDescription": "Options for Linux. See `Linux` model for details.", + "allOf": [ + { + "$ref": "#/definitions/Linux" + } + ] + }, + "osx": { + "title": "Osx", + "description": "Options for macOS. See `MacOS` model for details.", + "markdownDescription": "Options for macOS. See `MacOS` model for details.", + "allOf": [ + { + "$ref": "#/definitions/MacOS" + } + ] + }, + "win": { + "title": "Win", + "description": "Options for Windows. See `Windows` model for details.", + "markdownDescription": "Options for Windows. See `Windows` model for details.", + "allOf": [ + { + "$ref": "#/definitions/Windows" + } + ] + } + }, + "additionalProperties": false, + "markdownDescription": "Platform specific options.\n\nNote each of these fields supports the same keys as the top-level `MenuItem` (sans `platforms` itself), in case overrides are needed." + }, + "MenuItem": { + "title": "MenuItem", + "description": "Instructions to create a menu item across operating systems.", + "type": "object", + "properties": { + "name": { + "title": "Name", + "description": "The name of the menu item. Can be a dictionary if the name depends on installation parameters. See `MenuItemNameDict` for details.", + "markdownDescription": "The name of the menu item. Can be a dictionary if the name depends on installation parameters. See `MenuItemNameDict` for details.", + "anyOf": [ + { + "type": "string", + "minLength": 1 + }, + { + "$ref": "#/definitions/MenuItemNameDict" + } + ] + }, + "description": { + "title": "Description", + "description": "A longer description of the menu item. Shown on popup messages.", + "markdownDescription": "A longer description of the menu item. Shown on popup messages.", + "type": "string" + }, + "command": { + "title": "Command", + "description": "Command to run with the menu item, expressed as a list of strings where each string is an argument.", + "markdownDescription": "Command to run with the menu item, expressed as a list of strings where each string is an argument.", + "minItems": 1, + "type": "array", + "items": { + "type": "string" + } + }, + "icon": { + "title": "Icon", + "description": "Path to the file representing or containing the icon.", + "markdownDescription": "Path to the file representing or containing the icon.", + "minLength": 1, + "type": "string" + }, + "precommand": { + "title": "Precommand", + "description": "(Simple, preferrably single-line) logic to run before the command is run. Runs before the environment is activated, if that applies.", + "markdownDescription": "(Simple, preferrably single-line) logic to run before the command is run. Runs before the environment is activated, if that applies.", + "minLength": 1, + "type": "string" + }, + "precreate": { + "title": "Precreate", + "description": "(Simple, preferrably single-line) logic to run before the shortcut is created.", + "markdownDescription": "(Simple, preferrably single-line) logic to run before the shortcut is created.", + "minLength": 1, + "type": "string" + }, + "working_dir": { + "title": "Working Dir", + "description": "Working directory for the running process. Defaults to user directory on each platform.", + "markdownDescription": "Working directory for the running process. Defaults to user directory on each platform.", + "minLength": 1, + "type": "string" + }, + "activate": { + "title": "Activate", + "description": "Whether to activate the target environment before running `command`.", + "default": true, + "markdownDescription": "Whether to activate the target environment before running `command`.", + "type": "boolean" + }, + "terminal": { + "title": "Terminal", + "description": "Whether run the program in a terminal/console or not. On Windows, it only has an effect if `activate` is true. On MacOS, the application will ignore command-line arguments.", + "default": false, + "markdownDescription": "Whether run the program in a terminal/console or not. On Windows, it only has an effect if `activate` is true. On MacOS, the application will ignore command-line arguments.", + "type": "boolean" + }, + "platforms": { + "title": "Platforms", + "description": "Platform-specific options. Presence of a platform field enables menu items in that platform.", + "markdownDescription": "Platform-specific options. Presence of a platform field enables menu items in that platform.", + "allOf": [ + { + "$ref": "#/definitions/Platforms" + } + ] + } + }, + "required": [ + "name", + "description", + "command", + "platforms" + ], + "additionalProperties": false, + "markdownDescription": "Instructions to create a menu item across operating systems." + } + } +} diff --git a/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst/data/menuinst-1-1-0.default.json b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst/data/menuinst-1-1-0.default.json new file mode 100644 index 0000000000000000000000000000000000000000..ab13c3e5d0af46619cb75278ebc8321efa25b09d --- /dev/null +++ b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst/data/menuinst-1-1-0.default.json @@ -0,0 +1,68 @@ +{ + "menu_name": "REQUIRED", + "menu_items": [ + { + "name": "REQUIRED", + "description": "REQUIRED", + "command": [ + "REQUIRED" + ], + "icon": null, + "precommand": null, + "precreate": null, + "working_dir": null, + "activate": true, + "terminal": false, + "platforms": { + "linux": { + "Categories": null, + "DBusActivatable": null, + "GenericName": null, + "Hidden": null, + "Implements": null, + "Keywords": null, + "MimeType": null, + "NoDisplay": null, + "NotShowIn": null, + "OnlyShowIn": null, + "PrefersNonDefaultGPU": null, + "SingleMainWindow": null, + "StartupNotify": null, + "StartupWMClass": null, + "TryExec": null, + "glob_patterns": null + }, + "osx": { + "CFBundleDisplayName": null, + "CFBundleIdentifier": null, + "CFBundleName": null, + "CFBundleSpokenName": null, + "CFBundleVersion": null, + "CFBundleURLTypes": null, + "CFBundleDocumentTypes": null, + "LSApplicationCategoryType": null, + "LSBackgroundOnly": null, + "LSEnvironment": null, + "LSMinimumSystemVersion": null, + "LSMultipleInstancesProhibited": null, + "LSRequiresNativeExecution": null, + "NSSupportsAutomaticGraphicsSwitching": null, + "UTExportedTypeDeclarations": null, + "UTImportedTypeDeclarations": null, + "entitlements": null, + "link_in_bundle": null, + "event_handler": null + }, + "win": { + "desktop": true, + "quicklaunch": false, + "terminal_profile": null, + "url_protocols": null, + "file_extensions": null, + "app_user_model_id": null + } + } + } + ], + "$schema": "https://schemas.conda.org/menuinst-1-1-0.schema.json" +} diff --git a/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst/data/menuinst-1-1-0.schema.json b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst/data/menuinst-1-1-0.schema.json new file mode 100644 index 0000000000000000000000000000000000000000..6c815e64761a0e3999476b7b6c128c43684dcae2 --- /dev/null +++ b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst/data/menuinst-1-1-0.schema.json @@ -0,0 +1,966 @@ +{ + "title": "MenuInstSchema", + "description": "Metadata required to create menu items across operating systems with `menuinst`.", + "type": "object", + "properties": { + "$id": { + "title": "$Id", + "description": "DEPRECATED. Use ``$schema``.", + "default": "https://schemas.conda.org/menuinst-1-1-0.schema.json", + "deprecated": true, + "markdownDescription": "DEPRECATED. Use ``$schema``.", + "minLength": 1, + "type": "string" + }, + "$schema": { + "title": "$Schema", + "description": "Version of the menuinst schema to validate against.", + "default": "https://schemas.conda.org/menuinst-1-1-0.schema.json", + "markdownDescription": "Version of the menuinst schema to validate against.", + "minLength": 1, + "type": "string" + }, + "menu_name": { + "title": "Menu Name", + "description": "Name for the category containing the items specified in `menu_items`.", + "markdownDescription": "Name for the category containing the items specified in `menu_items`.", + "minLength": 1, + "type": "string" + }, + "menu_items": { + "title": "Menu Items", + "description": "List of menu entries to create across main desktop systems.", + "markdownDescription": "List of menu entries to create across main desktop systems.", + "minItems": 1, + "type": "array", + "items": { + "$ref": "#/definitions/MenuItem" + } + } + }, + "required": [ + "menu_name", + "menu_items" + ], + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "https://schemas.conda.org/menuinst-1-1-0.schema.json", + "$version": "1-1-0", + "definitions": { + "MenuItemNameDict": { + "title": "MenuItemNameDict", + "description": "Variable menu item name. Use this dictionary if the menu item name depends on installation parameters such as the target environment.", + "type": "object", + "properties": { + "target_environment_is_base": { + "title": "Target Environment Is Base", + "description": "Name when target environment is the base environment.", + "markdownDescription": "Name when target environment is the base environment.", + "minLength": 1, + "type": "string" + }, + "target_environment_is_not_base": { + "title": "Target Environment Is Not Base", + "description": "Name when target environment is not the base environment.", + "markdownDescription": "Name when target environment is not the base environment.", + "minLength": 1, + "type": "string" + } + }, + "additionalProperties": false, + "markdownDescription": "Variable menu item name. Use this dictionary if the menu item name depends on installation parameters such as the target environment." + }, + "Linux": { + "title": "Linux", + "description": "Linux-specific instructions.\n\nCheck the [Desktop entry specification]( https://specifications.freedesktop.org/desktop-entry-spec/latest/recognized-keys.html) for more details.", + "type": "object", + "properties": { + "name": { + "title": "Name", + "description": "The name of the menu item. Can be a dictionary if the name depends on installation parameters. See `MenuItemNameDict` for details.", + "markdownDescription": "The name of the menu item. Can be a dictionary if the name depends on installation parameters. See `MenuItemNameDict` for details.", + "anyOf": [ + { + "type": "string", + "minLength": 1 + }, + { + "$ref": "#/definitions/MenuItemNameDict" + } + ] + }, + "description": { + "title": "Description", + "description": "A longer description of the menu item. Shown on popup messages.", + "markdownDescription": "A longer description of the menu item. Shown on popup messages.", + "type": "string" + }, + "icon": { + "title": "Icon", + "description": "Path to the file representing or containing the icon.", + "markdownDescription": "Path to the file representing or containing the icon.", + "minLength": 1, + "type": "string" + }, + "command": { + "title": "Command", + "description": "Command to run with the menu item, expressed as a list of strings where each string is an argument.", + "markdownDescription": "Command to run with the menu item, expressed as a list of strings where each string is an argument.", + "minItems": 1, + "type": "array", + "items": { + "type": "string" + } + }, + "working_dir": { + "title": "Working Dir", + "description": "Working directory for the running process. Defaults to user directory on each platform.", + "markdownDescription": "Working directory for the running process. Defaults to user directory on each platform.", + "minLength": 1, + "type": "string" + }, + "precommand": { + "title": "Precommand", + "description": "(Simple, preferrably single-line) logic to run before the command is run. Runs before the environment is activated, if that applies.", + "markdownDescription": "(Simple, preferrably single-line) logic to run before the command is run. Runs before the environment is activated, if that applies.", + "minLength": 1, + "type": "string" + }, + "precreate": { + "title": "Precreate", + "description": "(Simple, preferrably single-line) logic to run before the shortcut is created.", + "markdownDescription": "(Simple, preferrably single-line) logic to run before the shortcut is created.", + "minLength": 1, + "type": "string" + }, + "activate": { + "title": "Activate", + "description": "Whether to activate the target environment before running `command`.", + "markdownDescription": "Whether to activate the target environment before running `command`.", + "type": "boolean" + }, + "terminal": { + "title": "Terminal", + "description": "Whether run the program in a terminal/console or not. On Windows, it only has an effect if `activate` is true. On MacOS, the application will ignore command-line arguments.", + "markdownDescription": "Whether run the program in a terminal/console or not. On Windows, it only has an effect if `activate` is true. On MacOS, the application will ignore command-line arguments.", + "type": "boolean" + }, + "Categories": { + "title": "Categories", + "description": "Categories in which the entry should be shown in a menu. See 'Registered categories' in the [Menu Spec]( http://www.freedesktop.org/Standards/menu-spec).", + "markdownDescription": "Categories in which the entry should be shown in a menu. See 'Registered categories' in the [Menu Spec]( http://www.freedesktop.org/Standards/menu-spec).", + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "string", + "pattern": "^.+;$" + } + ] + }, + "DBusActivatable": { + "title": "Dbusactivatable", + "description": "A boolean value specifying if D-Bus activation is supported for this application.", + "markdownDescription": "A boolean value specifying if D-Bus activation is supported for this application.", + "type": "boolean" + }, + "GenericName": { + "title": "Genericname", + "description": "Generic name of the application; e.g. if the name is 'conda', this would be 'Package Manager'.", + "markdownDescription": "Generic name of the application; e.g. if the name is 'conda', this would be 'Package Manager'.", + "type": "string" + }, + "Hidden": { + "title": "Hidden", + "description": "Disable shortcut, signaling a missing resource.", + "markdownDescription": "Disable shortcut, signaling a missing resource.", + "type": "boolean" + }, + "Implements": { + "title": "Implements", + "description": "List of supported interfaces. See 'Interfaces' in [Desktop Entry Spec]( https://specifications.freedesktop.org/desktop-entry-spec/latest/interfaces.html).", + "markdownDescription": "List of supported interfaces. See 'Interfaces' in [Desktop Entry Spec]( https://specifications.freedesktop.org/desktop-entry-spec/latest/interfaces.html).", + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "string", + "pattern": "^.+;$" + } + ] + }, + "Keywords": { + "title": "Keywords", + "description": "Additional terms to describe this shortcut to aid in searching.", + "markdownDescription": "Additional terms to describe this shortcut to aid in searching.", + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "string", + "pattern": "^.+;$" + } + ] + }, + "MimeType": { + "title": "Mimetype", + "description": "The MIME type(s) supported by this application. Note this includes file types and URL protocols. For URL protocols, use `x-scheme-handler/your-protocol-here`. For example, if you want to register `menuinst:`, you would include `x-scheme-handler/menuinst`.", + "markdownDescription": "The MIME type(s) supported by this application. Note this includes file types and URL protocols. For URL protocols, use `x-scheme-handler/your-protocol-here`. For example, if you want to register `menuinst:`, you would include `x-scheme-handler/menuinst`.", + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "string", + "pattern": "^.+;$" + } + ] + }, + "NoDisplay": { + "title": "Nodisplay", + "description": "Do not show this item in the menu. Useful to associate MIME types and other registrations, without having an actual clickable item. Not to be confused with 'Hidden'.", + "markdownDescription": "Do not show this item in the menu. Useful to associate MIME types and other registrations, without having an actual clickable item. Not to be confused with 'Hidden'.", + "type": "boolean" + }, + "NotShowIn": { + "title": "Notshowin", + "description": "Desktop environments that should NOT display this item. It'll check against `$XDG_CURRENT_DESKTOP`.", + "markdownDescription": "Desktop environments that should NOT display this item. It'll check against `$XDG_CURRENT_DESKTOP`.", + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "string", + "pattern": "^.+;$" + } + ] + }, + "OnlyShowIn": { + "title": "Onlyshowin", + "description": "Desktop environments that should display this item. It'll check against `$XDG_CURRENT_DESKTOP`.", + "markdownDescription": "Desktop environments that should display this item. It'll check against `$XDG_CURRENT_DESKTOP`.", + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "string", + "pattern": "^.+;$" + } + ] + }, + "PrefersNonDefaultGPU": { + "title": "Prefersnondefaultgpu", + "description": "Hint that the app prefers to be run on a more powerful discrete GPU if available.", + "markdownDescription": "Hint that the app prefers to be run on a more powerful discrete GPU if available.", + "type": "boolean" + }, + "SingleMainWindow": { + "title": "Singlemainwindow", + "description": "Do not show the 'New Window' option in the app's context menu.", + "markdownDescription": "Do not show the 'New Window' option in the app's context menu.", + "type": "boolean" + }, + "StartupNotify": { + "title": "Startupnotify", + "description": "Advanced. See [Startup Notification spec]( https://www.freedesktop.org/wiki/Specifications/startup-notification-spec/).", + "markdownDescription": "Advanced. See [Startup Notification spec]( https://www.freedesktop.org/wiki/Specifications/startup-notification-spec/).", + "type": "boolean" + }, + "StartupWMClass": { + "title": "Startupwmclass", + "description": "Advanced. See [Startup Notification spec]( https://www.freedesktop.org/wiki/Specifications/startup-notification-spec/).", + "markdownDescription": "Advanced. See [Startup Notification spec]( https://www.freedesktop.org/wiki/Specifications/startup-notification-spec/).", + "type": "string" + }, + "TryExec": { + "title": "Tryexec", + "description": "Filename or absolute path to an executable file on disk used to determine if the program is actually installed and can be run. If the test fails, the shortcut might be ignored / hidden.", + "markdownDescription": "Filename or absolute path to an executable file on disk used to determine if the program is actually installed and can be run. If the test fails, the shortcut might be ignored / hidden.", + "type": "string" + }, + "glob_patterns": { + "title": "Glob Patterns", + "description": "Map of custom MIME types to their corresponding glob patterns (e.g. `*.txt`). Only needed if you define custom MIME types in `MimeType`.", + "markdownDescription": "Map of custom MIME types to their corresponding glob patterns (e.g. `*.txt`). Only needed if you define custom MIME types in `MimeType`.", + "type": "object", + "additionalProperties": { + "type": "string", + "pattern": ".*\\*.*" + } + } + }, + "additionalProperties": false, + "markdownDescription": "Linux-specific instructions.\n\nCheck the [Desktop entry specification]( https://specifications.freedesktop.org/desktop-entry-spec/latest/recognized-keys.html) for more details." + }, + "CFBundleURLTypesModel": { + "title": "CFBundleURLTypesModel", + "description": "Describes a URL scheme associated with the app.", + "type": "object", + "properties": { + "CFBundleTypeRole": { + "title": "Cfbundletyperole", + "description": "This key specifies the app's role with respect to the URL.", + "markdownDescription": "This key specifies the app's role with respect to the URL.", + "enum": [ + "Editor", + "Viewer", + "Shell", + "None" + ], + "type": "string" + }, + "CFBundleURLSchemes": { + "title": "Cfbundleurlschemes", + "description": "URL schemes / protocols handled by this type (e.g. 'mailto').", + "markdownDescription": "URL schemes / protocols handled by this type (e.g. 'mailto').", + "type": "array", + "items": { + "type": "string" + } + }, + "CFBundleURLName": { + "title": "Cfbundleurlname", + "description": "Abstract name for this URL type. Uniqueness recommended.", + "markdownDescription": "Abstract name for this URL type. Uniqueness recommended.", + "type": "string" + }, + "CFBundleURLIconFile": { + "title": "Cfbundleurliconfile", + "description": "Name of the icon image file (minus the .icns extension).", + "markdownDescription": "Name of the icon image file (minus the .icns extension).", + "type": "string" + } + }, + "required": [ + "CFBundleURLSchemes" + ], + "additionalProperties": false, + "markdownDescription": "Describes a URL scheme associated with the app." + }, + "CFBundleDocumentTypesModel": { + "title": "CFBundleDocumentTypesModel", + "description": "Describes a document type associated with the app.", + "type": "object", + "properties": { + "CFBundleTypeIconFile": { + "title": "Cfbundletypeiconfile", + "description": "Name of the icon image file (minus the .icns extension).", + "markdownDescription": "Name of the icon image file (minus the .icns extension).", + "type": "string" + }, + "CFBundleTypeName": { + "title": "Cfbundletypename", + "description": "Abstract name for this document type. Uniqueness recommended.", + "markdownDescription": "Abstract name for this document type. Uniqueness recommended.", + "type": "string" + }, + "CFBundleTypeRole": { + "title": "Cfbundletyperole", + "description": "This key specifies the app's role with respect to the type.", + "markdownDescription": "This key specifies the app's role with respect to the type.", + "enum": [ + "Editor", + "Viewer", + "Shell", + "None" + ], + "type": "string" + }, + "LSItemContentTypes": { + "title": "Lsitemcontenttypes", + "description": "List of UTI strings defining a supported file type; e.g. for PNG files, use 'public.png'. See [UTI Reference]( https://developer.apple.com/library/archive/documentation/Miscellaneous/Reference/UTIRef/Articles/System-DeclaredUniformTypeIdentifiers.html) for more info about the system-defined UTIs. Custom UTIs can be defined via 'UTExportedTypeDeclarations'. UTIs defined by other apps (not the system) need to be imported via 'UTImportedTypeDeclarations'.\n\nSee [Fun with UTIs](https://www.cocoanetics.com/2012/09/fun-with-uti/) for more info.", + "markdownDescription": "List of UTI strings defining a supported file type; e.g. for PNG files, use 'public.png'. See [UTI Reference]( https://developer.apple.com/library/archive/documentation/Miscellaneous/Reference/UTIRef/Articles/System-DeclaredUniformTypeIdentifiers.html) for more info about the system-defined UTIs. Custom UTIs can be defined via 'UTExportedTypeDeclarations'. UTIs defined by other apps (not the system) need to be imported via 'UTImportedTypeDeclarations'.\n\nSee [Fun with UTIs](https://www.cocoanetics.com/2012/09/fun-with-uti/) for more info.", + "type": "array", + "items": { + "type": "string" + } + }, + "LSHandlerRank": { + "title": "Lshandlerrank", + "description": "Determines how Launch Services ranks this app among the apps that declare themselves editors or viewers of files of this type.", + "markdownDescription": "Determines how Launch Services ranks this app among the apps that declare themselves editors or viewers of files of this type.", + "enum": [ + "Owner", + "Default", + "Alternate" + ], + "type": "string" + } + }, + "required": [ + "CFBundleTypeName", + "LSItemContentTypes", + "LSHandlerRank" + ], + "additionalProperties": false, + "markdownDescription": "Describes a document type associated with the app." + }, + "UTTypeDeclarationModel": { + "title": "UTTypeDeclarationModel", + "type": "object", + "properties": { + "UTTypeConformsTo": { + "title": "Uttypeconformsto", + "description": "The Uniform Type Identifier types that this type conforms to.", + "markdownDescription": "The Uniform Type Identifier types that this type conforms to.", + "type": "array", + "items": { + "type": "string" + } + }, + "UTTypeDescription": { + "title": "Uttypedescription", + "description": "A description for this type.", + "markdownDescription": "A description for this type.", + "type": "string" + }, + "UTTypeIconFile": { + "title": "Uttypeiconfile", + "description": "The bundle icon resource to associate with this type.", + "markdownDescription": "The bundle icon resource to associate with this type.", + "type": "string" + }, + "UTTypeIdentifier": { + "title": "Uttypeidentifier", + "description": "The Uniform Type Identifier to assign to this type.", + "markdownDescription": "The Uniform Type Identifier to assign to this type.", + "type": "string" + }, + "UTTypeReferenceURL": { + "title": "Uttypereferenceurl", + "description": "The webpage for a reference document that describes this type.", + "markdownDescription": "The webpage for a reference document that describes this type.", + "type": "string" + }, + "UTTypeTagSpecification": { + "title": "Uttypetagspecification", + "description": "A dictionary defining one or more equivalent type identifiers.", + "markdownDescription": "A dictionary defining one or more equivalent type identifiers.", + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "required": [ + "UTTypeConformsTo", + "UTTypeIdentifier", + "UTTypeTagSpecification" + ], + "additionalProperties": false + }, + "MacOS": { + "title": "MacOS", + "description": "Mac-specific instructions. Check these URLs for more info:\n\n- `CF*` keys: see [Core Foundation Keys](https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html) - `LS*` keys: see [Launch Services Keys](https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/LaunchServicesKeys.html) - `entitlements`: see [Entitlements documentation](https://developer.apple.com/documentation/bundleresources/entitlements)", + "type": "object", + "properties": { + "name": { + "title": "Name", + "description": "The name of the menu item. Can be a dictionary if the name depends on installation parameters. See `MenuItemNameDict` for details.", + "markdownDescription": "The name of the menu item. Can be a dictionary if the name depends on installation parameters. See `MenuItemNameDict` for details.", + "anyOf": [ + { + "type": "string", + "minLength": 1 + }, + { + "$ref": "#/definitions/MenuItemNameDict" + } + ] + }, + "description": { + "title": "Description", + "description": "A longer description of the menu item. Shown on popup messages.", + "markdownDescription": "A longer description of the menu item. Shown on popup messages.", + "type": "string" + }, + "icon": { + "title": "Icon", + "description": "Path to the file representing or containing the icon.", + "markdownDescription": "Path to the file representing or containing the icon.", + "minLength": 1, + "type": "string" + }, + "command": { + "title": "Command", + "description": "Command to run with the menu item, expressed as a list of strings where each string is an argument.", + "markdownDescription": "Command to run with the menu item, expressed as a list of strings where each string is an argument.", + "minItems": 1, + "type": "array", + "items": { + "type": "string" + } + }, + "working_dir": { + "title": "Working Dir", + "description": "Working directory for the running process. Defaults to user directory on each platform.", + "markdownDescription": "Working directory for the running process. Defaults to user directory on each platform.", + "minLength": 1, + "type": "string" + }, + "precommand": { + "title": "Precommand", + "description": "(Simple, preferrably single-line) logic to run before the command is run. Runs before the environment is activated, if that applies.", + "markdownDescription": "(Simple, preferrably single-line) logic to run before the command is run. Runs before the environment is activated, if that applies.", + "minLength": 1, + "type": "string" + }, + "precreate": { + "title": "Precreate", + "description": "(Simple, preferrably single-line) logic to run before the shortcut is created.", + "markdownDescription": "(Simple, preferrably single-line) logic to run before the shortcut is created.", + "minLength": 1, + "type": "string" + }, + "activate": { + "title": "Activate", + "description": "Whether to activate the target environment before running `command`.", + "markdownDescription": "Whether to activate the target environment before running `command`.", + "type": "boolean" + }, + "terminal": { + "title": "Terminal", + "description": "Whether run the program in a terminal/console or not. On Windows, it only has an effect if `activate` is true. On MacOS, the application will ignore command-line arguments.", + "markdownDescription": "Whether run the program in a terminal/console or not. On Windows, it only has an effect if `activate` is true. On MacOS, the application will ignore command-line arguments.", + "type": "boolean" + }, + "CFBundleDisplayName": { + "title": "Cfbundledisplayname", + "description": "Display name of the bundle, visible to users and used by Siri. If not provided, 'menuinst' will use the 'name' field.", + "markdownDescription": "Display name of the bundle, visible to users and used by Siri. If not provided, 'menuinst' will use the 'name' field.", + "type": "string" + }, + "CFBundleIdentifier": { + "title": "Cfbundleidentifier", + "description": "Unique identifier for the shortcut. Typically uses a reverse-DNS format. If not provided, 'menuinst' will generate one from the 'name' field.", + "markdownDescription": "Unique identifier for the shortcut. Typically uses a reverse-DNS format. If not provided, 'menuinst' will generate one from the 'name' field.", + "pattern": "^[A-z0-9\\-\\.]+$", + "type": "string" + }, + "CFBundleName": { + "title": "Cfbundlename", + "description": "Short name of the bundle. May be used if `CFBundleDisplayName` is absent. If not provided, 'menuinst' will generate one from the 'name' field.", + "markdownDescription": "Short name of the bundle. May be used if `CFBundleDisplayName` is absent. If not provided, 'menuinst' will generate one from the 'name' field.", + "maxLength": 16, + "type": "string" + }, + "CFBundleSpokenName": { + "title": "Cfbundlespokenname", + "description": "Suitable replacement for text-to-speech operations on the app. For example, 'my app one two three' instead of 'MyApp123'.", + "markdownDescription": "Suitable replacement for text-to-speech operations on the app. For example, 'my app one two three' instead of 'MyApp123'.", + "type": "string" + }, + "CFBundleVersion": { + "title": "Cfbundleversion", + "description": "Build version number for the bundle. In the context of 'menuinst' this can be used to signal a new version of the menu item for the same application version.", + "markdownDescription": "Build version number for the bundle. In the context of 'menuinst' this can be used to signal a new version of the menu item for the same application version.", + "pattern": "^\\S+$", + "type": "string" + }, + "CFBundleURLTypes": { + "title": "Cfbundleurltypes", + "description": "URL types supported by this app. Requires setting `event_handler` too. Note this feature requires macOS 10.14.4 or above.", + "markdownDescription": "URL types supported by this app. Requires setting `event_handler` too. Note this feature requires macOS 10.14.4 or above.", + "type": "array", + "items": { + "$ref": "#/definitions/CFBundleURLTypesModel" + } + }, + "CFBundleDocumentTypes": { + "title": "Cfbundledocumenttypes", + "description": "Document types supported by this app. Requires setting `event_handler` too. Requires macOS 10.14.4 or above.", + "markdownDescription": "Document types supported by this app. Requires setting `event_handler` too. Requires macOS 10.14.4 or above.", + "type": "array", + "items": { + "$ref": "#/definitions/CFBundleDocumentTypesModel" + } + }, + "LSApplicationCategoryType": { + "title": "Lsapplicationcategorytype", + "description": "The App Store uses this string to determine the appropriate categorization.", + "markdownDescription": "The App Store uses this string to determine the appropriate categorization.", + "pattern": "^public\\.app-category\\.\\S+$", + "type": "string" + }, + "LSBackgroundOnly": { + "title": "Lsbackgroundonly", + "description": "Specifies whether this app runs only in the background.", + "markdownDescription": "Specifies whether this app runs only in the background.", + "type": "boolean" + }, + "LSEnvironment": { + "title": "Lsenvironment", + "description": "List of key-value pairs used to define environment variables.", + "markdownDescription": "List of key-value pairs used to define environment variables.", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "LSMinimumSystemVersion": { + "title": "Lsminimumsystemversion", + "description": "Minimum version of macOS required for this app to run, as `x.y.z`. For example, for macOS v10.4 and later, use `10.4.0`.", + "markdownDescription": "Minimum version of macOS required for this app to run, as `x.y.z`. For example, for macOS v10.4 and later, use `10.4.0`.", + "pattern": "^\\d+\\.\\d+\\.\\d+$", + "type": "string" + }, + "LSMultipleInstancesProhibited": { + "title": "Lsmultipleinstancesprohibited", + "description": "Whether an app is prohibited from running simultaneously in multiple user sessions.", + "markdownDescription": "Whether an app is prohibited from running simultaneously in multiple user sessions.", + "type": "boolean" + }, + "LSRequiresNativeExecution": { + "title": "Lsrequiresnativeexecution", + "description": "If true, prevent a universal binary from being run under Rosetta emulation on an Intel-based Mac.", + "markdownDescription": "If true, prevent a universal binary from being run under Rosetta emulation on an Intel-based Mac.", + "type": "boolean" + }, + "NSSupportsAutomaticGraphicsSwitching": { + "title": "Nssupportsautomaticgraphicsswitching", + "description": "If true, allows an OpenGL app to utilize the integrated GPU.", + "markdownDescription": "If true, allows an OpenGL app to utilize the integrated GPU.", + "type": "boolean" + }, + "UTExportedTypeDeclarations": { + "title": "Utexportedtypedeclarations", + "description": "The uniform type identifiers owned and exported by the app.", + "markdownDescription": "The uniform type identifiers owned and exported by the app.", + "type": "array", + "items": { + "$ref": "#/definitions/UTTypeDeclarationModel" + } + }, + "UTImportedTypeDeclarations": { + "title": "Utimportedtypedeclarations", + "description": "The uniform type identifiers inherently supported, but not owned, by the app.", + "markdownDescription": "The uniform type identifiers inherently supported, but not owned, by the app.", + "type": "array", + "items": { + "$ref": "#/definitions/UTTypeDeclarationModel" + } + }, + "entitlements": { + "title": "Entitlements", + "description": "List of permissions to request for the launched application. See [the entitlements docs]( https://developer.apple.com/documentation/bundleresources/entitlements) for a full list of possible values.", + "markdownDescription": "List of permissions to request for the launched application. See [the entitlements docs]( https://developer.apple.com/documentation/bundleresources/entitlements) for a full list of possible values.", + "type": "array", + "items": { + "type": "string", + "pattern": "[a-z0-9\\.\\-]+" + } + }, + "link_in_bundle": { + "title": "Link In Bundle", + "description": "Paths that should be symlinked into the shortcut app bundle. It takes a mapping of source to destination paths. Destination paths must be relative. Placeholder `{{ MENU_ITEM_LOCATION }}` can be useful.", + "markdownDescription": "Paths that should be symlinked into the shortcut app bundle. It takes a mapping of source to destination paths. Destination paths must be relative. Placeholder `{{ MENU_ITEM_LOCATION }}` can be useful.", + "type": "object", + "additionalProperties": { + "type": "string", + "pattern": "^(?!\\/)(?!\\.\\./).*" + } + }, + "event_handler": { + "title": "Event Handler", + "description": "Required shell script logic to handle opened URL payloads. Note this feature requires macOS 10.14.4 or above.", + "markdownDescription": "Required shell script logic to handle opened URL payloads. Note this feature requires macOS 10.14.4 or above.", + "minLength": 1, + "type": "string" + } + }, + "additionalProperties": false, + "markdownDescription": "Mac-specific instructions. Check these URLs for more info:\n\n- `CF*` keys: see [Core Foundation Keys](https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html) - `LS*` keys: see [Launch Services Keys](https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/LaunchServicesKeys.html) - `entitlements`: see [Entitlements documentation](https://developer.apple.com/documentation/bundleresources/entitlements)" + }, + "Windows": { + "title": "Windows", + "description": "Windows-specific instructions. You can override global keys here if needed", + "type": "object", + "properties": { + "name": { + "title": "Name", + "description": "The name of the menu item. Can be a dictionary if the name depends on installation parameters. See `MenuItemNameDict` for details.", + "markdownDescription": "The name of the menu item. Can be a dictionary if the name depends on installation parameters. See `MenuItemNameDict` for details.", + "anyOf": [ + { + "type": "string", + "minLength": 1 + }, + { + "$ref": "#/definitions/MenuItemNameDict" + } + ] + }, + "description": { + "title": "Description", + "description": "A longer description of the menu item. Shown on popup messages.", + "markdownDescription": "A longer description of the menu item. Shown on popup messages.", + "type": "string" + }, + "icon": { + "title": "Icon", + "description": "Path to the file representing or containing the icon.", + "markdownDescription": "Path to the file representing or containing the icon.", + "minLength": 1, + "type": "string" + }, + "command": { + "title": "Command", + "description": "Command to run with the menu item, expressed as a list of strings where each string is an argument.", + "markdownDescription": "Command to run with the menu item, expressed as a list of strings where each string is an argument.", + "minItems": 1, + "type": "array", + "items": { + "type": "string" + } + }, + "working_dir": { + "title": "Working Dir", + "description": "Working directory for the running process. Defaults to user directory on each platform.", + "markdownDescription": "Working directory for the running process. Defaults to user directory on each platform.", + "minLength": 1, + "type": "string" + }, + "precommand": { + "title": "Precommand", + "description": "(Simple, preferrably single-line) logic to run before the command is run. Runs before the environment is activated, if that applies.", + "markdownDescription": "(Simple, preferrably single-line) logic to run before the command is run. Runs before the environment is activated, if that applies.", + "minLength": 1, + "type": "string" + }, + "precreate": { + "title": "Precreate", + "description": "(Simple, preferrably single-line) logic to run before the shortcut is created.", + "markdownDescription": "(Simple, preferrably single-line) logic to run before the shortcut is created.", + "minLength": 1, + "type": "string" + }, + "activate": { + "title": "Activate", + "description": "Whether to activate the target environment before running `command`.", + "markdownDescription": "Whether to activate the target environment before running `command`.", + "type": "boolean" + }, + "terminal": { + "title": "Terminal", + "description": "Whether run the program in a terminal/console or not. On Windows, it only has an effect if `activate` is true. On MacOS, the application will ignore command-line arguments.", + "markdownDescription": "Whether run the program in a terminal/console or not. On Windows, it only has an effect if `activate` is true. On MacOS, the application will ignore command-line arguments.", + "type": "boolean" + }, + "desktop": { + "title": "Desktop", + "description": "Whether to create a desktop icon in addition to the Start Menu item.", + "default": true, + "markdownDescription": "Whether to create a desktop icon in addition to the Start Menu item.", + "type": "boolean" + }, + "quicklaunch": { + "title": "Quicklaunch", + "description": "DEPRECATED. Whether to create a quick launch icon in addition to the Start Menu item.", + "default": false, + "deprecated": true, + "markdownDescription": "DEPRECATED. Whether to create a quick launch icon in addition to the Start Menu item.", + "type": "boolean" + }, + "terminal_profile": { + "title": "Terminal Profile", + "description": "Name of the Windows Terminal profile to create. This name must be unique across multiple installations because menuinst will overwrite Terminal profiles with the same name.", + "markdownDescription": "Name of the Windows Terminal profile to create. This name must be unique across multiple installations because menuinst will overwrite Terminal profiles with the same name.", + "minLength": 1, + "type": "string" + }, + "url_protocols": { + "title": "Url Protocols", + "description": "URL protocols that will be associated with this program.", + "markdownDescription": "URL protocols that will be associated with this program.", + "type": "array", + "items": { + "type": "string", + "pattern": "\\S+" + } + }, + "file_extensions": { + "title": "File Extensions", + "description": "File extensions that will be associated with this program.", + "markdownDescription": "File extensions that will be associated with this program.", + "type": "array", + "items": { + "type": "string", + "pattern": "\\.\\S*" + } + }, + "app_user_model_id": { + "title": "App User Model Id", + "description": "Identifier used in Windows 7 and above to associate processes, files and windows with a particular application. If your shortcut produces duplicated icons, you need to define this field. If not set, it will default to `Menuinst.`.\n\nSee [AppUserModelID docs]( https://learn.microsoft.com/en-us/windows/win32/shell/appids#how-to-form-an-application-defined-appusermodelid) for more information on the required string format.", + "markdownDescription": "Identifier used in Windows 7 and above to associate processes, files and windows with a particular application. If your shortcut produces duplicated icons, you need to define this field. If not set, it will default to `Menuinst.`.\n\nSee [AppUserModelID docs]( https://learn.microsoft.com/en-us/windows/win32/shell/appids#how-to-form-an-application-defined-appusermodelid) for more information on the required string format.", + "maxLength": 128, + "pattern": "\\S+\\.\\S+", + "type": "string" + } + }, + "additionalProperties": false, + "markdownDescription": "Windows-specific instructions. You can override global keys here if needed" + }, + "Platforms": { + "title": "Platforms", + "description": "Platform specific options.\n\nNote each of these fields supports the same keys as the top-level `MenuItem` (sans `platforms` itself), in case overrides are needed.", + "type": "object", + "properties": { + "linux": { + "title": "Linux", + "description": "Options for Linux. See `Linux` model for details.", + "markdownDescription": "Options for Linux. See `Linux` model for details.", + "allOf": [ + { + "$ref": "#/definitions/Linux" + } + ] + }, + "osx": { + "title": "Osx", + "description": "Options for macOS. See `MacOS` model for details.", + "markdownDescription": "Options for macOS. See `MacOS` model for details.", + "allOf": [ + { + "$ref": "#/definitions/MacOS" + } + ] + }, + "win": { + "title": "Win", + "description": "Options for Windows. See `Windows` model for details.", + "markdownDescription": "Options for Windows. See `Windows` model for details.", + "allOf": [ + { + "$ref": "#/definitions/Windows" + } + ] + } + }, + "additionalProperties": false, + "markdownDescription": "Platform specific options.\n\nNote each of these fields supports the same keys as the top-level `MenuItem` (sans `platforms` itself), in case overrides are needed." + }, + "MenuItem": { + "title": "MenuItem", + "description": "Instructions to create a menu item across operating systems.", + "type": "object", + "properties": { + "name": { + "title": "Name", + "description": "The name of the menu item. Can be a dictionary if the name depends on installation parameters. See `MenuItemNameDict` for details.", + "markdownDescription": "The name of the menu item. Can be a dictionary if the name depends on installation parameters. See `MenuItemNameDict` for details.", + "anyOf": [ + { + "type": "string", + "minLength": 1 + }, + { + "$ref": "#/definitions/MenuItemNameDict" + } + ] + }, + "description": { + "title": "Description", + "description": "A longer description of the menu item. Shown on popup messages.", + "markdownDescription": "A longer description of the menu item. Shown on popup messages.", + "type": "string" + }, + "command": { + "title": "Command", + "description": "Command to run with the menu item, expressed as a list of strings where each string is an argument.", + "markdownDescription": "Command to run with the menu item, expressed as a list of strings where each string is an argument.", + "minItems": 1, + "type": "array", + "items": { + "type": "string" + } + }, + "icon": { + "title": "Icon", + "description": "Path to the file representing or containing the icon.", + "markdownDescription": "Path to the file representing or containing the icon.", + "minLength": 1, + "type": "string" + }, + "precommand": { + "title": "Precommand", + "description": "(Simple, preferrably single-line) logic to run before the command is run. Runs before the environment is activated, if that applies.", + "markdownDescription": "(Simple, preferrably single-line) logic to run before the command is run. Runs before the environment is activated, if that applies.", + "minLength": 1, + "type": "string" + }, + "precreate": { + "title": "Precreate", + "description": "(Simple, preferrably single-line) logic to run before the shortcut is created.", + "markdownDescription": "(Simple, preferrably single-line) logic to run before the shortcut is created.", + "minLength": 1, + "type": "string" + }, + "working_dir": { + "title": "Working Dir", + "description": "Working directory for the running process. Defaults to user directory on each platform.", + "markdownDescription": "Working directory for the running process. Defaults to user directory on each platform.", + "minLength": 1, + "type": "string" + }, + "activate": { + "title": "Activate", + "description": "Whether to activate the target environment before running `command`.", + "default": true, + "markdownDescription": "Whether to activate the target environment before running `command`.", + "type": "boolean" + }, + "terminal": { + "title": "Terminal", + "description": "Whether run the program in a terminal/console or not. On Windows, it only has an effect if `activate` is true. On MacOS, the application will ignore command-line arguments.", + "default": false, + "markdownDescription": "Whether run the program in a terminal/console or not. On Windows, it only has an effect if `activate` is true. On MacOS, the application will ignore command-line arguments.", + "type": "boolean" + }, + "platforms": { + "title": "Platforms", + "description": "Platform-specific options. Presence of a platform field enables menu items in that platform.", + "markdownDescription": "Platform-specific options. Presence of a platform field enables menu items in that platform.", + "allOf": [ + { + "$ref": "#/definitions/Platforms" + } + ] + } + }, + "required": [ + "name", + "description", + "command", + "platforms" + ], + "additionalProperties": false, + "markdownDescription": "Instructions to create a menu item across operating systems." + } + } +} diff --git a/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst/data/menuinst-1-1-1.default.json b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst/data/menuinst-1-1-1.default.json new file mode 100644 index 0000000000000000000000000000000000000000..a81799c1af8ffacf12b21c5d3ef30147e36e8412 --- /dev/null +++ b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst/data/menuinst-1-1-1.default.json @@ -0,0 +1,68 @@ +{ + "menu_name": "REQUIRED", + "menu_items": [ + { + "name": "REQUIRED", + "description": "REQUIRED", + "command": [ + "REQUIRED" + ], + "icon": null, + "precommand": null, + "precreate": null, + "working_dir": null, + "activate": true, + "terminal": false, + "platforms": { + "linux": { + "Categories": null, + "DBusActivatable": null, + "GenericName": null, + "Hidden": null, + "Implements": null, + "Keywords": null, + "MimeType": null, + "NoDisplay": null, + "NotShowIn": null, + "OnlyShowIn": null, + "PrefersNonDefaultGPU": null, + "SingleMainWindow": null, + "StartupNotify": null, + "StartupWMClass": null, + "TryExec": null, + "glob_patterns": null + }, + "osx": { + "CFBundleDisplayName": null, + "CFBundleIdentifier": null, + "CFBundleName": null, + "CFBundleSpokenName": null, + "CFBundleVersion": null, + "CFBundleURLTypes": null, + "CFBundleDocumentTypes": null, + "LSApplicationCategoryType": null, + "LSBackgroundOnly": null, + "LSEnvironment": null, + "LSMinimumSystemVersion": null, + "LSMultipleInstancesProhibited": null, + "LSRequiresNativeExecution": null, + "NSSupportsAutomaticGraphicsSwitching": null, + "UTExportedTypeDeclarations": null, + "UTImportedTypeDeclarations": null, + "entitlements": null, + "link_in_bundle": null, + "event_handler": null + }, + "win": { + "desktop": true, + "quicklaunch": false, + "terminal_profile": null, + "url_protocols": null, + "file_extensions": null, + "app_user_model_id": null + } + } + } + ], + "$schema": "https://schemas.conda.org/menuinst-1-1-1.schema.json" +} diff --git a/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst/data/menuinst-1-1-1.schema.json b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst/data/menuinst-1-1-1.schema.json new file mode 100644 index 0000000000000000000000000000000000000000..d17d07b1e839f5aee64d1441846f7247f440da25 --- /dev/null +++ b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst/data/menuinst-1-1-1.schema.json @@ -0,0 +1,1605 @@ +{ + "$defs": { + "CFBundleDocumentTypesModel": { + "additionalProperties": false, + "description": "Describes a document type associated with the app.", + "markdownDescription": "Describes a document type associated with the app.", + "properties": { + "CFBundleTypeIconFile": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Name of the icon image file (minus the .icns extension).", + "markdownDescription": "Name of the icon image file (minus the .icns extension).", + "title": "Cfbundletypeiconfile" + }, + "CFBundleTypeName": { + "description": "Abstract name for this document type. Uniqueness recommended.", + "markdownDescription": "Abstract name for this document type. Uniqueness recommended.", + "title": "Cfbundletypename", + "type": "string" + }, + "CFBundleTypeRole": { + "anyOf": [ + { + "enum": [ + "Editor", + "Viewer", + "Shell", + "None" + ], + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "This key specifies the app's role with respect to the type.", + "markdownDescription": "This key specifies the app's role with respect to the type.", + "title": "Cfbundletyperole" + }, + "LSItemContentTypes": { + "description": "List of UTI strings defining a supported file type; e.g. for PNG files, use 'public.png'. See [UTI Reference]( https://developer.apple.com/library/archive/documentation/Miscellaneous/Reference/UTIRef/Articles/System-DeclaredUniformTypeIdentifiers.html) for more info about the system-defined UTIs. Custom UTIs can be defined via 'UTExportedTypeDeclarations'. UTIs defined by other apps (not the system) need to be imported via 'UTImportedTypeDeclarations'.\n\nSee [Fun with UTIs](https://www.cocoanetics.com/2012/09/fun-with-uti/) for more info.", + "items": { + "type": "string" + }, + "markdownDescription": "List of UTI strings defining a supported file type; e.g. for PNG files, use 'public.png'. See [UTI Reference]( https://developer.apple.com/library/archive/documentation/Miscellaneous/Reference/UTIRef/Articles/System-DeclaredUniformTypeIdentifiers.html) for more info about the system-defined UTIs. Custom UTIs can be defined via 'UTExportedTypeDeclarations'. UTIs defined by other apps (not the system) need to be imported via 'UTImportedTypeDeclarations'.\n\nSee [Fun with UTIs](https://www.cocoanetics.com/2012/09/fun-with-uti/) for more info.", + "title": "Lsitemcontenttypes", + "type": "array" + }, + "LSHandlerRank": { + "description": "Determines how Launch Services ranks this app among the apps that declare themselves editors or viewers of files of this type.", + "enum": [ + "Owner", + "Default", + "Alternate" + ], + "markdownDescription": "Determines how Launch Services ranks this app among the apps that declare themselves editors or viewers of files of this type.", + "title": "Lshandlerrank", + "type": "string" + } + }, + "required": [ + "CFBundleTypeName", + "LSItemContentTypes", + "LSHandlerRank" + ], + "title": "CFBundleDocumentTypesModel", + "type": "object" + }, + "CFBundleURLTypesModel": { + "additionalProperties": false, + "description": "Describes a URL scheme associated with the app.", + "markdownDescription": "Describes a URL scheme associated with the app.", + "properties": { + "CFBundleTypeRole": { + "anyOf": [ + { + "enum": [ + "Editor", + "Viewer", + "Shell", + "None" + ], + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "This key specifies the app's role with respect to the URL.", + "markdownDescription": "This key specifies the app's role with respect to the URL.", + "title": "Cfbundletyperole" + }, + "CFBundleURLSchemes": { + "description": "URL schemes / protocols handled by this type (e.g. 'mailto').", + "items": { + "type": "string" + }, + "markdownDescription": "URL schemes / protocols handled by this type (e.g. 'mailto').", + "title": "Cfbundleurlschemes", + "type": "array" + }, + "CFBundleURLName": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Abstract name for this URL type. Uniqueness recommended.", + "markdownDescription": "Abstract name for this URL type. Uniqueness recommended.", + "title": "Cfbundleurlname" + }, + "CFBundleURLIconFile": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Name of the icon image file (minus the .icns extension).", + "markdownDescription": "Name of the icon image file (minus the .icns extension).", + "title": "Cfbundleurliconfile" + } + }, + "required": [ + "CFBundleURLSchemes" + ], + "title": "CFBundleURLTypesModel", + "type": "object" + }, + "Linux": { + "additionalProperties": false, + "description": "Linux-specific instructions.\n\nCheck the [Desktop entry specification]( https://specifications.freedesktop.org/desktop-entry-spec/latest/recognized-keys.html) for more details.", + "markdownDescription": "Linux-specific instructions.\n\nCheck the [Desktop entry specification]( https://specifications.freedesktop.org/desktop-entry-spec/latest/recognized-keys.html) for more details.", + "properties": { + "name": { + "anyOf": [ + { + "minLength": 1, + "type": "string" + }, + { + "$ref": "#/$defs/MenuItemNameDict" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The name of the menu item. Can be a dictionary if the name depends on installation parameters. See `MenuItemNameDict` for details.", + "markdownDescription": "The name of the menu item. Can be a dictionary if the name depends on installation parameters. See `MenuItemNameDict` for details.", + "title": "Name" + }, + "description": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "A longer description of the menu item. Shown on popup messages.", + "markdownDescription": "A longer description of the menu item. Shown on popup messages.", + "title": "Description" + }, + "icon": { + "anyOf": [ + { + "minLength": 1, + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Path to the file representing or containing the icon.", + "markdownDescription": "Path to the file representing or containing the icon.", + "title": "Icon" + }, + "command": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "minItems": 1, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Command to run with the menu item, expressed as a list of strings where each string is an argument.", + "markdownDescription": "Command to run with the menu item, expressed as a list of strings where each string is an argument.", + "title": "Command" + }, + "working_dir": { + "anyOf": [ + { + "minLength": 1, + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Working directory for the running process. Defaults to user directory on each platform.", + "markdownDescription": "Working directory for the running process. Defaults to user directory on each platform.", + "title": "Working Dir" + }, + "precommand": { + "anyOf": [ + { + "minLength": 1, + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "(Simple, preferrably single-line) logic to run before the command is run. Runs before the environment is activated, if that applies.", + "markdownDescription": "(Simple, preferrably single-line) logic to run before the command is run. Runs before the environment is activated, if that applies.", + "title": "Precommand" + }, + "precreate": { + "anyOf": [ + { + "minLength": 1, + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "(Simple, preferrably single-line) logic to run before the shortcut is created.", + "markdownDescription": "(Simple, preferrably single-line) logic to run before the shortcut is created.", + "title": "Precreate" + }, + "activate": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Whether to activate the target environment before running `command`.", + "markdownDescription": "Whether to activate the target environment before running `command`.", + "title": "Activate" + }, + "terminal": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Whether run the program in a terminal/console or not. On Windows, it only has an effect if `activate` is true. On MacOS, the application will ignore command-line arguments.", + "markdownDescription": "Whether run the program in a terminal/console or not. On Windows, it only has an effect if `activate` is true. On MacOS, the application will ignore command-line arguments.", + "title": "Terminal" + }, + "Categories": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "pattern": "^.+;$", + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Categories in which the entry should be shown in a menu. See 'Registered categories' in the [Menu Spec]( http://www.freedesktop.org/Standards/menu-spec).", + "markdownDescription": "Categories in which the entry should be shown in a menu. See 'Registered categories' in the [Menu Spec]( http://www.freedesktop.org/Standards/menu-spec).", + "title": "Categories" + }, + "DBusActivatable": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "default": null, + "description": "A boolean value specifying if D-Bus activation is supported for this application.", + "markdownDescription": "A boolean value specifying if D-Bus activation is supported for this application.", + "title": "Dbusactivatable" + }, + "GenericName": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Generic name of the application; e.g. if the name is 'conda', this would be 'Package Manager'.", + "markdownDescription": "Generic name of the application; e.g. if the name is 'conda', this would be 'Package Manager'.", + "title": "Genericname" + }, + "Hidden": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Disable shortcut, signaling a missing resource.", + "markdownDescription": "Disable shortcut, signaling a missing resource.", + "title": "Hidden" + }, + "Implements": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "pattern": "^.+;$", + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "List of supported interfaces. See 'Interfaces' in [Desktop Entry Spec]( https://specifications.freedesktop.org/desktop-entry-spec/latest/interfaces.html).", + "markdownDescription": "List of supported interfaces. See 'Interfaces' in [Desktop Entry Spec]( https://specifications.freedesktop.org/desktop-entry-spec/latest/interfaces.html).", + "title": "Implements" + }, + "Keywords": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "pattern": "^.+;$", + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Additional terms to describe this shortcut to aid in searching.", + "markdownDescription": "Additional terms to describe this shortcut to aid in searching.", + "title": "Keywords" + }, + "MimeType": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "pattern": "^.+;$", + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The MIME type(s) supported by this application. Note this includes file types and URL protocols. For URL protocols, use `x-scheme-handler/your-protocol-here`. For example, if you want to register `menuinst:`, you would include `x-scheme-handler/menuinst`.", + "markdownDescription": "The MIME type(s) supported by this application. Note this includes file types and URL protocols. For URL protocols, use `x-scheme-handler/your-protocol-here`. For example, if you want to register `menuinst:`, you would include `x-scheme-handler/menuinst`.", + "title": "Mimetype" + }, + "NoDisplay": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Do not show this item in the menu. Useful to associate MIME types and other registrations, without having an actual clickable item. Not to be confused with 'Hidden'.", + "markdownDescription": "Do not show this item in the menu. Useful to associate MIME types and other registrations, without having an actual clickable item. Not to be confused with 'Hidden'.", + "title": "Nodisplay" + }, + "NotShowIn": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "pattern": "^.+;$", + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Desktop environments that should NOT display this item. It'll check against `$XDG_CURRENT_DESKTOP`.", + "markdownDescription": "Desktop environments that should NOT display this item. It'll check against `$XDG_CURRENT_DESKTOP`.", + "title": "Notshowin" + }, + "OnlyShowIn": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "pattern": "^.+;$", + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Desktop environments that should display this item. It'll check against `$XDG_CURRENT_DESKTOP`.", + "markdownDescription": "Desktop environments that should display this item. It'll check against `$XDG_CURRENT_DESKTOP`.", + "title": "Onlyshowin" + }, + "PrefersNonDefaultGPU": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Hint that the app prefers to be run on a more powerful discrete GPU if available.", + "markdownDescription": "Hint that the app prefers to be run on a more powerful discrete GPU if available.", + "title": "Prefersnondefaultgpu" + }, + "SingleMainWindow": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Do not show the 'New Window' option in the app's context menu.", + "markdownDescription": "Do not show the 'New Window' option in the app's context menu.", + "title": "Singlemainwindow" + }, + "StartupNotify": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Advanced. See [Startup Notification spec]( https://www.freedesktop.org/wiki/Specifications/startup-notification-spec/).", + "markdownDescription": "Advanced. See [Startup Notification spec]( https://www.freedesktop.org/wiki/Specifications/startup-notification-spec/).", + "title": "Startupnotify" + }, + "StartupWMClass": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Advanced. See [Startup Notification spec]( https://www.freedesktop.org/wiki/Specifications/startup-notification-spec/).", + "markdownDescription": "Advanced. See [Startup Notification spec]( https://www.freedesktop.org/wiki/Specifications/startup-notification-spec/).", + "title": "Startupwmclass" + }, + "TryExec": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Filename or absolute path to an executable file on disk used to determine if the program is actually installed and can be run. If the test fails, the shortcut might be ignored / hidden.", + "markdownDescription": "Filename or absolute path to an executable file on disk used to determine if the program is actually installed and can be run. If the test fails, the shortcut might be ignored / hidden.", + "title": "Tryexec" + }, + "glob_patterns": { + "anyOf": [ + { + "additionalProperties": { + "pattern": ".*\\*.*", + "type": "string" + }, + "type": "object" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Map of custom MIME types to their corresponding glob patterns (e.g. `*.txt`). Only needed if you define custom MIME types in `MimeType`.", + "markdownDescription": "Map of custom MIME types to their corresponding glob patterns (e.g. `*.txt`). Only needed if you define custom MIME types in `MimeType`.", + "title": "Glob Patterns" + } + }, + "title": "Linux", + "type": "object" + }, + "MacOS": { + "additionalProperties": false, + "description": "Mac-specific instructions. Check these URLs for more info:\n\n- `CF*` keys: see [Core Foundation Keys](https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html) - `LS*` keys: see [Launch Services Keys](https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/LaunchServicesKeys.html) - `entitlements`: see [Entitlements documentation](https://developer.apple.com/documentation/bundleresources/entitlements)", + "markdownDescription": "Mac-specific instructions. Check these URLs for more info:\n\n- `CF*` keys: see [Core Foundation Keys](https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html) - `LS*` keys: see [Launch Services Keys](https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/LaunchServicesKeys.html) - `entitlements`: see [Entitlements documentation](https://developer.apple.com/documentation/bundleresources/entitlements)", + "properties": { + "name": { + "anyOf": [ + { + "minLength": 1, + "type": "string" + }, + { + "$ref": "#/$defs/MenuItemNameDict" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The name of the menu item. Can be a dictionary if the name depends on installation parameters. See `MenuItemNameDict` for details.", + "markdownDescription": "The name of the menu item. Can be a dictionary if the name depends on installation parameters. See `MenuItemNameDict` for details.", + "title": "Name" + }, + "description": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "A longer description of the menu item. Shown on popup messages.", + "markdownDescription": "A longer description of the menu item. Shown on popup messages.", + "title": "Description" + }, + "icon": { + "anyOf": [ + { + "minLength": 1, + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Path to the file representing or containing the icon.", + "markdownDescription": "Path to the file representing or containing the icon.", + "title": "Icon" + }, + "command": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "minItems": 1, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Command to run with the menu item, expressed as a list of strings where each string is an argument.", + "markdownDescription": "Command to run with the menu item, expressed as a list of strings where each string is an argument.", + "title": "Command" + }, + "working_dir": { + "anyOf": [ + { + "minLength": 1, + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Working directory for the running process. Defaults to user directory on each platform.", + "markdownDescription": "Working directory for the running process. Defaults to user directory on each platform.", + "title": "Working Dir" + }, + "precommand": { + "anyOf": [ + { + "minLength": 1, + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "(Simple, preferrably single-line) logic to run before the command is run. Runs before the environment is activated, if that applies.", + "markdownDescription": "(Simple, preferrably single-line) logic to run before the command is run. Runs before the environment is activated, if that applies.", + "title": "Precommand" + }, + "precreate": { + "anyOf": [ + { + "minLength": 1, + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "(Simple, preferrably single-line) logic to run before the shortcut is created.", + "markdownDescription": "(Simple, preferrably single-line) logic to run before the shortcut is created.", + "title": "Precreate" + }, + "activate": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Whether to activate the target environment before running `command`.", + "markdownDescription": "Whether to activate the target environment before running `command`.", + "title": "Activate" + }, + "terminal": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Whether run the program in a terminal/console or not. On Windows, it only has an effect if `activate` is true. On MacOS, the application will ignore command-line arguments.", + "markdownDescription": "Whether run the program in a terminal/console or not. On Windows, it only has an effect if `activate` is true. On MacOS, the application will ignore command-line arguments.", + "title": "Terminal" + }, + "CFBundleDisplayName": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Display name of the bundle, visible to users and used by Siri. If not provided, 'menuinst' will use the 'name' field.", + "markdownDescription": "Display name of the bundle, visible to users and used by Siri. If not provided, 'menuinst' will use the 'name' field.", + "title": "Cfbundledisplayname" + }, + "CFBundleIdentifier": { + "anyOf": [ + { + "pattern": "^[A-z0-9\\-\\.]+$", + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Unique identifier for the shortcut. Typically uses a reverse-DNS format. If not provided, 'menuinst' will generate one from the 'name' field.", + "markdownDescription": "Unique identifier for the shortcut. Typically uses a reverse-DNS format. If not provided, 'menuinst' will generate one from the 'name' field.", + "title": "Cfbundleidentifier" + }, + "CFBundleName": { + "anyOf": [ + { + "maxLength": 16, + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Short name of the bundle. May be used if `CFBundleDisplayName` is absent. If not provided, 'menuinst' will generate one from the 'name' field.", + "markdownDescription": "Short name of the bundle. May be used if `CFBundleDisplayName` is absent. If not provided, 'menuinst' will generate one from the 'name' field.", + "title": "Cfbundlename" + }, + "CFBundleSpokenName": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Suitable replacement for text-to-speech operations on the app. For example, 'my app one two three' instead of 'MyApp123'.", + "markdownDescription": "Suitable replacement for text-to-speech operations on the app. For example, 'my app one two three' instead of 'MyApp123'.", + "title": "Cfbundlespokenname" + }, + "CFBundleVersion": { + "anyOf": [ + { + "pattern": "^\\S+$", + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Build version number for the bundle. In the context of 'menuinst' this can be used to signal a new version of the menu item for the same application version.", + "markdownDescription": "Build version number for the bundle. In the context of 'menuinst' this can be used to signal a new version of the menu item for the same application version.", + "title": "Cfbundleversion" + }, + "CFBundleURLTypes": { + "anyOf": [ + { + "items": { + "$ref": "#/$defs/CFBundleURLTypesModel" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "URL types supported by this app. Requires setting `event_handler` too. Note this feature requires macOS 10.14.4 or above.", + "markdownDescription": "URL types supported by this app. Requires setting `event_handler` too. Note this feature requires macOS 10.14.4 or above.", + "title": "Cfbundleurltypes" + }, + "CFBundleDocumentTypes": { + "anyOf": [ + { + "items": { + "$ref": "#/$defs/CFBundleDocumentTypesModel" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Document types supported by this app. Requires setting `event_handler` too. Requires macOS 10.14.4 or above.", + "markdownDescription": "Document types supported by this app. Requires setting `event_handler` too. Requires macOS 10.14.4 or above.", + "title": "Cfbundledocumenttypes" + }, + "LSApplicationCategoryType": { + "anyOf": [ + { + "pattern": "^public\\.app-category\\.\\S+$", + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The App Store uses this string to determine the appropriate categorization.", + "markdownDescription": "The App Store uses this string to determine the appropriate categorization.", + "title": "Lsapplicationcategorytype" + }, + "LSBackgroundOnly": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Specifies whether this app runs only in the background.", + "markdownDescription": "Specifies whether this app runs only in the background.", + "title": "Lsbackgroundonly" + }, + "LSEnvironment": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "type": "null" + } + ], + "default": null, + "description": "List of key-value pairs used to define environment variables.", + "markdownDescription": "List of key-value pairs used to define environment variables.", + "title": "Lsenvironment" + }, + "LSMinimumSystemVersion": { + "anyOf": [ + { + "pattern": "^\\d+\\.\\d+\\.\\d+$", + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Minimum version of macOS required for this app to run, as `x.y.z`. For example, for macOS v10.4 and later, use `10.4.0`.", + "markdownDescription": "Minimum version of macOS required for this app to run, as `x.y.z`. For example, for macOS v10.4 and later, use `10.4.0`.", + "title": "Lsminimumsystemversion" + }, + "LSMultipleInstancesProhibited": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Whether an app is prohibited from running simultaneously in multiple user sessions.", + "markdownDescription": "Whether an app is prohibited from running simultaneously in multiple user sessions.", + "title": "Lsmultipleinstancesprohibited" + }, + "LSRequiresNativeExecution": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "default": null, + "description": "If true, prevent a universal binary from being run under Rosetta emulation on an Intel-based Mac.", + "markdownDescription": "If true, prevent a universal binary from being run under Rosetta emulation on an Intel-based Mac.", + "title": "Lsrequiresnativeexecution" + }, + "NSSupportsAutomaticGraphicsSwitching": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "default": null, + "description": "If true, allows an OpenGL app to utilize the integrated GPU.", + "markdownDescription": "If true, allows an OpenGL app to utilize the integrated GPU.", + "title": "Nssupportsautomaticgraphicsswitching" + }, + "UTExportedTypeDeclarations": { + "anyOf": [ + { + "items": { + "$ref": "#/$defs/UTTypeDeclarationModel" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The uniform type identifiers owned and exported by the app.", + "markdownDescription": "The uniform type identifiers owned and exported by the app.", + "title": "Utexportedtypedeclarations" + }, + "UTImportedTypeDeclarations": { + "anyOf": [ + { + "items": { + "$ref": "#/$defs/UTTypeDeclarationModel" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The uniform type identifiers inherently supported, but not owned, by the app.", + "markdownDescription": "The uniform type identifiers inherently supported, but not owned, by the app.", + "title": "Utimportedtypedeclarations" + }, + "entitlements": { + "anyOf": [ + { + "items": { + "pattern": "[a-z0-9\\.\\-]+", + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "List of permissions to request for the launched application. See [the entitlements docs]( https://developer.apple.com/documentation/bundleresources/entitlements) for a full list of possible values.", + "markdownDescription": "List of permissions to request for the launched application. See [the entitlements docs]( https://developer.apple.com/documentation/bundleresources/entitlements) for a full list of possible values.", + "title": "Entitlements" + }, + "link_in_bundle": { + "anyOf": [ + { + "additionalProperties": { + "pattern": "^[^/]+.*", + "type": "string" + }, + "propertyNames": { + "minLength": 1 + }, + "type": "object" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Paths that should be symlinked into the shortcut app bundle. It takes a mapping of source to destination paths. Destination paths must be relative. Placeholder `{{ MENU_ITEM_LOCATION }}` can be useful.", + "markdownDescription": "Paths that should be symlinked into the shortcut app bundle. It takes a mapping of source to destination paths. Destination paths must be relative. Placeholder `{{ MENU_ITEM_LOCATION }}` can be useful.", + "title": "Link In Bundle" + }, + "event_handler": { + "anyOf": [ + { + "minLength": 1, + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Required shell script logic to handle opened URL payloads. Note this feature requires macOS 10.14.4 or above.", + "markdownDescription": "Required shell script logic to handle opened URL payloads. Note this feature requires macOS 10.14.4 or above.", + "title": "Event Handler" + } + }, + "title": "MacOS", + "type": "object" + }, + "MenuItem": { + "additionalProperties": false, + "description": "Instructions to create a menu item across operating systems.", + "markdownDescription": "Instructions to create a menu item across operating systems.", + "properties": { + "name": { + "anyOf": [ + { + "minLength": 1, + "type": "string" + }, + { + "$ref": "#/$defs/MenuItemNameDict" + } + ], + "description": "The name of the menu item. Can be a dictionary if the name depends on installation parameters. See `MenuItemNameDict` for details.", + "markdownDescription": "The name of the menu item. Can be a dictionary if the name depends on installation parameters. See `MenuItemNameDict` for details.", + "title": "Name" + }, + "description": { + "description": "A longer description of the menu item. Shown on popup messages.", + "markdownDescription": "A longer description of the menu item. Shown on popup messages.", + "title": "Description", + "type": "string" + }, + "command": { + "description": "Command to run with the menu item, expressed as a list of strings where each string is an argument.", + "items": { + "type": "string" + }, + "markdownDescription": "Command to run with the menu item, expressed as a list of strings where each string is an argument.", + "minItems": 1, + "title": "Command", + "type": "array" + }, + "icon": { + "anyOf": [ + { + "minLength": 1, + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Path to the file representing or containing the icon.", + "markdownDescription": "Path to the file representing or containing the icon.", + "title": "Icon" + }, + "precommand": { + "anyOf": [ + { + "minLength": 1, + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "(Simple, preferrably single-line) logic to run before the command is run. Runs before the environment is activated, if that applies.", + "markdownDescription": "(Simple, preferrably single-line) logic to run before the command is run. Runs before the environment is activated, if that applies.", + "title": "Precommand" + }, + "precreate": { + "anyOf": [ + { + "minLength": 1, + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "(Simple, preferrably single-line) logic to run before the shortcut is created.", + "markdownDescription": "(Simple, preferrably single-line) logic to run before the shortcut is created.", + "title": "Precreate" + }, + "working_dir": { + "anyOf": [ + { + "minLength": 1, + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Working directory for the running process. Defaults to user directory on each platform.", + "markdownDescription": "Working directory for the running process. Defaults to user directory on each platform.", + "title": "Working Dir" + }, + "activate": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "default": true, + "description": "Whether to activate the target environment before running `command`.", + "markdownDescription": "Whether to activate the target environment before running `command`.", + "title": "Activate" + }, + "terminal": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "default": false, + "description": "Whether run the program in a terminal/console or not. On Windows, it only has an effect if `activate` is true. On MacOS, the application will ignore command-line arguments.", + "markdownDescription": "Whether run the program in a terminal/console or not. On Windows, it only has an effect if `activate` is true. On MacOS, the application will ignore command-line arguments.", + "title": "Terminal" + }, + "platforms": { + "$ref": "#/$defs/Platforms", + "description": "Platform-specific options. Presence of a platform field enables menu items in that platform.", + "markdownDescription": "Platform-specific options. Presence of a platform field enables menu items in that platform." + } + }, + "required": [ + "name", + "description", + "command", + "platforms" + ], + "title": "MenuItem", + "type": "object" + }, + "MenuItemNameDict": { + "additionalProperties": false, + "description": "Variable menu item name. Use this dictionary if the menu item name depends on installation parameters such as the target environment.", + "markdownDescription": "Variable menu item name. Use this dictionary if the menu item name depends on installation parameters such as the target environment.", + "properties": { + "target_environment_is_base": { + "anyOf": [ + { + "minLength": 1, + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Name when target environment is the base environment.", + "markdownDescription": "Name when target environment is the base environment.", + "title": "Target Environment Is Base" + }, + "target_environment_is_not_base": { + "anyOf": [ + { + "minLength": 1, + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Name when target environment is not the base environment.", + "markdownDescription": "Name when target environment is not the base environment.", + "title": "Target Environment Is Not Base" + } + }, + "title": "MenuItemNameDict", + "type": "object" + }, + "Platforms": { + "additionalProperties": false, + "description": "Platform specific options.\n\nNote each of these fields supports the same keys as the top-level `MenuItem` (sans `platforms` itself), in case overrides are needed.", + "markdownDescription": "Platform specific options.\n\nNote each of these fields supports the same keys as the top-level `MenuItem` (sans `platforms` itself), in case overrides are needed.", + "properties": { + "linux": { + "anyOf": [ + { + "$ref": "#/$defs/Linux" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Options for Linux. See `Linux` model for details.", + "markdownDescription": "Options for Linux. See `Linux` model for details." + }, + "osx": { + "anyOf": [ + { + "$ref": "#/$defs/MacOS" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Options for macOS. See `MacOS` model for details.", + "markdownDescription": "Options for macOS. See `MacOS` model for details." + }, + "win": { + "anyOf": [ + { + "$ref": "#/$defs/Windows" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Options for Windows. See `Windows` model for details.", + "markdownDescription": "Options for Windows. See `Windows` model for details." + } + }, + "title": "Platforms", + "type": "object" + }, + "UTTypeDeclarationModel": { + "additionalProperties": false, + "properties": { + "UTTypeConformsTo": { + "description": "The Uniform Type Identifier types that this type conforms to.", + "items": { + "type": "string" + }, + "markdownDescription": "The Uniform Type Identifier types that this type conforms to.", + "title": "Uttypeconformsto", + "type": "array" + }, + "UTTypeDescription": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "A description for this type.", + "markdownDescription": "A description for this type.", + "title": "Uttypedescription" + }, + "UTTypeIconFile": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The bundle icon resource to associate with this type.", + "markdownDescription": "The bundle icon resource to associate with this type.", + "title": "Uttypeiconfile" + }, + "UTTypeIdentifier": { + "description": "The Uniform Type Identifier to assign to this type.", + "markdownDescription": "The Uniform Type Identifier to assign to this type.", + "title": "Uttypeidentifier", + "type": "string" + }, + "UTTypeReferenceURL": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The webpage for a reference document that describes this type.", + "markdownDescription": "The webpage for a reference document that describes this type.", + "title": "Uttypereferenceurl" + }, + "UTTypeTagSpecification": { + "additionalProperties": { + "items": { + "type": "string" + }, + "type": "array" + }, + "description": "A dictionary defining one or more equivalent type identifiers.", + "markdownDescription": "A dictionary defining one or more equivalent type identifiers.", + "title": "Uttypetagspecification", + "type": "object" + } + }, + "required": [ + "UTTypeConformsTo", + "UTTypeIdentifier", + "UTTypeTagSpecification" + ], + "title": "UTTypeDeclarationModel", + "type": "object" + }, + "Windows": { + "additionalProperties": false, + "description": "Windows-specific instructions. You can override global keys here if needed", + "markdownDescription": "Windows-specific instructions. You can override global keys here if needed", + "properties": { + "name": { + "anyOf": [ + { + "minLength": 1, + "type": "string" + }, + { + "$ref": "#/$defs/MenuItemNameDict" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The name of the menu item. Can be a dictionary if the name depends on installation parameters. See `MenuItemNameDict` for details.", + "markdownDescription": "The name of the menu item. Can be a dictionary if the name depends on installation parameters. See `MenuItemNameDict` for details.", + "title": "Name" + }, + "description": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "A longer description of the menu item. Shown on popup messages.", + "markdownDescription": "A longer description of the menu item. Shown on popup messages.", + "title": "Description" + }, + "icon": { + "anyOf": [ + { + "minLength": 1, + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Path to the file representing or containing the icon.", + "markdownDescription": "Path to the file representing or containing the icon.", + "title": "Icon" + }, + "command": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "minItems": 1, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Command to run with the menu item, expressed as a list of strings where each string is an argument.", + "markdownDescription": "Command to run with the menu item, expressed as a list of strings where each string is an argument.", + "title": "Command" + }, + "working_dir": { + "anyOf": [ + { + "minLength": 1, + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Working directory for the running process. Defaults to user directory on each platform.", + "markdownDescription": "Working directory for the running process. Defaults to user directory on each platform.", + "title": "Working Dir" + }, + "precommand": { + "anyOf": [ + { + "minLength": 1, + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "(Simple, preferrably single-line) logic to run before the command is run. Runs before the environment is activated, if that applies.", + "markdownDescription": "(Simple, preferrably single-line) logic to run before the command is run. Runs before the environment is activated, if that applies.", + "title": "Precommand" + }, + "precreate": { + "anyOf": [ + { + "minLength": 1, + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "(Simple, preferrably single-line) logic to run before the shortcut is created.", + "markdownDescription": "(Simple, preferrably single-line) logic to run before the shortcut is created.", + "title": "Precreate" + }, + "activate": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Whether to activate the target environment before running `command`.", + "markdownDescription": "Whether to activate the target environment before running `command`.", + "title": "Activate" + }, + "terminal": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Whether run the program in a terminal/console or not. On Windows, it only has an effect if `activate` is true. On MacOS, the application will ignore command-line arguments.", + "markdownDescription": "Whether run the program in a terminal/console or not. On Windows, it only has an effect if `activate` is true. On MacOS, the application will ignore command-line arguments.", + "title": "Terminal" + }, + "desktop": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "default": true, + "description": "Whether to create a desktop icon in addition to the Start Menu item.", + "markdownDescription": "Whether to create a desktop icon in addition to the Start Menu item.", + "title": "Desktop" + }, + "quicklaunch": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "default": false, + "deprecated": true, + "description": "DEPRECATED. Whether to create a quick launch icon in addition to the Start Menu item.", + "markdownDescription": "DEPRECATED. Whether to create a quick launch icon in addition to the Start Menu item.", + "title": "Quicklaunch" + }, + "terminal_profile": { + "anyOf": [ + { + "minLength": 1, + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Name of the Windows Terminal profile to create. This name must be unique across multiple installations because menuinst will overwrite Terminal profiles with the same name.", + "markdownDescription": "Name of the Windows Terminal profile to create. This name must be unique across multiple installations because menuinst will overwrite Terminal profiles with the same name.", + "title": "Terminal Profile" + }, + "url_protocols": { + "anyOf": [ + { + "items": { + "pattern": "\\S+", + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "URL protocols that will be associated with this program.", + "markdownDescription": "URL protocols that will be associated with this program.", + "title": "Url Protocols" + }, + "file_extensions": { + "anyOf": [ + { + "items": { + "pattern": "\\.\\S*", + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "File extensions that will be associated with this program.", + "markdownDescription": "File extensions that will be associated with this program.", + "title": "File Extensions" + }, + "app_user_model_id": { + "anyOf": [ + { + "maxLength": 128, + "pattern": "\\S+\\.\\S+", + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Identifier used in Windows 7 and above to associate processes, files and windows with a particular application. If your shortcut produces duplicated icons, you need to define this field. If not set, it will default to `Menuinst.`.\n\nSee [AppUserModelID docs]( https://learn.microsoft.com/en-us/windows/win32/shell/appids#how-to-form-an-application-defined-appusermodelid) for more information on the required string format.", + "markdownDescription": "Identifier used in Windows 7 and above to associate processes, files and windows with a particular application. If your shortcut produces duplicated icons, you need to define this field. If not set, it will default to `Menuinst.`.\n\nSee [AppUserModelID docs]( https://learn.microsoft.com/en-us/windows/win32/shell/appids#how-to-form-an-application-defined-appusermodelid) for more information on the required string format.", + "title": "App User Model Id" + } + }, + "title": "Windows", + "type": "object" + } + }, + "$id": "https://schemas.conda.org/menuinst-1-1-1.schema.json", + "$schema": "http://json-schema.org/draft-07/schema#", + "$version": "1-1-1", + "additionalProperties": false, + "description": "Metadata required to create menu items across operating systems with `menuinst`.", + "properties": { + "$id": { + "default": "https://schemas.conda.org/menuinst-1-1-1.schema.json", + "deprecated": true, + "description": "DEPRECATED. Use ``$schema``.", + "markdownDescription": "DEPRECATED. Use ``$schema``.", + "minLength": 1, + "title": "$Id", + "type": "string" + }, + "$schema": { + "default": "https://schemas.conda.org/menuinst-1-1-1.schema.json", + "description": "Version of the menuinst schema to validate against.", + "markdownDescription": "Version of the menuinst schema to validate against.", + "minLength": 1, + "title": "$Schema", + "type": "string" + }, + "menu_name": { + "description": "Name for the category containing the items specified in `menu_items`.", + "markdownDescription": "Name for the category containing the items specified in `menu_items`.", + "minLength": 1, + "title": "Menu Name", + "type": "string" + }, + "menu_items": { + "description": "List of menu entries to create across main desktop systems.", + "items": { + "$ref": "#/$defs/MenuItem" + }, + "markdownDescription": "List of menu entries to create across main desktop systems.", + "minItems": 1, + "title": "Menu Items", + "type": "array" + } + }, + "required": [ + "menu_name", + "menu_items" + ], + "title": "MenuInstSchema", + "type": "object" +} diff --git a/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst/data/menuinst-1-1-2.default.json b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst/data/menuinst-1-1-2.default.json new file mode 100644 index 0000000000000000000000000000000000000000..760fb0b7453ea3179bc47b7ce12c4d6e9476a46c --- /dev/null +++ b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst/data/menuinst-1-1-2.default.json @@ -0,0 +1,72 @@ +{ + "menu_name": "REQUIRED", + "menu_items": [ + { + "name": "REQUIRED", + "description": "REQUIRED", + "command": [ + "REQUIRED" + ], + "icon": null, + "precommand": null, + "precreate": null, + "working_dir": null, + "activate": true, + "terminal": false, + "platforms": { + "linux": { + "Categories": null, + "DBusActivatable": null, + "GenericName": null, + "Hidden": null, + "Implements": null, + "Keywords": null, + "MimeType": null, + "NoDisplay": null, + "NotShowIn": null, + "OnlyShowIn": null, + "PrefersNonDefaultGPU": null, + "SingleMainWindow": null, + "StartupNotify": null, + "StartupWMClass": null, + "TryExec": null, + "glob_patterns": null + }, + "osx": { + "CFBundleDisplayName": null, + "CFBundleIdentifier": null, + "CFBundleName": null, + "CFBundleSpokenName": null, + "CFBundleVersion": null, + "CFBundleURLTypes": null, + "CFBundleDocumentTypes": null, + "LSApplicationCategoryType": null, + "LSBackgroundOnly": null, + "LSEnvironment": null, + "LSMinimumSystemVersion": null, + "LSMultipleInstancesProhibited": null, + "LSRequiresNativeExecution": null, + "NSAudioCaptureUsageDescription": null, + "NSCameraUsageDescription": null, + "NSMainCameraUsageDescription": null, + "NSMicrophoneUsageDescription": null, + "NSSupportsAutomaticGraphicsSwitching": null, + "UTExportedTypeDeclarations": null, + "UTImportedTypeDeclarations": null, + "entitlements": null, + "link_in_bundle": null, + "event_handler": null + }, + "win": { + "desktop": true, + "quicklaunch": false, + "terminal_profile": null, + "url_protocols": null, + "file_extensions": null, + "app_user_model_id": null + } + } + } + ], + "$schema": "https://schemas.conda.org/menuinst-1-1-2.schema.json" +} diff --git a/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst/data/menuinst-1-1-2.schema.json b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst/data/menuinst-1-1-2.schema.json new file mode 100644 index 0000000000000000000000000000000000000000..9e9281cda400b82d2f18b7162a62b2d7641f9a3c --- /dev/null +++ b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst/data/menuinst-1-1-2.schema.json @@ -0,0 +1,1661 @@ +{ + "$defs": { + "CFBundleDocumentTypesModel": { + "additionalProperties": false, + "description": "Describes a document type associated with the app.", + "markdownDescription": "Describes a document type associated with the app.", + "properties": { + "CFBundleTypeIconFile": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Name of the icon image file (minus the .icns extension).", + "markdownDescription": "Name of the icon image file (minus the .icns extension).", + "title": "Cfbundletypeiconfile" + }, + "CFBundleTypeName": { + "description": "Abstract name for this document type. Uniqueness recommended.", + "markdownDescription": "Abstract name for this document type. Uniqueness recommended.", + "title": "Cfbundletypename", + "type": "string" + }, + "CFBundleTypeRole": { + "anyOf": [ + { + "enum": [ + "Editor", + "Viewer", + "Shell", + "None" + ], + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "This key specifies the app's role with respect to the type.", + "markdownDescription": "This key specifies the app's role with respect to the type.", + "title": "Cfbundletyperole" + }, + "LSItemContentTypes": { + "description": "List of UTI strings defining a supported file type; e.g. for PNG files, use 'public.png'. See [UTI Reference]( https://developer.apple.com/library/archive/documentation/Miscellaneous/Reference/UTIRef/Articles/System-DeclaredUniformTypeIdentifiers.html) for more info about the system-defined UTIs. Custom UTIs can be defined via 'UTExportedTypeDeclarations'. UTIs defined by other apps (not the system) need to be imported via 'UTImportedTypeDeclarations'.\n\nSee [Fun with UTIs](https://www.cocoanetics.com/2012/09/fun-with-uti/) for more info.", + "items": { + "type": "string" + }, + "markdownDescription": "List of UTI strings defining a supported file type; e.g. for PNG files, use 'public.png'. See [UTI Reference]( https://developer.apple.com/library/archive/documentation/Miscellaneous/Reference/UTIRef/Articles/System-DeclaredUniformTypeIdentifiers.html) for more info about the system-defined UTIs. Custom UTIs can be defined via 'UTExportedTypeDeclarations'. UTIs defined by other apps (not the system) need to be imported via 'UTImportedTypeDeclarations'.\n\nSee [Fun with UTIs](https://www.cocoanetics.com/2012/09/fun-with-uti/) for more info.", + "title": "Lsitemcontenttypes", + "type": "array" + }, + "LSHandlerRank": { + "description": "Determines how Launch Services ranks this app among the apps that declare themselves editors or viewers of files of this type.", + "enum": [ + "Owner", + "Default", + "Alternate" + ], + "markdownDescription": "Determines how Launch Services ranks this app among the apps that declare themselves editors or viewers of files of this type.", + "title": "Lshandlerrank", + "type": "string" + } + }, + "required": [ + "CFBundleTypeName", + "LSItemContentTypes", + "LSHandlerRank" + ], + "title": "CFBundleDocumentTypesModel", + "type": "object" + }, + "CFBundleURLTypesModel": { + "additionalProperties": false, + "description": "Describes a URL scheme associated with the app.", + "markdownDescription": "Describes a URL scheme associated with the app.", + "properties": { + "CFBundleTypeRole": { + "anyOf": [ + { + "enum": [ + "Editor", + "Viewer", + "Shell", + "None" + ], + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "This key specifies the app's role with respect to the URL.", + "markdownDescription": "This key specifies the app's role with respect to the URL.", + "title": "Cfbundletyperole" + }, + "CFBundleURLSchemes": { + "description": "URL schemes / protocols handled by this type (e.g. 'mailto').", + "items": { + "type": "string" + }, + "markdownDescription": "URL schemes / protocols handled by this type (e.g. 'mailto').", + "title": "Cfbundleurlschemes", + "type": "array" + }, + "CFBundleURLName": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Abstract name for this URL type. Uniqueness recommended.", + "markdownDescription": "Abstract name for this URL type. Uniqueness recommended.", + "title": "Cfbundleurlname" + }, + "CFBundleURLIconFile": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Name of the icon image file (minus the .icns extension).", + "markdownDescription": "Name of the icon image file (minus the .icns extension).", + "title": "Cfbundleurliconfile" + } + }, + "required": [ + "CFBundleURLSchemes" + ], + "title": "CFBundleURLTypesModel", + "type": "object" + }, + "Linux": { + "additionalProperties": false, + "description": "Linux-specific instructions.\n\nCheck the [Desktop entry specification]( https://specifications.freedesktop.org/desktop-entry-spec/latest/recognized-keys.html) for more details.", + "markdownDescription": "Linux-specific instructions.\n\nCheck the [Desktop entry specification]( https://specifications.freedesktop.org/desktop-entry-spec/latest/recognized-keys.html) for more details.", + "properties": { + "name": { + "anyOf": [ + { + "minLength": 1, + "type": "string" + }, + { + "$ref": "#/$defs/MenuItemNameDict" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The name of the menu item. Can be a dictionary if the name depends on installation parameters. See `MenuItemNameDict` for details.", + "markdownDescription": "The name of the menu item. Can be a dictionary if the name depends on installation parameters. See `MenuItemNameDict` for details.", + "title": "Name" + }, + "description": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "A longer description of the menu item. Shown on popup messages.", + "markdownDescription": "A longer description of the menu item. Shown on popup messages.", + "title": "Description" + }, + "icon": { + "anyOf": [ + { + "minLength": 1, + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Path to the file representing or containing the icon.", + "markdownDescription": "Path to the file representing or containing the icon.", + "title": "Icon" + }, + "command": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "minItems": 1, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Command to run with the menu item, expressed as a list of strings where each string is an argument.", + "markdownDescription": "Command to run with the menu item, expressed as a list of strings where each string is an argument.", + "title": "Command" + }, + "working_dir": { + "anyOf": [ + { + "minLength": 1, + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Working directory for the running process. Defaults to user directory on each platform.", + "markdownDescription": "Working directory for the running process. Defaults to user directory on each platform.", + "title": "Working Dir" + }, + "precommand": { + "anyOf": [ + { + "minLength": 1, + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "(Simple, preferrably single-line) logic to run before the command is run. Runs before the environment is activated, if that applies.", + "markdownDescription": "(Simple, preferrably single-line) logic to run before the command is run. Runs before the environment is activated, if that applies.", + "title": "Precommand" + }, + "precreate": { + "anyOf": [ + { + "minLength": 1, + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "(Simple, preferrably single-line) logic to run before the shortcut is created.", + "markdownDescription": "(Simple, preferrably single-line) logic to run before the shortcut is created.", + "title": "Precreate" + }, + "activate": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Whether to activate the target environment before running `command`.", + "markdownDescription": "Whether to activate the target environment before running `command`.", + "title": "Activate" + }, + "terminal": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Whether run the program in a terminal/console or not. On Windows, it only has an effect if `activate` is true. On MacOS, the application will ignore command-line arguments.", + "markdownDescription": "Whether run the program in a terminal/console or not. On Windows, it only has an effect if `activate` is true. On MacOS, the application will ignore command-line arguments.", + "title": "Terminal" + }, + "Categories": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "pattern": "^.+;$", + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Categories in which the entry should be shown in a menu. See 'Registered categories' in the [Menu Spec]( http://www.freedesktop.org/Standards/menu-spec).", + "markdownDescription": "Categories in which the entry should be shown in a menu. See 'Registered categories' in the [Menu Spec]( http://www.freedesktop.org/Standards/menu-spec).", + "title": "Categories" + }, + "DBusActivatable": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "default": null, + "description": "A boolean value specifying if D-Bus activation is supported for this application.", + "markdownDescription": "A boolean value specifying if D-Bus activation is supported for this application.", + "title": "Dbusactivatable" + }, + "GenericName": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Generic name of the application; e.g. if the name is 'conda', this would be 'Package Manager'.", + "markdownDescription": "Generic name of the application; e.g. if the name is 'conda', this would be 'Package Manager'.", + "title": "Genericname" + }, + "Hidden": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Disable shortcut, signaling a missing resource.", + "markdownDescription": "Disable shortcut, signaling a missing resource.", + "title": "Hidden" + }, + "Implements": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "pattern": "^.+;$", + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "List of supported interfaces. See 'Interfaces' in [Desktop Entry Spec]( https://specifications.freedesktop.org/desktop-entry-spec/latest/interfaces.html).", + "markdownDescription": "List of supported interfaces. See 'Interfaces' in [Desktop Entry Spec]( https://specifications.freedesktop.org/desktop-entry-spec/latest/interfaces.html).", + "title": "Implements" + }, + "Keywords": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "pattern": "^.+;$", + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Additional terms to describe this shortcut to aid in searching.", + "markdownDescription": "Additional terms to describe this shortcut to aid in searching.", + "title": "Keywords" + }, + "MimeType": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "pattern": "^.+;$", + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The MIME type(s) supported by this application. Note this includes file types and URL protocols. For URL protocols, use `x-scheme-handler/your-protocol-here`. For example, if you want to register `menuinst:`, you would include `x-scheme-handler/menuinst`.", + "markdownDescription": "The MIME type(s) supported by this application. Note this includes file types and URL protocols. For URL protocols, use `x-scheme-handler/your-protocol-here`. For example, if you want to register `menuinst:`, you would include `x-scheme-handler/menuinst`.", + "title": "Mimetype" + }, + "NoDisplay": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Do not show this item in the menu. Useful to associate MIME types and other registrations, without having an actual clickable item. Not to be confused with 'Hidden'.", + "markdownDescription": "Do not show this item in the menu. Useful to associate MIME types and other registrations, without having an actual clickable item. Not to be confused with 'Hidden'.", + "title": "Nodisplay" + }, + "NotShowIn": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "pattern": "^.+;$", + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Desktop environments that should NOT display this item. It'll check against `$XDG_CURRENT_DESKTOP`.", + "markdownDescription": "Desktop environments that should NOT display this item. It'll check against `$XDG_CURRENT_DESKTOP`.", + "title": "Notshowin" + }, + "OnlyShowIn": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "pattern": "^.+;$", + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Desktop environments that should display this item. It'll check against `$XDG_CURRENT_DESKTOP`.", + "markdownDescription": "Desktop environments that should display this item. It'll check against `$XDG_CURRENT_DESKTOP`.", + "title": "Onlyshowin" + }, + "PrefersNonDefaultGPU": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Hint that the app prefers to be run on a more powerful discrete GPU if available.", + "markdownDescription": "Hint that the app prefers to be run on a more powerful discrete GPU if available.", + "title": "Prefersnondefaultgpu" + }, + "SingleMainWindow": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Do not show the 'New Window' option in the app's context menu.", + "markdownDescription": "Do not show the 'New Window' option in the app's context menu.", + "title": "Singlemainwindow" + }, + "StartupNotify": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Advanced. See [Startup Notification spec]( https://www.freedesktop.org/wiki/Specifications/startup-notification-spec/).", + "markdownDescription": "Advanced. See [Startup Notification spec]( https://www.freedesktop.org/wiki/Specifications/startup-notification-spec/).", + "title": "Startupnotify" + }, + "StartupWMClass": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Advanced. See [Startup Notification spec]( https://www.freedesktop.org/wiki/Specifications/startup-notification-spec/).", + "markdownDescription": "Advanced. See [Startup Notification spec]( https://www.freedesktop.org/wiki/Specifications/startup-notification-spec/).", + "title": "Startupwmclass" + }, + "TryExec": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Filename or absolute path to an executable file on disk used to determine if the program is actually installed and can be run. If the test fails, the shortcut might be ignored / hidden.", + "markdownDescription": "Filename or absolute path to an executable file on disk used to determine if the program is actually installed and can be run. If the test fails, the shortcut might be ignored / hidden.", + "title": "Tryexec" + }, + "glob_patterns": { + "anyOf": [ + { + "additionalProperties": { + "pattern": ".*\\*.*", + "type": "string" + }, + "type": "object" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Map of custom MIME types to their corresponding glob patterns (e.g. `*.txt`). Only needed if you define custom MIME types in `MimeType`.", + "markdownDescription": "Map of custom MIME types to their corresponding glob patterns (e.g. `*.txt`). Only needed if you define custom MIME types in `MimeType`.", + "title": "Glob Patterns" + } + }, + "title": "Linux", + "type": "object" + }, + "MacOS": { + "additionalProperties": false, + "description": "Mac-specific instructions. Check these URLs for more info:\n\n- `CF*` keys: see [Core Foundation Keys](https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html) - `LS*` keys: see [Launch Services Keys](https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/LaunchServicesKeys.html) - `entitlements`: see [Entitlements documentation](https://developer.apple.com/documentation/bundleresources/entitlements)", + "markdownDescription": "Mac-specific instructions. Check these URLs for more info:\n\n- `CF*` keys: see [Core Foundation Keys](https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html) - `LS*` keys: see [Launch Services Keys](https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/LaunchServicesKeys.html) - `entitlements`: see [Entitlements documentation](https://developer.apple.com/documentation/bundleresources/entitlements)", + "properties": { + "name": { + "anyOf": [ + { + "minLength": 1, + "type": "string" + }, + { + "$ref": "#/$defs/MenuItemNameDict" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The name of the menu item. Can be a dictionary if the name depends on installation parameters. See `MenuItemNameDict` for details.", + "markdownDescription": "The name of the menu item. Can be a dictionary if the name depends on installation parameters. See `MenuItemNameDict` for details.", + "title": "Name" + }, + "description": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "A longer description of the menu item. Shown on popup messages.", + "markdownDescription": "A longer description of the menu item. Shown on popup messages.", + "title": "Description" + }, + "icon": { + "anyOf": [ + { + "minLength": 1, + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Path to the file representing or containing the icon.", + "markdownDescription": "Path to the file representing or containing the icon.", + "title": "Icon" + }, + "command": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "minItems": 1, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Command to run with the menu item, expressed as a list of strings where each string is an argument.", + "markdownDescription": "Command to run with the menu item, expressed as a list of strings where each string is an argument.", + "title": "Command" + }, + "working_dir": { + "anyOf": [ + { + "minLength": 1, + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Working directory for the running process. Defaults to user directory on each platform.", + "markdownDescription": "Working directory for the running process. Defaults to user directory on each platform.", + "title": "Working Dir" + }, + "precommand": { + "anyOf": [ + { + "minLength": 1, + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "(Simple, preferrably single-line) logic to run before the command is run. Runs before the environment is activated, if that applies.", + "markdownDescription": "(Simple, preferrably single-line) logic to run before the command is run. Runs before the environment is activated, if that applies.", + "title": "Precommand" + }, + "precreate": { + "anyOf": [ + { + "minLength": 1, + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "(Simple, preferrably single-line) logic to run before the shortcut is created.", + "markdownDescription": "(Simple, preferrably single-line) logic to run before the shortcut is created.", + "title": "Precreate" + }, + "activate": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Whether to activate the target environment before running `command`.", + "markdownDescription": "Whether to activate the target environment before running `command`.", + "title": "Activate" + }, + "terminal": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Whether run the program in a terminal/console or not. On Windows, it only has an effect if `activate` is true. On MacOS, the application will ignore command-line arguments.", + "markdownDescription": "Whether run the program in a terminal/console or not. On Windows, it only has an effect if `activate` is true. On MacOS, the application will ignore command-line arguments.", + "title": "Terminal" + }, + "CFBundleDisplayName": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Display name of the bundle, visible to users and used by Siri. If not provided, 'menuinst' will use the 'name' field.", + "markdownDescription": "Display name of the bundle, visible to users and used by Siri. If not provided, 'menuinst' will use the 'name' field.", + "title": "Cfbundledisplayname" + }, + "CFBundleIdentifier": { + "anyOf": [ + { + "pattern": "^[A-z0-9\\-\\.]+$", + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Unique identifier for the shortcut. Typically uses a reverse-DNS format. If not provided, 'menuinst' will generate one from the 'name' field.", + "markdownDescription": "Unique identifier for the shortcut. Typically uses a reverse-DNS format. If not provided, 'menuinst' will generate one from the 'name' field.", + "title": "Cfbundleidentifier" + }, + "CFBundleName": { + "anyOf": [ + { + "maxLength": 16, + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Short name of the bundle. May be used if `CFBundleDisplayName` is absent. If not provided, 'menuinst' will generate one from the 'name' field.", + "markdownDescription": "Short name of the bundle. May be used if `CFBundleDisplayName` is absent. If not provided, 'menuinst' will generate one from the 'name' field.", + "title": "Cfbundlename" + }, + "CFBundleSpokenName": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Suitable replacement for text-to-speech operations on the app. For example, 'my app one two three' instead of 'MyApp123'.", + "markdownDescription": "Suitable replacement for text-to-speech operations on the app. For example, 'my app one two three' instead of 'MyApp123'.", + "title": "Cfbundlespokenname" + }, + "CFBundleVersion": { + "anyOf": [ + { + "pattern": "^\\S+$", + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Build version number for the bundle. In the context of 'menuinst' this can be used to signal a new version of the menu item for the same application version.", + "markdownDescription": "Build version number for the bundle. In the context of 'menuinst' this can be used to signal a new version of the menu item for the same application version.", + "title": "Cfbundleversion" + }, + "CFBundleURLTypes": { + "anyOf": [ + { + "items": { + "$ref": "#/$defs/CFBundleURLTypesModel" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "URL types supported by this app. Requires macOS 10.14.4 or above. Refer to `event_handler` if your application does not have support for Apple Events handling.", + "markdownDescription": "URL types supported by this app. Requires macOS 10.14.4 or above. Refer to `event_handler` if your application does not have support for Apple Events handling.", + "title": "Cfbundleurltypes" + }, + "CFBundleDocumentTypes": { + "anyOf": [ + { + "items": { + "$ref": "#/$defs/CFBundleDocumentTypesModel" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Document types supported by this app. Requires macOS 10.14.4 or above. Refer to `event_handler` if your application does not have support for Apple Events handling.", + "markdownDescription": "Document types supported by this app. Requires macOS 10.14.4 or above. Refer to `event_handler` if your application does not have support for Apple Events handling.", + "title": "Cfbundledocumenttypes" + }, + "LSApplicationCategoryType": { + "anyOf": [ + { + "pattern": "^public\\.app-category\\.\\S+$", + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The App Store uses this string to determine the appropriate categorization.", + "markdownDescription": "The App Store uses this string to determine the appropriate categorization.", + "title": "Lsapplicationcategorytype" + }, + "LSBackgroundOnly": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Specifies whether this app runs only in the background.", + "markdownDescription": "Specifies whether this app runs only in the background.", + "title": "Lsbackgroundonly" + }, + "LSEnvironment": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "type": "null" + } + ], + "default": null, + "description": "List of key-value pairs used to define environment variables.", + "markdownDescription": "List of key-value pairs used to define environment variables.", + "title": "Lsenvironment" + }, + "LSMinimumSystemVersion": { + "anyOf": [ + { + "pattern": "^\\d+\\.\\d+\\.\\d+$", + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Minimum version of macOS required for this app to run, as `x.y.z`. For example, for macOS v10.4 and later, use `10.4.0`.", + "markdownDescription": "Minimum version of macOS required for this app to run, as `x.y.z`. For example, for macOS v10.4 and later, use `10.4.0`.", + "title": "Lsminimumsystemversion" + }, + "LSMultipleInstancesProhibited": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Whether an app is prohibited from running simultaneously in multiple user sessions.", + "markdownDescription": "Whether an app is prohibited from running simultaneously in multiple user sessions.", + "title": "Lsmultipleinstancesprohibited" + }, + "LSRequiresNativeExecution": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "default": null, + "description": "If true, prevent a universal binary from being run under Rosetta emulation on an Intel-based Mac.", + "markdownDescription": "If true, prevent a universal binary from being run under Rosetta emulation on an Intel-based Mac.", + "title": "Lsrequiresnativeexecution" + }, + "NSAudioCaptureUsageDescription": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "A message describing why an app is requesting access to capture system audio.", + "markdownDescription": "A message describing why an app is requesting access to capture system audio.", + "title": "Nsaudiocaptureusagedescription" + }, + "NSCameraUsageDescription": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "A message describing why an app is requesting access to the device's camera.", + "markdownDescription": "A message describing why an app is requesting access to the device's camera.", + "title": "Nscamerausagedescription" + }, + "NSMainCameraUsageDescription": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "A message describing why an app is requesting access to the device's main camera.", + "markdownDescription": "A message describing why an app is requesting access to the device's main camera.", + "title": "Nsmaincamerausagedescription" + }, + "NSMicrophoneUsageDescription": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "A message describing why an app is requesting access to the device's microphone.", + "markdownDescription": "A message describing why an app is requesting access to the device's microphone.", + "title": "Nsmicrophoneusagedescription" + }, + "NSSupportsAutomaticGraphicsSwitching": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "default": null, + "description": "If true, allows an OpenGL app to utilize the integrated GPU.", + "markdownDescription": "If true, allows an OpenGL app to utilize the integrated GPU.", + "title": "Nssupportsautomaticgraphicsswitching" + }, + "UTExportedTypeDeclarations": { + "anyOf": [ + { + "items": { + "$ref": "#/$defs/UTTypeDeclarationModel" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The uniform type identifiers owned and exported by the app.", + "markdownDescription": "The uniform type identifiers owned and exported by the app.", + "title": "Utexportedtypedeclarations" + }, + "UTImportedTypeDeclarations": { + "anyOf": [ + { + "items": { + "$ref": "#/$defs/UTTypeDeclarationModel" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The uniform type identifiers inherently supported, but not owned, by the app.", + "markdownDescription": "The uniform type identifiers inherently supported, but not owned, by the app.", + "title": "Utimportedtypedeclarations" + }, + "entitlements": { + "anyOf": [ + { + "items": { + "pattern": "[a-z0-9\\.\\-]+", + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "List of permissions to request for the launched application. See [the entitlements docs]( https://developer.apple.com/documentation/bundleresources/entitlements) for a full list of possible values.", + "markdownDescription": "List of permissions to request for the launched application. See [the entitlements docs]( https://developer.apple.com/documentation/bundleresources/entitlements) for a full list of possible values.", + "title": "Entitlements" + }, + "link_in_bundle": { + "anyOf": [ + { + "additionalProperties": { + "pattern": "^[^/]+.*", + "type": "string" + }, + "propertyNames": { + "minLength": 1 + }, + "type": "object" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Paths that should be symlinked into the shortcut app bundle. It takes a mapping of source to destination paths. Destination paths must be relative. Placeholder `{{ MENU_ITEM_LOCATION }}` can be useful.", + "markdownDescription": "Paths that should be symlinked into the shortcut app bundle. It takes a mapping of source to destination paths. Destination paths must be relative. Placeholder `{{ MENU_ITEM_LOCATION }}` can be useful.", + "title": "Link In Bundle" + }, + "event_handler": { + "anyOf": [ + { + "minLength": 1, + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Required shell script logic to handle opened URL payloads. Note this feature requires macOS 10.14.4 or above. Using this key will inject a custom Swift launcher in the `.app` bundle to listen to Apple Events and forward them to your application. If your app is already handling Apple Events (e.g. via Qt's `QFileOpenEvent`), you do not need this.", + "markdownDescription": "Required shell script logic to handle opened URL payloads. Note this feature requires macOS 10.14.4 or above. Using this key will inject a custom Swift launcher in the `.app` bundle to listen to Apple Events and forward them to your application. If your app is already handling Apple Events (e.g. via Qt's `QFileOpenEvent`), you do not need this.", + "title": "Event Handler" + } + }, + "title": "MacOS", + "type": "object" + }, + "MenuItem": { + "additionalProperties": false, + "description": "Instructions to create a menu item across operating systems.", + "markdownDescription": "Instructions to create a menu item across operating systems.", + "properties": { + "name": { + "anyOf": [ + { + "minLength": 1, + "type": "string" + }, + { + "$ref": "#/$defs/MenuItemNameDict" + } + ], + "description": "The name of the menu item. Can be a dictionary if the name depends on installation parameters. See `MenuItemNameDict` for details.", + "markdownDescription": "The name of the menu item. Can be a dictionary if the name depends on installation parameters. See `MenuItemNameDict` for details.", + "title": "Name" + }, + "description": { + "description": "A longer description of the menu item. Shown on popup messages.", + "markdownDescription": "A longer description of the menu item. Shown on popup messages.", + "title": "Description", + "type": "string" + }, + "command": { + "description": "Command to run with the menu item, expressed as a list of strings where each string is an argument.", + "items": { + "type": "string" + }, + "markdownDescription": "Command to run with the menu item, expressed as a list of strings where each string is an argument.", + "minItems": 1, + "title": "Command", + "type": "array" + }, + "icon": { + "anyOf": [ + { + "minLength": 1, + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Path to the file representing or containing the icon.", + "markdownDescription": "Path to the file representing or containing the icon.", + "title": "Icon" + }, + "precommand": { + "anyOf": [ + { + "minLength": 1, + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "(Simple, preferrably single-line) logic to run before the command is run. Runs before the environment is activated, if that applies.", + "markdownDescription": "(Simple, preferrably single-line) logic to run before the command is run. Runs before the environment is activated, if that applies.", + "title": "Precommand" + }, + "precreate": { + "anyOf": [ + { + "minLength": 1, + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "(Simple, preferrably single-line) logic to run before the shortcut is created.", + "markdownDescription": "(Simple, preferrably single-line) logic to run before the shortcut is created.", + "title": "Precreate" + }, + "working_dir": { + "anyOf": [ + { + "minLength": 1, + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Working directory for the running process. Defaults to user directory on each platform.", + "markdownDescription": "Working directory for the running process. Defaults to user directory on each platform.", + "title": "Working Dir" + }, + "activate": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "default": true, + "description": "Whether to activate the target environment before running `command`.", + "markdownDescription": "Whether to activate the target environment before running `command`.", + "title": "Activate" + }, + "terminal": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "default": false, + "description": "Whether run the program in a terminal/console or not. On Windows, it only has an effect if `activate` is true. On MacOS, the application will ignore command-line arguments.", + "markdownDescription": "Whether run the program in a terminal/console or not. On Windows, it only has an effect if `activate` is true. On MacOS, the application will ignore command-line arguments.", + "title": "Terminal" + }, + "platforms": { + "$ref": "#/$defs/Platforms", + "description": "Platform-specific options. Presence of a platform field enables menu items in that platform.", + "markdownDescription": "Platform-specific options. Presence of a platform field enables menu items in that platform." + } + }, + "required": [ + "name", + "description", + "command", + "platforms" + ], + "title": "MenuItem", + "type": "object" + }, + "MenuItemNameDict": { + "additionalProperties": false, + "description": "Variable menu item name. Use this dictionary if the menu item name depends on installation parameters such as the target environment.", + "markdownDescription": "Variable menu item name. Use this dictionary if the menu item name depends on installation parameters such as the target environment.", + "properties": { + "target_environment_is_base": { + "anyOf": [ + { + "minLength": 1, + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Name when target environment is the base environment.", + "markdownDescription": "Name when target environment is the base environment.", + "title": "Target Environment Is Base" + }, + "target_environment_is_not_base": { + "anyOf": [ + { + "minLength": 1, + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Name when target environment is not the base environment.", + "markdownDescription": "Name when target environment is not the base environment.", + "title": "Target Environment Is Not Base" + } + }, + "title": "MenuItemNameDict", + "type": "object" + }, + "Platforms": { + "additionalProperties": false, + "description": "Platform specific options.\n\nNote each of these fields supports the same keys as the top-level `MenuItem` (sans `platforms` itself), in case overrides are needed.", + "markdownDescription": "Platform specific options.\n\nNote each of these fields supports the same keys as the top-level `MenuItem` (sans `platforms` itself), in case overrides are needed.", + "properties": { + "linux": { + "anyOf": [ + { + "$ref": "#/$defs/Linux" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Options for Linux. See `Linux` model for details.", + "markdownDescription": "Options for Linux. See `Linux` model for details." + }, + "osx": { + "anyOf": [ + { + "$ref": "#/$defs/MacOS" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Options for macOS. See `MacOS` model for details.", + "markdownDescription": "Options for macOS. See `MacOS` model for details." + }, + "win": { + "anyOf": [ + { + "$ref": "#/$defs/Windows" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Options for Windows. See `Windows` model for details.", + "markdownDescription": "Options for Windows. See `Windows` model for details." + } + }, + "title": "Platforms", + "type": "object" + }, + "UTTypeDeclarationModel": { + "additionalProperties": false, + "properties": { + "UTTypeConformsTo": { + "description": "The Uniform Type Identifier types that this type conforms to.", + "items": { + "type": "string" + }, + "markdownDescription": "The Uniform Type Identifier types that this type conforms to.", + "title": "Uttypeconformsto", + "type": "array" + }, + "UTTypeDescription": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "A description for this type.", + "markdownDescription": "A description for this type.", + "title": "Uttypedescription" + }, + "UTTypeIconFile": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The bundle icon resource to associate with this type.", + "markdownDescription": "The bundle icon resource to associate with this type.", + "title": "Uttypeiconfile" + }, + "UTTypeIdentifier": { + "description": "The Uniform Type Identifier to assign to this type.", + "markdownDescription": "The Uniform Type Identifier to assign to this type.", + "title": "Uttypeidentifier", + "type": "string" + }, + "UTTypeReferenceURL": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The webpage for a reference document that describes this type.", + "markdownDescription": "The webpage for a reference document that describes this type.", + "title": "Uttypereferenceurl" + }, + "UTTypeTagSpecification": { + "additionalProperties": { + "items": { + "type": "string" + }, + "type": "array" + }, + "description": "A dictionary defining one or more equivalent type identifiers.", + "markdownDescription": "A dictionary defining one or more equivalent type identifiers.", + "title": "Uttypetagspecification", + "type": "object" + } + }, + "required": [ + "UTTypeConformsTo", + "UTTypeIdentifier", + "UTTypeTagSpecification" + ], + "title": "UTTypeDeclarationModel", + "type": "object" + }, + "Windows": { + "additionalProperties": false, + "description": "Windows-specific instructions. You can override global keys here if needed", + "markdownDescription": "Windows-specific instructions. You can override global keys here if needed", + "properties": { + "name": { + "anyOf": [ + { + "minLength": 1, + "type": "string" + }, + { + "$ref": "#/$defs/MenuItemNameDict" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The name of the menu item. Can be a dictionary if the name depends on installation parameters. See `MenuItemNameDict` for details.", + "markdownDescription": "The name of the menu item. Can be a dictionary if the name depends on installation parameters. See `MenuItemNameDict` for details.", + "title": "Name" + }, + "description": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "A longer description of the menu item. Shown on popup messages.", + "markdownDescription": "A longer description of the menu item. Shown on popup messages.", + "title": "Description" + }, + "icon": { + "anyOf": [ + { + "minLength": 1, + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Path to the file representing or containing the icon.", + "markdownDescription": "Path to the file representing or containing the icon.", + "title": "Icon" + }, + "command": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "minItems": 1, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Command to run with the menu item, expressed as a list of strings where each string is an argument.", + "markdownDescription": "Command to run with the menu item, expressed as a list of strings where each string is an argument.", + "title": "Command" + }, + "working_dir": { + "anyOf": [ + { + "minLength": 1, + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Working directory for the running process. Defaults to user directory on each platform.", + "markdownDescription": "Working directory for the running process. Defaults to user directory on each platform.", + "title": "Working Dir" + }, + "precommand": { + "anyOf": [ + { + "minLength": 1, + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "(Simple, preferrably single-line) logic to run before the command is run. Runs before the environment is activated, if that applies.", + "markdownDescription": "(Simple, preferrably single-line) logic to run before the command is run. Runs before the environment is activated, if that applies.", + "title": "Precommand" + }, + "precreate": { + "anyOf": [ + { + "minLength": 1, + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "(Simple, preferrably single-line) logic to run before the shortcut is created.", + "markdownDescription": "(Simple, preferrably single-line) logic to run before the shortcut is created.", + "title": "Precreate" + }, + "activate": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Whether to activate the target environment before running `command`.", + "markdownDescription": "Whether to activate the target environment before running `command`.", + "title": "Activate" + }, + "terminal": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Whether run the program in a terminal/console or not. On Windows, it only has an effect if `activate` is true. On MacOS, the application will ignore command-line arguments.", + "markdownDescription": "Whether run the program in a terminal/console or not. On Windows, it only has an effect if `activate` is true. On MacOS, the application will ignore command-line arguments.", + "title": "Terminal" + }, + "desktop": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "default": true, + "description": "Whether to create a desktop icon in addition to the Start Menu item.", + "markdownDescription": "Whether to create a desktop icon in addition to the Start Menu item.", + "title": "Desktop" + }, + "quicklaunch": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "default": false, + "deprecated": true, + "description": "DEPRECATED. Whether to create a quick launch icon in addition to the Start Menu item.", + "markdownDescription": "DEPRECATED. Whether to create a quick launch icon in addition to the Start Menu item.", + "title": "Quicklaunch" + }, + "terminal_profile": { + "anyOf": [ + { + "minLength": 1, + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Name of the Windows Terminal profile to create. This name must be unique across multiple installations because menuinst will overwrite Terminal profiles with the same name.", + "markdownDescription": "Name of the Windows Terminal profile to create. This name must be unique across multiple installations because menuinst will overwrite Terminal profiles with the same name.", + "title": "Terminal Profile" + }, + "url_protocols": { + "anyOf": [ + { + "items": { + "pattern": "\\S+", + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "URL protocols that will be associated with this program.", + "markdownDescription": "URL protocols that will be associated with this program.", + "title": "Url Protocols" + }, + "file_extensions": { + "anyOf": [ + { + "items": { + "pattern": "\\.\\S*", + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "File extensions that will be associated with this program.", + "markdownDescription": "File extensions that will be associated with this program.", + "title": "File Extensions" + }, + "app_user_model_id": { + "anyOf": [ + { + "maxLength": 128, + "pattern": "\\S+\\.\\S+", + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Identifier used in Windows 7 and above to associate processes, files and windows with a particular application. If your shortcut produces duplicated icons, you need to define this field. If not set, it will default to `Menuinst.`.\n\nSee [AppUserModelID docs]( https://learn.microsoft.com/en-us/windows/win32/shell/appids#how-to-form-an-application-defined-appusermodelid) for more information on the required string format.", + "markdownDescription": "Identifier used in Windows 7 and above to associate processes, files and windows with a particular application. If your shortcut produces duplicated icons, you need to define this field. If not set, it will default to `Menuinst.`.\n\nSee [AppUserModelID docs]( https://learn.microsoft.com/en-us/windows/win32/shell/appids#how-to-form-an-application-defined-appusermodelid) for more information on the required string format.", + "title": "App User Model Id" + } + }, + "title": "Windows", + "type": "object" + } + }, + "$id": "https://schemas.conda.org/menuinst-1-1-2.schema.json", + "$schema": "http://json-schema.org/draft-07/schema#", + "$version": "1-1-2", + "additionalProperties": false, + "description": "Metadata required to create menu items across operating systems with `menuinst`.", + "properties": { + "$id": { + "default": "https://schemas.conda.org/menuinst-1-1-2.schema.json", + "deprecated": true, + "description": "DEPRECATED. Use ``$schema``.", + "markdownDescription": "DEPRECATED. Use ``$schema``.", + "minLength": 1, + "title": "$Id", + "type": "string" + }, + "$schema": { + "default": "https://schemas.conda.org/menuinst-1-1-2.schema.json", + "description": "Version of the menuinst schema to validate against.", + "markdownDescription": "Version of the menuinst schema to validate against.", + "minLength": 1, + "title": "$Schema", + "type": "string" + }, + "menu_name": { + "description": "Name for the category containing the items specified in `menu_items`.", + "markdownDescription": "Name for the category containing the items specified in `menu_items`.", + "minLength": 1, + "title": "Menu Name", + "type": "string" + }, + "menu_items": { + "description": "List of menu entries to create across main desktop systems.", + "items": { + "$ref": "#/$defs/MenuItem" + }, + "markdownDescription": "List of menu entries to create across main desktop systems.", + "minItems": 1, + "title": "Menu Items", + "type": "array" + } + }, + "required": [ + "menu_name", + "menu_items" + ], + "title": "MenuInstSchema", + "type": "object" +} diff --git a/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst/data/menuinst-1-1-3.default.json b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst/data/menuinst-1-1-3.default.json new file mode 100644 index 0000000000000000000000000000000000000000..73c6f5d3c329d0d01042c76a01d9fe4a68484740 --- /dev/null +++ b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst/data/menuinst-1-1-3.default.json @@ -0,0 +1,73 @@ +{ + "menu_name": "REQUIRED", + "menu_items": [ + { + "name": "REQUIRED", + "description": "REQUIRED", + "command": [ + "REQUIRED" + ], + "icon": null, + "precommand": null, + "precreate": null, + "working_dir": null, + "activate": true, + "terminal": false, + "platforms": { + "linux": { + "Categories": null, + "DBusActivatable": null, + "GenericName": null, + "Hidden": null, + "Implements": null, + "Keywords": null, + "MimeType": null, + "NoDisplay": null, + "NotShowIn": null, + "OnlyShowIn": null, + "PrefersNonDefaultGPU": null, + "SingleMainWindow": null, + "StartupNotify": null, + "StartupWMClass": null, + "TryExec": null, + "glob_patterns": null + }, + "osx": { + "CFBundleDisplayName": null, + "CFBundleIdentifier": null, + "CFBundleName": null, + "CFBundleSpokenName": null, + "CFBundleVersion": null, + "CFBundleURLTypes": null, + "CFBundleDocumentTypes": null, + "LSApplicationCategoryType": null, + "LSBackgroundOnly": null, + "LSEnvironment": null, + "LSMinimumSystemVersion": null, + "LSMultipleInstancesProhibited": null, + "LSRequiresNativeExecution": null, + "NSAudioCaptureUsageDescription": null, + "NSCameraUsageDescription": null, + "NSMainCameraUsageDescription": null, + "NSMicrophoneUsageDescription": null, + "NSSupportsAutomaticGraphicsSwitching": null, + "UTExportedTypeDeclarations": null, + "UTImportedTypeDeclarations": null, + "entitlements": null, + "info_plist_extra": null, + "link_in_bundle": null, + "event_handler": null + }, + "win": { + "desktop": true, + "quicklaunch": false, + "terminal_profile": null, + "url_protocols": null, + "file_extensions": null, + "app_user_model_id": null + } + } + } + ], + "$schema": "https://schemas.conda.org/menuinst-1-1-3.schema.json" +} diff --git a/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst/data/menuinst-1-1-3.schema.json b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst/data/menuinst-1-1-3.schema.json new file mode 100644 index 0000000000000000000000000000000000000000..571f56a792ee50a274f9ce501fa7e8b87788aa56 --- /dev/null +++ b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst/data/menuinst-1-1-3.schema.json @@ -0,0 +1,1679 @@ +{ + "$defs": { + "CFBundleDocumentTypesModel": { + "additionalProperties": false, + "description": "Describes a document type associated with the app.", + "markdownDescription": "Describes a document type associated with the app.", + "properties": { + "CFBundleTypeIconFile": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Name of the icon image file (minus the .icns extension).", + "markdownDescription": "Name of the icon image file (minus the .icns extension).", + "title": "Cfbundletypeiconfile" + }, + "CFBundleTypeName": { + "description": "Abstract name for this document type. Uniqueness recommended.", + "markdownDescription": "Abstract name for this document type. Uniqueness recommended.", + "title": "Cfbundletypename", + "type": "string" + }, + "CFBundleTypeRole": { + "anyOf": [ + { + "enum": [ + "Editor", + "Viewer", + "Shell", + "None" + ], + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "This key specifies the app's role with respect to the type.", + "markdownDescription": "This key specifies the app's role with respect to the type.", + "title": "Cfbundletyperole" + }, + "LSItemContentTypes": { + "description": "List of UTI strings defining a supported file type; e.g. for PNG files, use 'public.png'. See [UTI Reference]( https://developer.apple.com/library/archive/documentation/Miscellaneous/Reference/UTIRef/Articles/System-DeclaredUniformTypeIdentifiers.html) for more info about the system-defined UTIs. Custom UTIs can be defined via 'UTExportedTypeDeclarations'. UTIs defined by other apps (not the system) need to be imported via 'UTImportedTypeDeclarations'.\n\nSee [Fun with UTIs](https://www.cocoanetics.com/2012/09/fun-with-uti/) for more info.", + "items": { + "type": "string" + }, + "markdownDescription": "List of UTI strings defining a supported file type; e.g. for PNG files, use 'public.png'. See [UTI Reference]( https://developer.apple.com/library/archive/documentation/Miscellaneous/Reference/UTIRef/Articles/System-DeclaredUniformTypeIdentifiers.html) for more info about the system-defined UTIs. Custom UTIs can be defined via 'UTExportedTypeDeclarations'. UTIs defined by other apps (not the system) need to be imported via 'UTImportedTypeDeclarations'.\n\nSee [Fun with UTIs](https://www.cocoanetics.com/2012/09/fun-with-uti/) for more info.", + "title": "Lsitemcontenttypes", + "type": "array" + }, + "LSHandlerRank": { + "description": "Determines how Launch Services ranks this app among the apps that declare themselves editors or viewers of files of this type.", + "enum": [ + "Owner", + "Default", + "Alternate" + ], + "markdownDescription": "Determines how Launch Services ranks this app among the apps that declare themselves editors or viewers of files of this type.", + "title": "Lshandlerrank", + "type": "string" + } + }, + "required": [ + "CFBundleTypeName", + "LSItemContentTypes", + "LSHandlerRank" + ], + "title": "CFBundleDocumentTypesModel", + "type": "object" + }, + "CFBundleURLTypesModel": { + "additionalProperties": false, + "description": "Describes a URL scheme associated with the app.", + "markdownDescription": "Describes a URL scheme associated with the app.", + "properties": { + "CFBundleTypeRole": { + "anyOf": [ + { + "enum": [ + "Editor", + "Viewer", + "Shell", + "None" + ], + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "This key specifies the app's role with respect to the URL.", + "markdownDescription": "This key specifies the app's role with respect to the URL.", + "title": "Cfbundletyperole" + }, + "CFBundleURLSchemes": { + "description": "URL schemes / protocols handled by this type (e.g. 'mailto').", + "items": { + "type": "string" + }, + "markdownDescription": "URL schemes / protocols handled by this type (e.g. 'mailto').", + "title": "Cfbundleurlschemes", + "type": "array" + }, + "CFBundleURLName": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Abstract name for this URL type. Uniqueness recommended.", + "markdownDescription": "Abstract name for this URL type. Uniqueness recommended.", + "title": "Cfbundleurlname" + }, + "CFBundleURLIconFile": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Name of the icon image file (minus the .icns extension).", + "markdownDescription": "Name of the icon image file (minus the .icns extension).", + "title": "Cfbundleurliconfile" + } + }, + "required": [ + "CFBundleURLSchemes" + ], + "title": "CFBundleURLTypesModel", + "type": "object" + }, + "Linux": { + "additionalProperties": false, + "description": "Linux-specific instructions.\n\nCheck the [Desktop entry specification]( https://specifications.freedesktop.org/desktop-entry-spec/latest/recognized-keys.html) for more details.", + "markdownDescription": "Linux-specific instructions.\n\nCheck the [Desktop entry specification]( https://specifications.freedesktop.org/desktop-entry-spec/latest/recognized-keys.html) for more details.", + "properties": { + "name": { + "anyOf": [ + { + "minLength": 1, + "type": "string" + }, + { + "$ref": "#/$defs/MenuItemNameDict" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The name of the menu item. Can be a dictionary if the name depends on installation parameters. See `MenuItemNameDict` for details.", + "markdownDescription": "The name of the menu item. Can be a dictionary if the name depends on installation parameters. See `MenuItemNameDict` for details.", + "title": "Name" + }, + "description": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "A longer description of the menu item. Shown on popup messages.", + "markdownDescription": "A longer description of the menu item. Shown on popup messages.", + "title": "Description" + }, + "icon": { + "anyOf": [ + { + "minLength": 1, + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Path to the file representing or containing the icon.", + "markdownDescription": "Path to the file representing or containing the icon.", + "title": "Icon" + }, + "command": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "minItems": 1, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Command to run with the menu item, expressed as a list of strings where each string is an argument.", + "markdownDescription": "Command to run with the menu item, expressed as a list of strings where each string is an argument.", + "title": "Command" + }, + "working_dir": { + "anyOf": [ + { + "minLength": 1, + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Working directory for the running process. Defaults to user directory on each platform.", + "markdownDescription": "Working directory for the running process. Defaults to user directory on each platform.", + "title": "Working Dir" + }, + "precommand": { + "anyOf": [ + { + "minLength": 1, + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "(Simple, preferrably single-line) logic to run before the command is run. Runs before the environment is activated, if that applies.", + "markdownDescription": "(Simple, preferrably single-line) logic to run before the command is run. Runs before the environment is activated, if that applies.", + "title": "Precommand" + }, + "precreate": { + "anyOf": [ + { + "minLength": 1, + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "(Simple, preferrably single-line) logic to run before the shortcut is created.", + "markdownDescription": "(Simple, preferrably single-line) logic to run before the shortcut is created.", + "title": "Precreate" + }, + "activate": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Whether to activate the target environment before running `command`.", + "markdownDescription": "Whether to activate the target environment before running `command`.", + "title": "Activate" + }, + "terminal": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Whether run the program in a terminal/console or not. On Windows, it only has an effect if `activate` is true. On MacOS, the application will ignore command-line arguments.", + "markdownDescription": "Whether run the program in a terminal/console or not. On Windows, it only has an effect if `activate` is true. On MacOS, the application will ignore command-line arguments.", + "title": "Terminal" + }, + "Categories": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "pattern": "^.+;$", + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Categories in which the entry should be shown in a menu. See 'Registered categories' in the [Menu Spec]( http://www.freedesktop.org/Standards/menu-spec).", + "markdownDescription": "Categories in which the entry should be shown in a menu. See 'Registered categories' in the [Menu Spec]( http://www.freedesktop.org/Standards/menu-spec).", + "title": "Categories" + }, + "DBusActivatable": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "default": null, + "description": "A boolean value specifying if D-Bus activation is supported for this application.", + "markdownDescription": "A boolean value specifying if D-Bus activation is supported for this application.", + "title": "Dbusactivatable" + }, + "GenericName": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Generic name of the application; e.g. if the name is 'conda', this would be 'Package Manager'.", + "markdownDescription": "Generic name of the application; e.g. if the name is 'conda', this would be 'Package Manager'.", + "title": "Genericname" + }, + "Hidden": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Disable shortcut, signaling a missing resource.", + "markdownDescription": "Disable shortcut, signaling a missing resource.", + "title": "Hidden" + }, + "Implements": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "pattern": "^.+;$", + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "List of supported interfaces. See 'Interfaces' in [Desktop Entry Spec]( https://specifications.freedesktop.org/desktop-entry-spec/latest/interfaces.html).", + "markdownDescription": "List of supported interfaces. See 'Interfaces' in [Desktop Entry Spec]( https://specifications.freedesktop.org/desktop-entry-spec/latest/interfaces.html).", + "title": "Implements" + }, + "Keywords": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "pattern": "^.+;$", + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Additional terms to describe this shortcut to aid in searching.", + "markdownDescription": "Additional terms to describe this shortcut to aid in searching.", + "title": "Keywords" + }, + "MimeType": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "pattern": "^.+;$", + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The MIME type(s) supported by this application. Note this includes file types and URL protocols. For URL protocols, use `x-scheme-handler/your-protocol-here`. For example, if you want to register `menuinst:`, you would include `x-scheme-handler/menuinst`.", + "markdownDescription": "The MIME type(s) supported by this application. Note this includes file types and URL protocols. For URL protocols, use `x-scheme-handler/your-protocol-here`. For example, if you want to register `menuinst:`, you would include `x-scheme-handler/menuinst`.", + "title": "Mimetype" + }, + "NoDisplay": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Do not show this item in the menu. Useful to associate MIME types and other registrations, without having an actual clickable item. Not to be confused with 'Hidden'.", + "markdownDescription": "Do not show this item in the menu. Useful to associate MIME types and other registrations, without having an actual clickable item. Not to be confused with 'Hidden'.", + "title": "Nodisplay" + }, + "NotShowIn": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "pattern": "^.+;$", + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Desktop environments that should NOT display this item. It'll check against `$XDG_CURRENT_DESKTOP`.", + "markdownDescription": "Desktop environments that should NOT display this item. It'll check against `$XDG_CURRENT_DESKTOP`.", + "title": "Notshowin" + }, + "OnlyShowIn": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "pattern": "^.+;$", + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Desktop environments that should display this item. It'll check against `$XDG_CURRENT_DESKTOP`.", + "markdownDescription": "Desktop environments that should display this item. It'll check against `$XDG_CURRENT_DESKTOP`.", + "title": "Onlyshowin" + }, + "PrefersNonDefaultGPU": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Hint that the app prefers to be run on a more powerful discrete GPU if available.", + "markdownDescription": "Hint that the app prefers to be run on a more powerful discrete GPU if available.", + "title": "Prefersnondefaultgpu" + }, + "SingleMainWindow": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Do not show the 'New Window' option in the app's context menu.", + "markdownDescription": "Do not show the 'New Window' option in the app's context menu.", + "title": "Singlemainwindow" + }, + "StartupNotify": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Advanced. See [Startup Notification spec]( https://www.freedesktop.org/wiki/Specifications/startup-notification-spec/).", + "markdownDescription": "Advanced. See [Startup Notification spec]( https://www.freedesktop.org/wiki/Specifications/startup-notification-spec/).", + "title": "Startupnotify" + }, + "StartupWMClass": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Advanced. See [Startup Notification spec]( https://www.freedesktop.org/wiki/Specifications/startup-notification-spec/).", + "markdownDescription": "Advanced. See [Startup Notification spec]( https://www.freedesktop.org/wiki/Specifications/startup-notification-spec/).", + "title": "Startupwmclass" + }, + "TryExec": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Filename or absolute path to an executable file on disk used to determine if the program is actually installed and can be run. If the test fails, the shortcut might be ignored / hidden.", + "markdownDescription": "Filename or absolute path to an executable file on disk used to determine if the program is actually installed and can be run. If the test fails, the shortcut might be ignored / hidden.", + "title": "Tryexec" + }, + "glob_patterns": { + "anyOf": [ + { + "additionalProperties": { + "pattern": ".*\\*.*", + "type": "string" + }, + "type": "object" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Map of custom MIME types to their corresponding glob patterns (e.g. `*.txt`). Only needed if you define custom MIME types in `MimeType`.", + "markdownDescription": "Map of custom MIME types to their corresponding glob patterns (e.g. `*.txt`). Only needed if you define custom MIME types in `MimeType`.", + "title": "Glob Patterns" + } + }, + "title": "Linux", + "type": "object" + }, + "MacOS": { + "additionalProperties": false, + "description": "Mac-specific instructions. Check these URLs for more info:\n\n- `CF*` keys: see [Core Foundation Keys](https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html) - `LS*` keys: see [Launch Services Keys](https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/LaunchServicesKeys.html) - `entitlements`: see [Entitlements documentation](https://developer.apple.com/documentation/bundleresources/entitlements)", + "markdownDescription": "Mac-specific instructions. Check these URLs for more info:\n\n- `CF*` keys: see [Core Foundation Keys](https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html) - `LS*` keys: see [Launch Services Keys](https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/LaunchServicesKeys.html) - `entitlements`: see [Entitlements documentation](https://developer.apple.com/documentation/bundleresources/entitlements)", + "properties": { + "name": { + "anyOf": [ + { + "minLength": 1, + "type": "string" + }, + { + "$ref": "#/$defs/MenuItemNameDict" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The name of the menu item. Can be a dictionary if the name depends on installation parameters. See `MenuItemNameDict` for details.", + "markdownDescription": "The name of the menu item. Can be a dictionary if the name depends on installation parameters. See `MenuItemNameDict` for details.", + "title": "Name" + }, + "description": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "A longer description of the menu item. Shown on popup messages.", + "markdownDescription": "A longer description of the menu item. Shown on popup messages.", + "title": "Description" + }, + "icon": { + "anyOf": [ + { + "minLength": 1, + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Path to the file representing or containing the icon.", + "markdownDescription": "Path to the file representing or containing the icon.", + "title": "Icon" + }, + "command": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "minItems": 1, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Command to run with the menu item, expressed as a list of strings where each string is an argument.", + "markdownDescription": "Command to run with the menu item, expressed as a list of strings where each string is an argument.", + "title": "Command" + }, + "working_dir": { + "anyOf": [ + { + "minLength": 1, + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Working directory for the running process. Defaults to user directory on each platform.", + "markdownDescription": "Working directory for the running process. Defaults to user directory on each platform.", + "title": "Working Dir" + }, + "precommand": { + "anyOf": [ + { + "minLength": 1, + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "(Simple, preferrably single-line) logic to run before the command is run. Runs before the environment is activated, if that applies.", + "markdownDescription": "(Simple, preferrably single-line) logic to run before the command is run. Runs before the environment is activated, if that applies.", + "title": "Precommand" + }, + "precreate": { + "anyOf": [ + { + "minLength": 1, + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "(Simple, preferrably single-line) logic to run before the shortcut is created.", + "markdownDescription": "(Simple, preferrably single-line) logic to run before the shortcut is created.", + "title": "Precreate" + }, + "activate": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Whether to activate the target environment before running `command`.", + "markdownDescription": "Whether to activate the target environment before running `command`.", + "title": "Activate" + }, + "terminal": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Whether run the program in a terminal/console or not. On Windows, it only has an effect if `activate` is true. On MacOS, the application will ignore command-line arguments.", + "markdownDescription": "Whether run the program in a terminal/console or not. On Windows, it only has an effect if `activate` is true. On MacOS, the application will ignore command-line arguments.", + "title": "Terminal" + }, + "CFBundleDisplayName": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Display name of the bundle, visible to users and used by Siri. If not provided, 'menuinst' will use the 'name' field.", + "markdownDescription": "Display name of the bundle, visible to users and used by Siri. If not provided, 'menuinst' will use the 'name' field.", + "title": "Cfbundledisplayname" + }, + "CFBundleIdentifier": { + "anyOf": [ + { + "pattern": "^[A-z0-9\\-\\.]+$", + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Unique identifier for the shortcut. Typically uses a reverse-DNS format. If not provided, 'menuinst' will generate one from the 'name' field.", + "markdownDescription": "Unique identifier for the shortcut. Typically uses a reverse-DNS format. If not provided, 'menuinst' will generate one from the 'name' field.", + "title": "Cfbundleidentifier" + }, + "CFBundleName": { + "anyOf": [ + { + "maxLength": 16, + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Short name of the bundle. May be used if `CFBundleDisplayName` is absent. If not provided, 'menuinst' will generate one from the 'name' field.", + "markdownDescription": "Short name of the bundle. May be used if `CFBundleDisplayName` is absent. If not provided, 'menuinst' will generate one from the 'name' field.", + "title": "Cfbundlename" + }, + "CFBundleSpokenName": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Suitable replacement for text-to-speech operations on the app. For example, 'my app one two three' instead of 'MyApp123'.", + "markdownDescription": "Suitable replacement for text-to-speech operations on the app. For example, 'my app one two three' instead of 'MyApp123'.", + "title": "Cfbundlespokenname" + }, + "CFBundleVersion": { + "anyOf": [ + { + "pattern": "^\\S+$", + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Build version number for the bundle. In the context of 'menuinst' this can be used to signal a new version of the menu item for the same application version.", + "markdownDescription": "Build version number for the bundle. In the context of 'menuinst' this can be used to signal a new version of the menu item for the same application version.", + "title": "Cfbundleversion" + }, + "CFBundleURLTypes": { + "anyOf": [ + { + "items": { + "$ref": "#/$defs/CFBundleURLTypesModel" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "URL types supported by this app. Requires macOS 10.14.4 or above. Refer to `event_handler` if your application does not have support for Apple Events handling.", + "markdownDescription": "URL types supported by this app. Requires macOS 10.14.4 or above. Refer to `event_handler` if your application does not have support for Apple Events handling.", + "title": "Cfbundleurltypes" + }, + "CFBundleDocumentTypes": { + "anyOf": [ + { + "items": { + "$ref": "#/$defs/CFBundleDocumentTypesModel" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Document types supported by this app. Requires macOS 10.14.4 or above. Refer to `event_handler` if your application does not have support for Apple Events handling.", + "markdownDescription": "Document types supported by this app. Requires macOS 10.14.4 or above. Refer to `event_handler` if your application does not have support for Apple Events handling.", + "title": "Cfbundledocumenttypes" + }, + "LSApplicationCategoryType": { + "anyOf": [ + { + "pattern": "^public\\.app-category\\.\\S+$", + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The App Store uses this string to determine the appropriate categorization.", + "markdownDescription": "The App Store uses this string to determine the appropriate categorization.", + "title": "Lsapplicationcategorytype" + }, + "LSBackgroundOnly": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Specifies whether this app runs only in the background.", + "markdownDescription": "Specifies whether this app runs only in the background.", + "title": "Lsbackgroundonly" + }, + "LSEnvironment": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "type": "null" + } + ], + "default": null, + "description": "List of key-value pairs used to define environment variables.", + "markdownDescription": "List of key-value pairs used to define environment variables.", + "title": "Lsenvironment" + }, + "LSMinimumSystemVersion": { + "anyOf": [ + { + "pattern": "^\\d+\\.\\d+\\.\\d+$", + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Minimum version of macOS required for this app to run, as `x.y.z`. For example, for macOS v10.4 and later, use `10.4.0`.", + "markdownDescription": "Minimum version of macOS required for this app to run, as `x.y.z`. For example, for macOS v10.4 and later, use `10.4.0`.", + "title": "Lsminimumsystemversion" + }, + "LSMultipleInstancesProhibited": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Whether an app is prohibited from running simultaneously in multiple user sessions.", + "markdownDescription": "Whether an app is prohibited from running simultaneously in multiple user sessions.", + "title": "Lsmultipleinstancesprohibited" + }, + "LSRequiresNativeExecution": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "default": null, + "description": "If true, prevent a universal binary from being run under Rosetta emulation on an Intel-based Mac.", + "markdownDescription": "If true, prevent a universal binary from being run under Rosetta emulation on an Intel-based Mac.", + "title": "Lsrequiresnativeexecution" + }, + "NSAudioCaptureUsageDescription": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "A message describing why an app is requesting access to capture system audio.", + "markdownDescription": "A message describing why an app is requesting access to capture system audio.", + "title": "Nsaudiocaptureusagedescription" + }, + "NSCameraUsageDescription": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "A message describing why an app is requesting access to the device's camera.", + "markdownDescription": "A message describing why an app is requesting access to the device's camera.", + "title": "Nscamerausagedescription" + }, + "NSMainCameraUsageDescription": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "A message describing why an app is requesting access to the device's main camera.", + "markdownDescription": "A message describing why an app is requesting access to the device's main camera.", + "title": "Nsmaincamerausagedescription" + }, + "NSMicrophoneUsageDescription": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "A message describing why an app is requesting access to the device's microphone.", + "markdownDescription": "A message describing why an app is requesting access to the device's microphone.", + "title": "Nsmicrophoneusagedescription" + }, + "NSSupportsAutomaticGraphicsSwitching": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "default": null, + "description": "If true, allows an OpenGL app to utilize the integrated GPU.", + "markdownDescription": "If true, allows an OpenGL app to utilize the integrated GPU.", + "title": "Nssupportsautomaticgraphicsswitching" + }, + "UTExportedTypeDeclarations": { + "anyOf": [ + { + "items": { + "$ref": "#/$defs/UTTypeDeclarationModel" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The uniform type identifiers owned and exported by the app.", + "markdownDescription": "The uniform type identifiers owned and exported by the app.", + "title": "Utexportedtypedeclarations" + }, + "UTImportedTypeDeclarations": { + "anyOf": [ + { + "items": { + "$ref": "#/$defs/UTTypeDeclarationModel" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The uniform type identifiers inherently supported, but not owned, by the app.", + "markdownDescription": "The uniform type identifiers inherently supported, but not owned, by the app.", + "title": "Utimportedtypedeclarations" + }, + "entitlements": { + "anyOf": [ + { + "items": { + "pattern": "[a-z0-9\\.\\-]+", + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "List of permissions to request for the launched application. See [the entitlements docs]( https://developer.apple.com/documentation/bundleresources/entitlements) for a full list of possible values.", + "markdownDescription": "List of permissions to request for the launched application. See [the entitlements docs]( https://developer.apple.com/documentation/bundleresources/entitlements) for a full list of possible values.", + "title": "Entitlements" + }, + "info_plist_extra": { + "anyOf": [ + { + "additionalProperties": true, + "propertyNames": { + "minLength": 1 + }, + "type": "object" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Set of extra properties for the Info.plist file. These properties are not validated by `menuinst.`", + "markdownDescription": "Set of extra properties for the Info.plist file. These properties are not validated by `menuinst.`", + "title": "Info Plist Extra" + }, + "link_in_bundle": { + "anyOf": [ + { + "additionalProperties": { + "pattern": "^[^/]+.*", + "type": "string" + }, + "propertyNames": { + "minLength": 1 + }, + "type": "object" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Paths that should be symlinked into the shortcut app bundle. It takes a mapping of source to destination paths. Destination paths must be relative. Placeholder `{{ MENU_ITEM_LOCATION }}` can be useful.", + "markdownDescription": "Paths that should be symlinked into the shortcut app bundle. It takes a mapping of source to destination paths. Destination paths must be relative. Placeholder `{{ MENU_ITEM_LOCATION }}` can be useful.", + "title": "Link In Bundle" + }, + "event_handler": { + "anyOf": [ + { + "minLength": 1, + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Required shell script logic to handle opened URL payloads. Note this feature requires macOS 10.14.4 or above. Using this key will inject a custom Swift launcher in the `.app` bundle to listen to Apple Events and forward them to your application. If your app is already handling Apple Events (e.g. via Qt's `QFileOpenEvent`), you do not need this.", + "markdownDescription": "Required shell script logic to handle opened URL payloads. Note this feature requires macOS 10.14.4 or above. Using this key will inject a custom Swift launcher in the `.app` bundle to listen to Apple Events and forward them to your application. If your app is already handling Apple Events (e.g. via Qt's `QFileOpenEvent`), you do not need this.", + "title": "Event Handler" + } + }, + "title": "MacOS", + "type": "object" + }, + "MenuItem": { + "additionalProperties": false, + "description": "Instructions to create a menu item across operating systems.", + "markdownDescription": "Instructions to create a menu item across operating systems.", + "properties": { + "name": { + "anyOf": [ + { + "minLength": 1, + "type": "string" + }, + { + "$ref": "#/$defs/MenuItemNameDict" + } + ], + "description": "The name of the menu item. Can be a dictionary if the name depends on installation parameters. See `MenuItemNameDict` for details.", + "markdownDescription": "The name of the menu item. Can be a dictionary if the name depends on installation parameters. See `MenuItemNameDict` for details.", + "title": "Name" + }, + "description": { + "description": "A longer description of the menu item. Shown on popup messages.", + "markdownDescription": "A longer description of the menu item. Shown on popup messages.", + "title": "Description", + "type": "string" + }, + "command": { + "description": "Command to run with the menu item, expressed as a list of strings where each string is an argument.", + "items": { + "type": "string" + }, + "markdownDescription": "Command to run with the menu item, expressed as a list of strings where each string is an argument.", + "minItems": 1, + "title": "Command", + "type": "array" + }, + "icon": { + "anyOf": [ + { + "minLength": 1, + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Path to the file representing or containing the icon.", + "markdownDescription": "Path to the file representing or containing the icon.", + "title": "Icon" + }, + "precommand": { + "anyOf": [ + { + "minLength": 1, + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "(Simple, preferrably single-line) logic to run before the command is run. Runs before the environment is activated, if that applies.", + "markdownDescription": "(Simple, preferrably single-line) logic to run before the command is run. Runs before the environment is activated, if that applies.", + "title": "Precommand" + }, + "precreate": { + "anyOf": [ + { + "minLength": 1, + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "(Simple, preferrably single-line) logic to run before the shortcut is created.", + "markdownDescription": "(Simple, preferrably single-line) logic to run before the shortcut is created.", + "title": "Precreate" + }, + "working_dir": { + "anyOf": [ + { + "minLength": 1, + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Working directory for the running process. Defaults to user directory on each platform.", + "markdownDescription": "Working directory for the running process. Defaults to user directory on each platform.", + "title": "Working Dir" + }, + "activate": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "default": true, + "description": "Whether to activate the target environment before running `command`.", + "markdownDescription": "Whether to activate the target environment before running `command`.", + "title": "Activate" + }, + "terminal": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "default": false, + "description": "Whether run the program in a terminal/console or not. On Windows, it only has an effect if `activate` is true. On MacOS, the application will ignore command-line arguments.", + "markdownDescription": "Whether run the program in a terminal/console or not. On Windows, it only has an effect if `activate` is true. On MacOS, the application will ignore command-line arguments.", + "title": "Terminal" + }, + "platforms": { + "$ref": "#/$defs/Platforms", + "description": "Platform-specific options. Presence of a platform field enables menu items in that platform.", + "markdownDescription": "Platform-specific options. Presence of a platform field enables menu items in that platform." + } + }, + "required": [ + "name", + "description", + "command", + "platforms" + ], + "title": "MenuItem", + "type": "object" + }, + "MenuItemNameDict": { + "additionalProperties": false, + "description": "Variable menu item name. Use this dictionary if the menu item name depends on installation parameters such as the target environment.", + "markdownDescription": "Variable menu item name. Use this dictionary if the menu item name depends on installation parameters such as the target environment.", + "properties": { + "target_environment_is_base": { + "anyOf": [ + { + "minLength": 1, + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Name when target environment is the base environment.", + "markdownDescription": "Name when target environment is the base environment.", + "title": "Target Environment Is Base" + }, + "target_environment_is_not_base": { + "anyOf": [ + { + "minLength": 1, + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Name when target environment is not the base environment.", + "markdownDescription": "Name when target environment is not the base environment.", + "title": "Target Environment Is Not Base" + } + }, + "title": "MenuItemNameDict", + "type": "object" + }, + "Platforms": { + "additionalProperties": false, + "description": "Platform specific options.\n\nNote each of these fields supports the same keys as the top-level `MenuItem` (sans `platforms` itself), in case overrides are needed.", + "markdownDescription": "Platform specific options.\n\nNote each of these fields supports the same keys as the top-level `MenuItem` (sans `platforms` itself), in case overrides are needed.", + "properties": { + "linux": { + "anyOf": [ + { + "$ref": "#/$defs/Linux" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Options for Linux. See `Linux` model for details.", + "markdownDescription": "Options for Linux. See `Linux` model for details." + }, + "osx": { + "anyOf": [ + { + "$ref": "#/$defs/MacOS" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Options for macOS. See `MacOS` model for details.", + "markdownDescription": "Options for macOS. See `MacOS` model for details." + }, + "win": { + "anyOf": [ + { + "$ref": "#/$defs/Windows" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Options for Windows. See `Windows` model for details.", + "markdownDescription": "Options for Windows. See `Windows` model for details." + } + }, + "title": "Platforms", + "type": "object" + }, + "UTTypeDeclarationModel": { + "additionalProperties": false, + "properties": { + "UTTypeConformsTo": { + "description": "The Uniform Type Identifier types that this type conforms to.", + "items": { + "type": "string" + }, + "markdownDescription": "The Uniform Type Identifier types that this type conforms to.", + "title": "Uttypeconformsto", + "type": "array" + }, + "UTTypeDescription": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "A description for this type.", + "markdownDescription": "A description for this type.", + "title": "Uttypedescription" + }, + "UTTypeIconFile": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The bundle icon resource to associate with this type.", + "markdownDescription": "The bundle icon resource to associate with this type.", + "title": "Uttypeiconfile" + }, + "UTTypeIdentifier": { + "description": "The Uniform Type Identifier to assign to this type.", + "markdownDescription": "The Uniform Type Identifier to assign to this type.", + "title": "Uttypeidentifier", + "type": "string" + }, + "UTTypeReferenceURL": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The webpage for a reference document that describes this type.", + "markdownDescription": "The webpage for a reference document that describes this type.", + "title": "Uttypereferenceurl" + }, + "UTTypeTagSpecification": { + "additionalProperties": { + "items": { + "type": "string" + }, + "type": "array" + }, + "description": "A dictionary defining one or more equivalent type identifiers.", + "markdownDescription": "A dictionary defining one or more equivalent type identifiers.", + "title": "Uttypetagspecification", + "type": "object" + } + }, + "required": [ + "UTTypeConformsTo", + "UTTypeIdentifier", + "UTTypeTagSpecification" + ], + "title": "UTTypeDeclarationModel", + "type": "object" + }, + "Windows": { + "additionalProperties": false, + "description": "Windows-specific instructions. You can override global keys here if needed", + "markdownDescription": "Windows-specific instructions. You can override global keys here if needed", + "properties": { + "name": { + "anyOf": [ + { + "minLength": 1, + "type": "string" + }, + { + "$ref": "#/$defs/MenuItemNameDict" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The name of the menu item. Can be a dictionary if the name depends on installation parameters. See `MenuItemNameDict` for details.", + "markdownDescription": "The name of the menu item. Can be a dictionary if the name depends on installation parameters. See `MenuItemNameDict` for details.", + "title": "Name" + }, + "description": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "A longer description of the menu item. Shown on popup messages.", + "markdownDescription": "A longer description of the menu item. Shown on popup messages.", + "title": "Description" + }, + "icon": { + "anyOf": [ + { + "minLength": 1, + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Path to the file representing or containing the icon.", + "markdownDescription": "Path to the file representing or containing the icon.", + "title": "Icon" + }, + "command": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "minItems": 1, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Command to run with the menu item, expressed as a list of strings where each string is an argument.", + "markdownDescription": "Command to run with the menu item, expressed as a list of strings where each string is an argument.", + "title": "Command" + }, + "working_dir": { + "anyOf": [ + { + "minLength": 1, + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Working directory for the running process. Defaults to user directory on each platform.", + "markdownDescription": "Working directory for the running process. Defaults to user directory on each platform.", + "title": "Working Dir" + }, + "precommand": { + "anyOf": [ + { + "minLength": 1, + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "(Simple, preferrably single-line) logic to run before the command is run. Runs before the environment is activated, if that applies.", + "markdownDescription": "(Simple, preferrably single-line) logic to run before the command is run. Runs before the environment is activated, if that applies.", + "title": "Precommand" + }, + "precreate": { + "anyOf": [ + { + "minLength": 1, + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "(Simple, preferrably single-line) logic to run before the shortcut is created.", + "markdownDescription": "(Simple, preferrably single-line) logic to run before the shortcut is created.", + "title": "Precreate" + }, + "activate": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Whether to activate the target environment before running `command`.", + "markdownDescription": "Whether to activate the target environment before running `command`.", + "title": "Activate" + }, + "terminal": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Whether run the program in a terminal/console or not. On Windows, it only has an effect if `activate` is true. On MacOS, the application will ignore command-line arguments.", + "markdownDescription": "Whether run the program in a terminal/console or not. On Windows, it only has an effect if `activate` is true. On MacOS, the application will ignore command-line arguments.", + "title": "Terminal" + }, + "desktop": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "default": true, + "description": "Whether to create a desktop icon in addition to the Start Menu item.", + "markdownDescription": "Whether to create a desktop icon in addition to the Start Menu item.", + "title": "Desktop" + }, + "quicklaunch": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "default": false, + "deprecated": true, + "description": "DEPRECATED. Whether to create a quick launch icon in addition to the Start Menu item.", + "markdownDescription": "DEPRECATED. Whether to create a quick launch icon in addition to the Start Menu item.", + "title": "Quicklaunch" + }, + "terminal_profile": { + "anyOf": [ + { + "minLength": 1, + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Name of the Windows Terminal profile to create. This name must be unique across multiple installations because menuinst will overwrite Terminal profiles with the same name.", + "markdownDescription": "Name of the Windows Terminal profile to create. This name must be unique across multiple installations because menuinst will overwrite Terminal profiles with the same name.", + "title": "Terminal Profile" + }, + "url_protocols": { + "anyOf": [ + { + "items": { + "pattern": "\\S+", + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "URL protocols that will be associated with this program.", + "markdownDescription": "URL protocols that will be associated with this program.", + "title": "Url Protocols" + }, + "file_extensions": { + "anyOf": [ + { + "items": { + "pattern": "\\.\\S*", + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "File extensions that will be associated with this program.", + "markdownDescription": "File extensions that will be associated with this program.", + "title": "File Extensions" + }, + "app_user_model_id": { + "anyOf": [ + { + "maxLength": 128, + "pattern": "\\S+\\.\\S+", + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Identifier used in Windows 7 and above to associate processes, files and windows with a particular application. If your shortcut produces duplicated icons, you need to define this field. If not set, it will default to `Menuinst.`.\n\nSee [AppUserModelID docs]( https://learn.microsoft.com/en-us/windows/win32/shell/appids#how-to-form-an-application-defined-appusermodelid) for more information on the required string format.", + "markdownDescription": "Identifier used in Windows 7 and above to associate processes, files and windows with a particular application. If your shortcut produces duplicated icons, you need to define this field. If not set, it will default to `Menuinst.`.\n\nSee [AppUserModelID docs]( https://learn.microsoft.com/en-us/windows/win32/shell/appids#how-to-form-an-application-defined-appusermodelid) for more information on the required string format.", + "title": "App User Model Id" + } + }, + "title": "Windows", + "type": "object" + } + }, + "$id": "https://schemas.conda.org/menuinst-1-1-3.schema.json", + "$schema": "http://json-schema.org/draft-07/schema#", + "$version": "1-1-3", + "additionalProperties": false, + "description": "Metadata required to create menu items across operating systems with `menuinst`.", + "properties": { + "$id": { + "default": "https://schemas.conda.org/menuinst-1-1-3.schema.json", + "deprecated": true, + "description": "DEPRECATED. Use ``$schema``.", + "markdownDescription": "DEPRECATED. Use ``$schema``.", + "minLength": 1, + "title": "$Id", + "type": "string" + }, + "$schema": { + "default": "https://schemas.conda.org/menuinst-1-1-3.schema.json", + "description": "Version of the menuinst schema to validate against.", + "markdownDescription": "Version of the menuinst schema to validate against.", + "minLength": 1, + "title": "$Schema", + "type": "string" + }, + "menu_name": { + "description": "Name for the category containing the items specified in `menu_items`.", + "markdownDescription": "Name for the category containing the items specified in `menu_items`.", + "minLength": 1, + "title": "Menu Name", + "type": "string" + }, + "menu_items": { + "description": "List of menu entries to create across main desktop systems.", + "items": { + "$ref": "#/$defs/MenuItem" + }, + "markdownDescription": "List of menu entries to create across main desktop systems.", + "minItems": 1, + "title": "Menu Items", + "type": "array" + } + }, + "required": [ + "menu_name", + "menu_items" + ], + "title": "MenuInstSchema", + "type": "object" +} diff --git a/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst/data/menuinst.default.json b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst/data/menuinst.default.json new file mode 100644 index 0000000000000000000000000000000000000000..489958b1556fd2c556625563ebdc1086f8dc9575 --- /dev/null +++ b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst/data/menuinst.default.json @@ -0,0 +1,69 @@ +{ + "id_": "https://schemas.conda.io/menuinst-1.schema.json", + "schema_": "https://json-schema.org/draft-07/schema", + "menu_name": "REQUIRED", + "menu_items": [ + { + "name": "REQUIRED", + "description": "REQUIRED", + "command": [ + "REQUIRED" + ], + "icon": null, + "precommand": null, + "precreate": null, + "working_dir": null, + "activate": true, + "terminal": false, + "platforms": { + "linux": { + "Categories": null, + "DBusActivatable": null, + "GenericName": null, + "Hidden": null, + "Implements": null, + "Keywords": null, + "MimeType": null, + "NoDisplay": null, + "NotShowIn": null, + "OnlyShowIn": null, + "PrefersNonDefaultGPU": null, + "SingleMainWindow": null, + "StartupNotify": null, + "StartupWMClass": null, + "TryExec": null, + "glob_patterns": null + }, + "osx": { + "CFBundleDisplayName": null, + "CFBundleIdentifier": null, + "CFBundleName": null, + "CFBundleSpokenName": null, + "CFBundleVersion": null, + "CFBundleURLTypes": null, + "CFBundleDocumentTypes": null, + "LSApplicationCategoryType": null, + "LSBackgroundOnly": null, + "LSEnvironment": null, + "LSMinimumSystemVersion": null, + "LSMultipleInstancesProhibited": null, + "LSRequiresNativeExecution": null, + "NSSupportsAutomaticGraphicsSwitching": null, + "UTExportedTypeDeclarations": null, + "UTImportedTypeDeclarations": null, + "entitlements": null, + "link_in_bundle": null, + "event_handler": null + }, + "win": { + "desktop": true, + "quicklaunch": false, + "terminal_profile": null, + "url_protocols": null, + "file_extensions": null, + "app_user_model_id": null + } + } + } + ] +} diff --git a/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst/data/menuinst.schema.json b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst/data/menuinst.schema.json new file mode 100644 index 0000000000000000000000000000000000000000..8491ce9f6938c2ecd69036ad32b5b0caa7fb4efc --- /dev/null +++ b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst/data/menuinst.schema.json @@ -0,0 +1,967 @@ +{ + "title": "MenuInstSchema", + "description": "Metadata required to create menu items across operating systems with `menuinst`.", + "type": "object", + "properties": { + "$id": { + "title": "$Id", + "description": "Version of the menuinst schema.", + "markdownDescription": "Version of the menuinst schema.", + "enum": [ + "https://schemas.conda.io/menuinst-1.schema.json" + ], + "type": "string" + }, + "$schema": { + "title": "$Schema", + "description": "Standard of the JSON schema we adhere to.", + "markdownDescription": "Standard of the JSON schema we adhere to.", + "enum": [ + "https://json-schema.org/draft-07/schema" + ], + "type": "string" + }, + "menu_name": { + "title": "Menu Name", + "description": "Name for the category containing the items specified in `menu_items`.", + "markdownDescription": "Name for the category containing the items specified in `menu_items`.", + "minLength": 1, + "type": "string" + }, + "menu_items": { + "title": "Menu Items", + "description": "List of menu entries to create across main desktop systems.", + "markdownDescription": "List of menu entries to create across main desktop systems.", + "minItems": 1, + "type": "array", + "items": { + "$ref": "#/definitions/MenuItem" + } + } + }, + "required": [ + "$id", + "$schema", + "menu_name", + "menu_items" + ], + "additionalProperties": false, + "markdownDescription": "Metadata required to create menu items across operating systems with `menuinst`.", + "definitions": { + "MenuItemNameDict": { + "title": "MenuItemNameDict", + "description": "Variable menu item name. Use this dictionary if the menu item name depends on installation parameters such as the target environment.", + "type": "object", + "properties": { + "target_environment_is_base": { + "title": "Target Environment Is Base", + "description": "Name when target environment is the base environment.", + "markdownDescription": "Name when target environment is the base environment.", + "minLength": 1, + "type": "string" + }, + "target_environment_is_not_base": { + "title": "Target Environment Is Not Base", + "description": "Name when target environment is not the base environment.", + "markdownDescription": "Name when target environment is not the base environment.", + "minLength": 1, + "type": "string" + } + }, + "additionalProperties": false, + "markdownDescription": "Variable menu item name. Use this dictionary if the menu item name depends on installation parameters such as the target environment." + }, + "Linux": { + "title": "Linux", + "description": "Linux-specific instructions.\n\nCheck the [Desktop entry specification]( https://specifications.freedesktop.org/desktop-entry-spec/latest/recognized-keys.html) for more details.", + "type": "object", + "properties": { + "name": { + "title": "Name", + "description": "The name of the menu item. Can be a dictionary if the name depends on installation parameters. See `MenuItemNameDict` for details.", + "markdownDescription": "The name of the menu item. Can be a dictionary if the name depends on installation parameters. See `MenuItemNameDict` for details.", + "anyOf": [ + { + "type": "string", + "minLength": 1 + }, + { + "$ref": "#/definitions/MenuItemNameDict" + } + ] + }, + "description": { + "title": "Description", + "description": "A longer description of the menu item. Shown on popup messages.", + "markdownDescription": "A longer description of the menu item. Shown on popup messages.", + "type": "string" + }, + "icon": { + "title": "Icon", + "description": "Path to the file representing or containing the icon.", + "markdownDescription": "Path to the file representing or containing the icon.", + "minLength": 1, + "type": "string" + }, + "command": { + "title": "Command", + "description": "Command to run with the menu item, expressed as a list of strings where each string is an argument.", + "markdownDescription": "Command to run with the menu item, expressed as a list of strings where each string is an argument.", + "minItems": 1, + "type": "array", + "items": { + "type": "string" + } + }, + "working_dir": { + "title": "Working Dir", + "description": "Working directory for the running process. Defaults to user directory on each platform.", + "markdownDescription": "Working directory for the running process. Defaults to user directory on each platform.", + "minLength": 1, + "type": "string" + }, + "precommand": { + "title": "Precommand", + "description": "(Simple, preferrably single-line) logic to run before the command is run. Runs before the environment is activated, if that applies.", + "markdownDescription": "(Simple, preferrably single-line) logic to run before the command is run. Runs before the environment is activated, if that applies.", + "minLength": 1, + "type": "string" + }, + "precreate": { + "title": "Precreate", + "description": "(Simple, preferrably single-line) logic to run before the shortcut is created.", + "markdownDescription": "(Simple, preferrably single-line) logic to run before the shortcut is created.", + "minLength": 1, + "type": "string" + }, + "activate": { + "title": "Activate", + "description": "Whether to activate the target environment before running `command`.", + "markdownDescription": "Whether to activate the target environment before running `command`.", + "type": "boolean" + }, + "terminal": { + "title": "Terminal", + "description": "Whether run the program in a terminal/console or not. On Windows, it only has an effect if `activate` is true. On MacOS, the application will ignore command-line arguments.", + "markdownDescription": "Whether run the program in a terminal/console or not. On Windows, it only has an effect if `activate` is true. On MacOS, the application will ignore command-line arguments.", + "type": "boolean" + }, + "Categories": { + "title": "Categories", + "description": "Categories in which the entry should be shown in a menu. See 'Registered categories' in the [Menu Spec]( http://www.freedesktop.org/Standards/menu-spec).", + "markdownDescription": "Categories in which the entry should be shown in a menu. See 'Registered categories' in the [Menu Spec]( http://www.freedesktop.org/Standards/menu-spec).", + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "string", + "pattern": "^.+;$" + } + ] + }, + "DBusActivatable": { + "title": "Dbusactivatable", + "description": "A boolean value specifying if D-Bus activation is supported for this application.", + "markdownDescription": "A boolean value specifying if D-Bus activation is supported for this application.", + "type": "boolean" + }, + "GenericName": { + "title": "Genericname", + "description": "Generic name of the application; e.g. if the name is 'conda', this would be 'Package Manager'.", + "markdownDescription": "Generic name of the application; e.g. if the name is 'conda', this would be 'Package Manager'.", + "type": "string" + }, + "Hidden": { + "title": "Hidden", + "description": "Disable shortcut, signaling a missing resource.", + "markdownDescription": "Disable shortcut, signaling a missing resource.", + "type": "boolean" + }, + "Implements": { + "title": "Implements", + "description": "List of supported interfaces. See 'Interfaces' in [Desktop Entry Spec]( https://specifications.freedesktop.org/desktop-entry-spec/latest/interfaces.html).", + "markdownDescription": "List of supported interfaces. See 'Interfaces' in [Desktop Entry Spec]( https://specifications.freedesktop.org/desktop-entry-spec/latest/interfaces.html).", + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "string", + "pattern": "^.+;$" + } + ] + }, + "Keywords": { + "title": "Keywords", + "description": "Additional terms to describe this shortcut to aid in searching.", + "markdownDescription": "Additional terms to describe this shortcut to aid in searching.", + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "string", + "pattern": "^.+;$" + } + ] + }, + "MimeType": { + "title": "Mimetype", + "description": "The MIME type(s) supported by this application. Note this includes file types and URL protocols. For URL protocols, use `x-scheme-handler/your-protocol-here`. For example, if you want to register `menuinst:`, you would include `x-scheme-handler/menuinst`.", + "markdownDescription": "The MIME type(s) supported by this application. Note this includes file types and URL protocols. For URL protocols, use `x-scheme-handler/your-protocol-here`. For example, if you want to register `menuinst:`, you would include `x-scheme-handler/menuinst`.", + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "string", + "pattern": "^.+;$" + } + ] + }, + "NoDisplay": { + "title": "Nodisplay", + "description": "Do not show this item in the menu. Useful to associate MIME types and other registrations, without having an actual clickable item. Not to be confused with 'Hidden'.", + "markdownDescription": "Do not show this item in the menu. Useful to associate MIME types and other registrations, without having an actual clickable item. Not to be confused with 'Hidden'.", + "type": "boolean" + }, + "NotShowIn": { + "title": "Notshowin", + "description": "Desktop environments that should NOT display this item. It'll check against `$XDG_CURRENT_DESKTOP`.", + "markdownDescription": "Desktop environments that should NOT display this item. It'll check against `$XDG_CURRENT_DESKTOP`.", + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "string", + "pattern": "^.+;$" + } + ] + }, + "OnlyShowIn": { + "title": "Onlyshowin", + "description": "Desktop environments that should display this item. It'll check against `$XDG_CURRENT_DESKTOP`.", + "markdownDescription": "Desktop environments that should display this item. It'll check against `$XDG_CURRENT_DESKTOP`.", + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "string", + "pattern": "^.+;$" + } + ] + }, + "PrefersNonDefaultGPU": { + "title": "Prefersnondefaultgpu", + "description": "Hint that the app prefers to be run on a more powerful discrete GPU if available.", + "markdownDescription": "Hint that the app prefers to be run on a more powerful discrete GPU if available.", + "type": "boolean" + }, + "SingleMainWindow": { + "title": "Singlemainwindow", + "description": "Do not show the 'New Window' option in the app's context menu.", + "markdownDescription": "Do not show the 'New Window' option in the app's context menu.", + "type": "boolean" + }, + "StartupNotify": { + "title": "Startupnotify", + "description": "Advanced. See [Startup Notification spec]( https://www.freedesktop.org/wiki/Specifications/startup-notification-spec/).", + "markdownDescription": "Advanced. See [Startup Notification spec]( https://www.freedesktop.org/wiki/Specifications/startup-notification-spec/).", + "type": "boolean" + }, + "StartupWMClass": { + "title": "Startupwmclass", + "description": "Advanced. See [Startup Notification spec]( https://www.freedesktop.org/wiki/Specifications/startup-notification-spec/).", + "markdownDescription": "Advanced. See [Startup Notification spec]( https://www.freedesktop.org/wiki/Specifications/startup-notification-spec/).", + "type": "string" + }, + "TryExec": { + "title": "Tryexec", + "description": "Filename or absolute path to an executable file on disk used to determine if the program is actually installed and can be run. If the test fails, the shortcut might be ignored / hidden.", + "markdownDescription": "Filename or absolute path to an executable file on disk used to determine if the program is actually installed and can be run. If the test fails, the shortcut might be ignored / hidden.", + "type": "string" + }, + "glob_patterns": { + "title": "Glob Patterns", + "description": "Map of custom MIME types to their corresponding glob patterns (e.g. `*.txt`). Only needed if you define custom MIME types in `MimeType`.", + "markdownDescription": "Map of custom MIME types to their corresponding glob patterns (e.g. `*.txt`). Only needed if you define custom MIME types in `MimeType`.", + "type": "object", + "additionalProperties": { + "type": "string", + "pattern": ".*\\*.*" + } + } + }, + "additionalProperties": false, + "markdownDescription": "Linux-specific instructions.\n\nCheck the [Desktop entry specification]( https://specifications.freedesktop.org/desktop-entry-spec/latest/recognized-keys.html) for more details." + }, + "CFBundleURLTypesModel": { + "title": "CFBundleURLTypesModel", + "description": "Describes a URL scheme associated with the app.", + "type": "object", + "properties": { + "CFBundleTypeRole": { + "title": "Cfbundletyperole", + "description": "This key specifies the app's role with respect to the URL.", + "markdownDescription": "This key specifies the app's role with respect to the URL.", + "enum": [ + "Editor", + "Viewer", + "Shell", + "None" + ], + "type": "string" + }, + "CFBundleURLSchemes": { + "title": "Cfbundleurlschemes", + "description": "URL schemes / protocols handled by this type (e.g. 'mailto').", + "markdownDescription": "URL schemes / protocols handled by this type (e.g. 'mailto').", + "type": "array", + "items": { + "type": "string" + } + }, + "CFBundleURLName": { + "title": "Cfbundleurlname", + "description": "Abstract name for this URL type. Uniqueness recommended.", + "markdownDescription": "Abstract name for this URL type. Uniqueness recommended.", + "type": "string" + }, + "CFBundleURLIconFile": { + "title": "Cfbundleurliconfile", + "description": "Name of the icon image file (minus the .icns extension).", + "markdownDescription": "Name of the icon image file (minus the .icns extension).", + "type": "string" + } + }, + "required": [ + "CFBundleURLSchemes" + ], + "additionalProperties": false, + "markdownDescription": "Describes a URL scheme associated with the app." + }, + "CFBundleDocumentTypesModel": { + "title": "CFBundleDocumentTypesModel", + "description": "Describes a document type associated with the app.", + "type": "object", + "properties": { + "CFBundleTypeIconFile": { + "title": "Cfbundletypeiconfile", + "description": "Name of the icon image file (minus the .icns extension).", + "markdownDescription": "Name of the icon image file (minus the .icns extension).", + "type": "string" + }, + "CFBundleTypeName": { + "title": "Cfbundletypename", + "description": "Abstract name for this document type. Uniqueness recommended.", + "markdownDescription": "Abstract name for this document type. Uniqueness recommended.", + "type": "string" + }, + "CFBundleTypeRole": { + "title": "Cfbundletyperole", + "description": "This key specifies the app's role with respect to the type.", + "markdownDescription": "This key specifies the app's role with respect to the type.", + "enum": [ + "Editor", + "Viewer", + "Shell", + "None" + ], + "type": "string" + }, + "LSItemContentTypes": { + "title": "Lsitemcontenttypes", + "description": "List of UTI strings defining a supported file type; e.g. for PNG files, use 'public.png'. See [UTI Reference]( https://developer.apple.com/library/archive/documentation/Miscellaneous/Reference/UTIRef/Articles/System-DeclaredUniformTypeIdentifiers.html) for more info about the system-defined UTIs. Custom UTIs can be defined via 'UTExportedTypeDeclarations'. UTIs defined by other apps (not the system) need to be imported via 'UTImportedTypeDeclarations'.\n\nSee [Fun with UTIs](https://www.cocoanetics.com/2012/09/fun-with-uti/) for more info.", + "markdownDescription": "List of UTI strings defining a supported file type; e.g. for PNG files, use 'public.png'. See [UTI Reference]( https://developer.apple.com/library/archive/documentation/Miscellaneous/Reference/UTIRef/Articles/System-DeclaredUniformTypeIdentifiers.html) for more info about the system-defined UTIs. Custom UTIs can be defined via 'UTExportedTypeDeclarations'. UTIs defined by other apps (not the system) need to be imported via 'UTImportedTypeDeclarations'.\n\nSee [Fun with UTIs](https://www.cocoanetics.com/2012/09/fun-with-uti/) for more info.", + "type": "array", + "items": { + "type": "string" + } + }, + "LSHandlerRank": { + "title": "Lshandlerrank", + "description": "Determines how Launch Services ranks this app among the apps that declare themselves editors or viewers of files of this type.", + "markdownDescription": "Determines how Launch Services ranks this app among the apps that declare themselves editors or viewers of files of this type.", + "enum": [ + "Owner", + "Default", + "Alternate" + ], + "type": "string" + } + }, + "required": [ + "CFBundleTypeName", + "LSItemContentTypes", + "LSHandlerRank" + ], + "additionalProperties": false, + "markdownDescription": "Describes a document type associated with the app." + }, + "UTTypeDeclarationModel": { + "title": "UTTypeDeclarationModel", + "type": "object", + "properties": { + "UTTypeConformsTo": { + "title": "Uttypeconformsto", + "description": "The Uniform Type Identifier types that this type conforms to.", + "markdownDescription": "The Uniform Type Identifier types that this type conforms to.", + "type": "array", + "items": { + "type": "string" + } + }, + "UTTypeDescription": { + "title": "Uttypedescription", + "description": "A description for this type.", + "markdownDescription": "A description for this type.", + "type": "string" + }, + "UTTypeIconFile": { + "title": "Uttypeiconfile", + "description": "The bundle icon resource to associate with this type.", + "markdownDescription": "The bundle icon resource to associate with this type.", + "type": "string" + }, + "UTTypeIdentifier": { + "title": "Uttypeidentifier", + "description": "The Uniform Type Identifier to assign to this type.", + "markdownDescription": "The Uniform Type Identifier to assign to this type.", + "type": "string" + }, + "UTTypeReferenceURL": { + "title": "Uttypereferenceurl", + "description": "The webpage for a reference document that describes this type.", + "markdownDescription": "The webpage for a reference document that describes this type.", + "type": "string" + }, + "UTTypeTagSpecification": { + "title": "Uttypetagspecification", + "description": "A dictionary defining one or more equivalent type identifiers.", + "markdownDescription": "A dictionary defining one or more equivalent type identifiers.", + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "required": [ + "UTTypeConformsTo", + "UTTypeIdentifier", + "UTTypeTagSpecification" + ], + "additionalProperties": false + }, + "MacOS": { + "title": "MacOS", + "description": "Mac-specific instructions. Check these URLs for more info:\n\n- `CF*` keys: see [Core Foundation Keys](https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html) - `LS*` keys: see [Launch Services Keys](https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/LaunchServicesKeys.html) - `entitlements`: see [Entitlements documentation](https://developer.apple.com/documentation/bundleresources/entitlements)", + "type": "object", + "properties": { + "name": { + "title": "Name", + "description": "The name of the menu item. Can be a dictionary if the name depends on installation parameters. See `MenuItemNameDict` for details.", + "markdownDescription": "The name of the menu item. Can be a dictionary if the name depends on installation parameters. See `MenuItemNameDict` for details.", + "anyOf": [ + { + "type": "string", + "minLength": 1 + }, + { + "$ref": "#/definitions/MenuItemNameDict" + } + ] + }, + "description": { + "title": "Description", + "description": "A longer description of the menu item. Shown on popup messages.", + "markdownDescription": "A longer description of the menu item. Shown on popup messages.", + "type": "string" + }, + "icon": { + "title": "Icon", + "description": "Path to the file representing or containing the icon.", + "markdownDescription": "Path to the file representing or containing the icon.", + "minLength": 1, + "type": "string" + }, + "command": { + "title": "Command", + "description": "Command to run with the menu item, expressed as a list of strings where each string is an argument.", + "markdownDescription": "Command to run with the menu item, expressed as a list of strings where each string is an argument.", + "minItems": 1, + "type": "array", + "items": { + "type": "string" + } + }, + "working_dir": { + "title": "Working Dir", + "description": "Working directory for the running process. Defaults to user directory on each platform.", + "markdownDescription": "Working directory for the running process. Defaults to user directory on each platform.", + "minLength": 1, + "type": "string" + }, + "precommand": { + "title": "Precommand", + "description": "(Simple, preferrably single-line) logic to run before the command is run. Runs before the environment is activated, if that applies.", + "markdownDescription": "(Simple, preferrably single-line) logic to run before the command is run. Runs before the environment is activated, if that applies.", + "minLength": 1, + "type": "string" + }, + "precreate": { + "title": "Precreate", + "description": "(Simple, preferrably single-line) logic to run before the shortcut is created.", + "markdownDescription": "(Simple, preferrably single-line) logic to run before the shortcut is created.", + "minLength": 1, + "type": "string" + }, + "activate": { + "title": "Activate", + "description": "Whether to activate the target environment before running `command`.", + "markdownDescription": "Whether to activate the target environment before running `command`.", + "type": "boolean" + }, + "terminal": { + "title": "Terminal", + "description": "Whether run the program in a terminal/console or not. On Windows, it only has an effect if `activate` is true. On MacOS, the application will ignore command-line arguments.", + "markdownDescription": "Whether run the program in a terminal/console or not. On Windows, it only has an effect if `activate` is true. On MacOS, the application will ignore command-line arguments.", + "type": "boolean" + }, + "CFBundleDisplayName": { + "title": "Cfbundledisplayname", + "description": "Display name of the bundle, visible to users and used by Siri. If not provided, 'menuinst' will use the 'name' field.", + "markdownDescription": "Display name of the bundle, visible to users and used by Siri. If not provided, 'menuinst' will use the 'name' field.", + "type": "string" + }, + "CFBundleIdentifier": { + "title": "Cfbundleidentifier", + "description": "Unique identifier for the shortcut. Typically uses a reverse-DNS format. If not provided, 'menuinst' will generate one from the 'name' field.", + "markdownDescription": "Unique identifier for the shortcut. Typically uses a reverse-DNS format. If not provided, 'menuinst' will generate one from the 'name' field.", + "pattern": "^[A-z0-9\\-\\.]+$", + "type": "string" + }, + "CFBundleName": { + "title": "Cfbundlename", + "description": "Short name of the bundle. May be used if `CFBundleDisplayName` is absent. If not provided, 'menuinst' will generate one from the 'name' field.", + "markdownDescription": "Short name of the bundle. May be used if `CFBundleDisplayName` is absent. If not provided, 'menuinst' will generate one from the 'name' field.", + "maxLength": 16, + "type": "string" + }, + "CFBundleSpokenName": { + "title": "Cfbundlespokenname", + "description": "Suitable replacement for text-to-speech operations on the app. For example, 'my app one two three' instead of 'MyApp123'.", + "markdownDescription": "Suitable replacement for text-to-speech operations on the app. For example, 'my app one two three' instead of 'MyApp123'.", + "type": "string" + }, + "CFBundleVersion": { + "title": "Cfbundleversion", + "description": "Build version number for the bundle. In the context of 'menuinst' this can be used to signal a new version of the menu item for the same application version.", + "markdownDescription": "Build version number for the bundle. In the context of 'menuinst' this can be used to signal a new version of the menu item for the same application version.", + "pattern": "^\\S+$", + "type": "string" + }, + "CFBundleURLTypes": { + "title": "Cfbundleurltypes", + "description": "URL types supported by this app. Requires setting `event_handler` too. Note this feature requires macOS 10.14.4 or above.", + "markdownDescription": "URL types supported by this app. Requires setting `event_handler` too. Note this feature requires macOS 10.14.4 or above.", + "type": "array", + "items": { + "$ref": "#/definitions/CFBundleURLTypesModel" + } + }, + "CFBundleDocumentTypes": { + "title": "Cfbundledocumenttypes", + "description": "Document types supported by this app. Requires setting `event_handler` too. Requires macOS 10.14.4 or above.", + "markdownDescription": "Document types supported by this app. Requires setting `event_handler` too. Requires macOS 10.14.4 or above.", + "type": "array", + "items": { + "$ref": "#/definitions/CFBundleDocumentTypesModel" + } + }, + "LSApplicationCategoryType": { + "title": "Lsapplicationcategorytype", + "description": "The App Store uses this string to determine the appropriate categorization.", + "markdownDescription": "The App Store uses this string to determine the appropriate categorization.", + "pattern": "^public\\.app-category\\.\\S+$", + "type": "string" + }, + "LSBackgroundOnly": { + "title": "Lsbackgroundonly", + "description": "Specifies whether this app runs only in the background.", + "markdownDescription": "Specifies whether this app runs only in the background.", + "type": "boolean" + }, + "LSEnvironment": { + "title": "Lsenvironment", + "description": "List of key-value pairs used to define environment variables.", + "markdownDescription": "List of key-value pairs used to define environment variables.", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "LSMinimumSystemVersion": { + "title": "Lsminimumsystemversion", + "description": "Minimum version of macOS required for this app to run, as `x.y.z`. For example, for macOS v10.4 and later, use `10.4.0`.", + "markdownDescription": "Minimum version of macOS required for this app to run, as `x.y.z`. For example, for macOS v10.4 and later, use `10.4.0`.", + "pattern": "^\\d+\\.\\d+\\.\\d+$", + "type": "string" + }, + "LSMultipleInstancesProhibited": { + "title": "Lsmultipleinstancesprohibited", + "description": "Whether an app is prohibited from running simultaneously in multiple user sessions.", + "markdownDescription": "Whether an app is prohibited from running simultaneously in multiple user sessions.", + "type": "boolean" + }, + "LSRequiresNativeExecution": { + "title": "Lsrequiresnativeexecution", + "description": "If true, prevent a universal binary from being run under Rosetta emulation on an Intel-based Mac.", + "markdownDescription": "If true, prevent a universal binary from being run under Rosetta emulation on an Intel-based Mac.", + "type": "boolean" + }, + "NSSupportsAutomaticGraphicsSwitching": { + "title": "Nssupportsautomaticgraphicsswitching", + "description": "If true, allows an OpenGL app to utilize the integrated GPU.", + "markdownDescription": "If true, allows an OpenGL app to utilize the integrated GPU.", + "type": "boolean" + }, + "UTExportedTypeDeclarations": { + "title": "Utexportedtypedeclarations", + "description": "The uniform type identifiers owned and exported by the app.", + "markdownDescription": "The uniform type identifiers owned and exported by the app.", + "type": "array", + "items": { + "$ref": "#/definitions/UTTypeDeclarationModel" + } + }, + "UTImportedTypeDeclarations": { + "title": "Utimportedtypedeclarations", + "description": "The uniform type identifiers inherently supported, but not owned, by the app.", + "markdownDescription": "The uniform type identifiers inherently supported, but not owned, by the app.", + "type": "array", + "items": { + "$ref": "#/definitions/UTTypeDeclarationModel" + } + }, + "entitlements": { + "title": "Entitlements", + "description": "List of permissions to request for the launched application. See [the entitlements docs]( https://developer.apple.com/documentation/bundleresources/entitlements) for a full list of possible values.", + "markdownDescription": "List of permissions to request for the launched application. See [the entitlements docs]( https://developer.apple.com/documentation/bundleresources/entitlements) for a full list of possible values.", + "type": "array", + "items": { + "type": "string", + "pattern": "[a-z0-9\\.\\-]+" + } + }, + "link_in_bundle": { + "title": "Link In Bundle", + "description": "Paths that should be symlinked into the shortcut app bundle. It takes a mapping of source to destination paths. Destination paths must be relative. Placeholder `{{ MENU_ITEM_LOCATION }}` can be useful.", + "markdownDescription": "Paths that should be symlinked into the shortcut app bundle. It takes a mapping of source to destination paths. Destination paths must be relative. Placeholder `{{ MENU_ITEM_LOCATION }}` can be useful.", + "type": "object", + "additionalProperties": { + "type": "string", + "pattern": "^(?!\\/)(?!\\.\\./).*" + } + }, + "event_handler": { + "title": "Event Handler", + "description": "Required shell script logic to handle opened URL payloads. Note this feature requires macOS 10.14.4 or above.", + "markdownDescription": "Required shell script logic to handle opened URL payloads. Note this feature requires macOS 10.14.4 or above.", + "minLength": 1, + "type": "string" + } + }, + "additionalProperties": false, + "markdownDescription": "Mac-specific instructions. Check these URLs for more info:\n\n- `CF*` keys: see [Core Foundation Keys](https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html) - `LS*` keys: see [Launch Services Keys](https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/LaunchServicesKeys.html) - `entitlements`: see [Entitlements documentation](https://developer.apple.com/documentation/bundleresources/entitlements)" + }, + "Windows": { + "title": "Windows", + "description": "Windows-specific instructions. You can override global keys here if needed", + "type": "object", + "properties": { + "name": { + "title": "Name", + "description": "The name of the menu item. Can be a dictionary if the name depends on installation parameters. See `MenuItemNameDict` for details.", + "markdownDescription": "The name of the menu item. Can be a dictionary if the name depends on installation parameters. See `MenuItemNameDict` for details.", + "anyOf": [ + { + "type": "string", + "minLength": 1 + }, + { + "$ref": "#/definitions/MenuItemNameDict" + } + ] + }, + "description": { + "title": "Description", + "description": "A longer description of the menu item. Shown on popup messages.", + "markdownDescription": "A longer description of the menu item. Shown on popup messages.", + "type": "string" + }, + "icon": { + "title": "Icon", + "description": "Path to the file representing or containing the icon.", + "markdownDescription": "Path to the file representing or containing the icon.", + "minLength": 1, + "type": "string" + }, + "command": { + "title": "Command", + "description": "Command to run with the menu item, expressed as a list of strings where each string is an argument.", + "markdownDescription": "Command to run with the menu item, expressed as a list of strings where each string is an argument.", + "minItems": 1, + "type": "array", + "items": { + "type": "string" + } + }, + "working_dir": { + "title": "Working Dir", + "description": "Working directory for the running process. Defaults to user directory on each platform.", + "markdownDescription": "Working directory for the running process. Defaults to user directory on each platform.", + "minLength": 1, + "type": "string" + }, + "precommand": { + "title": "Precommand", + "description": "(Simple, preferrably single-line) logic to run before the command is run. Runs before the environment is activated, if that applies.", + "markdownDescription": "(Simple, preferrably single-line) logic to run before the command is run. Runs before the environment is activated, if that applies.", + "minLength": 1, + "type": "string" + }, + "precreate": { + "title": "Precreate", + "description": "(Simple, preferrably single-line) logic to run before the shortcut is created.", + "markdownDescription": "(Simple, preferrably single-line) logic to run before the shortcut is created.", + "minLength": 1, + "type": "string" + }, + "activate": { + "title": "Activate", + "description": "Whether to activate the target environment before running `command`.", + "markdownDescription": "Whether to activate the target environment before running `command`.", + "type": "boolean" + }, + "terminal": { + "title": "Terminal", + "description": "Whether run the program in a terminal/console or not. On Windows, it only has an effect if `activate` is true. On MacOS, the application will ignore command-line arguments.", + "markdownDescription": "Whether run the program in a terminal/console or not. On Windows, it only has an effect if `activate` is true. On MacOS, the application will ignore command-line arguments.", + "type": "boolean" + }, + "desktop": { + "title": "Desktop", + "description": "Whether to create a desktop icon in addition to the Start Menu item.", + "default": true, + "markdownDescription": "Whether to create a desktop icon in addition to the Start Menu item.", + "type": "boolean" + }, + "quicklaunch": { + "title": "Quicklaunch", + "description": "DEPRECATED. Whether to create a quick launch icon in addition to the Start Menu item.", + "default": false, + "deprecated": true, + "markdownDescription": "DEPRECATED. Whether to create a quick launch icon in addition to the Start Menu item.", + "type": "boolean" + }, + "terminal_profile": { + "title": "Terminal Profile", + "description": "Name of the Windows Terminal profile to create. This name must be unique across multiple installations because menuinst will overwrite Terminal profiles with the same name.", + "markdownDescription": "Name of the Windows Terminal profile to create. This name must be unique across multiple installations because menuinst will overwrite Terminal profiles with the same name.", + "minLength": 1, + "type": "string" + }, + "url_protocols": { + "title": "Url Protocols", + "description": "URL protocols that will be associated with this program.", + "markdownDescription": "URL protocols that will be associated with this program.", + "type": "array", + "items": { + "type": "string", + "pattern": "\\S+" + } + }, + "file_extensions": { + "title": "File Extensions", + "description": "File extensions that will be associated with this program.", + "markdownDescription": "File extensions that will be associated with this program.", + "type": "array", + "items": { + "type": "string", + "pattern": "\\.\\S*" + } + }, + "app_user_model_id": { + "title": "App User Model Id", + "description": "Identifier used in Windows 7 and above to associate processes, files and windows with a particular application. If your shortcut produces duplicated icons, you need to define this field. If not set, it will default to `Menuinst.`.\n\nSee [AppUserModelID docs]( https://learn.microsoft.com/en-us/windows/win32/shell/appids#how-to-form-an-application-defined-appusermodelid) for more information on the required string format.", + "markdownDescription": "Identifier used in Windows 7 and above to associate processes, files and windows with a particular application. If your shortcut produces duplicated icons, you need to define this field. If not set, it will default to `Menuinst.`.\n\nSee [AppUserModelID docs]( https://learn.microsoft.com/en-us/windows/win32/shell/appids#how-to-form-an-application-defined-appusermodelid) for more information on the required string format.", + "maxLength": 128, + "pattern": "\\S+\\.\\S+", + "type": "string" + } + }, + "additionalProperties": false, + "markdownDescription": "Windows-specific instructions. You can override global keys here if needed" + }, + "Platforms": { + "title": "Platforms", + "description": "Platform specific options.\n\nNote each of these fields supports the same keys as the top-level `MenuItem` (sans `platforms` itself), in case overrides are needed.", + "type": "object", + "properties": { + "linux": { + "title": "Linux", + "description": "Options for Linux. See `Linux` model for details.", + "markdownDescription": "Options for Linux. See `Linux` model for details.", + "allOf": [ + { + "$ref": "#/definitions/Linux" + } + ] + }, + "osx": { + "title": "Osx", + "description": "Options for macOS. See `MacOS` model for details.", + "markdownDescription": "Options for macOS. See `MacOS` model for details.", + "allOf": [ + { + "$ref": "#/definitions/MacOS" + } + ] + }, + "win": { + "title": "Win", + "description": "Options for Windows. See `Windows` model for details.", + "markdownDescription": "Options for Windows. See `Windows` model for details.", + "allOf": [ + { + "$ref": "#/definitions/Windows" + } + ] + } + }, + "additionalProperties": false, + "markdownDescription": "Platform specific options.\n\nNote each of these fields supports the same keys as the top-level `MenuItem` (sans `platforms` itself), in case overrides are needed." + }, + "MenuItem": { + "title": "MenuItem", + "description": "Instructions to create a menu item across operating systems.", + "type": "object", + "properties": { + "name": { + "title": "Name", + "description": "The name of the menu item. Can be a dictionary if the name depends on installation parameters. See `MenuItemNameDict` for details.", + "markdownDescription": "The name of the menu item. Can be a dictionary if the name depends on installation parameters. See `MenuItemNameDict` for details.", + "anyOf": [ + { + "type": "string", + "minLength": 1 + }, + { + "$ref": "#/definitions/MenuItemNameDict" + } + ] + }, + "description": { + "title": "Description", + "description": "A longer description of the menu item. Shown on popup messages.", + "markdownDescription": "A longer description of the menu item. Shown on popup messages.", + "type": "string" + }, + "command": { + "title": "Command", + "description": "Command to run with the menu item, expressed as a list of strings where each string is an argument.", + "markdownDescription": "Command to run with the menu item, expressed as a list of strings where each string is an argument.", + "minItems": 1, + "type": "array", + "items": { + "type": "string" + } + }, + "icon": { + "title": "Icon", + "description": "Path to the file representing or containing the icon.", + "markdownDescription": "Path to the file representing or containing the icon.", + "minLength": 1, + "type": "string" + }, + "precommand": { + "title": "Precommand", + "description": "(Simple, preferrably single-line) logic to run before the command is run. Runs before the environment is activated, if that applies.", + "markdownDescription": "(Simple, preferrably single-line) logic to run before the command is run. Runs before the environment is activated, if that applies.", + "minLength": 1, + "type": "string" + }, + "precreate": { + "title": "Precreate", + "description": "(Simple, preferrably single-line) logic to run before the shortcut is created.", + "markdownDescription": "(Simple, preferrably single-line) logic to run before the shortcut is created.", + "minLength": 1, + "type": "string" + }, + "working_dir": { + "title": "Working Dir", + "description": "Working directory for the running process. Defaults to user directory on each platform.", + "markdownDescription": "Working directory for the running process. Defaults to user directory on each platform.", + "minLength": 1, + "type": "string" + }, + "activate": { + "title": "Activate", + "description": "Whether to activate the target environment before running `command`.", + "default": true, + "markdownDescription": "Whether to activate the target environment before running `command`.", + "type": "boolean" + }, + "terminal": { + "title": "Terminal", + "description": "Whether run the program in a terminal/console or not. On Windows, it only has an effect if `activate` is true. On MacOS, the application will ignore command-line arguments.", + "default": false, + "markdownDescription": "Whether run the program in a terminal/console or not. On Windows, it only has an effect if `activate` is true. On MacOS, the application will ignore command-line arguments.", + "type": "boolean" + }, + "platforms": { + "title": "Platforms", + "description": "Platform-specific options. Presence of a platform field enables menu items in that platform.", + "markdownDescription": "Platform-specific options. Presence of a platform field enables menu items in that platform.", + "allOf": [ + { + "$ref": "#/definitions/Platforms" + } + ] + } + }, + "required": [ + "name", + "description", + "command", + "platforms" + ], + "additionalProperties": false, + "markdownDescription": "Instructions to create a menu item across operating systems." + } + } +} diff --git a/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst/data/osx_launcher_arm64 b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst/data/osx_launcher_arm64 new file mode 100644 index 0000000000000000000000000000000000000000..818c5fc103e418e6c7157274945fd2c90f5b6847 Binary files /dev/null and b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst/data/osx_launcher_arm64 differ diff --git a/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst/data/osx_launcher_x86_64 b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst/data/osx_launcher_x86_64 new file mode 100644 index 0000000000000000000000000000000000000000..ca03454c6b271aa12dd8c46f352f9e90900159b3 Binary files /dev/null and b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst/data/osx_launcher_x86_64 differ diff --git a/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst/platforms/__init__.py b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst/platforms/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..5282c8545551279c47c4efff0ab3f0b73d4e2435 --- /dev/null +++ b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst/platforms/__init__.py @@ -0,0 +1,27 @@ +import sys +from typing import Tuple + +from .base import Menu as BaseMenu +from .base import MenuItem as BaseMenuItem + + +def menu_api_for_platform(platform: str = sys.platform) -> Tuple[BaseMenu, BaseMenuItem]: + if platform == "win32": + from .win import WindowsMenu as Menu + from .win import WindowsMenuItem as MenuItem + + elif platform == "darwin": + from .osx import MacOSMenu as Menu + from .osx import MacOSMenuItem as MenuItem + + elif platform.startswith("linux"): + from .linux import LinuxMenu as Menu + from .linux import LinuxMenuItem as MenuItem + + else: + raise ValueError(f"platform {platform} is not supported") + + return Menu, MenuItem + + +Menu, MenuItem = menu_api_for_platform() diff --git a/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst/platforms/base.py b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst/platforms/base.py new file mode 100644 index 0000000000000000000000000000000000000000..0e268b5e898de66cb836d5ded8b494ae7e15b481 --- /dev/null +++ b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst/platforms/base.py @@ -0,0 +1,277 @@ +""" """ + +from __future__ import annotations + +import json +import os +import sys +from copy import deepcopy +from logging import getLogger +from pathlib import Path +from subprocess import check_output +from tempfile import NamedTemporaryFile +from typing import Any, Iterable, Mapping + +from ..utils import ( + DEFAULT_BASE_PREFIX, + DEFAULT_PREFIX, + _UserOrSystem, + data_path, + deep_update, + logged_run, + slugify, +) + +log = getLogger(__name__) +SCHEMA_VERSION = "1-1-3" + + +class Menu: + def __init__( + self, + name: str, + prefix: str = DEFAULT_PREFIX, + base_prefix: str = DEFAULT_BASE_PREFIX, + mode: _UserOrSystem = "user", + ): + assert mode in ("user", "system"), f"mode={mode} must be `user` or `system`" + self.mode = mode + self.name = name + self.prefix = Path(prefix) + self.base_prefix = Path(base_prefix) + + if self.prefix.samefile(self.base_prefix): + self.env_name = "base" + else: + self.env_name = self.prefix.name + + def create(self) -> tuple[os.PathLike]: + raise NotImplementedError + + def remove(self) -> tuple[os.PathLike]: + raise NotImplementedError + + def render(self, value: Any, slug: bool = False, extra: dict | None = None) -> Any: + if not hasattr(value, "replace"): + return value + if extra: + placeholders = {**self.placeholders, **extra} + else: + placeholders = self.placeholders + for placeholder, replacement in placeholders.items(): + value = value.replace("{{ " + placeholder + " }}", replacement) + if slug: + value = slugify(value) + return value + + @property + def placeholders(self) -> dict[str, str]: + """ + Additional placeholders added at runtime: + - MENU_ITEM_LOCATION -> *MenuItem().location + + Subclasses may extend this dictionary! + """ + return { + "BASE_PREFIX": str(self.base_prefix), + "DISTRIBUTION_NAME": self.base_prefix.name, + "BASE_PYTHON": str(self.base_prefix / "bin" / "python"), + "PREFIX": str(self.prefix), + "ENV_NAME": self.env_name, + "PYTHON": str(self.prefix / "bin" / "python"), + "MENU_DIR": str(self.prefix / "Menu"), + "BIN_DIR": str(self.prefix / "bin"), + "PY_VER": "N.A", + "HOME": os.path.expanduser("~"), + "ICON_EXT": "png", + } + + def _conda_exe_path_candidates(self) -> tuple[Path, ...]: + return ( + self.base_prefix / "_conda.exe", + self.base_prefix / "conda.exe", + Path(os.environ.get("CONDA_EXE", "/oops/a_file_that_does_not_exist")), + self.base_prefix / "condabin" / "conda", + self.base_prefix / "bin" / "conda", + Path(os.environ.get("MAMBA_EXE", "/oops/a_file_that_does_not_exist")), + self.base_prefix / "condabin" / "micromamba", + self.base_prefix / "bin" / "micromamba", + ) + + @property + def conda_exe(self) -> Path: + if sys.executable.endswith("conda.exe"): + # This is the case with `constructor` calls + return Path(sys.executable) + + for path in self._conda_exe_path_candidates(): + if path.is_file(): + return path + + return Path("conda") + + def _is_micromamba(self, exe: Path) -> bool: + if "micromamba" in exe.name: + return True + if exe.name in ("conda.exe", "_conda.exe"): + out = check_output([str(exe), "info"], universal_newlines=True) + return "micromamba version" in out + return False + + def _site_packages(self, prefix: Path | str | None = None) -> Path: + """ + Locate the python site-packages location on unix systems + """ + if os.name == "nt": + raise NotImplementedError + if prefix is None: + prefix = self.prefix + lib = Path(prefix) / "lib" + lib_python = next((p for p in lib.glob("python*") if p.is_dir()), lib / "pythonN.A") + return lib_python / "site-packages" + + def _paths(self) -> Iterable[os.PathLike]: + """ + This method should return the paths created by the menu + so they can be removed upon uninstallation + """ + raise NotImplementedError + + +class MenuItem: + def __init__(self, menu: Menu, metadata: Mapping[str, Any]): + self.menu = menu + self._data = self._initialize_on_defaults(metadata) + self.metadata = self._flatten_for_platform(self._data) + if isinstance(self.metadata["name"], dict): + if self.menu.prefix.samefile(self.menu.base_prefix): + name = self.metadata["name"].get("target_environment_is_base", "") + else: + name = self.metadata["name"].get("target_environment_is_not_base", "") + if not name: + raise ValueError("Cannot parse `name` from dictionary representation.") + self.metadata["name"] = name + + @property + def location(self) -> Path: + "Path to the main menu item artifact (file or directory, depends on the platform)" + raise NotImplementedError + + def create(self) -> Iterable[os.PathLike]: + raise NotImplementedError + + def remove(self) -> Iterable[os.PathLike]: + raise NotImplementedError + + @property + def placeholders(self) -> dict[str, str]: + return { + "MENU_ITEM_LOCATION": str(self.location), + } + + def render_key(self, key: str, slug: bool = False, extra: dict[str, str] | None = None) -> Any: + value = self.metadata.get(key) + return self.render(value, slug=slug, extra=extra) + + def render(self, value: Any, slug: bool = False, extra: dict[str, str] | None = None) -> Any: + if value in (None, True, False): + return value + kwargs = { + "slug": slug, + "extra": extra if extra is not None else self.placeholders, + } + if isinstance(value, str): + return self.menu.render(value, **kwargs) + if hasattr(value, "items"): + return {key: self.menu.render(value, **kwargs) for key, value in value.items()} + return [self.menu.render(item, **kwargs) for item in value] + + def _precreate(self): + """ + Logic to run before the shortcut files are created. + """ + if os.name == "nt": + raise NotImplementedError + + precreate_code = self.render_key("precreate") + if not precreate_code: + return + with NamedTemporaryFile(delete=False, mode="w") as tmp: + tmp.write(precreate_code) + if precreate_code.startswith("#!"): + os.chmod(tmp.name, 0o755) + cmd = [tmp.name] + else: + cmd = ["bash", tmp.name] + logged_run(cmd, check=True) + os.unlink(tmp.name) + + def _paths(self) -> Iterable[os.PathLike]: + """ + This method should return the paths created by the item + so they can be removed upon uninstallation + """ + raise NotImplementedError + + @staticmethod + def _initialize_on_defaults(data) -> Mapping[str, Any]: + with open(data_path(f"menuinst-{SCHEMA_VERSION}.default.json")) as f: + defaults = json.load(f)["menu_items"][0] + original = deepcopy(data.copy()) + data = deep_update(defaults, data) + # remove platforms that were not originally in 'data' + data["platforms"] = { + platform: value + for platform, value in data.get("platforms", {}).items() + if original.get("platforms", {}).get(platform) not in (None, False) + } + return data + + @staticmethod + def _flatten_for_platform( + data: Mapping[str, Any], platform: str = sys.platform + ) -> Mapping[str, Any]: + """ + Merge platform keys with global keys, overwriting if needed. + """ + flattened = deepcopy(data) + all_platforms = flattened.pop("platforms", {}) + this_platform = all_platforms.pop(platform_key(platform), None) + if this_platform: + for key, value in this_platform.items(): + if key not in flattened: + # bring missing keys, since they are platform specific + flattened[key] = value + elif value is not None: + # if the key was in global, it was not platform specific + # this is an override and we only do so if is not None + log.debug("Platform value %s=%s overrides global value", key, value) + flattened[key] = value + else: # restore + flattened["platforms"] = all_platforms + + # in the merged metadata, platforms becomes a list of str stating which + # platforms are enabled for this item + flattened["platforms"] = [ + key for key, value in data["platforms"].items() if value is not None + ] + return flattened + + def enabled_for_platform(self, platform: str = sys.platform) -> bool: + return self._data["platforms"].get(platform_key(platform)) is not None + + +def platform_key(platform: str = sys.platform) -> str: + if platform == "win32": + return "win" + if platform == "darwin": + return "osx" + if platform.startswith("linux"): + return "linux" + + raise ValueError(f"Platform {platform} is not supported") + + +menuitem_defaults = json.loads( + (Path(__file__).parents[1] / "data" / f"menuinst-{SCHEMA_VERSION}.default.json").read_text() +)["menu_items"][0] diff --git a/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst/platforms/linux.py b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst/platforms/linux.py new file mode 100644 index 0000000000000000000000000000000000000000..3fcfe43f178eb78a87ee9c3b99cc3bc3ba767241 --- /dev/null +++ b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst/platforms/linux.py @@ -0,0 +1,423 @@ +""" """ + +from __future__ import annotations + +import os +import shlex +import shutil +import time +from configparser import ConfigParser +from logging import getLogger +from pathlib import Path +from subprocess import CalledProcessError +from tempfile import TemporaryDirectory +from typing import Iterable +from xml.etree import ElementTree + +from ..utils import UnixLex, add_xml_child, indent_xml_tree, logged_run, unlink +from .base import Menu, MenuItem, menuitem_defaults + +log = getLogger(__name__) + + +class LinuxMenu(Menu): + """ + Menus in Linux are governed by the freedesktop.org standards, + spec'd here https://specifications.freedesktop.org/menu-spec/menu-spec-latest.html + + menuinst will populate the relevant XML config and create a .directory entry + """ + + _system_config_directory = Path("/etc/xdg/") + _system_data_directory = Path("/usr/share") + + def __init__(self, *args, **kwargs): + super().__init__(*args, **kwargs) + if self.mode == "system": + self.config_directory = self._system_config_directory + self.data_directory = self._system_data_directory + else: + self.config_directory = Path( + os.environ.get("XDG_CONFIG_HOME", "~/.config") + ).expanduser() + self.data_directory = Path( + os.environ.get("XDG_DATA_HOME", "~/.local/share") + ).expanduser() + + # XML Config paths + menu_fname = f"{os.environ.get('XDG_MENU_PREFIX', '')}applications.menu" + self.system_menu_config_location = self._system_config_directory / "menus" / menu_fname + self.menu_config_location = self.config_directory / "menus" / menu_fname + # .desktop / .directory paths + self.directory_entry_location = ( + self.data_directory + / "desktop-directories" + / f"{self.render(self.name, slug=True)}.directory" + ) + self.desktop_entries_location = self.data_directory / "applications" + + def create(self) -> tuple[os.PathLike]: + self._ensure_directories_exist() + path = self._write_directory_entry() + if self._is_valid_menu_file() and self._has_this_menu(): + return (path,) + self._ensure_menu_file() + self._add_this_menu() + return (path,) + + def remove(self) -> tuple[os.PathLike]: + if not Path(self.desktop_entries_location).exists(): + return tuple() + for fn in os.listdir(self.desktop_entries_location): + if fn.startswith(f"{self.render(self.name, slug=True)}_"): + # found one shortcut, so don't remove the name from menu + return tuple() + self._remove_this_menu() + if self.directory_entry_location.exists(): + unlink(self.directory_entry_location, missing_ok=True) + return (self.directory_entry_location,) + return tuple() + + @property + def placeholders(self) -> dict[str, str]: + placeholders = super().placeholders + placeholders["SP_DIR"] = str(self._site_packages()) + return placeholders + + def _ensure_directories_exist(self): + paths = [ + self.config_directory / "menus", + self.data_directory / "desktop-directories", + self.data_directory / "applications", + ] + for path in paths: + log.debug("Ensuring path %s exists", path) + path.mkdir(parents=True, exist_ok=True) + + # + # .directory stuff methods + # + + def _write_directory_entry(self) -> Path: + lines = [ + "[Desktop Entry]", + "Type=Directory", + "Encoding=UTF-8", + f"Name={self.render(self.name)}", + ] + log.debug("Writing directory entry at %s", self.directory_entry_location) + with open(self.directory_entry_location, "w") as f: + f.write("\n".join(lines)) + + return self.directory_entry_location + + # + # XML config stuff methods + # + + def _remove_this_menu(self): + if not Path(self.menu_config_location).exists(): + return + log.debug( + "Editing %s to remove %s config", self.menu_config_location, self.render(self.name) + ) + tree = ElementTree.parse(self.menu_config_location) + root = tree.getroot() + for elt in root.findall("Menu"): + if elt.find("Name").text == self.render(self.name): + root.remove(elt) + self._write_menu_file(tree) + + def _has_this_menu(self) -> bool: + root = ElementTree.parse(self.menu_config_location).getroot() + return any(e.text == self.render(self.name) for e in root.findall("Menu/Name")) + + def _add_this_menu(self): + log.debug("Editing %s to add %s config", self.menu_config_location, self.render(self.name)) + tree = ElementTree.parse(self.menu_config_location) + root = tree.getroot() + menu_elt = add_xml_child(root, "Menu") + add_xml_child(menu_elt, "Name", self.render(self.name)) + add_xml_child(menu_elt, "Directory", f"{self.render(self.name, slug=True)}.directory") + inc_elt = add_xml_child(menu_elt, "Include") + add_xml_child(inc_elt, "Category", self.render(self.name)) + self._write_menu_file(tree) + + def _is_valid_menu_file(self) -> bool: + try: + root = ElementTree.parse(self.menu_config_location).getroot() + return root is not None and root.tag == "Menu" + except Exception: + return False + + def _write_menu_file(self, tree: ElementTree.ElementTree): + log.debug("Writing %s", self.menu_config_location) + indent_xml_tree(tree.getroot()) # inplace! + with open(self.menu_config_location, "wb") as f: + f.write(b'\n') + tree.write(f) + f.write(b"\n") + + def _ensure_menu_file(self): + # ensure any existing version is a file + if self.menu_config_location.exists() and not self.menu_config_location.is_file(): + raise RuntimeError(f"Menu config location {self.menu_config_location} is not a file!") + # shutil.rmtree(self.menu_config_location) + + # ensure any existing file is actually a menu file + if self.menu_config_location.is_file(): + # make a backup of the menu file to be edited + cur_time = time.strftime("%Y-%m-%d_%Hh%Mm%S") + backup_menu_file = f"{self.menu_config_location}.{cur_time}" + shutil.copyfile(self.menu_config_location, backup_menu_file) + + if not self._is_valid_menu_file(): + os.remove(self.menu_config_location) + else: + self._new_menu_file() + + def _new_menu_file(self): + log.debug("Creating %s", self.menu_config_location) + with open(self.menu_config_location, "w") as f: + f.write("Applications") + if self.mode == "user": + f.write(f'{self.system_menu_config_location}') + f.write("\n") + + def _paths(self) -> tuple[Path]: + return (self.directory_entry_location,) + + +class LinuxMenuItem(MenuItem): + @property + def location(self) -> Path: + menu_prefix = self.render(self.menu.name, slug=True, extra={}) + # TODO: filename should conform to D-Bus well known name conventions + # https://specifications.freedesktop.org/desktop-entry-spec/latest/ar01s02.html + filename = f"{menu_prefix}_{self.render_key('name', slug=True, extra={})}.desktop" + return self.menu.desktop_entries_location / filename + + def create(self) -> Iterable[os.PathLike]: + log.debug("Creating %s", self.location) + self._precreate() + self._write_desktop_file() + self._maybe_register_mime_types(register=True) + self._update_desktop_database() + return self._paths() + + def remove(self) -> Iterable[os.PathLike]: + paths = (path for path in self._paths() if Path(path).is_file()) + self._maybe_register_mime_types(register=False) + if paths: + for path in paths: + log.debug("Removing %s", path) + unlink(path) + self._update_desktop_database() + return paths + + def _update_desktop_database(self): + exe = shutil.which("update-desktop-database") + if exe: + logged_run( + [exe, str(self.menu.desktop_entries_location)], + check=False, + ) + + def _command(self) -> str: + parts = [] + precommand = self.render_key("precommand") + if precommand: + parts.append(precommand) + if self.metadata["activate"]: + conda_exe = self.menu.conda_exe + if self.menu._is_micromamba(conda_exe): + activate = "shell activate" + else: + activate = "shell.bash activate" + parts.append(f'eval "$("{conda_exe}" {activate} "{self.menu.prefix}")"') + parts.append(" ".join(UnixLex.quote_args(self.render_key("command")))) + return "bash -c " + shlex.quote(" && ".join(parts)) + + def _write_desktop_file(self): + if self.location.exists(): + log.warning("Overwriting existing file at %s.", self.location) + + lines = [ + "[Desktop Entry]", + "Type=Application", + "Encoding=UTF-8", + f"Name={self.render_key('name')}", + f"Exec={self._command()}", + f"Terminal={str(self.render_key('terminal')).lower()}", + ] + + icon = self.render_key("icon") + if icon: + lines.append(f"Icon={self.render_key('icon')}") + + description = self.render_key("description") + if description: + lines.append(f"Comment={self.render_key('description')}") + + working_dir = self.render_key("working_dir") + if working_dir: + Path(os.path.expandvars(working_dir)).mkdir(parents=True, exist_ok=True) + lines.append(f"Path={working_dir}") + + for key in menuitem_defaults["platforms"]["linux"]: + if key in (*menuitem_defaults, "glob_patterns"): + continue + value = self.render_key(key) + if value is None: + continue + if isinstance(value, bool): + value = str(value).lower() + elif isinstance(value, (list, tuple)): + value = ";".join(value) + ";" + lines.append(f"{key}={value}") + + with open(self.location, "w") as f: + f.write("\n".join(lines)) + f.write("\n") + + def _maybe_register_mime_types(self, register: bool = True): + mime_types = self.render_key("MimeType") + if not mime_types: + return + self._register_mime_types(mime_types, register=register) + + def _register_mime_types(self, mime_types: Iterable[str], register: bool = True): + glob_patterns = self.render_key("glob_patterns") or {} + for mime_type in mime_types: + glob_pattern = glob_patterns.get(mime_type) + if glob_pattern: + self._glob_pattern_for_mime_type(mime_type, glob_pattern, install=register) + + mimeapps = self.menu.config_directory / "mimeapps.list" + if register: + config = ConfigParser(default_section=None) + if mimeapps.is_file(): + config.read(mimeapps) + log.debug("Registering %s to %s...", mime_types, mimeapps) + if "Default Applications" not in config.sections(): + config.add_section("Default Applications") + if "Added Associations" not in config.sections(): + config.add_section("Added Associations") + defaults = config["Default Applications"] + added = config["Added Associations"] + for mime_type in mime_types: + if mime_type not in defaults: + # Do not override existing defaults + defaults[mime_type] = self.location.name + if mime_type in added and self.location.name not in added[mime_type]: + added[mime_type] = f"{added[mime_type]};{self.location.name}" + else: + added[mime_type] = self.location.name + with open(mimeapps, "w") as f: + config.write(f, space_around_delimiters=False) + elif mimeapps.is_file(): + # Remove entries + config = ConfigParser(default_section=None) + config.read(mimeapps) + log.debug("Deregistering %s from %s...", mime_types, mimeapps) + for section_name in "Default Applications", "Added Associations": + if section_name not in config.sections(): + continue + section = config[section_name] + for mimetype, desktop_files in section.items(): + if self.location.name == desktop_files: + section.pop(mimetype) + elif self.location.name in desktop_files.split(";"): + section[mimetype] = ";".join( + [x for x in desktop_files.split(";") if x != self.location.name] + ) + if not section.keys(): + config.remove_section(section_name) + with open(mimeapps, "w") as f: + config.write(f, space_around_delimiters=False) + + update_mime_database = shutil.which("update-mime-database") + if update_mime_database: + logged_run( + [update_mime_database, "-V", self.menu.data_directory / "mime"], + check=False, + ) + + def _xml_path_for_mime_type(self, mime_type: str) -> tuple[Path, bool]: + basename = mime_type.replace("/", "-") + xml_files = list( + (self.menu.data_directory / "mime" / "applications").glob(f"*{basename}*.xml") + ) + if xml_files: + if len(xml_files) > 1: + msg = "Found multiple files for MIME type %s: %s. Returning first." + log.debug(msg, mime_type, xml_files) + return xml_files[0], True + return self.menu.data_directory / "mime" / "packages" / f"{basename}.xml", False + + def _glob_pattern_for_mime_type( + self, + mime_type: str, + glob_pattern: str, + install: bool = True, + ) -> Path | None: + """ + See https://specifications.freedesktop.org/mime-apps-spec/mime-apps-spec-latest.html + for more information on the default locations. + """ + xml_path, exists = self._xml_path_for_mime_type(mime_type) + if exists: + return xml_path + + # Write the XML that binds our current mime type to the glob pattern + xmlns = "http://www.freedesktop.org/standards/shared-mime-info" + mime_info = ElementTree.Element("mime-info", xmlns=xmlns) + mime_type_tag = ElementTree.SubElement(mime_info, "mime-type", type=mime_type) + ElementTree.SubElement(mime_type_tag, "glob", pattern=glob_pattern) + descr = f"Custom MIME type {mime_type} for '{glob_pattern}' files (registered by menuinst)" + ElementTree.SubElement(mime_type_tag, "comment").text = descr + tree = ElementTree.ElementTree(mime_info) + + subcommand = "install" if install else "uninstall" + # Install the XML file and register it as default for our app + use_fallback = False + try: + with TemporaryDirectory() as tmp: + with open(os.path.join(tmp, os.path.basename(xml_path)), "wb") as f: + tree.write(f, encoding="UTF-8", xml_declaration=True) + + xdg_mime = shutil.which("xdg-mime") + if xdg_mime: + logged_run( + [xdg_mime, subcommand, "--mode", self.menu.mode, "--novendor", f.name], + check=True, + ) + else: + name = self.render_key("name") + log.warning( + "Unable to un/register MIME type '%s' " + "for Desktop Entry of name '%s': " + "'xdg-mime' is not present on the system.'", + glob_pattern, + name, + ) + use_fallback = True + except CalledProcessError: + # Note that the error from 'xdg-mime' is already logged earlier via + # the call to 'logged_run'. + use_fallback = True + log.debug("Could not un/register MIME type %s with xdg-mime.", mime_type) + + if use_fallback: + log.debug("Writing to '%s' as a fallback.", xml_path) + tree.write(xml_path, encoding="UTF-8", xml_declaration=True) + + def _paths(self) -> Iterable[os.PathLike]: + paths = [self.location] + mime_types = self.render_key("MimeType") or () + for mime in mime_types: + xml_path, exists = self._xml_path_for_mime_type(mime) + if exists and "registered by menuinst" in xml_path.read_text(): + paths.append(xml_path) + return tuple(paths) diff --git a/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst/platforms/osx.py b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst/platforms/osx.py new file mode 100644 index 0000000000000000000000000000000000000000..9ddfa1ee3b13c5e8ddb0aa2dcaae0215a96665a6 --- /dev/null +++ b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst/platforms/osx.py @@ -0,0 +1,351 @@ +""" """ + +from __future__ import annotations + +import os +import platform +import plistlib +import shutil +from hashlib import sha1 +from logging import getLogger +from pathlib import Path + +from .. import data as _menuinst_data +from ..utils import UnixLex, logged_run +from .base import Menu, MenuItem, menuitem_defaults + +log = getLogger(__name__) + + +class MacOSMenu(Menu): + def create(self) -> tuple[os.PathLike]: + return self._paths() + + def remove(self) -> tuple[os.PathLike]: + return self._paths() + + @property + def placeholders(self) -> dict[str, str]: + placeholders = super().placeholders + placeholders.update( + { + "SP_DIR": str(self._site_packages()), + "ICON_EXT": "icns", + "PYTHONAPP": str(self.prefix / "python.app" / "Contents" / "MacOS" / "python"), + } + ) + return placeholders + + def _paths(self) -> tuple: + return () + + +class MacOSMenuItem(MenuItem): + @property + def location(self) -> Path: + "Path to the .app directory defining the menu item" + return self._base_location() / "Applications" / self._bundle_name + + @property + def _bundle_name(self) -> str: + return f"{self.render_key('name', extra={})}.app" + + @property + def _nested_location(self) -> Path: + "Path to the nested .app directory defining the menu item main app" + return self.location / "Contents" / "Resources" / self._bundle_name + + def _base_location(self) -> Path: + if self.menu.mode == "user": + return Path("~").expanduser() + return Path("/") + + def _precreate(self): + super()._precreate() + for src, dest in (self.metadata["link_in_bundle"] or {}).items(): + rendered_dest: Path = (self.location / self.render(dest)).resolve() + # if not rendered_dest.is_relative_to(self.location): # FUTURE: Only for 3.9+ + if not str(rendered_dest).startswith(str(self.location)): + raise ValueError( + "'link_in_bundle' destinations MUST be created " + f"inside the .app bundle ({self.location}), but it points to '{rendered_dest}." + ) + rendered_dest.parent.mkdir(parents=True, exist_ok=True) + os.symlink(self.render(src), rendered_dest) + + def create(self) -> tuple[Path]: + if self.location.exists(): + message = ( + f"App already exists at {self.location}. " + "Please remove the existing shortcut before installing. " + "If you used conda to install this package, " + "reinstall the package with --force-reinstall to " + "create the shortcut once the location is cleared." + ) + raise RuntimeError(message) + log.debug("Creating %s", self.location) + self._create_application_tree() + self._precreate() + self._copy_icon() + self._write_pkginfo() + self._write_plistinfo() + self._write_appkit_launcher() + self._write_launcher() + self._write_script() + self._write_event_handler() + self._maybe_register_with_launchservices() + self._sign_with_entitlements() + return (self.location,) + + def remove(self) -> tuple[Path]: + log.debug("Removing %s", self.location) + self._maybe_register_with_launchservices(register=False) + if self.location.exists(): + shutil.rmtree(self.location, ignore_errors=True) + return (self.location,) + return tuple() + + def _create_application_tree(self) -> tuple[Path]: + paths = [ + self.location / "Contents" / "Resources", + self.location / "Contents" / "MacOS", + ] + if self._needs_appkit_launcher: + paths += [ + self._nested_location / "Contents" / "Resources", + self._nested_location / "Contents" / "MacOS", + ] + for path in paths: + path.mkdir(parents=True, exist_ok=False) + return tuple(paths) + + def _copy_icon(self): + icon = self.render_key("icon") + if icon: + shutil.copy(icon, self.location / "Contents" / "Resources") + if self._needs_appkit_launcher: + shutil.copy(icon, self._nested_location / "Contents" / "Resources") + + def _write_pkginfo(self): + app_bundles = [self.location] + if self._needs_appkit_launcher: + app_bundles.append(self._nested_location) + for app in app_bundles: + with open(app / "Contents" / "PkgInfo", "w") as f: + f.write(f"APPL{self.render_key('name', slug=True)[:8]}") + + def _write_plistinfo(self): + name = self.render_key("name") + slugname = self.render_key("name", slug=True) + if len(slugname) > 16: + shortname = slugname[:10] + sha1(slugname.encode()).hexdigest()[:6] + else: + shortname = slugname + pl = { + "CFBundleName": shortname, + "CFBundleDisplayName": name, + "CFBundleExecutable": slugname, + "CFBundleGetInfoString": f"{slugname}-1.0.0", + "CFBundleIdentifier": f"com.{slugname}", + "CFBundlePackageType": "APPL", + "CFBundleVersion": "1.0.0", + "CFBundleShortVersionString": "1.0.0", + } + + icon = self.render_key("icon") + if icon: + pl["CFBundleIconFile"] = Path(icon).name + + if self._needs_appkit_launcher: + # write only the basic plist info into the nested bundle + with open(self._nested_location / "Contents" / "Info.plist", "wb") as f: + plistlib.dump(pl, f) + # the *outer* bundle is background-only and needs a different ID + pl["LSBackgroundOnly"] = True + pl["CFBundleIdentifier"] = f"com.{slugname}-appkit-launcher" + + # Override defaults with (potentially) user provided values + ignore_keys = (*menuitem_defaults, "entitlements", "link_in_bundle", "info_plist_extra") + info_plist_extra = self.metadata.get("info_plist_extra") or {} + for key in menuitem_defaults["platforms"]["osx"]: + if key in ignore_keys: + continue + if key in info_plist_extra: + raise ValueError( + f"Duplicate Info.plist property found: {key}. " + "Remove the property from `info_plist_extra`." + ) + value = self.render_key(key) + if value is None: + continue + if key == "CFBundleVersion": + # setting the version also changes these two values + pl["CFBundleShortVersionString"] = value + pl["CFBundleGetInfoString"] = f"{slugname}-{value}" + pl[key] = value + for key, value in info_plist_extra.items(): + pl[key] = self.render(value) + with open(self.location / "Contents" / "Info.plist", "wb") as f: + plistlib.dump(pl, f) + + def _command(self) -> str: + lines = ["#!/bin/sh"] + if self.render_key("terminal"): + # FIXME: Terminal launching will miss the arguments; + # there's no easy way to pass them! + lines.extend( + [ + 'if [ "${__CFBundleIdentifier:-}" != "com.apple.Terminal" ]; then', + ' open -b com.apple.terminal "$0"', + " exit $?", + "fi", + ] + ) + + working_dir = self.render_key("working_dir") + if working_dir: + Path(os.path.expandvars(working_dir)).mkdir(parents=True, exist_ok=True) + lines.append(f'cd "{working_dir}"') + + precommand = self.render_key("precommand") + if precommand: + lines.append(precommand) + + if self.metadata["activate"]: + conda_exe = self.menu.conda_exe + if self.menu._is_micromamba(conda_exe): + activate = "shell activate" + else: + activate = "shell.bash activate" + lines.append(f'eval "$("{conda_exe}" {activate} "{self.menu.prefix}")"') + + lines.append(" ".join(UnixLex.quote_args(self.render_key("command")))) + + return "\n".join(lines) + + def _write_appkit_launcher(self, launcher_path: os.PathLike | None = None) -> os.PathLike: + if launcher_path is None: + launcher_path = self._default_appkit_launcher_path() + shutil.copy(self._find_appkit_launcher(), launcher_path) + os.chmod(launcher_path, 0o755) + return launcher_path + + def _write_launcher(self, launcher_path: os.PathLike | None = None) -> os.PathLike: + if launcher_path is None: + launcher_path = self._default_launcher_path() + shutil.copy(self._find_launcher(), launcher_path) + os.chmod(launcher_path, 0o755) + return launcher_path + + def _write_script(self, script_path: os.PathLike | None = None) -> os.PathLike: + if script_path is None: + script_path = self._default_launcher_path(suffix="-script") + with open(script_path, "w") as f: + f.write(self._command()) + os.chmod(script_path, 0o755) + return script_path + + def _write_event_handler(self, script_path: os.PathLike | None = None) -> os.PathLike: + if not self._needs_appkit_launcher: + return + event_handler_logic = self.render_key("event_handler") + if event_handler_logic is None: + return + if script_path is None: + script_path = self.location / "Contents" / "Resources" / "handle-event" + with open(script_path, "w") as f: + f.write(f"#!/bin/bash\n{event_handler_logic}\n") + os.chmod(script_path, 0o755) + return script_path + + def _paths(self) -> tuple[os.PathLike]: + return (self.location,) + + def _find_appkit_launcher(self) -> Path: + launcher_name = f"appkit_launcher_{platform.machine()}" + for datapath in _menuinst_data.__path__: + launcher_path = Path(datapath) / launcher_name + if launcher_path.is_file() and os.access(launcher_path, os.X_OK): + return launcher_path + raise ValueError(f"Could not find executable launcher for {platform.machine()}") + + def _find_launcher(self) -> Path: + launcher_name = f"osx_launcher_{platform.machine()}" + for datapath in _menuinst_data.__path__: + launcher_path = Path(datapath) / launcher_name + if launcher_path.is_file() and os.access(launcher_path, os.X_OK): + return launcher_path + raise ValueError(f"Could not find executable launcher for {platform.machine()}") + + def _default_appkit_launcher_path(self, suffix: str = "") -> Path: + name = self.render_key("name", slug=True) + return self.location / "Contents" / "MacOS" / f"{name}{suffix}" + + def _default_launcher_path(self, suffix: str = "") -> Path: + name = self.render_key("name", slug=True) + if self._needs_appkit_launcher: + return self._nested_location / "Contents" / "MacOS" / f"{name}{suffix}" + return self.location / "Contents" / "MacOS" / f"{name}{suffix}" + + def _maybe_register_with_launchservices(self, register=True): + if not self._needs_appkit_launcher: + return + if register: + # register the URL scheme with `lsregister` + _lsregister("-R", str(self.location)) + else: + _lsregister("-R", "-u", "-all", str(self.location)) + + def _sign_with_entitlements(self): + "Self-sign shortcut to apply required entitlements" + entitlement_keys = self.render_key("entitlements") + if not entitlement_keys: + return + slugname = self.render_key("name", slug=True) + plist = {key: True for key in entitlement_keys} + entitlements_path = self.location / "Contents" / "Entitlements.plist" + with open(entitlements_path, "wb") as f: + plistlib.dump(plist, f) + logged_run( + [ + # hardcode to system location to avoid accidental clobber in PATH + "/usr/bin/codesign", + "--verbose", + "--sign", + "-", + "--prefix", + f"com.{slugname}", + "--options", + "runtime", + "--force", + "--deep", + "--entitlements", + entitlements_path, + self.location, + ], + check=True, + ) + + @property + def _needs_appkit_launcher(self) -> bool: + """ + In macOS, file type and URL protocol associations are handled by the + Apple Events system. When the user opens on a file or URL, the system + will send an Apple Event to the application that was registered as a handler. + Some apps might not have the needed listener to process the event. In that case, + we provide a generic one. This is decided by the presence of "event_handler". + If that key is absent or null, we assume the app has its own listener. + + See: + - https://developer.apple.com/library/archive/documentation/Carbon/Conceptual/LaunchServicesConcepts/LSCConcepts/LSCConcepts.html + - The source code at /src/appkit-launcher in this repository + """ # noqa + return bool(self.metadata.get("event_handler")) + + +def _lsregister(*args, check=True, **kwargs): + exe = ( + "/System/Library/Frameworks/CoreServices.framework" + "/Frameworks/LaunchServices.framework/Support/lsregister" + ) + return logged_run([exe, *args], check=check, **kwargs) diff --git a/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst/platforms/win.py b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst/platforms/win.py new file mode 100644 index 0000000000000000000000000000000000000000..b15ab29b309b9a16c2ff0eac9139bd6e2e59bba1 --- /dev/null +++ b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst/platforms/win.py @@ -0,0 +1,548 @@ +""" """ + +from __future__ import annotations + +import json +import os +import shutil +import warnings +from logging import getLogger +from pathlib import Path +from subprocess import CompletedProcess +from tempfile import NamedTemporaryFile +from typing import Any + +from ..utils import WinLex, logged_run, unlink +from .base import Menu, MenuItem +from .win_utils.knownfolders import folder_path as windows_folder_path +from .win_utils.knownfolders import windows_terminal_settings_files +from .win_utils.registry import ( + notify_shell_changes, + register_file_extension, + register_url_protocol, + unregister_file_extension, + unregister_url_protocol, +) + +log = getLogger(__name__) + + +class WindowsMenu(Menu): + def create(self) -> tuple[Path]: + log.debug("Creating %s", self.start_menu_location) + self.start_menu_location.mkdir(parents=True, exist_ok=True) + if self.quick_launch_location: + self.quick_launch_location.mkdir(parents=True, exist_ok=True) + if self.desktop_location: + self.desktop_location.mkdir(parents=True, exist_ok=True) + return (self.start_menu_location,) + + def remove(self) -> tuple[Path]: + # Only remove if the Start Menu directory is empty in case applications share a folder. + menu_location = Path(self.start_menu_location) + if menu_location.exists(): + try: + # Check directory contents. If empty, it will raise StopIteration + # and only in that case we delete the directory. + next(menu_location.iterdir()) + except StopIteration: + log.debug("Removing %s", self.start_menu_location) + shutil.rmtree(self.start_menu_location, ignore_errors=True) + return (self.start_menu_location,) + return tuple() + + @property + def start_menu_location(self) -> Path: + """ + On Windows we can create shortcuts in several places: + + - Start Menu + - Desktop + - Quick launch (only for user installs) + + In this property we only report the path to the Start menu. + For other menus, check their respective properties. + """ + return Path(windows_folder_path(self.mode, False, "start")) / self.render(self.name) + + @property + def quick_launch_location(self) -> Path: + if self.mode == "system": + # TODO: Check if this is true? + warnings.warn("Quick launch menus are not available for system level installs") + return + return Path(windows_folder_path(self.mode, False, "quicklaunch")) + + @property + def desktop_location(self) -> Path: + return Path(windows_folder_path(self.mode, False, "desktop")) + + @property + def terminal_profile_locations(self) -> list[Path]: + """Location of the Windows terminal profiles. + + The parent directory is used to check if Terminal is installed + because the settings file is generated when Terminal is opened, + not when it is installed. + """ + if self.mode == "system": + log.warning("Terminal profiles are not available for system level installs") + return [] + return windows_terminal_settings_files(self.mode) + + @property + def placeholders(self) -> dict[str, str]: + placeholders = super().placeholders + placeholders.update( + { + "SCRIPTS_DIR": str(self.prefix / "Scripts"), + "PYTHON": str(self.prefix / "python.exe"), + "PYTHONW": str(self.prefix / "pythonw.exe"), + "BASE_PYTHON": str(self.base_prefix / "python.exe"), + "BASE_PYTHONW": str(self.base_prefix / "pythonw.exe"), + "BIN_DIR": str(self.prefix / "Library" / "bin"), + "SP_DIR": str(self._site_packages()), + "ICON_EXT": "ico", + } + ) + return placeholders + + def _conda_exe_path_candidates(self) -> tuple[Path]: + return ( + self.base_prefix / "_conda.exe", + Path(os.environ.get("CONDA_EXE", r"C:\oops\a_file_that_does_not_exist")), + self.base_prefix / "condabin" / "conda.bat", + self.base_prefix / "bin" / "conda.bat", + Path(os.environ.get("MAMBA_EXE", r"C:\oops\a_file_that_does_not_exist")), + self.base_prefix / "condabin" / "micromamba.exe", + self.base_prefix / "bin" / "micromamba.exe", + ) + + def render(self, value: Any, slug: bool = False, extra: dict[str, str] | None = None) -> Any: + """ + We extend the render method here to replace forward slashes with backslashes. + We ONLY do it if the string does not start with /, because it might + be just a windows-style command-line flag (e.g. cmd /K something). + + This will not escape strings such as `/flag:something`, common + in compiler stuff but we can assume such windows specific + constructs will have their platform override, which is always an option. + + This is just a convenience for things like icon paths or Unix-like paths + in the command key. + """ + value = super().render(value, slug=slug, extra=extra) + if hasattr(value, "replace") and "/" in value and value[0] != "/": + value = value.replace("/", "\\") + return value + + def _site_packages(self, prefix: Path | None = None) -> Path: + if prefix is None: + prefix = self.prefix + return self.prefix / "Lib" / "site-packages" + + def _paths(self) -> tuple[Path]: + return (self.start_menu_location,) + + +class WindowsMenuItem(MenuItem): + @property + def location(self) -> Path: + """ + Path to the .lnk file placed in the Start Menu + On Windows, menuinst can create up to three shortcuts (start menu, desktop, quick launch) + This property only lists the one for start menu + """ + return self.menu.start_menu_location / self._shortcut_filename() + + def create(self) -> tuple[Path, ...]: + from .win_utils.winshortcut import create_shortcut + + self._precreate() + paths = self._paths() + + for path in paths: + if not path.suffix == ".lnk": + continue + + target_path, *arguments = self._process_command() + working_dir = self.render_key("working_dir") + if working_dir: + Path(os.path.expandvars(working_dir)).mkdir(parents=True, exist_ok=True) + # There are two possible interpretations of HOME on Windows: + # `%USERPROFILE%` and `%HOMEDRIVE%%HOMEPATH%`. + # Follow os.path.expanduser logic here, but keep the variables + # so that Windows can resolve them at runtime in case the drives change. + elif "USERPROFILE" in os.environ: + working_dir = "%USERPROFILE%" + else: + working_dir = "%HOMEDRIVE%%HOMEPATH%" + + icon = self.render_key("icon") or "" + + # winshortcut is a windows-only C extension! create_shortcut has this API + # Notice args must be passed as positional, no keywords allowed! + # winshortcut.create_shortcut(path, description, filename, arguments="", + # workdir=None, iconpath=None, iconindex=0, app_id="") + if Path(path).exists(): + log.warning("Overwriting existing link at %s.", path) + create_shortcut( + target_path, + self._shortcut_filename(ext=""), + str(path), + " ".join(arguments), + working_dir, + icon, + 0, + self._app_user_model_id(), + ) + + for location in self.menu.terminal_profile_locations: + self._add_remove_windows_terminal_profile(location, remove=False) + changed_extensions = self._register_file_extensions() + changed_protocols = self._register_url_protocols() + if changed_extensions or changed_protocols: + notify_shell_changes() + + return paths + + def remove(self) -> tuple[Path, ...]: + changed_extensions = self._unregister_file_extensions() + changed_protocols = self._unregister_url_protocols() + if changed_extensions or changed_protocols: + notify_shell_changes() + + for location in self.menu.terminal_profile_locations: + self._add_remove_windows_terminal_profile(location, remove=True) + + paths = tuple(path for path in self._paths() if Path(path).is_file()) + for path in paths: + log.debug("Removing %s", path) + unlink(path) + + return paths + + def _paths(self) -> tuple[Path, ...]: + paths = [self.location] + extra_dirs = [] + if self.metadata["desktop"]: + extra_dirs.append(self.menu.desktop_location) + if self.metadata["quicklaunch"] and self.menu.quick_launch_location: + warnings.warn("Quick launch menus are deprecated.") + extra_dirs.append(self.menu.quick_launch_location) + + if extra_dirs: + paths += [directory / self._shortcut_filename() for directory in extra_dirs] + + if self.metadata["activate"]: + # This is the accessory launcher script for cmd + paths.append(self._path_for_script()) + + return tuple(paths) + + def _shortcut_filename(self, ext: str = "lnk"): + ext = f".{ext}" if ext else "" + return f"{self.render_key('name', extra={})}{ext}" + + def _path_for_script(self) -> Path: + return Path(self.menu.placeholders["MENU_DIR"]) / self._shortcut_filename("bat") + + def _precreate(self): + precreate_code = self.render_key("precreate") + if not precreate_code: + return + with NamedTemporaryFile(delete=False, mode="w") as tmp: + tmp.write(precreate_code) + system32 = Path(os.environ.get("SystemRoot", "C:\\Windows")) / "system32" + cmd = [ + str(system32 / "WindowsPowerShell" / "v1.0" / "powershell.exe"), + f"\"start '{tmp.name}' -WindowStyle hidden\"", + ] + logged_run(cmd, check=True) + os.unlink(tmp.name) + + def _command(self) -> str: + lines = [ + "@ECHO OFF", + ":: Script generated by conda/menuinst", + ] + precommand = self.render_key("precommand") + if precommand: + lines.append(precommand) + if self.metadata["activate"]: + if self.menu._is_micromamba(self.menu.conda_exe): + activator = f'{self.menu.conda_exe} shell activate "{self.menu.prefix}"' + activation_lines = [ + f'@FOR /F "usebackq tokens=*" %%i IN (`{activator}`) do set "ACTIVATOR=%%i"', + "@CALL %ACTIVATOR%", + ] + else: + # conda >= 25.3.0 does not use .bat files to activate environments anymore. + # Instead, it produces .env files that are consumed inside + # conda/shell/condabin/_conda_activate.bat. There is no direct activator for this + # filetype, so menuinst has to parse the file and add the activator to the + # activation script directly. + activator_cmd = [ + str(self.menu.conda_exe), + "shell.cmd.exe", + "activate", + str(self.menu.prefix), + ] + activator_run = logged_run(activator_cmd, check=True, log=False) + activation_file = Path(activator_run.stdout.strip()) + filetype = activation_file.suffix + if filetype == ".bat": + activator = ( + f'{self.menu.conda_exe} shell.cmd.exe activate "{self.menu.prefix}"' + ) + activation_lines = [ + f'@FOR /F "usebackq tokens=*" %%i IN (`{activator}`) do set "ACTIVATOR=%%i"', # noqa + "@CALL %ACTIVATOR%", + ] + elif filetype == ".env": + activation_lines = [] + for line in activation_file.read_text().splitlines(): + keyword, value = line.strip().split("=", 1) + if keyword == "_CONDA_SCRIPT": + activation_lines.append(f"@CALL {value}") + else: + activation_lines.append(f'@SET "{keyword}={value}"') + else: + raise NotImplementedError( + f"Menuinst cannot parse activation scripts of type '{filetype}': '{activation_file}'" # noqa + ) + activation_file.unlink() + lines += [ + "@SETLOCAL ENABLEDELAYEDEXPANSION", + *activation_lines, + ":: This below is the user command", + ] + + lines.append(" ".join(WinLex.quote_args(self.render_key("command")))) + + return "\r\n".join(lines) + + def _write_script(self, script_path: os.PathLike | None = None) -> Path: + """ + This method generates the batch script that will be called by the shortcut + """ + if script_path is None: + script_path = self._path_for_script() + else: + script_path = Path(script_path) + + script_path.parent.mkdir(parents=True, exist_ok=True) + with open(script_path, "w") as f: + f.write(self._command()) + + return script_path + + def _process_command(self, with_arg1: bool = False) -> tuple[str]: + if self.metadata["activate"]: + script = self._write_script() + if self.metadata["terminal"]: + command = ["cmd", "/D", "/K", f'"{script}"'] + if with_arg1: + command.append("%1") + else: + system32 = Path(os.environ.get("SystemRoot", "C:\\Windows")) / "system32" + arg1 = "%1 " if with_arg1 else "" + # This is an UGLY hack to start the script in a hidden window + # We use CMD to call PowerShell to call the BAT file + # This flashes faster than Powershell -> BAT! Don't ask me why. + command = [ + f'"{system32 / "cmd.exe"}"', + "/D", + "/C", + "START", + "/MIN", + '""', + f'"{system32 / "WindowsPowerShell" / "v1.0" / "powershell.exe"}"', + "-WindowStyle", + "hidden", + f"\"start '{script}' {arg1}-WindowStyle hidden\"", + ] + return command + + command = self.render_key("command") + if with_arg1 and all("%1" not in arg for arg in command): + command.append("%1") + return WinLex.quote_args(command) + + def _add_remove_windows_terminal_profile(self, location: Path, remove: bool = False): + """Add/remove the Windows Terminal profile. + + Windows Terminal is using the name of the profile to create a GUID, + so the name will be used as the unique identifier to find existing profiles. + + If the Terminal app has never been opened, the settings file may not exist yet. + Writing a minimal profile file will not break the application - Terminal will + automatically generate the missing options and profiles without overwriting + the profiles menuinst has created. + """ + if not self.metadata.get("terminal_profile") or not location.parent.exists(): + return + name = self.render_key("terminal_profile") + + settings = json.loads(location.read_text()) if location.exists() else {} + + index = -1 + for p, profile in enumerate(settings.get("profiles", {}).get("list", [])): + if profile.get("name") == name: + index = p + break + + if remove: + if index < 0: + return + del settings["profiles"]["list"][index] + else: + profile_data = { + "commandline": " ".join(WinLex.quote_args(self.render_key("command"))), + "name": name, + } + if self.metadata.get("icon"): + profile_data["icon"] = self.render_key("icon") + if self.metadata.get("working_dir"): + profile_data["startingDirectory"] = self.render_key("working_dir") + if index < 0: + if "profiles" not in settings: + settings["profiles"] = {} + if "list" not in settings["profiles"]: + settings["profiles"]["list"] = [] + settings["profiles"]["list"].append(profile_data) + else: + log.warning(f"Overwriting terminal profile for {name}.") + settings["profiles"]["list"][index] = profile_data + location.write_text(json.dumps(settings, indent=4)) + + def _ftype_identifier(self, extension): + identifier = self.render_key("name", slug=True) + return f"{identifier}.AssocFile{extension}" + + def _register_file_extensions_cmd(self): + """ + This function uses CMD's `assoc` and `ftype` commands. + """ + extensions = self.metadata["file_extensions"] + if not extensions: + return + command = " ".join(self._process_command()) + exts = list(dict.fromkeys([ext.lower() for ext in extensions])) + for ext in exts: + identifier = self._ftype_identifier(ext) + self._cmd_ftype(identifier, command) + self._cmd_assoc(ext, associate_to=identifier) + + def _unregister_file_extensions_cmd(self): + """ + This function uses CMD's `assoc` and `ftype` commands. + """ + extensions = self.metadata["file_extensions"] + if not extensions: + return + exts = list(dict.fromkeys([ext.lower() for ext in extensions])) + for ext in exts: + identifier = self._ftype_identifier(ext) + self._cmd_ftype(identifier) # remove + # TODO: Do we need to clean up the `assoc` mappings too? + + @staticmethod + def _cmd_assoc( + extension: str, associate_to: str | None = None, query: bool = False, remove: bool = False + ) -> CompletedProcess: + "https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/assoc" + if sum([associate_to, query, remove]) != 1: + raise ValueError("Only one of {associate_to, query, remove} must be set.") + if not extension.startswith("."): + raise ValueError("extension must startwith '.'") + if associate_to: + arg = f"{extension}={associate_to}" + elif query: + arg = extension + elif remove: + arg = f"{extension}=" + return logged_run(["cmd", "/D", "/C", f"assoc {arg}"], check=True) + + @staticmethod + def _cmd_ftype( + identifier, command: str | None = None, query: bool = False, remove: bool = False + ) -> CompletedProcess: + "https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/ftype" + if sum([command, query, remove]) != 1: + raise ValueError("Only one of {command, query, remove} must be set.") + if command: + arg = f"{identifier}={command}" + elif query: + arg = identifier + elif remove: + arg = f"{identifier}=" + return logged_run(["cmd", "/D", "/C", f"assoc {arg}"], check=True) + + def _register_file_extensions(self) -> bool: + """WIP""" + extensions = self.metadata["file_extensions"] + if not extensions: + return False + + command = " ".join(self._process_command(with_arg1=True)) + icon = self.render_key("icon") + exts = list(dict.fromkeys([ext.lower() for ext in extensions])) + for ext in exts: + identifier = self._ftype_identifier(ext) + register_file_extension( + ext, + identifier, + command, + icon=icon, + app_name=self.render_key("name"), + app_user_model_id=self._app_user_model_id(), + mode=self.menu.mode, + ) + return True + + def _unregister_file_extensions(self) -> bool: + extensions = self.metadata["file_extensions"] + if not extensions: + return False + + exts = list(dict.fromkeys([ext.lower() for ext in extensions])) + for ext in exts: + identifier = self._ftype_identifier(ext) + unregister_file_extension(ext, identifier, mode=self.menu.mode) + return True + + def _register_url_protocols(self) -> bool: + "See https://learn.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/platform-apis/aa767914(v=vs.85)" # noqa + protocols = self.metadata["url_protocols"] + if not protocols: + return False + command = " ".join(self._process_command(with_arg1=True)) + icon = self.render_key("icon") + for protocol in protocols: + identifier = self._ftype_identifier(protocol) + register_url_protocol( + protocol, + command, + identifier, + icon=icon, + app_name=self.render_key("name"), + app_user_model_id=self._app_user_model_id(), + mode=self.menu.mode, + ) + return True + + def _unregister_url_protocols(self) -> bool: + protocols = self.metadata["url_protocols"] + if not protocols: + return False + for protocol in protocols: + identifier = self._ftype_identifier(protocol) + unregister_url_protocol(protocol, identifier, mode=self.menu.mode) + return True + + def _app_user_model_id(self): + aumi = self.render_key("app_user_model_id") + if not aumi: + return f"Menuinst.{self.render_key('name', slug=True).replace('.', '')}"[:128] + return aumi diff --git a/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst/platforms/win_utils/__init__.py b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst/platforms/win_utils/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst/platforms/win_utils/knownfolders.py b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst/platforms/win_utils/knownfolders.py new file mode 100644 index 0000000000000000000000000000000000000000..992f24bbb7d0a1e209ce29a757894451e3512e79 --- /dev/null +++ b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst/platforms/win_utils/knownfolders.py @@ -0,0 +1,349 @@ +""" +This code obtained from +https://gist.github.com/mkropat/7550097 + +The MIT License (MIT) + +Copyright (c) 2014 Michael Kropat + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. +""" + +from __future__ import annotations + +import ctypes +import os +from ctypes import windll, wintypes +from logging import getLogger +from pathlib import Path +from typing import List +from uuid import UUID + +logger = getLogger(__name__) + + +class GUID(ctypes.Structure): # [1] + _fields_ = [ + ("Data1", wintypes.DWORD), + ("Data2", wintypes.WORD), + ("Data3", wintypes.WORD), + ("Data4", wintypes.BYTE * 8), + ] + + def __init__(self, uuid_): + ctypes.Structure.__init__(self) + self.Data1, self.Data2, self.Data3, self.Data4[0], self.Data4[1], rest = uuid_.fields + for i in range(2, 8): + self.Data4[i] = rest >> (8 - i - 1) * 8 & 0xFF + + +class FOLDERID: # [2] + AccountPictures = UUID("{008ca0b1-55b4-4c56-b8a8-4de4b299d3be}") + AdminTools = UUID("{724EF170-A42D-4FEF-9F26-B60E846FBA4F}") + ApplicationShortcuts = UUID("{A3918781-E5F2-4890-B3D9-A7E54332328C}") + CameraRoll = UUID("{AB5FB87B-7CE2-4F83-915D-550846C9537B}") + CDBurning = UUID("{9E52AB10-F80D-49DF-ACB8-4330F5687855}") + CommonAdminTools = UUID("{D0384E7D-BAC3-4797-8F14-CBA229B392B5}") + CommonOEMLinks = UUID("{C1BAE2D0-10DF-4334-BEDD-7AA20B227A9D}") + CommonPrograms = UUID("{0139D44E-6AFE-49F2-8690-3DAFCAE6FFB8}") + CommonStartMenu = UUID("{A4115719-D62E-491D-AA7C-E74B8BE3B067}") + CommonStartup = UUID("{82A5EA35-D9CD-47C5-9629-E15D2F714E6E}") + CommonTemplates = UUID("{B94237E7-57AC-4347-9151-B08C6C32D1F7}") + Contacts = UUID("{56784854-C6CB-462b-8169-88E350ACB882}") + Cookies = UUID("{2B0F765D-C0E9-4171-908E-08A611B84FF6}") + Desktop = UUID("{B4BFCC3A-DB2C-424C-B029-7FE99A87C641}") + DeviceMetadataStore = UUID("{5CE4A5E9-E4EB-479D-B89F-130C02886155}") + Documents = UUID("{FDD39AD0-238F-46AF-ADB4-6C85480369C7}") + DocumentsLibrary = UUID("{7B0DB17D-9CD2-4A93-9733-46CC89022E7C}") + Downloads = UUID("{374DE290-123F-4565-9164-39C4925E467B}") + Favorites = UUID("{1777F761-68AD-4D8A-87BD-30B759FA33DD}") + Fonts = UUID("{FD228CB7-AE11-4AE3-864C-16F3910AB8FE}") + GameTasks = UUID("{054FAE61-4DD8-4787-80B6-090220C4B700}") + History = UUID("{D9DC8A3B-B784-432E-A781-5A1130A75963}") + ImplicitAppShortcuts = UUID("{BCB5256F-79F6-4CEE-B725-DC34E402FD46}") + InternetCache = UUID("{352481E8-33BE-4251-BA85-6007CAEDCF9D}") + Libraries = UUID("{1B3EA5DC-B587-4786-B4EF-BD1DC332AEAE}") + Links = UUID("{bfb9d5e0-c6a9-404c-b2b2-ae6db6af4968}") + LocalAppData = UUID("{F1B32785-6FBA-4FCF-9D55-7B8E7F157091}") + LocalAppDataLow = UUID("{A520A1A4-1780-4FF6-BD18-167343C5AF16}") + LocalizedResourcesDir = UUID("{2A00375E-224C-49DE-B8D1-440DF7EF3DDC}") + Music = UUID("{4BD8D571-6D19-48D3-BE97-422220080E43}") + MusicLibrary = UUID("{2112AB0A-C86A-4FFE-A368-0DE96E47012E}") + NetHood = UUID("{C5ABBF53-E17F-4121-8900-86626FC2C973}") + OriginalImages = UUID("{2C36C0AA-5812-4b87-BFD0-4CD0DFB19B39}") + PhotoAlbums = UUID("{69D2CF90-FC33-4FB7-9A0C-EBB0F0FCB43C}") + PicturesLibrary = UUID("{A990AE9F-A03B-4E80-94BC-9912D7504104}") + Pictures = UUID("{33E28130-4E1E-4676-835A-98395C3BC3BB}") + Playlists = UUID("{DE92C1C7-837F-4F69-A3BB-86E631204A23}") + PrintHood = UUID("{9274BD8D-CFD1-41C3-B35E-B13F55A758F4}") + Profile = UUID("{5E6C858F-0E22-4760-9AFE-EA3317B67173}") + ProgramData = UUID("{62AB5D82-FDC1-4DC3-A9DD-070D1D495D97}") + ProgramFiles = UUID("{905e63b6-c1bf-494e-b29c-65b732d3d21a}") + ProgramFilesX64 = UUID("{6D809377-6AF0-444b-8957-A3773F02200E}") + ProgramFilesX86 = UUID("{7C5A40EF-A0FB-4BFC-874A-C0F2E0B9FA8E}") + ProgramFilesCommon = UUID("{F7F1ED05-9F6D-47A2-AAAE-29D317C6F066}") + ProgramFilesCommonX64 = UUID("{6365D5A7-0F0D-45E5-87F6-0DA56B6A4F7D}") + ProgramFilesCommonX86 = UUID("{DE974D24-D9C6-4D3E-BF91-F4455120B917}") + Programs = UUID("{A77F5D77-2E2B-44C3-A6A2-ABA601054A51}") + Public = UUID("{DFDF76A2-C82A-4D63-906A-5644AC457385}") + PublicDesktop = UUID("{C4AA340D-F20F-4863-AFEF-F87EF2E6BA25}") + PublicDocuments = UUID("{ED4824AF-DCE4-45A8-81E2-FC7965083634}") + PublicDownloads = UUID("{3D644C9B-1FB8-4f30-9B45-F670235F79C0}") + PublicGameTasks = UUID("{DEBF2536-E1A8-4c59-B6A2-414586476AEA}") + PublicLibraries = UUID("{48DAF80B-E6CF-4F4E-B800-0E69D84EE384}") + PublicMusic = UUID("{3214FAB5-9757-4298-BB61-92A9DEAA44FF}") + PublicPictures = UUID("{B6EBFB86-6907-413C-9AF7-4FC2ABF07CC5}") + PublicRingtones = UUID("{E555AB60-153B-4D17-9F04-A5FE99FC15EC}") + PublicUserTiles = UUID("{0482af6c-08f1-4c34-8c90-e17ec98b1e17}") + PublicVideos = UUID("{2400183A-6185-49FB-A2D8-4A392A602BA3}") + QuickLaunch = UUID("{52a4f021-7b75-48a9-9f6b-4b87a210bc8f}") + Recent = UUID("{AE50C081-EBD2-438A-8655-8A092E34987A}") + RecordedTVLibrary = UUID("{1A6FDBA2-F42D-4358-A798-B74D745926C5}") + ResourceDir = UUID("{8AD10C31-2ADB-4296-A8F7-E4701232C972}") + Ringtones = UUID("{C870044B-F49E-4126-A9C3-B52A1FF411E8}") + RoamingAppData = UUID("{3EB685DB-65F9-4CF6-A03A-E3EF65729F3D}") + RoamedTileImages = UUID("{AAA8D5A5-F1D6-4259-BAA8-78E7EF60835E}") + RoamingTiles = UUID("{00BCFC5A-ED94-4e48-96A1-3F6217F21990}") + SampleMusic = UUID("{B250C668-F57D-4EE1-A63C-290EE7D1AA1F}") + SamplePictures = UUID("{C4900540-2379-4C75-844B-64E6FAF8716B}") + SamplePlaylists = UUID("{15CA69B3-30EE-49C1-ACE1-6B5EC372AFB5}") + SampleVideos = UUID("{859EAD94-2E85-48AD-A71A-0969CB56A6CD}") + SavedGames = UUID("{4C5C32FF-BB9D-43b0-B5B4-2D72E54EAAA4}") + SavedSearches = UUID("{7d1d3a04-debb-4115-95cf-2f29da2920da}") + Screenshots = UUID("{b7bede81-df94-4682-a7d8-57a52620b86f}") + SearchHistory = UUID("{0D4C3DB6-03A3-462F-A0E6-08924C41B5D4}") + SearchTemplates = UUID("{7E636BFE-DFA9-4D5E-B456-D7B39851D8A9}") + SendTo = UUID("{8983036C-27C0-404B-8F08-102D10DCFD74}") + SidebarDefaultParts = UUID("{7B396E54-9EC5-4300-BE0A-2482EBAE1A26}") + SidebarParts = UUID("{A75D362E-50FC-4fb7-AC2C-A8BEAA314493}") + SkyDrive = UUID("{A52BBA46-E9E1-435f-B3D9-28DAA648C0F6}") + SkyDriveCameraRoll = UUID("{767E6811-49CB-4273-87C2-20F355E1085B}") + SkyDriveDocuments = UUID("{24D89E24-2F19-4534-9DDE-6A6671FBB8FE}") + SkyDrivePictures = UUID("{339719B5-8C47-4894-94C2-D8F77ADD44A6}") + StartMenu = UUID("{625B53C3-AB48-4EC1-BA1F-A1EF4146FC19}") + Startup = UUID("{B97D20BB-F46A-4C97-BA10-5E3608430854}") + System = UUID("{1AC14E77-02E7-4E5D-B744-2EB1AE5198B7}") + SystemX86 = UUID("{D65231B0-B2F1-4857-A4CE-A8E7C6EA7D27}") + Templates = UUID("{A63293E8-664E-48DB-A079-DF759E0509F7}") + UserPinned = UUID("{9E3995AB-1F9C-4F13-B827-48B24B6C7174}") + UserProfiles = UUID("{0762D272-C50A-4BB0-A382-697DCD729B80}") + UserProgramFiles = UUID("{5CD7AEE2-2219-4A67-B85D-6C9CE15660CB}") + UserProgramFilesCommon = UUID("{BCBD3057-CA5C-4622-B42D-BC56DB0AE516}") + Videos = UUID("{18989B1D-99B5-455B-841C-AB7C74E4DDFC}") + VideosLibrary = UUID("{491E922F-5643-4AF4-A7EB-4E7A138D8174}") + Windows = UUID("{F38BF404-1D43-42F2-9305-67DE0B28FC23}") + + +class UserHandle: # [3] + current = wintypes.HANDLE(0) + common = wintypes.HANDLE(-1) + + +_CoTaskMemFree = windll.ole32.CoTaskMemFree # [4] +_CoTaskMemFree.restype = None +_CoTaskMemFree.argtypes = [ctypes.c_void_p] + +_SHGetKnownFolderPath = windll.shell32.SHGetKnownFolderPath # [5] [3] +_SHGetKnownFolderPath.argtypes = [ + ctypes.POINTER(GUID), + wintypes.DWORD, + wintypes.HANDLE, + ctypes.POINTER(ctypes.c_wchar_p), +] + +""" +# Please keep this code around in-case we need to debug tricky installations +# http://stackoverflow.com/a/15016751/3257826 - needs pywin32 +import pythoncom +from win32com.shell import shell, shellcon +from win32com import storagecon +import os +kfm = pythoncom.CoCreateInstance(shell.CLSID_KnownFolderManager, None, + pythoncom.CLSCTX_INPROC_SERVER, shell.IID_IKnownFolderManager) +dir(kfm) +folders = kfm.GetFolderIds() +for folder in folders: + print(folder) +try: + docs_folder = kfm.GetFolder(shell.FOLDERID_Documents) + docs_path = docs_folder.GetPath() + print(docs_path) +except: + pass +""" + + +class PathNotFoundException(Exception): + pass + + +class PathNotVerifiableException(Exception): + pass + + +def get_path(folderid, user_handle=UserHandle.common): + fid = GUID(folderid) + pPath = ctypes.c_wchar_p() + pPathUnverified = ctypes.c_wchar_p() + S_OK = 0 + KF_FLAG_DONT_VERIFY = 0x00004000 + result = _SHGetKnownFolderPath( + ctypes.byref(fid), KF_FLAG_DONT_VERIFY, user_handle, ctypes.byref(pPathUnverified) + ) + exception = None + if result != S_OK: + exception = PathNotFoundException() + else: + result = _SHGetKnownFolderPath(ctypes.byref(fid), 0, user_handle, ctypes.byref(pPath)) + if result != S_OK: + exception = PathNotVerifiableException() + pPath = pPathUnverified + else: + _CoTaskMemFree(pPathUnverified) + + path = pPath.value + _CoTaskMemFree(pPath) + return (path, exception) + + +def get_folder_path(folder_id, user=None): + if not user: + user = UserHandle.current + # We may want to support modifying the 'Default' user here too for SCCM-based installations. + # New users created on the machine have their folders created by copying those of 'Default'. + return get_path(folder_id, user) + + +# [1] http://msdn.microsoft.com/en-us/library/windows/desktop/aa373931.aspx +# [2] http://msdn.microsoft.com/en-us/library/windows/desktop/dd378457.aspx +# [3] http://msdn.microsoft.com/en-us/library/windows/desktop/bb762188.aspx +# [4] http://msdn.microsoft.com/en-us/library/windows/desktop/ms680722.aspx +# [5] http://www.themacaque.com/?p=954 + +# jaimergp: The code below was copied from menuinst.win32, 1.4.19 +# module: menuinst/win32.py - +# https://github.com/conda/menuinst/blob/e17afafd/menuinst/win32.py#L40-L102 +# ---- +# When running as 'nt authority/system' as sometimes people do via SCCM, +# various folders do not exist, such as QuickLaunch. This doesn't matter +# as we'll use the "system" key finally and check for the "quicklaunch" +# subkey before adding any Quick Launch menu items. + +# It can happen that some of the dirs[] entires refer to folders that do not +# exist, in which case, the 2nd entry of the value tuple is a sub-class of +# Exception. + +dirs_src = { + "system": { + "desktop": get_folder_path(FOLDERID.PublicDesktop), + "start": get_folder_path(FOLDERID.CommonPrograms), + "documents": get_folder_path(FOLDERID.PublicDocuments), + "profile": get_folder_path(FOLDERID.Profile), + }, + "user": { + "desktop": get_folder_path(FOLDERID.Desktop), + "start": get_folder_path(FOLDERID.Programs), + "quicklaunch": get_folder_path(FOLDERID.QuickLaunch), + "documents": get_folder_path(FOLDERID.Documents), + "profile": get_folder_path(FOLDERID.Profile), + "localappdata": get_folder_path(FOLDERID.LocalAppData), + }, +} + + +def folder_path(preferred_mode, check_other_mode, key) -> str | None: + """This function implements all heuristics and workarounds for messed up + KNOWNFOLDERID registry values. It's also verbose (OutputDebugStringW) + about whether fallbacks worked or whether they would have worked if + check_other_mode had been allowed. + """ + other_mode = "system" if preferred_mode == "user" else "user" + path, exception = dirs_src[preferred_mode][key] + if not exception: + return path + logger.info( + "WARNING: menuinst key: '%s'\n" + " path: '%s'\n" + " .. excepted with: '%s' in knownfolders.py, implementing workarounds .." + % (key, path, type(exception).__name__) + ) + # Since I have seen 'user', 'documents' set as '\\vmware-host\Shared Folders\Documents' + # when there's no such server, we check 'user', 'profile' + '\Documents' before maybe + # trying the other_mode (though I have chickened out on that idea). + if preferred_mode == "user" and key == "documents": + user_profile, exception = dirs_src["user"]["profile"] + if not exception: + path = os.path.join(user_profile, "Documents") + if os.access(path, os.W_OK): + logger.info(" .. worked-around to: '%s'" % (path)) + return path + path, exception = dirs_src[other_mode][key] + # Do not fall back to something we cannot write to. + if exception: + if check_other_mode: + logger.info( + " .. despite 'check_other_mode'\n" + " and 'other_mode' 'path' of '%s'\n" + " it excepted with: '%s' in knownfolders.py" + % (path, type(exception).__name__) + ) + else: + logger.info( + " .. 'check_other_mode' is False,\n" + " and 'other_mode' 'path' is '%s'\n" + " but it excepted anyway with: '%s' in knownfolders.py" + % (path, type(exception).__name__) + ) + return None + if not check_other_mode: + logger.info( + " .. due to lack of 'check_other_mode' not picking\n" + " non-excepting path of '%s'\n in knownfolders.py" % (path) + ) + return None + return path + + +def windows_terminal_settings_files(mode: str) -> List[Path]: + """Return all possible locations of the settings.json files for the Windows Terminal. + + See the Microsoft documentation for details: + https://learn.microsoft.com/en-us/windows/terminal/install#settings-json-file + """ + if mode != "user": + return [] + localappdata = folder_path(mode, False, "localappdata") + packages = Path(localappdata) / "Packages" + profile_locations = [ + # Stable + *[ + Path(terminal, "LocalState", "settings.json") + for terminal in packages.glob("Microsoft.WindowsTerminal_*") + ], + # Preview + *[ + Path(terminal, "LocalState", "settings.json") + for terminal in packages.glob("Microsoft.WindowsTerminalPreview_*") + ], + ] + # Unpackaged (Scoop, Chocolatey, etc.) + unpackaged_path = Path(localappdata, "Microsoft", "Windows Terminal", "settings.json") + if unpackaged_path.parent.exists(): + profile_locations.append(unpackaged_path) + return profile_locations diff --git a/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst/platforms/win_utils/registry.py b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst/platforms/win_utils/registry.py new file mode 100644 index 0000000000000000000000000000000000000000..12858097531cb27d01def47ce97e48ee83c74591 --- /dev/null +++ b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst/platforms/win_utils/registry.py @@ -0,0 +1,215 @@ +r""" +Utilities for Windows Registry manipulation + +Notes: + +winreg.SetValue -> sets _keys_ with default ("") values +winreg.SetValueEx -> sets values with named contents + +This is important when the argument has backslashes. +SetValue will process the backslashes into a path of keys +SetValueEx will create a value with name "path\with\keys" + + +Mnemonic: SetValueEx for "excalars" (scalars, named values) +""" + +import ctypes +import winreg +from logging import getLogger + +from ...utils import logged_run + +log = getLogger(__name__) + + +def _reg_exe(*args, check=True): + return logged_run(["reg.exe", *args, "/f"], check=check) + + +def register_file_extension( + extension, + identifier, + command, + icon=None, + app_name=None, + friendly_type_name=None, + app_user_model_id=None, + mode="user", +): + """ + We want to achieve this. Entries ending in / denote keys; no trailing / means named value. + If the item has a value attached to it, it's written after the : symbol. + + HKEY_*/ # current user or local machine + Software/ + Classes/ + ./ + OpenWithProgids/ + + ... + /: "a description of the file being handled" + DefaultIcon/: "path to the app icon" + FriendlyAppName/: "Name of the program" + AppUserModelID: "AUMI string" + shell/ + open/: "Name of the program" + icon: "path to the app icon" + FriendlyAppName: "name of the program" + command/: "the command to be executed when opening a file with this extension" + """ + if mode == "system": + key = "HKEY_LOCAL_MACHINE/Software/Classes" # HKLM + else: + key = "HKEY_CURRENT_USER/Software/Classes" # HKCU + + # First we associate an extension with a handler (presence of key is enough) + regvalue(f"{key}/{extension}/OpenWithProgids/{identifier}", "") + + # Now we register the handler + regvalue(f"{key}/{identifier}/@", f"{extension} {identifier} file") + + # Set the 'open' command + regvalue(f"{key}/{identifier}/shell/open/command/@", command) + if app_name: + regvalue(f"{key}/{identifier}/shell/open/@", app_name) + regvalue(f"{key}/{identifier}/FriendlyAppName/@", app_name) + regvalue(f"{key}/{identifier}/shell/open/FriendlyAppName", app_name) + + if app_user_model_id: + regvalue(f"{key}/{identifier}/AppUserModelID", app_user_model_id) + + if icon: + # NOTE: This doesn't change the icon next in the Open With menu + # This defaults to whatever the command executable is shipping + regvalue(f"{key}/{identifier}/DefaultIcon/@", icon) + regvalue(f"{key}/{identifier}/shell/open/Icon", icon) + + if friendly_type_name: + # NOTE: Windows <10 requires the string in a PE file, but that's too + # much work. We can just put the raw string here even if the docs say + # otherwise. + regvalue(f"{key}/{identifier}/FriendlyTypeName", friendly_type_name) + + # TODO: We can add contextual menu items too + # via f"{handler_key}\shell\\command" + + +def unregister_file_extension(extension, identifier, mode="user"): + root, root_str = ( + (winreg.HKEY_LOCAL_MACHINE, "HKLM") + if mode == "system" + else (winreg.HKEY_CURRENT_USER, "HKCU") + ) + _reg_exe("delete", rf"{root_str}\Software\Classes\{identifier}", check=False) + + try: + with winreg.OpenKey( + root, rf"Software\Classes\{extension}\OpenWithProgids", 0, winreg.KEY_ALL_ACCESS + ) as key: + winreg.DeleteValue(key, identifier) + except FileNotFoundError: + log.debug("Handler '%s' is not associated with extension '%s'", identifier, extension) + except Exception as exc: + log.debug("Could not check key '%s' for deletion", extension, exc_info=exc) + return False + + +def register_url_protocol( + protocol, + command, + identifier=None, + icon=None, + app_name=None, + app_user_model_id=None, + mode="user", +): + if mode == "system": + key = f"HKEY_CLASSES_ROOT/{protocol}" + else: + key = f"HKEY_CURRENT_USER/Software/Classes/{protocol}" + regvalue(f"{key}/@", f"URL:{protocol.title()}") + regvalue(f"{key}/URL Protocol", "") + regvalue(f"{key}/shell/open/command/@", command) + if app_name: + regvalue(f"{key}/shell/open/@", app_name) + regvalue(f"{key}/FriendlyAppName/@", app_name) + regvalue(f"{key}/shell/open/FriendlyAppName", app_name) + if icon: + regvalue(f"{key}/DefaultIcon/@", icon) + regvalue(f"{key}/shell/open/Icon", icon) + if app_user_model_id: + regvalue(f"{key}/AppUserModelId", app_user_model_id) + if identifier: + # We add this one value for traceability; not required + regvalue(f"{key}/_menuinst", identifier) + + +def unregister_url_protocol(protocol, identifier=None, mode="user"): + if mode == "system": + key_tuple = winreg.HKEY_CLASSES_ROOT, protocol + key_str = rf"HKCR\{protocol}" + else: + key_tuple = winreg.HKEY_CURRENT_USER, rf"Software\Classes\{protocol}" + key_str = rf"HKCU\Software\Classes\{protocol}" + try: + with winreg.OpenKey(*key_tuple) as key: + value, _ = winreg.QueryValueEx(key, "_menuinst") + delete = identifier is None or value == identifier + except OSError as exc: + log.exception("Could not check key %s for deletion", protocol, exc_info=exc) + return + + if delete: + _reg_exe("delete", key_str, check=False) + + +def regvalue(key, value, value_type=winreg.REG_SZ, raise_on_errors=True): + """ + Convenience wrapper to set different types of registry values. + + For practical purposes we distinguish between three cases: + + - A key with no value (think of a directory with no contents). + Use value = "". + - A key with an unnamed value (think of a directory with a file 'index.html') + Use a key with '@' as the last component. + - A key with named values (think of non-index.html files in the directory) + + The first component of the key is the root, and must be one of the winreg.HKEY_* + variable _names_ (their actual value will be fetched from winreg). + + Key must be at least three components long (root key, *key, @ or named value). + """ + log.debug("Setting registry value %s = '%s'", key, value) + key = original_key = key.replace("\\", "/").strip("/") + root, *midkey, subkey, named_value = key.split("/") + rootkey = getattr(winreg, root) + access = winreg.KEY_SET_VALUE + try: + if named_value == "@": + if midkey: + winreg.CreateKey(rootkey, "\\".join(midkey)) # ensure it exists + with winreg.OpenKey(rootkey, "\\".join(midkey), access=access) as key: + winreg.SetValue(key, subkey, value_type, value) + else: + winreg.CreateKey(rootkey, "\\".join([*midkey, subkey])) # ensure it exists + with winreg.OpenKey(rootkey, "\\".join([*midkey, subkey]), access=access) as key: + winreg.SetValueEx(key, named_value, 0, value_type, value) + except OSError as exc: + if raise_on_errors: + raise + log.warning("Could not set %s to %s", original_key, value, exc_info=exc) + + +def notify_shell_changes(): + """ + Needed to propagate registry changes without having to reboot. + + https://discuss.python.org/t/is-there-a-library-to-change-windows-10-default-program-icon/5846/2 + """ + shell32 = ctypes.OleDLL("shell32") + shell32.SHChangeNotify.restype = None + event = 0x08000000 # SHCNE_ASSOCCHANGED + flags = 0x0000 # SHCNF_IDLIST + shell32.SHChangeNotify(event, flags, None, None) diff --git a/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst/platforms/win_utils/win_elevate.py b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst/platforms/win_utils/win_elevate.py new file mode 100644 index 0000000000000000000000000000000000000000..bda75b49109ad537d5f092ef17473512c67d01d1 --- /dev/null +++ b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst/platforms/win_utils/win_elevate.py @@ -0,0 +1,178 @@ +# -*- coding: utf-8; mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- +# vim: fileencoding=utf-8 tabstop=4 expandtab shiftwidth=4 +# +# Copied from http://stackoverflow.com/a/19719292/1170370 on 20160407 MCS +# +# (C) COPYRIGHT © Preston Landers 2010 +# Released under the same license as Python 2.6.5 + + +from __future__ import print_function + +import os +import sys +import traceback +from enum import IntEnum +from subprocess import list2cmdline + + +def isUserAdmin(): + if os.name != "nt": + raise RuntimeError("This function is only implemented on Windows.") + + import ctypes + + # Requires Windows XP SP2 or higher! + try: + return ctypes.windll.shell32.IsUserAnAdmin() + except: # noqa + traceback.print_exc() + print("Admin check failed, assuming not an admin.") + return False + + +# Taken from conda/common/_os/windows.py +if os.name == "nt": + + def ensure_binary(value): + try: + return value.encode("utf-8") + except AttributeError: # pragma: no cover + # AttributeError: '<>' object has no attribute 'encode' + # In this case assume already binary type and do nothing + return value + + from ctypes import ( + POINTER, + Structure, + WinError, + byref, + c_char_p, + c_int, + c_ulong, + c_void_p, + sizeof, + windll, + ) + from ctypes.wintypes import BOOL, DWORD, HANDLE, HINSTANCE, HKEY, HWND + + PHANDLE = POINTER(HANDLE) + PDWORD = POINTER(DWORD) + SEE_MASK_NOCLOSEPROCESS = 0x00000040 + INFINITE = -1 + + WaitForSingleObject = windll.kernel32.WaitForSingleObject + WaitForSingleObject.argtypes = (HANDLE, DWORD) + WaitForSingleObject.restype = DWORD + + GetExitCodeProcess = windll.kernel32.GetExitCodeProcess + GetExitCodeProcess.argtypes = (HANDLE, PDWORD) + GetExitCodeProcess.restype = BOOL + + class ShellExecuteInfo(Structure): + """ + https://docs.microsoft.com/en-us/windows/desktop/api/shellapi/nf-shellapi-shellexecuteexa + https://docs.microsoft.com/en-us/windows/desktop/api/shellapi/ns-shellapi-_shellexecuteinfoa + """ + + _fields_ = [ + ("cbSize", DWORD), + ("fMask", c_ulong), + ("hwnd", HWND), + ("lpVerb", c_char_p), + ("lpFile", c_char_p), + ("lpParameters", c_char_p), + ("lpDirectory", c_char_p), + ("nShow", c_int), + ("hInstApp", HINSTANCE), + ("lpIDList", c_void_p), + ("lpClass", c_char_p), + ("hKeyClass", HKEY), + ("dwHotKey", DWORD), + ("hIcon", HANDLE), + ("hProcess", HANDLE), + ] + + def __init__(self, **kwargs): + Structure.__init__(self) + self.cbSize = sizeof(self) + for field_name, field_value in kwargs.items(): + if isinstance(field_value, str): + field_value = ensure_binary(field_value) + setattr(self, field_name, field_value) + + PShellExecuteInfo = POINTER(ShellExecuteInfo) + ShellExecuteEx = windll.Shell32.ShellExecuteExA + ShellExecuteEx.argtypes = (PShellExecuteInfo,) + ShellExecuteEx.restype = BOOL + + +class SW(IntEnum): + HIDE = 0 + MAXIMIZE = 3 + MINIMIZE = 6 + RESTORE = 9 + SHOW = 5 + SHOWDEFAULT = 10 + SHOWMAXIMIZED = 3 + SHOWMINIMIZED = 2 + SHOWMINNOACTIVE = 7 + SHOWNA = 8 + SHOWNOACTIVATE = 4 + SHOWNORMAL = 1 + + +def runAsAdmin(cmdLine=None, wait=True): + if os.name != "nt": + raise RuntimeError("This function is only implemented on Windows.") + + python_exe = sys.executable + + if cmdLine is None: + cmdLine = [python_exe] + sys.argv + elif not hasattr(cmdLine, "__iter__") or isinstance(cmdLine, str): + raise ValueError("cmdLine is not a sequence.") + + cmd = '"%s"' % (cmdLine[0],) + params = list2cmdline(cmdLine[1:]) + showCmd = SW.HIDE + lpVerb = "runas" # causes UAC elevation prompt. + + # ShellExecute() doesn't seem to allow us to fetch the PID or handle + # of the process, so we can't get anything useful from it. Therefore + # the more complex ShellExecuteEx() must be used. + + # procHandle = win32api.ShellExecute(0, lpVerb, cmd, params, cmdDir, showCmd) + execute_info = ShellExecuteInfo( + nShow=showCmd, + fMask=SEE_MASK_NOCLOSEPROCESS, + lpVerb=lpVerb, + lpFile=cmd, + lpParameters=params, + hwnd=None, + lpDirectory=None, + ) + + successful = ShellExecuteEx(byref(execute_info)) + + if not successful: + raise WinError() + + if wait: + procHandle = execute_info.hProcess + WaitForSingleObject(procHandle, INFINITE) + err = DWORD() + GetExitCodeProcess(procHandle, byref(err)) + rc = err.value + else: + rc = None + + return rc + + +if __name__ == "__main__": + userIsAdmin = isUserAdmin() + with open("output.txt", "a") as f: + print("userIsAdmin = %d" % (userIsAdmin), file=f) + if not userIsAdmin: + runAsAdmin([sys.executable] + sys.argv, wait=True) diff --git a/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst/utils.py b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst/utils.py new file mode 100644 index 0000000000000000000000000000000000000000..cb7826bc2d9cc0a8c8cd6b7343c3c68d9a9d310f --- /dev/null +++ b/miniconda3/pkgs/menuinst-2.4.2-py313h06a4308_1/lib/python3.13/site-packages/menuinst/utils.py @@ -0,0 +1,476 @@ +from __future__ import annotations + +import os +import re +import shlex +import subprocess +import sys +import xml.etree.ElementTree as XMLTree +from contextlib import suppress +from functools import lru_cache, wraps +from logging import getLogger +from pathlib import Path +from typing import Any, Callable, Iterable, Literal, Mapping, Optional, Sequence, Union +from unicodedata import normalize + +logger = getLogger(__name__) +_TargetOrBase = Union[Literal["target"], Literal["base"]] +_UserOrSystem = Union[Literal["user"], Literal["system"]] + + +def _default_prefix(which: _TargetOrBase = "target") -> str: + """ + The prefixes in menuinst need to be handled with care. + + Conda installations that require superuser permissions need elevation for + the creation of shortcuts. Constructor will leave a sentinel file to signal + this. If a file `.nonadmin` is present in the 'base' environment (or root of + the installation directory if conda is not present), superuser access is not + needed. + + In order to check for this file, menuinst needs to track 'base_prefix'. For + a regular 'conda' process, this should be `conda.base.context.context.root_prefix'. + However, constructor also relies on a pyinstaller-frozen conda installation, + 'conda-standalone'. In these cases, 'sys.prefix' is set to temporary location + of the extracted contents of the executable -- that's NOT the base installation! + + For those reasons, we handle the default prefix with 'sys.prefix' (or 'sys.base_prefix') + as a last resort. The logic is: + + - If 'MENUINST_PREFIX' (or 'MENUINST_BASE_PREFIX') is an env var with a set value, use that. + - If are already using conda, we get the context object and use those values. + - If CONDA_PREFIX (or 'CONDA_ROOT_PREFIX') are available, use those + - Last resort: use sys.prefix and sys.base_prefix + + This helps us pass a lot of CLI arguments back and forth. + """ + base = which == "base" + context = None + if "conda" in sys.modules: + with suppress(ImportError): + from conda.base.context import context + + if base: + prefix = os.environ.get("MENUINST_BASE_PREFIX") + if prefix: + return prefix + if context: + return context.root_prefix + return os.environ.get("CONDA_ROOT_PREFIX", sys.base_prefix) + # else + prefix = os.environ.get("MENUINST_PREFIX") + if prefix: + return prefix + if context: + return context.target_prefix + return os.environ.get("CONDA_PREFIX", sys.prefix) + + +DEFAULT_PREFIX = _default_prefix("target") +DEFAULT_BASE_PREFIX = _default_prefix("base") + + +def slugify(text: str): + # Adapted from from django.utils.text.slugify + # Copyright (c) Django Software Foundation and individual contributors. + # All rights reserved. + # Redistribution and use in source and binary forms, with or without modification, + # are permitted provided that the following conditions are met: + # 1. Redistributions of source code must retain the above copyright notice, + # this list of conditions and the following disclaimer. + # 2. Redistributions in binary form must reproduce the above copyright + # notice, this list of conditions and the following disclaimer in the + # documentation and/or other materials provided with the distribution. + # 3. Neither the name of Django nor the names of its contributors may be used + # to endorse or promote products derived from this software without + # specific prior written permission. + # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + # ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + # ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + """ + Convert to ASCII, and spaces and underscores to hyphens. + Remove characters that aren't alphanumerics, or hyphens. + Convert to lowercase. Also strip leading and trailing whitespace. + """ + text = normalize("NFKD", text).encode("ascii", "ignore").decode("ascii") + text = re.sub(r"[^\w\s-]", "", text).strip().lower() + return re.sub(r"[_\-\s]+", "-", text) + + +def indent_xml_tree(elem, level=0): + """ + adds whitespace to the tree, so that it results in a pretty printed tree + """ + indentation = " " # 4 spaces, just like in Python! + base_indentation = "\n" + level * indentation + if len(elem): + if not elem.text or not elem.text.strip(): + elem.text = base_indentation + indentation + for e in elem: + indent_xml_tree(e, level + 1) + if not e.tail or not e.tail.strip(): + e.tail = base_indentation + indentation + if not e.tail or not e.tail.strip(): + e.tail = base_indentation + else: + if level and (not elem.tail or not elem.tail.strip()): + elem.tail = base_indentation + + +def add_xml_child(parent: XMLTree.Element, tag: str, text: Optional[str] = None): + """ + Add a child element of specified tag type to parent. + The new child element is returned. + """ + elem = XMLTree.SubElement(parent, tag) + if text is not None: + elem.text = text + return elem + + +class WinLex: + @classmethod + def quote_args(cls, args: Sequence[str]): + # cmd.exe /K or /C expects a single string argument and requires + # doubled-up quotes when any sub-arguments have spaces: + # https://stackoverflow.com/a/6378038/3257826 + if ( + len(args) > 2 + and ("CMD.EXE" in args[0].upper() or "%COMSPEC%" in args[0].upper()) + and (args[1].upper() == "/K" or args[1].upper() == "/C") + and any(" " in arg for arg in args[2:]) + ): + args = [ + cls.ensure_pad(args[0], '"'), # cmd.exe + args[1], # /K or /C + '"%s"' % (" ".join(cls.ensure_pad(arg, '"') for arg in args[2:])), # double-quoted + ] + else: + args = [cls.quote_string(arg) for arg in args] + return args + + @classmethod + def quote_string(cls, s: Sequence[str]): + """ + quotes a string if necessary. + """ + # strip any existing quotes + s = s.strip('"') + # don't add quotes for minus or leading space + if s[0] in ("-", " "): + return s + if " " in s or "/" in s: + return '"%s"' % s + return s + + @classmethod + def ensure_pad(cls, name: str, pad: str = "_"): + """ + + Examples: + >>> ensure_pad('conda') + '_conda_' + + """ + if not name or name[0] == name[-1] == pad: + return name + else: + return "%s%s%s" % (pad, name, pad) + + +class UnixLex: + @classmethod + def quote_args(cls, args: Sequence[str]) -> Sequence[str]: + return [cls.quote_string(a) for a in args] + + @classmethod + def quote_string(cls, s: str) -> str: + quoted = shlex.quote(s) + if quoted.startswith("'") and '"' not in quoted: + quoted = f'"{quoted[1:-1]}"' + return quoted + + +def unlink(path: str | os.PathLike, missing_ok: bool = False): + try: + os.unlink(path) + except FileNotFoundError as exc: + if not missing_ok: + raise exc + + +def data_path(path: str | os.PathLike) -> Path: + here = Path(__file__).parent + return here / "data" / path + + +def deep_update( + mapping: Mapping[str, Any], *updating_mappings: Iterable[Mapping] +) -> Mapping[str, Any]: + # Brought from pydantic.utils + # https://github.com/samuelcolvin/pydantic/blob/9d631a3429a66f30742c1a52c94ac18ec6ba848d/pydantic/utils.py#L198 + + # The MIT License (MIT) + # Copyright (c) 2017, 2018, 2019, 2020, 2021 Samuel Colvin and other contributors + # Permission is hereby granted, free of charge, to any person obtaining a copy + # of this software and associated documentation files (the "Software"), to deal + # in the Software without restriction, including without limitation the rights + # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + # copies of the Software, and to permit persons to whom the Software is + # furnished to do so, subject to the following conditions: + # The above copyright notice and this permission notice shall be included in all + # copies or substantial portions of the Software. + # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + # SOFTWARE. + + updated_mapping = mapping.copy() + for updating_mapping in updating_mappings: + for k, v in updating_mapping.items(): + if ( + k in updated_mapping + and isinstance(updated_mapping[k], dict) + and isinstance(v, dict) + ): + updated_mapping[k] = deep_update(updated_mapping[k], v) + else: + updated_mapping[k] = v + return updated_mapping + + +def needs_admin(target_prefix: os.PathLike, base_prefix: os.PathLike) -> bool: + """ + Checks if the current installation needs admin permissions. + """ + if user_is_admin(): + return False + + if Path(target_prefix, ".nonadmin").exists(): + # This file is planted by the constructor installer + # and signals we don't need admin permissions + return False + + try: + Path(target_prefix, ".nonadmin").touch() + return False + except Exception as exc: + logger.debug("Attempt to write %s/.nonadmin failed.", target_prefix, exc_info=exc) + + if base_prefix == target_prefix: + # We are already in the base env, no need to check further + return True + + # I can't think of cases where users can't write to target_prefix but can to base + # so maybe we can skip everything underneath? + + if Path(base_prefix, ".nonadmin").exists(): + return False + + if os.name == "nt": + # Absence of $base_prefix/.nonadmin in Windows means we need admin permissions + return True + elif os.name == "posix": + # Absence of $base_prefix/.nonadmin in Linux, macOS and other posix systems + # has no meaning for historic reasons, so let's try to see if we can + # write to the installation root + try: + Path(base_prefix, ".nonadmin").touch() + except Exception as exc: + logger.debug("Attempt to write %s/.nonadmin failed.", target_prefix, exc_info=exc) + return True + else: + return False + else: + raise RuntimeError(f"Unsupported operating system: {os.name}") + + +@lru_cache(maxsize=1) +def user_is_admin() -> bool: + if os.name == "nt": + from .platforms.win_utils.win_elevate import isUserAdmin + + return bool(isUserAdmin()) + elif os.name == "posix": + # Check for root on Linux, macOS and other posix systems + return os.getuid() == 0 + else: + raise RuntimeError(f"Unsupported operating system: {os.name}") + + +def run_as_admin(argv: Sequence[str]) -> int: + """ + Rerun this command in a new process with admin permissions. + """ + if os.name == "nt": + from .platforms.win_utils.win_elevate import runAsAdmin + + return runAsAdmin(argv) + elif os.name == "posix": + return subprocess.call(["sudo", *argv]) + else: + raise RuntimeError(f"Unsupported operating system: {os.name}") + + +def python_executable(base_prefix: Optional[os.PathLike] = None) -> Sequence[str]: + base_prefix = Path(base_prefix or DEFAULT_BASE_PREFIX) + # menuinst might be called by a conda-standalone bundle + # these are pyinstaller-generated, and have sys.frozen=True + # in these cases, we prefer using the base env python to + # avoid a 2nd decompression + hacky console, so we try that + # first; otherwise, we use 'conda-standalone.exe python' + if getattr(sys, "frozen", False): + if os.name == "nt": + base_prefix_python = base_prefix / "python.exe" + else: + base_prefix_python = base_prefix / "bin" / "python" + # If the base env (installation root) + # ships a usable Python, use that one + if base_prefix_python.is_file(): + return (str(base_prefix_python),) + # the base env does not have python, + # use the conda-standalone wrapper + return (sys.executable, "python") + # in non-frozen executables: + return (sys.executable,) + + +def elevate_as_needed(func: Callable) -> Callable: + """ + Multiplatform decorator to run a function as a superuser, if needed. + + This depends on the presence of a `.nonadmin` file in the installation root. + This is usually planted by the `constructor` installer if the installation + process didn't need superuser permissions. + + In the absence of this file, we assume that we will need superuser + permissions, so we try to run the decorated function as a superuser. + If that fails (the user rejects the request or doesn't have permissions + to accept it), we'll try to run it as a normal user. + + NOTE: Only functions that return None should be decorated. The function + will run in a separate process, so we won't be able to capture the return + value anyway. + """ + + @wraps(func) + def wrapper_elevate( + *args, + target_prefix: os.PathLike | None = None, + base_prefix: os.PathLike | None = None, + **kwargs, + ): + kwargs.pop("_mode", None) + target_prefix = target_prefix or DEFAULT_BASE_PREFIX + base_prefix = base_prefix or DEFAULT_BASE_PREFIX + if ( + needs_admin(target_prefix, base_prefix) + and os.environ.get("_MENUINST_RECURSING") != "1" + ): + # call the wrapped func with elevated prompt... + # from the command line; not pretty! + try: + if func.__module__ == "__main__": + import_func = ( + f"import runpy;" + f"{func.__name__} = runpy.run_path('{__file__}')" + f"['{func.__name__}'];" + ) + else: + import_func = f"from {func.__module__} import {func.__name__};" + env_vars = ";".join( + [ + f"os.environ.setdefault('{k}', '{v}')" + for (k, v) in os.environ.items() + if k.startswith(("CONDA_", "CONSTRUCTOR_", "MENUINST_")) + ] + ) + cmd = [ + *python_executable(), + "-c", + f"import os;" + f"os.environ.setdefault('_MENUINST_RECURSING', '1');" + f"{env_vars};" + f"{import_func}" + f"{func.__name__}(" + f"*{args!r}," + f"target_prefix={target_prefix!r}," + f"base_prefix={base_prefix!r}," + f"_mode='system'," + f"**{kwargs!r}" + ")", + ] + logger.debug("Elevating command: %s", cmd) + return_code = run_as_admin(cmd) + except Exception as exc: + logger.warning("Elevation failed! Falling back to user mode.", exc_info=exc) + else: + os.environ.pop("_MENUINST_RECURSING", None) + if return_code == 0: # success, we are done + return + elif user_is_admin(): + # We are already running as admin, no need to elevate + return func( + target_prefix=target_prefix, + base_prefix=base_prefix, + _mode="system", + *args, + **kwargs, + ) + # We have not returned yet? Well, let's try as a normal user + return func( + target_prefix=target_prefix, + base_prefix=base_prefix, + _mode="user", + *args, + **kwargs, + ) + + return wrapper_elevate + + +def _test_elevation( + target_prefix: Optional[os.PathLike] = None, + base_prefix: Optional[os.PathLike] = None, + _mode: _UserOrSystem = "user", +): + if os.name == "nt": + if base_prefix: + output = os.path.join(base_prefix, "_test_output.txt") + else: + output = "_test_output.txt" + out = open(output, "a") + else: + out = sys.stdout + print( + "user_is_admin():", + user_is_admin(), + "env_var:", + os.environ.get("MENUINST_TEST", "N/A"), + "_mode:", + _mode, + file=out, + ) + if os.name == "nt": + out.close() + + +def logged_run(args, check=False, log=True, **kwargs) -> subprocess.CompletedProcess: + process = subprocess.run(args, capture_output=True, text=True, **kwargs) + if log: + logger.debug("%s returned %d", process.args, process.returncode) + logger.debug("stdout:\n%s", process.stdout) + logger.debug("stderr:\n%s", process.stderr) + if check: + process.check_returncode() + return process diff --git a/miniconda3/pkgs/more-itertools-10.8.0-py313h06a4308_0/info/about.json b/miniconda3/pkgs/more-itertools-10.8.0-py313h06a4308_0/info/about.json new file mode 100644 index 0000000000000000000000000000000000000000..982474b1003d6b4e6384d03821ea50341117d528 --- /dev/null +++ b/miniconda3/pkgs/more-itertools-10.8.0-py313h06a4308_0/info/about.json @@ -0,0 +1,161 @@ +{ + "channels": [ + "https://repo.anaconda.com/pkgs/main", + "https://repo.anaconda.com/pkgs/r", + "https://repo.anaconda.com/pkgs/r" + ], + "conda_build_version": "25.1.2", + "conda_version": "25.1.1", + "description": "Python's itertools library is a gem - you can compose elegant solutions for a variety\nof problems with the functions it provides. In more-itertools we collect additional\nbuilding blocks, recipes, and routines for working with Python iterables.\n", + "dev_url": "https://github.com/more-itertools/more-itertools", + "doc_url": "https://more-itertools.readthedocs.io", + "env_vars": { + "CIO_TEST": "" + }, + "extra": { + "copy_test_source_files": true, + "final": true, + "recipe-maintainers": [ + "pmlandwehr", + "dbast" + ] + }, + "home": "https://github.com/more-itertools/more-itertools", + "identifiers": [], + "keywords": [], + "license": "MIT", + "license_family": "MIT", + "license_file": "LICENSE", + "root_pkgs": [ + "_libgcc_mutex 0.1 main", + "ca-certificates 2025.9.9 h06a4308_0", + "ld_impl_linux-64 2.40 h12ee557_0", + "libstdcxx-ng 11.2.0 h1234567_1", + "nlohmann_json 3.11.2 h6a678d5_0", + "pybind11-abi 5 hd3eb1b0_0", + "tzdata 2025a h04d1e81_0", + "libgomp 11.2.0 h1234567_1", + "_openmp_mutex 5.1 1_gnu", + "libgcc-ng 11.2.0 h1234567_1", + "bzip2 1.0.8 h5eee18b_6", + "c-ares 1.19.1 h5eee18b_0", + "cpp-expected 1.1.0 hdb19cb5_0", + "expat 2.6.4 h6a678d5_0", + "fmt 9.1.0 hdb19cb5_1", + "icu 73.1 h6a678d5_0", + "libev 4.33 h7f8727e_1", + "libffi 3.4.4 h6a678d5_1", + "libuuid 1.41.5 h5eee18b_0", + "lz4-c 1.9.4 h6a678d5_1", + "ncurses 6.4 h6a678d5_0", + "liblief 0.12.3 h6a678d5_0", + "reproc 14.2.4 h6a678d5_2", + "simdjson 3.10.1 hdb19cb5_0", + "xz 5.4.6 h5eee18b_1", + "yaml-cpp 0.8.0 h6a678d5_1", + "zlib 1.2.13 h5eee18b_1", + "libedit 3.1.20230828 h5eee18b_0", + "libnghttp2 1.57.0 h2d74bed_0", + "libssh2 1.11.1 h251f7ec_0", + "libxml2 2.13.5 hfdd30dd_0", + "pcre2 10.42 hebb0a14_1", + "readline 8.2 h5eee18b_0", + "reproc-cpp 14.2.4 h6a678d5_2", + "spdlog 1.11.0 hdb19cb5_0", + "tk 8.6.14 h39e8969_0", + "zstd 1.5.6 hc292b87_0", + "krb5 1.20.1 h143b758_1", + "libarchive 3.7.7 hfab0078_0", + "libsolv 0.7.30 he621ea3_1", + "sqlite 3.45.3 h5eee18b_0", + "libcurl 8.11.1 hc9e6f67_0", + "python 3.12.9 h5148396_0", + "libmamba 2.0.5 haf1ee3a_1", + "menuinst 2.2.0 py312h06a4308_1", + "anaconda-anon-usage 0.5.0 py312hfc0e8ea_100", + "annotated-types 0.6.0 py312h06a4308_0", + "archspec 0.2.3 pyhd3eb1b0_0", + "boltons 24.1.0 py312h06a4308_0", + "brotli-python 1.0.9 py312h6a678d5_9", + "charset-normalizer 3.3.2 pyhd3eb1b0_0", + "distro 1.9.0 py312h06a4308_0", + "frozendict 2.4.2 py312h06a4308_0", + "idna 3.7 py312h06a4308_0", + "jsonpointer 2.1 pyhd3eb1b0_0", + "libmambapy 2.0.5 py312hdb19cb5_1", + "mdurl 0.1.0 py312h06a4308_0", + "packaging 24.2 py312h06a4308_0", + "platformdirs 3.10.0 py312h06a4308_0", + "pluggy 1.5.0 py312h06a4308_0", + "pycosat 0.6.6 py312h5eee18b_2", + "pycparser 2.21 pyhd3eb1b0_0", + "pygments 2.15.1 py312h06a4308_1", + "pysocks 1.7.1 py312h06a4308_0", + "ruamel.yaml.clib 0.2.8 py312h5eee18b_0", + "setuptools 75.8.0 py312h06a4308_0", + "tqdm 4.67.1 py312he106c6f_0", + "truststore 0.10.0 py312h06a4308_0", + "typing_extensions 4.12.2 py312h06a4308_0", + "wheel 0.45.1 py312h06a4308_0", + "cffi 1.17.1 py312h1fdaa30_1", + "jsonpatch 1.33 py312h06a4308_1", + "markdown-it-py 2.2.0 py312h06a4308_1", + "pip 25.0 py312h06a4308_0", + "ruamel.yaml 0.18.6 py312h5eee18b_0", + "typing-extensions 4.12.2 py312h06a4308_0", + "urllib3 2.3.0 py312h06a4308_0", + "cryptography 43.0.3 py312h7825ff9_1", + "pydantic-core 2.27.1 py312h4aa5aa6_0", + "requests 2.32.3 py312h06a4308_1", + "rich 13.9.4 py312h06a4308_0", + "zstandard 0.23.0 py312h2c38b39_1", + "conda-content-trust 0.2.0 py312h06a4308_1", + "conda-package-streaming 0.11.0 py312h06a4308_0", + "pydantic 2.10.3 py312h06a4308_0", + "conda-package-handling 2.4.0 py312h06a4308_0", + "conda 25.1.1 py312h06a4308_0", + "conda-anaconda-tos 0.1.2 py312h06a4308_0", + "conda-libmamba-solver 25.1.1 pyhd3eb1b0_0", + "libsodium 1.0.20 heac8642_0", + "openssl 3.0.18 hd6dcaed_0", + "patch 2.8 hb25bd0a_0", + "patchelf 0.17.2 h6a678d5_0", + "yaml 0.2.5 h7b6447c_0", + "argcomplete 3.6.2 py312h06a4308_0", + "attrs 24.3.0 py312h06a4308_0", + "certifi 2025.8.3 py312h06a4308_0", + "chardet 5.2.0 py312h06a4308_0", + "click 8.2.1 py312h06a4308_0", + "filelock 3.17.0 py312h06a4308_0", + "jmespath 1.0.1 py312h06a4308_0", + "markupsafe 3.0.2 py312h5eee18b_0", + "more-itertools 10.3.0 py312h06a4308_0", + "pkginfo 1.12.0 py312h06a4308_0", + "psutil 7.0.0 py312hee96239_0", + "py-lief 0.12.3 py312h6a678d5_0", + "python-libarchive-c 5.1 pyhd3eb1b0_0", + "pytz 2025.2 py312h06a4308_0", + "pyyaml 6.0.2 py312h5eee18b_0", + "rpds-py 0.22.3 py312h4aa5aa6_0", + "six 1.17.0 py312h06a4308_0", + "soupsieve 2.5 py312h06a4308_0", + "tomlkit 0.13.2 py312h06a4308_0", + "xmltodict 0.14.2 py312h06a4308_0", + "jinja2 3.1.6 py312h06a4308_0", + "python-dateutil 2.9.0post0 py312h06a4308_2", + "referencing 0.30.2 py312h06a4308_0", + "yq 3.4.3 py312h06a4308_0", + "beautifulsoup4 4.13.5 py312h06a4308_0", + "botocore 1.37.10 py312h06a4308_0", + "jsonschema-specifications 2023.7.1 py312h06a4308_0", + "pynacl 1.5.0 py312h2630517_2", + "jsonschema 4.25.0 py312h06a4308_0", + "s3transfer 0.11.2 py312h06a4308_0", + "boto3 1.37.10 py312h06a4308_0", + "conda-anaconda-telemetry 0.3.0 pyhd3eb1b0_1", + "conda-index 0.5.0 py312h06a4308_0", + "conda-build 25.1.2 py312h06a4308_0" + ], + "summary": "More routines for operating on iterables, beyond itertools", + "tags": [] +} \ No newline at end of file diff --git a/miniconda3/pkgs/more-itertools-10.8.0-py313h06a4308_0/info/files b/miniconda3/pkgs/more-itertools-10.8.0-py313h06a4308_0/info/files new file mode 100644 index 0000000000000000000000000000000000000000..1b695362d4390da3124a9fb0819482a5ac85d94d --- /dev/null +++ b/miniconda3/pkgs/more-itertools-10.8.0-py313h06a4308_0/info/files @@ -0,0 +1,17 @@ +lib/python3.13/site-packages/more_itertools-10.8.0.dist-info/INSTALLER +lib/python3.13/site-packages/more_itertools-10.8.0.dist-info/METADATA +lib/python3.13/site-packages/more_itertools-10.8.0.dist-info/RECORD +lib/python3.13/site-packages/more_itertools-10.8.0.dist-info/REQUESTED +lib/python3.13/site-packages/more_itertools-10.8.0.dist-info/WHEEL +lib/python3.13/site-packages/more_itertools-10.8.0.dist-info/direct_url.json +lib/python3.13/site-packages/more_itertools-10.8.0.dist-info/licenses/LICENSE +lib/python3.13/site-packages/more_itertools/__init__.py +lib/python3.13/site-packages/more_itertools/__init__.pyi +lib/python3.13/site-packages/more_itertools/__pycache__/__init__.cpython-313.pyc +lib/python3.13/site-packages/more_itertools/__pycache__/more.cpython-313.pyc +lib/python3.13/site-packages/more_itertools/__pycache__/recipes.cpython-313.pyc +lib/python3.13/site-packages/more_itertools/more.py +lib/python3.13/site-packages/more_itertools/more.pyi +lib/python3.13/site-packages/more_itertools/py.typed +lib/python3.13/site-packages/more_itertools/recipes.py +lib/python3.13/site-packages/more_itertools/recipes.pyi diff --git a/miniconda3/pkgs/more-itertools-10.8.0-py313h06a4308_0/info/git b/miniconda3/pkgs/more-itertools-10.8.0-py313h06a4308_0/info/git new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/miniconda3/pkgs/more-itertools-10.8.0-py313h06a4308_0/info/hash_input.json b/miniconda3/pkgs/more-itertools-10.8.0-py313h06a4308_0/info/hash_input.json new file mode 100644 index 0000000000000000000000000000000000000000..54f8fb2da41bdb4962a008606b017773d2fef48e --- /dev/null +++ b/miniconda3/pkgs/more-itertools-10.8.0-py313h06a4308_0/info/hash_input.json @@ -0,0 +1,4 @@ +{ + "target_platform": "linux-64", + "channel_targets": "defaults" +} \ No newline at end of file diff --git a/miniconda3/pkgs/more-itertools-10.8.0-py313h06a4308_0/info/index.json b/miniconda3/pkgs/more-itertools-10.8.0-py313h06a4308_0/info/index.json new file mode 100644 index 0000000000000000000000000000000000000000..89d82cca75b5e151a29b37e044c748e47efadade --- /dev/null +++ b/miniconda3/pkgs/more-itertools-10.8.0-py313h06a4308_0/info/index.json @@ -0,0 +1,16 @@ +{ + "arch": "x86_64", + "build": "py313h06a4308_0", + "build_number": 0, + "depends": [ + "python >=3.13,<3.14.0a0", + "python_abi 3.13.* *_cp313" + ], + "license": "MIT", + "license_family": "MIT", + "name": "more-itertools", + "platform": "linux", + "subdir": "linux-64", + "timestamp": 1761121509531, + "version": "10.8.0" +} \ No newline at end of file diff --git a/miniconda3/pkgs/more-itertools-10.8.0-py313h06a4308_0/info/licenses/LICENSE b/miniconda3/pkgs/more-itertools-10.8.0-py313h06a4308_0/info/licenses/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..0a523bece3e50519653c4d7a38399baa487fefa1 --- /dev/null +++ b/miniconda3/pkgs/more-itertools-10.8.0-py313h06a4308_0/info/licenses/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2012 Erik Rose + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/miniconda3/pkgs/more-itertools-10.8.0-py313h06a4308_0/info/paths.json b/miniconda3/pkgs/more-itertools-10.8.0-py313h06a4308_0/info/paths.json new file mode 100644 index 0000000000000000000000000000000000000000..82bb53fd5c5b5e506649dd9ffcbb4ef28c224c8b --- /dev/null +++ b/miniconda3/pkgs/more-itertools-10.8.0-py313h06a4308_0/info/paths.json @@ -0,0 +1,107 @@ +{ + "paths": [ + { + "_path": "lib/python3.13/site-packages/more_itertools-10.8.0.dist-info/INSTALLER", + "path_type": "hardlink", + "sha256": "d0edee15f91b406f3f99726e44eb990be6e34fd0345b52b910c568e0eef6a2a8", + "size_in_bytes": 5 + }, + { + "_path": "lib/python3.13/site-packages/more_itertools-10.8.0.dist-info/METADATA", + "path_type": "hardlink", + "sha256": "6ab3515145abe58b067f087c867631cf4cf5d653fed81b9642ee12086c3904b8", + "size_in_bytes": 39413 + }, + { + "_path": "lib/python3.13/site-packages/more_itertools-10.8.0.dist-info/RECORD", + "path_type": "hardlink", + "sha256": "26cd25dccb7414ffda4384e661173227fdff2b40af6cdef8a7071eb3b03f3762", + "size_in_bytes": 1372 + }, + { + "_path": "lib/python3.13/site-packages/more_itertools-10.8.0.dist-info/REQUESTED", + "path_type": "hardlink", + "sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "size_in_bytes": 0 + }, + { + "_path": "lib/python3.13/site-packages/more_itertools-10.8.0.dist-info/WHEEL", + "path_type": "hardlink", + "sha256": "1b68144734c4b66791f27add5d425f3620775585718a03d0f9b110ba3a4d88db", + "size_in_bytes": 82 + }, + { + "_path": "lib/python3.13/site-packages/more_itertools-10.8.0.dist-info/direct_url.json", + "path_type": "hardlink", + "sha256": "63c9e0e44fa3fb06299e52c7f969923cce42bf6afc7cb6742057648afdfbfe1f", + "size_in_bytes": 104 + }, + { + "_path": "lib/python3.13/site-packages/more_itertools-10.8.0.dist-info/licenses/LICENSE", + "path_type": "hardlink", + "sha256": "09f1c8c9e941af3e584d59641ea9b87d83c0cb0fd007eb5ef391a7e2643c1a46", + "size_in_bytes": 1053 + }, + { + "_path": "lib/python3.13/site-packages/more_itertools/__init__.py", + "path_type": "hardlink", + "sha256": "e45ec4ff3a6819c1015bf4ffdd613459862df23fa0268748ba205c389c6b3aff", + "size_in_bytes": 149 + }, + { + "_path": "lib/python3.13/site-packages/more_itertools/__init__.pyi", + "path_type": "hardlink", + "sha256": "e41dde4f338dd4106e38ba1bd6f09f97211bda549deaeb17410f82bfe85791e0", + "size_in_bytes": 43 + }, + { + "_path": "lib/python3.13/site-packages/more_itertools/__pycache__/__init__.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "6c8b79b9a8cee9635e58e5cfe3b0c4f8bf8848bf070582a8b6304b97537dad3e", + "size_in_bytes": 306 + }, + { + "_path": "lib/python3.13/site-packages/more_itertools/__pycache__/more.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "330afbcecb246707e5ca7a96d5cd4a4df3bbeabab4417550b986076fea3b8861", + "size_in_bytes": 183239 + }, + { + "_path": "lib/python3.13/site-packages/more_itertools/__pycache__/recipes.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "eaf153f0ef6accdbae2d72a26ee66c376f3169f3e447de578463aa4e93894125", + "size_in_bytes": 48995 + }, + { + "_path": "lib/python3.13/site-packages/more_itertools/more.py", + "path_type": "hardlink", + "sha256": "98d3ca2aee5423b9512f8eb4be09b441309616218c542328b123f15527626e8b", + "size_in_bytes": 163690 + }, + { + "_path": "lib/python3.13/site-packages/more_itertools/more.pyi", + "path_type": "hardlink", + "sha256": "7e9120357dceebac18e5c9d3face5560328d52901c682c94de23fce08b7738e3", + "size_in_bytes": 27119 + }, + { + "_path": "lib/python3.13/site-packages/more_itertools/py.typed", + "path_type": "hardlink", + "sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "size_in_bytes": 0 + }, + { + "_path": "lib/python3.13/site-packages/more_itertools/recipes.py", + "path_type": "hardlink", + "sha256": "31afa4b813590c585a4036c82604669eb1bce96cdaba96cec94577bfc8dedf1c", + "size_in_bytes": 41811 + }, + { + "_path": "lib/python3.13/site-packages/more_itertools/recipes.pyi", + "path_type": "hardlink", + "sha256": "2cd47037e38bde790c7d002ac7e3cf7357c169eb5439b6ff67a99d78fcb38757", + "size_in_bytes": 6226 + } + ], + "paths_version": 1 +} \ No newline at end of file diff --git a/miniconda3/pkgs/more-itertools-10.8.0-py313h06a4308_0/info/recipe/conda_build_config.yaml b/miniconda3/pkgs/more-itertools-10.8.0-py313h06a4308_0/info/recipe/conda_build_config.yaml new file mode 100644 index 0000000000000000000000000000000000000000..11162ed8bc642a9ea169f37e1c6d3443af44770c --- /dev/null +++ b/miniconda3/pkgs/more-itertools-10.8.0-py313h06a4308_0/info/recipe/conda_build_config.yaml @@ -0,0 +1,28 @@ +c_compiler: gcc +channel_targets: defaults +cpu_optimization_target: nocona +cran_mirror: https://cran.r-project.org +cxx_compiler: gxx +extend_keys: +- ignore_build_only_deps +- ignore_version +- pin_run_as_build +- extend_keys +fortran_compiler: gfortran +ignore_build_only_deps: +- numpy +- python +lua: '5' +numpy: '1.26' +perl: 5.26.2 +pin_run_as_build: + python: + max_pin: x.x + min_pin: x.x + r-base: + max_pin: x.x + min_pin: x.x +platform: linux-64 +python: '3.13' +r_base: '3.5' +target_platform: linux-64 diff --git a/miniconda3/pkgs/more-itertools-10.8.0-py313h06a4308_0/info/recipe/meta.yaml b/miniconda3/pkgs/more-itertools-10.8.0-py313h06a4308_0/info/recipe/meta.yaml new file mode 100644 index 0000000000000000000000000000000000000000..782ab5df6d2ac41e2a778e07a53c6714ef55e46a --- /dev/null +++ b/miniconda3/pkgs/more-itertools-10.8.0-py313h06a4308_0/info/recipe/meta.yaml @@ -0,0 +1,88 @@ +# This file created by conda-build 25.1.2 +# meta.yaml template originally from: +# /home/task_176112148319406/more-itertools-feedstock/recipe, last modified Wed Oct 22 08:24:44 2025 +# ------------------------------------------------ + +package: + name: more-itertools + version: 10.8.0 +source: + sha256: f638ddf8a1a0d134181275fb5d58b086ead7c6a72429ad725c67503f13ba30bd + url: https://pypi.org/packages/source/m/more-itertools/more_itertools-10.8.0.tar.gz +build: + number: '0' + script: /home/task_176112148319406/conda-bld/more-itertools_1761121494880/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pl/bin/python + -m pip install . --no-deps --no-build-isolation -vv + string: py313h06a4308_0 +requirements: + host: + - _libgcc_mutex 0.1 main + - _openmp_mutex 5.1 1_gnu + - bzip2 1.0.8 h5eee18b_6 + - ca-certificates 2025.9.9 h06a4308_0 + - expat 2.7.1 h6a678d5_0 + - flit-core 3.12.0 py313hee27c6d_0 + - ld_impl_linux-64 2.44 h153f514_2 + - libffi 3.4.4 h6a678d5_1 + - libgcc-ng 11.2.0 h1234567_1 + - libgomp 11.2.0 h1234567_1 + - libmpdec 4.0.0 h5eee18b_0 + - libstdcxx-ng 11.2.0 h1234567_1 + - libuuid 1.41.5 h5eee18b_0 + - libxcb 1.17.0 h9b100fa_0 + - libzlib 1.3.1 hb25bd0a_0 + - ncurses 6.5 h7934f7d_0 + - openssl 3.0.18 hd6dcaed_0 + - pip 25.2 pyhc872135_1 + - pthread-stubs 0.3 h0ce48e5_1 + - python 3.13.9 h7e8bc2b_100_cp313 + - python_abi 3.13 1_cp313 + - readline 8.3 hc2a1206_0 + - setuptools 80.9.0 py313h06a4308_0 + - sqlite 3.50.2 hb25bd0a_1 + - tk 8.6.15 h54e0aa7_0 + - tzdata 2025b h04d1e81_0 + - wheel 0.45.1 py313h06a4308_0 + - xorg-libx11 1.8.12 h9b100fa_1 + - xorg-libxau 1.0.12 h9b100fa_0 + - xorg-libxdmcp 1.1.5 h9b100fa_0 + - xorg-xorgproto 2024.1 h5eee18b_1 + - xz 5.6.4 h5eee18b_1 + - zlib 1.3.1 hb25bd0a_0 + run: + - python >=3.13,<3.14.0a0 + - python_abi 3.13.* *_cp313 +test: + commands: + - pip check + - python -c "from importlib.metadata import version; assert(version('more-itertools')=='10.8.0')" + - pytest -v tests + imports: + - more_itertools + requires: + - pip + - pytest + source_files: + - tests +about: + description: 'Python''s itertools library is a gem - you can compose elegant solutions + for a variety + + of problems with the functions it provides. In more-itertools we collect additional + + building blocks, recipes, and routines for working with Python iterables. + + ' + dev_url: https://github.com/more-itertools/more-itertools + doc_url: https://more-itertools.readthedocs.io + home: https://github.com/more-itertools/more-itertools + license: MIT + license_family: MIT + license_file: LICENSE + summary: More routines for operating on iterables, beyond itertools +extra: + copy_test_source_files: true + final: true + recipe-maintainers: + - dbast + - pmlandwehr diff --git a/miniconda3/pkgs/more-itertools-10.8.0-py313h06a4308_0/info/recipe/meta.yaml.template b/miniconda3/pkgs/more-itertools-10.8.0-py313h06a4308_0/info/recipe/meta.yaml.template new file mode 100644 index 0000000000000000000000000000000000000000..8d340e56c61984bedd2c455e3e12d7f589d7234b --- /dev/null +++ b/miniconda3/pkgs/more-itertools-10.8.0-py313h06a4308_0/info/recipe/meta.yaml.template @@ -0,0 +1,54 @@ +{% set name = "more-itertools" %} +{% set version = "10.8.0" %} + +package: + name: {{ name|lower }} + version: {{ version }} + +source: + url: https://pypi.org/packages/source/{{ name[0] }}/{{ name }}/{{ name|replace('-', '_') }}-{{ version }}.tar.gz + sha256: f638ddf8a1a0d134181275fb5d58b086ead7c6a72429ad725c67503f13ba30bd + +build: + number: 0 + skip: true # [py<39] + script: {{ PYTHON }} -m pip install . --no-deps --no-build-isolation -vv + +requirements: + host: + - flit-core >=3.12,<4 + - pip + - python + run: + - python + +test: + source_files: + - tests + imports: + - more_itertools + requires: + - pip + - pytest + commands: + - pip check + - python -c "from importlib.metadata import version; assert(version('{{ name }}')=='{{ version }}')" + - pytest -v tests + +about: + home: https://github.com/more-itertools/more-itertools + license_file: LICENSE + license: MIT + license_family: MIT + summary: More routines for operating on iterables, beyond itertools + description: | + Python's itertools library is a gem - you can compose elegant solutions for a variety + of problems with the functions it provides. In more-itertools we collect additional + building blocks, recipes, and routines for working with Python iterables. + dev_url: https://github.com/more-itertools/more-itertools + doc_url: https://more-itertools.readthedocs.io + +extra: + recipe-maintainers: + - pmlandwehr + - dbast diff --git a/miniconda3/pkgs/more-itertools-10.8.0-py313h06a4308_0/info/repodata_record.json b/miniconda3/pkgs/more-itertools-10.8.0-py313h06a4308_0/info/repodata_record.json new file mode 100644 index 0000000000000000000000000000000000000000..b546e1ea8decf22675b6a08f99294e52223cbb6f --- /dev/null +++ b/miniconda3/pkgs/more-itertools-10.8.0-py313h06a4308_0/info/repodata_record.json @@ -0,0 +1,23 @@ +{ + "arch": "x86_64", + "build": "py313h06a4308_0", + "build_number": 0, + "channel": "https://repo.anaconda.com/pkgs/main/linux-64/", + "constrains": [], + "depends": [ + "python >=3.13,<3.14.0a0", + "python_abi 3.13.* *_cp313" + ], + "fn": "more-itertools-10.8.0-py313h06a4308_0.conda", + "license": "MIT", + "license_family": "MIT", + "md5": "bd0dee4808dd6acb561fce514a345c3d", + "name": "more-itertools", + "platform": "linux", + "sha256": "a6da3706af1a527f98e4db5e9e492836d9315825ee99336230865493ae4ee0a6", + "size": 167359, + "subdir": "linux-64", + "timestamp": 1761121509000, + "url": "https://repo.anaconda.com/pkgs/main/linux-64/more-itertools-10.8.0-py313h06a4308_0.conda", + "version": "10.8.0" +} \ No newline at end of file diff --git a/miniconda3/pkgs/more-itertools-10.8.0-py313h06a4308_0/info/test/run_test.py b/miniconda3/pkgs/more-itertools-10.8.0-py313h06a4308_0/info/test/run_test.py new file mode 100644 index 0000000000000000000000000000000000000000..224371ccee126241d88c64ce3f22a6d4cc6c1a28 --- /dev/null +++ b/miniconda3/pkgs/more-itertools-10.8.0-py313h06a4308_0/info/test/run_test.py @@ -0,0 +1,3 @@ +print("import: 'more_itertools'") +import more_itertools + diff --git a/miniconda3/pkgs/more-itertools-10.8.0-py313h06a4308_0/info/test/run_test.sh b/miniconda3/pkgs/more-itertools-10.8.0-py313h06a4308_0/info/test/run_test.sh new file mode 100644 index 0000000000000000000000000000000000000000..790720d7687ca33b7b61a62b44b85247074960c5 --- /dev/null +++ b/miniconda3/pkgs/more-itertools-10.8.0-py313h06a4308_0/info/test/run_test.sh @@ -0,0 +1,10 @@ + + +set -ex + + + +pip check +python -c "from importlib.metadata import version; assert(version('more-itertools')=='10.8.0')" +pytest -v tests +exit 0 diff --git a/miniconda3/pkgs/more-itertools-10.8.0-py313h06a4308_0/info/test/test_time_dependencies.json b/miniconda3/pkgs/more-itertools-10.8.0-py313h06a4308_0/info/test/test_time_dependencies.json new file mode 100644 index 0000000000000000000000000000000000000000..d148ef6e9c8542d5f2035b58b19f01b91b024856 --- /dev/null +++ b/miniconda3/pkgs/more-itertools-10.8.0-py313h06a4308_0/info/test/test_time_dependencies.json @@ -0,0 +1 @@ +["pip", "pytest"] \ No newline at end of file diff --git a/miniconda3/pkgs/more-itertools-10.8.0-py313h06a4308_0/info/test/tests/__init__.py b/miniconda3/pkgs/more-itertools-10.8.0-py313h06a4308_0/info/test/tests/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/miniconda3/pkgs/more-itertools-10.8.0-py313h06a4308_0/info/test/tests/test_more.py b/miniconda3/pkgs/more-itertools-10.8.0-py313h06a4308_0/info/test/tests/test_more.py new file mode 100644 index 0000000000000000000000000000000000000000..5ee84f15c4654ad105baadcfcdfb46c89cac1879 --- /dev/null +++ b/miniconda3/pkgs/more-itertools-10.8.0-py313h06a4308_0/info/test/tests/test_more.py @@ -0,0 +1,6420 @@ +from __future__ import annotations + +import cmath +import gc +import platform +import weakref + +from collections import Counter, abc, deque +from collections.abc import Set +from datetime import datetime, timedelta +from decimal import Decimal +from doctest import DocTestSuite +from fractions import Fraction +from functools import partial, reduce +from io import StringIO +from itertools import ( + accumulate, + chain, + combinations, + combinations_with_replacement, + count, + cycle, + groupby, + islice, + permutations, + product, + repeat, +) +from operator import add, mul, itemgetter +from pickle import loads, dumps +from random import Random, random, randrange, seed +from statistics import mean +from string import ascii_letters +from sys import version_info +from time import sleep +from typing import Iterable, Iterator, NamedTuple +from unittest import skipIf, TestCase + +import more_itertools as mi + + +def load_tests(loader, tests, ignore): + # Add the doctests + tests.addTests(DocTestSuite('more_itertools.more')) + return tests + + +class ChunkedTests(TestCase): + """Tests for ``chunked()``""" + + def test_even(self): + """Test when ``n`` divides evenly into the length of the iterable.""" + self.assertEqual( + list(mi.chunked('ABCDEF', 3)), [['A', 'B', 'C'], ['D', 'E', 'F']] + ) + + def test_odd(self): + """Test when ``n`` does not divide evenly into the length of the + iterable. + + """ + self.assertEqual( + list(mi.chunked('ABCDE', 3)), [['A', 'B', 'C'], ['D', 'E']] + ) + + def test_none(self): + """Test when ``n`` has the value ``None``.""" + self.assertEqual( + list(mi.chunked('ABCDE', None)), [['A', 'B', 'C', 'D', 'E']] + ) + + def test_strict_false(self): + """Test when ``n`` does not divide evenly into the length of the + iterable and strict is false. + + """ + self.assertEqual( + list(mi.chunked('ABCDE', 3, strict=False)), + [['A', 'B', 'C'], ['D', 'E']], + ) + + def test_strict_being_true(self): + """Test when ``n`` does not divide evenly into the length of the + iterable and strict is True (raising an exception). + + """ + + def f(): + return list(mi.chunked('ABCDE', 3, strict=True)) + + self.assertRaisesRegex(ValueError, "iterable is not divisible by n", f) + self.assertEqual( + list(mi.chunked('ABCDEF', 3, strict=True)), + [['A', 'B', 'C'], ['D', 'E', 'F']], + ) + + def test_strict_being_true_with_size_none(self): + """Test when ``n`` has value ``None`` and the keyword strict is True + (raising an exception). + + """ + + def f(): + return list(mi.chunked('ABCDE', None, strict=True)) + + self.assertRaisesRegex( + ValueError, "n must not be None when using strict mode.", f + ) + + +class FirstTests(TestCase): + def test_many(self): + # Also try it on a generator expression to make sure it works on + # whatever those return, across Python versions. + self.assertEqual(mi.first(x for x in range(4)), 0) + + def test_one(self): + self.assertEqual(mi.first([3]), 3) + + def test_empty(self): + with self.assertRaises(ValueError): + mi.first([]) + + def test_default(self): + self.assertEqual(mi.first([], 'boo'), 'boo') + + +class IterOnlyRange: + """User-defined iterable class which only support __iter__. + + >>> r = IterOnlyRange(5) + >>> r[0] + AttributeError: IterOnlyRange instance has no attribute '__getitem__' + + Note: In Python 3, ``TypeError`` will be raised because ``object`` is + inherited implicitly by default. + + >>> r[0] + TypeError: 'IterOnlyRange' object does not support indexing + """ + + def __init__(self, n): + """Set the length of the range.""" + self.n = n + + def __iter__(self): + """Works same as range().""" + return iter(range(self.n)) + + +class LastTests(TestCase): + def test_basic(self): + cases = [ + (range(4), 3), + (iter(range(4)), 3), + (range(1), 0), + (iter(range(1)), 0), + (IterOnlyRange(5), 4), + ({n: str(n) for n in range(5)}, 4), + ({0: '0', -1: '-1', 2: '-2'}, 2), + ] + + for iterable, expected in cases: + with self.subTest(iterable=iterable): + self.assertEqual(mi.last(iterable), expected) + + def test_default(self): + for iterable, default, expected in [ + (range(1), None, 0), + ([], None, None), + ({}, None, None), + (iter([]), None, None), + ]: + with self.subTest(args=(iterable, default)): + self.assertEqual(mi.last(iterable, default=default), expected) + + def test_empty(self): + for iterable in ([], iter(range(0))): + with self.subTest(iterable=iterable): + with self.assertRaises(ValueError): + mi.last(iterable) + + def test_reversed_is_none(self): + # See https://github.com/more-itertools/more-itertools/issues/1001 + class ReversedIsNone: + __reversed__ = None + + def __iter__(self): + return iter([1]) + + self.assertEqual(mi.last(ReversedIsNone()), 1) + + +class NthOrLastTests(TestCase): + """Tests for ``nth_or_last()``""" + + def test_basic(self): + self.assertEqual(mi.nth_or_last(range(3), 1), 1) + self.assertEqual(mi.nth_or_last(range(3), 3), 2) + + def test_default_value(self): + default = 42 + self.assertEqual(mi.nth_or_last(range(0), 3, default), default) + + def test_empty_iterable_no_default(self): + self.assertRaises(ValueError, lambda: mi.nth_or_last(range(0), 0)) + + +class PeekableMixinTests: + """Common tests for ``peekable()`` and ``seekable()`` behavior""" + + cls = None + + def test_passthrough(self): + """Iterating a peekable without using ``peek()`` or ``prepend()`` + should just give the underlying iterable's elements (a trivial test but + useful to set a baseline in case something goes wrong)""" + expected = [1, 2, 3, 4, 5] + actual = list(self.cls(expected)) + self.assertEqual(actual, expected) + + def test_peek_default(self): + """Make sure passing a default into ``peek()`` works.""" + p = self.cls([]) + self.assertEqual(p.peek(7), 7) + + def test_truthiness(self): + """Make sure a ``peekable`` tests true iff there are items remaining in + the iterable. + + """ + p = self.cls([]) + self.assertFalse(p) + + p = self.cls(range(3)) + self.assertTrue(p) + + def test_simple_peeking(self): + """Make sure ``next`` and ``peek`` advance and don't advance the + iterator, respectively. + + """ + p = self.cls(range(10)) + self.assertEqual(next(p), 0) + self.assertEqual(p.peek(), 1) + self.assertEqual(p.peek(), 1) + self.assertEqual(next(p), 1) + + +class PeekableTests(PeekableMixinTests, TestCase): + cls = mi.peekable + + def test_indexing(self): + """ + Indexing into the peekable shouldn't advance the iterator. + """ + p = mi.peekable('abcdefghijkl') + + # The 0th index is what ``next()`` will return + self.assertEqual(p[0], 'a') + self.assertEqual(next(p), 'a') + + # Indexing further into the peekable shouldn't advance the iterator + self.assertEqual(p[2], 'd') + self.assertEqual(next(p), 'b') + + # The 0th index moves up with the iterator; the last index follows + self.assertEqual(p[0], 'c') + self.assertEqual(p[9], 'l') + + self.assertEqual(next(p), 'c') + self.assertEqual(p[8], 'l') + + # Negative indexing should work too + self.assertEqual(p[-2], 'k') + self.assertEqual(p[-9], 'd') + self.assertRaises(IndexError, lambda: p[-10]) + + def test_slicing(self): + """Slicing the peekable shouldn't advance the iterator.""" + seq = list('abcdefghijkl') + p = mi.peekable(seq) + + # Slicing the peekable should just be like slicing a re-iterable + self.assertEqual(p[1:4], seq[1:4]) + + # Advancing the iterator moves the slices up also + self.assertEqual(next(p), 'a') + self.assertEqual(p[1:4], seq[1:][1:4]) + + # Implicit starts and stop should work + self.assertEqual(p[:5], seq[1:][:5]) + self.assertEqual(p[:], seq[1:][:]) + + # Indexing past the end should work + self.assertEqual(p[:100], seq[1:][:100]) + + # Steps should work, including negative + self.assertEqual(p[::2], seq[1:][::2]) + self.assertEqual(p[::-1], seq[1:][::-1]) + + def test_slicing_reset(self): + """Test slicing on a fresh iterable each time""" + iterable = ['0', '1', '2', '3', '4', '5'] + indexes = list(range(-4, len(iterable) + 4)) + [None] + steps = [1, 2, 3, 4, -1, -2, -3, 4] + for slice_args in product(indexes, indexes, steps): + it = iter(iterable) + p = mi.peekable(it) + next(p) + index = slice(*slice_args) + actual = p[index] + expected = iterable[1:][index] + self.assertEqual(actual, expected, slice_args) + + def test_slicing_error(self): + iterable = '01234567' + p = mi.peekable(iter(iterable)) + + # Prime the cache + p.peek() + old_cache = list(p._cache) + + # Illegal slice + with self.assertRaises(ValueError): + p[1:-1:0] + + # Neither the cache nor the iteration should be affected + self.assertEqual(old_cache, list(p._cache)) + self.assertEqual(list(p), list(iterable)) + + # prepend() behavior tests + + def test_prepend(self): + """Tests interspersed ``prepend()`` and ``next()`` calls""" + it = mi.peekable(range(2)) + actual = [] + + # Test prepend() before next() + it.prepend(10) + actual += [next(it), next(it)] + + # Test prepend() between next()s + it.prepend(11) + actual += [next(it), next(it)] + + # Test prepend() after source iterable is consumed + it.prepend(12) + actual += [next(it)] + + expected = [10, 0, 11, 1, 12] + self.assertEqual(actual, expected) + + def test_multi_prepend(self): + """Tests prepending multiple items and getting them in proper order""" + it = mi.peekable(range(5)) + actual = [next(it), next(it)] + it.prepend(10, 11, 12) + it.prepend(20, 21) + actual += list(it) + expected = [0, 1, 20, 21, 10, 11, 12, 2, 3, 4] + self.assertEqual(actual, expected) + + def test_empty(self): + """Tests prepending in front of an empty iterable""" + it = mi.peekable([]) + it.prepend(10) + actual = list(it) + expected = [10] + self.assertEqual(actual, expected) + + def test_prepend_truthiness(self): + """Tests that ``__bool__()`` or ``__nonzero__()`` works properly + with ``prepend()``""" + it = mi.peekable(range(5)) + self.assertTrue(it) + actual = list(it) + self.assertFalse(it) + it.prepend(10) + self.assertTrue(it) + actual += [next(it)] + self.assertFalse(it) + expected = [0, 1, 2, 3, 4, 10] + self.assertEqual(actual, expected) + + def test_multi_prepend_peek(self): + """Tests prepending multiple elements and getting them in reverse order + while peeking""" + it = mi.peekable(range(5)) + actual = [next(it), next(it)] + self.assertEqual(it.peek(), 2) + it.prepend(10, 11, 12) + self.assertEqual(it.peek(), 10) + it.prepend(20, 21) + self.assertEqual(it.peek(), 20) + actual += list(it) + self.assertFalse(it) + expected = [0, 1, 20, 21, 10, 11, 12, 2, 3, 4] + self.assertEqual(actual, expected) + + def test_prepend_after_stop(self): + """Test resuming iteration after a previous exhaustion""" + it = mi.peekable(range(3)) + self.assertEqual(list(it), [0, 1, 2]) + self.assertRaises(StopIteration, lambda: next(it)) + it.prepend(10) + self.assertEqual(next(it), 10) + self.assertRaises(StopIteration, lambda: next(it)) + + def test_prepend_slicing(self): + """Tests interaction between prepending and slicing""" + seq = list(range(20)) + p = mi.peekable(seq) + + p.prepend(30, 40, 50) + pseq = [30, 40, 50] + seq # pseq for prepended_seq + + # adapt the specific tests from test_slicing + self.assertEqual(p[0], 30) + self.assertEqual(p[1:8], pseq[1:8]) + self.assertEqual(p[1:], pseq[1:]) + self.assertEqual(p[:5], pseq[:5]) + self.assertEqual(p[:], pseq[:]) + self.assertEqual(p[:100], pseq[:100]) + self.assertEqual(p[::2], pseq[::2]) + self.assertEqual(p[::-1], pseq[::-1]) + + def test_prepend_indexing(self): + """Tests interaction between prepending and indexing""" + seq = list(range(20)) + p = mi.peekable(seq) + + p.prepend(30, 40, 50) + + self.assertEqual(p[0], 30) + self.assertEqual(next(p), 30) + self.assertEqual(p[2], 0) + self.assertEqual(next(p), 40) + self.assertEqual(p[0], 50) + self.assertEqual(p[9], 8) + self.assertEqual(next(p), 50) + self.assertEqual(p[8], 8) + self.assertEqual(p[-2], 18) + self.assertEqual(p[-9], 11) + self.assertRaises(IndexError, lambda: p[-21]) + + def test_prepend_iterable(self): + """Tests prepending from an iterable""" + it = mi.peekable(range(5)) + # Don't directly use the range() object to avoid any range-specific + # optimizations + it.prepend(*(x for x in range(5))) + actual = list(it) + expected = list(chain(range(5), range(5))) + self.assertEqual(actual, expected) + + def test_prepend_many(self): + """Tests that prepending a huge number of elements works""" + it = mi.peekable(range(5)) + # Don't directly use the range() object to avoid any range-specific + # optimizations + it.prepend(*(x for x in range(20000))) + actual = list(it) + expected = list(chain(range(20000), range(5))) + self.assertEqual(actual, expected) + + def test_prepend_reversed(self): + """Tests prepending from a reversed iterable""" + it = mi.peekable(range(3)) + it.prepend(*reversed((10, 11, 12))) + actual = list(it) + expected = [12, 11, 10, 0, 1, 2] + self.assertEqual(actual, expected) + + +class ConsumerTests(TestCase): + """Tests for ``consumer()``""" + + def test_consumer(self): + @mi.consumer + def eater(): + while True: + x = yield # noqa + + e = eater() + e.send('hi') # without @consumer, would raise TypeError + + +class DistinctPermutationsTests(TestCase): + def test_basic(self): + iterable = ['z', 'a', 'a', 'q', 'q', 'q', 'y'] + actual = list(mi.distinct_permutations(iterable)) + expected = set(permutations(iterable)) + self.assertCountEqual(actual, expected) + + def test_r(self): + for iterable, r in ( + ('mississippi', 0), + ('mississippi', 1), + ('mississippi', 6), + ('mississippi', 7), + ('mississippi', 12), + ([0, 1, 1, 0], 0), + ([0, 1, 1, 0], 1), + ([0, 1, 1, 0], 2), + ([0, 1, 1, 0], 3), + ([0, 1, 1, 0], 4), + (['a'], 0), + (['a'], 1), + (['a'], 5), + ([], 0), + ([], 1), + ([], 4), + ): + with self.subTest(iterable=iterable, r=r): + expected = set(permutations(iterable, r)) + actual = list(mi.distinct_permutations(iter(iterable), r)) + self.assertCountEqual(actual, expected) + + def test_unsortable(self): + iterable = ['1', 2, 2, 3, 3, 3] + actual = list(mi.distinct_permutations(iterable)) + expected = set(permutations(iterable)) + self.assertCountEqual(actual, expected) + + def test_unsortable_r(self): + iterable = ['1', 2, 2, 3, 3, 3] + for r in range(len(iterable) + 1): + with self.subTest(iterable=iterable, r=r): + actual = list(mi.distinct_permutations(iterable, r=r)) + expected = set(permutations(iterable, r=r)) + self.assertCountEqual(actual, expected) + + def test_unsorted_equivalent(self): + iterable = [1, True, '3'] + actual = list(mi.distinct_permutations(iterable)) + expected = set(permutations(iterable)) + self.assertCountEqual(actual, expected) + + def test_unhashable(self): + iterable = ([1], [1], 2) + actual = list(mi.distinct_permutations(iterable)) + expected = list(mi.unique_everseen(permutations(iterable))) + self.assertCountEqual(actual, expected) + + +class DerangementsTests(TestCase): + def test_unique_values(self): + n = 8 + expected = set( + x + for x in permutations(range(n)) + if not any(x[i] == i for i in range(n)) + ) + for i, iterable in enumerate( + [ + range(n), + list(range(n)), + set(range(n)), + ] + ): + actual = set(mi.derangements(iterable)) + self.assertEqual(actual, expected) + + def test_repeated_values(self): + self.assertEqual( + [''.join(x) for x in mi.derangements('AACD')], + [ + 'AADC', + 'ACDA', + 'ADAC', + 'CADA', + 'CDAA', + 'CDAA', + 'DAAC', + 'DCAA', + 'DCAA', + ], + ) + + def test_unsortable_unhashable(self): + iterable = (0, True, ['Carol']) + actual = list(mi.derangements(iterable)) + expected = [(True, ['Carol'], 0), (['Carol'], 0, True)] + self.assertListEqual(actual, expected) + + def test_r(self): + s = 'ABCD' + for r, expected in [ + (0, ['']), + (1, ['B', 'C', 'D']), + (2, ['BA', 'BC', 'BD', 'CA', 'CD', 'DA', 'DC']), + ( + 3, + [ + 'BAD', + 'BCA', + 'BCD', + 'BDA', + 'CAB', + 'CAD', + 'CDA', + 'CDB', + 'DAB', + 'DCA', + 'DCB', + ], + ), + ( + 4, + [ + 'BADC', + 'BCDA', + 'BDAC', + 'CADB', + 'CDAB', + 'CDBA', + 'DABC', + 'DCAB', + 'DCBA', + ], + ), + ]: + with self.subTest(r=r): + actual = [''.join(x) for x in mi.derangements(s, r=r)] + self.assertEqual(actual, expected) + + +class IlenTests(TestCase): + def test_ilen(self): + """Sanity-checks for ``ilen()``.""" + # Non-empty + self.assertEqual( + mi.ilen(filter(lambda x: x % 10 == 0, range(101))), 11 + ) + + # Empty + self.assertEqual(mi.ilen(x for x in range(0)), 0) + + # Iterable with __len__ + self.assertEqual(mi.ilen(list(range(6))), 6) + + +class MinMaxTests(TestCase): + def test_basic(self): + for iterable, expected in ( + # easy case + ([0, 1, 2, 3], (0, 3)), + # min and max are not in the extremes + we have `int`s and `float`s + ([3, 5.5, -1, 2], (-1, 5.5)), + # unordered collection + ({3, 5.5, -1, 2}, (-1, 5.5)), + # with repetitions + ([3, 5.5, float('-Inf'), 5.5], (float('-Inf'), 5.5)), + # other collections + ('banana', ('a', 'n')), + ({0: 1, 2: 100, 1: 10}, (0, 2)), + (range(3, 14), (3, 13)), + ): + with self.subTest(iterable=iterable, expected=expected): + # check for expected results + self.assertTupleEqual(mi.minmax(iterable), expected) + # check for equality with built-in `min` and `max` + self.assertTupleEqual( + mi.minmax(iterable), (min(iterable), max(iterable)) + ) + + def test_unpacked(self): + self.assertTupleEqual(mi.minmax(2, 3, 1), (1, 3)) + self.assertTupleEqual(mi.minmax(12, 3, 4, key=str), (12, 4)) + + def test_iterables(self): + self.assertTupleEqual(mi.minmax(x for x in [0, 1, 2, 3]), (0, 3)) + self.assertTupleEqual( + mi.minmax(map(str, [3, 5.5, 'a', 2])), ('2', 'a') + ) + self.assertTupleEqual( + mi.minmax(filter(None, [0, 3, '', None, 10])), (3, 10) + ) + + def test_key(self): + self.assertTupleEqual( + mi.minmax({(), (1, 4, 2), 'abcde', range(4)}, key=len), + ((), 'abcde'), + ) + self.assertTupleEqual( + mi.minmax((x for x in [10, 3, 25]), key=str), (10, 3) + ) + + def test_default(self): + with self.assertRaises(ValueError): + mi.minmax([]) + + self.assertIs(mi.minmax([], default=None), None) + self.assertListEqual(mi.minmax([], default=[1, 'a']), [1, 'a']) + + +class WithIterTests(TestCase): + def test_with_iter(self): + s = StringIO('One fish\nTwo fish') + initial_words = [line.split()[0] for line in mi.with_iter(s)] + + # Iterable's items should be faithfully represented + self.assertEqual(initial_words, ['One', 'Two']) + # The file object should be closed + self.assertTrue(s.closed) + + +class OneTests(TestCase): + def test_basic(self): + it = iter(['item']) + self.assertEqual(mi.one(it), 'item') + + def test_too_short_new(self): + it = iter([]) + self.assertRaises(ValueError, lambda: mi.one(it)) + self.assertRaises( + OverflowError, lambda: mi.one(it, too_short=OverflowError) + ) + + def test_too_long(self): + it = count() + self.assertRaises(ValueError, lambda: mi.one(it)) # burn 0 and 1 + self.assertEqual(next(it), 2) + self.assertRaises( + OverflowError, lambda: mi.one(it, too_long=OverflowError) + ) + + def test_too_long_default_message(self): + it = count() + self.assertRaisesRegex( + ValueError, + "Expected exactly one item in " + "iterable, but got 0, 1, and " + "perhaps more.", + lambda: mi.one(it), + ) + + +class IntersperseTest(TestCase): + """Tests for intersperse()""" + + def test_even(self): + iterable = (x for x in '01') + self.assertEqual( + list(mi.intersperse(None, iterable)), ['0', None, '1'] + ) + + def test_odd(self): + iterable = (x for x in '012') + self.assertEqual( + list(mi.intersperse(None, iterable)), ['0', None, '1', None, '2'] + ) + + def test_nested(self): + element = ('a', 'b') + iterable = (x for x in '012') + actual = list(mi.intersperse(element, iterable)) + expected = ['0', ('a', 'b'), '1', ('a', 'b'), '2'] + self.assertEqual(actual, expected) + + def test_not_iterable(self): + self.assertRaises(TypeError, lambda: mi.intersperse('x', 1)) + + def test_n(self): + for n, element, expected in [ + (1, '_', ['0', '_', '1', '_', '2', '_', '3', '_', '4', '_', '5']), + (2, '_', ['0', '1', '_', '2', '3', '_', '4', '5']), + (3, '_', ['0', '1', '2', '_', '3', '4', '5']), + (4, '_', ['0', '1', '2', '3', '_', '4', '5']), + (5, '_', ['0', '1', '2', '3', '4', '_', '5']), + (6, '_', ['0', '1', '2', '3', '4', '5']), + (7, '_', ['0', '1', '2', '3', '4', '5']), + (3, ['a', 'b'], ['0', '1', '2', ['a', 'b'], '3', '4', '5']), + ]: + iterable = (x for x in '012345') + actual = list(mi.intersperse(element, iterable, n=n)) + self.assertEqual(actual, expected) + + def test_n_zero(self): + self.assertRaises( + ValueError, lambda: list(mi.intersperse('x', '012', n=0)) + ) + + +class UniqueToEachTests(TestCase): + """Tests for ``unique_to_each()``""" + + def test_all_unique(self): + """When all the input iterables are unique the output should match + the input.""" + iterables = [[1, 2], [3, 4, 5], [6, 7, 8]] + self.assertEqual(mi.unique_to_each(*iterables), iterables) + + def test_duplicates(self): + """When there are duplicates in any of the input iterables that aren't + in the rest, those duplicates should be emitted.""" + iterables = ["mississippi", "missouri"] + self.assertEqual( + mi.unique_to_each(*iterables), [['p', 'p'], ['o', 'u', 'r']] + ) + + def test_mixed(self): + """When the input iterables contain different types the function should + still behave properly""" + iterables = ['x', (i for i in range(3)), [1, 2, 3], tuple()] + self.assertEqual(mi.unique_to_each(*iterables), [['x'], [0], [3], []]) + + +class WindowedTests(TestCase): + def test_basic(self): + iterable = [1, 2, 3, 4, 5] + + for n, expected in ( + (6, [(1, 2, 3, 4, 5, None)]), + (5, [(1, 2, 3, 4, 5)]), + (4, [(1, 2, 3, 4), (2, 3, 4, 5)]), + (3, [(1, 2, 3), (2, 3, 4), (3, 4, 5)]), + (2, [(1, 2), (2, 3), (3, 4), (4, 5)]), + (1, [(1,), (2,), (3,), (4,), (5,)]), + (0, [()]), + ): + with self.subTest(n=n): + actual = list(mi.windowed(iterable, n)) + self.assertEqual(actual, expected) + + def test_fillvalue(self): + actual = list(mi.windowed([1, 2, 3, 4, 5], 6, fillvalue='!')) + expected = [(1, 2, 3, 4, 5, '!')] + self.assertEqual(actual, expected) + + def test_step(self): + iterable = [1, 2, 3, 4, 5, 6, 7] + for n, step, expected in [ + (3, 2, [(1, 2, 3), (3, 4, 5), (5, 6, 7)]), # n > step + (3, 3, [(1, 2, 3), (4, 5, 6), (7, None, None)]), # n == step + (3, 4, [(1, 2, 3), (5, 6, 7)]), # lines up nicely + (3, 5, [(1, 2, 3), (6, 7, None)]), # off by one + (3, 6, [(1, 2, 3), (7, None, None)]), # off by two + (3, 7, [(1, 2, 3)]), # step past the end + (7, 8, [(1, 2, 3, 4, 5, 6, 7)]), # step > len(iterable) + ]: + with self.subTest(n=n, step=step): + actual = list(mi.windowed(iterable, n, step=step)) + self.assertEqual(actual, expected) + + def test_invalid_step(self): + # Step must be greater than or equal to 1 + with self.assertRaises(ValueError): + list(mi.windowed([1, 2, 3, 4, 5], 3, step=0)) + + def test_fillvalue_step(self): + actual = list(mi.windowed([1, 2, 3, 4, 5], 3, fillvalue='!', step=3)) + expected = [(1, 2, 3), (4, 5, '!')] + self.assertEqual(actual, expected) + + def test_negative(self): + with self.assertRaises(ValueError): + list(mi.windowed([1, 2, 3, 4, 5], -1)) + + def test_empty_seq(self): + actual = list(mi.windowed([], 3)) + expected = [] + self.assertEqual(actual, expected) + + +class SubstringsTests(TestCase): + def test_basic(self): + iterable = (x for x in range(4)) + actual = list(mi.substrings(iterable)) + expected = [ + (0,), + (1,), + (2,), + (3,), + (0, 1), + (1, 2), + (2, 3), + (0, 1, 2), + (1, 2, 3), + (0, 1, 2, 3), + ] + self.assertEqual(actual, expected) + + def test_strings(self): + iterable = 'abc' + actual = list(mi.substrings(iterable)) + expected = [ + ('a',), + ('b',), + ('c',), + ('a', 'b'), + ('b', 'c'), + ('a', 'b', 'c'), + ] + self.assertEqual(actual, expected) + + def test_empty(self): + iterable = iter([]) + actual = list(mi.substrings(iterable)) + expected = [] + self.assertEqual(actual, expected) + + def test_order(self): + iterable = [2, 0, 1] + actual = list(mi.substrings(iterable)) + expected = [(2,), (0,), (1,), (2, 0), (0, 1), (2, 0, 1)] + self.assertEqual(actual, expected) + + +class SubstringsIndexesTests(TestCase): + def test_basic(self): + sequence = [x for x in range(4)] + actual = list(mi.substrings_indexes(sequence)) + expected = [ + ([0], 0, 1), + ([1], 1, 2), + ([2], 2, 3), + ([3], 3, 4), + ([0, 1], 0, 2), + ([1, 2], 1, 3), + ([2, 3], 2, 4), + ([0, 1, 2], 0, 3), + ([1, 2, 3], 1, 4), + ([0, 1, 2, 3], 0, 4), + ] + self.assertEqual(actual, expected) + + def test_strings(self): + sequence = 'abc' + actual = list(mi.substrings_indexes(sequence)) + expected = [ + ('a', 0, 1), + ('b', 1, 2), + ('c', 2, 3), + ('ab', 0, 2), + ('bc', 1, 3), + ('abc', 0, 3), + ] + self.assertEqual(actual, expected) + + def test_empty(self): + sequence = [] + actual = list(mi.substrings_indexes(sequence)) + expected = [] + self.assertEqual(actual, expected) + + def test_order(self): + sequence = [2, 0, 1] + actual = list(mi.substrings_indexes(sequence)) + expected = [ + ([2], 0, 1), + ([0], 1, 2), + ([1], 2, 3), + ([2, 0], 0, 2), + ([0, 1], 1, 3), + ([2, 0, 1], 0, 3), + ] + self.assertEqual(actual, expected) + + def test_reverse(self): + sequence = [2, 0, 1] + actual = list(mi.substrings_indexes(sequence, reverse=True)) + expected = [ + ([2, 0, 1], 0, 3), + ([2, 0], 0, 2), + ([0, 1], 1, 3), + ([2], 0, 1), + ([0], 1, 2), + ([1], 2, 3), + ] + self.assertEqual(actual, expected) + + +class BucketTests(TestCase): + def test_basic(self): + iterable = [10, 20, 30, 11, 21, 31, 12, 22, 23, 33] + D = mi.bucket(iterable, key=lambda x: 10 * (x // 10)) + + # In-order access + self.assertEqual(list(D[10]), [10, 11, 12]) + + # Out of order access + self.assertEqual(list(D[30]), [30, 31, 33]) + self.assertEqual(list(D[20]), [20, 21, 22, 23]) + + self.assertEqual(list(D[40]), []) # Nothing in here! + + def test_in(self): + iterable = [10, 20, 30, 11, 21, 31, 12, 22, 23, 33] + D = mi.bucket(iterable, key=lambda x: 10 * (x // 10)) + + self.assertIn(10, D) + self.assertNotIn(40, D) + self.assertIn(20, D) + self.assertNotIn(21, D) + + # Checking in-ness shouldn't advance the iterator + self.assertEqual(next(D[10]), 10) + + def test_validator(self): + iterable = count(0) + key = lambda x: int(str(x)[0]) # First digit of each number + validator = lambda x: 0 < x < 10 # No leading zeros + D = mi.bucket(iterable, key, validator=validator) + self.assertEqual(mi.take(3, D[1]), [1, 10, 11]) + self.assertNotIn(0, D) # Non-valid entries don't return True + self.assertNotIn(0, D._cache) # Don't store non-valid entries + self.assertEqual(list(D[0]), []) + + def test_list(self): + iterable = [10, 20, 30, 11, 21, 31, 12, 22, 23, 33] + D = mi.bucket(iterable, key=lambda x: 10 * (x // 10)) + self.assertEqual(list(D[10]), [10, 11, 12]) + self.assertEqual(list(D[20]), [20, 21, 22, 23]) + self.assertEqual(list(D[30]), [30, 31, 33]) + self.assertEqual(set(D), {10, 20, 30}) + + def test_list_validator(self): + iterable = [10, 20, 30, 11, 21, 31, 12, 22, 23, 33] + key = lambda x: 10 * (x // 10) + validator = lambda x: x != 20 + D = mi.bucket(iterable, key, validator=validator) + self.assertEqual(set(D), {10, 30}) + self.assertEqual(list(D[10]), [10, 11, 12]) + self.assertEqual(list(D[20]), []) + self.assertEqual(list(D[30]), [30, 31, 33]) + + +class SpyTests(TestCase): + """Tests for ``spy()``""" + + def test_basic(self): + original_iterable = iter('abcdefg') + head, new_iterable = mi.spy(original_iterable) + self.assertEqual(head, ['a']) + self.assertEqual( + list(new_iterable), ['a', 'b', 'c', 'd', 'e', 'f', 'g'] + ) + + def test_unpacking(self): + original_iterable = iter('abcdefg') + (first, second, third), new_iterable = mi.spy(original_iterable, 3) + self.assertEqual(first, 'a') + self.assertEqual(second, 'b') + self.assertEqual(third, 'c') + self.assertEqual( + list(new_iterable), ['a', 'b', 'c', 'd', 'e', 'f', 'g'] + ) + + def test_too_many(self): + original_iterable = iter('abc') + head, new_iterable = mi.spy(original_iterable, 4) + self.assertEqual(head, ['a', 'b', 'c']) + self.assertEqual(list(new_iterable), ['a', 'b', 'c']) + + def test_zero(self): + original_iterable = iter('abc') + head, new_iterable = mi.spy(original_iterable, 0) + self.assertEqual(head, []) + self.assertEqual(list(new_iterable), ['a', 'b', 'c']) + + def test_immutable(self): + original_iterable = iter('abcdefg') + head, new_iterable = mi.spy(original_iterable, 3) + head[0] = 'A' + self.assertEqual(head, ['A', 'b', 'c']) + self.assertEqual( + list(new_iterable), ['a', 'b', 'c', 'd', 'e', 'f', 'g'] + ) + + +class InterleaveTests(TestCase): + def test_even(self): + actual = list(mi.interleave([1, 4, 7], [2, 5, 8], [3, 6, 9])) + expected = [1, 2, 3, 4, 5, 6, 7, 8, 9] + self.assertEqual(actual, expected) + + def test_short(self): + actual = list(mi.interleave([1, 4], [2, 5, 7], [3, 6, 8])) + expected = [1, 2, 3, 4, 5, 6] + self.assertEqual(actual, expected) + + def test_mixed_types(self): + it_list = ['a', 'b', 'c', 'd'] + it_str = '12345' + it_inf = count() + actual = list(mi.interleave(it_list, it_str, it_inf)) + expected = ['a', '1', 0, 'b', '2', 1, 'c', '3', 2, 'd', '4', 3] + self.assertEqual(actual, expected) + + +class InterleaveLongestTests(TestCase): + def test_even(self): + actual = list(mi.interleave_longest([1, 4, 7], [2, 5, 8], [3, 6, 9])) + expected = [1, 2, 3, 4, 5, 6, 7, 8, 9] + self.assertEqual(actual, expected) + + def test_short(self): + actual = list(mi.interleave_longest([1, 4], [2, 5, 7], [3, 6, 8])) + expected = [1, 2, 3, 4, 5, 6, 7, 8] + self.assertEqual(actual, expected) + + def test_mixed_types(self): + it_list = ['a', 'b', 'c', 'd'] + it_str = '12345' + it_gen = (x for x in range(3)) + actual = list(mi.interleave_longest(it_list, it_str, it_gen)) + expected = ['a', '1', 0, 'b', '2', 1, 'c', '3', 2, 'd', '4', '5'] + self.assertEqual(actual, expected) + + +class InterleaveEvenlyTests(TestCase): + def test_equal_lengths(self): + # when lengths are equal, the relative order shouldn't change + a = [1, 2, 3] + b = [5, 6, 7] + actual = list(mi.interleave_evenly([a, b])) + expected = [1, 5, 2, 6, 3, 7] + self.assertEqual(actual, expected) + + def test_proportional(self): + # easy case where the iterables have proportional length + a = [1, 2, 3, 4] + b = [5, 6] + actual = list(mi.interleave_evenly([a, b])) + expected = [1, 2, 5, 3, 4, 6] + self.assertEqual(actual, expected) + + # swapping a and b should yield the same result + actual_swapped = list(mi.interleave_evenly([b, a])) + self.assertEqual(actual_swapped, expected) + + def test_not_proportional(self): + a = [1, 2, 3, 4, 5, 6, 7] + b = [8, 9, 10] + expected = [1, 2, 8, 3, 4, 9, 5, 6, 10, 7] + actual = list(mi.interleave_evenly([a, b])) + self.assertEqual(actual, expected) + + def test_degenerate_one(self): + a = [0, 1, 2, 3, 4] + b = [5] + expected = [0, 1, 2, 5, 3, 4] + actual = list(mi.interleave_evenly([a, b])) + self.assertEqual(actual, expected) + + def test_degenerate_empty(self): + a = [1, 2, 3] + b = [] + expected = [1, 2, 3] + actual = list(mi.interleave_evenly([a, b])) + self.assertEqual(actual, expected) + + def test_three_iters(self): + a = ["a1", "a2", "a3", "a4", "a5"] + b = ["b1", "b2", "b3"] + c = ["c1"] + actual = list(mi.interleave_evenly([a, b, c])) + expected = ["a1", "b1", "a2", "c1", "a3", "b2", "a4", "b3", "a5"] + self.assertEqual(actual, expected) + + def test_many_iters(self): + # smoke test with many iterables: create iterables with a random + # number of elements starting with a character ("a0", "a1", ...) + rng = Random(0) + iterables = [] + for ch in ascii_letters: + length = rng.randint(0, 100) + iterable = [f"{ch}{i}" for i in range(length)] + iterables.append(iterable) + + interleaved = list(mi.interleave_evenly(iterables)) + + # for each iterable, check that the result contains all its items + for iterable, ch_expect in zip(iterables, ascii_letters): + interleaved_actual = [ + e for e in interleaved if e.startswith(ch_expect) + ] + assert len(set(interleaved_actual)) == len(iterable) + + def test_manual_lengths(self): + a = combinations(range(4), 2) + len_a = 4 * (4 - 1) // 2 # == 6 + b = combinations(range(4), 3) + len_b = 4 + + expected = [ + (0, 1), + (0, 1, 2), + (0, 2), + (0, 3), + (0, 1, 3), + (1, 2), + (0, 2, 3), + (1, 3), + (2, 3), + (1, 2, 3), + ] + actual = list(mi.interleave_evenly([a, b], lengths=[len_a, len_b])) + self.assertEqual(expected, actual) + + def test_no_length_raises(self): + # combinations doesn't have __len__, should trigger ValueError + iterables = [range(5), combinations(range(5), 2)] + with self.assertRaises(ValueError): + list(mi.interleave_evenly(iterables)) + + def test_argument_mismatch_raises(self): + # pass mismatching number of iterables and lengths + iterables = [range(3)] + lengths = [3, 4] + with self.assertRaises(ValueError): + list(mi.interleave_evenly(iterables, lengths=lengths)) + + +class InterleaveRandomlyTests(TestCase): + def test_basic(self): + seed(0) # For reproducibility + iterables = [1, 2, 3], 'abc', (True, False, None) + self.assertEqual( + list(mi.interleave_randomly(*iterables)), + ['a', 'b', 1, 'c', True, False, None, 2, 3], + ) + + def test_some_empty(self): + self.assertEqual( + list(mi.interleave_randomly([1, 2, 3], [], [])), + [1, 2, 3], + ) + self.assertEqual( + list(mi.interleave_randomly([], [1, 2, 3], [])), + [1, 2, 3], + ) + self.assertEqual( + list(mi.interleave_randomly([], [], [1, 2, 3])), + [1, 2, 3], + ) + + def test_all_empty(self): + iterables = [], [], [] + self.assertEqual(list(mi.interleave_randomly(*iterables)), []) + + def test_no_args(self): + self.assertEqual(list(mi.interleave_randomly()), []) + + def test_bad_type(self): + # Should raise TypeError if not all arguments are iterable + with self.assertRaises(TypeError): + list(mi.interleave_randomly(1, [2, 3], 'abc')) + + +class TestCollapse(TestCase): + """Tests for ``collapse()``""" + + def test_collapse(self): + l = [[1], 2, [[3], 4], [[[5]]]] + self.assertEqual(list(mi.collapse(l)), [1, 2, 3, 4, 5]) + + def test_collapse_to_string(self): + l = [["s1"], "s2", [["s3"], "s4"], [[["s5"]]]] + self.assertEqual(list(mi.collapse(l)), ["s1", "s2", "s3", "s4", "s5"]) + + def test_collapse_to_bytes(self): + l = [[b"s1"], b"s2", [[b"s3"], b"s4"], [[[b"s5"]]]] + self.assertEqual( + list(mi.collapse(l)), [b"s1", b"s2", b"s3", b"s4", b"s5"] + ) + + def test_collapse_flatten(self): + l = [[1], [2], [[3], 4], [[[5]]]] + self.assertEqual(list(mi.collapse(l, levels=1)), list(mi.flatten(l))) + + def test_collapse_to_level(self): + l = [[1], 2, [[3], 4], [[[5]]]] + self.assertEqual(list(mi.collapse(l, levels=2)), [1, 2, 3, 4, [5]]) + self.assertEqual( + list(mi.collapse(mi.collapse(l, levels=1), levels=1)), + list(mi.collapse(l, levels=2)), + ) + + def test_collapse_to_list(self): + l = (1, [2], (3, [4, (5,)], 'ab')) + actual = list(mi.collapse(l, base_type=list)) + expected = [1, [2], 3, [4, (5,)], 'ab'] + self.assertEqual(actual, expected) + + +class SideEffectTests(TestCase): + """Tests for ``side_effect()``""" + + def test_individual(self): + # The function increments the counter for each call + counter = [0] + + def func(arg): + counter[0] += 1 + + result = list(mi.side_effect(func, range(10))) + self.assertEqual(result, list(range(10))) + self.assertEqual(counter[0], 10) + + def test_chunked(self): + # The function increments the counter for each call + counter = [0] + + def func(arg): + counter[0] += 1 + + result = list(mi.side_effect(func, range(10), 2)) + self.assertEqual(result, list(range(10))) + self.assertEqual(counter[0], 5) + + def test_before_after(self): + f = StringIO() + collector = [] + + def func(item): + print(item, file=f) + collector.append(f.getvalue()) + + def it(): + yield 'a' + yield 'b' + raise RuntimeError('kaboom') + + before = lambda: print('HEADER', file=f) + after = f.close + + try: + mi.consume(mi.side_effect(func, it(), before=before, after=after)) + except RuntimeError: + pass + + # The iterable should have been written to the file + self.assertEqual(collector, ['HEADER\na\n', 'HEADER\na\nb\n']) + + # The file should be closed even though something bad happened + self.assertTrue(f.closed) + + def test_before_fails(self): + f = StringIO() + func = lambda x: print(x, file=f) + + def before(): + raise RuntimeError('ouch') + + try: + mi.consume( + mi.side_effect(func, 'abc', before=before, after=f.close) + ) + except RuntimeError: + pass + + # The file should be closed even though something bad happened in the + # before function + self.assertTrue(f.closed) + + +class SlicedTests(TestCase): + """Tests for ``sliced()``""" + + def test_even(self): + """Test when the length of the sequence is divisible by *n*""" + seq = 'ABCDEFGHI' + self.assertEqual(list(mi.sliced(seq, 3)), ['ABC', 'DEF', 'GHI']) + + def test_odd(self): + """Test when the length of the sequence is not divisible by *n*""" + seq = 'ABCDEFGHI' + self.assertEqual(list(mi.sliced(seq, 4)), ['ABCD', 'EFGH', 'I']) + + def test_not_sliceable(self): + seq = (x for x in 'ABCDEFGHI') + + with self.assertRaises(TypeError): + list(mi.sliced(seq, 3)) + + def test_odd_and_strict(self): + seq = [x for x in 'ABCDEFGHI'] + + with self.assertRaises(ValueError): + list(mi.sliced(seq, 4, strict=True)) + + def test_numpy_like_array(self): + # Numpy arrays don't behave like Python lists - calling bool() + # on them doesn't return False for empty lists and True for non-empty + # ones. Emulate that behavior. + class FalseList(list): + def __getitem__(self, key): + ret = super().__getitem__(key) + if isinstance(key, slice): + return FalseList(ret) + + return ret + + def __bool__(self): + return False + + seq = FalseList(range(9)) + actual = list(mi.sliced(seq, 3)) + expected = [[0, 1, 2], [3, 4, 5], [6, 7, 8]] + self.assertEqual(actual, expected) + + +class SplitAtTests(TestCase): + def test_basic(self): + for iterable, separator in [ + ('a,bb,ccc,dddd', ','), + (',a,bb,ccc,dddd', ','), + ('a,bb,ccc,dddd,', ','), + ('a,bb,ccc,,dddd', ','), + ('', ','), + (',', ','), + ('a,bb,ccc,dddd', ';'), + ]: + with self.subTest(iterable=iterable, separator=separator): + it = iter(iterable) + pred = lambda x: x == separator + actual = [''.join(x) for x in mi.split_at(it, pred)] + expected = iterable.split(separator) + self.assertEqual(actual, expected) + + def test_maxsplit(self): + iterable = 'a,bb,ccc,dddd' + separator = ',' + pred = lambda x: x == separator + + for maxsplit in range(-1, 4): + with self.subTest(maxsplit=maxsplit): + it = iter(iterable) + result = mi.split_at(it, pred, maxsplit=maxsplit) + actual = [''.join(x) for x in result] + expected = iterable.split(separator, maxsplit) + self.assertEqual(actual, expected) + + def test_keep_separator(self): + separator = ',' + pred = lambda x: x == separator + + for iterable, expected in [ + ('a,bb,ccc', ['a', ',', 'bb', ',', 'ccc']), + (',a,bb,ccc', ['', ',', 'a', ',', 'bb', ',', 'ccc']), + ('a,bb,ccc,', ['a', ',', 'bb', ',', 'ccc', ',', '']), + ]: + with self.subTest(iterable=iterable): + it = iter(iterable) + result = mi.split_at(it, pred, keep_separator=True) + actual = [''.join(x) for x in result] + self.assertEqual(actual, expected) + + def test_combination(self): + iterable = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] + pred = lambda x: x % 3 == 0 + actual = list( + mi.split_at(iterable, pred, maxsplit=2, keep_separator=True) + ) + expected = [[1, 2], [3], [4, 5], [6], [7, 8, 9, 10]] + self.assertEqual(actual, expected) + + +class SplitBeforeTest(TestCase): + """Tests for ``split_before()``""" + + def test_starts_with_sep(self): + actual = list(mi.split_before('xooxoo', lambda c: c == 'x')) + expected = [['x', 'o', 'o'], ['x', 'o', 'o']] + self.assertEqual(actual, expected) + + def test_ends_with_sep(self): + actual = list(mi.split_before('ooxoox', lambda c: c == 'x')) + expected = [['o', 'o'], ['x', 'o', 'o'], ['x']] + self.assertEqual(actual, expected) + + def test_no_sep(self): + actual = list(mi.split_before('ooo', lambda c: c == 'x')) + expected = [['o', 'o', 'o']] + self.assertEqual(actual, expected) + + def test_empty_collection(self): + actual = list(mi.split_before([], lambda c: bool(c))) + expected = [] + self.assertEqual(actual, expected) + + def test_max_split(self): + for args, expected in [ + ( + ('a,b,c,d', lambda c: c == ',', -1), + [['a'], [',', 'b'], [',', 'c'], [',', 'd']], + ), + ( + ('a,b,c,d', lambda c: c == ',', 0), + [['a', ',', 'b', ',', 'c', ',', 'd']], + ), + ( + ('a,b,c,d', lambda c: c == ',', 1), + [['a'], [',', 'b', ',', 'c', ',', 'd']], + ), + ( + ('a,b,c,d', lambda c: c == ',', 2), + [['a'], [',', 'b'], [',', 'c', ',', 'd']], + ), + ( + ('a,b,c,d', lambda c: c == ',', 10), + [['a'], [',', 'b'], [',', 'c'], [',', 'd']], + ), + ( + ('a,b,c,d', lambda c: c == '@', 2), + [['a', ',', 'b', ',', 'c', ',', 'd']], + ), + ( + ('a,b,c,d', lambda c: c != ',', 2), + [['a', ','], ['b', ','], ['c', ',', 'd']], + ), + ]: + actual = list(mi.split_before(*args)) + self.assertEqual(actual, expected) + + +class SplitAfterTest(TestCase): + """Tests for ``split_after()``""" + + def test_starts_with_sep(self): + actual = list(mi.split_after('xooxoo', lambda c: c == 'x')) + expected = [['x'], ['o', 'o', 'x'], ['o', 'o']] + self.assertEqual(actual, expected) + + def test_ends_with_sep(self): + actual = list(mi.split_after('ooxoox', lambda c: c == 'x')) + expected = [['o', 'o', 'x'], ['o', 'o', 'x']] + self.assertEqual(actual, expected) + + def test_no_sep(self): + actual = list(mi.split_after('ooo', lambda c: c == 'x')) + expected = [['o', 'o', 'o']] + self.assertEqual(actual, expected) + + def test_max_split(self): + for args, expected in [ + ( + ('a,b,c,d', lambda c: c == ',', -1), + [['a', ','], ['b', ','], ['c', ','], ['d']], + ), + ( + ('a,b,c,d', lambda c: c == ',', 0), + [['a', ',', 'b', ',', 'c', ',', 'd']], + ), + ( + ('a,b,c,d', lambda c: c == ',', 1), + [['a', ','], ['b', ',', 'c', ',', 'd']], + ), + ( + ('a,b,c,d', lambda c: c == ',', 2), + [['a', ','], ['b', ','], ['c', ',', 'd']], + ), + ( + ('a,b,c,d', lambda c: c == ',', 10), + [['a', ','], ['b', ','], ['c', ','], ['d']], + ), + ( + ('a,b,c,d', lambda c: c == '@', 2), + [['a', ',', 'b', ',', 'c', ',', 'd']], + ), + ( + ('a,b,c,d', lambda c: c != ',', 2), + [['a'], [',', 'b'], [',', 'c', ',', 'd']], + ), + ( + ([1], lambda x: x == 1, 1), + [[1]], + ), + ]: + actual = list(mi.split_after(*args)) + self.assertEqual(actual, expected) + + +class SplitWhenTests(TestCase): + """Tests for ``split_when()``""" + + @staticmethod + def _split_when_before(iterable, pred): + return mi.split_when(iterable, lambda _, c: pred(c)) + + @staticmethod + def _split_when_after(iterable, pred): + return mi.split_when(iterable, lambda c, _: pred(c)) + + # split_before emulation + def test_before_emulation_starts_with_sep(self): + actual = list(self._split_when_before('xooxoo', lambda c: c == 'x')) + expected = [['x', 'o', 'o'], ['x', 'o', 'o']] + self.assertEqual(actual, expected) + + def test_before_emulation_ends_with_sep(self): + actual = list(self._split_when_before('ooxoox', lambda c: c == 'x')) + expected = [['o', 'o'], ['x', 'o', 'o'], ['x']] + self.assertEqual(actual, expected) + + def test_before_emulation_no_sep(self): + actual = list(self._split_when_before('ooo', lambda c: c == 'x')) + expected = [['o', 'o', 'o']] + self.assertEqual(actual, expected) + + # split_after emulation + def test_after_emulation_starts_with_sep(self): + actual = list(self._split_when_after('xooxoo', lambda c: c == 'x')) + expected = [['x'], ['o', 'o', 'x'], ['o', 'o']] + self.assertEqual(actual, expected) + + def test_after_emulation_ends_with_sep(self): + actual = list(self._split_when_after('ooxoox', lambda c: c == 'x')) + expected = [['o', 'o', 'x'], ['o', 'o', 'x']] + self.assertEqual(actual, expected) + + def test_after_emulation_no_sep(self): + actual = list(self._split_when_after('ooo', lambda c: c == 'x')) + expected = [['o', 'o', 'o']] + self.assertEqual(actual, expected) + + # edge cases + def test_empty_iterable(self): + actual = list(mi.split_when('', lambda a, b: a != b)) + expected = [] + self.assertEqual(actual, expected) + + def test_one_element(self): + actual = list(mi.split_when('o', lambda a, b: a == b)) + expected = [['o']] + self.assertEqual(actual, expected) + + def test_one_element_is_second_item(self): + actual = list(self._split_when_before('x', lambda c: c == 'x')) + expected = [['x']] + self.assertEqual(actual, expected) + + def test_one_element_is_first_item(self): + actual = list(self._split_when_after('x', lambda c: c == 'x')) + expected = [['x']] + self.assertEqual(actual, expected) + + def test_max_split(self): + for args, expected in [ + ( + ('a,b,c,d', lambda a, _: a == ',', -1), + [['a', ','], ['b', ','], ['c', ','], ['d']], + ), + ( + ('a,b,c,d', lambda a, _: a == ',', 0), + [['a', ',', 'b', ',', 'c', ',', 'd']], + ), + ( + ('a,b,c,d', lambda _, b: b == ',', 1), + [['a'], [',', 'b', ',', 'c', ',', 'd']], + ), + ( + ('a,b,c,d', lambda a, _: a == ',', 2), + [['a', ','], ['b', ','], ['c', ',', 'd']], + ), + ( + ('0124376', lambda a, b: a > b, -1), + [['0', '1', '2', '4'], ['3', '7'], ['6']], + ), + ( + ('0124376', lambda a, b: a > b, 0), + [['0', '1', '2', '4', '3', '7', '6']], + ), + ( + ('0124376', lambda a, b: a > b, 1), + [['0', '1', '2', '4'], ['3', '7', '6']], + ), + ( + ('0124376', lambda a, b: a > b, 2), + [['0', '1', '2', '4'], ['3', '7'], ['6']], + ), + ]: + actual = list(mi.split_when(*args)) + self.assertEqual(actual, expected, str(args)) + + +class SplitIntoTests(TestCase): + """Tests for ``split_into()``""" + + def test_iterable_just_right(self): + """Size of ``iterable`` equals the sum of ``sizes``.""" + iterable = [1, 2, 3, 4, 5, 6, 7, 8, 9] + sizes = [2, 3, 4] + expected = [[1, 2], [3, 4, 5], [6, 7, 8, 9]] + actual = list(mi.split_into(iterable, sizes)) + self.assertEqual(actual, expected) + + def test_iterable_too_small(self): + """Size of ``iterable`` is smaller than sum of ``sizes``. Last return + list is shorter as a result.""" + iterable = [1, 2, 3, 4, 5, 6, 7] + sizes = [2, 3, 4] + expected = [[1, 2], [3, 4, 5], [6, 7]] + actual = list(mi.split_into(iterable, sizes)) + self.assertEqual(actual, expected) + + def test_iterable_too_small_extra(self): + """Size of ``iterable`` is smaller than sum of ``sizes``. Second last + return list is shorter and last return list is empty as a result.""" + iterable = [1, 2, 3, 4, 5, 6, 7] + sizes = [2, 3, 4, 5] + expected = [[1, 2], [3, 4, 5], [6, 7], []] + actual = list(mi.split_into(iterable, sizes)) + self.assertEqual(actual, expected) + + def test_iterable_too_large(self): + """Size of ``iterable`` is larger than sum of ``sizes``. Not all + items of iterable are returned.""" + iterable = [1, 2, 3, 4, 5, 6, 7, 8, 9] + sizes = [2, 3, 2] + expected = [[1, 2], [3, 4, 5], [6, 7]] + actual = list(mi.split_into(iterable, sizes)) + self.assertEqual(actual, expected) + + def test_using_none_with_leftover(self): + """Last item of ``sizes`` is None when items still remain in + ``iterable``. Last list returned stretches to fit all remaining items + of ``iterable``.""" + iterable = [1, 2, 3, 4, 5, 6, 7, 8, 9] + sizes = [2, 3, None] + expected = [[1, 2], [3, 4, 5], [6, 7, 8, 9]] + actual = list(mi.split_into(iterable, sizes)) + self.assertEqual(actual, expected) + + def test_using_none_without_leftover(self): + """Last item of ``sizes`` is None when no items remain in + ``iterable``. Last list returned is empty.""" + iterable = [1, 2, 3, 4, 5, 6, 7, 8, 9] + sizes = [2, 3, 4, None] + expected = [[1, 2], [3, 4, 5], [6, 7, 8, 9], []] + actual = list(mi.split_into(iterable, sizes)) + self.assertEqual(actual, expected) + + def test_using_none_mid_sizes(self): + """None is present in ``sizes`` but is not the last item. Last list + returned stretches to fit all remaining items of ``iterable`` but + all items in ``sizes`` after None are ignored.""" + iterable = [1, 2, 3, 4, 5, 6, 7, 8, 9] + sizes = [2, 3, None, 4] + expected = [[1, 2], [3, 4, 5], [6, 7, 8, 9]] + actual = list(mi.split_into(iterable, sizes)) + self.assertEqual(actual, expected) + + def test_iterable_empty(self): + """``iterable`` argument is empty but ``sizes`` is not. An empty + list is returned for each item in ``sizes``.""" + iterable = [] + sizes = [2, 4, 2] + expected = [[], [], []] + actual = list(mi.split_into(iterable, sizes)) + self.assertEqual(actual, expected) + + def test_iterable_empty_using_none(self): + """``iterable`` argument is empty but ``sizes`` is not. An empty + list is returned for each item in ``sizes`` that is not after a + None item.""" + iterable = [] + sizes = [2, 4, None, 2] + expected = [[], [], []] + actual = list(mi.split_into(iterable, sizes)) + self.assertEqual(actual, expected) + + def test_sizes_empty(self): + """``sizes`` argument is empty but ``iterable`` is not. An empty + generator is returned.""" + iterable = [1, 2, 3, 4, 5, 6, 7, 8, 9] + sizes = [] + expected = [] + actual = list(mi.split_into(iterable, sizes)) + self.assertEqual(actual, expected) + + def test_both_empty(self): + """Both ``sizes`` and ``iterable`` arguments are empty. An empty + generator is returned.""" + iterable = [] + sizes = [] + expected = [] + actual = list(mi.split_into(iterable, sizes)) + self.assertEqual(actual, expected) + + def test_bool_in_sizes(self): + """A bool object is present in ``sizes`` is treated as a 1 or 0 for + ``True`` or ``False`` due to bool being an instance of int.""" + iterable = [1, 2, 3, 4, 5, 6, 7, 8, 9] + sizes = [3, True, 2, False] + expected = [[1, 2, 3], [4], [5, 6], []] + actual = list(mi.split_into(iterable, sizes)) + self.assertEqual(actual, expected) + + def test_invalid_in_sizes(self): + """A ValueError is raised if an object in ``sizes`` is neither ``None`` + or an integer.""" + iterable = [1, 2, 3, 4, 5, 6, 7, 8, 9] + sizes = [1, [], 3] + with self.assertRaises(ValueError): + list(mi.split_into(iterable, sizes)) + + def test_invalid_in_sizes_after_none(self): + """A item in ``sizes`` that is invalid will not raise a TypeError if it + comes after a ``None`` item.""" + iterable = [1, 2, 3, 4, 5, 6, 7, 8, 9] + sizes = [3, 4, None, []] + expected = [[1, 2, 3], [4, 5, 6, 7], [8, 9]] + actual = list(mi.split_into(iterable, sizes)) + self.assertEqual(actual, expected) + + def test_generator_iterable_integrity(self): + """Check that if ``iterable`` is an iterator, it is consumed only by as + many items as the sum of ``sizes``.""" + iterable = (i for i in range(10)) + sizes = [2, 3] + + expected = [[0, 1], [2, 3, 4]] + actual = list(mi.split_into(iterable, sizes)) + self.assertEqual(actual, expected) + + iterable_expected = [5, 6, 7, 8, 9] + iterable_actual = list(iterable) + self.assertEqual(iterable_actual, iterable_expected) + + def test_generator_sizes_integrity(self): + """Check that if ``sizes`` is an iterator, it is consumed only until a + ``None`` item is reached""" + iterable = [1, 2, 3, 4, 5, 6, 7, 8, 9] + sizes = (i for i in [1, 2, None, 3, 4]) + + expected = [[1], [2, 3], [4, 5, 6, 7, 8, 9]] + actual = list(mi.split_into(iterable, sizes)) + self.assertEqual(actual, expected) + + sizes_expected = [3, 4] + sizes_actual = list(sizes) + self.assertEqual(sizes_actual, sizes_expected) + + +class PaddedTest(TestCase): + """Tests for ``padded()``""" + + def test_no_n(self): + seq = [1, 2, 3] + + # No fillvalue + self.assertEqual(mi.take(5, mi.padded(seq)), [1, 2, 3, None, None]) + + # With fillvalue + self.assertEqual( + mi.take(5, mi.padded(seq, fillvalue='')), [1, 2, 3, '', ''] + ) + + def test_invalid_n(self): + self.assertRaises(ValueError, lambda: list(mi.padded([1, 2, 3], n=-1))) + self.assertRaises(ValueError, lambda: list(mi.padded([1, 2, 3], n=0))) + + def test_valid_n(self): + seq = [1, 2, 3, 4, 5] + + # No need for padding: len(seq) <= n + self.assertEqual(list(mi.padded(seq, n=4)), [1, 2, 3, 4, 5]) + self.assertEqual(list(mi.padded(seq, n=5)), [1, 2, 3, 4, 5]) + + # No fillvalue + self.assertEqual( + list(mi.padded(seq, n=7)), [1, 2, 3, 4, 5, None, None] + ) + + # With fillvalue + self.assertEqual( + list(mi.padded(seq, fillvalue='', n=7)), [1, 2, 3, 4, 5, '', ''] + ) + + def test_next_multiple(self): + seq = [1, 2, 3, 4, 5, 6] + + # No need for padding: len(seq) % n == 0 + self.assertEqual( + list(mi.padded(seq, n=3, next_multiple=True)), [1, 2, 3, 4, 5, 6] + ) + + # Padding needed: len(seq) < n + self.assertEqual( + list(mi.padded(seq, n=8, next_multiple=True)), + [1, 2, 3, 4, 5, 6, None, None], + ) + + # No padding needed: len(seq) == n + self.assertEqual( + list(mi.padded(seq, n=6, next_multiple=True)), [1, 2, 3, 4, 5, 6] + ) + + # Padding needed: len(seq) > n + self.assertEqual( + list(mi.padded(seq, n=4, next_multiple=True)), + [1, 2, 3, 4, 5, 6, None, None], + ) + + # With fillvalue + self.assertEqual( + list(mi.padded(seq, fillvalue='', n=4, next_multiple=True)), + [1, 2, 3, 4, 5, 6, '', ''], + ) + + +class RepeatEachTests(TestCase): + """Tests for repeat_each()""" + + def test_default(self): + actual = list(mi.repeat_each('ABC')) + expected = ['A', 'A', 'B', 'B', 'C', 'C'] + self.assertEqual(actual, expected) + + def test_basic(self): + actual = list(mi.repeat_each('ABC', 3)) + expected = ['A', 'A', 'A', 'B', 'B', 'B', 'C', 'C', 'C'] + self.assertEqual(actual, expected) + + def test_empty(self): + actual = list(mi.repeat_each('')) + expected = [] + self.assertEqual(actual, expected) + + def test_no_repeat(self): + actual = list(mi.repeat_each('ABC', 0)) + expected = [] + self.assertEqual(actual, expected) + + def test_negative_repeat(self): + actual = list(mi.repeat_each('ABC', -1)) + expected = [] + self.assertEqual(actual, expected) + + def test_infinite_input(self): + repeater = mi.repeat_each(cycle('AB')) + actual = mi.take(6, repeater) + expected = ['A', 'A', 'B', 'B', 'A', 'A'] + self.assertEqual(actual, expected) + + +class RepeatLastTests(TestCase): + def test_empty_iterable(self): + slice_length = 3 + iterable = iter([]) + actual = mi.take(slice_length, mi.repeat_last(iterable)) + expected = [None] * slice_length + self.assertEqual(actual, expected) + + def test_default_value(self): + slice_length = 3 + iterable = iter([]) + default = '3' + actual = mi.take(slice_length, mi.repeat_last(iterable, default)) + expected = ['3'] * slice_length + self.assertEqual(actual, expected) + + def test_basic(self): + slice_length = 10 + iterable = (str(x) for x in range(5)) + actual = mi.take(slice_length, mi.repeat_last(iterable)) + expected = ['0', '1', '2', '3', '4', '4', '4', '4', '4', '4'] + self.assertEqual(actual, expected) + + +class DistributeTest(TestCase): + """Tests for distribute()""" + + def test_invalid_n(self): + self.assertRaises(ValueError, lambda: mi.distribute(-1, [1, 2, 3])) + self.assertRaises(ValueError, lambda: mi.distribute(0, [1, 2, 3])) + + def test_basic(self): + iterable = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] + + for n, expected in [ + (1, [iterable]), + (2, [[1, 3, 5, 7, 9], [2, 4, 6, 8, 10]]), + (3, [[1, 4, 7, 10], [2, 5, 8], [3, 6, 9]]), + (10, [[n] for n in range(1, 10 + 1)]), + ]: + self.assertEqual( + [list(x) for x in mi.distribute(n, iterable)], expected + ) + + def test_large_n(self): + iterable = [1, 2, 3, 4] + self.assertEqual( + [list(x) for x in mi.distribute(6, iterable)], + [[1], [2], [3], [4], [], []], + ) + + +class StaggerTest(TestCase): + """Tests for ``stagger()``""" + + def test_default(self): + iterable = [0, 1, 2, 3] + actual = list(mi.stagger(iterable)) + expected = [(None, 0, 1), (0, 1, 2), (1, 2, 3)] + self.assertEqual(actual, expected) + + def test_offsets(self): + iterable = [0, 1, 2, 3] + for offsets, expected in [ + ((-2, 0, 2), [('', 0, 2), ('', 1, 3)]), + ((-2, -1), [('', ''), ('', 0), (0, 1), (1, 2), (2, 3)]), + ((1, 2), [(1, 2), (2, 3)]), + ]: + all_groups = mi.stagger(iterable, offsets=offsets, fillvalue='') + self.assertEqual(list(all_groups), expected) + + def test_longest(self): + iterable = [0, 1, 2, 3] + for offsets, expected in [ + ( + (-1, 0, 1), + [('', 0, 1), (0, 1, 2), (1, 2, 3), (2, 3, ''), (3, '', '')], + ), + ((-2, -1), [('', ''), ('', 0), (0, 1), (1, 2), (2, 3), (3, '')]), + ((1, 2), [(1, 2), (2, 3), (3, '')]), + ]: + all_groups = mi.stagger( + iterable, offsets=offsets, fillvalue='', longest=True + ) + self.assertEqual(list(all_groups), expected) + + +class ZipEqualTest(TestCase): + @skipIf(version_info[:2] < (3, 10), 'zip_equal deprecated for 3.10+') + def test_deprecation(self): + with self.assertWarns(DeprecationWarning): + self.assertEqual( + list(mi.zip_equal([1, 2], [3, 4])), [(1, 3), (2, 4)] + ) + + def test_equal(self): + lists = [0, 1, 2], [2, 3, 4] + + for iterables in [lists, map(iter, lists)]: + actual = list(mi.zip_equal(*iterables)) + expected = [(0, 2), (1, 3), (2, 4)] + self.assertEqual(actual, expected) + + def test_unequal_lists(self): + two_items = [0, 1] + three_items = [2, 3, 4] + four_items = [5, 6, 7, 8] + + # the mismatch is at index 1 + try: + list(mi.zip_equal(two_items, three_items, four_items)) + except mi.UnequalIterablesError as e: + self.assertEqual( + e.args[0], + ( + 'Iterables have different lengths: ' + 'index 0 has length 2; index 1 has length 3' + ), + ) + + # the mismatch is at index 2 + try: + list(mi.zip_equal(two_items, two_items, four_items, four_items)) + except mi.UnequalIterablesError as e: + self.assertEqual( + e.args[0], + ( + 'Iterables have different lengths: ' + 'index 0 has length 2; index 2 has length 4' + ), + ) + + # One without length: delegate to _zip_equal_generator + try: + list(mi.zip_equal(two_items, iter(two_items), three_items)) + except mi.UnequalIterablesError as e: + self.assertEqual(e.args[0], 'Iterables have different lengths') + + +class ZipOffsetTest(TestCase): + """Tests for ``zip_offset()``""" + + def test_shortest(self): + a_1 = [0, 1, 2, 3] + a_2 = [0, 1, 2, 3, 4, 5] + a_3 = [0, 1, 2, 3, 4, 5, 6, 7] + actual = list( + mi.zip_offset(a_1, a_2, a_3, offsets=(-1, 0, 1), fillvalue='') + ) + expected = [('', 0, 1), (0, 1, 2), (1, 2, 3), (2, 3, 4), (3, 4, 5)] + self.assertEqual(actual, expected) + + def test_longest(self): + a_1 = [0, 1, 2, 3] + a_2 = [0, 1, 2, 3, 4, 5] + a_3 = [0, 1, 2, 3, 4, 5, 6, 7] + actual = list( + mi.zip_offset(a_1, a_2, a_3, offsets=(-1, 0, 1), longest=True) + ) + expected = [ + (None, 0, 1), + (0, 1, 2), + (1, 2, 3), + (2, 3, 4), + (3, 4, 5), + (None, 5, 6), + (None, None, 7), + ] + self.assertEqual(actual, expected) + + def test_mismatch(self): + iterables = [0, 1, 2], [2, 3, 4] + offsets = (-1, 0, 1) + self.assertRaises( + ValueError, + lambda: list(mi.zip_offset(*iterables, offsets=offsets)), + ) + + +class UnzipTests(TestCase): + """Tests for unzip()""" + + def test_empty_iterable(self): + self.assertEqual(list(mi.unzip([])), []) + # in reality zip([], [], []) is equivalent to iter([]) + # but it doesn't hurt to test both + self.assertEqual(list(mi.unzip(zip([], [], []))), []) + + def test_length_one_iterable(self): + xs, ys, zs = mi.unzip(zip([1], [2], [3])) + self.assertEqual(list(xs), [1]) + self.assertEqual(list(ys), [2]) + self.assertEqual(list(zs), [3]) + + def test_normal_case(self): + xs, ys, zs = range(10), range(1, 11), range(2, 12) + zipped = zip(xs, ys, zs) + xs, ys, zs = mi.unzip(zipped) + self.assertEqual(list(xs), list(range(10))) + self.assertEqual(list(ys), list(range(1, 11))) + self.assertEqual(list(zs), list(range(2, 12))) + + def test_improperly_zipped(self): + zipped = iter([(1, 2, 3), (4, 5), (6,)]) + xs, ys, zs = mi.unzip(zipped) + self.assertEqual(list(xs), [1, 4, 6]) + self.assertEqual(list(ys), [2, 5]) + self.assertEqual(list(zs), [3]) + + def test_increasingly_zipped(self): + zipped = iter([(1, 2), (3, 4, 5), (6, 7, 8, 9)]) + unzipped = mi.unzip(zipped) + # from the docstring: + # len(first tuple) is the number of iterables zipped + self.assertEqual(len(unzipped), 2) + xs, ys = unzipped + self.assertEqual(list(xs), [1, 3, 6]) + self.assertEqual(list(ys), [2, 4, 7]) + + +class SortTogetherTest(TestCase): + """Tests for sort_together()""" + + def test_key_list(self): + """tests `key_list` including default, iterables include duplicates""" + iterables = [ + ['GA', 'GA', 'GA', 'CT', 'CT', 'CT'], + ['May', 'Aug.', 'May', 'June', 'July', 'July'], + [97, 20, 100, 70, 100, 20], + ] + + self.assertEqual( + mi.sort_together(iterables), + [ + ('CT', 'CT', 'CT', 'GA', 'GA', 'GA'), + ('June', 'July', 'July', 'May', 'Aug.', 'May'), + (70, 100, 20, 97, 20, 100), + ], + ) + + self.assertEqual( + mi.sort_together(iterables, key_list=(0, 1)), + [ + ('CT', 'CT', 'CT', 'GA', 'GA', 'GA'), + ('July', 'July', 'June', 'Aug.', 'May', 'May'), + (100, 20, 70, 20, 97, 100), + ], + ) + + self.assertEqual( + mi.sort_together(iterables, key_list=(0, 1, 2)), + [ + ('CT', 'CT', 'CT', 'GA', 'GA', 'GA'), + ('July', 'July', 'June', 'Aug.', 'May', 'May'), + (20, 100, 70, 20, 97, 100), + ], + ) + + self.assertEqual( + mi.sort_together(iterables, key_list=(2,)), + [ + ('GA', 'CT', 'CT', 'GA', 'GA', 'CT'), + ('Aug.', 'July', 'June', 'May', 'May', 'July'), + (20, 20, 70, 97, 100, 100), + ], + ) + + def test_invalid_key_list(self): + """tests `key_list` for indexes not available in `iterables`""" + iterables = [ + ['GA', 'GA', 'GA', 'CT', 'CT', 'CT'], + ['May', 'Aug.', 'May', 'June', 'July', 'July'], + [97, 20, 100, 70, 100, 20], + ] + + self.assertRaises( + IndexError, lambda: mi.sort_together(iterables, key_list=(5,)) + ) + + def test_key_function(self): + """tests `key` function, including interaction with `key_list`""" + iterables = [ + ['GA', 'GA', 'GA', 'CT', 'CT', 'CT'], + ['May', 'Aug.', 'May', 'June', 'July', 'July'], + [97, 20, 100, 70, 100, 20], + ] + self.assertEqual( + mi.sort_together(iterables, key=lambda x: x), + [ + ('CT', 'CT', 'CT', 'GA', 'GA', 'GA'), + ('June', 'July', 'July', 'May', 'Aug.', 'May'), + (70, 100, 20, 97, 20, 100), + ], + ) + self.assertEqual( + mi.sort_together(iterables, key=lambda x: x[::-1]), + [ + ('GA', 'GA', 'GA', 'CT', 'CT', 'CT'), + ('May', 'Aug.', 'May', 'June', 'July', 'July'), + (97, 20, 100, 70, 100, 20), + ], + ) + self.assertEqual( + mi.sort_together( + iterables, + key_list=(0, 2), + key=lambda state, number: ( + number if state == 'CT' else 2 * number + ), + ), + [ + ('CT', 'GA', 'CT', 'CT', 'GA', 'GA'), + ('July', 'Aug.', 'June', 'July', 'May', 'May'), + (20, 20, 70, 100, 97, 100), + ], + ) + + def test_reverse(self): + """tests `reverse` to ensure a reverse sort for `key_list` iterables""" + iterables = [ + ['GA', 'GA', 'GA', 'CT', 'CT', 'CT'], + ['May', 'Aug.', 'May', 'June', 'July', 'July'], + [97, 20, 100, 70, 100, 20], + ] + + self.assertEqual( + mi.sort_together(iterables, key_list=(0, 1, 2), reverse=True), + [ + ('GA', 'GA', 'GA', 'CT', 'CT', 'CT'), + ('May', 'May', 'Aug.', 'June', 'July', 'July'), + (100, 97, 20, 70, 100, 20), + ], + ) + + def test_uneven_iterables(self): + """tests trimming of iterables to the shortest length before sorting""" + iterables = [ + ['GA', 'GA', 'GA', 'CT', 'CT', 'CT', 'MA'], + ['May', 'Aug.', 'May', 'June', 'July', 'July'], + [97, 20, 100, 70, 100, 20, 0], + ] + + self.assertEqual( + mi.sort_together(iterables), + [ + ('CT', 'CT', 'CT', 'GA', 'GA', 'GA'), + ('June', 'July', 'July', 'May', 'Aug.', 'May'), + (70, 100, 20, 97, 20, 100), + ], + ) + + def test_strict(self): + # Test for list of lists or tuples + self.assertRaises( + mi.UnequalIterablesError, + lambda: mi.sort_together( + [(4, 3, 2, 1), ('a', 'b', 'c')], strict=True + ), + ) + + # Test for list of iterables + self.assertRaises( + mi.UnequalIterablesError, + lambda: mi.sort_together([range(4), range(5)], strict=True), + ) + + # Test for iterable of iterables + self.assertRaises( + mi.UnequalIterablesError, + lambda: mi.sort_together( + (range(i) for i in range(4)), strict=True + ), + ) + + +class DivideTest(TestCase): + """Tests for divide()""" + + def test_invalid_n(self): + self.assertRaises(ValueError, lambda: mi.divide(-1, [1, 2, 3])) + self.assertRaises(ValueError, lambda: mi.divide(0, [1, 2, 3])) + + def test_basic(self): + iterable = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] + + for n, expected in [ + (1, [iterable]), + (2, [[1, 2, 3, 4, 5], [6, 7, 8, 9, 10]]), + (3, [[1, 2, 3, 4], [5, 6, 7], [8, 9, 10]]), + (10, [[n] for n in range(1, 10 + 1)]), + ]: + self.assertEqual( + [list(x) for x in mi.divide(n, iterable)], expected + ) + + def test_large_n(self): + self.assertEqual( + [list(x) for x in mi.divide(6, iter(range(1, 4 + 1)))], + [[1], [2], [3], [4], [], []], + ) + + +class TestAlwaysIterable(TestCase): + """Tests for always_iterable()""" + + def test_single(self): + self.assertEqual(list(mi.always_iterable(1)), [1]) + + def test_strings(self): + for obj in ['foo', b'bar', 'baz']: + actual = list(mi.always_iterable(obj)) + expected = [obj] + self.assertEqual(actual, expected) + + def test_base_type(self): + dict_obj = {'a': 1, 'b': 2} + str_obj = '123' + + # Default: dicts are iterable like they normally are + default_actual = list(mi.always_iterable(dict_obj)) + default_expected = list(dict_obj) + self.assertEqual(default_actual, default_expected) + + # Unitary types set: dicts are not iterable + custom_actual = list(mi.always_iterable(dict_obj, base_type=dict)) + custom_expected = [dict_obj] + self.assertEqual(custom_actual, custom_expected) + + # With unitary types set, strings are iterable + str_actual = list(mi.always_iterable(str_obj, base_type=None)) + str_expected = list(str_obj) + self.assertEqual(str_actual, str_expected) + + # base_type handles nested tuple (via isinstance). + base_type = ((dict,),) + custom_actual = list(mi.always_iterable(dict_obj, base_type=base_type)) + custom_expected = [dict_obj] + self.assertEqual(custom_actual, custom_expected) + + def test_iterables(self): + self.assertEqual(list(mi.always_iterable([0, 1])), [0, 1]) + self.assertEqual( + list(mi.always_iterable([0, 1], base_type=list)), [[0, 1]] + ) + self.assertEqual( + list(mi.always_iterable(iter('foo'))), ['f', 'o', 'o'] + ) + self.assertEqual(list(mi.always_iterable([])), []) + + def test_none(self): + self.assertEqual(list(mi.always_iterable(None)), []) + + def test_generator(self): + def _gen(): + yield 0 + yield 1 + + self.assertEqual(list(mi.always_iterable(_gen())), [0, 1]) + + +class AdjacentTests(TestCase): + def test_typical(self): + actual = list(mi.adjacent(lambda x: x % 5 == 0, range(10))) + expected = [ + (True, 0), + (True, 1), + (False, 2), + (False, 3), + (True, 4), + (True, 5), + (True, 6), + (False, 7), + (False, 8), + (False, 9), + ] + self.assertEqual(actual, expected) + + def test_empty_iterable(self): + actual = list(mi.adjacent(lambda x: x % 5 == 0, [])) + expected = [] + self.assertEqual(actual, expected) + + def test_length_one(self): + actual = list(mi.adjacent(lambda x: x % 5 == 0, [0])) + expected = [(True, 0)] + self.assertEqual(actual, expected) + + actual = list(mi.adjacent(lambda x: x % 5 == 0, [1])) + expected = [(False, 1)] + self.assertEqual(actual, expected) + + def test_consecutive_true(self): + """Test that when the predicate matches multiple consecutive elements + it doesn't repeat elements in the output""" + actual = list(mi.adjacent(lambda x: x % 5 < 2, range(10))) + expected = [ + (True, 0), + (True, 1), + (True, 2), + (False, 3), + (True, 4), + (True, 5), + (True, 6), + (True, 7), + (False, 8), + (False, 9), + ] + self.assertEqual(actual, expected) + + def test_distance(self): + actual = list(mi.adjacent(lambda x: x % 5 == 0, range(10), distance=2)) + expected = [ + (True, 0), + (True, 1), + (True, 2), + (True, 3), + (True, 4), + (True, 5), + (True, 6), + (True, 7), + (False, 8), + (False, 9), + ] + self.assertEqual(actual, expected) + + actual = list(mi.adjacent(lambda x: x % 5 == 0, range(10), distance=3)) + expected = [ + (True, 0), + (True, 1), + (True, 2), + (True, 3), + (True, 4), + (True, 5), + (True, 6), + (True, 7), + (True, 8), + (False, 9), + ] + self.assertEqual(actual, expected) + + def test_large_distance(self): + """Test distance larger than the length of the iterable""" + iterable = range(10) + actual = list(mi.adjacent(lambda x: x % 5 == 4, iterable, distance=20)) + expected = list(zip(repeat(True), iterable)) + self.assertEqual(actual, expected) + + actual = list(mi.adjacent(lambda x: False, iterable, distance=20)) + expected = list(zip(repeat(False), iterable)) + self.assertEqual(actual, expected) + + def test_zero_distance(self): + """Test that adjacent() reduces to zip+map when distance is 0""" + iterable = range(1000) + predicate = lambda x: x % 4 == 2 + actual = mi.adjacent(predicate, iterable, 0) + expected = zip(map(predicate, iterable), iterable) + self.assertTrue(all(a == e for a, e in zip(actual, expected))) + + def test_negative_distance(self): + """Test that adjacent() raises an error with negative distance""" + pred = lambda x: x + self.assertRaises( + ValueError, lambda: mi.adjacent(pred, range(1000), -1) + ) + self.assertRaises( + ValueError, lambda: mi.adjacent(pred, range(10), -10) + ) + + def test_grouping(self): + """Test interaction of adjacent() with groupby_transform()""" + iterable = mi.adjacent(lambda x: x % 5 == 0, range(10)) + grouper = mi.groupby_transform(iterable, itemgetter(0), itemgetter(1)) + actual = [(k, list(g)) for k, g in grouper] + expected = [ + (True, [0, 1]), + (False, [2, 3]), + (True, [4, 5, 6]), + (False, [7, 8, 9]), + ] + self.assertEqual(actual, expected) + + def test_call_once(self): + """Test that the predicate is only called once per item.""" + already_seen = set() + iterable = range(10) + + def predicate(item): + self.assertNotIn(item, already_seen) + already_seen.add(item) + return True + + actual = list(mi.adjacent(predicate, iterable)) + expected = [(True, x) for x in iterable] + self.assertEqual(actual, expected) + + +class GroupByTransformTests(TestCase): + def assertAllGroupsEqual(self, groupby1, groupby2): + for a, b in zip(groupby1, groupby2): + key1, group1 = a + key2, group2 = b + self.assertEqual(key1, key2) + self.assertListEqual(list(group1), list(group2)) + self.assertRaises(StopIteration, lambda: next(groupby1)) + self.assertRaises(StopIteration, lambda: next(groupby2)) + + def test_default_funcs(self): + iterable = [(x // 5, x) for x in range(1000)] + actual = mi.groupby_transform(iterable) + expected = groupby(iterable) + self.assertAllGroupsEqual(actual, expected) + + def test_valuefunc(self): + iterable = [(int(x / 5), int(x / 3), x) for x in range(10)] + + # Test the standard usage of grouping one iterable using another's keys + grouper = mi.groupby_transform( + iterable, keyfunc=itemgetter(0), valuefunc=itemgetter(-1) + ) + actual = [(k, list(g)) for k, g in grouper] + expected = [(0, [0, 1, 2, 3, 4]), (1, [5, 6, 7, 8, 9])] + self.assertEqual(actual, expected) + + grouper = mi.groupby_transform( + iterable, keyfunc=itemgetter(1), valuefunc=itemgetter(-1) + ) + actual = [(k, list(g)) for k, g in grouper] + expected = [(0, [0, 1, 2]), (1, [3, 4, 5]), (2, [6, 7, 8]), (3, [9])] + self.assertEqual(actual, expected) + + # and now for something a little different + d = dict(zip(range(10), 'abcdefghij')) + grouper = mi.groupby_transform( + range(10), keyfunc=lambda x: x // 5, valuefunc=d.get + ) + actual = [(k, ''.join(g)) for k, g in grouper] + expected = [(0, 'abcde'), (1, 'fghij')] + self.assertEqual(actual, expected) + + def test_no_valuefunc(self): + iterable = range(1000) + + def key(x): + return x // 5 + + actual = mi.groupby_transform(iterable, key, valuefunc=None) + expected = groupby(iterable, key) + self.assertAllGroupsEqual(actual, expected) + + actual = mi.groupby_transform(iterable, key) # default valuefunc + expected = groupby(iterable, key) + self.assertAllGroupsEqual(actual, expected) + + def test_reducefunc(self): + iterable = range(50) + keyfunc = lambda k: 10 * (k // 10) + valuefunc = lambda v: v + 1 + reducefunc = sum + actual = list( + mi.groupby_transform( + iterable, + keyfunc=keyfunc, + valuefunc=valuefunc, + reducefunc=reducefunc, + ) + ) + expected = [(0, 55), (10, 155), (20, 255), (30, 355), (40, 455)] + self.assertEqual(actual, expected) + + +class NumericRangeTests(TestCase): + def test_basic(self): + for args, expected in [ + ((4,), [0, 1, 2, 3]), + ((4.0,), [0.0, 1.0, 2.0, 3.0]), + ((1.0, 4), [1.0, 2.0, 3.0]), + ((1, 4.0), [1.0, 2.0, 3.0]), + ((1.0, 5), [1.0, 2.0, 3.0, 4.0]), + ((0, 20, 5), [0, 5, 10, 15]), + ((0, 20, 5.0), [0.0, 5.0, 10.0, 15.0]), + ((0, 10, 3), [0, 3, 6, 9]), + ((0, 10, 3.0), [0.0, 3.0, 6.0, 9.0]), + ((0, -5, -1), [0, -1, -2, -3, -4]), + ((0.0, -5, -1), [0.0, -1.0, -2.0, -3.0, -4.0]), + ((1, 2, Fraction(1, 2)), [Fraction(1, 1), Fraction(3, 2)]), + ((0,), []), + ((0.0,), []), + ((1, 0), []), + ((1.0, 0.0), []), + ((0.1, 0.30000000000000001, 0.2), [0.1]), # IEE 754 ! + ( + ( + Decimal("0.1"), + Decimal("0.30000000000000001"), + Decimal("0.2"), + ), + [Decimal("0.1"), Decimal("0.3")], + ), # okay with Decimal + ( + ( + Fraction(1, 10), + Fraction(30000000000000001, 100000000000000000), + Fraction(2, 10), + ), + [Fraction(1, 10), Fraction(3, 10)], + ), # okay with Fraction + ((Fraction(2, 1),), [Fraction(0, 1), Fraction(1, 1)]), + ((Decimal('2.0'),), [Decimal('0.0'), Decimal('1.0')]), + ( + ( + datetime(2019, 3, 29, 12, 34, 56), + datetime(2019, 3, 29, 12, 37, 55), + timedelta(minutes=1), + ), + [ + datetime(2019, 3, 29, 12, 34, 56), + datetime(2019, 3, 29, 12, 35, 56), + datetime(2019, 3, 29, 12, 36, 56), + ], + ), + ]: + actual = list(mi.numeric_range(*args)) + self.assertEqual(expected, actual) + self.assertTrue( + all(type(a) is type(e) for a, e in zip(actual, expected)) + ) + + def test_arg_count(self): + for args, message in [ + ((), 'numeric_range expected at least 1 argument, got 0'), + ( + (0, 1, 2, 3), + 'numeric_range expected at most 3 arguments, got 4', + ), + ]: + with self.assertRaisesRegex(TypeError, message): + mi.numeric_range(*args) + + def test_zero_step(self): + for args in [ + (1, 2, 0), + ( + datetime(2019, 3, 29, 12, 34, 56), + datetime(2019, 3, 29, 12, 37, 55), + timedelta(minutes=0), + ), + (1.0, 2.0, 0.0), + (Decimal("1.0"), Decimal("2.0"), Decimal("0.0")), + (Fraction(2, 2), Fraction(4, 2), Fraction(0, 2)), + ]: + with self.assertRaises(ValueError): + list(mi.numeric_range(*args)) + + def test_bool(self): + for args, expected in [ + ((1.0, 3.0, 1.5), True), + ((1.0, 2.0, 1.5), True), + ((1.0, 1.0, 1.5), False), + ((1.0, 0.0, 1.5), False), + ((3.0, 1.0, -1.5), True), + ((2.0, 1.0, -1.5), True), + ((1.0, 1.0, -1.5), False), + ((0.0, 1.0, -1.5), False), + ((Decimal("1.0"), Decimal("2.0"), Decimal("1.5")), True), + ((Decimal("1.0"), Decimal("0.0"), Decimal("1.5")), False), + ((Fraction(2, 2), Fraction(4, 2), Fraction(3, 2)), True), + ((Fraction(2, 2), Fraction(0, 2), Fraction(3, 2)), False), + ( + ( + datetime(2019, 3, 29), + datetime(2019, 3, 30), + timedelta(hours=1), + ), + True, + ), + ( + ( + datetime(2019, 3, 29), + datetime(2019, 3, 28), + timedelta(hours=1), + ), + False, + ), + ]: + self.assertEqual(expected, bool(mi.numeric_range(*args))) + + def test_contains(self): + for args, expected_in, expected_not_in in [ + ((10,), range(10), (0.5,)), + ((1.0, 9.9, 1.5), (1.0, 2.5, 4.0, 5.5, 7.0, 8.5), (0.9,)), + ((9.0, 1.0, -1.5), (1.5, 3.0, 4.5, 6.0, 7.5, 9.0), (0.0, 0.9)), + ( + (Decimal("1.0"), Decimal("9.9"), Decimal("1.5")), + ( + Decimal("1.0"), + Decimal("2.5"), + Decimal("4.0"), + Decimal("5.5"), + Decimal("7.0"), + Decimal("8.5"), + ), + (Decimal("0.9"),), + ), + ( + (Fraction(0, 1), Fraction(5, 1), Fraction(1, 2)), + (Fraction(0, 1), Fraction(1, 2), Fraction(9, 2)), + (Fraction(10, 2),), + ), + ( + ( + datetime(2019, 3, 29), + datetime(2019, 3, 30), + timedelta(hours=1), + ), + (datetime(2019, 3, 29, 15),), + (datetime(2019, 3, 29, 15, 30),), + ), + ]: + r = mi.numeric_range(*args) + for v in expected_in: + self.assertTrue(v in r) + self.assertFalse(v not in r) + + for v in expected_not_in: + self.assertFalse(v in r) + self.assertTrue(v not in r) + + def test_eq(self): + for args1, args2 in [ + ((0, 5, 2), (0, 6, 2)), + ((1.0, 9.9, 1.5), (1.0, 8.6, 1.5)), + ((8.5, 0.0, -1.5), (8.5, 0.7, -1.5)), + ((7.0, 0.0, 1.0), (17.0, 7.0, 0.5)), + ( + (Decimal("1.0"), Decimal("9.9"), Decimal("1.5")), + (Decimal("1.0"), Decimal("8.6"), Decimal("1.5")), + ), + ( + (Fraction(1, 1), Fraction(10, 1), Fraction(3, 2)), + (Fraction(1, 1), Fraction(9, 1), Fraction(3, 2)), + ), + ( + ( + datetime(2019, 3, 29), + datetime(2019, 3, 30), + timedelta(hours=10), + ), + ( + datetime(2019, 3, 29), + datetime(2019, 3, 30, 1), + timedelta(hours=10), + ), + ), + ]: + self.assertEqual( + mi.numeric_range(*args1), mi.numeric_range(*args2) + ) + + for args1, args2 in [ + ((0, 5, 2), (0, 7, 2)), + ((1.0, 9.9, 1.5), (1.2, 9.9, 1.5)), + ((1.0, 9.9, 1.5), (1.0, 10.3, 1.5)), + ((1.0, 9.9, 1.5), (1.0, 9.9, 1.4)), + ((8.5, 0.0, -1.5), (8.4, 0.0, -1.5)), + ((8.5, 0.0, -1.5), (8.5, -0.7, -1.5)), + ((8.5, 0.0, -1.5), (8.5, 0.0, -1.4)), + ((0.0, 7.0, 1.0), (7.0, 0.0, 1.0)), + ( + (Decimal("1.0"), Decimal("10.0"), Decimal("1.5")), + (Decimal("1.0"), Decimal("10.5"), Decimal("1.5")), + ), + ( + (Fraction(1, 1), Fraction(10, 1), Fraction(3, 2)), + (Fraction(1, 1), Fraction(21, 2), Fraction(3, 2)), + ), + ( + ( + datetime(2019, 3, 29), + datetime(2019, 3, 30), + timedelta(hours=10), + ), + ( + datetime(2019, 3, 29), + datetime(2019, 3, 30, 15), + timedelta(hours=10), + ), + ), + ]: + self.assertNotEqual( + mi.numeric_range(*args1), mi.numeric_range(*args2) + ) + + self.assertNotEqual(mi.numeric_range(7.0), 1) + self.assertNotEqual(mi.numeric_range(7.0), "abc") + + def test_get_item_by_index(self): + for args, index, expected in [ + ((1, 6), 2, 3), + ((1.0, 6.0, 1.5), 0, 1.0), + ((1.0, 6.0, 1.5), 1, 2.5), + ((1.0, 6.0, 1.5), 2, 4.0), + ((1.0, 6.0, 1.5), 3, 5.5), + ((1.0, 6.0, 1.5), -1, 5.5), + ((1.0, 6.0, 1.5), -2, 4.0), + ( + (Decimal("1.0"), Decimal("9.0"), Decimal("1.5")), + -1, + Decimal("8.5"), + ), + ( + (Fraction(1, 1), Fraction(10, 1), Fraction(3, 2)), + 2, + Fraction(4, 1), + ), + ( + ( + datetime(2019, 3, 29), + datetime(2019, 3, 30), + timedelta(hours=10), + ), + 1, + datetime(2019, 3, 29, 10), + ), + ]: + self.assertEqual(expected, mi.numeric_range(*args)[index]) + + for args, index in [ + ((1.0, 6.0, 1.5), 4), + ((1.0, 6.0, 1.5), -5), + ((6.0, 1.0, 1.5), 0), + ((6.0, 1.0, 1.5), -1), + ((Decimal("1.0"), Decimal("9.0"), Decimal("-1.5")), -1), + ((Fraction(1, 1), Fraction(2, 1), Fraction(3, 2)), 2), + ( + ( + datetime(2019, 3, 29), + datetime(2019, 3, 30), + timedelta(hours=10), + ), + 8, + ), + ]: + with self.assertRaises(IndexError): + mi.numeric_range(*args)[index] + + def test_get_item_by_slice(self): + for args, sl, expected_args in [ + ((1.0, 9.0, 1.5), slice(None, None, None), (1.0, 9.0, 1.5)), + ((1.0, 9.0, 1.5), slice(None, 1, None), (1.0, 2.5, 1.5)), + ((1.0, 9.0, 1.5), slice(None, None, 2), (1.0, 9.0, 3.0)), + ((1.0, 9.0, 1.5), slice(None, 2, None), (1.0, 4.0, 1.5)), + ((1.0, 9.0, 1.5), slice(1, 2, None), (2.5, 4.0, 1.5)), + ((1.0, 9.0, 1.5), slice(1, -1, None), (2.5, 8.5, 1.5)), + ((1.0, 9.0, 1.5), slice(10, None, 3), (9.0, 9.0, 4.5)), + ((1.0, 9.0, 1.5), slice(-10, None, 3), (1.0, 9.0, 4.5)), + ((1.0, 9.0, 1.5), slice(None, -10, 3), (1.0, 1.0, 4.5)), + ((1.0, 9.0, 1.5), slice(None, 10, 3), (1.0, 9.0, 4.5)), + ( + (Decimal("1.0"), Decimal("9.0"), Decimal("1.5")), + slice(1, -1, None), + (Decimal("2.5"), Decimal("8.5"), Decimal("1.5")), + ), + ( + (Fraction(1, 1), Fraction(5, 1), Fraction(3, 2)), + slice(1, -1, None), + (Fraction(5, 2), Fraction(4, 1), Fraction(3, 2)), + ), + ( + ( + datetime(2019, 3, 29), + datetime(2019, 3, 30), + timedelta(hours=10), + ), + slice(1, -1, None), + ( + datetime(2019, 3, 29, 10), + datetime(2019, 3, 29, 20), + timedelta(hours=10), + ), + ), + ]: + self.assertEqual( + mi.numeric_range(*expected_args), mi.numeric_range(*args)[sl] + ) + + def test_hash(self): + for args, expected in [ + ((1.0, 6.0, 1.5), hash((1.0, 5.5, 1.5))), + ((1.0, 7.0, 1.5), hash((1.0, 5.5, 1.5))), + ((1.0, 7.5, 1.5), hash((1.0, 7.0, 1.5))), + ((1.0, 1.5, 1.5), hash((1.0, 1.0, 1.5))), + ((1.5, 1.0, 1.5), hash(range(0, 0))), + ((1.5, 1.5, 1.5), hash(range(0, 0))), + ( + (Decimal("1.0"), Decimal("9.0"), Decimal("1.5")), + hash((Decimal("1.0"), Decimal("8.5"), Decimal("1.5"))), + ), + ( + (Fraction(1, 1), Fraction(5, 1), Fraction(3, 2)), + hash((Fraction(1, 1), Fraction(4, 1), Fraction(3, 2))), + ), + ( + ( + datetime(2019, 3, 29), + datetime(2019, 3, 30), + timedelta(hours=10), + ), + hash( + ( + datetime(2019, 3, 29), + datetime(2019, 3, 29, 20), + timedelta(hours=10), + ) + ), + ), + ]: + self.assertEqual(expected, hash(mi.numeric_range(*args))) + + def test_iter_twice(self): + r1 = mi.numeric_range(1.0, 9.9, 1.5) + r2 = mi.numeric_range(8.5, 0.0, -1.5) + self.assertEqual([1.0, 2.5, 4.0, 5.5, 7.0, 8.5], list(r1)) + self.assertEqual([1.0, 2.5, 4.0, 5.5, 7.0, 8.5], list(r1)) + self.assertEqual([8.5, 7.0, 5.5, 4.0, 2.5, 1.0], list(r2)) + self.assertEqual([8.5, 7.0, 5.5, 4.0, 2.5, 1.0], list(r2)) + + def test_len(self): + for args, expected in [ + ((1.0, 7.0, 1.5), 4), + ((1.0, 7.01, 1.5), 5), + ((7.0, 1.0, -1.5), 4), + ((7.01, 1.0, -1.5), 5), + ((0.1, 0.30000000000000001, 0.2), 1), # IEE 754 ! + ( + ( + Decimal("0.1"), + Decimal("0.30000000000000001"), + Decimal("0.2"), + ), + 2, + ), # works with Decimal + ((Decimal("1.0"), Decimal("9.0"), Decimal("1.5")), 6), + ((Fraction(1, 1), Fraction(5, 1), Fraction(3, 2)), 3), + ( + ( + datetime(2019, 3, 29), + datetime(2019, 3, 30), + timedelta(hours=10), + ), + 3, + ), + ]: + self.assertEqual(expected, len(mi.numeric_range(*args))) + + def test_repr(self): + for args, *expected in [ + ((7.0,), "numeric_range(0.0, 7.0)"), + ((1.0, 7.0), "numeric_range(1.0, 7.0)"), + ((7.0, 1.0, -1.5), "numeric_range(7.0, 1.0, -1.5)"), + ( + (Decimal("1.0"), Decimal("9.0"), Decimal("1.5")), + ( + "numeric_range(Decimal('1.0'), Decimal('9.0'), " + "Decimal('1.5'))" + ), + ), + ( + (Fraction(7, 7), Fraction(10, 2), Fraction(3, 2)), + ( + "numeric_range(Fraction(1, 1), Fraction(5, 1), " + "Fraction(3, 2))" + ), + ), + ( + ( + datetime(2019, 3, 29), + datetime(2019, 3, 30), + timedelta(hours=10), + ), + "numeric_range(datetime.datetime(2019, 3, 29, 0, 0), " + "datetime.datetime(2019, 3, 30, 0, 0), " + "datetime.timedelta(seconds=36000))", + "numeric_range(datetime.datetime(2019, 3, 29, 0, 0), " + "datetime.datetime(2019, 3, 30, 0, 0), " + "datetime.timedelta(0, 36000))", + ), + ]: + with self.subTest(args=args): + self.assertIn(repr(mi.numeric_range(*args)), expected) + + def test_reversed(self): + for args, expected in [ + ((7.0,), [6.0, 5.0, 4.0, 3.0, 2.0, 1.0, 0.0]), + ((1.0, 7.0), [6.0, 5.0, 4.0, 3.0, 2.0, 1.0]), + ((7.0, 1.0, -1.5), [2.5, 4.0, 5.5, 7.0]), + ((7.0, 0.9, -1.5), [1.0, 2.5, 4.0, 5.5, 7.0]), + ( + (Decimal("1.0"), Decimal("5.0"), Decimal("1.5")), + [Decimal('4.0'), Decimal('2.5'), Decimal('1.0')], + ), + ( + (Fraction(1, 1), Fraction(5, 1), Fraction(3, 2)), + [Fraction(4, 1), Fraction(5, 2), Fraction(1, 1)], + ), + ( + ( + datetime(2019, 3, 29), + datetime(2019, 3, 30), + timedelta(hours=10), + ), + [ + datetime(2019, 3, 29, 20), + datetime(2019, 3, 29, 10), + datetime(2019, 3, 29), + ], + ), + ]: + self.assertEqual(expected, list(reversed(mi.numeric_range(*args)))) + + def test_count(self): + for args, v, c in [ + ((7.0,), 0.0, 1), + ((7.0,), 0.5, 0), + ((7.0,), 6.0, 1), + ((7.0,), 7.0, 0), + ((7.0,), 10.0, 0), + ( + (Decimal("1.0"), Decimal("5.0"), Decimal("1.5")), + Decimal('4.0'), + 1, + ), + ( + (Fraction(1, 1), Fraction(5, 1), Fraction(3, 2)), + Fraction(5, 2), + 1, + ), + ( + ( + datetime(2019, 3, 29), + datetime(2019, 3, 30), + timedelta(hours=10), + ), + datetime(2019, 3, 29, 20), + 1, + ), + ]: + self.assertEqual(c, mi.numeric_range(*args).count(v)) + + def test_index(self): + for args, v, i in [ + ((7.0,), 0.0, 0), + ((7.0,), 6.0, 6), + ((7.0, 0.0, -1.0), 7.0, 0), + ((7.0, 0.0, -1.0), 1.0, 6), + ( + (Decimal("1.0"), Decimal("5.0"), Decimal("1.5")), + Decimal('4.0'), + 2, + ), + ( + (Fraction(1, 1), Fraction(5, 1), Fraction(3, 2)), + Fraction(5, 2), + 1, + ), + ( + ( + datetime(2019, 3, 29), + datetime(2019, 3, 30), + timedelta(hours=10), + ), + datetime(2019, 3, 29, 20), + 2, + ), + ]: + self.assertEqual(i, mi.numeric_range(*args).index(v)) + + for args, v in [ + ((0.7,), 0.5), + ((0.7,), 7.0), + ((0.7,), 10.0), + ((7.0, 0.0, -1.0), 0.5), + ((7.0, 0.0, -1.0), 0.0), + ((7.0, 0.0, -1.0), 10.0), + ((7.0, 0.0), 5.0), + ((Decimal("1.0"), Decimal("5.0"), Decimal("1.5")), Decimal('4.5')), + ((Fraction(1, 1), Fraction(5, 1), Fraction(3, 2)), Fraction(5, 3)), + ( + ( + datetime(2019, 3, 29), + datetime(2019, 3, 30), + timedelta(hours=10), + ), + datetime(2019, 3, 30), + ), + ]: + with self.assertRaises(ValueError): + mi.numeric_range(*args).index(v) + + def test_parent_classes(self): + r = mi.numeric_range(7.0) + self.assertTrue(isinstance(r, abc.Iterable)) + self.assertFalse(isinstance(r, abc.Iterator)) + self.assertTrue(isinstance(r, abc.Sequence)) + self.assertTrue(isinstance(r, abc.Hashable)) + + def test_bad_key(self): + r = mi.numeric_range(7.0) + for arg, message in [ + ('a', 'numeric range indices must be integers or slices, not str'), + ( + (), + 'numeric range indices must be integers or slices, not tuple', + ), + ]: + with self.assertRaisesRegex(TypeError, message): + r[arg] + + def test_pickle(self): + for args in [ + (7.0,), + (5.0, 7.0), + (5.0, 7.0, 3.0), + (7.0, 5.0), + (7.0, 5.0, 4.0), + (7.0, 5.0, -1.0), + (Decimal("1.0"), Decimal("5.0"), Decimal("1.5")), + (Fraction(1, 1), Fraction(5, 1), Fraction(3, 2)), + (datetime(2019, 3, 29), datetime(2019, 3, 30)), + ]: + r = mi.numeric_range(*args) + self.assertTrue(dumps(r)) # assert not empty + self.assertEqual(r, loads(dumps(r))) + + +class CountCycleTests(TestCase): + def test_basic(self): + expected = [ + (0, 'a'), + (0, 'b'), + (0, 'c'), + (1, 'a'), + (1, 'b'), + (1, 'c'), + (2, 'a'), + (2, 'b'), + (2, 'c'), + ] + for actual in [ + mi.take(9, mi.count_cycle('abc')), # n=None + list(mi.count_cycle('abc', 3)), # n=3 + ]: + self.assertEqual(actual, expected) + + def test_empty(self): + self.assertEqual(list(mi.count_cycle('')), []) + self.assertEqual(list(mi.count_cycle('', 2)), []) + + def test_negative(self): + self.assertEqual(list(mi.count_cycle('abc', -3)), []) + + +class MarkEndsTests(TestCase): + def test_basic(self): + for size, expected in [ + (0, []), + (1, [(True, True, '0')]), + (2, [(True, False, '0'), (False, True, '1')]), + (3, [(True, False, '0'), (False, False, '1'), (False, True, '2')]), + ( + 4, + [ + (True, False, '0'), + (False, False, '1'), + (False, False, '2'), + (False, True, '3'), + ], + ), + ]: + with self.subTest(size=size): + iterable = map(str, range(size)) + actual = list(mi.mark_ends(iterable)) + self.assertEqual(actual, expected) + + +class LocateTests(TestCase): + def test_default_pred(self): + iterable = [0, 1, 1, 0, 1, 0, 0] + actual = list(mi.locate(iterable)) + expected = [1, 2, 4] + self.assertEqual(actual, expected) + + def test_no_matches(self): + iterable = [0, 0, 0] + actual = list(mi.locate(iterable)) + expected = [] + self.assertEqual(actual, expected) + + def test_custom_pred(self): + iterable = ['0', 1, 1, '0', 1, '0', '0'] + pred = lambda x: x == '0' + actual = list(mi.locate(iterable, pred)) + expected = [0, 3, 5, 6] + self.assertEqual(actual, expected) + + def test_window_size(self): + iterable = ['0', 1, 1, '0', 1, '0', '0'] + pred = lambda *args: args == ('0', 1) + actual = list(mi.locate(iterable, pred, window_size=2)) + expected = [0, 3] + self.assertEqual(actual, expected) + + def test_window_size_large(self): + iterable = [1, 2, 3, 4] + pred = lambda a, b, c, d, e: True + actual = list(mi.locate(iterable, pred, window_size=5)) + expected = [0] + self.assertEqual(actual, expected) + + def test_window_size_zero(self): + iterable = [1, 2, 3, 4] + pred = lambda: True + with self.assertRaises(ValueError): + list(mi.locate(iterable, pred, window_size=0)) + + +class StripFunctionTests(TestCase): + def test_hashable(self): + iterable = list('www.example.com') + pred = lambda x: x in set('cmowz.') + + self.assertEqual(list(mi.lstrip(iterable, pred)), list('example.com')) + self.assertEqual(list(mi.rstrip(iterable, pred)), list('www.example')) + self.assertEqual(list(mi.strip(iterable, pred)), list('example')) + + def test_not_hashable(self): + iterable = [ + list('http://'), + list('www'), + list('.example'), + list('.com'), + ] + pred = lambda x: x in [list('http://'), list('www'), list('.com')] + + self.assertEqual(list(mi.lstrip(iterable, pred)), iterable[2:]) + self.assertEqual(list(mi.rstrip(iterable, pred)), iterable[:3]) + self.assertEqual(list(mi.strip(iterable, pred)), iterable[2:3]) + + def test_math(self): + iterable = [0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2] + pred = lambda x: x <= 2 + + self.assertEqual(list(mi.lstrip(iterable, pred)), iterable[3:]) + self.assertEqual(list(mi.rstrip(iterable, pred)), iterable[:-3]) + self.assertEqual(list(mi.strip(iterable, pred)), iterable[3:-3]) + + +class IteratorWithWeakReferences: + class _AnObj: + pass + + @classmethod + def FROM_SIZE(cls, size: int) -> IteratorWithWeakReferences: + return cls([IteratorWithWeakReferences._AnObj() for _ in range(size)]) + + def __init__(self, iterable: Iterable): + self._data = deque(element for element in iterable) + self._weakReferences = [weakref.ref(a) for a in self._data] + + def __iter__(self) -> Iterator: + return self + + def __next__(self) -> object: + if len(self._data) == 0: + raise StopIteration + return self._data.popleft() + + def weakReferencesState(self) -> list[bool]: + return [wr() is not None for wr in self._weakReferences] + + +class IsliceExtendedTests(TestCase): + def test_all(self): + iterable = ['0', '1', '2', '3', '4', '5'] + indexes = [*range(-4, 10), None] + steps = [1, 2, 3, 4, -1, -2, -3, -4] + for slice_args in product(indexes, indexes, steps): + with self.subTest(slice_args=slice_args): + actual = list(mi.islice_extended(iterable, *slice_args)) + expected = iterable[slice(*slice_args)] + self.assertEqual(actual, expected, slice_args) + + def test_zero_step(self): + with self.assertRaises(ValueError): + list(mi.islice_extended([1, 2, 3], 0, 1, 0)) + + def test_slicing(self): + iterable = map(str, count()) + first_slice = mi.islice_extended(iterable)[10:] + second_slice = mi.islice_extended(first_slice)[:10] + third_slice = mi.islice_extended(second_slice)[::2] + self.assertEqual(list(third_slice), ['10', '12', '14', '16', '18']) + + def test_slicing_extensive(self): + iterable = range(10) + options = (None, 1, 2, 7, -1) + for start, stop, step in product(options, options, options): + with self.subTest(slice_args=(start, stop, step)): + sliced_tuple_0 = tuple( + mi.islice_extended(iterable)[start:stop:step] + ) + sliced_tuple_1 = tuple( + mi.islice_extended(iterable, start, stop, step) + ) + sliced_range = tuple(iterable[start:stop:step]) + self.assertEqual(sliced_tuple_0, sliced_range) + self.assertEqual(sliced_tuple_1, sliced_range) + + def test_invalid_slice(self): + with self.assertRaises(TypeError): + mi.islice_extended(count())[13] + + def test_elements_lifecycle(self): + # CPython does reference counting. + # GC is not required when ref counting is supported. + refCountSupported = platform.python_implementation() == 'CPython' + + class TestCase(NamedTuple): + initialSize: int + slice: int + # list of expected intermediate elements states (alive or not) + # during a complete iteration + expectedAliveStates: list[list[int]] + + # fmt: off + testCases = [ + # testcases for: start>0, stop>0, step>0 + TestCase(initialSize=3, slice=(None, None, 1), expectedAliveStates=[ # noqa: E501 + [1, 1, 1], [0, 1, 1], [0, 0, 1], [0, 0, 0], [0, 0, 0]]), + TestCase(initialSize=3, slice=(0, None, 1), expectedAliveStates=[ + [1, 1, 1], [0, 1, 1], [0, 0, 1], [0, 0, 0], [0, 0, 0]]), + TestCase(initialSize=3, slice=(1, 2, 1), expectedAliveStates=[ + [1, 1, 1], [0, 0, 1], [0, 0, 1]]), + TestCase(initialSize=4, slice=(0, None, 2), expectedAliveStates=[ + [1, 1, 1, 1], [0, 1, 1, 1], [0, 0, 0, 1], [0, 0, 0, 0]]), + TestCase(initialSize=5, slice=(1, 4, 2), expectedAliveStates=[ + [1, 1, 1, 1, 1], [0, 0, 1, 1, 1], [0, 0, 0, 0, 1], [0, 0, 0, 0, 1]]), # noqa: E501 + TestCase(initialSize=5, slice=(4, 1, 1), expectedAliveStates=[ + [1, 1, 1, 1, 1], [0, 0, 0, 0, 1]]), + + # FYI: to process a negative start/stop index, we need to iterate + # on the whole iterator. All the elements will be consumed + # and will ALWAYS be released on full iteration completion. + + # testcases for: start<0, stop>0, step>0 + TestCase(initialSize=3, slice=(-3, None, 1), expectedAliveStates=[ + [1, 1, 1], [0, 1, 1], [0, 0, 1], [0, 0, 0], [0, 0, 0]]), + TestCase(initialSize=3, slice=(-2, 2, 1), expectedAliveStates=[ + [1, 1, 1], [0, 0, 1], [0, 0, 0]]), + TestCase(initialSize=4, slice=(-4, None, 2), expectedAliveStates=[ + [1, 1, 1, 1], [0, 1, 1, 1], [0, 0, 0, 1], [0, 0, 0, 0]]), + TestCase(initialSize=5, slice=(-4, 4, 2), expectedAliveStates=[ + [1, 1, 1, 1, 1], [0, 0, 1, 1, 1], [0, 0, 0, 0, 1], [0, 0, 0, 0, 0]]), # noqa: E501 + TestCase(initialSize=3, slice=(-2, 0, 1), expectedAliveStates=[ + [1, 1, 1], [0, 0, 0]]), + + # testcases for: start>0, stop<0, step>0 + TestCase(initialSize=3, slice=(None, -1, 1), expectedAliveStates=[ + [1, 1, 1], [0, 1, 1], [0, 0, 1], [0, 0, 0]]), + TestCase(initialSize=4, slice=(1, -1, 1), expectedAliveStates=[ + [1, 1, 1, 1], [0, 0, 1, 1], [0, 0, 0, 1], [0, 0, 0, 0]]), + TestCase(initialSize=5, slice=(None, -2, 2), expectedAliveStates=[ + [1, 1, 1, 1, 1], [0, 1, 1, 1, 1], [0, 0, 0, 1, 1], [0, 0, 0, 0, 0]]), # noqa: E501 + TestCase(initialSize=5, slice=(1, -1, 2), expectedAliveStates=[ + [1, 1, 1, 1, 1], [0, 0, 1, 1, 1], [0, 0, 0, 0, 1], [0, 0, 0, 0, 0]]), # noqa: E501 + TestCase(initialSize=5, slice=(4, -5, 2), expectedAliveStates=[ + [1, 1, 1, 1, 1], [0, 0, 0, 0, 0]]), + + # testcases for: start>0, stop>0, step<0 + TestCase(initialSize=3, slice=(None, None, -1), expectedAliveStates=[ # noqa: E501 + # ⚠️could be improved, elements are only released on final step + [1, 1, 1], [1, 1, 1], [1, 1, 1], [1, 1, 1], [0, 0, 0]]), + TestCase(initialSize=3, slice=(2, None, -1), expectedAliveStates=[ + # ⚠️could be improved, elements are only released on final step + [1, 1, 1], [1, 1, 1], [1, 1, 1], [1, 1, 1], [0, 0, 0]]), + TestCase(initialSize=3, slice=(None, 0, -1), expectedAliveStates=[ + # ⚠️could be improved, elements are only released on final step + [1, 1, 1], [0, 1, 1], [0, 1, 1], [0, 0, 0]]), + TestCase(initialSize=6, slice=(3, 1, -1), expectedAliveStates=[ + # ⚠️could be improved, elements are only released on final step + [1, 1, 1, 1, 1, 1], [0, 0, 1, 1, 1, 1], [0, 0, 1, 1, 1, 1], [0, 0, 0, 0, 1, 1]]), # noqa: E501 + TestCase(initialSize=5, slice=(1, 3, -1), expectedAliveStates=[ + # ⚠️could be improved. Final state could be [0, 0, 1, 1, 1] + [1, 1, 1, 1, 1], [0, 0, 0, 0, 1]]), + + # testcases for: start<0, stop>0, step<0 + TestCase(initialSize=3, slice=(-1, None, -1), expectedAliveStates=[ + # ⚠️could be improved, elements are only released on final step + [1, 1, 1], [1, 1, 1], [1, 1, 1], [1, 1, 1], [0, 0, 0]]), + TestCase(initialSize=3, slice=(-1, 0, -1), expectedAliveStates=[ + # ⚠️could be improved, elements are only released on final step + [1, 1, 1], [0, 1, 1], [0, 1, 1], [0, 0, 0]]), + TestCase(initialSize=6, slice=(-2, None, -2), expectedAliveStates=[ + # ⚠️could be improved, elements are only released on final step + [1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0]]), # noqa: E501 + TestCase(initialSize=6, slice=(-2, 1, -2), expectedAliveStates=[ + # ⚠️could be improved, elements are only released on final step + [1, 1, 1, 1, 1, 1], [0, 0, 1, 1, 1, 1], [0, 0, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0]]), # noqa: E501 + TestCase(initialSize=6, slice=(-4, 4, -2), expectedAliveStates=[ + [1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0]]), + + # testcases for: start>0, stop<0, step<0 + TestCase(initialSize=3, slice=(None, -3, -1), expectedAliveStates=[ + # ⚠️could be improved, elements are only released on final step + [1, 1, 1], [0, 1, 1], [0, 1, 1], [0, 0, 0]]), + TestCase(initialSize=3, slice=(None, -4, -1), expectedAliveStates=[ + # ⚠️could be improved, elements are only released on final step + [1, 1, 1], [1, 1, 1], [1, 1, 1], [1, 1, 1], [0, 0, 0]]), + TestCase(initialSize=5, slice=(3, -4, -1), expectedAliveStates=[ + # ⚠️could be improved, elements are only released on final step + [1, 1, 1, 1, 1], [0, 0, 1, 1, 1], [0, 0, 1, 1, 1], [0, 0, 0, 0, 0]]), # noqa: E501 + TestCase(initialSize=5, slice=(1, -1, -1), expectedAliveStates=[ + [1, 1, 1, 1, 1], [0, 0, 0, 0, 0]]), + ] + # fmt: on + + for index, testCase in enumerate(testCases): + with self.subTest(f"{index:02d}", testCase=testCase): + iterator = IteratorWithWeakReferences.FROM_SIZE( + testCase.initialSize + ) + islice_iterator = mi.islice_extended(iterator, *testCase.slice) + + aliveStates = [] + refCountSupported or gc.collect() + # initial alive states + aliveStates.append(iterator.weakReferencesState()) + while True: + try: + next(islice_iterator) + refCountSupported or gc.collect() + # intermediate alive states + aliveStates.append(iterator.weakReferencesState()) + except StopIteration: + refCountSupported or gc.collect() + # final alive states + aliveStates.append(iterator.weakReferencesState()) + break + self.assertEqual(aliveStates, testCase.expectedAliveStates) + + +class ConsecutiveGroupsTest(TestCase): + def test_numbers(self): + iterable = [-10, -8, -7, -6, 1, 2, 4, 5, -1, 7] + actual = [list(g) for g in mi.consecutive_groups(iterable)] + expected = [[-10], [-8, -7, -6], [1, 2], [4, 5], [-1], [7]] + self.assertEqual(actual, expected) + + def test_custom_ordering(self): + iterable = ['1', '10', '11', '20', '21', '22', '30', '31'] + ordering = lambda x: int(x) + actual = [list(g) for g in mi.consecutive_groups(iterable, ordering)] + expected = [['1'], ['10', '11'], ['20', '21', '22'], ['30', '31']] + self.assertEqual(actual, expected) + + def test_exotic_ordering(self): + iterable = [ + ('a', 'b', 'c', 'd'), + ('a', 'c', 'b', 'd'), + ('a', 'c', 'd', 'b'), + ('a', 'd', 'b', 'c'), + ('d', 'b', 'c', 'a'), + ('d', 'c', 'a', 'b'), + ] + ordering = list(permutations('abcd')).index + actual = [list(g) for g in mi.consecutive_groups(iterable, ordering)] + expected = [ + [('a', 'b', 'c', 'd')], + [('a', 'c', 'b', 'd'), ('a', 'c', 'd', 'b'), ('a', 'd', 'b', 'c')], + [('d', 'b', 'c', 'a'), ('d', 'c', 'a', 'b')], + ] + self.assertEqual(actual, expected) + + +class DifferenceTest(TestCase): + def test_normal(self): + iterable = [10, 20, 30, 40, 50] + actual = list(mi.difference(iterable)) + expected = [10, 10, 10, 10, 10] + self.assertEqual(actual, expected) + + def test_custom(self): + iterable = [10, 20, 30, 40, 50] + actual = list(mi.difference(iterable, add)) + expected = [10, 30, 50, 70, 90] + self.assertEqual(actual, expected) + + def test_roundtrip(self): + original = list(range(100)) + accumulated = accumulate(original) + actual = list(mi.difference(accumulated)) + self.assertEqual(actual, original) + + def test_one(self): + self.assertEqual(list(mi.difference([0])), [0]) + + def test_empty(self): + self.assertEqual(list(mi.difference([])), []) + + def test_initial(self): + original = list(range(100)) + accumulated = accumulate(original, initial=100) + actual = list(mi.difference(accumulated, initial=100)) + self.assertEqual(actual, original) + + +class SeekableTest(PeekableMixinTests, TestCase): + cls = mi.seekable + + def test_exhaustion_reset(self): + iterable = [str(n) for n in range(10)] + + s = mi.seekable(iterable) + self.assertEqual(list(s), iterable) # Normal iteration + self.assertEqual(list(s), []) # Iterable is exhausted + + s.seek(0) + self.assertEqual(list(s), iterable) # Back in action + + def test_partial_reset(self): + iterable = [str(n) for n in range(10)] + + s = mi.seekable(iterable) + self.assertEqual(mi.take(5, s), iterable[:5]) # Normal iteration + + s.seek(1) + self.assertEqual(list(s), iterable[1:]) # Get the rest of the iterable + + def test_forward(self): + iterable = [str(n) for n in range(10)] + + s = mi.seekable(iterable) + self.assertEqual(mi.take(1, s), iterable[:1]) # Normal iteration + + s.seek(3) # Skip over index 2 + self.assertEqual(list(s), iterable[3:]) # Result is similar to slicing + + s.seek(0) # Back to 0 + self.assertEqual(list(s), iterable) # No difference in result + + def test_past_end(self): + iterable = [str(n) for n in range(10)] + + s = mi.seekable(iterable) + self.assertEqual(mi.take(1, s), iterable[:1]) # Normal iteration + + s.seek(20) + self.assertEqual(list(s), []) # Iterable is exhausted + + s.seek(0) # Back to 0 + self.assertEqual(list(s), iterable) # No difference in result + + def test_elements(self): + iterable = map(str, count()) + + s = mi.seekable(iterable) + mi.take(10, s) + + elements = s.elements() + self.assertEqual( + [elements[i] for i in range(10)], [str(n) for n in range(10)] + ) + self.assertEqual(len(elements), 10) + + mi.take(10, s) + self.assertEqual(list(elements), [str(n) for n in range(20)]) + + def test_maxlen(self): + iterable = map(str, count()) + + s = mi.seekable(iterable, maxlen=4) + self.assertEqual(mi.take(10, s), [str(n) for n in range(10)]) + self.assertEqual(list(s.elements()), ['6', '7', '8', '9']) + + s.seek(0) + self.assertEqual(mi.take(14, s), [str(n) for n in range(6, 20)]) + self.assertEqual(list(s.elements()), ['16', '17', '18', '19']) + + def test_maxlen_zero(self): + iterable = [str(x) for x in range(5)] + s = mi.seekable(iterable, maxlen=0) + self.assertEqual(list(s), iterable) + self.assertEqual(list(s.elements()), []) + + def test_relative_seek(self): + iterable = [str(x) for x in range(5)] + s = mi.seekable(iterable) + s.relative_seek(2) + self.assertEqual(next(s), '2') + s.relative_seek(-2) + self.assertEqual(next(s), '1') + s.relative_seek(-2) + self.assertEqual( + next(s), '0' + ) # Seek relative to current position within the cache + s.relative_seek(-10) # Lower bound + self.assertEqual(next(s), '0') + s.relative_seek(10) # Lower bound + self.assertEqual(list(s.elements()), [str(x) for x in range(5)]) + + +class SequenceViewTests(TestCase): + def test_init(self): + view = mi.SequenceView((1, 2, 3)) + self.assertEqual(repr(view), "SequenceView((1, 2, 3))") + self.assertRaises(TypeError, lambda: mi.SequenceView({})) + + def test_update(self): + seq = [1, 2, 3] + view = mi.SequenceView(seq) + self.assertEqual(len(view), 3) + self.assertEqual(repr(view), "SequenceView([1, 2, 3])") + + seq.pop() + self.assertEqual(len(view), 2) + self.assertEqual(repr(view), "SequenceView([1, 2])") + + def test_indexing(self): + seq = ('a', 'b', 'c', 'd', 'e', 'f') + view = mi.SequenceView(seq) + for i in range(-len(seq), len(seq)): + self.assertEqual(view[i], seq[i]) + + def test_slicing(self): + seq = ('a', 'b', 'c', 'd', 'e', 'f') + view = mi.SequenceView(seq) + n = len(seq) + indexes = list(range(-n - 1, n + 1)) + [None] + steps = list(range(-n, n + 1)) + steps.remove(0) + for slice_args in product(indexes, indexes, steps): + i = slice(*slice_args) + self.assertEqual(view[i], seq[i]) + + def test_abc_methods(self): + # collections.Sequence should provide all of this functionality + seq = ('a', 'b', 'c', 'd', 'e', 'f', 'f') + view = mi.SequenceView(seq) + + # __contains__ + self.assertIn('b', view) + self.assertNotIn('g', view) + + # __iter__ + self.assertEqual(list(iter(view)), list(seq)) + + # __reversed__ + self.assertEqual(list(reversed(view)), list(reversed(seq))) + + # index + self.assertEqual(view.index('b'), 1) + + # count + self.assertEqual(seq.count('f'), 2) + + +class RunLengthTest(TestCase): + def test_encode(self): + iterable = (int(str(n)[0]) for n in count(800)) + actual = mi.take(4, mi.run_length.encode(iterable)) + expected = [(8, 100), (9, 100), (1, 1000), (2, 1000)] + self.assertEqual(actual, expected) + + def test_decode(self): + iterable = [('d', 4), ('c', 3), ('b', 2), ('a', 1)] + actual = ''.join(mi.run_length.decode(iterable)) + expected = 'ddddcccbba' + self.assertEqual(actual, expected) + + +class ExactlyNTests(TestCase): + """Tests for ``exactly_n()``""" + + def test_true(self): + """Iterable has ``n`` ``True`` elements""" + self.assertTrue(mi.exactly_n([True, False, True], 2)) + self.assertTrue(mi.exactly_n([1, 1, 1, 0], 3)) + self.assertTrue(mi.exactly_n([False, False], 0)) + self.assertTrue(mi.exactly_n(range(100), 10, lambda x: x < 10)) + + def test_false(self): + """Iterable does not have ``n`` ``True`` elements""" + self.assertFalse(mi.exactly_n([True, False, False], 2)) + self.assertFalse(mi.exactly_n([True, True, False], 1)) + self.assertFalse(mi.exactly_n([False], 1)) + self.assertFalse(mi.exactly_n([True], -1)) + self.assertFalse(mi.exactly_n(repeat(True), 100)) + + def test_empty(self): + """Return ``True`` if the iterable is empty and ``n`` is 0""" + self.assertTrue(mi.exactly_n([], 0)) + self.assertFalse(mi.exactly_n([], 1)) + + +class AlwaysReversibleTests(TestCase): + """Tests for ``always_reversible()``""" + + def test_regular_reversed(self): + self.assertEqual( + list(reversed(range(10))), list(mi.always_reversible(range(10))) + ) + self.assertEqual( + list(reversed([1, 2, 3])), list(mi.always_reversible([1, 2, 3])) + ) + self.assertEqual( + reversed([1, 2, 3]).__class__, + mi.always_reversible([1, 2, 3]).__class__, + ) + + def test_nonseq_reversed(self): + # Create a non-reversible generator from a sequence + with self.assertRaises(TypeError): + reversed(x for x in range(10)) + + self.assertEqual( + list(reversed(range(10))), + list(mi.always_reversible(x for x in range(10))), + ) + self.assertEqual( + list(reversed([1, 2, 3])), + list(mi.always_reversible(x for x in [1, 2, 3])), + ) + self.assertNotEqual( + reversed((1, 2)).__class__, + mi.always_reversible(x for x in (1, 2)).__class__, + ) + + +class CircularShiftsTests(TestCase): + def test_empty(self): + # empty iterable -> empty list + self.assertEqual(list(mi.circular_shifts([])), []) + + def test_simple_circular_shifts(self): + # test the a simple iterator case + self.assertEqual( + list(mi.circular_shifts(range(4))), + [(0, 1, 2, 3), (1, 2, 3, 0), (2, 3, 0, 1), (3, 0, 1, 2)], + ) + + def test_duplicates(self): + # test non-distinct entries + self.assertEqual( + list(mi.circular_shifts([0, 1, 0, 1])), + [(0, 1, 0, 1), (1, 0, 1, 0), (0, 1, 0, 1), (1, 0, 1, 0)], + ) + + def test_steps_positive(self): + actual = list(mi.circular_shifts(range(5), steps=2)) + expected = [ + (0, 1, 2, 3, 4), + (2, 3, 4, 0, 1), + (4, 0, 1, 2, 3), + (1, 2, 3, 4, 0), + (3, 4, 0, 1, 2), + ] + self.assertEqual(actual, expected) + + def test_steps_negative(self): + actual = list(mi.circular_shifts(range(5), steps=-2)) + expected = [ + (0, 1, 2, 3, 4), + (3, 4, 0, 1, 2), + (1, 2, 3, 4, 0), + (4, 0, 1, 2, 3), + (2, 3, 4, 0, 1), + ] + self.assertEqual(actual, expected) + + def test_steps_zero(self): + with self.assertRaises(ValueError): + list(mi.circular_shifts(range(5), steps=0)) + + +class MakeDecoratorTests(TestCase): + def test_basic(self): + slicer = mi.make_decorator(islice) + + @slicer(1, 10, 2) + def user_function(arg_1, arg_2, kwarg_1=None): + self.assertEqual(arg_1, 'arg_1') + self.assertEqual(arg_2, 'arg_2') + self.assertEqual(kwarg_1, 'kwarg_1') + return map(str, count()) + + it = user_function('arg_1', 'arg_2', kwarg_1='kwarg_1') + actual = list(it) + expected = ['1', '3', '5', '7', '9'] + self.assertEqual(actual, expected) + + def test_result_index(self): + def stringify(*args, **kwargs): + self.assertEqual(args[0], 'arg_0') + iterable = args[1] + self.assertEqual(args[2], 'arg_2') + self.assertEqual(kwargs['kwarg_1'], 'kwarg_1') + return map(str, iterable) + + stringifier = mi.make_decorator(stringify, result_index=1) + + @stringifier('arg_0', 'arg_2', kwarg_1='kwarg_1') + def user_function(n): + return count(n) + + it = user_function(1) + actual = mi.take(5, it) + expected = ['1', '2', '3', '4', '5'] + self.assertEqual(actual, expected) + + def test_wrap_class(self): + seeker = mi.make_decorator(mi.seekable) + + @seeker() + def user_function(n): + return map(str, range(n)) + + it = user_function(5) + self.assertEqual(list(it), ['0', '1', '2', '3', '4']) + + it.seek(0) + self.assertEqual(list(it), ['0', '1', '2', '3', '4']) + + +class MapReduceTests(TestCase): + def test_default(self): + iterable = (str(x) for x in range(5)) + keyfunc = lambda x: int(x) // 2 + actual = sorted(mi.map_reduce(iterable, keyfunc).items()) + expected = [(0, ['0', '1']), (1, ['2', '3']), (2, ['4'])] + self.assertEqual(actual, expected) + + def test_valuefunc(self): + iterable = (str(x) for x in range(5)) + keyfunc = lambda x: int(x) // 2 + valuefunc = int + actual = sorted(mi.map_reduce(iterable, keyfunc, valuefunc).items()) + expected = [(0, [0, 1]), (1, [2, 3]), (2, [4])] + self.assertEqual(actual, expected) + + def test_reducefunc(self): + iterable = (str(x) for x in range(5)) + keyfunc = lambda x: int(x) // 2 + valuefunc = int + reducefunc = lambda value_list: reduce(mul, value_list, 1) + actual = sorted( + mi.map_reduce(iterable, keyfunc, valuefunc, reducefunc).items() + ) + expected = [(0, 0), (1, 6), (2, 4)] + self.assertEqual(actual, expected) + + def test_ret(self): + d = mi.map_reduce([1, 0, 2, 0, 1, 0], bool) + self.assertEqual(d, {False: [0, 0, 0], True: [1, 2, 1]}) + self.assertRaises(KeyError, lambda: d[None].append(1)) + + +class RlocateTests(TestCase): + def test_default_pred(self): + iterable = [0, 1, 1, 0, 1, 0, 0] + for it in (iterable[:], iter(iterable)): + actual = list(mi.rlocate(it)) + expected = [4, 2, 1] + self.assertEqual(actual, expected) + + def test_no_matches(self): + iterable = [0, 0, 0] + for it in (iterable[:], iter(iterable)): + actual = list(mi.rlocate(it)) + expected = [] + self.assertEqual(actual, expected) + + def test_custom_pred(self): + iterable = ['0', 1, 1, '0', 1, '0', '0'] + pred = lambda x: x == '0' + for it in (iterable[:], iter(iterable)): + actual = list(mi.rlocate(it, pred)) + expected = [6, 5, 3, 0] + self.assertEqual(actual, expected) + + def test_efficient_reversal(self): + iterable = range(9**9) # Is efficiently reversible + target = 9**9 - 2 + pred = lambda x: x == target # Find-able from the right + actual = next(mi.rlocate(iterable, pred)) + self.assertEqual(actual, target) + + def test_window_size(self): + iterable = ['0', 1, 1, '0', 1, '0', '0'] + pred = lambda *args: args == ('0', 1) + for it in (iterable, iter(iterable)): + actual = list(mi.rlocate(it, pred, window_size=2)) + expected = [3, 0] + self.assertEqual(actual, expected) + + def test_window_size_large(self): + iterable = [1, 2, 3, 4] + pred = lambda a, b, c, d, e: True + for it in (iterable, iter(iterable)): + actual = list(mi.rlocate(iterable, pred, window_size=5)) + expected = [0] + self.assertEqual(actual, expected) + + def test_window_size_zero(self): + iterable = [1, 2, 3, 4] + pred = lambda: True + for it in (iterable, iter(iterable)): + with self.assertRaises(ValueError): + list(mi.locate(iterable, pred, window_size=0)) + + +class ReplaceTests(TestCase): + def test_basic(self): + iterable = range(10) + pred = lambda x: x % 2 == 0 + substitutes = [] + actual = list(mi.replace(iterable, pred, substitutes)) + expected = [1, 3, 5, 7, 9] + self.assertEqual(actual, expected) + + def test_count(self): + iterable = range(10) + pred = lambda x: x % 2 == 0 + substitutes = [] + actual = list(mi.replace(iterable, pred, substitutes, count=4)) + expected = [1, 3, 5, 7, 8, 9] + self.assertEqual(actual, expected) + + def test_window_size(self): + iterable = range(10) + pred = lambda *args: args == (0, 1, 2) + substitutes = [] + actual = list(mi.replace(iterable, pred, substitutes, window_size=3)) + expected = [3, 4, 5, 6, 7, 8, 9] + self.assertEqual(actual, expected) + + def test_window_size_end(self): + iterable = range(10) + pred = lambda *args: args == (7, 8, 9) + substitutes = [] + actual = list(mi.replace(iterable, pred, substitutes, window_size=3)) + expected = [0, 1, 2, 3, 4, 5, 6] + self.assertEqual(actual, expected) + + def test_window_size_count(self): + iterable = range(10) + pred = lambda *args: (args == (0, 1, 2)) or (args == (7, 8, 9)) + substitutes = [] + actual = list( + mi.replace(iterable, pred, substitutes, count=1, window_size=3) + ) + expected = [3, 4, 5, 6, 7, 8, 9] + self.assertEqual(actual, expected) + + def test_window_size_large(self): + iterable = range(4) + pred = lambda a, b, c, d, e: True + substitutes = [5, 6, 7] + actual = list(mi.replace(iterable, pred, substitutes, window_size=5)) + expected = [5, 6, 7] + self.assertEqual(actual, expected) + + def test_window_size_zero(self): + iterable = range(10) + pred = lambda *args: True + substitutes = [] + with self.assertRaises(ValueError): + list(mi.replace(iterable, pred, substitutes, window_size=0)) + + def test_iterable_substitutes(self): + iterable = range(5) + pred = lambda x: x % 2 == 0 + substitutes = iter('__') + actual = list(mi.replace(iterable, pred, substitutes)) + expected = ['_', '_', 1, '_', '_', 3, '_', '_'] + self.assertEqual(actual, expected) + + +class PartitionsTest(TestCase): + def test_types(self): + for iterable in ['abcd', ['a', 'b', 'c', 'd'], ('a', 'b', 'c', 'd')]: + with self.subTest(iterable=iterable): + actual = list(mi.partitions(iterable)) + expected = [ + [['a', 'b', 'c', 'd']], + [['a'], ['b', 'c', 'd']], + [['a', 'b'], ['c', 'd']], + [['a', 'b', 'c'], ['d']], + [['a'], ['b'], ['c', 'd']], + [['a'], ['b', 'c'], ['d']], + [['a', 'b'], ['c'], ['d']], + [['a'], ['b'], ['c'], ['d']], + ] + self.assertEqual(actual, expected) + + def test_empty(self): + iterable = [] + actual = list(mi.partitions(iterable)) + expected = [[[]]] + self.assertEqual(actual, expected) + + def test_order(self): + iterable = iter([3, 2, 1]) + actual = list(mi.partitions(iterable)) + expected = [[[3, 2, 1]], [[3], [2, 1]], [[3, 2], [1]], [[3], [2], [1]]] + self.assertEqual(actual, expected) + + def test_duplicates(self): + iterable = [1, 1, 1] + actual = list(mi.partitions(iterable)) + expected = [[[1, 1, 1]], [[1], [1, 1]], [[1, 1], [1]], [[1], [1], [1]]] + self.assertEqual(actual, expected) + + +class _FrozenMultiset(Set): + """ + A helper class, useful to compare two lists without reference to the order + of elements. + + FrozenMultiset represents a hashable set that allows duplicate elements. + """ + + def __init__(self, iterable): + self._collection = frozenset(Counter(iterable).items()) + + def __contains__(self, y): + """ + >>> (0, 1) in _FrozenMultiset([(0, 1), (2,), (0, 1)]) + True + """ + return any(y == x for x, _ in self._collection) + + def __iter__(self): + """ + >>> sorted(_FrozenMultiset([(0, 1), (2,), (0, 1)])) + [(0, 1), (0, 1), (2,)] + """ + return (x for x, c in self._collection for _ in range(c)) + + def __len__(self): + """ + >>> len(_FrozenMultiset([(0, 1), (2,), (0, 1)])) + 3 + """ + return sum(c for x, c in self._collection) + + def has_duplicates(self): + """ + >>> _FrozenMultiset([(0, 1), (2,), (0, 1)]).has_duplicates() + True + """ + return any(c != 1 for _, c in self._collection) + + def __hash__(self): + return hash(self._collection) + + def __repr__(self): + return f'FrozenSet([{", ".join(repr(x) for x in iter(self))}]' + + +class SetPartitionsTests(TestCase): + @staticmethod + def _normalize_partition(p): + """ + Return a normalized, hashable, version of a partition using + _FrozenMultiset + """ + return _FrozenMultiset(_FrozenMultiset(g) for g in p) + + @staticmethod + def _normalize_partitions(ps): + """ + Return a normalized set of all normalized partitions using + _FrozenMultiset + """ + return _FrozenMultiset( + SetPartitionsTests._normalize_partition(p) for p in ps + ) + + def test_repeated(self): + it = 'aaa' + actual = mi.set_partitions(it, 2) + expected = [['a', 'aa'], ['a', 'aa'], ['a', 'aa']] + self.assertEqual( + self._normalize_partitions(expected), + self._normalize_partitions(actual), + ) + + def test_each_correct(self): + a = set(range(6)) + for p in mi.set_partitions(a): + total = {e for g in p for e in g} + self.assertEqual(a, total) + + def test_duplicates(self): + a = set(range(6)) + for p in mi.set_partitions(a): + self.assertFalse(self._normalize_partition(p).has_duplicates()) + + def test_found_all(self): + """small example, hand-checked""" + expected = [ + [[0], [1], [2, 3, 4]], + [[0], [1, 2], [3, 4]], + [[0], [2], [1, 3, 4]], + [[0], [3], [1, 2, 4]], + [[0], [4], [1, 2, 3]], + [[0], [1, 3], [2, 4]], + [[0], [1, 4], [2, 3]], + [[1], [2], [0, 3, 4]], + [[1], [3], [0, 2, 4]], + [[1], [4], [0, 2, 3]], + [[1], [0, 2], [3, 4]], + [[1], [0, 3], [2, 4]], + [[1], [0, 4], [2, 3]], + [[2], [3], [0, 1, 4]], + [[2], [4], [0, 1, 3]], + [[2], [0, 1], [3, 4]], + [[2], [0, 3], [1, 4]], + [[2], [0, 4], [1, 3]], + [[3], [4], [0, 1, 2]], + [[3], [0, 1], [2, 4]], + [[3], [0, 2], [1, 4]], + [[3], [0, 4], [1, 2]], + [[4], [0, 1], [2, 3]], + [[4], [0, 2], [1, 3]], + [[4], [0, 3], [1, 2]], + ] + actual = mi.set_partitions(range(5), 3) + self.assertEqual( + self._normalize_partitions(expected), + self._normalize_partitions(actual), + ) + + def test_stirling_numbers(self): + """Check against https://en.wikipedia.org/wiki/ + Stirling_numbers_of_the_second_kind#Table_of_values""" + cardinality_by_k_by_n = [ + [1], + [1, 1], + [1, 3, 1], + [1, 7, 6, 1], + [1, 15, 25, 10, 1], + [1, 31, 90, 65, 15, 1], + ] + for n, cardinality_by_k in enumerate(cardinality_by_k_by_n, 1): + for k, cardinality in enumerate(cardinality_by_k, 1): + self.assertEqual( + cardinality, len(list(mi.set_partitions(range(n), k))) + ) + + def test_no_group(self): + def helper(): + list(mi.set_partitions(range(4), -1)) + + self.assertRaises(ValueError, helper) + + def test_to_many_groups(self): + self.assertEqual([], list(mi.set_partitions(range(4), 5))) + + def test_min_size(self): + it = 'abc' + actual = mi.set_partitions(it, min_size=2) + expected = [['abc']] + self.assertEqual( + self._normalize_partitions(expected), + self._normalize_partitions(actual), + ) + + def test_max_size(self): + it = 'abc' + actual = mi.set_partitions(it, max_size=2) + expected = [['a', 'bc'], ['ab', 'c'], ['b', 'ac'], ['a', 'b', 'c']] + self.assertEqual( + self._normalize_partitions(expected), + self._normalize_partitions(actual), + ) + + def test_min_max(self): + it = 'abcdefg' + self.assertEqual( + list(mi.set_partitions(it, min_size=4, max_size=3)), [] + ) + + +class TimeLimitedTests(TestCase): + def test_basic(self): + def generator(): + yield 1 + yield 2 + sleep(0.2) + yield 3 + + iterable = mi.time_limited(0.1, generator()) + actual = list(iterable) + expected = [1, 2] + self.assertEqual(actual, expected) + self.assertTrue(iterable.timed_out) + + def test_complete(self): + iterable = mi.time_limited(2, iter(range(10))) + actual = list(iterable) + expected = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] + self.assertEqual(actual, expected) + self.assertFalse(iterable.timed_out) + + def test_zero_limit(self): + iterable = mi.time_limited(0, count()) + actual = list(iterable) + expected = [] + self.assertEqual(actual, expected) + self.assertTrue(iterable.timed_out) + + def test_invalid_limit(self): + with self.assertRaises(ValueError): + list(mi.time_limited(-0.1, count())) + + +class OnlyTests(TestCase): + def test_defaults(self): + self.assertEqual(mi.only([]), None) + self.assertEqual(mi.only([1]), 1) + self.assertRaises(ValueError, lambda: mi.only([1, 2])) + + def test_custom_value(self): + self.assertEqual(mi.only([], default='!'), '!') + self.assertEqual(mi.only([1], default='!'), 1) + self.assertRaises(ValueError, lambda: mi.only([1, 2], default='!')) + + def test_custom_exception(self): + self.assertEqual(mi.only([], too_long=RuntimeError), None) + self.assertEqual(mi.only([1], too_long=RuntimeError), 1) + self.assertRaises( + RuntimeError, lambda: mi.only([1, 2], too_long=RuntimeError) + ) + + def test_default_exception_message(self): + self.assertRaisesRegex( + ValueError, + "Expected exactly one item in iterable, " + "but got 'foo', 'bar', and perhaps more", + lambda: mi.only(['foo', 'bar', 'baz']), + ) + + +class IchunkedTests(TestCase): + def test_even(self): + iterable = (str(x) for x in range(10)) + actual = [''.join(c) for c in mi.ichunked(iterable, 5)] + expected = ['01234', '56789'] + self.assertEqual(actual, expected) + + def test_odd(self): + iterable = (str(x) for x in range(10)) + actual = [''.join(c) for c in mi.ichunked(iterable, 4)] + expected = ['0123', '4567', '89'] + self.assertEqual(actual, expected) + + def test_zero(self): + iterable = [] + actual = [list(c) for c in mi.ichunked(iterable, 0)] + expected = [] + self.assertEqual(actual, expected) + + def test_negative(self): + iterable = count() + with self.assertRaises(ValueError): + [list(c) for c in mi.ichunked(iterable, -1)] + + def test_out_of_order(self): + iterable = map(str, count()) + it = mi.ichunked(iterable, 4) + chunk_1 = next(it) + chunk_2 = next(it) + self.assertEqual(''.join(chunk_2), '4567') + self.assertEqual(''.join(chunk_1), '0123') + + def test_laziness(self): + def gen(): + yield 0 + raise RuntimeError + yield from count(1) + + it = mi.ichunked(gen(), 4) + chunk = next(it) + self.assertEqual(next(chunk), 0) + self.assertRaises(RuntimeError, next, it) + + def test_memory_in_order(self): + gen_numbers = [] + + def gen(): + for gen_number in count(): + gen_numbers.append(gen_number) + yield gen_number + + # No items should be kept in memory when a ichunked is first called + all_chunks = mi.ichunked(gen(), 4) + self.assertEqual(gen_numbers, []) + + # The first item of each chunk should be generated on chunk generation + first_chunk = next(all_chunks) + self.assertEqual(gen_numbers, [0]) + + # If we don't read a chunk before getting its successor, its contents + # will be cached + second_chunk = next(all_chunks) + self.assertEqual(gen_numbers, [0, 1, 2, 3, 4]) + + # Check if we can read in cached values + self.assertEqual(list(first_chunk), [0, 1, 2, 3]) + self.assertEqual(list(second_chunk), [4, 5, 6, 7]) + + # Again only the most recent chunk should have an item cached + third_chunk = next(all_chunks) + self.assertEqual(len(gen_numbers), 9) + + # No new item should be cached when reading past the first number + next(third_chunk) + self.assertEqual(len(gen_numbers), 9) + + # we should not be able to read spent chunks + self.assertEqual(list(first_chunk), []) + self.assertEqual(list(second_chunk), []) + + +class DistinctCombinationsTests(TestCase): + def test_basic(self): + for iterable in [ + (1, 2, 2, 3, 3, 3), # In order + range(6), # All distinct + 'abbccc', # Not numbers + 'cccbba', # Backward + 'mississippi', # No particular order + ]: + for r in range(len(iterable)): + with self.subTest(iterable=iterable, r=r): + actual = list(mi.distinct_combinations(iterable, r)) + expected = list( + mi.unique_everseen(combinations(iterable, r)) + ) + self.assertEqual(actual, expected) + + def test_negative(self): + with self.assertRaises(ValueError): + list(mi.distinct_combinations([], -1)) + + def test_empty(self): + self.assertEqual(list(mi.distinct_combinations([], 2)), []) + + +class FilterExceptTests(TestCase): + def test_no_exceptions_pass(self): + iterable = '0123' + actual = list(mi.filter_except(int, iterable)) + expected = ['0', '1', '2', '3'] + self.assertEqual(actual, expected) + + def test_no_exceptions_raise(self): + iterable = ['0', '1', 'two', '3'] + with self.assertRaises(ValueError): + list(mi.filter_except(int, iterable)) + + def test_raise(self): + iterable = ['0', '12', 'three', None] + with self.assertRaises(TypeError): + list(mi.filter_except(int, iterable, ValueError)) + + def test_false(self): + # Even if the validator returns false, we pass through + validator = lambda x: False + iterable = ['0', '1', '2', 'three', None] + actual = list(mi.filter_except(validator, iterable, Exception)) + expected = ['0', '1', '2', 'three', None] + self.assertEqual(actual, expected) + + def test_multiple(self): + iterable = ['0', '1', '2', 'three', None, '4'] + actual = list(mi.filter_except(int, iterable, ValueError, TypeError)) + expected = ['0', '1', '2', '4'] + self.assertEqual(actual, expected) + + +class MapExceptTests(TestCase): + def test_no_exceptions_pass(self): + iterable = '0123' + actual = list(mi.map_except(int, iterable)) + expected = [0, 1, 2, 3] + self.assertEqual(actual, expected) + + def test_no_exceptions_raise(self): + iterable = ['0', '1', 'two', '3'] + with self.assertRaises(ValueError): + list(mi.map_except(int, iterable)) + + def test_raise(self): + iterable = ['0', '12', 'three', None] + with self.assertRaises(TypeError): + list(mi.map_except(int, iterable, ValueError)) + + def test_multiple(self): + iterable = ['0', '1', '2', 'three', None, '4'] + actual = list(mi.map_except(int, iterable, ValueError, TypeError)) + expected = [0, 1, 2, 4] + self.assertEqual(actual, expected) + + +class MapIfTests(TestCase): + def test_without_func_else(self): + iterable = list(range(-5, 5)) + actual = list(mi.map_if(iterable, lambda x: x > 3, lambda x: 'toobig')) + expected = [-5, -4, -3, -2, -1, 0, 1, 2, 3, 'toobig'] + self.assertEqual(actual, expected) + + def test_with_func_else(self): + iterable = list(range(-5, 5)) + actual = list( + mi.map_if( + iterable, lambda x: x >= 0, lambda x: 'notneg', lambda x: 'neg' + ) + ) + expected = ['neg'] * 5 + ['notneg'] * 5 + self.assertEqual(actual, expected) + + def test_empty(self): + actual = list(mi.map_if([], lambda x: len(x) > 5, lambda x: None)) + expected = [] + self.assertEqual(actual, expected) + + +class SampleTests(TestCase): + def test_specific_sample(self): + """Verify reproducibility.""" + + # Note, this test is surprisingly robust. Although it depends on the quality + # of the underlying libmath implementations for log, exp, and log1p, the + # number of samples and population size are small enough that small errors + # in those underlying functions won't affect the sample. + + seed(8675309) + self.assertEqual( + list(mi.sample(range(10**5), k=5)), + [16845, 79805, 76057, 58302, 40472], + ) + + seed(8675309) + self.assertEqual( + list(mi.sample(range(10**5), counts=[1, 2] * (10**5 // 2), k=5)), + [87899, 53203, 38868, 11230, 50705], + ) + + seed(8675309) + self.assertEqual( + list(mi.sample(range(10**5), weights=range(1, 10**5 + 1), k=5)), + [50915, 33816, 32250, 98284, 43517], + ) + + def test_unit_case(self): + """Test against a fixed case by seeding the random module.""" + # Beware that this test really just verifies random.random() behavior. + # If the algorithm is changed (e.g. to a more naive implementation) + # this test will fail, but the algorithm might be correct. + # Also, this test can pass and the algorithm can be completely wrong. + data = "abcdef" + weights = list(range(1, len(data) + 1)) + seed(123) + actual = mi.sample(data, k=2, weights=weights) + expected = ['f', 'e'] + self.assertEqual(actual, expected) + + def test_negative(self): + data = [1, 2, 3, 4, 5] + with self.assertRaises(ValueError): + mi.sample(data, k=-1) + + def test_length(self): + """Check that *k* elements are sampled.""" + data = [1, 2, 3, 4, 5] + for k in [0, 3, 5, 7]: + sampled = mi.sample(data, k=k) + actual = len(sampled) + expected = min(k, len(data)) + self.assertEqual(actual, expected) + + def test_strict(self): + data = ['1', '2', '3', '4', '5'] + self.assertEqual(set(mi.sample(data, 6, strict=False)), set(data)) + with self.assertRaises(ValueError): + mi.sample(data, 6, strict=True) + + def test_counts(self): + # Test with counts + seed(0) + iterable = ['red', 'blue'] + counts = [4, 2] + k = 5 + actual = list(mi.sample(iterable, counts=counts, k=k)) + + # Test without counts + seed(0) + decoded_iterable = (['red'] * 4) + (['blue'] * 2) + expected = list(mi.sample(decoded_iterable, k=k)) + + self.assertEqual(actual, expected) + + def test_counts_all(self): + actual = Counter(mi.sample('uwxyz', 35, counts=(1, 0, 4, 10, 20))) + expected = Counter({'u': 1, 'x': 4, 'y': 10, 'z': 20}) + self.assertEqual(actual, expected) + + def test_sampling_entire_iterable(self): + """If k=len(iterable), the sample contains the original elements.""" + data = ["a", 2, "a", 4, (1, 2, 3)] + actual = set(mi.sample(data, k=len(data))) + expected = set(data) + self.assertEqual(actual, expected) + + def test_scale_invariance_of_weights(self): + """The probability of choosing element a_i is w_i / sum(weights). + Scaling weights should not change the probability or outcome.""" + data = "abcdef" + + weights = list(range(1, len(data) + 1)) + seed(123) + first_sample = mi.sample(data, k=2, weights=weights) + + # Scale the weights and sample again + weights_scaled = [w / 1e10 for w in weights] + seed(123) + second_sample = mi.sample(data, k=2, weights=weights_scaled) + + self.assertEqual(first_sample, second_sample) + + def test_invariance_under_permutations_unweighted(self): + """The order of the data should not matter. This is a stochastic test, + but it will fail in less than 1 / 10_000 cases.""" + + # Create a data set and a reversed data set + data = list(range(100)) + data_rev = list(reversed(data)) + + # Sample each data set 10 times + data_means = [mean(mi.sample(data, k=50)) for _ in range(10)] + data_rev_means = [mean(mi.sample(data_rev, k=50)) for _ in range(10)] + + # The difference in the means should be low, i.e. little bias + difference_in_means = abs(mean(data_means) - mean(data_rev_means)) + + # The observed largest difference in 10,000 simulations was 5.09599 + self.assertTrue(difference_in_means < 5.1) + + def test_invariance_under_permutations_weighted(self): + """The order of the data should not matter. This is a stochastic test, + but it will fail in less than 1 / 10_000 cases.""" + + # Create a data set and a reversed data set + data = list(range(1, 101)) + data_rev = list(reversed(data)) + + # Sample each data set 10 times + data_means = [ + mean(mi.sample(data, k=50, weights=data)) for _ in range(10) + ] + data_rev_means = [ + mean(mi.sample(data_rev, k=50, weights=data_rev)) + for _ in range(10) + ] + + # The difference in the means should be low, i.e. little bias + difference_in_means = abs(mean(data_means) - mean(data_rev_means)) + + # The observed largest difference in 10,000 simulations was 4.337999 + self.assertTrue(difference_in_means < 4.4) + + def test_error_cases(self): + # weights and counts are mutally exclusive + with self.assertRaises(TypeError): + mi.sample( + 'abcde', 3, weights=[1, 2, 3, 4, 5], counts=[1, 2, 3, 4, 5] + ) + + # Weighted sample larger than population + with self.assertRaises(ValueError): + mi.sample('abcde', 10, weights=[1, 2, 3, 4, 5], strict=True) + + # Counted sample larger than population + with self.assertRaises(ValueError): + mi.sample('abcde', 10, counts=[1, 1, 1, 1, 1], strict=True) + + +class BarelySortable: + def __init__(self, value): + self.value = value + + def __lt__(self, other): + return self.value < other.value + + def __int__(self): + return int(self.value) + + +class IsSortedTests(TestCase): + def test_basic(self): + for iterable, kwargs, expected in [ + ([], {}, True), + ([1], {}, True), + ([1, 2, 3], {}, True), + ([1, 1, 2, 3], {}, True), + ([1, 10, 2, 3], {}, False), + (['1', '10', '2', '3'], {}, True), + (['1', '10', '2', '3'], {'key': int}, False), + ([1, 2, 3], {'reverse': True}, False), + ([1, 1, 2, 3], {'reverse': True}, False), + ([1, 10, 2, 3], {'reverse': True}, False), + (['3', '2', '10', '1'], {'reverse': True}, True), + (['3', '2', '10', '1'], {'key': int, 'reverse': True}, False), + # strict + ([], {'strict': True}, True), + ([1], {'strict': True}, True), + ([1, 1], {'strict': True}, False), + ([1, 2, 3], {'strict': True}, True), + ([1, 1, 2, 3], {'strict': True}, False), + ([1, 10, 2, 3], {'strict': True}, False), + (['1', '10', '2', '3'], {'strict': True}, True), + (['1', '10', '2', '3', '3'], {'strict': True}, False), + (['1', '10', '2', '3'], {'strict': True, 'key': int}, False), + ([1, 2, 3], {'strict': True, 'reverse': True}, False), + ([1, 1, 2, 3], {'strict': True, 'reverse': True}, False), + ([1, 10, 2, 3], {'strict': True, 'reverse': True}, False), + (['3', '2', '10', '1'], {'strict': True, 'reverse': True}, True), + ( + ['3', '2', '10', '10', '1'], + {'strict': True, 'reverse': True}, + False, + ), + ( + ['3', '2', '10', '1'], + {'strict': True, 'key': int, 'reverse': True}, + False, + ), + ]: + key = kwargs.get('key', None) + reverse = kwargs.get('reverse', False) + strict = kwargs.get('strict', False) + + with self.subTest( + iterable=iterable, key=key, reverse=reverse, strict=strict + ): + mi_result = mi.is_sorted( + map(BarelySortable, iterable), + key=key, + reverse=reverse, + strict=strict, + ) + + sorted_iterable = sorted(iterable, key=key, reverse=reverse) + if strict: + sorted_iterable = list(mi.unique_justseen(sorted_iterable)) + + py_result = iterable == sorted_iterable + + self.assertEqual(mi_result, expected) + self.assertEqual(mi_result, py_result) + + +class CallbackIterTests(TestCase): + def _target(self, cb=None, exc=None, wait=0): + total = 0 + for i, c in enumerate('abc', 1): + total += i + if wait: + sleep(wait) + if cb: + cb(i, c, intermediate_total=total) + if exc: + raise exc('error in target') + + return total + + def test_basic(self): + func = lambda callback=None: self._target(cb=callback, wait=0.02) + with mi.callback_iter(func, wait_seconds=0.01) as it: + # Execution doesn't start until we begin iterating + self.assertFalse(it.done) + + # Consume everything + self.assertEqual( + list(it), + [ + ((1, 'a'), {'intermediate_total': 1}), + ((2, 'b'), {'intermediate_total': 3}), + ((3, 'c'), {'intermediate_total': 6}), + ], + ) + + # After consuming everything the future is done and the + # result is available. + self.assertTrue(it.done) + self.assertEqual(it.result, 6) + + # This examines the internal state of the ThreadPoolExecutor. This + # isn't documented, so may break in future Python versions. + self.assertTrue(it._executor._shutdown) + + def test_callback_kwd(self): + with mi.callback_iter(self._target, callback_kwd='cb') as it: + self.assertEqual( + list(it), + [ + ((1, 'a'), {'intermediate_total': 1}), + ((2, 'b'), {'intermediate_total': 3}), + ((3, 'c'), {'intermediate_total': 6}), + ], + ) + + def test_partial_consumption(self): + func = lambda callback=None: self._target(cb=callback) + with mi.callback_iter(func) as it: + self.assertEqual(next(it), ((1, 'a'), {'intermediate_total': 1})) + + self.assertTrue(it._executor._shutdown) + + def test_abort(self): + func = lambda callback=None: self._target(cb=callback, wait=0.1) + with mi.callback_iter(func) as it: + self.assertEqual(next(it), ((1, 'a'), {'intermediate_total': 1})) + + with self.assertRaises(mi.AbortThread): + it.result + + def test_no_result(self): + func = lambda callback=None: self._target(cb=callback) + with mi.callback_iter(func) as it: + with self.assertRaises(RuntimeError): + it.result + + def test_exception(self): + func = lambda callback=None: self._target(cb=callback, exc=ValueError) + with mi.callback_iter(func) as it: + self.assertEqual( + next(it), + ((1, 'a'), {'intermediate_total': 1}), + ) + + with self.assertRaises(ValueError): + it.result + + +class WindowedCompleteTests(TestCase): + """Tests for ``windowed_complete()``""" + + def test_basic(self): + actual = list(mi.windowed_complete([1, 2, 3, 4, 5], 3)) + expected = [ + ((), (1, 2, 3), (4, 5)), + ((1,), (2, 3, 4), (5,)), + ((1, 2), (3, 4, 5), ()), + ] + self.assertEqual(actual, expected) + + def test_zero_length(self): + actual = list(mi.windowed_complete([1, 2, 3], 0)) + expected = [ + ((), (), (1, 2, 3)), + ((1,), (), (2, 3)), + ((1, 2), (), (3,)), + ((1, 2, 3), (), ()), + ] + self.assertEqual(actual, expected) + + def test_wrong_length(self): + seq = [1, 2, 3, 4, 5] + for n in (-10, -1, len(seq) + 1, len(seq) + 10): + with self.subTest(n=n): + with self.assertRaises(ValueError): + list(mi.windowed_complete(seq, n)) + + def test_every_partition(self): + every_partition = lambda seq: chain( + *map(partial(mi.windowed_complete, seq), range(len(seq))) + ) + + seq = 'ABC' + actual = list(every_partition(seq)) + expected = [ + ((), (), ('A', 'B', 'C')), + (('A',), (), ('B', 'C')), + (('A', 'B'), (), ('C',)), + (('A', 'B', 'C'), (), ()), + ((), ('A',), ('B', 'C')), + (('A',), ('B',), ('C',)), + (('A', 'B'), ('C',), ()), + ((), ('A', 'B'), ('C',)), + (('A',), ('B', 'C'), ()), + ] + self.assertEqual(actual, expected) + + +class AllUniqueTests(TestCase): + def test_basic(self): + for iterable, expected in [ + ([], True), + ([1, 2, 3], True), + ([1, 1], False), + ([1, 2, 3, 1], False), + ([1, 2, 3, '1'], True), + ]: + with self.subTest(args=(iterable,)): + self.assertEqual(mi.all_unique(iterable), expected) + + def test_non_hashable(self): + self.assertEqual(mi.all_unique([[1, 2], [3, 4]]), True) + self.assertEqual(mi.all_unique([[1, 2], [3, 4], [1, 2]]), False) + + def test_partially_hashable(self): + self.assertEqual(mi.all_unique([[1, 2], [3, 4], (5, 6)]), True) + self.assertEqual( + mi.all_unique([[1, 2], [3, 4], (5, 6), [1, 2]]), False + ) + self.assertEqual( + mi.all_unique([[1, 2], [3, 4], (5, 6), (5, 6)]), False + ) + + def test_key(self): + iterable = ['A', 'B', 'C', 'b'] + self.assertEqual(mi.all_unique(iterable, lambda x: x), True) + self.assertEqual(mi.all_unique(iterable, str.lower), False) + + def test_infinite(self): + self.assertEqual(mi.all_unique(mi.prepend(3, count())), False) + + +class NthProductTests(TestCase): + def test_basic(self): + iterables = ['ab', 'cdef', 'ghi'] + for index, expected in enumerate(product(*iterables)): + actual = mi.nth_product(index, *iterables) + self.assertEqual(actual, expected) + + def test_long(self): + actual = mi.nth_product(1337, range(101), range(22), range(53)) + expected = (1, 3, 12) + self.assertEqual(actual, expected) + + def test_negative(self): + iterables = ['abc', 'de', 'fghi'] + for index, expected in enumerate(product(*iterables)): + actual = mi.nth_product(index - 24, *iterables) + self.assertEqual(actual, expected) + + def test_invalid_index(self): + with self.assertRaises(IndexError): + mi.nth_product(24, 'ab', 'cde', 'fghi') + + +class NthCombinationWithReplacementTests(TestCase): + def test_basic(self): + iterable = 'abcdefg' + r = 4 + for index, expected in enumerate( + combinations_with_replacement(iterable, r) + ): + actual = mi.nth_combination_with_replacement(iterable, r, index) + self.assertEqual(actual, expected) + + def test_long(self): + actual = mi.nth_combination_with_replacement(range(90), 4, 2000000) + expected = (22, 65, 68, 81) + self.assertEqual(actual, expected) + + def test_invalid_r(self): + for r in (-1, 3): + with self.assertRaises(ValueError): + mi.nth_combination_with_replacement([], r, 0) + + def test_invalid_index(self): + with self.assertRaises(IndexError): + mi.nth_combination_with_replacement('abcdefg', 3, -85) + + +class ValueChainTests(TestCase): + def test_empty(self): + actual = list(mi.value_chain()) + expected = [] + self.assertEqual(actual, expected) + + def test_simple(self): + actual = list(mi.value_chain(1, 2.71828, False, 'foo')) + expected = [1, 2.71828, False, 'foo'] + self.assertEqual(actual, expected) + + def test_more(self): + actual = list(mi.value_chain(b'bar', [1, 2, 3], 4, {'key': 1})) + expected = [b'bar', 1, 2, 3, 4, 'key'] + self.assertEqual(actual, expected) + + def test_empty_lists(self): + actual = list(mi.value_chain(1, 2, [], [3, 4])) + expected = [1, 2, 3, 4] + self.assertEqual(actual, expected) + + def test_complex(self): + obj = object() + actual = list( + mi.value_chain( + (1, (2, (3,))), + ['foo', ['bar', ['baz']], 'tic'], + {'key': {'foo': 1}}, + obj, + ) + ) + expected = [1, (2, (3,)), 'foo', ['bar', ['baz']], 'tic', 'key', obj] + self.assertEqual(actual, expected) + + +class ProductIndexTests(TestCase): + def test_basic(self): + iterables = ['ab', 'cdef', 'ghi'] + first_index = {} + for index, element in enumerate(product(*iterables)): + actual = mi.product_index(element, *iterables) + expected = first_index.setdefault(element, index) + self.assertEqual(actual, expected) + + def test_multiplicity(self): + iterables = ['ab', 'bab', 'cab'] + first_index = {} + for index, element in enumerate(product(*iterables)): + actual = mi.product_index(element, *iterables) + expected = first_index.setdefault(element, index) + self.assertEqual(actual, expected) + + def test_long(self): + actual = mi.product_index((1, 3, 12), range(101), range(22), range(53)) + expected = 1337 + self.assertEqual(actual, expected) + + def test_invalid_empty(self): + with self.assertRaises(ValueError): + mi.product_index('', 'ab', 'cde', 'fghi') + + def test_invalid_small(self): + with self.assertRaises(ValueError): + mi.product_index('ac', 'ab', 'cde', 'fghi') + + def test_invalid_large(self): + with self.assertRaises(ValueError): + mi.product_index('achi', 'ab', 'cde', 'fghi') + + def test_invalid_match(self): + with self.assertRaises(ValueError): + mi.product_index('axf', 'ab', 'cde', 'fghi') + + +class CombinationIndexTests(TestCase): + def test_r_less_than_n(self): + iterable = 'abcdefg' + r = 4 + first_index = {} + for index, element in enumerate(combinations(iterable, r)): + actual = mi.combination_index(element, iterable) + expected = first_index.setdefault(element, index) + self.assertEqual(actual, expected) + + def test_r_equal_to_n(self): + iterable = 'abcd' + r = len(iterable) + first_index = {} + for index, element in enumerate(combinations(iterable, r=r)): + actual = mi.combination_index(element, iterable) + expected = first_index.setdefault(element, index) + self.assertEqual(actual, expected) + + def test_multiplicity(self): + iterable = 'abacba' + r = 3 + first_index = {} + for index, element in enumerate(combinations(iterable, r)): + actual = mi.combination_index(element, iterable) + expected = first_index.setdefault(element, index) + self.assertEqual(actual, expected) + + def test_null(self): + actual = mi.combination_index(tuple(), []) + expected = 0 + self.assertEqual(actual, expected) + + def test_long(self): + actual = mi.combination_index((2, 12, 35, 126), range(180)) + expected = 2000000 + self.assertEqual(actual, expected) + + def test_invalid_order(self): + with self.assertRaises(ValueError): + mi.combination_index(tuple('acb'), 'abcde') + + def test_invalid_large(self): + with self.assertRaises(ValueError): + mi.combination_index(tuple('abcdefg'), 'abcdef') + + def test_invalid_match(self): + with self.assertRaises(ValueError): + mi.combination_index(tuple('axe'), 'abcde') + + +class CombinationWithReplacementIndexTests(TestCase): + def test_r_less_than_n(self): + iterable = 'abcdefg' + r = 4 + first_index = {} + for index, element in enumerate( + combinations_with_replacement(iterable, r) + ): + actual = mi.combination_with_replacement_index(element, iterable) + expected = first_index.setdefault(element, index) + self.assertEqual(actual, expected) + + def test_r_equal_to_n(self): + iterable = 'abcd' + r = len(iterable) + first_index = {} + for index, element in enumerate( + combinations_with_replacement(iterable, r=r) + ): + actual = mi.combination_with_replacement_index(element, iterable) + expected = first_index.setdefault(element, index) + self.assertEqual(actual, expected) + + def test_multiplicity(self): + iterable = 'abacba' + r = 3 + first_index = {} + for index, element in enumerate( + combinations_with_replacement(iterable, r) + ): + actual = mi.combination_with_replacement_index(element, iterable) + expected = first_index.setdefault(element, index) + self.assertEqual(actual, expected) + + def test_null(self): + actual = mi.combination_with_replacement_index(tuple(), []) + expected = 0 + self.assertEqual(actual, expected) + + def test_long(self): + actual = mi.combination_with_replacement_index( + (22, 65, 68, 81), range(90) + ) + expected = 2000000 + self.assertEqual(actual, expected) + + def test_invalid_order(self): + with self.assertRaises(ValueError): + mi.combination_with_replacement_index(tuple('acb'), 'abcde') + + def test_invalid_large(self): + with self.assertRaises(ValueError): + mi.combination_with_replacement_index(tuple('abcdefg'), 'abcdef') + + def test_invalid_match(self): + with self.assertRaises(ValueError): + mi.combination_with_replacement_index(tuple('axe'), 'abcde') + + +class PermutationIndexTests(TestCase): + def test_r_less_than_n(self): + iterable = 'abcdefg' + r = 4 + first_index = {} + for index, element in enumerate(permutations(iterable, r)): + actual = mi.permutation_index(element, iterable) + expected = first_index.setdefault(element, index) + self.assertEqual(actual, expected) + + def test_r_equal_to_n(self): + iterable = 'abcd' + first_index = {} + for index, element in enumerate(permutations(iterable)): + actual = mi.permutation_index(element, iterable) + expected = first_index.setdefault(element, index) + self.assertEqual(actual, expected) + + def test_multiplicity(self): + iterable = 'abacba' + r = 3 + first_index = {} + for index, element in enumerate(permutations(iterable, r)): + actual = mi.permutation_index(element, iterable) + expected = first_index.setdefault(element, index) + self.assertEqual(actual, expected) + + def test_null(self): + actual = mi.permutation_index(tuple(), []) + expected = 0 + self.assertEqual(actual, expected) + + def test_long(self): + actual = mi.permutation_index((2, 12, 35, 126), range(180)) + expected = 11631678 + self.assertEqual(actual, expected) + + def test_invalid_large(self): + with self.assertRaises(ValueError): + mi.permutation_index(tuple('abcdefg'), 'abcdef') + + def test_invalid_match(self): + with self.assertRaises(ValueError): + mi.permutation_index(tuple('axe'), 'abcde') + + +class CountableTests(TestCase): + def test_empty(self): + iterable = [] + it = mi.countable(iterable) + self.assertEqual(it.items_seen, 0) + self.assertEqual(list(it), []) + + def test_basic(self): + iterable = '0123456789' + it = mi.countable(iterable) + self.assertEqual(it.items_seen, 0) + self.assertEqual(next(it), '0') + self.assertEqual(it.items_seen, 1) + self.assertEqual(''.join(it), '123456789') + self.assertEqual(it.items_seen, 10) + + +class ChunkedEvenTests(TestCase): + """Tests for ``chunked_even()``""" + + def test_0(self): + self._test_finite('', 3, []) + + def test_1(self): + self._test_finite('A', 1, [['A']]) + + def test_4(self): + self._test_finite('ABCD', 3, [['A', 'B'], ['C', 'D']]) + + def test_5(self): + self._test_finite('ABCDE', 3, [['A', 'B', 'C'], ['D', 'E']]) + + def test_6(self): + self._test_finite('ABCDEF', 3, [['A', 'B', 'C'], ['D', 'E', 'F']]) + + def test_7(self): + self._test_finite( + 'ABCDEFG', 3, [['A', 'B', 'C'], ['D', 'E'], ['F', 'G']] + ) + + def _test_finite(self, seq, n, expected): + # Check with and without `len()` + self.assertEqual(list(mi.chunked_even(seq, n)), expected) + self.assertEqual(list(mi.chunked_even(iter(seq), n)), expected) + + def test_infinite(self): + for n in range(1, 5): + k = 0 + + def count_with_assert(): + for i in count(): + # Look-ahead should be less than n^2 + self.assertLessEqual(i, n * k + n * n) + yield i + + ls = mi.chunked_even(count_with_assert(), n) + while k < 2: + self.assertEqual(next(ls), list(range(k * n, (k + 1) * n))) + k += 1 + + def test_evenness(self): + for N in range(1, 50): + for n in range(1, N + 2): + lengths = [] + items = [] + for l in mi.chunked_even(range(N), n): + L = len(l) + self.assertLessEqual(L, n) + self.assertGreaterEqual(L, 1) + lengths.append(L) + items.extend(l) + self.assertEqual(items, list(range(N))) + self.assertLessEqual(max(lengths) - min(lengths), 1) + + +class ZipBroadcastTests(TestCase): + def test_zip(self): + for objects, zipped, strict_ok in [ + # Empty + ([], [], True), + # One argument + ([1], [(1,)], True), + ([[1]], [(1,)], True), + ([[1, 2]], [(1,), (2,)], True), + # All scalars + ([1, 2], [(1, 2)], True), + ([1, 2, 3], [(1, 2, 3)], True), + # Iterables with length = 0 + ([[], 1], [], True), + ([1, []], [], True), + ([[], []], [], True), + ([[], 1, 2], [], True), + ([[], 1, []], [], True), + ([1, [], 2], [], True), + ([1, [], []], [], True), + ([[], [], 1], [], True), + ([[], [], []], [], True), + # Iterables with length = 1 + ([1, [2]], [(1, 2)], True), + ([[1], 2], [(1, 2)], True), + ([[1], [2]], [(1, 2)], True), + ([1, [2], 3], [(1, 2, 3)], True), + ([1, [2], [3]], [(1, 2, 3)], True), + ([[1], 2, 3], [(1, 2, 3)], True), + ([[1], 2, [3]], [(1, 2, 3)], True), + ([[1], [2], 3], [(1, 2, 3)], True), + ([[1], [2], [3]], [(1, 2, 3)], True), + # Iterables with length > 1 + ([1, [2, 3]], [(1, 2), (1, 3)], True), + ([[1, 2], 3], [(1, 3), (2, 3)], True), + ([[1, 2], [3, 4]], [(1, 3), (2, 4)], True), + ([1, [2, 3], 4], [(1, 2, 4), (1, 3, 4)], True), + ([1, [2, 3], [4, 5]], [(1, 2, 4), (1, 3, 5)], True), + ([[1, 2], 3, 4], [(1, 3, 4), (2, 3, 4)], True), + ([[1, 2], 3, [4, 5]], [(1, 3, 4), (2, 3, 5)], True), + ([[1, 2], [3, 4], 5], [(1, 3, 5), (2, 4, 5)], True), + ([[1, 2], [3, 4], [5, 6]], [(1, 3, 5), (2, 4, 6)], True), + # Iterables with different lengths + ([[], [1]], [], False), + ([[1], []], [], False), + ([[1], [2, 3]], [(1, 2)], False), + ([[1, 2], [3]], [(1, 3)], False), + ([[1, 2], [3], [4]], [(1, 3, 4)], False), + ([[1], [2, 3], [4]], [(1, 2, 4)], False), + ([[1], [2], [3, 4]], [(1, 2, 3)], False), + ([[1], [2, 3], [4, 5]], [(1, 2, 4)], False), + ([[1, 2], [3], [4, 5]], [(1, 3, 4)], False), + ([[1, 2], [3, 4], [5]], [(1, 3, 5)], False), + ([1, [2, 3], [4, 5, 6]], [(1, 2, 4), (1, 3, 5)], False), + ([[1, 2], 3, [4, 5, 6]], [(1, 3, 4), (2, 3, 5)], False), + ([1, [2, 3, 4], [5, 6]], [(1, 2, 5), (1, 3, 6)], False), + ([[1, 2, 3], 4, [5, 6]], [(1, 4, 5), (2, 4, 6)], False), + ([[1, 2], [3, 4, 5], 6], [(1, 3, 6), (2, 4, 6)], False), + ([[1, 2, 3], [4, 5], 6], [(1, 4, 6), (2, 5, 6)], False), + # Infinite + ([count(), 1, [2]], [(0, 1, 2)], False), + ([count(), 1, [2, 3]], [(0, 1, 2), (1, 1, 3)], False), + # Miscellaneous + (['a', [1, 2], [3, 4, 5]], [('a', 1, 3), ('a', 2, 4)], False), + ]: + # Truncate by default + with self.subTest(objects=objects, strict=False, zipped=zipped): + self.assertEqual(list(mi.zip_broadcast(*objects)), zipped) + + # Raise an exception for strict=True + with self.subTest(objects=objects, strict=True, zipped=zipped): + if strict_ok: + self.assertEqual( + list(mi.zip_broadcast(*objects, strict=True)), + zipped, + ) + else: + with self.assertRaises(ValueError): + list(mi.zip_broadcast(*objects, strict=True)) + + def test_scalar_types(self): + # Default: str and bytes are treated as scalar + self.assertEqual( + list(mi.zip_broadcast('ab', [1, 2, 3])), + [('ab', 1), ('ab', 2), ('ab', 3)], + ) + self.assertEqual( + list(mi.zip_broadcast(b'ab', [1, 2, 3])), + [(b'ab', 1), (b'ab', 2), (b'ab', 3)], + ) + # scalar_types=None allows str and bytes to be treated as iterable + self.assertEqual( + list(mi.zip_broadcast('abc', [1, 2, 3], scalar_types=None)), + [('a', 1), ('b', 2), ('c', 3)], + ) + # Use a custom type + self.assertEqual( + list(mi.zip_broadcast({'a': 'b'}, [1, 2, 3], scalar_types=dict)), + [({'a': 'b'}, 1), ({'a': 'b'}, 2), ({'a': 'b'}, 3)], + ) + + +class UniqueInWindowTests(TestCase): + def test_invalid_n(self): + with self.assertRaises(ValueError): + list(mi.unique_in_window([], 0)) + + def test_basic(self): + for iterable, n, expected in [ + (range(9), 10, list(range(9))), + (range(20), 10, list(range(20))), + ([1, 2, 3, 4, 4, 4], 1, [1, 2, 3, 4, 4, 4]), + ([1, 2, 3, 4, 4, 4], 2, [1, 2, 3, 4]), + ([1, 2, 3, 4, 4, 4], 3, [1, 2, 3, 4]), + ([1, 2, 3, 4, 4, 4], 4, [1, 2, 3, 4]), + ([1, 2, 3, 4, 4, 4], 5, [1, 2, 3, 4]), + ( + [0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 2, 3, 4, 2], + 2, + [0, 1, 0, 2, 3, 4, 2], + ), + ]: + with self.subTest(expected=expected): + actual = list(mi.unique_in_window(iterable, n)) + self.assertEqual(actual, expected) + + def test_key(self): + iterable = [0, 1, 3, 4, 5, 6, 7, 8, 9] + n = 3 + key = lambda x: x // 3 + actual = list(mi.unique_in_window(iterable, n, key=key)) + expected = [0, 3, 6, 9] + self.assertEqual(actual, expected) + + +class StrictlyNTests(TestCase): + def test_basic(self): + iterable = ['a', 'b', 'c', 'd'] + n = 4 + actual = list(mi.strictly_n(iter(iterable), n)) + expected = iterable + self.assertEqual(actual, expected) + + def test_too_short_default(self): + iterable = ['a', 'b', 'c', 'd'] + n = 5 + with self.assertRaises(ValueError) as exc: + list(mi.strictly_n(iter(iterable), n)) + + self.assertEqual( + 'Too few items in iterable (got 4)', exc.exception.args[0] + ) + + def test_too_long_default(self): + iterable = ['a', 'b', 'c', 'd'] + n = 3 + with self.assertRaises(ValueError) as cm: + list(mi.strictly_n(iter(iterable), n)) + + self.assertEqual( + 'Too many items in iterable (got at least 4)', + cm.exception.args[0], + ) + + def test_too_short_custom(self): + call_count = 0 + + def too_short(item_count): + nonlocal call_count + call_count += 1 + + iterable = ['a', 'b', 'c', 'd'] + n = 6 + actual = [] + for item in mi.strictly_n(iter(iterable), n, too_short=too_short): + actual.append(item) + expected = ['a', 'b', 'c', 'd'] + self.assertEqual(actual, expected) + self.assertEqual(call_count, 1) + + def test_too_long_custom(self): + import logging + + iterable = ['a', 'b', 'c', 'd'] + n = 2 + too_long = lambda item_count: logging.warning( + 'Picked the first %s items', n + ) + + with self.assertLogs(level='WARNING') as cm: + actual = list(mi.strictly_n(iter(iterable), n, too_long=too_long)) + + self.assertEqual(actual, ['a', 'b']) + self.assertIn('Picked the first 2 items', cm.output[0]) + + +class DuplicatesEverSeenTests(TestCase): + def test_basic(self): + for iterable, expected in [ + ([], []), + ([1, 2, 3], []), + ([1, 1], [1]), + ([1, 2, 1, 2], [1, 2]), + ([1, 2, 3, '1'], []), + ]: + with self.subTest(args=(iterable,)): + self.assertEqual( + list(mi.duplicates_everseen(iterable)), expected + ) + + def test_non_hashable(self): + self.assertEqual(list(mi.duplicates_everseen([[1, 2], [3, 4]])), []) + self.assertEqual( + list(mi.duplicates_everseen([[1, 2], [3, 4], [1, 2]])), [[1, 2]] + ) + + def test_partially_hashable(self): + self.assertEqual( + list(mi.duplicates_everseen([[1, 2], [3, 4], (5, 6)])), [] + ) + self.assertEqual( + list(mi.duplicates_everseen([[1, 2], [3, 4], (5, 6), [1, 2]])), + [[1, 2]], + ) + self.assertEqual( + list(mi.duplicates_everseen([[1, 2], [3, 4], (5, 6), (5, 6)])), + [(5, 6)], + ) + + def test_key_hashable(self): + iterable = 'HEheHEhe' + self.assertEqual(list(mi.duplicates_everseen(iterable)), list('HEhe')) + self.assertEqual( + list(mi.duplicates_everseen(iterable, str.lower)), + list('heHEhe'), + ) + + def test_key_non_hashable(self): + iterable = [[1, 2], [3, 0], [5, -2], [5, 6]] + self.assertEqual( + list(mi.duplicates_everseen(iterable, lambda x: x)), [] + ) + self.assertEqual( + list(mi.duplicates_everseen(iterable, sum)), [[3, 0], [5, -2]] + ) + + def test_key_partially_hashable(self): + iterable = [[1, 2], (1, 2), [1, 2], [5, 6]] + self.assertEqual( + list(mi.duplicates_everseen(iterable, lambda x: x)), [[1, 2]] + ) + self.assertEqual( + list(mi.duplicates_everseen(iterable, list)), [(1, 2), [1, 2]] + ) + + +class DuplicatesJustSeenTests(TestCase): + def test_basic(self): + for iterable, expected in [ + ([], []), + ([1, 2, 3, 3, 2, 2], [3, 2]), + ([1, 1], [1]), + ([1, 2, 1, 2], []), + ([1, 2, 3, '1'], []), + ]: + with self.subTest(args=(iterable,)): + self.assertEqual( + list(mi.duplicates_justseen(iterable)), expected + ) + + def test_non_hashable(self): + self.assertEqual(list(mi.duplicates_justseen([[1, 2], [3, 4]])), []) + self.assertEqual( + list( + mi.duplicates_justseen( + [[1, 2], [3, 4], [3, 4], [3, 4], [1, 2]] + ) + ), + [[3, 4], [3, 4]], + ) + + def test_partially_hashable(self): + self.assertEqual( + list(mi.duplicates_justseen([[1, 2], [3, 4], (5, 6)])), [] + ) + self.assertEqual( + list( + mi.duplicates_justseen( + [[1, 2], [3, 4], (5, 6), [1, 2], [1, 2]] + ) + ), + [[1, 2]], + ) + self.assertEqual( + list( + mi.duplicates_justseen( + [[1, 2], [3, 4], (5, 6), (5, 6), (5, 6)] + ) + ), + [(5, 6), (5, 6)], + ) + + def test_key_hashable(self): + iterable = 'HEheHHHhEheeEe' + self.assertEqual(list(mi.duplicates_justseen(iterable)), list('HHe')) + self.assertEqual( + list(mi.duplicates_justseen(iterable, str.lower)), + list('HHheEe'), + ) + + def test_key_non_hashable(self): + iterable = [[1, 2], [3, 0], [5, -2], [5, 6], [1, 2]] + self.assertEqual( + list(mi.duplicates_justseen(iterable, lambda x: x)), [] + ) + self.assertEqual( + list(mi.duplicates_justseen(iterable, sum)), [[3, 0], [5, -2]] + ) + + def test_key_partially_hashable(self): + iterable = [[1, 2], (1, 2), [1, 2], [5, 6], [1, 2]] + self.assertEqual( + list(mi.duplicates_justseen(iterable, lambda x: x)), [] + ) + self.assertEqual( + list(mi.duplicates_justseen(iterable, list)), [(1, 2), [1, 2]] + ) + + def test_nested(self): + iterable = [[[1, 2], [1, 2]], [5, 6], [5, 6]] + self.assertEqual(list(mi.duplicates_justseen(iterable)), [[5, 6]]) + + +class ClassifyUniqueTests(TestCase): + def test_basic(self): + self.assertEqual( + list(mi.classify_unique('mississippi')), + [ + ('m', True, True), + ('i', True, True), + ('s', True, True), + ('s', False, False), + ('i', True, False), + ('s', True, False), + ('s', False, False), + ('i', True, False), + ('p', True, True), + ('p', False, False), + ('i', True, False), + ], + ) + + def test_non_hashable(self): + self.assertEqual( + list(mi.classify_unique([[1, 2], [3, 4], [3, 4], [1, 2]])), + [ + ([1, 2], True, True), + ([3, 4], True, True), + ([3, 4], False, False), + ([1, 2], True, False), + ], + ) + + def test_partially_hashable(self): + self.assertEqual( + list( + mi.classify_unique( + [[1, 2], [3, 4], (5, 6), (5, 6), (3, 4), [1, 2]] + ) + ), + [ + ([1, 2], True, True), + ([3, 4], True, True), + ((5, 6), True, True), + ((5, 6), False, False), + ((3, 4), True, True), + ([1, 2], True, False), + ], + ) + + def test_key_hashable(self): + iterable = 'HEheHHHhEheeEe' + self.assertEqual( + list(mi.classify_unique(iterable)), + [ + ('H', True, True), + ('E', True, True), + ('h', True, True), + ('e', True, True), + ('H', True, False), + ('H', False, False), + ('H', False, False), + ('h', True, False), + ('E', True, False), + ('h', True, False), + ('e', True, False), + ('e', False, False), + ('E', True, False), + ('e', True, False), + ], + ) + self.assertEqual( + list(mi.classify_unique(iterable, str.lower)), + [ + ('H', True, True), + ('E', True, True), + ('h', True, False), + ('e', True, False), + ('H', True, False), + ('H', False, False), + ('H', False, False), + ('h', False, False), + ('E', True, False), + ('h', True, False), + ('e', True, False), + ('e', False, False), + ('E', False, False), + ('e', False, False), + ], + ) + + def test_key_non_hashable(self): + iterable = [[1, 2], [3, 0], [5, -2], [5, 6], [1, 2]] + self.assertEqual( + list(mi.classify_unique(iterable, lambda x: x)), + [ + ([1, 2], True, True), + ([3, 0], True, True), + ([5, -2], True, True), + ([5, 6], True, True), + ([1, 2], True, False), + ], + ) + self.assertEqual( + list(mi.classify_unique(iterable, sum)), + [ + ([1, 2], True, True), + ([3, 0], False, False), + ([5, -2], False, False), + ([5, 6], True, True), + ([1, 2], True, False), + ], + ) + + def test_key_partially_hashable(self): + iterable = [[1, 2], (1, 2), [1, 2], [5, 6], [1, 2]] + self.assertEqual( + list(mi.classify_unique(iterable, lambda x: x)), + [ + ([1, 2], True, True), + ((1, 2), True, True), + ([1, 2], True, False), + ([5, 6], True, True), + ([1, 2], True, False), + ], + ) + self.assertEqual( + list(mi.classify_unique(iterable, list)), + [ + ([1, 2], True, True), + ((1, 2), False, False), + ([1, 2], False, False), + ([5, 6], True, True), + ([1, 2], True, False), + ], + ) + + def test_vs_unique_everseen(self): + input = 'AAAABBBBCCDAABBB' + output = [e for e, j, u in mi.classify_unique(input) if u] + self.assertEqual(output, ['A', 'B', 'C', 'D']) + self.assertEqual(list(mi.unique_everseen(input)), output) + + def test_vs_unique_everseen_key(self): + input = 'aAbACCc' + output = [e for e, j, u in mi.classify_unique(input, str.lower) if u] + self.assertEqual(output, list('abC')) + self.assertEqual(list(mi.unique_everseen(input, str.lower)), output) + + def test_vs_unique_justseen(self): + input = 'AAAABBBCCDABB' + output = [e for e, j, u in mi.classify_unique(input) if j] + self.assertEqual(output, list('ABCDAB')) + self.assertEqual(list(mi.unique_justseen(input)), output) + + def test_vs_unique_justseen_key(self): + input = 'AABCcAD' + output = [e for e, j, u in mi.classify_unique(input, str.lower) if j] + self.assertEqual(output, list('ABCAD')) + self.assertEqual(list(mi.unique_justseen(input, str.lower)), output) + + def test_vs_duplicates_everseen(self): + input = [1, 2, 1, 2] + output = [e for e, j, u in mi.classify_unique(input) if not u] + self.assertEqual(output, [1, 2]) + self.assertEqual(list(mi.duplicates_everseen(input)), output) + + def test_vs_duplicates_everseen_key(self): + input = 'HEheHEhe' + output = [ + e for e, j, u in mi.classify_unique(input, str.lower) if not u + ] + self.assertEqual(output, list('heHEhe')) + self.assertEqual( + list(mi.duplicates_everseen(input, str.lower)), output + ) + + def test_vs_duplicates_justseen(self): + input = [1, 2, 3, 3, 2, 2] + output = [e for e, j, u in mi.classify_unique(input) if not j] + self.assertEqual(output, [3, 2]) + self.assertEqual(list(mi.duplicates_justseen(input)), output) + + def test_vs_duplicates_justseen_key(self): + input = 'HEheHHHhEheeEe' + output = [ + e for e, j, u in mi.classify_unique(input, str.lower) if not j + ] + self.assertEqual(output, list('HHheEe')) + self.assertEqual( + list(mi.duplicates_justseen(input, str.lower)), output + ) + + +class LongestCommonPrefixTests(TestCase): + def test_basic(self): + iterables = [[1, 2], [1, 2, 3], [1, 2, 4]] + self.assertEqual(list(mi.longest_common_prefix(iterables)), [1, 2]) + + def test_iterators(self): + iterables = iter([iter([1, 2]), iter([1, 2, 3]), iter([1, 2, 4])]) + self.assertEqual(list(mi.longest_common_prefix(iterables)), [1, 2]) + + def test_no_iterables(self): + iterables = [] + self.assertEqual(list(mi.longest_common_prefix(iterables)), []) + + def test_empty_iterables_only(self): + iterables = [[], [], []] + self.assertEqual(list(mi.longest_common_prefix(iterables)), []) + + def test_includes_empty_iterables(self): + iterables = [[1, 2], [1, 2, 3], [1, 2, 4], []] + self.assertEqual(list(mi.longest_common_prefix(iterables)), []) + + def test_non_hashable(self): + # See https://github.com/more-itertools/more-itertools/issues/603 + iterables = [[[1], [2]], [[1], [2], [3]], [[1], [2], [4]]] + self.assertEqual(list(mi.longest_common_prefix(iterables)), [[1], [2]]) + + def test_prefix_contains_elements_of_the_first_iterable(self): + iterables = [[[1], [2]], [[1], [2], [3]], [[1], [2], [4]]] + prefix = list(mi.longest_common_prefix(iterables)) + self.assertIs(prefix[0], iterables[0][0]) + self.assertIs(prefix[1], iterables[0][1]) + self.assertIsNot(prefix[0], iterables[1][0]) + self.assertIsNot(prefix[1], iterables[1][1]) + self.assertIsNot(prefix[0], iterables[2][0]) + self.assertIsNot(prefix[1], iterables[2][1]) + + def test_infinite_iterables(self): + prefix = mi.longest_common_prefix([count(), count()]) + self.assertEqual(next(prefix), 0) + self.assertEqual(next(prefix), 1) + self.assertEqual(next(prefix), 2) + + def test_contains_infinite_iterables(self): + iterables = [[0, 1, 2], count()] + self.assertEqual(list(mi.longest_common_prefix(iterables)), [0, 1, 2]) + + +class IequalsTests(TestCase): + def test_basic(self): + self.assertTrue(mi.iequals("abc", iter("abc"))) + self.assertTrue(mi.iequals(range(3), [0, 1, 2])) + self.assertFalse(mi.iequals("abc", [0, 1, 2])) + + def test_no_iterables(self): + self.assertTrue(mi.iequals()) + + def test_one_iterable(self): + self.assertTrue(mi.iequals("abc")) + + def test_more_than_two_iterable(self): + self.assertTrue(mi.iequals("abc", iter("abc"), ['a', 'b', 'c'])) + self.assertFalse(mi.iequals("abc", iter("abc"), ['a', 'b', 'd'])) + + def test_order_matters(self): + self.assertFalse(mi.iequals("abc", "acb")) + + def test_not_equal_lengths(self): + self.assertFalse(mi.iequals("abc", "ab")) + self.assertFalse(mi.iequals("abc", "bc")) + self.assertFalse(mi.iequals("aaa", "aaaa")) + + def test_empty_iterables(self): + self.assertTrue(mi.iequals([], "")) + + def test_none_is_not_a_sentinel(self): + # See https://stackoverflow.com/a/900444 + self.assertFalse(mi.iequals([1, 2], [1, 2, None])) + self.assertFalse(mi.iequals([1, 2], [None, 1, 2])) + + def test_not_identical_but_equal(self): + self.assertTrue([1, True], [1.0, complex(1, 0)]) + + +class ConstrainedBatchesTests(TestCase): + def test_basic(self): + zen = [ + 'Beautiful is better than ugly', + 'Explicit is better than implicit', + 'Simple is better than complex', + 'Complex is better than complicated', + 'Flat is better than nested', + 'Sparse is better than dense', + 'Readability counts', + ] + for size, expected in ( + ( + 34, + [ + (zen[0],), + (zen[1],), + (zen[2],), + (zen[3],), + (zen[4],), + (zen[5],), + (zen[6],), + ], + ), + ( + 61, + [ + (zen[0], zen[1]), + (zen[2],), + (zen[3], zen[4]), + (zen[5], zen[6]), + ], + ), + ( + 90, + [ + (zen[0], zen[1], zen[2]), + (zen[3], zen[4], zen[5]), + (zen[6],), + ], + ), + ( + 124, + [(zen[0], zen[1], zen[2], zen[3]), (zen[4], zen[5], zen[6])], + ), + ( + 150, + [(zen[0], zen[1], zen[2], zen[3], zen[4]), (zen[5], zen[6])], + ), + ( + 177, + [(zen[0], zen[1], zen[2], zen[3], zen[4], zen[5]), (zen[6],)], + ), + ): + with self.subTest(size=size): + actual = list(mi.constrained_batches(iter(zen), size)) + self.assertEqual(actual, expected) + + def test_max_count(self): + iterable = ['1', '1', '12345678', '12345', '12345'] + max_size = 10 + max_count = 2 + actual = list(mi.constrained_batches(iterable, max_size, max_count)) + expected = [('1', '1'), ('12345678',), ('12345', '12345')] + self.assertEqual(actual, expected) + + def test_strict(self): + iterable = ['1', '123456789', '1'] + size = 8 + with self.assertRaises(ValueError): + list(mi.constrained_batches(iterable, size)) + + actual = list(mi.constrained_batches(iterable, size, strict=False)) + expected = [('1',), ('123456789',), ('1',)] + self.assertEqual(actual, expected) + + def test_get_len(self): + class Record(tuple): + def total_size(self): + return sum(len(x) for x in self) + + record_3 = Record(('1', '23')) + record_5 = Record(('1234', '1')) + record_10 = Record(('1', '12345678', '1')) + record_2 = Record(('1', '1')) + iterable = [record_3, record_5, record_10, record_2] + + self.assertEqual( + list( + mi.constrained_batches( + iterable, 10, get_len=lambda x: x.total_size() + ) + ), + [(record_3, record_5), (record_10,), (record_2,)], + ) + + def test_bad_max(self): + with self.assertRaises(ValueError): + list(mi.constrained_batches([], 0)) + + +class GrayProductTests(TestCase): + def test_basic(self): + self.assertEqual( + tuple(mi.gray_product(('a', 'b', 'c'), range(1, 3))), + (("a", 1), ("b", 1), ("c", 1), ("c", 2), ("b", 2), ("a", 2)), + ) + out = mi.gray_product(('foo', 'bar'), (3, 4, 5, 6), ['quz', 'baz']) + self.assertEqual(next(out), ('foo', 3, 'quz')) + self.assertEqual( + list(out), + [ + ('bar', 3, 'quz'), + ('bar', 4, 'quz'), + ('foo', 4, 'quz'), + ('foo', 5, 'quz'), + ('bar', 5, 'quz'), + ('bar', 6, 'quz'), + ('foo', 6, 'quz'), + ('foo', 6, 'baz'), + ('bar', 6, 'baz'), + ('bar', 5, 'baz'), + ('foo', 5, 'baz'), + ('foo', 4, 'baz'), + ('bar', 4, 'baz'), + ('bar', 3, 'baz'), + ('foo', 3, 'baz'), + ], + ) + self.assertEqual(tuple(mi.gray_product()), ((),)) + self.assertEqual(tuple(mi.gray_product((1, 2))), ((1,), (2,))) + + def test_errors(self): + with self.assertRaises(ValueError): + list(mi.gray_product((1, 2), ())) + with self.assertRaises(ValueError): + list(mi.gray_product((1, 2), (2,))) + + def test_vs_product(self): + iters = ( + ("a", "b"), + range(3, 6), + [None, None], + {"i", "j", "k", "l"}, + "XYZ", + ) + self.assertEqual( + sorted(product(*iters)), sorted(mi.gray_product(*iters)) + ) + + +class PartialProductTests(TestCase): + def test_no_iterables(self): + self.assertEqual(tuple(mi.partial_product()), ((),)) + + def test_empty_iterable(self): + self.assertEqual(tuple(mi.partial_product('AB', '', 'CD')), ()) + + def test_one_iterable(self): + # a single iterable should pass through + self.assertEqual( + tuple(mi.partial_product('ABCD')), + ( + ('A',), + ('B',), + ('C',), + ('D',), + ), + ) + + def test_two_iterables(self): + self.assertEqual( + list(mi.partial_product('ABCD', [1])), + [('A', 1), ('B', 1), ('C', 1), ('D', 1)], + ) + expected = [ + ('A', 1), + ('B', 1), + ('C', 1), + ('D', 1), + ('D', 2), + ('D', 3), + ('D', 4), + ] + self.assertEqual( + list(mi.partial_product('ABCD', [1, 2, 3, 4])), expected + ) + + def test_basic(self): + ones = [1, 2, 3] + tens = [10, 20, 30, 40, 50] + hundreds = [100, 200] + + expected = [ + (1, 10, 100), + (2, 10, 100), + (3, 10, 100), + (3, 20, 100), + (3, 30, 100), + (3, 40, 100), + (3, 50, 100), + (3, 50, 200), + ] + + actual = list(mi.partial_product(ones, tens, hundreds)) + self.assertEqual(actual, expected) + + def test_uneven_length_iterables(self): + # this is also the docstring example + expected = [ + ('A', 'C', 'D'), + ('B', 'C', 'D'), + ('B', 'C', 'E'), + ('B', 'C', 'F'), + ] + + self.assertEqual(list(mi.partial_product('AB', 'C', 'DEF')), expected) + + +class IterateTests(TestCase): + def test_basic(self) -> None: + result = list(islice(mi.iterate(lambda x: 2 * x, start=1), 10)) + expected = [1, 2, 4, 8, 16, 32, 64, 128, 256, 512] + self.assertEqual(result, expected) + + def test_func_controls_iteration_stop(self) -> None: + def func(num): + if num > 100: + raise StopIteration + return num * 2 + + result = list(islice(mi.iterate(func, start=1), 10)) + expected = [1, 2, 4, 8, 16, 32, 64, 128] + self.assertEqual(result, expected) + + +class TakewhileInclusiveTests(TestCase): + def test_basic(self) -> None: + result = list(mi.takewhile_inclusive(lambda x: x < 5, [1, 4, 6, 4, 1])) + expected = [1, 4, 6] + self.assertEqual(result, expected) + + def test_empty_iterator(self) -> None: + result = list(mi.takewhile_inclusive(lambda x: True, [])) + expected = [] + self.assertEqual(result, expected) + + def test_collatz_sequence(self) -> None: + is_even = lambda n: n % 2 == 0 + start = 11 + result = list( + mi.takewhile_inclusive( + lambda n: n != 1, + mi.iterate( + lambda n: n // 2 if is_even(n) else 3 * n + 1, start + ), + ) + ) + expected = [11, 34, 17, 52, 26, 13, 40, 20, 10, 5, 16, 8, 4, 2, 1] + self.assertEqual(result, expected) + + +class OuterProductTests(TestCase): + def test_basic(self) -> None: + greetings = ['Hello', 'Goodbye'] + names = ['Alice', 'Bob', 'Carol'] + greet = lambda greeting, name: f'{greeting}, {name}!' + result = list(mi.outer_product(greet, greetings, names)) + expected = [ + ('Hello, Alice!', 'Hello, Bob!', 'Hello, Carol!'), + ('Goodbye, Alice!', 'Goodbye, Bob!', 'Goodbye, Carol!'), + ] + self.assertEqual(result, expected) + + +class IterSuppressTests(TestCase): + class Producer: + def __init__(self, exc, die_early=False): + self.exc = exc + self.pos = 0 + self.die_early = die_early + + def __iter__(self): + if self.die_early: + raise self.exc + + return self + + def __next__(self): + ret = self.pos + if self.pos >= 5: + raise self.exc + self.pos += 1 + return ret + + def test_no_error(self): + iterator = range(5) + actual = list(mi.iter_suppress(iterator, RuntimeError)) + expected = [0, 1, 2, 3, 4] + self.assertEqual(actual, expected) + + def test_raises_error(self): + iterator = self.Producer(ValueError) + with self.assertRaises(ValueError): + list(mi.iter_suppress(iterator, RuntimeError)) + + def test_suppression(self): + iterator = self.Producer(ValueError) + actual = list(mi.iter_suppress(iterator, RuntimeError, ValueError)) + expected = [0, 1, 2, 3, 4] + self.assertEqual(actual, expected) + + def test_early_suppression(self): + iterator = self.Producer(ValueError, die_early=True) + actual = list(mi.iter_suppress(iterator, RuntimeError, ValueError)) + expected = [] + self.assertEqual(actual, expected) + + +class FilterMapTests(TestCase): + def test_no_iterables(self): + actual = list(mi.filter_map(lambda _: None, [])) + expected = [] + self.assertEqual(actual, expected) + + def test_filter(self): + actual = list(mi.filter_map(lambda _: None, [1, 2, 3])) + expected = [] + self.assertEqual(actual, expected) + + def test_map(self): + actual = list(mi.filter_map(lambda x: x + 1, [1, 2, 3])) + expected = [2, 3, 4] + self.assertEqual(actual, expected) + + def test_filter_map(self): + actual = list( + mi.filter_map( + lambda x: int(x) if x.isnumeric() else None, + ['1', 'a', '2', 'b', '3'], + ) + ) + expected = [1, 2, 3] + self.assertEqual(actual, expected) + + +class PowersetOfSetsTests(TestCase): + def test_simple(self): + iterable = [0, 1, 2] + actual = list(mi.powerset_of_sets(iterable)) + expected = [set(), {0}, {1}, {2}, {0, 1}, {0, 2}, {1, 2}, {0, 1, 2}] + self.assertEqual(actual, expected) + + def test_hash_count(self): + hash_count = 0 + + class Str(str): + def __hash__(true_self): + nonlocal hash_count + hash_count += 1 + return super.__hash__(true_self) + + iterable = map(Str, 'ABBBCDD') + self.assertEqual(len(list(mi.powerset_of_sets(iterable))), 128) + self.assertLessEqual(hash_count, 14) + + +class JoinMappingTests(TestCase): + def test_basic(self): + salary_map = {'e1': 12, 'e2': 23, 'e3': 34} + dept_map = {'e1': 'eng', 'e2': 'sales', 'e3': 'eng'} + service_map = {'e1': 5, 'e2': 9, 'e3': 2} + field_to_map = { + 'salary': salary_map, + 'dept': dept_map, + 'service': service_map, + } + expected = { + 'e1': {'salary': 12, 'dept': 'eng', 'service': 5}, + 'e2': {'salary': 23, 'dept': 'sales', 'service': 9}, + 'e3': {'salary': 34, 'dept': 'eng', 'service': 2}, + } + self.assertEqual(dict(mi.join_mappings(**field_to_map)), expected) + + def test_empty(self): + self.assertEqual(dict(mi.join_mappings()), {}) + + +class DiscreteFourierTransformTests(TestCase): + def test_basic(self): + # Example calculation from: + # https://en.wikipedia.org/wiki/Discrete_Fourier_transform#Example + xarr = [1, 2 - 1j, -1j, -1 + 2j] + Xarr = [2, -2 - 2j, -2j, 4 + 4j] + self.assertTrue(all(map(cmath.isclose, mi.dft(xarr), Xarr))) + self.assertTrue(all(map(cmath.isclose, mi.idft(Xarr), xarr))) + + def test_roundtrip(self): + for _ in range(1_000): + N = randrange(35) + xarr = [complex(random(), random()) for i in range(N)] + Xarr = list(mi.dft(xarr)) + assert all(map(cmath.isclose, mi.idft(Xarr), xarr)) + + +class DoubleStarMapTests(TestCase): + def test_construction(self): + iterable = [{'price': 1.23}, {'price': 42}, {'price': 0.1}] + actual = list(mi.doublestarmap('{price:.2f}'.format, iterable)) + expected = ['1.23', '42.00', '0.10'] + self.assertEqual(actual, expected) + + def test_identity(self): + iterable = [{'x': 1}, {'x': 2}, {'x': 3}] + actual = list(mi.doublestarmap(lambda x: x, iterable)) + expected = [1, 2, 3] + self.assertEqual(actual, expected) + + def test_adding(self): + iterable = [{'a': 1, 'b': 2}, {'a': 3, 'b': 4}] + actual = list(mi.doublestarmap(lambda a, b: a + b, iterable)) + expected = [3, 7] + self.assertEqual(actual, expected) + + def test_mismatch_function_smaller(self): + iterable = [{'a': 1, 'b': 2}, {'a': 3, 'b': 4}] + with self.assertRaises(TypeError): + list(mi.doublestarmap(lambda a: a, iterable)) + + def test_mismatch_function_different(self): + iterable = [{'a': 1}, {'a': 2}] + with self.assertRaises(TypeError): + list(mi.doublestarmap(lambda x: x, iterable)) + + def test_mismatch_function_larger(self): + iterable = [{'a': 1}, {'a': 2}] + with self.assertRaises(TypeError): + list(mi.doublestarmap(lambda a, b: a + b, iterable)) + + def test_no_mapping(self): + iterable = [1, 2, 3, 4] + with self.assertRaises(TypeError): + list(mi.doublestarmap(lambda x: x, iterable)) + + def test_empty(self): + actual = list(mi.doublestarmap(lambda x: x, [])) + expected = [] + self.assertEqual(actual, expected) + + +class ArgMinArgMaxTests(TestCase): + def test_basic(self): + for i, iterable, expected_min, expected_max in ( + (1, [10, 2, 20, 5, 17, 4], 1, 2), + (2, [10, -2, -20, 5, 17, 4], 2, 4), + (3, [10, 10, 20, 10], 0, 2), + (4, [30, 30, 20, 30], 2, 0), + ): + with self.subTest(i=i): + self.assertEqual(mi.argmin(iterable), expected_min) + self.assertEqual(mi.argmax(iterable), expected_max) + + def test_key(self): + for i, iterable, key, expected_min, expected_max in ( + (1, [10, -2, -20, 5, 17, 4], abs, 1, 2), + ( + 2, + [[0] * 10, [0] * 5, [0] * 3, [0] * 12, [0] * 2, [0] * 3], + len, + 4, + 3, + ), + ): + with self.subTest(i=i): + self.assertEqual(mi.argmin(iterable, key=key), expected_min) + self.assertEqual(mi.argmax(iterable, key=key), expected_max) + + +class ExtractTests(TestCase): + def test_basics(self): + extract = mi.extract + data = 'abcdefghijklmnopqrstuvwxyz' + + # Test iterator inputs, increasing and decreasing indices, and repeats. + self.assertEqual( + list(extract(iter(data), iter([7, 4, 11, 11, 14]))), + ['h', 'e', 'l', 'l', 'o'], + ) + + # Empty indices + self.assertEqual(list(extract(iter(data), iter([]))), []) + + # Result is an iterator + iterator = extract('abc', [0, 1, 2]) + self.assertTrue(hasattr(iterator, '__next__')) + + # Error cases + + with self.assertRaises(TypeError): + list(extract(None, [])) # Non-iterable data source + with self.assertRaises(TypeError): + list(extract(data, None)) # Non-iterable indices + with self.assertRaises(ValueError): + list(extract(data, [0.0, 1.0, 2.0])) # Non-integer indices + with self.assertRaises(ValueError): + list(extract(data, [1, 2, -3])) # Negative indices + with self.assertRaises(IndexError): + list(extract(data, [1, 2, len(data)])) # Indices out of range + + def test_negative_one_bug(self): + # When the lowest index was exactly -1, it matched the initial + # iterator_position of -1 giving a zero advance step. + extract = mi.extract + + with self.assertRaises(ValueError): + list(extract('abcdefg', [1, 2, -1])) + + def test_none_value_bug(self): + # The buffer used to be a list with unused slots marked with None. + # The mark got conflated with None values in the data stream. + extract = mi.extract + data = ['a', 'b', 'None', 'c', 'd'] + self.assertEqual(list(extract(data, range(5))), data) + + def test_all_orderings(self): + # Thorough test for all cases of five indices to detect + # obscure corner case bugs. + extract = mi.extract + + data = 'abcdefg' + for indices in product(range(6), repeat=5): + with self.subTest(indices=indices): + actual = tuple(extract(data, indices)) + expected = itemgetter(*indices)(data) + self.assertEqual(actual, expected) + + def test_early_free(self): + # No references are held for skipped values or for previously + # emitted values regardless of how long they were in the buffer. + + extract = mi.extract + + class TrackDels(str): + def __del__(self): + dead.add(str(self)) + + dead = set() + iterator = extract(map(TrackDels, 'ABCDEF'), [3, 2, 4, 5]) + + value = next(iterator) + gc.collect() # Force collection on PyPy. + self.assertEqual(value, 'D') # Returns D. Buffered C is alive. + self.assertEqual(dead, {'A', 'B'}) # A and B are dead. + + value = next(iterator) + gc.collect() # Force collection on PyPy + self.assertEqual(value, 'C') # Returns C. + + value = next(iterator) + gc.collect() # Force collection on PyPy + self.assertEqual(value, 'E') # Returns E. + self.assertEqual(dead, {'A', 'B', 'D', 'C'}) # D and C are now dead. + + def test_lazy_consumption(self): + extract = mi.extract + + input_stream = mi.peekable(iter('ABCDEFGHIJKLM')) + iterator = extract(input_stream, [4, 2, 10]) + + self.assertEqual(next(iterator), 'E') # C is still buffered + self.assertEqual(input_stream.peek(), 'F') + + self.assertEqual(next(iterator), 'C') + self.assertEqual(input_stream.peek(), 'F') + + # Infinite input + self.assertEqual( + list(extract(count(), [5, 7, 3, 9, 4])), [5, 7, 3, 9, 4] + ) diff --git a/miniconda3/pkgs/more-itertools-10.8.0-py313h06a4308_0/info/test/tests/test_recipes.py b/miniconda3/pkgs/more-itertools-10.8.0-py313h06a4308_0/info/test/tests/test_recipes.py new file mode 100644 index 0000000000000000000000000000000000000000..2ee5db6f855e1c3a41eea2be9094e3a6a82c4a73 --- /dev/null +++ b/miniconda3/pkgs/more-itertools-10.8.0-py313h06a4308_0/info/test/tests/test_recipes.py @@ -0,0 +1,1572 @@ +from collections import Counter +from decimal import Decimal +from doctest import DocTestSuite +from fractions import Fraction +from functools import reduce +from itertools import combinations, count, groupby, permutations, islice +from operator import mul +from math import comb, prod, factorial +from statistics import mean +from sys import version_info +from unittest import TestCase, skipIf +from unittest.mock import patch + +import more_itertools as mi +import statistics +import random + + +def load_tests(loader, tests, ignore): + # Add the doctests + tests.addTests(DocTestSuite('more_itertools.recipes')) + return tests + + +class TakeTests(TestCase): + """Tests for ``take()``""" + + def test_simple_take(self): + """Test basic usage""" + t = mi.take(5, range(10)) + self.assertEqual(t, [0, 1, 2, 3, 4]) + + def test_null_take(self): + """Check the null case""" + t = mi.take(0, range(10)) + self.assertEqual(t, []) + + def test_negative_take(self): + """Make sure taking negative items results in a ValueError""" + self.assertRaises(ValueError, lambda: mi.take(-3, range(10))) + + def test_take_too_much(self): + """Taking more than an iterator has remaining should return what the + iterator has remaining. + + """ + t = mi.take(10, range(5)) + self.assertEqual(t, [0, 1, 2, 3, 4]) + + +class TabulateTests(TestCase): + """Tests for ``tabulate()``""" + + def test_simple_tabulate(self): + """Test the happy path""" + t = mi.tabulate(lambda x: x) + f = tuple([next(t) for _ in range(3)]) + self.assertEqual(f, (0, 1, 2)) + + def test_count(self): + """Ensure tabulate accepts specific count""" + t = mi.tabulate(lambda x: 2 * x, -1) + f = (next(t), next(t), next(t)) + self.assertEqual(f, (-2, 0, 2)) + + +class TailTests(TestCase): + """Tests for ``tail()``""" + + def test_iterator_greater(self): + """Length of iterator is greater than requested tail""" + self.assertEqual(list(mi.tail(3, iter('ABCDEFG'))), list('EFG')) + + def test_iterator_equal(self): + """Length of iterator is equal to the requested tail""" + self.assertEqual(list(mi.tail(7, iter('ABCDEFG'))), list('ABCDEFG')) + + def test_iterator_less(self): + """Length of iterator is less than requested tail""" + self.assertEqual(list(mi.tail(8, iter('ABCDEFG'))), list('ABCDEFG')) + + def test_sized_greater(self): + """Length of sized iterable is greater than requested tail""" + self.assertEqual(list(mi.tail(3, 'ABCDEFG')), list('EFG')) + + def test_sized_equal(self): + """Length of sized iterable is less than requested tail""" + self.assertEqual(list(mi.tail(7, 'ABCDEFG')), list('ABCDEFG')) + + def test_sized_less(self): + """Length of sized iterable is less than requested tail""" + self.assertEqual(list(mi.tail(8, 'ABCDEFG')), list('ABCDEFG')) + + +class ConsumeTests(TestCase): + """Tests for ``consume()``""" + + def test_sanity(self): + """Test basic functionality""" + r = (x for x in range(10)) + mi.consume(r, 3) + self.assertEqual(3, next(r)) + + def test_null_consume(self): + """Check the null case""" + r = (x for x in range(10)) + mi.consume(r, 0) + self.assertEqual(0, next(r)) + + def test_negative_consume(self): + """Check that negative consumption throws an error""" + r = (x for x in range(10)) + self.assertRaises(ValueError, lambda: mi.consume(r, -1)) + + def test_total_consume(self): + """Check that iterator is totally consumed by default""" + r = (x for x in range(10)) + mi.consume(r) + self.assertRaises(StopIteration, lambda: next(r)) + + +class NthTests(TestCase): + """Tests for ``nth()``""" + + def test_basic(self): + """Make sure the nth item is returned""" + l = range(10) + for i, v in enumerate(l): + self.assertEqual(mi.nth(l, i), v) + + def test_default(self): + """Ensure a default value is returned when nth item not found""" + l = range(3) + self.assertEqual(mi.nth(l, 100, "zebra"), "zebra") + + def test_negative_item_raises(self): + """Ensure asking for a negative item raises an exception""" + self.assertRaises(ValueError, lambda: mi.nth(range(10), -3)) + + +class AllEqualTests(TestCase): + def test_true(self): + self.assertTrue(mi.all_equal('aaaaaa')) + self.assertTrue(mi.all_equal([0, 0, 0, 0])) + + def test_false(self): + self.assertFalse(mi.all_equal('aaaaab')) + self.assertFalse(mi.all_equal([0, 0, 0, 1])) + + def test_tricky(self): + items = [1, complex(1, 0), 1.0] + self.assertTrue(mi.all_equal(items)) + + def test_empty(self): + self.assertTrue(mi.all_equal('')) + self.assertTrue(mi.all_equal([])) + + def test_one(self): + self.assertTrue(mi.all_equal('0')) + self.assertTrue(mi.all_equal([0])) + + def test_key(self): + self.assertTrue(mi.all_equal('4٤໔4৪', key=int)) + self.assertFalse(mi.all_equal('Abc', key=str.casefold)) + + @patch('more_itertools.recipes.groupby', autospec=True) + def test_groupby_calls(self, mock_groupby): + next_count = 0 + + class _groupby(groupby): + def __next__(true_self): + nonlocal next_count + next_count += 1 + return super().__next__() + + mock_groupby.side_effect = _groupby + iterable = iter('aaaaa') + self.assertTrue(mi.all_equal(iterable)) + self.assertEqual(list(iterable), []) + self.assertEqual(next_count, 2) + + +class QuantifyTests(TestCase): + """Tests for ``quantify()``""" + + def test_happy_path(self): + """Make sure True count is returned""" + q = [True, False, True] + self.assertEqual(mi.quantify(q), 2) + + def test_custom_predicate(self): + """Ensure non-default predicates return as expected""" + q = range(10) + self.assertEqual(mi.quantify(q, lambda x: x % 2 == 0), 5) + + +class PadnoneTests(TestCase): + def test_basic(self): + iterable = range(2) + for func in (mi.pad_none, mi.padnone): + with self.subTest(func=func): + p = func(iterable) + self.assertEqual( + [0, 1, None, None], [next(p) for _ in range(4)] + ) + + +class NcyclesTests(TestCase): + """Tests for ``nyclces()``""" + + def test_happy_path(self): + """cycle a sequence three times""" + r = ["a", "b", "c"] + n = mi.ncycles(r, 3) + self.assertEqual( + ["a", "b", "c", "a", "b", "c", "a", "b", "c"], list(n) + ) + + def test_null_case(self): + """asking for 0 cycles should return an empty iterator""" + n = mi.ncycles(range(100), 0) + self.assertRaises(StopIteration, lambda: next(n)) + + def test_pathological_case(self): + """asking for negative cycles should return an empty iterator""" + n = mi.ncycles(range(100), -10) + self.assertRaises(StopIteration, lambda: next(n)) + + +class DotproductTests(TestCase): + """Tests for ``dotproduct()``'""" + + def test_happy_path(self): + """simple dotproduct example""" + self.assertEqual(400, mi.dotproduct([10, 10], [20, 20])) + + +class FlattenTests(TestCase): + """Tests for ``flatten()``""" + + def test_basic_usage(self): + """ensure list of lists is flattened one level""" + f = [[0, 1, 2], [3, 4, 5]] + self.assertEqual(list(range(6)), list(mi.flatten(f))) + + def test_single_level(self): + """ensure list of lists is flattened only one level""" + f = [[0, [1, 2]], [[3, 4], 5]] + self.assertEqual([0, [1, 2], [3, 4], 5], list(mi.flatten(f))) + + +class RepeatfuncTests(TestCase): + """Tests for ``repeatfunc()``""" + + def test_simple_repeat(self): + """test simple repeated functions""" + r = mi.repeatfunc(lambda: 5) + self.assertEqual([5, 5, 5, 5, 5], [next(r) for _ in range(5)]) + + def test_finite_repeat(self): + """ensure limited repeat when times is provided""" + r = mi.repeatfunc(lambda: 5, times=5) + self.assertEqual([5, 5, 5, 5, 5], list(r)) + + def test_added_arguments(self): + """ensure arguments are applied to the function""" + r = mi.repeatfunc(lambda x: x, 2, 3) + self.assertEqual([3, 3], list(r)) + + def test_null_times(self): + """repeat 0 should return an empty iterator""" + r = mi.repeatfunc(range, 0, 3) + self.assertRaises(StopIteration, lambda: next(r)) + + +class PairwiseTests(TestCase): + """Tests for ``pairwise()``""" + + def test_base_case(self): + """ensure an iterable will return pairwise""" + p = mi.pairwise([1, 2, 3]) + self.assertEqual([(1, 2), (2, 3)], list(p)) + + def test_short_case(self): + """ensure an empty iterator if there's not enough values to pair""" + p = mi.pairwise("a") + self.assertRaises(StopIteration, lambda: next(p)) + + def test_coverage(self): + from more_itertools import recipes + + p = recipes._pairwise([1, 2, 3]) + self.assertEqual([(1, 2), (2, 3)], list(p)) + + +class GrouperTests(TestCase): + def test_basic(self): + seq = 'ABCDEF' + for n, expected in [ + (3, [('A', 'B', 'C'), ('D', 'E', 'F')]), + (4, [('A', 'B', 'C', 'D'), ('E', 'F', None, None)]), + (5, [('A', 'B', 'C', 'D', 'E'), ('F', None, None, None, None)]), + (6, [('A', 'B', 'C', 'D', 'E', 'F')]), + (7, [('A', 'B', 'C', 'D', 'E', 'F', None)]), + ]: + with self.subTest(n=n): + actual = list(mi.grouper(iter(seq), n)) + self.assertEqual(actual, expected) + + def test_fill(self): + seq = 'ABCDEF' + fillvalue = 'x' + for n, expected in [ + (1, ['A', 'B', 'C', 'D', 'E', 'F']), + (2, ['AB', 'CD', 'EF']), + (3, ['ABC', 'DEF']), + (4, ['ABCD', 'EFxx']), + (5, ['ABCDE', 'Fxxxx']), + (6, ['ABCDEF']), + (7, ['ABCDEFx']), + ]: + with self.subTest(n=n): + it = mi.grouper( + iter(seq), n, incomplete='fill', fillvalue=fillvalue + ) + actual = [''.join(x) for x in it] + self.assertEqual(actual, expected) + + def test_ignore(self): + seq = 'ABCDEF' + for n, expected in [ + (1, ['A', 'B', 'C', 'D', 'E', 'F']), + (2, ['AB', 'CD', 'EF']), + (3, ['ABC', 'DEF']), + (4, ['ABCD']), + (5, ['ABCDE']), + (6, ['ABCDEF']), + (7, []), + ]: + with self.subTest(n=n): + it = mi.grouper(iter(seq), n, incomplete='ignore') + actual = [''.join(x) for x in it] + self.assertEqual(actual, expected) + + def test_strict(self): + seq = 'ABCDEF' + for n, expected in [ + (1, ['A', 'B', 'C', 'D', 'E', 'F']), + (2, ['AB', 'CD', 'EF']), + (3, ['ABC', 'DEF']), + (6, ['ABCDEF']), + ]: + with self.subTest(n=n): + it = mi.grouper(iter(seq), n, incomplete='strict') + actual = [''.join(x) for x in it] + self.assertEqual(actual, expected) + + def test_strict_fails(self): + seq = 'ABCDEF' + for n in [4, 5, 7]: + with self.subTest(n=n): + with self.assertRaises(ValueError): + list(mi.grouper(iter(seq), n, incomplete='strict')) + + def test_invalid_incomplete(self): + with self.assertRaises(ValueError): + list(mi.grouper('ABCD', 3, incomplete='bogus')) + + +class RoundrobinTests(TestCase): + """Tests for ``roundrobin()``""" + + def test_even_groups(self): + """Ensure ordered output from evenly populated iterables""" + self.assertEqual( + list(mi.roundrobin('ABC', [1, 2, 3], range(3))), + ['A', 1, 0, 'B', 2, 1, 'C', 3, 2], + ) + + def test_uneven_groups(self): + """Ensure ordered output from unevenly populated iterables""" + self.assertEqual( + list(mi.roundrobin('ABCD', [1, 2], range(0))), + ['A', 1, 'B', 2, 'C', 'D'], + ) + + +class PartitionTests(TestCase): + """Tests for ``partition()``""" + + def test_bool(self): + lesser, greater = mi.partition(lambda x: x > 5, range(10)) + self.assertEqual(list(lesser), [0, 1, 2, 3, 4, 5]) + self.assertEqual(list(greater), [6, 7, 8, 9]) + + def test_arbitrary(self): + divisibles, remainders = mi.partition(lambda x: x % 3, range(10)) + self.assertEqual(list(divisibles), [0, 3, 6, 9]) + self.assertEqual(list(remainders), [1, 2, 4, 5, 7, 8]) + + def test_pred_is_none(self): + falses, trues = mi.partition(None, range(3)) + self.assertEqual(list(falses), [0]) + self.assertEqual(list(trues), [1, 2]) + + +class PowersetTests(TestCase): + """Tests for ``powerset()``""" + + def test_combinatorics(self): + """Ensure a proper enumeration""" + p = mi.powerset([1, 2, 3]) + self.assertEqual( + list(p), [(), (1,), (2,), (3,), (1, 2), (1, 3), (2, 3), (1, 2, 3)] + ) + + +class UniqueEverseenTests(TestCase): + def test_everseen(self): + u = mi.unique_everseen('AAAABBBBCCDAABBB') + self.assertEqual(['A', 'B', 'C', 'D'], list(u)) + + def test_custom_key(self): + u = mi.unique_everseen('aAbACCc', key=str.lower) + self.assertEqual(list('abC'), list(u)) + + def test_unhashable(self): + iterable = ['a', [1, 2, 3], [1, 2, 3], 'a'] + u = mi.unique_everseen(iterable) + self.assertEqual(list(u), ['a', [1, 2, 3]]) + + def test_unhashable_key(self): + iterable = ['a', [1, 2, 3], [1, 2, 3], 'a'] + u = mi.unique_everseen(iterable, key=lambda x: x) + self.assertEqual(list(u), ['a', [1, 2, 3]]) + + +class UniqueJustseenTests(TestCase): + def test_justseen(self): + u = mi.unique_justseen('AAAABBBCCDABB') + self.assertEqual(list('ABCDAB'), list(u)) + + def test_custom_key(self): + u = mi.unique_justseen('AABCcAD', str.lower) + self.assertEqual(list('ABCAD'), list(u)) + + +class UniqueTests(TestCase): + def test_basic(self): + iterable = [0, 1, 1, 8, 9, 9, 9, 8, 8, 1, 9, 9] + actual = list(mi.unique(iterable)) + expected = [0, 1, 8, 9] + self.assertEqual(actual, expected) + + def test_key(self): + iterable = ['1', '1', '10', '10', '2', '2', '20', '20'] + actual = list(mi.unique(iterable, key=int)) + expected = ['1', '2', '10', '20'] + self.assertEqual(actual, expected) + + def test_reverse(self): + iterable = ['1', '1', '10', '10', '2', '2', '20', '20'] + actual = list(mi.unique(iterable, key=int, reverse=True)) + expected = ['20', '10', '2', '1'] + self.assertEqual(actual, expected) + + +class IterExceptTests(TestCase): + """Tests for ``iter_except()``""" + + def test_exact_exception(self): + """ensure the exact specified exception is caught""" + l = [1, 2, 3] + i = mi.iter_except(l.pop, IndexError) + self.assertEqual(list(i), [3, 2, 1]) + + def test_generic_exception(self): + """ensure the generic exception can be caught""" + l = [1, 2] + i = mi.iter_except(l.pop, Exception) + self.assertEqual(list(i), [2, 1]) + + def test_uncaught_exception_is_raised(self): + """ensure a non-specified exception is raised""" + l = [1, 2, 3] + i = mi.iter_except(l.pop, KeyError) + self.assertRaises(IndexError, lambda: list(i)) + + def test_first(self): + """ensure first is run before the function""" + l = [1, 2, 3] + f = lambda: 25 + i = mi.iter_except(l.pop, IndexError, f) + self.assertEqual(list(i), [25, 3, 2, 1]) + + def test_multiple(self): + """ensure can catch multiple exceptions""" + + class Fiz(Exception): + pass + + class Buzz(Exception): + pass + + i = 0 + + def fizbuzz(): + nonlocal i + i += 1 + if i % 3 == 0: + raise Fiz + if i % 5 == 0: + raise Buzz + return i + + expected = ([1, 2], [4], [], [7, 8], []) + for x in expected: + self.assertEqual(list(mi.iter_except(fizbuzz, (Fiz, Buzz))), x) + + +class FirstTrueTests(TestCase): + """Tests for ``first_true()``""" + + def test_something_true(self): + """Test with no keywords""" + self.assertEqual(mi.first_true(range(10)), 1) + + def test_nothing_true(self): + """Test default return value.""" + self.assertIsNone(mi.first_true([0, 0, 0])) + + def test_default(self): + """Test with a default keyword""" + self.assertEqual(mi.first_true([0, 0, 0], default='!'), '!') + + def test_pred(self): + """Test with a custom predicate""" + self.assertEqual( + mi.first_true([2, 4, 6], pred=lambda x: x % 3 == 0), 6 + ) + + +class RandomProductTests(TestCase): + """Tests for ``random_product()`` + + Since random.choice() has different results with the same seed across + python versions 2.x and 3.x, these tests use highly probably events to + create predictable outcomes across platforms. + """ + + def test_simple_lists(self): + """Ensure that one item is chosen from each list in each pair. + Also ensure that each item from each list eventually appears in + the chosen combinations. + + Odds are roughly 1 in 7.1 * 10e16 that one item from either list will + not be chosen after 100 samplings of one item from each list. Just to + be safe, better use a known random seed, too. + + """ + nums = [1, 2, 3] + lets = ['a', 'b', 'c'] + n, m = zip(*[mi.random_product(nums, lets) for _ in range(100)]) + n, m = set(n), set(m) + self.assertEqual(n, set(nums)) + self.assertEqual(m, set(lets)) + self.assertEqual(len(n), len(nums)) + self.assertEqual(len(m), len(lets)) + + def test_list_with_repeat(self): + """ensure multiple items are chosen, and that they appear to be chosen + from one list then the next, in proper order. + + """ + nums = [1, 2, 3] + lets = ['a', 'b', 'c'] + r = list(mi.random_product(nums, lets, repeat=100)) + self.assertEqual(2 * 100, len(r)) + n, m = set(r[::2]), set(r[1::2]) + self.assertEqual(n, set(nums)) + self.assertEqual(m, set(lets)) + self.assertEqual(len(n), len(nums)) + self.assertEqual(len(m), len(lets)) + + +class RandomPermutationTests(TestCase): + """Tests for ``random_permutation()``""" + + def test_full_permutation(self): + """ensure every item from the iterable is returned in a new ordering + + 15 elements have a 1 in 1.3 * 10e12 of appearing in sorted order, so + we fix a seed value just to be sure. + + """ + i = range(15) + r = mi.random_permutation(i) + self.assertEqual(set(i), set(r)) + if i == r: + raise AssertionError("Values were not permuted") + + def test_partial_permutation(self): + """ensure all returned items are from the iterable, that the returned + permutation is of the desired length, and that all items eventually + get returned. + + Sampling 100 permutations of length 5 from a set of 15 leaves a + (2/3)^100 chance that an item will not be chosen. Multiplied by 15 + items, there is a 1 in 2.6e16 chance that at least 1 item will not + show up in the resulting output. Using a random seed will fix that. + + """ + items = range(15) + item_set = set(items) + all_items = set() + for _ in range(100): + permutation = mi.random_permutation(items, 5) + self.assertEqual(len(permutation), 5) + permutation_set = set(permutation) + self.assertLessEqual(permutation_set, item_set) + all_items |= permutation_set + self.assertEqual(all_items, item_set) + + +class RandomCombinationTests(TestCase): + """Tests for ``random_combination()``""" + + def test_pseudorandomness(self): + """ensure different subsets of the iterable get returned over many + samplings of random combinations""" + items = range(15) + all_items = set() + for _ in range(50): + combination = mi.random_combination(items, 5) + all_items |= set(combination) + self.assertEqual(all_items, set(items)) + + def test_no_replacement(self): + """ensure that elements are sampled without replacement""" + items = range(15) + for _ in range(50): + combination = mi.random_combination(items, len(items)) + self.assertEqual(len(combination), len(set(combination))) + self.assertRaises( + ValueError, lambda: mi.random_combination(items, len(items) + 1) + ) + + +class RandomCombinationWithReplacementTests(TestCase): + """Tests for ``random_combination_with_replacement()``""" + + def test_replacement(self): + """ensure that elements are sampled with replacement""" + items = range(5) + combo = mi.random_combination_with_replacement(items, len(items) * 2) + self.assertEqual(2 * len(items), len(combo)) + if len(set(combo)) == len(combo): + raise AssertionError("Combination contained no duplicates") + + def test_pseudorandomness(self): + """ensure different subsets of the iterable get returned over many + samplings of random combinations""" + items = range(15) + all_items = set() + for _ in range(50): + combination = mi.random_combination_with_replacement(items, 5) + all_items |= set(combination) + self.assertEqual(all_items, set(items)) + + +class NthCombinationTests(TestCase): + def test_basic(self): + iterable = 'abcdefg' + r = 4 + for index, expected in enumerate(combinations(iterable, r)): + actual = mi.nth_combination(iterable, r, index) + self.assertEqual(actual, expected) + + def test_long(self): + actual = mi.nth_combination(range(180), 4, 2000000) + expected = (2, 12, 35, 126) + self.assertEqual(actual, expected) + + def test_invalid_r(self): + for r in (-1, 3): + with self.assertRaises(ValueError): + mi.nth_combination([], r, 0) + + def test_invalid_index(self): + with self.assertRaises(IndexError): + mi.nth_combination('abcdefg', 3, -36) + + +class NthPermutationTests(TestCase): + def test_r_less_than_n(self): + iterable = 'abcde' + r = 4 + for index, expected in enumerate(permutations(iterable, r)): + actual = mi.nth_permutation(iterable, r, index) + self.assertEqual(actual, expected) + + def test_r_equal_to_n(self): + iterable = 'abcde' + for index, expected in enumerate(permutations(iterable)): + actual = mi.nth_permutation(iterable, None, index) + self.assertEqual(actual, expected) + + def test_long(self): + iterable = tuple(range(180)) + r = 4 + index = 1000000 + actual = mi.nth_permutation(iterable, r, index) + expected = mi.nth(permutations(iterable, r), index) + self.assertEqual(actual, expected) + + def test_null(self): + actual = mi.nth_permutation([], 0, 0) + expected = tuple() + self.assertEqual(actual, expected) + + def test_negative_index(self): + iterable = 'abcde' + r = 4 + n = factorial(len(iterable)) // factorial(len(iterable) - r) + for index, expected in enumerate(permutations(iterable, r)): + actual = mi.nth_permutation(iterable, r, index - n) + self.assertEqual(actual, expected) + + def test_invalid_index(self): + iterable = 'abcde' + r = 4 + n = factorial(len(iterable)) // factorial(len(iterable) - r) + for index in [-1 - n, n + 1]: + with self.assertRaises(IndexError): + mi.nth_permutation(iterable, r, index) + + def test_invalid_r(self): + iterable = 'abcde' + r = 4 + n = factorial(len(iterable)) // factorial(len(iterable) - r) + for r in [-1, n + 1]: + with self.assertRaises(ValueError): + mi.nth_permutation(iterable, r, 0) + + +class PrependTests(TestCase): + def test_basic(self): + value = 'a' + iterator = iter('bcdefg') + actual = list(mi.prepend(value, iterator)) + expected = list('abcdefg') + self.assertEqual(actual, expected) + + def test_multiple(self): + value = 'ab' + iterator = iter('cdefg') + actual = tuple(mi.prepend(value, iterator)) + expected = ('ab',) + tuple('cdefg') + self.assertEqual(actual, expected) + + +class Convolvetests(TestCase): + def test_moving_average(self): + signal = iter([10, 20, 30, 40, 50]) + kernel = [0.5, 0.5] + actual = list(mi.convolve(signal, kernel)) + expected = [ + (10 + 0) / 2, + (20 + 10) / 2, + (30 + 20) / 2, + (40 + 30) / 2, + (50 + 40) / 2, + (0 + 50) / 2, + ] + self.assertEqual(actual, expected) + + def test_derivative(self): + signal = iter([10, 20, 30, 40, 50]) + kernel = [1, -1] + actual = list(mi.convolve(signal, kernel)) + expected = [10 - 0, 20 - 10, 30 - 20, 40 - 30, 50 - 40, 0 - 50] + self.assertEqual(actual, expected) + + def test_infinite_signal(self): + signal = count() + kernel = [1, -1] + actual = mi.take(5, mi.convolve(signal, kernel)) + expected = [0, 1, 1, 1, 1] + self.assertEqual(actual, expected) + + +class BeforeAndAfterTests(TestCase): + def test_empty(self): + before, after = mi.before_and_after(bool, []) + self.assertEqual(list(before), []) + self.assertEqual(list(after), []) + + def test_never_true(self): + before, after = mi.before_and_after(bool, [0, False, None, '']) + self.assertEqual(list(before), []) + self.assertEqual(list(after), [0, False, None, '']) + + def test_never_false(self): + before, after = mi.before_and_after(bool, [1, True, Ellipsis, ' ']) + self.assertEqual(list(before), [1, True, Ellipsis, ' ']) + self.assertEqual(list(after), []) + + def test_some_true(self): + before, after = mi.before_and_after(bool, [1, True, 0, False]) + self.assertEqual(list(before), [1, True]) + self.assertEqual(list(after), [0, False]) + + @staticmethod + def _group_events(events): + events = iter(events) + + while True: + try: + operation = next(events) + except StopIteration: + break + assert operation in ["SUM", "MULTIPLY"] + + # Here, the remainder `events` is passed into `before_and_after` + # again, which would be problematic if the remainder is a + # generator function (as in Python 3.10 itertools recipes), since + # that creates recursion. `itertools.chain` solves this problem. + numbers, events = mi.before_and_after( + lambda e: isinstance(e, int), events + ) + + yield (operation, numbers) + + def test_nested_remainder(self): + events = ["SUM", 1, 2, 3, 4, 5, 6, 7, 8, 9, 10] * 1000 + events += ["MULTIPLY", 1, 2, 3, 4, 5, 6, 7, 8, 9, 10] * 1000 + + for operation, numbers in self._group_events(events): + if operation == "SUM": + res = sum(numbers) + self.assertEqual(res, 55) + elif operation == "MULTIPLY": + res = reduce(lambda a, b: a * b, numbers) + self.assertEqual(res, 3628800) + + +class TriplewiseTests(TestCase): + def test_basic(self): + for iterable, expected in [ + ([0], []), + ([0, 1], []), + ([0, 1, 2], [(0, 1, 2)]), + ([0, 1, 2, 3], [(0, 1, 2), (1, 2, 3)]), + ([0, 1, 2, 3, 4], [(0, 1, 2), (1, 2, 3), (2, 3, 4)]), + ]: + with self.subTest(expected=expected): + actual = list(mi.triplewise(iterable)) + self.assertEqual(actual, expected) + + +class SlidingWindowTests(TestCase): + def test_islice_version(self): + for iterable, n, expected in [ + ([], 1, []), + ([0], 1, [(0,)]), + ([0, 1], 1, [(0,), (1,)]), + ([0, 1, 2], 2, [(0, 1), (1, 2)]), + ([0, 1, 2], 3, [(0, 1, 2)]), + ([0, 1, 2], 4, []), + ([0, 1, 2, 3], 4, [(0, 1, 2, 3)]), + ([0, 1, 2, 3, 4], 4, [(0, 1, 2, 3), (1, 2, 3, 4)]), + ]: + with self.subTest(expected=expected): + actual = list(mi.sliding_window(iterable, n)) + self.assertEqual(actual, expected) + + def test_deque_version(self): + iterable = map(str, range(100)) + all_windows = list(mi.sliding_window(iterable, 95)) + self.assertEqual(all_windows[0], tuple(map(str, range(95)))) + self.assertEqual(all_windows[-1], tuple(map(str, range(5, 100)))) + + def test_zero(self): + iterable = map(str, range(100)) + with self.assertRaises(ValueError): + list(mi.sliding_window(iterable, 0)) + + +class SubslicesTests(TestCase): + def test_basic(self): + for iterable, expected in [ + ([], []), + ([1], [[1]]), + ([1, 2], [[1], [1, 2], [2]]), + (iter([1, 2]), [[1], [1, 2], [2]]), + ([2, 1], [[2], [2, 1], [1]]), + ( + 'ABCD', + [ + ['A'], + ['A', 'B'], + ['A', 'B', 'C'], + ['A', 'B', 'C', 'D'], + ['B'], + ['B', 'C'], + ['B', 'C', 'D'], + ['C'], + ['C', 'D'], + ['D'], + ], + ), + ]: + with self.subTest(expected=expected): + actual = list(mi.subslices(iterable)) + self.assertEqual(actual, expected) + + +class PolynomialFromRootsTests(TestCase): + def test_basic(self): + for roots, expected in [ + ((2, 1, -1), [1, -2, -1, 2]), + ((2, 3), [1, -5, 6]), + ((1, 2, 3), [1, -6, 11, -6]), + ((2, 4, 1), [1, -7, 14, -8]), + ]: + with self.subTest(roots=roots): + actual = mi.polynomial_from_roots(roots) + self.assertEqual(actual, expected) + + def test_large(self): + n = 1_500 + actual = mi.polynomial_from_roots([-1] * n) + expected = [comb(n, k) for k in range(n + 1)] + self.assertEqual(actual, expected) + + +class PolynomialEvalTests(TestCase): + def test_basic(self): + for coefficients, x, expected in [ + ([1, -4, -17, 60], 2, 18), + ([1, -4, -17, 60], 2.5, 8.125), + ([1, -4, -17, 60], Fraction(2, 3), Fraction(1274, 27)), + ([1, -4, -17, 60], Decimal('1.75'), Decimal('23.359375')), + ([], 2, 0), + ([], 2.5, 0.0), + ([], Fraction(2, 3), Fraction(0, 1)), + ([], Decimal('1.75'), Decimal('0.00')), + ([11], 7, 11), + ([11, 2], 7, 79), + ]: + with self.subTest(x=x): + actual = mi.polynomial_eval(coefficients, x) + self.assertEqual(actual, expected) + self.assertEqual(type(actual), type(x)) + + +class IterIndexTests(TestCase): + def test_basic(self): + iterable = 'AABCADEAF' + for wrapper in (list, iter): + with self.subTest(wrapper=wrapper): + actual = list(mi.iter_index(wrapper(iterable), 'A')) + expected = [0, 1, 4, 7] + self.assertEqual(actual, expected) + + def test_start(self): + for wrapper in (list, iter): + with self.subTest(wrapper=wrapper): + iterable = 'AABCADEAF' + i = -1 + actual = [] + while True: + try: + i = next( + mi.iter_index(wrapper(iterable), 'A', start=i + 1) + ) + except StopIteration: + break + else: + actual.append(i) + + expected = [0, 1, 4, 7] + self.assertEqual(actual, expected) + + def test_stop(self): + actual = list(mi.iter_index('AABCADEAF', 'A', stop=7)) + expected = [0, 1, 4] + self.assertEqual(actual, expected) + + +class SieveTests(TestCase): + def test_basic(self): + self.assertEqual( + list(mi.sieve(67)), + [ + 2, + 3, + 5, + 7, + 11, + 13, + 17, + 19, + 23, + 29, + 31, + 37, + 41, + 43, + 47, + 53, + 59, + 61, + ], + ) + self.assertEqual(list(mi.sieve(68))[-1], 67) + + def test_prime_counts(self): + for n, expected in ( + (100, 25), + (1_000, 168), + (10_000, 1229), + (100_000, 9592), + (1_000_000, 78498), + ): + with self.subTest(n=n): + self.assertEqual(mi.ilen(mi.sieve(n)), expected) + + def test_small_numbers(self): + with self.assertRaises(ValueError): + list(mi.sieve(-1)) + + for n in (0, 1, 2): + with self.subTest(n=n): + self.assertEqual(list(mi.sieve(n)), []) + + +class BatchedTests(TestCase): + def test_basic(self): + iterable = range(1, 5 + 1) + for n, expected in ( + (1, [(1,), (2,), (3,), (4,), (5,)]), + (2, [(1, 2), (3, 4), (5,)]), + (3, [(1, 2, 3), (4, 5)]), + (4, [(1, 2, 3, 4), (5,)]), + (5, [(1, 2, 3, 4, 5)]), + (6, [(1, 2, 3, 4, 5)]), + ): + with self.subTest(n=n): + actual = list(mi.batched(iterable, n)) + self.assertEqual(actual, expected) + + def test_strict(self): + with self.assertRaises(ValueError): + list(mi.batched('ABCDEFG', 3, strict=True)) + + self.assertEqual( + list(mi.batched('ABCDEF', 3, strict=True)), + [('A', 'B', 'C'), ('D', 'E', 'F')], + ) + + +class TransposeTests(TestCase): + def test_empty(self): + it = [] + actual = list(mi.transpose(it)) + expected = [] + self.assertEqual(actual, expected) + + def test_basic(self): + it = [(10, 11, 12), (20, 21, 22), (30, 31, 32)] + actual = list(mi.transpose(it)) + expected = [(10, 20, 30), (11, 21, 31), (12, 22, 32)] + self.assertEqual(actual, expected) + + @skipIf(version_info[:2] < (3, 10), 'strict=True missing on 3.9') + def test_incompatible_error(self): + it = [(10, 11, 12, 13), (20, 21, 22), (30, 31, 32)] + with self.assertRaises(ValueError): + list(mi.transpose(it)) + + @skipIf(version_info[:2] >= (3, 9), 'strict=True missing on 3.9') + def test_incompatible_allow(self): + it = [(10, 11, 12, 13), (20, 21, 22), (30, 31, 32)] + actual = list(mi.transpose(it)) + expected = [(10, 20, 30), (11, 21, 31), (12, 22, 32)] + self.assertEqual(actual, expected) + + +class ReshapeTests(TestCase): + def test_empty(self): + actual = list(mi.reshape([], 3)) + self.assertEqual(actual, []) + + def test_zero(self): + matrix = [(0, 1, 2, 3), (4, 5, 6, 7), (8, 9, 10, 11)] + with self.assertRaises(ValueError): + list(mi.reshape(matrix, 0)) + + def test_basic(self): + matrix = [(0, 1, 2, 3), (4, 5, 6, 7), (8, 9, 10, 11)] + for cols, expected in ( + ( + 1, + [ + (0,), + (1,), + (2,), + (3,), + (4,), + (5,), + (6,), + (7,), + (8,), + (9,), + (10,), + (11,), + ], + ), + (2, [(0, 1), (2, 3), (4, 5), (6, 7), (8, 9), (10, 11)]), + (3, [(0, 1, 2), (3, 4, 5), (6, 7, 8), (9, 10, 11)]), + (4, [(0, 1, 2, 3), (4, 5, 6, 7), (8, 9, 10, 11)]), + (6, [(0, 1, 2, 3, 4, 5), (6, 7, 8, 9, 10, 11)]), + (12, [(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11)]), + ): + with self.subTest(cols=cols): + actual = list(mi.reshape(matrix, cols)) + self.assertEqual(actual, expected) + + def test_multidimensional(self): + reshape = mi.reshape + + def shape(tensor): + if not hasattr(tensor, '__iter__'): + return () + seq = list(tensor) + return (len(seq),) + shape(seq[0]) + + matrix = [(0, 1), (2, 3), (4, 5)] + self.assertEqual(shape(matrix), (3, 2)) + + for new_shape in [ + (2, 3), + (6,), + (6, 1), + (1, 6), + (2, 1, 3, 1), + (1, 1, 3, 1, 2), + ]: + with self.subTest(new_shape=new_shape): + new_matrix = reshape(matrix, new_shape) + self.assertEqual(shape(new_matrix), new_shape) + + # Truncation: Input larger than the requested shape + self.assertEqual(list(reshape(matrix, [3])), [0, 1, 2]) + + # Incomplete structure: Input smaller than the requested shape + self.assertEqual(list(reshape(matrix, [8])), [0, 1, 2, 3, 4, 5]) + + # Str and bytes treated as scalars + word_matrix = [[['ab', b'de', 'gh', b'jk']]] # Shape: 1 x 1 x 4 + self.assertEqual( + list(reshape(word_matrix, (2, 2))), + [('ab', b'de'), ('gh', b'jk')], + ) + + # Empty input + self.assertEqual(list(reshape([[]], shape=(1,))), []) + + # Non-uniform input: scalar where a tensor is expected + with self.assertRaises(TypeError): + list(mi.reshape([[10, 20, 30], 40], shape=(4,))) + + # Non-integer indices + with self.assertRaises((TypeError, ValueError)): + matrix = [(0, 1), (2, 3), (4, 5)] + list(reshape(matrix, ('a', 'b', 'c'))) + + # Indices smaller than one + with self.assertRaises(ValueError): + list(reshape(matrix, (6, 0, 1))) + + +class MatMulTests(TestCase): + def test_n_by_n(self): + actual = list(mi.matmul([(7, 5), (3, 5)], [[2, 5], [7, 9]])) + expected = [(49, 80), (41, 60)] + self.assertEqual(actual, expected) + + def test_m_by_n(self): + m1 = [[2, 5], [7, 9], [3, 4]] + m2 = [[7, 11, 5, 4, 9], [3, 5, 2, 6, 3]] + actual = list(mi.matmul(m1, m2)) + expected = [ + (29, 47, 20, 38, 33), + (76, 122, 53, 82, 90), + (33, 53, 23, 36, 39), + ] + self.assertEqual(actual, expected) + + +class FactorTests(TestCase): + def test_basic(self): + for n, expected in ( + (0, []), + (1, []), + (2, [2]), + (3, [3]), + (4, [2, 2]), + (6, [2, 3]), + (360, [2, 2, 2, 3, 3, 5]), + (128_884_753_939, [128_884_753_939]), + (999_953 * 999_983, [999_953, 999_983]), + (909_909_090_909, [3, 3, 7, 13, 13, 751, 1_137_97]), + ( + 1_647_403_876_764_101_672_307_088, + [2, 2, 2, 2, 19, 23, 109471, 13571009, 158594251], + ), + ): + with self.subTest(n=n): + actual = list(mi.factor(n)) + self.assertEqual(actual, expected) + + def test_cross_check(self): + prod = lambda x: reduce(mul, x, 1) + self.assertTrue(all(prod(mi.factor(n)) == n for n in range(1, 2000))) + self.assertTrue( + all(set(mi.factor(n)) <= set(mi.sieve(n + 1)) for n in range(2000)) + ) + self.assertTrue( + all( + list(mi.factor(n)) == sorted(mi.factor(n)) for n in range(2000) + ) + ) + + +class SumOfSquaresTests(TestCase): + def test_basic(self): + for it, expected in ( + ([], 0), + ([1, 2, 3], 1 + 4 + 9), + ([2, 4, 6, 8], 4 + 16 + 36 + 64), + ): + with self.subTest(it=it): + actual = mi.sum_of_squares(it) + self.assertEqual(actual, expected) + + +class PolynomialDerivativeTests(TestCase): + def test_basic(self): + for coefficients, expected in [ + ([], []), + ([1], []), + ([1, 2], [1]), + ([1, 2, 3], [2, 2]), + ([1, 2, 3, 4], [3, 4, 3]), + ([1.1, 2, 3, 4], [(1.1 * 3), 4, 3]), + ]: + with self.subTest(coefficients=coefficients): + actual = mi.polynomial_derivative(coefficients) + self.assertEqual(actual, expected) + + +class TotientTests(TestCase): + def test_basic(self): + for n, expected in ( + (1, 1), + (2, 1), + (3, 2), + (4, 2), + (9, 6), + (12, 4), + (128_884_753_939, 128_884_753_938), + (999953 * 999983, 999952 * 999982), + (6**20, 1 * 2**19 * 2 * 3**19), + ): + with self.subTest(n=n): + self.assertEqual(mi.totient(n), expected) + + +class PrimeFunctionTests(TestCase): + def test_is_prime_pseudoprimes(self): + # Carmichael number that strong pseudoprime to prime bases < 307 + # https://doi.org/10.1006/jsco.1995.1042 + p = 29674495668685510550154174642905332730771991799853043350995075531276838753171770199594238596428121188033664754218345562493168782883 # noqa:E501 + gnarly_carmichael = (313 * (p - 1) + 1) * (353 * (p - 1) + 1) + + for n in ( + # Least Carmichael number with n prime factors: + # https://oeis.org/A006931 + 561, + 41041, + 825265, + 321197185, + 5394826801, + 232250619601, + 9746347772161, + 1436697831295441, + 60977817398996785, + 7156857700403137441, + 1791562810662585767521, + 87674969936234821377601, + 6553130926752006031481761, + 1590231231043178376951698401, + # Carmichael numbers with exactly 4 prime factors: + # https://oeis.org/A074379 + 41041, + 62745, + 63973, + 75361, + 101101, + 126217, + 172081, + 188461, + 278545, + 340561, + 449065, + 552721, + 656601, + 658801, + 670033, + 748657, + 838201, + 852841, + 997633, + 1033669, + 1082809, + 1569457, + 1773289, + 2100901, + 2113921, + 2433601, + 2455921, + # Lucas-Carmichael numbers: + # https://oeis.org/A006972 + 399, + 935, + 2015, + 2915, + 4991, + 5719, + 7055, + 8855, + 12719, + 18095, + 20705, + 20999, + 22847, + 29315, + 31535, + 46079, + 51359, + 60059, + 63503, + 67199, + 73535, + 76751, + 80189, + 81719, + 88559, + 90287, + # Strong pseudoprimes to bases 2, 3 and 5: + # https://oeis.org/A056915 + 25326001, + 161304001, + 960946321, + 1157839381, + 3215031751, + 3697278427, + 5764643587, + 6770862367, + 14386156093, + 15579919981, + 18459366157, + 19887974881, + 21276028621, + 27716349961, + 29118033181, + 37131467521, + 41752650241, + 42550716781, + 43536545821, + # Strong pseudoprimes to bases 2, 3, 5, and 7: + # https://oeis.org/A211112 + 39365185894561, + 52657210792621, + 11377272352951, + 15070413782971, + 3343433905957, + 16603327018981, + 3461715915661, + 52384617784801, + 3477707481751, + 18996486073489, + 55712149574381, + gnarly_carmichael, + ): + with self.subTest(n=n): + self.assertFalse(mi.is_prime(n)) + + def test_primes(self): + for i, n in enumerate(mi.sieve(10**5)): + with self.subTest(n=n): + self.assertTrue(mi.is_prime(n)) + self.assertEqual(mi.nth_prime(i), n) + + self.assertFalse(mi.is_prime(-1)) + with self.assertRaises(ValueError): + mi.nth_prime(-1) + + def test_special_primes(self): + for n in ( + # Mersenee primes: + # https://oeis.org/A211112 + 3, + 7, + 31, + 127, + 8191, + 131071, + 524287, + 2147483647, + 2305843009213693951, + 618970019642690137449562111, + 162259276829213363391578010288127, + 170141183460469231731687303715884105727, + # Various big primes: + # https://bigprimes.org/ + 7990614013, + 80358337843874809987, + 814847562949580526031364519741, + 1982427225022428178169740526258124929077, + 91828213828508622559862344537590739566883686537727, + 406414746815201693481517584049440077164779143248351060891669, + ): + with self.subTest(n=n): + self.assertTrue(mi.is_prime(n)) + + +class LoopsTests(TestCase): + def test_basic(self): + self.assertTrue( + all(list(mi.loops(n)) == [None] * n for n in range(-10, 10)) + ) + + +class MultinomialTests(TestCase): + def test_basic(self): + multinomial = mi.multinomial + + # Case M(11; 5, 2, 1, 1, 2) = 83160 + # https://www.wolframalpha.com/input?i=Multinomia%285%2C+2%2C+1%2C+1%2C+2%29 + self.assertEqual(multinomial(5, 2, 1, 1, 2), 83160) + + # Commutative + self.assertEqual(multinomial(2, 1, 1, 2, 5), 83160) + + # Unaffected by zero-sized bins + self.assertEqual(multinomial(2, 0, 1, 0, 1, 2, 5, 0), 83160) + + # Matches definition + self.assertEqual( + multinomial(5, 2, 1, 1, 2), + ( + factorial(sum([5, 2, 1, 1, 2])) + // prod(map(factorial, [5, 2, 1, 1, 2])) + ), + ) + + # Corner cases and identities + self.assertEqual(multinomial(), 1) + self.assertEqual(multinomial(5), 1) + self.assertEqual(multinomial(5, 7), comb(12, 5)) + self.assertEqual(multinomial(1, 1, 1, 1, 1, 1, 1), factorial(7)) + + # Relationship to distinct_permuations() and permutations() + for word in ['plain', 'pizza', 'coffee', 'honolulu', 'assists']: + with self.subTest(word=word): + self.assertEqual( + multinomial(*Counter(word).values()), + mi.ilen(mi.distinct_permutations(word)), + ) + self.assertEqual( + multinomial(*Counter(word).values()), + len(set(permutations(word))), + ) + + # Error cases + with self.assertRaises(ValueError): + multinomial(-5, 7) # No negative inputs + with self.assertRaises(TypeError): + multinomial(5, 7.25) # No float inputs + with self.assertRaises(TypeError): + multinomial(5, 'x') # No non-numeric inputs + with self.assertRaises(TypeError): + multinomial([5, 7]) # No sequence inputs + + +class RunningMedianTests(TestCase): + def test_vs_statistics_median(self): + running_median = mi.running_median + + for data in [ + random.choices(range(-500, 500), k=500), + # Apply unary plus to force context rounding. + [+Decimal(random.uniform(-500, 500)) for _ in range(500)], + [ + Fraction(random.randrange(-500, 500), random.randrange(1, 500)) + for _ in range(500) + ], + ]: + with self.subTest(data=data): + for k, rm in enumerate(running_median(iter(data)), start=1): + expected = statistics.median(data[:k]) + self.assertEqual(rm, expected) + self.assertEqual(type(rm), type(expected)) + + self.assertEqual(list(running_median([])), []) # Empty input + + def test_vs_statistics_median_windowed(self): + running_median = mi.running_median + size = 10 + + for data in [ + random.choices(range(-500, 500), k=500), + # Apply unary plus to force context rounding. + [+Decimal(random.uniform(-500, 500)) for _ in range(500)], + [ + Fraction(random.randrange(-500, 500), random.randrange(1, 500)) + for _ in range(500) + ], + ]: + with self.subTest(data=data): + iterator = running_median(iter(data), maxlen=size) + for k, rm in enumerate(iterator, start=1): + expected = statistics.median(data[max(0, k - size) : k]) + self.assertEqual(rm, expected) + self.assertEqual(type(rm), type(expected)) + + self.assertEqual(list(running_median([], maxlen=1)), []) # Empty input + + # Window size of 1 should return the original dataset unchanged + data = random.choices(range(-500, 500), k=500) + self.assertEqual(list(running_median(data, maxlen=1)), data) + + # Window size of 2 is a moving average of pairs + data = random.choices(range(-500, 500), k=500) + expected = list(map(mean, mi.pairwise(data))) + actual = list(islice(running_median(data, maxlen=2), 1, None)) + self.assertEqual(actual, expected) + + # A window larger than the dataset should give the same + # result as an unbounded running median. + data = random.choices(range(-500, 500), k=500) + self.assertEqual( + list(running_median(data, maxlen=600)), list(running_median(data)) + ) + + def test_error_cases(self): + running_median = mi.running_median + with self.assertRaises(TypeError): + running_median(1234) # Non-iterable input + with self.assertRaises(TypeError): + running_median([], maxlen=3.0) # Non-integer type for window size + with self.assertRaises(ValueError): + running_median([], maxlen=0) # Invalid window size + with self.assertRaises(TypeError): + list(running_median([3 + 4j, 5 - 7j])) # Unorderable input type + with self.assertRaises(TypeError): + list( + running_median(['abc', 'def', 'ghi']) + ) # Input type that doesn't support division diff --git a/miniconda3/pkgs/more-itertools-10.8.0-py313h06a4308_0/lib/python3.13/site-packages/more_itertools-10.8.0.dist-info/INSTALLER b/miniconda3/pkgs/more-itertools-10.8.0-py313h06a4308_0/lib/python3.13/site-packages/more_itertools-10.8.0.dist-info/INSTALLER new file mode 100644 index 0000000000000000000000000000000000000000..f79e4cb9aaf0b2d9e8ba78861e2071317b2384b3 --- /dev/null +++ b/miniconda3/pkgs/more-itertools-10.8.0-py313h06a4308_0/lib/python3.13/site-packages/more_itertools-10.8.0.dist-info/INSTALLER @@ -0,0 +1 @@ +conda \ No newline at end of file diff --git a/miniconda3/pkgs/more-itertools-10.8.0-py313h06a4308_0/lib/python3.13/site-packages/more_itertools-10.8.0.dist-info/METADATA b/miniconda3/pkgs/more-itertools-10.8.0-py313h06a4308_0/lib/python3.13/site-packages/more_itertools-10.8.0.dist-info/METADATA new file mode 100644 index 0000000000000000000000000000000000000000..bb7a3db109905db8cc7f1f2f5047e0b609aaf4ce --- /dev/null +++ b/miniconda3/pkgs/more-itertools-10.8.0-py313h06a4308_0/lib/python3.13/site-packages/more_itertools-10.8.0.dist-info/METADATA @@ -0,0 +1,283 @@ +Metadata-Version: 2.4 +Name: more-itertools +Version: 10.8.0 +Summary: More routines for operating on iterables, beyond itertools +Keywords: itertools,iterator,iteration,filter,peek,peekable,chunk,chunked +Author-email: Erik Rose +Requires-Python: >=3.9 +Description-Content-Type: text/x-rst +License-Expression: MIT +Classifier: Development Status :: 5 - Production/Stable +Classifier: Intended Audience :: Developers +Classifier: Natural Language :: English +Classifier: Programming Language :: Python :: 3 +Classifier: Programming Language :: Python :: 3.9 +Classifier: Programming Language :: Python :: 3.10 +Classifier: Programming Language :: Python :: 3.11 +Classifier: Programming Language :: Python :: 3.12 +Classifier: Programming Language :: Python :: 3.13 +Classifier: Programming Language :: Python :: 3 :: Only +Classifier: Programming Language :: Python :: Implementation :: CPython +Classifier: Programming Language :: Python :: Implementation :: PyPy +Classifier: Topic :: Software Development :: Libraries +License-File: LICENSE +Project-URL: Documentation, https://more-itertools.readthedocs.io/en/stable/ +Project-URL: Homepage, https://github.com/more-itertools/more-itertools + +============== +More Itertools +============== + +.. image:: https://readthedocs.org/projects/more-itertools/badge/?version=latest + :target: https://more-itertools.readthedocs.io/en/stable/ + +Python's ``itertools`` library is a gem - you can compose elegant solutions +for a variety of problems with the functions it provides. In ``more-itertools`` +we collect additional building blocks, recipes, and routines for working with +Python iterables. + ++------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| Grouping | `chunked `_, | +| | `ichunked `_, | +| | `chunked_even `_, | +| | `sliced `_, | +| | `constrained_batches `_, | +| | `distribute `_, | +| | `divide `_, | +| | `split_at `_, | +| | `split_before `_, | +| | `split_after `_, | +| | `split_into `_, | +| | `split_when `_, | +| | `bucket `_, | +| | `unzip `_, | +| | `batched `_, | +| | `grouper `_, | +| | `partition `_, | +| | `transpose `_ | ++------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| Lookahead and lookback | `spy `_, | +| | `peekable `_, | +| | `seekable `_ | ++------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| Windowing | `windowed `_, | +| | `substrings `_, | +| | `substrings_indexes `_, | +| | `stagger `_, | +| | `windowed_complete `_, | +| | `pairwise `_, | +| | `triplewise `_, | +| | `sliding_window `_, | +| | `subslices `_ | ++------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| Augmenting | `count_cycle `_, | +| | `intersperse `_, | +| | `padded `_, | +| | `repeat_each `_, | +| | `mark_ends `_, | +| | `repeat_last `_, | +| | `adjacent `_, | +| | `groupby_transform `_, | +| | `pad_none `_, | +| | `ncycles `_ | ++------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| Combining | `collapse `_, | +| | `sort_together `_, | +| | `interleave `_, | +| | `interleave_longest `_, | +| | `interleave_evenly `_, | +| | `interleave_randomly `_, | +| | `zip_offset `_, | +| | `zip_equal `_, | +| | `zip_broadcast `_, | +| | `flatten `_, | +| | `roundrobin `_, | +| | `prepend `_, | +| | `value_chain `_, | +| | `partial_product `_ | ++------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| Summarizing | `ilen `_, | +| | `unique_to_each `_, | +| | `sample `_, | +| | `consecutive_groups `_, | +| | `run_length `_, | +| | `map_reduce `_, | +| | `join_mappings `_, | +| | `exactly_n `_, | +| | `is_sorted `_, | +| | `all_equal `_, | +| | `all_unique `_, | +| | `argmin `_, | +| | `argmax `_, | +| | `minmax `_, | +| | `first_true `_, | +| | `quantify `_, | +| | `iequals `_ | ++------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| Selecting | `islice_extended `_, | +| | `first `_, | +| | `last `_, | +| | `one `_, | +| | `only `_, | +| | `strictly_n `_, | +| | `strip `_, | +| | `lstrip `_, | +| | `rstrip `_, | +| | `filter_except `_, | +| | `map_except `_, | +| | `filter_map `_, | +| | `iter_suppress `_, | +| | `nth_or_last `_, | +| | `extract `_, | +| | `unique_in_window `_, | +| | `before_and_after `_, | +| | `nth `_, | +| | `take `_, | +| | `tail `_, | +| | `unique_everseen `_, | +| | `unique_justseen `_, | +| | `unique `_, | +| | `duplicates_everseen `_, | +| | `duplicates_justseen `_, | +| | `classify_unique `_, | +| | `longest_common_prefix `_, | +| | `takewhile_inclusive `_ | ++------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| Math | `dft `_, | +| | `idft `_, | +| | `convolve `_, | +| | `dotproduct `_, | +| | `matmul `_, | +| | `polynomial_from_roots `_, | +| | `polynomial_derivative `_, | +| | `polynomial_eval `_, | +| | `sum_of_squares `_, | +| | `running_median `_, | +| | `totient `_ | ++------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| Integer math | `factor `_, | +| | `is_prime `_, | +| | `multinomial `_, | +| | `nth_prime `_, | +| | `sieve `_ | ++------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| Combinatorics | `circular_shifts `_, | +| | `derangements `_, | +| | `gray_product `_, | +| | `outer_product `_, | +| | `partitions `_, | +| | `set_partitions `_, | +| | `powerset `_, | +| | `powerset_of_sets `_ | +| +-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| | `distinct_combinations `_, | +| | `distinct_permutations `_ | +| +-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| | `combination_index `_, | +| | `combination_with_replacement_index `_, | +| | `permutation_index `_, | +| | `product_index `_ | +| +-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| | `nth_combination `_, | +| | `nth_combination_with_replacement `_, | +| | `nth_permutation `_, | +| | `nth_product `_ | +| +-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| | `random_combination `_, | +| | `random_combination_with_replacement `_, | +| | `random_permutation `_, | +| | `random_product `_ | ++------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| Wrapping | `always_iterable `_, | +| | `always_reversible `_, | +| | `countable `_, | +| | `consumer `_, | +| | `with_iter `_, | +| | `iter_except `_ | ++------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| Others | `locate `_, | +| | `rlocate `_, | +| | `replace `_, | +| | `numeric_range `_, | +| | `side_effect `_, | +| | `iterate `_, | +| | `loops `_, | +| | `difference `_, | +| | `make_decorator `_, | +| | `SequenceView `_, | +| | `time_limited `_, | +| | `map_if `_, | +| | `iter_index `_, | +| | `consume `_, | +| | `tabulate `_, | +| | `repeatfunc `_, | +| | `reshape `_, | +| | `doublestarmap `_ | ++------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + + +Getting started +=============== + +To get started, install the library with `pip `_: + +.. code-block:: shell + + pip install more-itertools + +The recipes from the `itertools docs `_ +are included in the top-level package: + +.. code-block:: python + + >>> from more_itertools import flatten + >>> iterable = [(0, 1), (2, 3)] + >>> list(flatten(iterable)) + [0, 1, 2, 3] + +Several new recipes are available as well: + +.. code-block:: python + + >>> from more_itertools import chunked + >>> iterable = [0, 1, 2, 3, 4, 5, 6, 7, 8] + >>> list(chunked(iterable, 3)) + [[0, 1, 2], [3, 4, 5], [6, 7, 8]] + + >>> from more_itertools import spy + >>> iterable = (x * x for x in range(1, 6)) + >>> head, iterable = spy(iterable, n=3) + >>> list(head) + [1, 4, 9] + >>> list(iterable) + [1, 4, 9, 16, 25] + + + +For the full listing of functions, see the `API documentation `_. + + +Links elsewhere +=============== + +Blog posts about ``more-itertools``: + +* `Yo, I heard you like decorators `__ +* `Tour of Python Itertools `__ (`Alternate `__) +* `Real-World Python More Itertools `_ + + +Development +=========== + +``more-itertools`` is maintained by `@erikrose `_ +and `@bbayles `_, with help from `many others `_. +If you have a problem or suggestion, please file a bug or pull request in this +repository. Thanks for contributing! + + +Version History +=============== + +The version history can be found in `documentation `_. + diff --git a/miniconda3/pkgs/more-itertools-10.8.0-py313h06a4308_0/lib/python3.13/site-packages/more_itertools-10.8.0.dist-info/RECORD b/miniconda3/pkgs/more-itertools-10.8.0-py313h06a4308_0/lib/python3.13/site-packages/more_itertools-10.8.0.dist-info/RECORD new file mode 100644 index 0000000000000000000000000000000000000000..b6a7985a8288e53a53b3d1bbaccea12563ae8c0c --- /dev/null +++ b/miniconda3/pkgs/more-itertools-10.8.0-py313h06a4308_0/lib/python3.13/site-packages/more_itertools-10.8.0.dist-info/RECORD @@ -0,0 +1,17 @@ +more_itertools-10.8.0.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4 +more_itertools-10.8.0.dist-info/METADATA,sha256=arNRUUWr5YsGfwh8hnYxz0z11lP-2BuWQu4SCGw5BLg,39413 +more_itertools-10.8.0.dist-info/RECORD,, +more_itertools-10.8.0.dist-info/REQUESTED,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +more_itertools-10.8.0.dist-info/WHEEL,sha256=G2gURzTEtmeR8nrdXUJfNiB3VYVxigPQ-bEQujpNiNs,82 +more_itertools-10.8.0.dist-info/direct_url.json,sha256=Y8ng5E-j-wYpnlLH-WmSPM5Cv2r8fLZ0IFdkiv37_h8,104 +more_itertools-10.8.0.dist-info/licenses/LICENSE,sha256=CfHIyelBrz5YTVlkHqm4fYPAyw_QB-te85Gn4mQ8GkY,1053 +more_itertools/__init__.py,sha256=5F7E_zpoGcEBW_T_3WE0WYYt8j-gJodIuiBcOJxrOv8,149 +more_itertools/__init__.pyi,sha256=5B3eTzON1BBuOLob1vCflyEb2lSd6usXQQ-Cv-hXkeA,43 +more_itertools/__pycache__/__init__.cpython-313.pyc,, +more_itertools/__pycache__/more.cpython-313.pyc,, +more_itertools/__pycache__/recipes.cpython-313.pyc,, +more_itertools/more.py,sha256=mNPKKu5UI7lRL460vgm0QTCWFiGMVCMosSPxVSdibos,163690 +more_itertools/more.pyi,sha256=fpEgNX3O66wY5cnT-s5VYDKNUpAcaCyU3iP84It3OOM,27119 +more_itertools/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +more_itertools/recipes.py,sha256=Ma-kuBNZDFhaQDbIJgRmnrG86WzaupbOyUV3v8je3xw,41811 +more_itertools/recipes.pyi,sha256=LNRwN-OL3nkMfQAqx-PPc1fBaetUObb_Z6mdePyzh1c,6226 diff --git a/miniconda3/pkgs/more-itertools-10.8.0-py313h06a4308_0/lib/python3.13/site-packages/more_itertools-10.8.0.dist-info/REQUESTED b/miniconda3/pkgs/more-itertools-10.8.0-py313h06a4308_0/lib/python3.13/site-packages/more_itertools-10.8.0.dist-info/REQUESTED new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/miniconda3/pkgs/more-itertools-10.8.0-py313h06a4308_0/lib/python3.13/site-packages/more_itertools-10.8.0.dist-info/WHEEL b/miniconda3/pkgs/more-itertools-10.8.0-py313h06a4308_0/lib/python3.13/site-packages/more_itertools-10.8.0.dist-info/WHEEL new file mode 100644 index 0000000000000000000000000000000000000000..d8b9936dad9ab2513fa6979f411560d3b6b57e37 --- /dev/null +++ b/miniconda3/pkgs/more-itertools-10.8.0-py313h06a4308_0/lib/python3.13/site-packages/more_itertools-10.8.0.dist-info/WHEEL @@ -0,0 +1,4 @@ +Wheel-Version: 1.0 +Generator: flit 3.12.0 +Root-Is-Purelib: true +Tag: py3-none-any diff --git a/miniconda3/pkgs/more-itertools-10.8.0-py313h06a4308_0/lib/python3.13/site-packages/more_itertools-10.8.0.dist-info/direct_url.json b/miniconda3/pkgs/more-itertools-10.8.0-py313h06a4308_0/lib/python3.13/site-packages/more_itertools-10.8.0.dist-info/direct_url.json new file mode 100644 index 0000000000000000000000000000000000000000..a24d0647d2955b784b995bd579ea09ab65f7f657 --- /dev/null +++ b/miniconda3/pkgs/more-itertools-10.8.0-py313h06a4308_0/lib/python3.13/site-packages/more_itertools-10.8.0.dist-info/direct_url.json @@ -0,0 +1 @@ +{"dir_info": {}, "url": "file:///home/task_176112148319406/conda-bld/more-itertools_1761121494880/work"} \ No newline at end of file diff --git a/miniconda3/pkgs/more-itertools-10.8.0-py313h06a4308_0/lib/python3.13/site-packages/more_itertools-10.8.0.dist-info/licenses/LICENSE b/miniconda3/pkgs/more-itertools-10.8.0-py313h06a4308_0/lib/python3.13/site-packages/more_itertools-10.8.0.dist-info/licenses/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..0a523bece3e50519653c4d7a38399baa487fefa1 --- /dev/null +++ b/miniconda3/pkgs/more-itertools-10.8.0-py313h06a4308_0/lib/python3.13/site-packages/more_itertools-10.8.0.dist-info/licenses/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2012 Erik Rose + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/miniconda3/pkgs/more-itertools-10.8.0-py313h06a4308_0/lib/python3.13/site-packages/more_itertools/__init__.py b/miniconda3/pkgs/more-itertools-10.8.0-py313h06a4308_0/lib/python3.13/site-packages/more_itertools/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..24216c5c1feb8b6017f71d096124e5db0aac5bd2 --- /dev/null +++ b/miniconda3/pkgs/more-itertools-10.8.0-py313h06a4308_0/lib/python3.13/site-packages/more_itertools/__init__.py @@ -0,0 +1,6 @@ +"""More routines for operating on iterables, beyond itertools""" + +from .more import * # noqa +from .recipes import * # noqa + +__version__ = '10.8.0' diff --git a/miniconda3/pkgs/more-itertools-10.8.0-py313h06a4308_0/lib/python3.13/site-packages/more_itertools/__init__.pyi b/miniconda3/pkgs/more-itertools-10.8.0-py313h06a4308_0/lib/python3.13/site-packages/more_itertools/__init__.pyi new file mode 100644 index 0000000000000000000000000000000000000000..96f6e36c7f4ac9ea0aebdcd9e11b8d1ff092d2ef --- /dev/null +++ b/miniconda3/pkgs/more-itertools-10.8.0-py313h06a4308_0/lib/python3.13/site-packages/more_itertools/__init__.pyi @@ -0,0 +1,2 @@ +from .more import * +from .recipes import * diff --git a/miniconda3/pkgs/more-itertools-10.8.0-py313h06a4308_0/lib/python3.13/site-packages/more_itertools/more.py b/miniconda3/pkgs/more-itertools-10.8.0-py313h06a4308_0/lib/python3.13/site-packages/more_itertools/more.py new file mode 100644 index 0000000000000000000000000000000000000000..bf501956ae6c77e7597948abdaede960ca259444 --- /dev/null +++ b/miniconda3/pkgs/more-itertools-10.8.0-py313h06a4308_0/lib/python3.13/site-packages/more_itertools/more.py @@ -0,0 +1,5303 @@ +import math +import warnings + +from collections import Counter, defaultdict, deque, abc +from collections.abc import Sequence +from contextlib import suppress +from functools import cached_property, partial, reduce, wraps +from heapq import heapify, heapreplace +from itertools import ( + chain, + combinations, + compress, + count, + cycle, + dropwhile, + groupby, + islice, + permutations, + repeat, + starmap, + takewhile, + tee, + zip_longest, + product, +) +from math import comb, e, exp, factorial, floor, fsum, log, log1p, perm, tau +from math import ceil +from queue import Empty, Queue +from random import random, randrange, shuffle, uniform +from operator import ( + attrgetter, + is_not, + itemgetter, + lt, + mul, + neg, + sub, + gt, +) +from sys import hexversion, maxsize +from time import monotonic + +from .recipes import ( + _marker, + _zip_equal, + UnequalIterablesError, + consume, + first_true, + flatten, + is_prime, + nth, + powerset, + sieve, + take, + unique_everseen, + all_equal, + batched, +) + +__all__ = [ + 'AbortThread', + 'SequenceView', + 'UnequalIterablesError', + 'adjacent', + 'all_unique', + 'always_iterable', + 'always_reversible', + 'argmax', + 'argmin', + 'bucket', + 'callback_iter', + 'chunked', + 'chunked_even', + 'circular_shifts', + 'collapse', + 'combination_index', + 'combination_with_replacement_index', + 'consecutive_groups', + 'constrained_batches', + 'consumer', + 'count_cycle', + 'countable', + 'derangements', + 'dft', + 'difference', + 'distinct_combinations', + 'distinct_permutations', + 'distribute', + 'divide', + 'doublestarmap', + 'duplicates_everseen', + 'duplicates_justseen', + 'classify_unique', + 'exactly_n', + 'extract', + 'filter_except', + 'filter_map', + 'first', + 'gray_product', + 'groupby_transform', + 'ichunked', + 'iequals', + 'idft', + 'ilen', + 'interleave', + 'interleave_evenly', + 'interleave_longest', + 'interleave_randomly', + 'intersperse', + 'is_sorted', + 'islice_extended', + 'iterate', + 'iter_suppress', + 'join_mappings', + 'last', + 'locate', + 'longest_common_prefix', + 'lstrip', + 'make_decorator', + 'map_except', + 'map_if', + 'map_reduce', + 'mark_ends', + 'minmax', + 'nth_or_last', + 'nth_permutation', + 'nth_prime', + 'nth_product', + 'nth_combination_with_replacement', + 'numeric_range', + 'one', + 'only', + 'outer_product', + 'padded', + 'partial_product', + 'partitions', + 'peekable', + 'permutation_index', + 'powerset_of_sets', + 'product_index', + 'raise_', + 'repeat_each', + 'repeat_last', + 'replace', + 'rlocate', + 'rstrip', + 'run_length', + 'sample', + 'seekable', + 'set_partitions', + 'side_effect', + 'sliced', + 'sort_together', + 'split_after', + 'split_at', + 'split_before', + 'split_into', + 'split_when', + 'spy', + 'stagger', + 'strip', + 'strictly_n', + 'substrings', + 'substrings_indexes', + 'takewhile_inclusive', + 'time_limited', + 'unique_in_window', + 'unique_to_each', + 'unzip', + 'value_chain', + 'windowed', + 'windowed_complete', + 'with_iter', + 'zip_broadcast', + 'zip_equal', + 'zip_offset', +] + +# math.sumprod is available for Python 3.12+ +try: + from math import sumprod as _fsumprod + +except ImportError: # pragma: no cover + # Extended precision algorithms from T. J. Dekker, + # "A Floating-Point Technique for Extending the Available Precision" + # https://csclub.uwaterloo.ca/~pbarfuss/dekker1971.pdf + # Formulas: (5.5) (5.6) and (5.8). Code: mul12() + + def dl_split(x: float): + "Split a float into two half-precision components." + t = x * 134217729.0 # Veltkamp constant = 2.0 ** 27 + 1 + hi = t - (t - x) + lo = x - hi + return hi, lo + + def dl_mul(x, y): + "Lossless multiplication." + xx_hi, xx_lo = dl_split(x) + yy_hi, yy_lo = dl_split(y) + p = xx_hi * yy_hi + q = xx_hi * yy_lo + xx_lo * yy_hi + z = p + q + zz = p - z + q + xx_lo * yy_lo + return z, zz + + def _fsumprod(p, q): + return fsum(chain.from_iterable(map(dl_mul, p, q))) + + +def chunked(iterable, n, strict=False): + """Break *iterable* into lists of length *n*: + + >>> list(chunked([1, 2, 3, 4, 5, 6], 3)) + [[1, 2, 3], [4, 5, 6]] + + By the default, the last yielded list will have fewer than *n* elements + if the length of *iterable* is not divisible by *n*: + + >>> list(chunked([1, 2, 3, 4, 5, 6, 7, 8], 3)) + [[1, 2, 3], [4, 5, 6], [7, 8]] + + To use a fill-in value instead, see the :func:`grouper` recipe. + + If the length of *iterable* is not divisible by *n* and *strict* is + ``True``, then ``ValueError`` will be raised before the last + list is yielded. + + """ + iterator = iter(partial(take, n, iter(iterable)), []) + if strict: + if n is None: + raise ValueError('n must not be None when using strict mode.') + + def ret(): + for chunk in iterator: + if len(chunk) != n: + raise ValueError('iterable is not divisible by n.') + yield chunk + + return ret() + else: + return iterator + + +def first(iterable, default=_marker): + """Return the first item of *iterable*, or *default* if *iterable* is + empty. + + >>> first([0, 1, 2, 3]) + 0 + >>> first([], 'some default') + 'some default' + + If *default* is not provided and there are no items in the iterable, + raise ``ValueError``. + + :func:`first` is useful when you have a generator of expensive-to-retrieve + values and want any arbitrary one. It is marginally shorter than + ``next(iter(iterable), default)``. + + """ + for item in iterable: + return item + if default is _marker: + raise ValueError( + 'first() was called on an empty iterable, ' + 'and no default value was provided.' + ) + return default + + +def last(iterable, default=_marker): + """Return the last item of *iterable*, or *default* if *iterable* is + empty. + + >>> last([0, 1, 2, 3]) + 3 + >>> last([], 'some default') + 'some default' + + If *default* is not provided and there are no items in the iterable, + raise ``ValueError``. + """ + try: + if isinstance(iterable, Sequence): + return iterable[-1] + # Work around https://bugs.python.org/issue38525 + if getattr(iterable, '__reversed__', None): + return next(reversed(iterable)) + return deque(iterable, maxlen=1)[-1] + except (IndexError, TypeError, StopIteration): + if default is _marker: + raise ValueError( + 'last() was called on an empty iterable, ' + 'and no default value was provided.' + ) + return default + + +def nth_or_last(iterable, n, default=_marker): + """Return the nth or the last item of *iterable*, + or *default* if *iterable* is empty. + + >>> nth_or_last([0, 1, 2, 3], 2) + 2 + >>> nth_or_last([0, 1], 2) + 1 + >>> nth_or_last([], 0, 'some default') + 'some default' + + If *default* is not provided and there are no items in the iterable, + raise ``ValueError``. + """ + return last(islice(iterable, n + 1), default=default) + + +class peekable: + """Wrap an iterator to allow lookahead and prepending elements. + + Call :meth:`peek` on the result to get the value that will be returned + by :func:`next`. This won't advance the iterator: + + >>> p = peekable(['a', 'b']) + >>> p.peek() + 'a' + >>> next(p) + 'a' + + Pass :meth:`peek` a default value to return that instead of raising + ``StopIteration`` when the iterator is exhausted. + + >>> p = peekable([]) + >>> p.peek('hi') + 'hi' + + peekables also offer a :meth:`prepend` method, which "inserts" items + at the head of the iterable: + + >>> p = peekable([1, 2, 3]) + >>> p.prepend(10, 11, 12) + >>> next(p) + 10 + >>> p.peek() + 11 + >>> list(p) + [11, 12, 1, 2, 3] + + peekables can be indexed. Index 0 is the item that will be returned by + :func:`next`, index 1 is the item after that, and so on: + The values up to the given index will be cached. + + >>> p = peekable(['a', 'b', 'c', 'd']) + >>> p[0] + 'a' + >>> p[1] + 'b' + >>> next(p) + 'a' + + Negative indexes are supported, but be aware that they will cache the + remaining items in the source iterator, which may require significant + storage. + + To check whether a peekable is exhausted, check its truth value: + + >>> p = peekable(['a', 'b']) + >>> if p: # peekable has items + ... list(p) + ['a', 'b'] + >>> if not p: # peekable is exhausted + ... list(p) + [] + + """ + + def __init__(self, iterable): + self._it = iter(iterable) + self._cache = deque() + + def __iter__(self): + return self + + def __bool__(self): + try: + self.peek() + except StopIteration: + return False + return True + + def peek(self, default=_marker): + """Return the item that will be next returned from ``next()``. + + Return ``default`` if there are no items left. If ``default`` is not + provided, raise ``StopIteration``. + + """ + if not self._cache: + try: + self._cache.append(next(self._it)) + except StopIteration: + if default is _marker: + raise + return default + return self._cache[0] + + def prepend(self, *items): + """Stack up items to be the next ones returned from ``next()`` or + ``self.peek()``. The items will be returned in + first in, first out order:: + + >>> p = peekable([1, 2, 3]) + >>> p.prepend(10, 11, 12) + >>> next(p) + 10 + >>> list(p) + [11, 12, 1, 2, 3] + + It is possible, by prepending items, to "resurrect" a peekable that + previously raised ``StopIteration``. + + >>> p = peekable([]) + >>> next(p) + Traceback (most recent call last): + ... + StopIteration + >>> p.prepend(1) + >>> next(p) + 1 + >>> next(p) + Traceback (most recent call last): + ... + StopIteration + + """ + self._cache.extendleft(reversed(items)) + + def __next__(self): + if self._cache: + return self._cache.popleft() + + return next(self._it) + + def _get_slice(self, index): + # Normalize the slice's arguments + step = 1 if (index.step is None) else index.step + if step > 0: + start = 0 if (index.start is None) else index.start + stop = maxsize if (index.stop is None) else index.stop + elif step < 0: + start = -1 if (index.start is None) else index.start + stop = (-maxsize - 1) if (index.stop is None) else index.stop + else: + raise ValueError('slice step cannot be zero') + + # If either the start or stop index is negative, we'll need to cache + # the rest of the iterable in order to slice from the right side. + if (start < 0) or (stop < 0): + self._cache.extend(self._it) + # Otherwise we'll need to find the rightmost index and cache to that + # point. + else: + n = min(max(start, stop) + 1, maxsize) + cache_len = len(self._cache) + if n >= cache_len: + self._cache.extend(islice(self._it, n - cache_len)) + + return list(self._cache)[index] + + def __getitem__(self, index): + if isinstance(index, slice): + return self._get_slice(index) + + cache_len = len(self._cache) + if index < 0: + self._cache.extend(self._it) + elif index >= cache_len: + self._cache.extend(islice(self._it, index + 1 - cache_len)) + + return self._cache[index] + + +def consumer(func): + """Decorator that automatically advances a PEP-342-style "reverse iterator" + to its first yield point so you don't have to call ``next()`` on it + manually. + + >>> @consumer + ... def tally(): + ... i = 0 + ... while True: + ... print('Thing number %s is %s.' % (i, (yield))) + ... i += 1 + ... + >>> t = tally() + >>> t.send('red') + Thing number 0 is red. + >>> t.send('fish') + Thing number 1 is fish. + + Without the decorator, you would have to call ``next(t)`` before + ``t.send()`` could be used. + + """ + + @wraps(func) + def wrapper(*args, **kwargs): + gen = func(*args, **kwargs) + next(gen) + return gen + + return wrapper + + +def ilen(iterable): + """Return the number of items in *iterable*. + + For example, there are 168 prime numbers below 1,000: + + >>> ilen(sieve(1000)) + 168 + + Equivalent to, but faster than:: + + def ilen(iterable): + count = 0 + for _ in iterable: + count += 1 + return count + + This fully consumes the iterable, so handle with care. + + """ + # This is the "most beautiful of the fast variants" of this function. + # If you think you can improve on it, please ensure that your version + # is both 10x faster and 10x more beautiful. + return sum(compress(repeat(1), zip(iterable))) + + +def iterate(func, start): + """Return ``start``, ``func(start)``, ``func(func(start))``, ... + + Produces an infinite iterator. To add a stopping condition, + use :func:`take`, ``takewhile``, or :func:`takewhile_inclusive`:. + + >>> take(10, iterate(lambda x: 2*x, 1)) + [1, 2, 4, 8, 16, 32, 64, 128, 256, 512] + + >>> collatz = lambda x: 3*x + 1 if x%2==1 else x // 2 + >>> list(takewhile_inclusive(lambda x: x!=1, iterate(collatz, 10))) + [10, 5, 16, 8, 4, 2, 1] + + """ + with suppress(StopIteration): + while True: + yield start + start = func(start) + + +def with_iter(context_manager): + """Wrap an iterable in a ``with`` statement, so it closes once exhausted. + + For example, this will close the file when the iterator is exhausted:: + + upper_lines = (line.upper() for line in with_iter(open('foo'))) + + Any context manager which returns an iterable is a candidate for + ``with_iter``. + + """ + with context_manager as iterable: + yield from iterable + + +def one(iterable, too_short=None, too_long=None): + """Return the first item from *iterable*, which is expected to contain only + that item. Raise an exception if *iterable* is empty or has more than one + item. + + :func:`one` is useful for ensuring that an iterable contains only one item. + For example, it can be used to retrieve the result of a database query + that is expected to return a single row. + + If *iterable* is empty, ``ValueError`` will be raised. You may specify a + different exception with the *too_short* keyword: + + >>> it = [] + >>> one(it) # doctest: +IGNORE_EXCEPTION_DETAIL + Traceback (most recent call last): + ... + ValueError: too few items in iterable (expected 1)' + >>> too_short = IndexError('too few items') + >>> one(it, too_short=too_short) # doctest: +IGNORE_EXCEPTION_DETAIL + Traceback (most recent call last): + ... + IndexError: too few items + + Similarly, if *iterable* contains more than one item, ``ValueError`` will + be raised. You may specify a different exception with the *too_long* + keyword: + + >>> it = ['too', 'many'] + >>> one(it) # doctest: +IGNORE_EXCEPTION_DETAIL + Traceback (most recent call last): + ... + ValueError: Expected exactly one item in iterable, but got 'too', + 'many', and perhaps more. + >>> too_long = RuntimeError + >>> one(it, too_long=too_long) # doctest: +IGNORE_EXCEPTION_DETAIL + Traceback (most recent call last): + ... + RuntimeError + + Note that :func:`one` attempts to advance *iterable* twice to ensure there + is only one item. See :func:`spy` or :func:`peekable` to check iterable + contents less destructively. + + """ + iterator = iter(iterable) + for first in iterator: + for second in iterator: + msg = ( + f'Expected exactly one item in iterable, but got {first!r}, ' + f'{second!r}, and perhaps more.' + ) + raise too_long or ValueError(msg) + return first + raise too_short or ValueError('too few items in iterable (expected 1)') + + +def raise_(exception, *args): + raise exception(*args) + + +def strictly_n(iterable, n, too_short=None, too_long=None): + """Validate that *iterable* has exactly *n* items and return them if + it does. If it has fewer than *n* items, call function *too_short* + with the actual number of items. If it has more than *n* items, call function + *too_long* with the number ``n + 1``. + + >>> iterable = ['a', 'b', 'c', 'd'] + >>> n = 4 + >>> list(strictly_n(iterable, n)) + ['a', 'b', 'c', 'd'] + + Note that the returned iterable must be consumed in order for the check to + be made. + + By default, *too_short* and *too_long* are functions that raise + ``ValueError``. + + >>> list(strictly_n('ab', 3)) # doctest: +IGNORE_EXCEPTION_DETAIL + Traceback (most recent call last): + ... + ValueError: too few items in iterable (got 2) + + >>> list(strictly_n('abc', 2)) # doctest: +IGNORE_EXCEPTION_DETAIL + Traceback (most recent call last): + ... + ValueError: too many items in iterable (got at least 3) + + You can instead supply functions that do something else. + *too_short* will be called with the number of items in *iterable*. + *too_long* will be called with `n + 1`. + + >>> def too_short(item_count): + ... raise RuntimeError + >>> it = strictly_n('abcd', 6, too_short=too_short) + >>> list(it) # doctest: +IGNORE_EXCEPTION_DETAIL + Traceback (most recent call last): + ... + RuntimeError + + >>> def too_long(item_count): + ... print('The boss is going to hear about this') + >>> it = strictly_n('abcdef', 4, too_long=too_long) + >>> list(it) + The boss is going to hear about this + ['a', 'b', 'c', 'd'] + + """ + if too_short is None: + too_short = lambda item_count: raise_( + ValueError, + f'Too few items in iterable (got {item_count})', + ) + + if too_long is None: + too_long = lambda item_count: raise_( + ValueError, + f'Too many items in iterable (got at least {item_count})', + ) + + it = iter(iterable) + + sent = 0 + for item in islice(it, n): + yield item + sent += 1 + + if sent < n: + too_short(sent) + return + + for item in it: + too_long(n + 1) + return + + +def distinct_permutations(iterable, r=None): + """Yield successive distinct permutations of the elements in *iterable*. + + >>> sorted(distinct_permutations([1, 0, 1])) + [(0, 1, 1), (1, 0, 1), (1, 1, 0)] + + Equivalent to yielding from ``set(permutations(iterable))``, except + duplicates are not generated and thrown away. For larger input sequences + this is much more efficient. + + Duplicate permutations arise when there are duplicated elements in the + input iterable. The number of items returned is + `n! / (x_1! * x_2! * ... * x_n!)`, where `n` is the total number of + items input, and each `x_i` is the count of a distinct item in the input + sequence. The function :func:`multinomial` computes this directly. + + If *r* is given, only the *r*-length permutations are yielded. + + >>> sorted(distinct_permutations([1, 0, 1], r=2)) + [(0, 1), (1, 0), (1, 1)] + >>> sorted(distinct_permutations(range(3), r=2)) + [(0, 1), (0, 2), (1, 0), (1, 2), (2, 0), (2, 1)] + + *iterable* need not be sortable, but note that using equal (``x == y``) + but non-identical (``id(x) != id(y)``) elements may produce surprising + behavior. For example, ``1`` and ``True`` are equal but non-identical: + + >>> list(distinct_permutations([1, True, '3'])) # doctest: +SKIP + [ + (1, True, '3'), + (1, '3', True), + ('3', 1, True) + ] + >>> list(distinct_permutations([1, 2, '3'])) # doctest: +SKIP + [ + (1, 2, '3'), + (1, '3', 2), + (2, 1, '3'), + (2, '3', 1), + ('3', 1, 2), + ('3', 2, 1) + ] + """ + + # Algorithm: https://w.wiki/Qai + def _full(A): + while True: + # Yield the permutation we have + yield tuple(A) + + # Find the largest index i such that A[i] < A[i + 1] + for i in range(size - 2, -1, -1): + if A[i] < A[i + 1]: + break + # If no such index exists, this permutation is the last one + else: + return + + # Find the largest index j greater than j such that A[i] < A[j] + for j in range(size - 1, i, -1): + if A[i] < A[j]: + break + + # Swap the value of A[i] with that of A[j], then reverse the + # sequence from A[i + 1] to form the new permutation + A[i], A[j] = A[j], A[i] + A[i + 1 :] = A[: i - size : -1] # A[i + 1:][::-1] + + # Algorithm: modified from the above + def _partial(A, r): + # Split A into the first r items and the last r items + head, tail = A[:r], A[r:] + right_head_indexes = range(r - 1, -1, -1) + left_tail_indexes = range(len(tail)) + + while True: + # Yield the permutation we have + yield tuple(head) + + # Starting from the right, find the first index of the head with + # value smaller than the maximum value of the tail - call it i. + pivot = tail[-1] + for i in right_head_indexes: + if head[i] < pivot: + break + pivot = head[i] + else: + return + + # Starting from the left, find the first value of the tail + # with a value greater than head[i] and swap. + for j in left_tail_indexes: + if tail[j] > head[i]: + head[i], tail[j] = tail[j], head[i] + break + # If we didn't find one, start from the right and find the first + # index of the head with a value greater than head[i] and swap. + else: + for j in right_head_indexes: + if head[j] > head[i]: + head[i], head[j] = head[j], head[i] + break + + # Reverse head[i + 1:] and swap it with tail[:r - (i + 1)] + tail += head[: i - r : -1] # head[i + 1:][::-1] + i += 1 + head[i:], tail[:] = tail[: r - i], tail[r - i :] + + items = list(iterable) + + try: + items.sort() + sortable = True + except TypeError: + sortable = False + + indices_dict = defaultdict(list) + + for item in items: + indices_dict[items.index(item)].append(item) + + indices = [items.index(item) for item in items] + indices.sort() + + equivalent_items = {k: cycle(v) for k, v in indices_dict.items()} + + def permuted_items(permuted_indices): + return tuple( + next(equivalent_items[index]) for index in permuted_indices + ) + + size = len(items) + if r is None: + r = size + + # functools.partial(_partial, ... ) + algorithm = _full if (r == size) else partial(_partial, r=r) + + if 0 < r <= size: + if sortable: + return algorithm(items) + else: + return ( + permuted_items(permuted_indices) + for permuted_indices in algorithm(indices) + ) + + return iter(() if r else ((),)) + + +def derangements(iterable, r=None): + """Yield successive derangements of the elements in *iterable*. + + A derangement is a permutation in which no element appears at its original + index. In other words, a derangement is a permutation that has no fixed points. + + Suppose Alice, Bob, Carol, and Dave are playing Secret Santa. + The code below outputs all of the different ways to assign gift recipients + such that nobody is assigned to himself or herself: + + >>> for d in derangements(['Alice', 'Bob', 'Carol', 'Dave']): + ... print(', '.join(d)) + Bob, Alice, Dave, Carol + Bob, Carol, Dave, Alice + Bob, Dave, Alice, Carol + Carol, Alice, Dave, Bob + Carol, Dave, Alice, Bob + Carol, Dave, Bob, Alice + Dave, Alice, Bob, Carol + Dave, Carol, Alice, Bob + Dave, Carol, Bob, Alice + + If *r* is given, only the *r*-length derangements are yielded. + + >>> sorted(derangements(range(3), 2)) + [(1, 0), (1, 2), (2, 0)] + >>> sorted(derangements([0, 2, 3], 2)) + [(2, 0), (2, 3), (3, 0)] + + Elements are treated as unique based on their position, not on their value. + + Consider the Secret Santa example with two *different* people who have + the *same* name. Then there are two valid gift assignments even though + it might appear that a person is assigned to themselves: + + >>> names = ['Alice', 'Bob', 'Bob'] + >>> list(derangements(names)) + [('Bob', 'Bob', 'Alice'), ('Bob', 'Alice', 'Bob')] + + To avoid confusion, make the inputs distinct: + + >>> deduped = [f'{name}{index}' for index, name in enumerate(names)] + >>> list(derangements(deduped)) + [('Bob1', 'Bob2', 'Alice0'), ('Bob2', 'Alice0', 'Bob1')] + + The number of derangements of a set of size *n* is known as the + "subfactorial of n". For n > 0, the subfactorial is: + ``round(math.factorial(n) / math.e)``. + + References: + + * Article: https://www.numberanalytics.com/blog/ultimate-guide-to-derangements-in-combinatorics + * Sizes: https://oeis.org/A000166 + """ + xs = tuple(iterable) + ys = tuple(range(len(xs))) + return compress( + permutations(xs, r=r), + map(all, map(map, repeat(is_not), repeat(ys), permutations(ys, r=r))), + ) + + +def intersperse(e, iterable, n=1): + """Intersperse filler element *e* among the items in *iterable*, leaving + *n* items between each filler element. + + >>> list(intersperse('!', [1, 2, 3, 4, 5])) + [1, '!', 2, '!', 3, '!', 4, '!', 5] + + >>> list(intersperse(None, [1, 2, 3, 4, 5], n=2)) + [1, 2, None, 3, 4, None, 5] + + """ + if n == 0: + raise ValueError('n must be > 0') + elif n == 1: + # interleave(repeat(e), iterable) -> e, x_0, e, x_1, e, x_2... + # islice(..., 1, None) -> x_0, e, x_1, e, x_2... + return islice(interleave(repeat(e), iterable), 1, None) + else: + # interleave(filler, chunks) -> [e], [x_0, x_1], [e], [x_2, x_3]... + # islice(..., 1, None) -> [x_0, x_1], [e], [x_2, x_3]... + # flatten(...) -> x_0, x_1, e, x_2, x_3... + filler = repeat([e]) + chunks = chunked(iterable, n) + return flatten(islice(interleave(filler, chunks), 1, None)) + + +def unique_to_each(*iterables): + """Return the elements from each of the input iterables that aren't in the + other input iterables. + + For example, suppose you have a set of packages, each with a set of + dependencies:: + + {'pkg_1': {'A', 'B'}, 'pkg_2': {'B', 'C'}, 'pkg_3': {'B', 'D'}} + + If you remove one package, which dependencies can also be removed? + + If ``pkg_1`` is removed, then ``A`` is no longer necessary - it is not + associated with ``pkg_2`` or ``pkg_3``. Similarly, ``C`` is only needed for + ``pkg_2``, and ``D`` is only needed for ``pkg_3``:: + + >>> unique_to_each({'A', 'B'}, {'B', 'C'}, {'B', 'D'}) + [['A'], ['C'], ['D']] + + If there are duplicates in one input iterable that aren't in the others + they will be duplicated in the output. Input order is preserved:: + + >>> unique_to_each("mississippi", "missouri") + [['p', 'p'], ['o', 'u', 'r']] + + It is assumed that the elements of each iterable are hashable. + + """ + pool = [list(it) for it in iterables] + counts = Counter(chain.from_iterable(map(set, pool))) + uniques = {element for element in counts if counts[element] == 1} + return [list(filter(uniques.__contains__, it)) for it in pool] + + +def windowed(seq, n, fillvalue=None, step=1): + """Return a sliding window of width *n* over the given iterable. + + >>> all_windows = windowed([1, 2, 3, 4, 5], 3) + >>> list(all_windows) + [(1, 2, 3), (2, 3, 4), (3, 4, 5)] + + When the window is larger than the iterable, *fillvalue* is used in place + of missing values: + + >>> list(windowed([1, 2, 3], 4)) + [(1, 2, 3, None)] + + Each window will advance in increments of *step*: + + >>> list(windowed([1, 2, 3, 4, 5, 6], 3, fillvalue='!', step=2)) + [(1, 2, 3), (3, 4, 5), (5, 6, '!')] + + To slide into the iterable's items, use :func:`chain` to add filler items + to the left: + + >>> iterable = [1, 2, 3, 4] + >>> n = 3 + >>> padding = [None] * (n - 1) + >>> list(windowed(chain(padding, iterable), 3)) + [(None, None, 1), (None, 1, 2), (1, 2, 3), (2, 3, 4)] + """ + if n < 0: + raise ValueError('n must be >= 0') + if n == 0: + yield () + return + if step < 1: + raise ValueError('step must be >= 1') + + iterator = iter(seq) + + # Generate first window + window = deque(islice(iterator, n), maxlen=n) + + # Deal with the first window not being full + if not window: + return + if len(window) < n: + yield tuple(window) + ((fillvalue,) * (n - len(window))) + return + yield tuple(window) + + # Create the filler for the next windows. The padding ensures + # we have just enough elements to fill the last window. + padding = (fillvalue,) * (n - 1 if step >= n else step - 1) + filler = map(window.append, chain(iterator, padding)) + + # Generate the rest of the windows + for _ in islice(filler, step - 1, None, step): + yield tuple(window) + + +def substrings(iterable): + """Yield all of the substrings of *iterable*. + + >>> [''.join(s) for s in substrings('more')] + ['m', 'o', 'r', 'e', 'mo', 'or', 're', 'mor', 'ore', 'more'] + + Note that non-string iterables can also be subdivided. + + >>> list(substrings([0, 1, 2])) + [(0,), (1,), (2,), (0, 1), (1, 2), (0, 1, 2)] + + """ + # The length-1 substrings + seq = [] + for item in iterable: + seq.append(item) + yield (item,) + seq = tuple(seq) + item_count = len(seq) + + # And the rest + for n in range(2, item_count + 1): + for i in range(item_count - n + 1): + yield seq[i : i + n] + + +def substrings_indexes(seq, reverse=False): + """Yield all substrings and their positions in *seq* + + The items yielded will be a tuple of the form ``(substr, i, j)``, where + ``substr == seq[i:j]``. + + This function only works for iterables that support slicing, such as + ``str`` objects. + + >>> for item in substrings_indexes('more'): + ... print(item) + ('m', 0, 1) + ('o', 1, 2) + ('r', 2, 3) + ('e', 3, 4) + ('mo', 0, 2) + ('or', 1, 3) + ('re', 2, 4) + ('mor', 0, 3) + ('ore', 1, 4) + ('more', 0, 4) + + Set *reverse* to ``True`` to yield the same items in the opposite order. + + + """ + r = range(1, len(seq) + 1) + if reverse: + r = reversed(r) + return ( + (seq[i : i + L], i, i + L) for L in r for i in range(len(seq) - L + 1) + ) + + +class bucket: + """Wrap *iterable* and return an object that buckets the iterable into + child iterables based on a *key* function. + + >>> iterable = ['a1', 'b1', 'c1', 'a2', 'b2', 'c2', 'b3'] + >>> s = bucket(iterable, key=lambda x: x[0]) # Bucket by 1st character + >>> sorted(list(s)) # Get the keys + ['a', 'b', 'c'] + >>> a_iterable = s['a'] + >>> next(a_iterable) + 'a1' + >>> next(a_iterable) + 'a2' + >>> list(s['b']) + ['b1', 'b2', 'b3'] + + The original iterable will be advanced and its items will be cached until + they are used by the child iterables. This may require significant storage. + + By default, attempting to select a bucket to which no items belong will + exhaust the iterable and cache all values. + If you specify a *validator* function, selected buckets will instead be + checked against it. + + >>> from itertools import count + >>> it = count(1, 2) # Infinite sequence of odd numbers + >>> key = lambda x: x % 10 # Bucket by last digit + >>> validator = lambda x: x in {1, 3, 5, 7, 9} # Odd digits only + >>> s = bucket(it, key=key, validator=validator) + >>> 2 in s + False + >>> list(s[2]) + [] + + """ + + def __init__(self, iterable, key, validator=None): + self._it = iter(iterable) + self._key = key + self._cache = defaultdict(deque) + self._validator = validator or (lambda x: True) + + def __contains__(self, value): + if not self._validator(value): + return False + + try: + item = next(self[value]) + except StopIteration: + return False + else: + self._cache[value].appendleft(item) + + return True + + def _get_values(self, value): + """ + Helper to yield items from the parent iterator that match *value*. + Items that don't match are stored in the local cache as they + are encountered. + """ + while True: + # If we've cached some items that match the target value, emit + # the first one and evict it from the cache. + if self._cache[value]: + yield self._cache[value].popleft() + # Otherwise we need to advance the parent iterator to search for + # a matching item, caching the rest. + else: + while True: + try: + item = next(self._it) + except StopIteration: + return + item_value = self._key(item) + if item_value == value: + yield item + break + elif self._validator(item_value): + self._cache[item_value].append(item) + + def __iter__(self): + for item in self._it: + item_value = self._key(item) + if self._validator(item_value): + self._cache[item_value].append(item) + + return iter(self._cache) + + def __getitem__(self, value): + if not self._validator(value): + return iter(()) + + return self._get_values(value) + + +def spy(iterable, n=1): + """Return a 2-tuple with a list containing the first *n* elements of + *iterable*, and an iterator with the same items as *iterable*. + This allows you to "look ahead" at the items in the iterable without + advancing it. + + There is one item in the list by default: + + >>> iterable = 'abcdefg' + >>> head, iterable = spy(iterable) + >>> head + ['a'] + >>> list(iterable) + ['a', 'b', 'c', 'd', 'e', 'f', 'g'] + + You may use unpacking to retrieve items instead of lists: + + >>> (head,), iterable = spy('abcdefg') + >>> head + 'a' + >>> (first, second), iterable = spy('abcdefg', 2) + >>> first + 'a' + >>> second + 'b' + + The number of items requested can be larger than the number of items in + the iterable: + + >>> iterable = [1, 2, 3, 4, 5] + >>> head, iterable = spy(iterable, 10) + >>> head + [1, 2, 3, 4, 5] + >>> list(iterable) + [1, 2, 3, 4, 5] + + """ + p, q = tee(iterable) + return take(n, q), p + + +def interleave(*iterables): + """Return a new iterable yielding from each iterable in turn, + until the shortest is exhausted. + + >>> list(interleave([1, 2, 3], [4, 5], [6, 7, 8])) + [1, 4, 6, 2, 5, 7] + + For a version that doesn't terminate after the shortest iterable is + exhausted, see :func:`interleave_longest`. + + """ + return chain.from_iterable(zip(*iterables)) + + +def interleave_longest(*iterables): + """Return a new iterable yielding from each iterable in turn, + skipping any that are exhausted. + + >>> list(interleave_longest([1, 2, 3], [4, 5], [6, 7, 8])) + [1, 4, 6, 2, 5, 7, 3, 8] + + This function produces the same output as :func:`roundrobin`, but may + perform better for some inputs (in particular when the number of iterables + is large). + + """ + for xs in zip_longest(*iterables, fillvalue=_marker): + for x in xs: + if x is not _marker: + yield x + + +def interleave_evenly(iterables, lengths=None): + """ + Interleave multiple iterables so that their elements are evenly distributed + throughout the output sequence. + + >>> iterables = [1, 2, 3, 4, 5], ['a', 'b'] + >>> list(interleave_evenly(iterables)) + [1, 2, 'a', 3, 4, 'b', 5] + + >>> iterables = [[1, 2, 3], [4, 5], [6, 7, 8]] + >>> list(interleave_evenly(iterables)) + [1, 6, 4, 2, 7, 3, 8, 5] + + This function requires iterables of known length. Iterables without + ``__len__()`` can be used by manually specifying lengths with *lengths*: + + >>> from itertools import combinations, repeat + >>> iterables = [combinations(range(4), 2), ['a', 'b', 'c']] + >>> lengths = [4 * (4 - 1) // 2, 3] + >>> list(interleave_evenly(iterables, lengths=lengths)) + [(0, 1), (0, 2), 'a', (0, 3), (1, 2), 'b', (1, 3), (2, 3), 'c'] + + Based on Bresenham's algorithm. + """ + if lengths is None: + try: + lengths = [len(it) for it in iterables] + except TypeError: + raise ValueError( + 'Iterable lengths could not be determined automatically. ' + 'Specify them with the lengths keyword.' + ) + elif len(iterables) != len(lengths): + raise ValueError('Mismatching number of iterables and lengths.') + + dims = len(lengths) + + # sort iterables by length, descending + lengths_permute = sorted( + range(dims), key=lambda i: lengths[i], reverse=True + ) + lengths_desc = [lengths[i] for i in lengths_permute] + iters_desc = [iter(iterables[i]) for i in lengths_permute] + + # the longest iterable is the primary one (Bresenham: the longest + # distance along an axis) + delta_primary, deltas_secondary = lengths_desc[0], lengths_desc[1:] + iter_primary, iters_secondary = iters_desc[0], iters_desc[1:] + errors = [delta_primary // dims] * len(deltas_secondary) + + to_yield = sum(lengths) + while to_yield: + yield next(iter_primary) + to_yield -= 1 + # update errors for each secondary iterable + errors = [e - delta for e, delta in zip(errors, deltas_secondary)] + + # those iterables for which the error is negative are yielded + # ("diagonal step" in Bresenham) + for i, e_ in enumerate(errors): + if e_ < 0: + yield next(iters_secondary[i]) + to_yield -= 1 + errors[i] += delta_primary + + +def interleave_randomly(*iterables): + """Repeatedly select one of the input *iterables* at random and yield the next + item from it. + + >>> iterables = [1, 2, 3], 'abc', (True, False, None) + >>> list(interleave_randomly(*iterables)) # doctest: +SKIP + ['a', 'b', 1, 'c', True, False, None, 2, 3] + + The relative order of the items in each input iterable will preserved. Note the + sequences of items with this property are not equally likely to be generated. + + """ + iterators = [iter(e) for e in iterables] + while iterators: + idx = randrange(len(iterators)) + try: + yield next(iterators[idx]) + except StopIteration: + # equivalent to `list.pop` but slightly faster + iterators[idx] = iterators[-1] + del iterators[-1] + + +def collapse(iterable, base_type=None, levels=None): + """Flatten an iterable with multiple levels of nesting (e.g., a list of + lists of tuples) into non-iterable types. + + >>> iterable = [(1, 2), ([3, 4], [[5], [6]])] + >>> list(collapse(iterable)) + [1, 2, 3, 4, 5, 6] + + Binary and text strings are not considered iterable and + will not be collapsed. + + To avoid collapsing other types, specify *base_type*: + + >>> iterable = ['ab', ('cd', 'ef'), ['gh', 'ij']] + >>> list(collapse(iterable, base_type=tuple)) + ['ab', ('cd', 'ef'), 'gh', 'ij'] + + Specify *levels* to stop flattening after a certain level: + + >>> iterable = [('a', ['b']), ('c', ['d'])] + >>> list(collapse(iterable)) # Fully flattened + ['a', 'b', 'c', 'd'] + >>> list(collapse(iterable, levels=1)) # Only one level flattened + ['a', ['b'], 'c', ['d']] + + """ + stack = deque() + # Add our first node group, treat the iterable as a single node + stack.appendleft((0, repeat(iterable, 1))) + + while stack: + node_group = stack.popleft() + level, nodes = node_group + + # Check if beyond max level + if levels is not None and level > levels: + yield from nodes + continue + + for node in nodes: + # Check if done iterating + if isinstance(node, (str, bytes)) or ( + (base_type is not None) and isinstance(node, base_type) + ): + yield node + # Otherwise try to create child nodes + else: + try: + tree = iter(node) + except TypeError: + yield node + else: + # Save our current location + stack.appendleft(node_group) + # Append the new child node + stack.appendleft((level + 1, tree)) + # Break to process child node + break + + +def side_effect(func, iterable, chunk_size=None, before=None, after=None): + """Invoke *func* on each item in *iterable* (or on each *chunk_size* group + of items) before yielding the item. + + `func` must be a function that takes a single argument. Its return value + will be discarded. + + *before* and *after* are optional functions that take no arguments. They + will be executed before iteration starts and after it ends, respectively. + + `side_effect` can be used for logging, updating progress bars, or anything + that is not functionally "pure." + + Emitting a status message: + + >>> from more_itertools import consume + >>> func = lambda item: print('Received {}'.format(item)) + >>> consume(side_effect(func, range(2))) + Received 0 + Received 1 + + Operating on chunks of items: + + >>> pair_sums = [] + >>> func = lambda chunk: pair_sums.append(sum(chunk)) + >>> list(side_effect(func, [0, 1, 2, 3, 4, 5], 2)) + [0, 1, 2, 3, 4, 5] + >>> list(pair_sums) + [1, 5, 9] + + Writing to a file-like object: + + >>> from io import StringIO + >>> from more_itertools import consume + >>> f = StringIO() + >>> func = lambda x: print(x, file=f) + >>> before = lambda: print(u'HEADER', file=f) + >>> after = f.close + >>> it = [u'a', u'b', u'c'] + >>> consume(side_effect(func, it, before=before, after=after)) + >>> f.closed + True + + """ + try: + if before is not None: + before() + + if chunk_size is None: + for item in iterable: + func(item) + yield item + else: + for chunk in chunked(iterable, chunk_size): + func(chunk) + yield from chunk + finally: + if after is not None: + after() + + +def sliced(seq, n, strict=False): + """Yield slices of length *n* from the sequence *seq*. + + >>> list(sliced((1, 2, 3, 4, 5, 6), 3)) + [(1, 2, 3), (4, 5, 6)] + + By the default, the last yielded slice will have fewer than *n* elements + if the length of *seq* is not divisible by *n*: + + >>> list(sliced((1, 2, 3, 4, 5, 6, 7, 8), 3)) + [(1, 2, 3), (4, 5, 6), (7, 8)] + + If the length of *seq* is not divisible by *n* and *strict* is + ``True``, then ``ValueError`` will be raised before the last + slice is yielded. + + This function will only work for iterables that support slicing. + For non-sliceable iterables, see :func:`chunked`. + + """ + iterator = takewhile(len, (seq[i : i + n] for i in count(0, n))) + if strict: + + def ret(): + for _slice in iterator: + if len(_slice) != n: + raise ValueError("seq is not divisible by n.") + yield _slice + + return ret() + else: + return iterator + + +def split_at(iterable, pred, maxsplit=-1, keep_separator=False): + """Yield lists of items from *iterable*, where each list is delimited by + an item where callable *pred* returns ``True``. + + >>> list(split_at('abcdcba', lambda x: x == 'b')) + [['a'], ['c', 'd', 'c'], ['a']] + + >>> list(split_at(range(10), lambda n: n % 2 == 1)) + [[0], [2], [4], [6], [8], []] + + At most *maxsplit* splits are done. If *maxsplit* is not specified or -1, + then there is no limit on the number of splits: + + >>> list(split_at(range(10), lambda n: n % 2 == 1, maxsplit=2)) + [[0], [2], [4, 5, 6, 7, 8, 9]] + + By default, the delimiting items are not included in the output. + To include them, set *keep_separator* to ``True``. + + >>> list(split_at('abcdcba', lambda x: x == 'b', keep_separator=True)) + [['a'], ['b'], ['c', 'd', 'c'], ['b'], ['a']] + + """ + if maxsplit == 0: + yield list(iterable) + return + + buf = [] + it = iter(iterable) + for item in it: + if pred(item): + yield buf + if keep_separator: + yield [item] + if maxsplit == 1: + yield list(it) + return + buf = [] + maxsplit -= 1 + else: + buf.append(item) + yield buf + + +def split_before(iterable, pred, maxsplit=-1): + """Yield lists of items from *iterable*, where each list ends just before + an item for which callable *pred* returns ``True``: + + >>> list(split_before('OneTwo', lambda s: s.isupper())) + [['O', 'n', 'e'], ['T', 'w', 'o']] + + >>> list(split_before(range(10), lambda n: n % 3 == 0)) + [[0, 1, 2], [3, 4, 5], [6, 7, 8], [9]] + + At most *maxsplit* splits are done. If *maxsplit* is not specified or -1, + then there is no limit on the number of splits: + + >>> list(split_before(range(10), lambda n: n % 3 == 0, maxsplit=2)) + [[0, 1, 2], [3, 4, 5], [6, 7, 8, 9]] + """ + if maxsplit == 0: + yield list(iterable) + return + + buf = [] + it = iter(iterable) + for item in it: + if pred(item) and buf: + yield buf + if maxsplit == 1: + yield [item, *it] + return + buf = [] + maxsplit -= 1 + buf.append(item) + if buf: + yield buf + + +def split_after(iterable, pred, maxsplit=-1): + """Yield lists of items from *iterable*, where each list ends with an + item where callable *pred* returns ``True``: + + >>> list(split_after('one1two2', lambda s: s.isdigit())) + [['o', 'n', 'e', '1'], ['t', 'w', 'o', '2']] + + >>> list(split_after(range(10), lambda n: n % 3 == 0)) + [[0], [1, 2, 3], [4, 5, 6], [7, 8, 9]] + + At most *maxsplit* splits are done. If *maxsplit* is not specified or -1, + then there is no limit on the number of splits: + + >>> list(split_after(range(10), lambda n: n % 3 == 0, maxsplit=2)) + [[0], [1, 2, 3], [4, 5, 6, 7, 8, 9]] + + """ + if maxsplit == 0: + yield list(iterable) + return + + buf = [] + it = iter(iterable) + for item in it: + buf.append(item) + if pred(item) and buf: + yield buf + if maxsplit == 1: + buf = list(it) + if buf: + yield buf + return + buf = [] + maxsplit -= 1 + if buf: + yield buf + + +def split_when(iterable, pred, maxsplit=-1): + """Split *iterable* into pieces based on the output of *pred*. + *pred* should be a function that takes successive pairs of items and + returns ``True`` if the iterable should be split in between them. + + For example, to find runs of increasing numbers, split the iterable when + element ``i`` is larger than element ``i + 1``: + + >>> list(split_when([1, 2, 3, 3, 2, 5, 2, 4, 2], lambda x, y: x > y)) + [[1, 2, 3, 3], [2, 5], [2, 4], [2]] + + At most *maxsplit* splits are done. If *maxsplit* is not specified or -1, + then there is no limit on the number of splits: + + >>> list(split_when([1, 2, 3, 3, 2, 5, 2, 4, 2], + ... lambda x, y: x > y, maxsplit=2)) + [[1, 2, 3, 3], [2, 5], [2, 4, 2]] + + """ + if maxsplit == 0: + yield list(iterable) + return + + it = iter(iterable) + try: + cur_item = next(it) + except StopIteration: + return + + buf = [cur_item] + for next_item in it: + if pred(cur_item, next_item): + yield buf + if maxsplit == 1: + yield [next_item, *it] + return + buf = [] + maxsplit -= 1 + + buf.append(next_item) + cur_item = next_item + + yield buf + + +def split_into(iterable, sizes): + """Yield a list of sequential items from *iterable* of length 'n' for each + integer 'n' in *sizes*. + + >>> list(split_into([1,2,3,4,5,6], [1,2,3])) + [[1], [2, 3], [4, 5, 6]] + + If the sum of *sizes* is smaller than the length of *iterable*, then the + remaining items of *iterable* will not be returned. + + >>> list(split_into([1,2,3,4,5,6], [2,3])) + [[1, 2], [3, 4, 5]] + + If the sum of *sizes* is larger than the length of *iterable*, fewer items + will be returned in the iteration that overruns the *iterable* and further + lists will be empty: + + >>> list(split_into([1,2,3,4], [1,2,3,4])) + [[1], [2, 3], [4], []] + + When a ``None`` object is encountered in *sizes*, the returned list will + contain items up to the end of *iterable* the same way that + :func:`itertools.slice` does: + + >>> list(split_into([1,2,3,4,5,6,7,8,9,0], [2,3,None])) + [[1, 2], [3, 4, 5], [6, 7, 8, 9, 0]] + + :func:`split_into` can be useful for grouping a series of items where the + sizes of the groups are not uniform. An example would be where in a row + from a table, multiple columns represent elements of the same feature + (e.g. a point represented by x,y,z) but, the format is not the same for + all columns. + """ + # convert the iterable argument into an iterator so its contents can + # be consumed by islice in case it is a generator + it = iter(iterable) + + for size in sizes: + if size is None: + yield list(it) + return + else: + yield list(islice(it, size)) + + +def padded(iterable, fillvalue=None, n=None, next_multiple=False): + """Yield the elements from *iterable*, followed by *fillvalue*, such that + at least *n* items are emitted. + + >>> list(padded([1, 2, 3], '?', 5)) + [1, 2, 3, '?', '?'] + + If *next_multiple* is ``True``, *fillvalue* will be emitted until the + number of items emitted is a multiple of *n*: + + >>> list(padded([1, 2, 3, 4], n=3, next_multiple=True)) + [1, 2, 3, 4, None, None] + + If *n* is ``None``, *fillvalue* will be emitted indefinitely. + + To create an *iterable* of exactly size *n*, you can truncate with + :func:`islice`. + + >>> list(islice(padded([1, 2, 3], '?'), 5)) + [1, 2, 3, '?', '?'] + >>> list(islice(padded([1, 2, 3, 4, 5, 6, 7, 8], '?'), 5)) + [1, 2, 3, 4, 5] + + """ + iterator = iter(iterable) + iterator_with_repeat = chain(iterator, repeat(fillvalue)) + + if n is None: + return iterator_with_repeat + elif n < 1: + raise ValueError('n must be at least 1') + elif next_multiple: + + def slice_generator(): + for first in iterator: + yield (first,) + yield islice(iterator_with_repeat, n - 1) + + # While elements exist produce slices of size n + return chain.from_iterable(slice_generator()) + else: + # Ensure the first batch is at least size n then iterate + return chain(islice(iterator_with_repeat, n), iterator) + + +def repeat_each(iterable, n=2): + """Repeat each element in *iterable* *n* times. + + >>> list(repeat_each('ABC', 3)) + ['A', 'A', 'A', 'B', 'B', 'B', 'C', 'C', 'C'] + """ + return chain.from_iterable(map(repeat, iterable, repeat(n))) + + +def repeat_last(iterable, default=None): + """After the *iterable* is exhausted, keep yielding its last element. + + >>> list(islice(repeat_last(range(3)), 5)) + [0, 1, 2, 2, 2] + + If the iterable is empty, yield *default* forever:: + + >>> list(islice(repeat_last(range(0), 42), 5)) + [42, 42, 42, 42, 42] + + """ + item = _marker + for item in iterable: + yield item + final = default if item is _marker else item + yield from repeat(final) + + +def distribute(n, iterable): + """Distribute the items from *iterable* among *n* smaller iterables. + + >>> group_1, group_2 = distribute(2, [1, 2, 3, 4, 5, 6]) + >>> list(group_1) + [1, 3, 5] + >>> list(group_2) + [2, 4, 6] + + If the length of *iterable* is not evenly divisible by *n*, then the + length of the returned iterables will not be identical: + + >>> children = distribute(3, [1, 2, 3, 4, 5, 6, 7]) + >>> [list(c) for c in children] + [[1, 4, 7], [2, 5], [3, 6]] + + If the length of *iterable* is smaller than *n*, then the last returned + iterables will be empty: + + >>> children = distribute(5, [1, 2, 3]) + >>> [list(c) for c in children] + [[1], [2], [3], [], []] + + This function uses :func:`itertools.tee` and may require significant + storage. + + If you need the order items in the smaller iterables to match the + original iterable, see :func:`divide`. + + """ + if n < 1: + raise ValueError('n must be at least 1') + + children = tee(iterable, n) + return [islice(it, index, None, n) for index, it in enumerate(children)] + + +def stagger(iterable, offsets=(-1, 0, 1), longest=False, fillvalue=None): + """Yield tuples whose elements are offset from *iterable*. + The amount by which the `i`-th item in each tuple is offset is given by + the `i`-th item in *offsets*. + + >>> list(stagger([0, 1, 2, 3])) + [(None, 0, 1), (0, 1, 2), (1, 2, 3)] + >>> list(stagger(range(8), offsets=(0, 2, 4))) + [(0, 2, 4), (1, 3, 5), (2, 4, 6), (3, 5, 7)] + + By default, the sequence will end when the final element of a tuple is the + last item in the iterable. To continue until the first element of a tuple + is the last item in the iterable, set *longest* to ``True``:: + + >>> list(stagger([0, 1, 2, 3], longest=True)) + [(None, 0, 1), (0, 1, 2), (1, 2, 3), (2, 3, None), (3, None, None)] + + By default, ``None`` will be used to replace offsets beyond the end of the + sequence. Specify *fillvalue* to use some other value. + + """ + children = tee(iterable, len(offsets)) + + return zip_offset( + *children, offsets=offsets, longest=longest, fillvalue=fillvalue + ) + + +def zip_equal(*iterables): + """``zip`` the input *iterables* together but raise + ``UnequalIterablesError`` if they aren't all the same length. + + >>> it_1 = range(3) + >>> it_2 = iter('abc') + >>> list(zip_equal(it_1, it_2)) + [(0, 'a'), (1, 'b'), (2, 'c')] + + >>> it_1 = range(3) + >>> it_2 = iter('abcd') + >>> list(zip_equal(it_1, it_2)) # doctest: +IGNORE_EXCEPTION_DETAIL + Traceback (most recent call last): + ... + more_itertools.more.UnequalIterablesError: Iterables have different + lengths + + """ + if hexversion >= 0x30A00A6: + warnings.warn( + ( + 'zip_equal will be removed in a future version of ' + 'more-itertools. Use the builtin zip function with ' + 'strict=True instead.' + ), + DeprecationWarning, + ) + + return _zip_equal(*iterables) + + +def zip_offset(*iterables, offsets, longest=False, fillvalue=None): + """``zip`` the input *iterables* together, but offset the `i`-th iterable + by the `i`-th item in *offsets*. + + >>> list(zip_offset('0123', 'abcdef', offsets=(0, 1))) + [('0', 'b'), ('1', 'c'), ('2', 'd'), ('3', 'e')] + + This can be used as a lightweight alternative to SciPy or pandas to analyze + data sets in which some series have a lead or lag relationship. + + By default, the sequence will end when the shortest iterable is exhausted. + To continue until the longest iterable is exhausted, set *longest* to + ``True``. + + >>> list(zip_offset('0123', 'abcdef', offsets=(0, 1), longest=True)) + [('0', 'b'), ('1', 'c'), ('2', 'd'), ('3', 'e'), (None, 'f')] + + By default, ``None`` will be used to replace offsets beyond the end of the + sequence. Specify *fillvalue* to use some other value. + + """ + if len(iterables) != len(offsets): + raise ValueError("Number of iterables and offsets didn't match") + + staggered = [] + for it, n in zip(iterables, offsets): + if n < 0: + staggered.append(chain(repeat(fillvalue, -n), it)) + elif n > 0: + staggered.append(islice(it, n, None)) + else: + staggered.append(it) + + if longest: + return zip_longest(*staggered, fillvalue=fillvalue) + + return zip(*staggered) + + +def sort_together( + iterables, key_list=(0,), key=None, reverse=False, strict=False +): + """Return the input iterables sorted together, with *key_list* as the + priority for sorting. All iterables are trimmed to the length of the + shortest one. + + This can be used like the sorting function in a spreadsheet. If each + iterable represents a column of data, the key list determines which + columns are used for sorting. + + By default, all iterables are sorted using the ``0``-th iterable:: + + >>> iterables = [(4, 3, 2, 1), ('a', 'b', 'c', 'd')] + >>> sort_together(iterables) + [(1, 2, 3, 4), ('d', 'c', 'b', 'a')] + + Set a different key list to sort according to another iterable. + Specifying multiple keys dictates how ties are broken:: + + >>> iterables = [(3, 1, 2), (0, 1, 0), ('c', 'b', 'a')] + >>> sort_together(iterables, key_list=(1, 2)) + [(2, 3, 1), (0, 0, 1), ('a', 'c', 'b')] + + To sort by a function of the elements of the iterable, pass a *key* + function. Its arguments are the elements of the iterables corresponding to + the key list:: + + >>> names = ('a', 'b', 'c') + >>> lengths = (1, 2, 3) + >>> widths = (5, 2, 1) + >>> def area(length, width): + ... return length * width + >>> sort_together([names, lengths, widths], key_list=(1, 2), key=area) + [('c', 'b', 'a'), (3, 2, 1), (1, 2, 5)] + + Set *reverse* to ``True`` to sort in descending order. + + >>> sort_together([(1, 2, 3), ('c', 'b', 'a')], reverse=True) + [(3, 2, 1), ('a', 'b', 'c')] + + If the *strict* keyword argument is ``True``, then + ``UnequalIterablesError`` will be raised if any of the iterables have + different lengths. + + """ + if key is None: + # if there is no key function, the key argument to sorted is an + # itemgetter + key_argument = itemgetter(*key_list) + else: + # if there is a key function, call it with the items at the offsets + # specified by the key function as arguments + key_list = list(key_list) + if len(key_list) == 1: + # if key_list contains a single item, pass the item at that offset + # as the only argument to the key function + key_offset = key_list[0] + key_argument = lambda zipped_items: key(zipped_items[key_offset]) + else: + # if key_list contains multiple items, use itemgetter to return a + # tuple of items, which we pass as *args to the key function + get_key_items = itemgetter(*key_list) + key_argument = lambda zipped_items: key( + *get_key_items(zipped_items) + ) + + zipper = zip_equal if strict else zip + return list( + zipper(*sorted(zipper(*iterables), key=key_argument, reverse=reverse)) + ) + + +def unzip(iterable): + """The inverse of :func:`zip`, this function disaggregates the elements + of the zipped *iterable*. + + The ``i``-th iterable contains the ``i``-th element from each element + of the zipped iterable. The first element is used to determine the + length of the remaining elements. + + >>> iterable = [('a', 1), ('b', 2), ('c', 3), ('d', 4)] + >>> letters, numbers = unzip(iterable) + >>> list(letters) + ['a', 'b', 'c', 'd'] + >>> list(numbers) + [1, 2, 3, 4] + + This is similar to using ``zip(*iterable)``, but it avoids reading + *iterable* into memory. Note, however, that this function uses + :func:`itertools.tee` and thus may require significant storage. + + """ + head, iterable = spy(iterable) + if not head: + # empty iterable, e.g. zip([], [], []) + return () + # spy returns a one-length iterable as head + head = head[0] + iterables = tee(iterable, len(head)) + + # If we have an iterable like iter([(1, 2, 3), (4, 5), (6,)]), + # the second unzipped iterable fails at the third tuple since + # it tries to access (6,)[1]. + # Same with the third unzipped iterable and the second tuple. + # To support these "improperly zipped" iterables, we suppress + # the IndexError, which just stops the unzipped iterables at + # first length mismatch. + return tuple( + iter_suppress(map(itemgetter(i), it), IndexError) + for i, it in enumerate(iterables) + ) + + +def divide(n, iterable): + """Divide the elements from *iterable* into *n* parts, maintaining + order. + + >>> group_1, group_2 = divide(2, [1, 2, 3, 4, 5, 6]) + >>> list(group_1) + [1, 2, 3] + >>> list(group_2) + [4, 5, 6] + + If the length of *iterable* is not evenly divisible by *n*, then the + length of the returned iterables will not be identical: + + >>> children = divide(3, [1, 2, 3, 4, 5, 6, 7]) + >>> [list(c) for c in children] + [[1, 2, 3], [4, 5], [6, 7]] + + If the length of the iterable is smaller than n, then the last returned + iterables will be empty: + + >>> children = divide(5, [1, 2, 3]) + >>> [list(c) for c in children] + [[1], [2], [3], [], []] + + This function will exhaust the iterable before returning. + If order is not important, see :func:`distribute`, which does not first + pull the iterable into memory. + + """ + if n < 1: + raise ValueError('n must be at least 1') + + try: + iterable[:0] + except TypeError: + seq = tuple(iterable) + else: + seq = iterable + + q, r = divmod(len(seq), n) + + ret = [] + stop = 0 + for i in range(1, n + 1): + start = stop + stop += q + 1 if i <= r else q + ret.append(iter(seq[start:stop])) + + return ret + + +def always_iterable(obj, base_type=(str, bytes)): + """If *obj* is iterable, return an iterator over its items:: + + >>> obj = (1, 2, 3) + >>> list(always_iterable(obj)) + [1, 2, 3] + + If *obj* is not iterable, return a one-item iterable containing *obj*:: + + >>> obj = 1 + >>> list(always_iterable(obj)) + [1] + + If *obj* is ``None``, return an empty iterable: + + >>> obj = None + >>> list(always_iterable(None)) + [] + + By default, binary and text strings are not considered iterable:: + + >>> obj = 'foo' + >>> list(always_iterable(obj)) + ['foo'] + + If *base_type* is set, objects for which ``isinstance(obj, base_type)`` + returns ``True`` won't be considered iterable. + + >>> obj = {'a': 1} + >>> list(always_iterable(obj)) # Iterate over the dict's keys + ['a'] + >>> list(always_iterable(obj, base_type=dict)) # Treat dicts as a unit + [{'a': 1}] + + Set *base_type* to ``None`` to avoid any special handling and treat objects + Python considers iterable as iterable: + + >>> obj = 'foo' + >>> list(always_iterable(obj, base_type=None)) + ['f', 'o', 'o'] + """ + if obj is None: + return iter(()) + + if (base_type is not None) and isinstance(obj, base_type): + return iter((obj,)) + + try: + return iter(obj) + except TypeError: + return iter((obj,)) + + +def adjacent(predicate, iterable, distance=1): + """Return an iterable over `(bool, item)` tuples where the `item` is + drawn from *iterable* and the `bool` indicates whether + that item satisfies the *predicate* or is adjacent to an item that does. + + For example, to find whether items are adjacent to a ``3``:: + + >>> list(adjacent(lambda x: x == 3, range(6))) + [(False, 0), (False, 1), (True, 2), (True, 3), (True, 4), (False, 5)] + + Set *distance* to change what counts as adjacent. For example, to find + whether items are two places away from a ``3``: + + >>> list(adjacent(lambda x: x == 3, range(6), distance=2)) + [(False, 0), (True, 1), (True, 2), (True, 3), (True, 4), (True, 5)] + + This is useful for contextualizing the results of a search function. + For example, a code comparison tool might want to identify lines that + have changed, but also surrounding lines to give the viewer of the diff + context. + + The predicate function will only be called once for each item in the + iterable. + + See also :func:`groupby_transform`, which can be used with this function + to group ranges of items with the same `bool` value. + + """ + # Allow distance=0 mainly for testing that it reproduces results with map() + if distance < 0: + raise ValueError('distance must be at least 0') + + i1, i2 = tee(iterable) + padding = [False] * distance + selected = chain(padding, map(predicate, i1), padding) + adjacent_to_selected = map(any, windowed(selected, 2 * distance + 1)) + return zip(adjacent_to_selected, i2) + + +def groupby_transform(iterable, keyfunc=None, valuefunc=None, reducefunc=None): + """An extension of :func:`itertools.groupby` that can apply transformations + to the grouped data. + + * *keyfunc* is a function computing a key value for each item in *iterable* + * *valuefunc* is a function that transforms the individual items from + *iterable* after grouping + * *reducefunc* is a function that transforms each group of items + + >>> iterable = 'aAAbBBcCC' + >>> keyfunc = lambda k: k.upper() + >>> valuefunc = lambda v: v.lower() + >>> reducefunc = lambda g: ''.join(g) + >>> list(groupby_transform(iterable, keyfunc, valuefunc, reducefunc)) + [('A', 'aaa'), ('B', 'bbb'), ('C', 'ccc')] + + Each optional argument defaults to an identity function if not specified. + + :func:`groupby_transform` is useful when grouping elements of an iterable + using a separate iterable as the key. To do this, :func:`zip` the iterables + and pass a *keyfunc* that extracts the first element and a *valuefunc* + that extracts the second element:: + + >>> from operator import itemgetter + >>> keys = [0, 0, 1, 1, 1, 2, 2, 2, 3] + >>> values = 'abcdefghi' + >>> iterable = zip(keys, values) + >>> grouper = groupby_transform(iterable, itemgetter(0), itemgetter(1)) + >>> [(k, ''.join(g)) for k, g in grouper] + [(0, 'ab'), (1, 'cde'), (2, 'fgh'), (3, 'i')] + + Note that the order of items in the iterable is significant. + Only adjacent items are grouped together, so if you don't want any + duplicate groups, you should sort the iterable by the key function. + + """ + ret = groupby(iterable, keyfunc) + if valuefunc: + ret = ((k, map(valuefunc, g)) for k, g in ret) + if reducefunc: + ret = ((k, reducefunc(g)) for k, g in ret) + + return ret + + +class numeric_range(abc.Sequence, abc.Hashable): + """An extension of the built-in ``range()`` function whose arguments can + be any orderable numeric type. + + With only *stop* specified, *start* defaults to ``0`` and *step* + defaults to ``1``. The output items will match the type of *stop*: + + >>> list(numeric_range(3.5)) + [0.0, 1.0, 2.0, 3.0] + + With only *start* and *stop* specified, *step* defaults to ``1``. The + output items will match the type of *start*: + + >>> from decimal import Decimal + >>> start = Decimal('2.1') + >>> stop = Decimal('5.1') + >>> list(numeric_range(start, stop)) + [Decimal('2.1'), Decimal('3.1'), Decimal('4.1')] + + With *start*, *stop*, and *step* specified the output items will match + the type of ``start + step``: + + >>> from fractions import Fraction + >>> start = Fraction(1, 2) # Start at 1/2 + >>> stop = Fraction(5, 2) # End at 5/2 + >>> step = Fraction(1, 2) # Count by 1/2 + >>> list(numeric_range(start, stop, step)) + [Fraction(1, 2), Fraction(1, 1), Fraction(3, 2), Fraction(2, 1)] + + If *step* is zero, ``ValueError`` is raised. Negative steps are supported: + + >>> list(numeric_range(3, -1, -1.0)) + [3.0, 2.0, 1.0, 0.0] + + Be aware of the limitations of floating-point numbers; the representation + of the yielded numbers may be surprising. + + ``datetime.datetime`` objects can be used for *start* and *stop*, if *step* + is a ``datetime.timedelta`` object: + + >>> import datetime + >>> start = datetime.datetime(2019, 1, 1) + >>> stop = datetime.datetime(2019, 1, 3) + >>> step = datetime.timedelta(days=1) + >>> items = iter(numeric_range(start, stop, step)) + >>> next(items) + datetime.datetime(2019, 1, 1, 0, 0) + >>> next(items) + datetime.datetime(2019, 1, 2, 0, 0) + + """ + + _EMPTY_HASH = hash(range(0, 0)) + + def __init__(self, *args): + argc = len(args) + if argc == 1: + (self._stop,) = args + self._start = type(self._stop)(0) + self._step = type(self._stop - self._start)(1) + elif argc == 2: + self._start, self._stop = args + self._step = type(self._stop - self._start)(1) + elif argc == 3: + self._start, self._stop, self._step = args + elif argc == 0: + raise TypeError( + f'numeric_range expected at least 1 argument, got {argc}' + ) + else: + raise TypeError( + f'numeric_range expected at most 3 arguments, got {argc}' + ) + + self._zero = type(self._step)(0) + if self._step == self._zero: + raise ValueError('numeric_range() arg 3 must not be zero') + self._growing = self._step > self._zero + + def __bool__(self): + if self._growing: + return self._start < self._stop + else: + return self._start > self._stop + + def __contains__(self, elem): + if self._growing: + if self._start <= elem < self._stop: + return (elem - self._start) % self._step == self._zero + else: + if self._start >= elem > self._stop: + return (self._start - elem) % (-self._step) == self._zero + + return False + + def __eq__(self, other): + if isinstance(other, numeric_range): + empty_self = not bool(self) + empty_other = not bool(other) + if empty_self or empty_other: + return empty_self and empty_other # True if both empty + else: + return ( + self._start == other._start + and self._step == other._step + and self._get_by_index(-1) == other._get_by_index(-1) + ) + else: + return False + + def __getitem__(self, key): + if isinstance(key, int): + return self._get_by_index(key) + elif isinstance(key, slice): + step = self._step if key.step is None else key.step * self._step + + if key.start is None or key.start <= -self._len: + start = self._start + elif key.start >= self._len: + start = self._stop + else: # -self._len < key.start < self._len + start = self._get_by_index(key.start) + + if key.stop is None or key.stop >= self._len: + stop = self._stop + elif key.stop <= -self._len: + stop = self._start + else: # -self._len < key.stop < self._len + stop = self._get_by_index(key.stop) + + return numeric_range(start, stop, step) + else: + raise TypeError( + 'numeric range indices must be ' + f'integers or slices, not {type(key).__name__}' + ) + + def __hash__(self): + if self: + return hash((self._start, self._get_by_index(-1), self._step)) + else: + return self._EMPTY_HASH + + def __iter__(self): + values = (self._start + (n * self._step) for n in count()) + if self._growing: + return takewhile(partial(gt, self._stop), values) + else: + return takewhile(partial(lt, self._stop), values) + + def __len__(self): + return self._len + + @cached_property + def _len(self): + if self._growing: + start = self._start + stop = self._stop + step = self._step + else: + start = self._stop + stop = self._start + step = -self._step + distance = stop - start + if distance <= self._zero: + return 0 + else: # distance > 0 and step > 0: regular euclidean division + q, r = divmod(distance, step) + return int(q) + int(r != self._zero) + + def __reduce__(self): + return numeric_range, (self._start, self._stop, self._step) + + def __repr__(self): + if self._step == 1: + return f"numeric_range({self._start!r}, {self._stop!r})" + return ( + f"numeric_range({self._start!r}, {self._stop!r}, {self._step!r})" + ) + + def __reversed__(self): + return iter( + numeric_range( + self._get_by_index(-1), self._start - self._step, -self._step + ) + ) + + def count(self, value): + return int(value in self) + + def index(self, value): + if self._growing: + if self._start <= value < self._stop: + q, r = divmod(value - self._start, self._step) + if r == self._zero: + return int(q) + else: + if self._start >= value > self._stop: + q, r = divmod(self._start - value, -self._step) + if r == self._zero: + return int(q) + + raise ValueError(f"{value} is not in numeric range") + + def _get_by_index(self, i): + if i < 0: + i += self._len + if i < 0 or i >= self._len: + raise IndexError("numeric range object index out of range") + return self._start + i * self._step + + +def count_cycle(iterable, n=None): + """Cycle through the items from *iterable* up to *n* times, yielding + the number of completed cycles along with each item. If *n* is omitted the + process repeats indefinitely. + + >>> list(count_cycle('AB', 3)) + [(0, 'A'), (0, 'B'), (1, 'A'), (1, 'B'), (2, 'A'), (2, 'B')] + + """ + seq = tuple(iterable) + if not seq: + return iter(()) + counter = count() if n is None else range(n) + return zip(repeat_each(counter, len(seq)), cycle(seq)) + + +def mark_ends(iterable): + """Yield 3-tuples of the form ``(is_first, is_last, item)``. + + >>> list(mark_ends('ABC')) + [(True, False, 'A'), (False, False, 'B'), (False, True, 'C')] + + Use this when looping over an iterable to take special action on its first + and/or last items: + + >>> iterable = ['Header', 100, 200, 'Footer'] + >>> total = 0 + >>> for is_first, is_last, item in mark_ends(iterable): + ... if is_first: + ... continue # Skip the header + ... if is_last: + ... continue # Skip the footer + ... total += item + >>> print(total) + 300 + """ + it = iter(iterable) + for a in it: + first = True + for b in it: + yield first, False, a + a = b + first = False + yield first, True, a + + +def locate(iterable, pred=bool, window_size=None): + """Yield the index of each item in *iterable* for which *pred* returns + ``True``. + + *pred* defaults to :func:`bool`, which will select truthy items: + + >>> list(locate([0, 1, 1, 0, 1, 0, 0])) + [1, 2, 4] + + Set *pred* to a custom function to, e.g., find the indexes for a particular + item. + + >>> list(locate(['a', 'b', 'c', 'b'], lambda x: x == 'b')) + [1, 3] + + If *window_size* is given, then the *pred* function will be called with + that many items. This enables searching for sub-sequences: + + >>> iterable = [0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3] + >>> pred = lambda *args: args == (1, 2, 3) + >>> list(locate(iterable, pred=pred, window_size=3)) + [1, 5, 9] + + Use with :func:`seekable` to find indexes and then retrieve the associated + items: + + >>> from itertools import count + >>> from more_itertools import seekable + >>> source = (3 * n + 1 if (n % 2) else n // 2 for n in count()) + >>> it = seekable(source) + >>> pred = lambda x: x > 100 + >>> indexes = locate(it, pred=pred) + >>> i = next(indexes) + >>> it.seek(i) + >>> next(it) + 106 + + """ + if window_size is None: + return compress(count(), map(pred, iterable)) + + if window_size < 1: + raise ValueError('window size must be at least 1') + + it = windowed(iterable, window_size, fillvalue=_marker) + return compress(count(), starmap(pred, it)) + + +def longest_common_prefix(iterables): + """Yield elements of the longest common prefix among given *iterables*. + + >>> ''.join(longest_common_prefix(['abcd', 'abc', 'abf'])) + 'ab' + + """ + return (c[0] for c in takewhile(all_equal, zip(*iterables))) + + +def lstrip(iterable, pred): + """Yield the items from *iterable*, but strip any from the beginning + for which *pred* returns ``True``. + + For example, to remove a set of items from the start of an iterable: + + >>> iterable = (None, False, None, 1, 2, None, 3, False, None) + >>> pred = lambda x: x in {None, False, ''} + >>> list(lstrip(iterable, pred)) + [1, 2, None, 3, False, None] + + This function is analogous to to :func:`str.lstrip`, and is essentially + an wrapper for :func:`itertools.dropwhile`. + + """ + return dropwhile(pred, iterable) + + +def rstrip(iterable, pred): + """Yield the items from *iterable*, but strip any from the end + for which *pred* returns ``True``. + + For example, to remove a set of items from the end of an iterable: + + >>> iterable = (None, False, None, 1, 2, None, 3, False, None) + >>> pred = lambda x: x in {None, False, ''} + >>> list(rstrip(iterable, pred)) + [None, False, None, 1, 2, None, 3] + + This function is analogous to :func:`str.rstrip`. + + """ + cache = [] + cache_append = cache.append + cache_clear = cache.clear + for x in iterable: + if pred(x): + cache_append(x) + else: + yield from cache + cache_clear() + yield x + + +def strip(iterable, pred): + """Yield the items from *iterable*, but strip any from the + beginning and end for which *pred* returns ``True``. + + For example, to remove a set of items from both ends of an iterable: + + >>> iterable = (None, False, None, 1, 2, None, 3, False, None) + >>> pred = lambda x: x in {None, False, ''} + >>> list(strip(iterable, pred)) + [1, 2, None, 3] + + This function is analogous to :func:`str.strip`. + + """ + return rstrip(lstrip(iterable, pred), pred) + + +class islice_extended: + """An extension of :func:`itertools.islice` that supports negative values + for *stop*, *start*, and *step*. + + >>> iterator = iter('abcdefgh') + >>> list(islice_extended(iterator, -4, -1)) + ['e', 'f', 'g'] + + Slices with negative values require some caching of *iterable*, but this + function takes care to minimize the amount of memory required. + + For example, you can use a negative step with an infinite iterator: + + >>> from itertools import count + >>> list(islice_extended(count(), 110, 99, -2)) + [110, 108, 106, 104, 102, 100] + + You can also use slice notation directly: + + >>> iterator = map(str, count()) + >>> it = islice_extended(iterator)[10:20:2] + >>> list(it) + ['10', '12', '14', '16', '18'] + + """ + + def __init__(self, iterable, *args): + it = iter(iterable) + if args: + self._iterator = _islice_helper(it, slice(*args)) + else: + self._iterator = it + + def __iter__(self): + return self + + def __next__(self): + return next(self._iterator) + + def __getitem__(self, key): + if isinstance(key, slice): + return islice_extended(_islice_helper(self._iterator, key)) + + raise TypeError('islice_extended.__getitem__ argument must be a slice') + + +def _islice_helper(it, s): + start = s.start + stop = s.stop + if s.step == 0: + raise ValueError('step argument must be a non-zero integer or None.') + step = s.step or 1 + + if step > 0: + start = 0 if (start is None) else start + + if start < 0: + # Consume all but the last -start items + cache = deque(enumerate(it, 1), maxlen=-start) + len_iter = cache[-1][0] if cache else 0 + + # Adjust start to be positive + i = max(len_iter + start, 0) + + # Adjust stop to be positive + if stop is None: + j = len_iter + elif stop >= 0: + j = min(stop, len_iter) + else: + j = max(len_iter + stop, 0) + + # Slice the cache + n = j - i + if n <= 0: + return + + for index in range(n): + if index % step == 0: + # pop and yield the item. + # We don't want to use an intermediate variable + # it would extend the lifetime of the current item + yield cache.popleft()[1] + else: + # just pop and discard the item + cache.popleft() + elif (stop is not None) and (stop < 0): + # Advance to the start position + next(islice(it, start, start), None) + + # When stop is negative, we have to carry -stop items while + # iterating + cache = deque(islice(it, -stop), maxlen=-stop) + + for index, item in enumerate(it): + if index % step == 0: + # pop and yield the item. + # We don't want to use an intermediate variable + # it would extend the lifetime of the current item + yield cache.popleft() + else: + # just pop and discard the item + cache.popleft() + cache.append(item) + else: + # When both start and stop are positive we have the normal case + yield from islice(it, start, stop, step) + else: + start = -1 if (start is None) else start + + if (stop is not None) and (stop < 0): + # Consume all but the last items + n = -stop - 1 + cache = deque(enumerate(it, 1), maxlen=n) + len_iter = cache[-1][0] if cache else 0 + + # If start and stop are both negative they are comparable and + # we can just slice. Otherwise we can adjust start to be negative + # and then slice. + if start < 0: + i, j = start, stop + else: + i, j = min(start - len_iter, -1), None + + for index, item in list(cache)[i:j:step]: + yield item + else: + # Advance to the stop position + if stop is not None: + m = stop + 1 + next(islice(it, m, m), None) + + # stop is positive, so if start is negative they are not comparable + # and we need the rest of the items. + if start < 0: + i = start + n = None + # stop is None and start is positive, so we just need items up to + # the start index. + elif stop is None: + i = None + n = start + 1 + # Both stop and start are positive, so they are comparable. + else: + i = None + n = start - stop + if n <= 0: + return + + cache = list(islice(it, n)) + + yield from cache[i::step] + + +def always_reversible(iterable): + """An extension of :func:`reversed` that supports all iterables, not + just those which implement the ``Reversible`` or ``Sequence`` protocols. + + >>> print(*always_reversible(x for x in range(3))) + 2 1 0 + + If the iterable is already reversible, this function returns the + result of :func:`reversed()`. If the iterable is not reversible, + this function will cache the remaining items in the iterable and + yield them in reverse order, which may require significant storage. + """ + try: + return reversed(iterable) + except TypeError: + return reversed(list(iterable)) + + +def consecutive_groups(iterable, ordering=None): + """Yield groups of consecutive items using :func:`itertools.groupby`. + The *ordering* function determines whether two items are adjacent by + returning their position. + + By default, the ordering function is the identity function. This is + suitable for finding runs of numbers: + + >>> iterable = [1, 10, 11, 12, 20, 30, 31, 32, 33, 40] + >>> for group in consecutive_groups(iterable): + ... print(list(group)) + [1] + [10, 11, 12] + [20] + [30, 31, 32, 33] + [40] + + To find runs of adjacent letters, apply :func:`ord` function + to convert letters to ordinals. + + >>> iterable = 'abcdfgilmnop' + >>> ordering = ord + >>> for group in consecutive_groups(iterable, ordering): + ... print(list(group)) + ['a', 'b', 'c', 'd'] + ['f', 'g'] + ['i'] + ['l', 'm', 'n', 'o', 'p'] + + Each group of consecutive items is an iterator that shares it source with + *iterable*. When an an output group is advanced, the previous group is + no longer available unless its elements are copied (e.g., into a ``list``). + + >>> iterable = [1, 2, 11, 12, 21, 22] + >>> saved_groups = [] + >>> for group in consecutive_groups(iterable): + ... saved_groups.append(list(group)) # Copy group elements + >>> saved_groups + [[1, 2], [11, 12], [21, 22]] + + """ + if ordering is None: + key = lambda x: x[0] - x[1] + else: + key = lambda x: x[0] - ordering(x[1]) + + for k, g in groupby(enumerate(iterable), key=key): + yield map(itemgetter(1), g) + + +def difference(iterable, func=sub, *, initial=None): + """This function is the inverse of :func:`itertools.accumulate`. By default + it will compute the first difference of *iterable* using + :func:`operator.sub`: + + >>> from itertools import accumulate + >>> iterable = accumulate([0, 1, 2, 3, 4]) # produces 0, 1, 3, 6, 10 + >>> list(difference(iterable)) + [0, 1, 2, 3, 4] + + *func* defaults to :func:`operator.sub`, but other functions can be + specified. They will be applied as follows:: + + A, B, C, D, ... --> A, func(B, A), func(C, B), func(D, C), ... + + For example, to do progressive division: + + >>> iterable = [1, 2, 6, 24, 120] + >>> func = lambda x, y: x // y + >>> list(difference(iterable, func)) + [1, 2, 3, 4, 5] + + If the *initial* keyword is set, the first element will be skipped when + computing successive differences. + + >>> it = [10, 11, 13, 16] # from accumulate([1, 2, 3], initial=10) + >>> list(difference(it, initial=10)) + [1, 2, 3] + + """ + a, b = tee(iterable) + try: + first = [next(b)] + except StopIteration: + return iter([]) + + if initial is not None: + first = [] + + return chain(first, map(func, b, a)) + + +class SequenceView(Sequence): + """Return a read-only view of the sequence object *target*. + + :class:`SequenceView` objects are analogous to Python's built-in + "dictionary view" types. They provide a dynamic view of a sequence's items, + meaning that when the sequence updates, so does the view. + + >>> seq = ['0', '1', '2'] + >>> view = SequenceView(seq) + >>> view + SequenceView(['0', '1', '2']) + >>> seq.append('3') + >>> view + SequenceView(['0', '1', '2', '3']) + + Sequence views support indexing, slicing, and length queries. They act + like the underlying sequence, except they don't allow assignment: + + >>> view[1] + '1' + >>> view[1:-1] + ['1', '2'] + >>> len(view) + 4 + + Sequence views are useful as an alternative to copying, as they don't + require (much) extra storage. + + """ + + def __init__(self, target): + if not isinstance(target, Sequence): + raise TypeError + self._target = target + + def __getitem__(self, index): + return self._target[index] + + def __len__(self): + return len(self._target) + + def __repr__(self): + return f'{self.__class__.__name__}({self._target!r})' + + +class seekable: + """Wrap an iterator to allow for seeking backward and forward. This + progressively caches the items in the source iterable so they can be + re-visited. + + Call :meth:`seek` with an index to seek to that position in the source + iterable. + + To "reset" an iterator, seek to ``0``: + + >>> from itertools import count + >>> it = seekable((str(n) for n in count())) + >>> next(it), next(it), next(it) + ('0', '1', '2') + >>> it.seek(0) + >>> next(it), next(it), next(it) + ('0', '1', '2') + + You can also seek forward: + + >>> it = seekable((str(n) for n in range(20))) + >>> it.seek(10) + >>> next(it) + '10' + >>> it.seek(20) # Seeking past the end of the source isn't a problem + >>> list(it) + [] + >>> it.seek(0) # Resetting works even after hitting the end + >>> next(it) + '0' + + Call :meth:`relative_seek` to seek relative to the source iterator's + current position. + + >>> it = seekable((str(n) for n in range(20))) + >>> next(it), next(it), next(it) + ('0', '1', '2') + >>> it.relative_seek(2) + >>> next(it) + '5' + >>> it.relative_seek(-3) # Source is at '6', we move back to '3' + >>> next(it) + '3' + >>> it.relative_seek(-3) # Source is at '4', we move back to '1' + >>> next(it) + '1' + + + Call :meth:`peek` to look ahead one item without advancing the iterator: + + >>> it = seekable('1234') + >>> it.peek() + '1' + >>> list(it) + ['1', '2', '3', '4'] + >>> it.peek(default='empty') + 'empty' + + Before the iterator is at its end, calling :func:`bool` on it will return + ``True``. After it will return ``False``: + + >>> it = seekable('5678') + >>> bool(it) + True + >>> list(it) + ['5', '6', '7', '8'] + >>> bool(it) + False + + You may view the contents of the cache with the :meth:`elements` method. + That returns a :class:`SequenceView`, a view that updates automatically: + + >>> it = seekable((str(n) for n in range(10))) + >>> next(it), next(it), next(it) + ('0', '1', '2') + >>> elements = it.elements() + >>> elements + SequenceView(['0', '1', '2']) + >>> next(it) + '3' + >>> elements + SequenceView(['0', '1', '2', '3']) + + By default, the cache grows as the source iterable progresses, so beware of + wrapping very large or infinite iterables. Supply *maxlen* to limit the + size of the cache (this of course limits how far back you can seek). + + >>> from itertools import count + >>> it = seekable((str(n) for n in count()), maxlen=2) + >>> next(it), next(it), next(it), next(it) + ('0', '1', '2', '3') + >>> list(it.elements()) + ['2', '3'] + >>> it.seek(0) + >>> next(it), next(it), next(it), next(it) + ('2', '3', '4', '5') + >>> next(it) + '6' + + """ + + def __init__(self, iterable, maxlen=None): + self._source = iter(iterable) + if maxlen is None: + self._cache = [] + else: + self._cache = deque([], maxlen) + self._index = None + + def __iter__(self): + return self + + def __next__(self): + if self._index is not None: + try: + item = self._cache[self._index] + except IndexError: + self._index = None + else: + self._index += 1 + return item + + item = next(self._source) + self._cache.append(item) + return item + + def __bool__(self): + try: + self.peek() + except StopIteration: + return False + return True + + def peek(self, default=_marker): + try: + peeked = next(self) + except StopIteration: + if default is _marker: + raise + return default + if self._index is None: + self._index = len(self._cache) + self._index -= 1 + return peeked + + def elements(self): + return SequenceView(self._cache) + + def seek(self, index): + self._index = index + remainder = index - len(self._cache) + if remainder > 0: + consume(self, remainder) + + def relative_seek(self, count): + if self._index is None: + self._index = len(self._cache) + + self.seek(max(self._index + count, 0)) + + +class run_length: + """ + :func:`run_length.encode` compresses an iterable with run-length encoding. + It yields groups of repeated items with the count of how many times they + were repeated: + + >>> uncompressed = 'abbcccdddd' + >>> list(run_length.encode(uncompressed)) + [('a', 1), ('b', 2), ('c', 3), ('d', 4)] + + :func:`run_length.decode` decompresses an iterable that was previously + compressed with run-length encoding. It yields the items of the + decompressed iterable: + + >>> compressed = [('a', 1), ('b', 2), ('c', 3), ('d', 4)] + >>> list(run_length.decode(compressed)) + ['a', 'b', 'b', 'c', 'c', 'c', 'd', 'd', 'd', 'd'] + + """ + + @staticmethod + def encode(iterable): + return ((k, ilen(g)) for k, g in groupby(iterable)) + + @staticmethod + def decode(iterable): + return chain.from_iterable(starmap(repeat, iterable)) + + +def exactly_n(iterable, n, predicate=bool): + """Return ``True`` if exactly ``n`` items in the iterable are ``True`` + according to the *predicate* function. + + >>> exactly_n([True, True, False], 2) + True + >>> exactly_n([True, True, False], 1) + False + >>> exactly_n([0, 1, 2, 3, 4, 5], 3, lambda x: x < 3) + True + + The iterable will be advanced until ``n + 1`` truthy items are encountered, + so avoid calling it on infinite iterables. + + """ + return ilen(islice(filter(predicate, iterable), n + 1)) == n + + +def circular_shifts(iterable, steps=1): + """Yield the circular shifts of *iterable*. + + >>> list(circular_shifts(range(4))) + [(0, 1, 2, 3), (1, 2, 3, 0), (2, 3, 0, 1), (3, 0, 1, 2)] + + Set *steps* to the number of places to rotate to the left + (or to the right if negative). Defaults to 1. + + >>> list(circular_shifts(range(4), 2)) + [(0, 1, 2, 3), (2, 3, 0, 1)] + + >>> list(circular_shifts(range(4), -1)) + [(0, 1, 2, 3), (3, 0, 1, 2), (2, 3, 0, 1), (1, 2, 3, 0)] + + """ + buffer = deque(iterable) + if steps == 0: + raise ValueError('Steps should be a non-zero integer') + + buffer.rotate(steps) + steps = -steps + n = len(buffer) + n //= math.gcd(n, steps) + + for _ in repeat(None, n): + buffer.rotate(steps) + yield tuple(buffer) + + +def make_decorator(wrapping_func, result_index=0): + """Return a decorator version of *wrapping_func*, which is a function that + modifies an iterable. *result_index* is the position in that function's + signature where the iterable goes. + + This lets you use itertools on the "production end," i.e. at function + definition. This can augment what the function returns without changing the + function's code. + + For example, to produce a decorator version of :func:`chunked`: + + >>> from more_itertools import chunked + >>> chunker = make_decorator(chunked, result_index=0) + >>> @chunker(3) + ... def iter_range(n): + ... return iter(range(n)) + ... + >>> list(iter_range(9)) + [[0, 1, 2], [3, 4, 5], [6, 7, 8]] + + To only allow truthy items to be returned: + + >>> truth_serum = make_decorator(filter, result_index=1) + >>> @truth_serum(bool) + ... def boolean_test(): + ... return [0, 1, '', ' ', False, True] + ... + >>> list(boolean_test()) + [1, ' ', True] + + The :func:`peekable` and :func:`seekable` wrappers make for practical + decorators: + + >>> from more_itertools import peekable + >>> peekable_function = make_decorator(peekable) + >>> @peekable_function() + ... def str_range(*args): + ... return (str(x) for x in range(*args)) + ... + >>> it = str_range(1, 20, 2) + >>> next(it), next(it), next(it) + ('1', '3', '5') + >>> it.peek() + '7' + >>> next(it) + '7' + + """ + + # See https://sites.google.com/site/bbayles/index/decorator_factory for + # notes on how this works. + def decorator(*wrapping_args, **wrapping_kwargs): + def outer_wrapper(f): + def inner_wrapper(*args, **kwargs): + result = f(*args, **kwargs) + wrapping_args_ = list(wrapping_args) + wrapping_args_.insert(result_index, result) + return wrapping_func(*wrapping_args_, **wrapping_kwargs) + + return inner_wrapper + + return outer_wrapper + + return decorator + + +def map_reduce(iterable, keyfunc, valuefunc=None, reducefunc=None): + """Return a dictionary that maps the items in *iterable* to categories + defined by *keyfunc*, transforms them with *valuefunc*, and + then summarizes them by category with *reducefunc*. + + *valuefunc* defaults to the identity function if it is unspecified. + If *reducefunc* is unspecified, no summarization takes place: + + >>> keyfunc = lambda x: x.upper() + >>> result = map_reduce('abbccc', keyfunc) + >>> sorted(result.items()) + [('A', ['a']), ('B', ['b', 'b']), ('C', ['c', 'c', 'c'])] + + Specifying *valuefunc* transforms the categorized items: + + >>> keyfunc = lambda x: x.upper() + >>> valuefunc = lambda x: 1 + >>> result = map_reduce('abbccc', keyfunc, valuefunc) + >>> sorted(result.items()) + [('A', [1]), ('B', [1, 1]), ('C', [1, 1, 1])] + + Specifying *reducefunc* summarizes the categorized items: + + >>> keyfunc = lambda x: x.upper() + >>> valuefunc = lambda x: 1 + >>> reducefunc = sum + >>> result = map_reduce('abbccc', keyfunc, valuefunc, reducefunc) + >>> sorted(result.items()) + [('A', 1), ('B', 2), ('C', 3)] + + You may want to filter the input iterable before applying the map/reduce + procedure: + + >>> all_items = range(30) + >>> items = [x for x in all_items if 10 <= x <= 20] # Filter + >>> keyfunc = lambda x: x % 2 # Evens map to 0; odds to 1 + >>> categories = map_reduce(items, keyfunc=keyfunc) + >>> sorted(categories.items()) + [(0, [10, 12, 14, 16, 18, 20]), (1, [11, 13, 15, 17, 19])] + >>> summaries = map_reduce(items, keyfunc=keyfunc, reducefunc=sum) + >>> sorted(summaries.items()) + [(0, 90), (1, 75)] + + Note that all items in the iterable are gathered into a list before the + summarization step, which may require significant storage. + + The returned object is a :obj:`collections.defaultdict` with the + ``default_factory`` set to ``None``, such that it behaves like a normal + dictionary. + + """ + + ret = defaultdict(list) + + if valuefunc is None: + for item in iterable: + key = keyfunc(item) + ret[key].append(item) + + else: + for item in iterable: + key = keyfunc(item) + value = valuefunc(item) + ret[key].append(value) + + if reducefunc is not None: + for key, value_list in ret.items(): + ret[key] = reducefunc(value_list) + + ret.default_factory = None + return ret + + +def rlocate(iterable, pred=bool, window_size=None): + """Yield the index of each item in *iterable* for which *pred* returns + ``True``, starting from the right and moving left. + + *pred* defaults to :func:`bool`, which will select truthy items: + + >>> list(rlocate([0, 1, 1, 0, 1, 0, 0])) # Truthy at 1, 2, and 4 + [4, 2, 1] + + Set *pred* to a custom function to, e.g., find the indexes for a particular + item: + + >>> iterator = iter('abcb') + >>> pred = lambda x: x == 'b' + >>> list(rlocate(iterator, pred)) + [3, 1] + + If *window_size* is given, then the *pred* function will be called with + that many items. This enables searching for sub-sequences: + + >>> iterable = [0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3] + >>> pred = lambda *args: args == (1, 2, 3) + >>> list(rlocate(iterable, pred=pred, window_size=3)) + [9, 5, 1] + + Beware, this function won't return anything for infinite iterables. + If *iterable* is reversible, ``rlocate`` will reverse it and search from + the right. Otherwise, it will search from the left and return the results + in reverse order. + + See :func:`locate` to for other example applications. + + """ + if window_size is None: + try: + len_iter = len(iterable) + return (len_iter - i - 1 for i in locate(reversed(iterable), pred)) + except TypeError: + pass + + return reversed(list(locate(iterable, pred, window_size))) + + +def replace(iterable, pred, substitutes, count=None, window_size=1): + """Yield the items from *iterable*, replacing the items for which *pred* + returns ``True`` with the items from the iterable *substitutes*. + + >>> iterable = [1, 1, 0, 1, 1, 0, 1, 1] + >>> pred = lambda x: x == 0 + >>> substitutes = (2, 3) + >>> list(replace(iterable, pred, substitutes)) + [1, 1, 2, 3, 1, 1, 2, 3, 1, 1] + + If *count* is given, the number of replacements will be limited: + + >>> iterable = [1, 1, 0, 1, 1, 0, 1, 1, 0] + >>> pred = lambda x: x == 0 + >>> substitutes = [None] + >>> list(replace(iterable, pred, substitutes, count=2)) + [1, 1, None, 1, 1, None, 1, 1, 0] + + Use *window_size* to control the number of items passed as arguments to + *pred*. This allows for locating and replacing subsequences. + + >>> iterable = [0, 1, 2, 5, 0, 1, 2, 5] + >>> window_size = 3 + >>> pred = lambda *args: args == (0, 1, 2) # 3 items passed to pred + >>> substitutes = [3, 4] # Splice in these items + >>> list(replace(iterable, pred, substitutes, window_size=window_size)) + [3, 4, 5, 3, 4, 5] + + """ + if window_size < 1: + raise ValueError('window_size must be at least 1') + + # Save the substitutes iterable, since it's used more than once + substitutes = tuple(substitutes) + + # Add padding such that the number of windows matches the length of the + # iterable + it = chain(iterable, repeat(_marker, window_size - 1)) + windows = windowed(it, window_size) + + n = 0 + for w in windows: + # If the current window matches our predicate (and we haven't hit + # our maximum number of replacements), splice in the substitutes + # and then consume the following windows that overlap with this one. + # For example, if the iterable is (0, 1, 2, 3, 4...) + # and the window size is 2, we have (0, 1), (1, 2), (2, 3)... + # If the predicate matches on (0, 1), we need to zap (0, 1) and (1, 2) + if pred(*w): + if (count is None) or (n < count): + n += 1 + yield from substitutes + consume(windows, window_size - 1) + continue + + # If there was no match (or we've reached the replacement limit), + # yield the first item from the window. + if w and (w[0] is not _marker): + yield w[0] + + +def partitions(iterable): + """Yield all possible order-preserving partitions of *iterable*. + + >>> iterable = 'abc' + >>> for part in partitions(iterable): + ... print([''.join(p) for p in part]) + ['abc'] + ['a', 'bc'] + ['ab', 'c'] + ['a', 'b', 'c'] + + This is unrelated to :func:`partition`. + + """ + sequence = list(iterable) + n = len(sequence) + for i in powerset(range(1, n)): + yield [sequence[i:j] for i, j in zip((0,) + i, i + (n,))] + + +def set_partitions(iterable, k=None, min_size=None, max_size=None): + """ + Yield the set partitions of *iterable* into *k* parts. Set partitions are + not order-preserving. + + >>> iterable = 'abc' + >>> for part in set_partitions(iterable, 2): + ... print([''.join(p) for p in part]) + ['a', 'bc'] + ['ab', 'c'] + ['b', 'ac'] + + + If *k* is not given, every set partition is generated. + + >>> iterable = 'abc' + >>> for part in set_partitions(iterable): + ... print([''.join(p) for p in part]) + ['abc'] + ['a', 'bc'] + ['ab', 'c'] + ['b', 'ac'] + ['a', 'b', 'c'] + + if *min_size* and/or *max_size* are given, the minimum and/or maximum size + per block in partition is set. + + >>> iterable = 'abc' + >>> for part in set_partitions(iterable, min_size=2): + ... print([''.join(p) for p in part]) + ['abc'] + >>> for part in set_partitions(iterable, max_size=2): + ... print([''.join(p) for p in part]) + ['a', 'bc'] + ['ab', 'c'] + ['b', 'ac'] + ['a', 'b', 'c'] + + """ + L = list(iterable) + n = len(L) + if k is not None: + if k < 1: + raise ValueError( + "Can't partition in a negative or zero number of groups" + ) + elif k > n: + return + + min_size = min_size if min_size is not None else 0 + max_size = max_size if max_size is not None else n + if min_size > max_size: + return + + def set_partitions_helper(L, k): + n = len(L) + if k == 1: + yield [L] + elif n == k: + yield [[s] for s in L] + else: + e, *M = L + for p in set_partitions_helper(M, k - 1): + yield [[e], *p] + for p in set_partitions_helper(M, k): + for i in range(len(p)): + yield p[:i] + [[e] + p[i]] + p[i + 1 :] + + if k is None: + for k in range(1, n + 1): + yield from filter( + lambda z: all(min_size <= len(bk) <= max_size for bk in z), + set_partitions_helper(L, k), + ) + else: + yield from filter( + lambda z: all(min_size <= len(bk) <= max_size for bk in z), + set_partitions_helper(L, k), + ) + + +class time_limited: + """ + Yield items from *iterable* until *limit_seconds* have passed. + If the time limit expires before all items have been yielded, the + ``timed_out`` parameter will be set to ``True``. + + >>> from time import sleep + >>> def generator(): + ... yield 1 + ... yield 2 + ... sleep(0.2) + ... yield 3 + >>> iterable = time_limited(0.1, generator()) + >>> list(iterable) + [1, 2] + >>> iterable.timed_out + True + + Note that the time is checked before each item is yielded, and iteration + stops if the time elapsed is greater than *limit_seconds*. If your time + limit is 1 second, but it takes 2 seconds to generate the first item from + the iterable, the function will run for 2 seconds and not yield anything. + As a special case, when *limit_seconds* is zero, the iterator never + returns anything. + + """ + + def __init__(self, limit_seconds, iterable): + if limit_seconds < 0: + raise ValueError('limit_seconds must be positive') + self.limit_seconds = limit_seconds + self._iterator = iter(iterable) + self._start_time = monotonic() + self.timed_out = False + + def __iter__(self): + return self + + def __next__(self): + if self.limit_seconds == 0: + self.timed_out = True + raise StopIteration + item = next(self._iterator) + if monotonic() - self._start_time > self.limit_seconds: + self.timed_out = True + raise StopIteration + + return item + + +def only(iterable, default=None, too_long=None): + """If *iterable* has only one item, return it. + If it has zero items, return *default*. + If it has more than one item, raise the exception given by *too_long*, + which is ``ValueError`` by default. + + >>> only([], default='missing') + 'missing' + >>> only([1]) + 1 + >>> only([1, 2]) # doctest: +IGNORE_EXCEPTION_DETAIL + Traceback (most recent call last): + ... + ValueError: Expected exactly one item in iterable, but got 1, 2, + and perhaps more.' + >>> only([1, 2], too_long=TypeError) # doctest: +IGNORE_EXCEPTION_DETAIL + Traceback (most recent call last): + ... + TypeError + + Note that :func:`only` attempts to advance *iterable* twice to ensure there + is only one item. See :func:`spy` or :func:`peekable` to check + iterable contents less destructively. + + """ + iterator = iter(iterable) + for first in iterator: + for second in iterator: + msg = ( + f'Expected exactly one item in iterable, but got {first!r}, ' + f'{second!r}, and perhaps more.' + ) + raise too_long or ValueError(msg) + return first + return default + + +def _ichunk(iterator, n): + cache = deque() + chunk = islice(iterator, n) + + def generator(): + with suppress(StopIteration): + while True: + if cache: + yield cache.popleft() + else: + yield next(chunk) + + def materialize_next(n=1): + # if n not specified materialize everything + if n is None: + cache.extend(chunk) + return len(cache) + + to_cache = n - len(cache) + + # materialize up to n + if to_cache > 0: + cache.extend(islice(chunk, to_cache)) + + # return number materialized up to n + return min(n, len(cache)) + + return (generator(), materialize_next) + + +def ichunked(iterable, n): + """Break *iterable* into sub-iterables with *n* elements each. + :func:`ichunked` is like :func:`chunked`, but it yields iterables + instead of lists. + + If the sub-iterables are read in order, the elements of *iterable* + won't be stored in memory. + If they are read out of order, :func:`itertools.tee` is used to cache + elements as necessary. + + >>> from itertools import count + >>> all_chunks = ichunked(count(), 4) + >>> c_1, c_2, c_3 = next(all_chunks), next(all_chunks), next(all_chunks) + >>> list(c_2) # c_1's elements have been cached; c_3's haven't been + [4, 5, 6, 7] + >>> list(c_1) + [0, 1, 2, 3] + >>> list(c_3) + [8, 9, 10, 11] + + """ + iterator = iter(iterable) + while True: + # Create new chunk + chunk, materialize_next = _ichunk(iterator, n) + + # Check to see whether we're at the end of the source iterable + if not materialize_next(): + return + + yield chunk + + # Fill previous chunk's cache + materialize_next(None) + + +def iequals(*iterables): + """Return ``True`` if all given *iterables* are equal to each other, + which means that they contain the same elements in the same order. + + The function is useful for comparing iterables of different data types + or iterables that do not support equality checks. + + >>> iequals("abc", ['a', 'b', 'c'], ('a', 'b', 'c'), iter("abc")) + True + + >>> iequals("abc", "acb") + False + + Not to be confused with :func:`all_equal`, which checks whether all + elements of iterable are equal to each other. + + """ + return all(map(all_equal, zip_longest(*iterables, fillvalue=object()))) + + +def distinct_combinations(iterable, r): + """Yield the distinct combinations of *r* items taken from *iterable*. + + >>> list(distinct_combinations([0, 0, 1], 2)) + [(0, 0), (0, 1)] + + Equivalent to ``set(combinations(iterable))``, except duplicates are not + generated and thrown away. For larger input sequences this is much more + efficient. + + """ + if r < 0: + raise ValueError('r must be non-negative') + elif r == 0: + yield () + return + pool = tuple(iterable) + generators = [unique_everseen(enumerate(pool), key=itemgetter(1))] + current_combo = [None] * r + level = 0 + while generators: + try: + cur_idx, p = next(generators[-1]) + except StopIteration: + generators.pop() + level -= 1 + continue + current_combo[level] = p + if level + 1 == r: + yield tuple(current_combo) + else: + generators.append( + unique_everseen( + enumerate(pool[cur_idx + 1 :], cur_idx + 1), + key=itemgetter(1), + ) + ) + level += 1 + + +def filter_except(validator, iterable, *exceptions): + """Yield the items from *iterable* for which the *validator* function does + not raise one of the specified *exceptions*. + + *validator* is called for each item in *iterable*. + It should be a function that accepts one argument and raises an exception + if that item is not valid. + + >>> iterable = ['1', '2', 'three', '4', None] + >>> list(filter_except(int, iterable, ValueError, TypeError)) + ['1', '2', '4'] + + If an exception other than one given by *exceptions* is raised by + *validator*, it is raised like normal. + """ + for item in iterable: + try: + validator(item) + except exceptions: + pass + else: + yield item + + +def map_except(function, iterable, *exceptions): + """Transform each item from *iterable* with *function* and yield the + result, unless *function* raises one of the specified *exceptions*. + + *function* is called to transform each item in *iterable*. + It should accept one argument. + + >>> iterable = ['1', '2', 'three', '4', None] + >>> list(map_except(int, iterable, ValueError, TypeError)) + [1, 2, 4] + + If an exception other than one given by *exceptions* is raised by + *function*, it is raised like normal. + """ + for item in iterable: + try: + yield function(item) + except exceptions: + pass + + +def map_if(iterable, pred, func, func_else=None): + """Evaluate each item from *iterable* using *pred*. If the result is + equivalent to ``True``, transform the item with *func* and yield it. + Otherwise, transform the item with *func_else* and yield it. + + *pred*, *func*, and *func_else* should each be functions that accept + one argument. By default, *func_else* is the identity function. + + >>> from math import sqrt + >>> iterable = list(range(-5, 5)) + >>> iterable + [-5, -4, -3, -2, -1, 0, 1, 2, 3, 4] + >>> list(map_if(iterable, lambda x: x > 3, lambda x: 'toobig')) + [-5, -4, -3, -2, -1, 0, 1, 2, 3, 'toobig'] + >>> list(map_if(iterable, lambda x: x >= 0, + ... lambda x: f'{sqrt(x):.2f}', lambda x: None)) + [None, None, None, None, None, '0.00', '1.00', '1.41', '1.73', '2.00'] + """ + + if func_else is None: + for item in iterable: + yield func(item) if pred(item) else item + + else: + for item in iterable: + yield func(item) if pred(item) else func_else(item) + + +def _sample_unweighted(iterator, k, strict): + # Algorithm L in the 1994 paper by Kim-Hung Li: + # "Reservoir-Sampling Algorithms of Time Complexity O(n(1+log(N/n)))". + + reservoir = list(islice(iterator, k)) + if strict and len(reservoir) < k: + raise ValueError('Sample larger than population') + W = 1.0 + + with suppress(StopIteration): + while True: + W *= random() ** (1 / k) + skip = floor(log(random()) / log1p(-W)) + element = next(islice(iterator, skip, None)) + reservoir[randrange(k)] = element + + shuffle(reservoir) + return reservoir + + +def _sample_weighted(iterator, k, weights, strict): + # Implementation of "A-ExpJ" from the 2006 paper by Efraimidis et al. : + # "Weighted random sampling with a reservoir". + + # Log-transform for numerical stability for weights that are small/large + weight_keys = (log(random()) / weight for weight in weights) + + # Fill up the reservoir (collection of samples) with the first `k` + # weight-keys and elements, then heapify the list. + reservoir = take(k, zip(weight_keys, iterator)) + if strict and len(reservoir) < k: + raise ValueError('Sample larger than population') + + heapify(reservoir) + + # The number of jumps before changing the reservoir is a random variable + # with an exponential distribution. Sample it using random() and logs. + smallest_weight_key, _ = reservoir[0] + weights_to_skip = log(random()) / smallest_weight_key + + for weight, element in zip(weights, iterator): + if weight >= weights_to_skip: + # The notation here is consistent with the paper, but we store + # the weight-keys in log-space for better numerical stability. + smallest_weight_key, _ = reservoir[0] + t_w = exp(weight * smallest_weight_key) + r_2 = uniform(t_w, 1) # generate U(t_w, 1) + weight_key = log(r_2) / weight + heapreplace(reservoir, (weight_key, element)) + smallest_weight_key, _ = reservoir[0] + weights_to_skip = log(random()) / smallest_weight_key + else: + weights_to_skip -= weight + + ret = [element for weight_key, element in reservoir] + shuffle(ret) + return ret + + +def _sample_counted(population, k, counts, strict): + element = None + remaining = 0 + + def feed(i): + # Advance *i* steps ahead and consume an element + nonlocal element, remaining + + while i + 1 > remaining: + i = i - remaining + element = next(population) + remaining = next(counts) + remaining -= i + 1 + return element + + with suppress(StopIteration): + reservoir = [] + for _ in range(k): + reservoir.append(feed(0)) + + if strict and len(reservoir) < k: + raise ValueError('Sample larger than population') + + with suppress(StopIteration): + W = 1.0 + while True: + W *= random() ** (1 / k) + skip = floor(log(random()) / log1p(-W)) + element = feed(skip) + reservoir[randrange(k)] = element + + shuffle(reservoir) + return reservoir + + +def sample(iterable, k, weights=None, *, counts=None, strict=False): + """Return a *k*-length list of elements chosen (without replacement) + from the *iterable*. + + Similar to :func:`random.sample`, but works on inputs that aren't + indexable (such as sets and dictionaries) and on inputs where the + size isn't known in advance (such as generators). + + >>> iterable = range(100) + >>> sample(iterable, 5) # doctest: +SKIP + [81, 60, 96, 16, 4] + + For iterables with repeated elements, you may supply *counts* to + indicate the repeats. + + >>> iterable = ['a', 'b'] + >>> counts = [3, 4] # Equivalent to 'a', 'a', 'a', 'b', 'b', 'b', 'b' + >>> sample(iterable, k=3, counts=counts) # doctest: +SKIP + ['a', 'a', 'b'] + + An iterable with *weights* may be given: + + >>> iterable = range(100) + >>> weights = (i * i + 1 for i in range(100)) + >>> sampled = sample(iterable, 5, weights=weights) # doctest: +SKIP + [79, 67, 74, 66, 78] + + Weighted selections are made without replacement. + After an element is selected, it is removed from the pool and the + relative weights of the other elements increase (this + does not match the behavior of :func:`random.sample`'s *counts* + parameter). Note that *weights* may not be used with *counts*. + + If the length of *iterable* is less than *k*, + ``ValueError`` is raised if *strict* is ``True`` and + all elements are returned (in shuffled order) if *strict* is ``False``. + + By default, the `Algorithm L `__ reservoir sampling + technique is used. When *weights* are provided, + `Algorithm A-ExpJ `__ is used instead. + + Notes on reproducibility: + + * The algorithms rely on inexact floating-point functions provided + by the underlying math library (e.g. ``log``, ``log1p``, and ``pow``). + Those functions can `produce slightly different results + `_ on + different builds. Accordingly, selections can vary across builds + even for the same seed. + + * The algorithms loop over the input and make selections based on + ordinal position, so selections from unordered collections (such as + sets) won't reproduce across sessions on the same platform using the + same seed. For example, this won't reproduce:: + + >> seed(8675309) + >> sample(set('abcdefghijklmnopqrstuvwxyz'), 10) + ['c', 'p', 'e', 'w', 's', 'a', 'j', 'd', 'n', 't'] + + """ + iterator = iter(iterable) + + if k < 0: + raise ValueError('k must be non-negative') + + if k == 0: + return [] + + if weights is not None and counts is not None: + raise TypeError('weights and counts are mutually exclusive') + + elif weights is not None: + weights = iter(weights) + return _sample_weighted(iterator, k, weights, strict) + + elif counts is not None: + counts = iter(counts) + return _sample_counted(iterator, k, counts, strict) + + else: + return _sample_unweighted(iterator, k, strict) + + +def is_sorted(iterable, key=None, reverse=False, strict=False): + """Returns ``True`` if the items of iterable are in sorted order, and + ``False`` otherwise. *key* and *reverse* have the same meaning that they do + in the built-in :func:`sorted` function. + + >>> is_sorted(['1', '2', '3', '4', '5'], key=int) + True + >>> is_sorted([5, 4, 3, 1, 2], reverse=True) + False + + If *strict*, tests for strict sorting, that is, returns ``False`` if equal + elements are found: + + >>> is_sorted([1, 2, 2]) + True + >>> is_sorted([1, 2, 2], strict=True) + False + + The function returns ``False`` after encountering the first out-of-order + item, which means it may produce results that differ from the built-in + :func:`sorted` function for objects with unusual comparison dynamics + (like ``math.nan``). If there are no out-of-order items, the iterable is + exhausted. + """ + it = iterable if (key is None) else map(key, iterable) + a, b = tee(it) + next(b, None) + if reverse: + b, a = a, b + return all(map(lt, a, b)) if strict else not any(map(lt, b, a)) + + +class AbortThread(BaseException): + pass + + +class callback_iter: + """Convert a function that uses callbacks to an iterator. + + Let *func* be a function that takes a `callback` keyword argument. + For example: + + >>> def func(callback=None): + ... for i, c in [(1, 'a'), (2, 'b'), (3, 'c')]: + ... if callback: + ... callback(i, c) + ... return 4 + + + Use ``with callback_iter(func)`` to get an iterator over the parameters + that are delivered to the callback. + + >>> with callback_iter(func) as it: + ... for args, kwargs in it: + ... print(args) + (1, 'a') + (2, 'b') + (3, 'c') + + The function will be called in a background thread. The ``done`` property + indicates whether it has completed execution. + + >>> it.done + True + + If it completes successfully, its return value will be available + in the ``result`` property. + + >>> it.result + 4 + + Notes: + + * If the function uses some keyword argument besides ``callback``, supply + *callback_kwd*. + * If it finished executing, but raised an exception, accessing the + ``result`` property will raise the same exception. + * If it hasn't finished executing, accessing the ``result`` + property from within the ``with`` block will raise ``RuntimeError``. + * If it hasn't finished executing, accessing the ``result`` property from + outside the ``with`` block will raise a + ``more_itertools.AbortThread`` exception. + * Provide *wait_seconds* to adjust how frequently the it is polled for + output. + + """ + + def __init__(self, func, callback_kwd='callback', wait_seconds=0.1): + self._func = func + self._callback_kwd = callback_kwd + self._aborted = False + self._future = None + self._wait_seconds = wait_seconds + # Lazily import concurrent.future + self._executor = __import__( + 'concurrent.futures' + ).futures.ThreadPoolExecutor(max_workers=1) + self._iterator = self._reader() + + def __enter__(self): + return self + + def __exit__(self, exc_type, exc_value, traceback): + self._aborted = True + self._executor.shutdown() + + def __iter__(self): + return self + + def __next__(self): + return next(self._iterator) + + @property + def done(self): + if self._future is None: + return False + return self._future.done() + + @property + def result(self): + if not self.done: + raise RuntimeError('Function has not yet completed') + + return self._future.result() + + def _reader(self): + q = Queue() + + def callback(*args, **kwargs): + if self._aborted: + raise AbortThread('canceled by user') + + q.put((args, kwargs)) + + self._future = self._executor.submit( + self._func, **{self._callback_kwd: callback} + ) + + while True: + try: + item = q.get(timeout=self._wait_seconds) + except Empty: + pass + else: + q.task_done() + yield item + + if self._future.done(): + break + + remaining = [] + while True: + try: + item = q.get_nowait() + except Empty: + break + else: + q.task_done() + remaining.append(item) + q.join() + yield from remaining + + +def windowed_complete(iterable, n): + """ + Yield ``(beginning, middle, end)`` tuples, where: + + * Each ``middle`` has *n* items from *iterable* + * Each ``beginning`` has the items before the ones in ``middle`` + * Each ``end`` has the items after the ones in ``middle`` + + >>> iterable = range(7) + >>> n = 3 + >>> for beginning, middle, end in windowed_complete(iterable, n): + ... print(beginning, middle, end) + () (0, 1, 2) (3, 4, 5, 6) + (0,) (1, 2, 3) (4, 5, 6) + (0, 1) (2, 3, 4) (5, 6) + (0, 1, 2) (3, 4, 5) (6,) + (0, 1, 2, 3) (4, 5, 6) () + + Note that *n* must be at least 0 and most equal to the length of + *iterable*. + + This function will exhaust the iterable and may require significant + storage. + """ + if n < 0: + raise ValueError('n must be >= 0') + + seq = tuple(iterable) + size = len(seq) + + if n > size: + raise ValueError('n must be <= len(seq)') + + for i in range(size - n + 1): + beginning = seq[:i] + middle = seq[i : i + n] + end = seq[i + n :] + yield beginning, middle, end + + +def all_unique(iterable, key=None): + """ + Returns ``True`` if all the elements of *iterable* are unique (no two + elements are equal). + + >>> all_unique('ABCB') + False + + If a *key* function is specified, it will be used to make comparisons. + + >>> all_unique('ABCb') + True + >>> all_unique('ABCb', str.lower) + False + + The function returns as soon as the first non-unique element is + encountered. Iterables with a mix of hashable and unhashable items can + be used, but the function will be slower for unhashable items. + """ + seenset = set() + seenset_add = seenset.add + seenlist = [] + seenlist_add = seenlist.append + for element in map(key, iterable) if key else iterable: + try: + if element in seenset: + return False + seenset_add(element) + except TypeError: + if element in seenlist: + return False + seenlist_add(element) + return True + + +def nth_product(index, *args): + """Equivalent to ``list(product(*args))[index]``. + + The products of *args* can be ordered lexicographically. + :func:`nth_product` computes the product at sort position *index* without + computing the previous products. + + >>> nth_product(8, range(2), range(2), range(2), range(2)) + (1, 0, 0, 0) + + ``IndexError`` will be raised if the given *index* is invalid. + """ + pools = list(map(tuple, reversed(args))) + ns = list(map(len, pools)) + + c = reduce(mul, ns) + + if index < 0: + index += c + + if not 0 <= index < c: + raise IndexError + + result = [] + for pool, n in zip(pools, ns): + result.append(pool[index % n]) + index //= n + + return tuple(reversed(result)) + + +def nth_permutation(iterable, r, index): + """Equivalent to ``list(permutations(iterable, r))[index]``` + + The subsequences of *iterable* that are of length *r* where order is + important can be ordered lexicographically. :func:`nth_permutation` + computes the subsequence at sort position *index* directly, without + computing the previous subsequences. + + >>> nth_permutation('ghijk', 2, 5) + ('h', 'i') + + ``ValueError`` will be raised If *r* is negative or greater than the length + of *iterable*. + ``IndexError`` will be raised if the given *index* is invalid. + """ + pool = list(iterable) + n = len(pool) + + if r is None or r == n: + r, c = n, factorial(n) + elif not 0 <= r < n: + raise ValueError + else: + c = perm(n, r) + assert c > 0 # factorial(n)>0, and r>> nth_combination_with_replacement(range(5), 3, 5) + (0, 1, 1) + + ``ValueError`` will be raised If *r* is negative or greater than the length + of *iterable*. + ``IndexError`` will be raised if the given *index* is invalid. + """ + pool = tuple(iterable) + n = len(pool) + if (r < 0) or (r > n): + raise ValueError + + c = comb(n + r - 1, r) + + if index < 0: + index += c + + if (index < 0) or (index >= c): + raise IndexError + + result = [] + i = 0 + while r: + r -= 1 + while n >= 0: + num_combs = comb(n + r - 1, r) + if index < num_combs: + break + n -= 1 + i += 1 + index -= num_combs + result.append(pool[i]) + + return tuple(result) + + +def value_chain(*args): + """Yield all arguments passed to the function in the same order in which + they were passed. If an argument itself is iterable then iterate over its + values. + + >>> list(value_chain(1, 2, 3, [4, 5, 6])) + [1, 2, 3, 4, 5, 6] + + Binary and text strings are not considered iterable and are emitted + as-is: + + >>> list(value_chain('12', '34', ['56', '78'])) + ['12', '34', '56', '78'] + + Pre- or postpend a single element to an iterable: + + >>> list(value_chain(1, [2, 3, 4, 5, 6])) + [1, 2, 3, 4, 5, 6] + >>> list(value_chain([1, 2, 3, 4, 5], 6)) + [1, 2, 3, 4, 5, 6] + + Multiple levels of nesting are not flattened. + + """ + for value in args: + if isinstance(value, (str, bytes)): + yield value + continue + try: + yield from value + except TypeError: + yield value + + +def product_index(element, *args): + """Equivalent to ``list(product(*args)).index(element)`` + + The products of *args* can be ordered lexicographically. + :func:`product_index` computes the first index of *element* without + computing the previous products. + + >>> product_index([8, 2], range(10), range(5)) + 42 + + ``ValueError`` will be raised if the given *element* isn't in the product + of *args*. + """ + index = 0 + + for x, pool in zip_longest(element, args, fillvalue=_marker): + if x is _marker or pool is _marker: + raise ValueError('element is not a product of args') + + pool = tuple(pool) + index = index * len(pool) + pool.index(x) + + return index + + +def combination_index(element, iterable): + """Equivalent to ``list(combinations(iterable, r)).index(element)`` + + The subsequences of *iterable* that are of length *r* can be ordered + lexicographically. :func:`combination_index` computes the index of the + first *element*, without computing the previous combinations. + + >>> combination_index('adf', 'abcdefg') + 10 + + ``ValueError`` will be raised if the given *element* isn't one of the + combinations of *iterable*. + """ + element = enumerate(element) + k, y = next(element, (None, None)) + if k is None: + return 0 + + indexes = [] + pool = enumerate(iterable) + for n, x in pool: + if x == y: + indexes.append(n) + tmp, y = next(element, (None, None)) + if tmp is None: + break + else: + k = tmp + else: + raise ValueError('element is not a combination of iterable') + + n, _ = last(pool, default=(n, None)) + + # Python versions below 3.8 don't have math.comb + index = 1 + for i, j in enumerate(reversed(indexes), start=1): + j = n - j + if i <= j: + index += comb(j, i) + + return comb(n + 1, k + 1) - index + + +def combination_with_replacement_index(element, iterable): + """Equivalent to + ``list(combinations_with_replacement(iterable, r)).index(element)`` + + The subsequences with repetition of *iterable* that are of length *r* can + be ordered lexicographically. :func:`combination_with_replacement_index` + computes the index of the first *element*, without computing the previous + combinations with replacement. + + >>> combination_with_replacement_index('adf', 'abcdefg') + 20 + + ``ValueError`` will be raised if the given *element* isn't one of the + combinations with replacement of *iterable*. + """ + element = tuple(element) + l = len(element) + element = enumerate(element) + + k, y = next(element, (None, None)) + if k is None: + return 0 + + indexes = [] + pool = tuple(iterable) + for n, x in enumerate(pool): + while x == y: + indexes.append(n) + tmp, y = next(element, (None, None)) + if tmp is None: + break + else: + k = tmp + if y is None: + break + else: + raise ValueError( + 'element is not a combination with replacement of iterable' + ) + + n = len(pool) + occupations = [0] * n + for p in indexes: + occupations[p] += 1 + + index = 0 + cumulative_sum = 0 + for k in range(1, n): + cumulative_sum += occupations[k - 1] + j = l + n - 1 - k - cumulative_sum + i = n - k + if i <= j: + index += comb(j, i) + + return index + + +def permutation_index(element, iterable): + """Equivalent to ``list(permutations(iterable, r)).index(element)``` + + The subsequences of *iterable* that are of length *r* where order is + important can be ordered lexicographically. :func:`permutation_index` + computes the index of the first *element* directly, without computing + the previous permutations. + + >>> permutation_index([1, 3, 2], range(5)) + 19 + + ``ValueError`` will be raised if the given *element* isn't one of the + permutations of *iterable*. + """ + index = 0 + pool = list(iterable) + for i, x in zip(range(len(pool), -1, -1), element): + r = pool.index(x) + index = index * i + r + del pool[r] + + return index + + +class countable: + """Wrap *iterable* and keep a count of how many items have been consumed. + + The ``items_seen`` attribute starts at ``0`` and increments as the iterable + is consumed: + + >>> iterable = map(str, range(10)) + >>> it = countable(iterable) + >>> it.items_seen + 0 + >>> next(it), next(it) + ('0', '1') + >>> list(it) + ['2', '3', '4', '5', '6', '7', '8', '9'] + >>> it.items_seen + 10 + """ + + def __init__(self, iterable): + self._iterator = iter(iterable) + self.items_seen = 0 + + def __iter__(self): + return self + + def __next__(self): + item = next(self._iterator) + self.items_seen += 1 + + return item + + +def chunked_even(iterable, n): + """Break *iterable* into lists of approximately length *n*. + Items are distributed such the lengths of the lists differ by at most + 1 item. + + >>> iterable = [1, 2, 3, 4, 5, 6, 7] + >>> n = 3 + >>> list(chunked_even(iterable, n)) # List lengths: 3, 2, 2 + [[1, 2, 3], [4, 5], [6, 7]] + >>> list(chunked(iterable, n)) # List lengths: 3, 3, 1 + [[1, 2, 3], [4, 5, 6], [7]] + + """ + iterator = iter(iterable) + + # Initialize a buffer to process the chunks while keeping + # some back to fill any underfilled chunks + min_buffer = (n - 1) * (n - 2) + buffer = list(islice(iterator, min_buffer)) + + # Append items until we have a completed chunk + for _ in islice(map(buffer.append, iterator), n, None, n): + yield buffer[:n] + del buffer[:n] + + # Check if any chunks need addition processing + if not buffer: + return + length = len(buffer) + + # Chunks are either size `full_size <= n` or `partial_size = full_size - 1` + q, r = divmod(length, n) + num_lists = q + (1 if r > 0 else 0) + q, r = divmod(length, num_lists) + full_size = q + (1 if r > 0 else 0) + partial_size = full_size - 1 + num_full = length - partial_size * num_lists + + # Yield chunks of full size + partial_start_idx = num_full * full_size + if full_size > 0: + for i in range(0, partial_start_idx, full_size): + yield buffer[i : i + full_size] + + # Yield chunks of partial size + if partial_size > 0: + for i in range(partial_start_idx, length, partial_size): + yield buffer[i : i + partial_size] + + +def zip_broadcast(*objects, scalar_types=(str, bytes), strict=False): + """A version of :func:`zip` that "broadcasts" any scalar + (i.e., non-iterable) items into output tuples. + + >>> iterable_1 = [1, 2, 3] + >>> iterable_2 = ['a', 'b', 'c'] + >>> scalar = '_' + >>> list(zip_broadcast(iterable_1, iterable_2, scalar)) + [(1, 'a', '_'), (2, 'b', '_'), (3, 'c', '_')] + + The *scalar_types* keyword argument determines what types are considered + scalar. It is set to ``(str, bytes)`` by default. Set it to ``None`` to + treat strings and byte strings as iterable: + + >>> list(zip_broadcast('abc', 0, 'xyz', scalar_types=None)) + [('a', 0, 'x'), ('b', 0, 'y'), ('c', 0, 'z')] + + If the *strict* keyword argument is ``True``, then + ``UnequalIterablesError`` will be raised if any of the iterables have + different lengths. + """ + + def is_scalar(obj): + if scalar_types and isinstance(obj, scalar_types): + return True + try: + iter(obj) + except TypeError: + return True + else: + return False + + size = len(objects) + if not size: + return + + new_item = [None] * size + iterables, iterable_positions = [], [] + for i, obj in enumerate(objects): + if is_scalar(obj): + new_item[i] = obj + else: + iterables.append(iter(obj)) + iterable_positions.append(i) + + if not iterables: + yield tuple(objects) + return + + zipper = _zip_equal if strict else zip + for item in zipper(*iterables): + for i, new_item[i] in zip(iterable_positions, item): + pass + yield tuple(new_item) + + +def unique_in_window(iterable, n, key=None): + """Yield the items from *iterable* that haven't been seen recently. + *n* is the size of the lookback window. + + >>> iterable = [0, 1, 0, 2, 3, 0] + >>> n = 3 + >>> list(unique_in_window(iterable, n)) + [0, 1, 2, 3, 0] + + The *key* function, if provided, will be used to determine uniqueness: + + >>> list(unique_in_window('abAcda', 3, key=lambda x: x.lower())) + ['a', 'b', 'c', 'd', 'a'] + + The items in *iterable* must be hashable. + + """ + if n <= 0: + raise ValueError('n must be greater than 0') + + window = deque(maxlen=n) + counts = defaultdict(int) + use_key = key is not None + + for item in iterable: + if len(window) == n: + to_discard = window[0] + if counts[to_discard] == 1: + del counts[to_discard] + else: + counts[to_discard] -= 1 + + k = key(item) if use_key else item + if k not in counts: + yield item + counts[k] += 1 + window.append(k) + + +def duplicates_everseen(iterable, key=None): + """Yield duplicate elements after their first appearance. + + >>> list(duplicates_everseen('mississippi')) + ['s', 'i', 's', 's', 'i', 'p', 'i'] + >>> list(duplicates_everseen('AaaBbbCccAaa', str.lower)) + ['a', 'a', 'b', 'b', 'c', 'c', 'A', 'a', 'a'] + + This function is analogous to :func:`unique_everseen` and is subject to + the same performance considerations. + + """ + seen_set = set() + seen_list = [] + use_key = key is not None + + for element in iterable: + k = key(element) if use_key else element + try: + if k not in seen_set: + seen_set.add(k) + else: + yield element + except TypeError: + if k not in seen_list: + seen_list.append(k) + else: + yield element + + +def duplicates_justseen(iterable, key=None): + """Yields serially-duplicate elements after their first appearance. + + >>> list(duplicates_justseen('mississippi')) + ['s', 's', 'p'] + >>> list(duplicates_justseen('AaaBbbCccAaa', str.lower)) + ['a', 'a', 'b', 'b', 'c', 'c', 'a', 'a'] + + This function is analogous to :func:`unique_justseen`. + + """ + return flatten(g for _, g in groupby(iterable, key) for _ in g) + + +def classify_unique(iterable, key=None): + """Classify each element in terms of its uniqueness. + + For each element in the input iterable, return a 3-tuple consisting of: + + 1. The element itself + 2. ``False`` if the element is equal to the one preceding it in the input, + ``True`` otherwise (i.e. the equivalent of :func:`unique_justseen`) + 3. ``False`` if this element has been seen anywhere in the input before, + ``True`` otherwise (i.e. the equivalent of :func:`unique_everseen`) + + >>> list(classify_unique('otto')) # doctest: +NORMALIZE_WHITESPACE + [('o', True, True), + ('t', True, True), + ('t', False, False), + ('o', True, False)] + + This function is analogous to :func:`unique_everseen` and is subject to + the same performance considerations. + + """ + seen_set = set() + seen_list = [] + use_key = key is not None + previous = None + + for i, element in enumerate(iterable): + k = key(element) if use_key else element + is_unique_justseen = not i or previous != k + previous = k + is_unique_everseen = False + try: + if k not in seen_set: + seen_set.add(k) + is_unique_everseen = True + except TypeError: + if k not in seen_list: + seen_list.append(k) + is_unique_everseen = True + yield element, is_unique_justseen, is_unique_everseen + + +def minmax(iterable_or_value, *others, key=None, default=_marker): + """Returns both the smallest and largest items from an iterable + or from two or more arguments. + + >>> minmax([3, 1, 5]) + (1, 5) + + >>> minmax(4, 2, 6) + (2, 6) + + If a *key* function is provided, it will be used to transform the input + items for comparison. + + >>> minmax([5, 30], key=str) # '30' sorts before '5' + (30, 5) + + If a *default* value is provided, it will be returned if there are no + input items. + + >>> minmax([], default=(0, 0)) + (0, 0) + + Otherwise ``ValueError`` is raised. + + This function makes a single pass over the input elements and takes care to + minimize the number of comparisons made during processing. + + Note that unlike the builtin ``max`` function, which always returns the first + item with the maximum value, this function may return another item when there are + ties. + + This function is based on the + `recipe `__ by + Raymond Hettinger. + """ + iterable = (iterable_or_value, *others) if others else iterable_or_value + + it = iter(iterable) + + try: + lo = hi = next(it) + except StopIteration as exc: + if default is _marker: + raise ValueError( + '`minmax()` argument is an empty iterable. ' + 'Provide a `default` value to suppress this error.' + ) from exc + return default + + # Different branches depending on the presence of key. This saves a lot + # of unimportant copies which would slow the "key=None" branch + # significantly down. + if key is None: + for x, y in zip_longest(it, it, fillvalue=lo): + if y < x: + x, y = y, x + if x < lo: + lo = x + if hi < y: + hi = y + + else: + lo_key = hi_key = key(lo) + + for x, y in zip_longest(it, it, fillvalue=lo): + x_key, y_key = key(x), key(y) + + if y_key < x_key: + x, y, x_key, y_key = y, x, y_key, x_key + if x_key < lo_key: + lo, lo_key = x, x_key + if hi_key < y_key: + hi, hi_key = y, y_key + + return lo, hi + + +def constrained_batches( + iterable, max_size, max_count=None, get_len=len, strict=True +): + """Yield batches of items from *iterable* with a combined size limited by + *max_size*. + + >>> iterable = [b'12345', b'123', b'12345678', b'1', b'1', b'12', b'1'] + >>> list(constrained_batches(iterable, 10)) + [(b'12345', b'123'), (b'12345678', b'1', b'1'), (b'12', b'1')] + + If a *max_count* is supplied, the number of items per batch is also + limited: + + >>> iterable = [b'12345', b'123', b'12345678', b'1', b'1', b'12', b'1'] + >>> list(constrained_batches(iterable, 10, max_count = 2)) + [(b'12345', b'123'), (b'12345678', b'1'), (b'1', b'12'), (b'1',)] + + If a *get_len* function is supplied, use that instead of :func:`len` to + determine item size. + + If *strict* is ``True``, raise ``ValueError`` if any single item is bigger + than *max_size*. Otherwise, allow single items to exceed *max_size*. + """ + if max_size <= 0: + raise ValueError('maximum size must be greater than zero') + + batch = [] + batch_size = 0 + batch_count = 0 + for item in iterable: + item_len = get_len(item) + if strict and item_len > max_size: + raise ValueError('item size exceeds maximum size') + + reached_count = batch_count == max_count + reached_size = item_len + batch_size > max_size + if batch_count and (reached_size or reached_count): + yield tuple(batch) + batch.clear() + batch_size = 0 + batch_count = 0 + + batch.append(item) + batch_size += item_len + batch_count += 1 + + if batch: + yield tuple(batch) + + +def gray_product(*iterables): + """Like :func:`itertools.product`, but return tuples in an order such + that only one element in the generated tuple changes from one iteration + to the next. + + >>> list(gray_product('AB','CD')) + [('A', 'C'), ('B', 'C'), ('B', 'D'), ('A', 'D')] + + This function consumes all of the input iterables before producing output. + If any of the input iterables have fewer than two items, ``ValueError`` + is raised. + + For information on the algorithm, see + `this section `__ + of Donald Knuth's *The Art of Computer Programming*. + """ + all_iterables = tuple(tuple(x) for x in iterables) + iterable_count = len(all_iterables) + for iterable in all_iterables: + if len(iterable) < 2: + raise ValueError("each iterable must have two or more items") + + # This is based on "Algorithm H" from section 7.2.1.1, page 20. + # a holds the indexes of the source iterables for the n-tuple to be yielded + # f is the array of "focus pointers" + # o is the array of "directions" + a = [0] * iterable_count + f = list(range(iterable_count + 1)) + o = [1] * iterable_count + while True: + yield tuple(all_iterables[i][a[i]] for i in range(iterable_count)) + j = f[0] + f[0] = 0 + if j == iterable_count: + break + a[j] = a[j] + o[j] + if a[j] == 0 or a[j] == len(all_iterables[j]) - 1: + o[j] = -o[j] + f[j] = f[j + 1] + f[j + 1] = j + 1 + + +def partial_product(*iterables): + """Yields tuples containing one item from each iterator, with subsequent + tuples changing a single item at a time by advancing each iterator until it + is exhausted. This sequence guarantees every value in each iterable is + output at least once without generating all possible combinations. + + This may be useful, for example, when testing an expensive function. + + >>> list(partial_product('AB', 'C', 'DEF')) + [('A', 'C', 'D'), ('B', 'C', 'D'), ('B', 'C', 'E'), ('B', 'C', 'F')] + """ + + iterators = list(map(iter, iterables)) + + try: + prod = [next(it) for it in iterators] + except StopIteration: + return + yield tuple(prod) + + for i, it in enumerate(iterators): + for prod[i] in it: + yield tuple(prod) + + +def takewhile_inclusive(predicate, iterable): + """A variant of :func:`takewhile` that yields one additional element. + + >>> list(takewhile_inclusive(lambda x: x < 5, [1, 4, 6, 4, 1])) + [1, 4, 6] + + :func:`takewhile` would return ``[1, 4]``. + """ + for x in iterable: + yield x + if not predicate(x): + break + + +def outer_product(func, xs, ys, *args, **kwargs): + """A generalized outer product that applies a binary function to all + pairs of items. Returns a 2D matrix with ``len(xs)`` rows and ``len(ys)`` + columns. + Also accepts ``*args`` and ``**kwargs`` that are passed to ``func``. + + Multiplication table: + + >>> list(outer_product(mul, range(1, 4), range(1, 6))) + [(1, 2, 3, 4, 5), (2, 4, 6, 8, 10), (3, 6, 9, 12, 15)] + + Cross tabulation: + + >>> xs = ['A', 'B', 'A', 'A', 'B', 'B', 'A', 'A', 'B', 'B'] + >>> ys = ['X', 'X', 'X', 'Y', 'Z', 'Z', 'Y', 'Y', 'Z', 'Z'] + >>> pair_counts = Counter(zip(xs, ys)) + >>> count_rows = lambda x, y: pair_counts[x, y] + >>> list(outer_product(count_rows, sorted(set(xs)), sorted(set(ys)))) + [(2, 3, 0), (1, 0, 4)] + + Usage with ``*args`` and ``**kwargs``: + + >>> animals = ['cat', 'wolf', 'mouse'] + >>> list(outer_product(min, animals, animals, key=len)) + [('cat', 'cat', 'cat'), ('cat', 'wolf', 'wolf'), ('cat', 'wolf', 'mouse')] + """ + ys = tuple(ys) + return batched( + starmap(lambda x, y: func(x, y, *args, **kwargs), product(xs, ys)), + n=len(ys), + ) + + +def iter_suppress(iterable, *exceptions): + """Yield each of the items from *iterable*. If the iteration raises one of + the specified *exceptions*, that exception will be suppressed and iteration + will stop. + + >>> from itertools import chain + >>> def breaks_at_five(x): + ... while True: + ... if x >= 5: + ... raise RuntimeError + ... yield x + ... x += 1 + >>> it_1 = iter_suppress(breaks_at_five(1), RuntimeError) + >>> it_2 = iter_suppress(breaks_at_five(2), RuntimeError) + >>> list(chain(it_1, it_2)) + [1, 2, 3, 4, 2, 3, 4] + """ + try: + yield from iterable + except exceptions: + return + + +def filter_map(func, iterable): + """Apply *func* to every element of *iterable*, yielding only those which + are not ``None``. + + >>> elems = ['1', 'a', '2', 'b', '3'] + >>> list(filter_map(lambda s: int(s) if s.isnumeric() else None, elems)) + [1, 2, 3] + """ + for x in iterable: + y = func(x) + if y is not None: + yield y + + +def powerset_of_sets(iterable): + """Yields all possible subsets of the iterable. + + >>> list(powerset_of_sets([1, 2, 3])) # doctest: +SKIP + [set(), {1}, {2}, {3}, {1, 2}, {1, 3}, {2, 3}, {1, 2, 3}] + >>> list(powerset_of_sets([1, 1, 0])) # doctest: +SKIP + [set(), {1}, {0}, {0, 1}] + + :func:`powerset_of_sets` takes care to minimize the number + of hash operations performed. + """ + sets = tuple(dict.fromkeys(map(frozenset, zip(iterable)))) + return chain.from_iterable( + starmap(set().union, combinations(sets, r)) + for r in range(len(sets) + 1) + ) + + +def join_mappings(**field_to_map): + """ + Joins multiple mappings together using their common keys. + + >>> user_scores = {'elliot': 50, 'claris': 60} + >>> user_times = {'elliot': 30, 'claris': 40} + >>> join_mappings(score=user_scores, time=user_times) + {'elliot': {'score': 50, 'time': 30}, 'claris': {'score': 60, 'time': 40}} + """ + ret = defaultdict(dict) + + for field_name, mapping in field_to_map.items(): + for key, value in mapping.items(): + ret[key][field_name] = value + + return dict(ret) + + +def _complex_sumprod(v1, v2): + """High precision sumprod() for complex numbers. + Used by :func:`dft` and :func:`idft`. + """ + + real = attrgetter('real') + imag = attrgetter('imag') + r1 = chain(map(real, v1), map(neg, map(imag, v1))) + r2 = chain(map(real, v2), map(imag, v2)) + i1 = chain(map(real, v1), map(imag, v1)) + i2 = chain(map(imag, v2), map(real, v2)) + return complex(_fsumprod(r1, r2), _fsumprod(i1, i2)) + + +def dft(xarr): + """Discrete Fourier Transform. *xarr* is a sequence of complex numbers. + Yields the components of the corresponding transformed output vector. + + >>> import cmath + >>> xarr = [1, 2-1j, -1j, -1+2j] # time domain + >>> Xarr = [2, -2-2j, -2j, 4+4j] # frequency domain + >>> magnitudes, phases = zip(*map(cmath.polar, Xarr)) + >>> all(map(cmath.isclose, dft(xarr), Xarr)) + True + + Inputs are restricted to numeric types that can add and multiply + with a complex number. This includes int, float, complex, and + Fraction, but excludes Decimal. + + See :func:`idft` for the inverse Discrete Fourier Transform. + """ + N = len(xarr) + roots_of_unity = [e ** (n / N * tau * -1j) for n in range(N)] + for k in range(N): + coeffs = [roots_of_unity[k * n % N] for n in range(N)] + yield _complex_sumprod(xarr, coeffs) + + +def idft(Xarr): + """Inverse Discrete Fourier Transform. *Xarr* is a sequence of + complex numbers. Yields the components of the corresponding + inverse-transformed output vector. + + >>> import cmath + >>> xarr = [1, 2-1j, -1j, -1+2j] # time domain + >>> Xarr = [2, -2-2j, -2j, 4+4j] # frequency domain + >>> all(map(cmath.isclose, idft(Xarr), xarr)) + True + + Inputs are restricted to numeric types that can add and multiply + with a complex number. This includes int, float, complex, and + Fraction, but excludes Decimal. + + See :func:`dft` for the Discrete Fourier Transform. + """ + N = len(Xarr) + roots_of_unity = [e ** (n / N * tau * 1j) for n in range(N)] + for k in range(N): + coeffs = [roots_of_unity[k * n % N] for n in range(N)] + yield _complex_sumprod(Xarr, coeffs) / N + + +def doublestarmap(func, iterable): + """Apply *func* to every item of *iterable* by dictionary unpacking + the item into *func*. + + The difference between :func:`itertools.starmap` and :func:`doublestarmap` + parallels the distinction between ``func(*a)`` and ``func(**a)``. + + >>> iterable = [{'a': 1, 'b': 2}, {'a': 40, 'b': 60}] + >>> list(doublestarmap(lambda a, b: a + b, iterable)) + [3, 100] + + ``TypeError`` will be raised if *func*'s signature doesn't match the + mapping contained in *iterable* or if *iterable* does not contain mappings. + """ + for item in iterable: + yield func(**item) + + +def _nth_prime_bounds(n): + """Bounds for the nth prime (counting from 1): lb < p_n < ub.""" + # At and above 688,383, the lb/ub spread is under 0.003 * p_n. + + if n < 1: + raise ValueError + + if n < 6: + return (n, 2.25 * n) + + # https://en.wikipedia.org/wiki/Prime-counting_function#Inequalities + upper_bound = n * log(n * log(n)) + lower_bound = upper_bound - n + if n >= 688_383: + upper_bound -= n * (1.0 - (log(log(n)) - 2.0) / log(n)) + + return lower_bound, upper_bound + + +def nth_prime(n, *, approximate=False): + """Return the nth prime (counting from 0). + + >>> nth_prime(0) + 2 + >>> nth_prime(100) + 547 + + If *approximate* is set to True, will return a prime close + to the nth prime. The estimation is much faster than computing + an exact result. + + >>> nth_prime(200_000_000, approximate=True) # Exact result is 4222234763 + 4217820427 + + """ + lb, ub = _nth_prime_bounds(n + 1) + + if not approximate or n <= 1_000_000: + return nth(sieve(ceil(ub)), n) + + # Search from the midpoint and return the first odd prime + odd = floor((lb + ub) / 2) | 1 + return first_true(count(odd, step=2), pred=is_prime) + + +def argmin(iterable, *, key=None): + """ + Index of the first occurrence of a minimum value in an iterable. + + >>> argmin('efghabcdijkl') + 4 + >>> argmin([3, 2, 1, 0, 4, 2, 1, 0]) + 3 + + For example, look up a label corresponding to the position + of a value that minimizes a cost function:: + + >>> def cost(x): + ... "Days for a wound to heal given a subject's age." + ... return x**2 - 20*x + 150 + ... + >>> labels = ['homer', 'marge', 'bart', 'lisa', 'maggie'] + >>> ages = [ 35, 30, 10, 9, 1 ] + + # Fastest healing family member + >>> labels[argmin(ages, key=cost)] + 'bart' + + # Age with fastest healing + >>> min(ages, key=cost) + 10 + + """ + if key is not None: + iterable = map(key, iterable) + return min(enumerate(iterable), key=itemgetter(1))[0] + + +def argmax(iterable, *, key=None): + """ + Index of the first occurrence of a maximum value in an iterable. + + >>> argmax('abcdefghabcd') + 7 + >>> argmax([0, 1, 2, 3, 3, 2, 1, 0]) + 3 + + For example, identify the best machine learning model:: + + >>> models = ['svm', 'random forest', 'knn', 'naïve bayes'] + >>> accuracy = [ 68, 61, 84, 72 ] + + # Most accurate model + >>> models[argmax(accuracy)] + 'knn' + + # Best accuracy + >>> max(accuracy) + 84 + + """ + if key is not None: + iterable = map(key, iterable) + return max(enumerate(iterable), key=itemgetter(1))[0] + + +def extract(iterable, indices): + """Yield values at the specified indices. + + Example: + + >>> data = 'abcdefghijklmnopqrstuvwxyz' + >>> list(extract(data, [7, 4, 11, 11, 14])) + ['h', 'e', 'l', 'l', 'o'] + + The *iterable* is consumed lazily and can be infinite. + The *indices* are consumed immediately and must be finite. + + Raises ``IndexError`` if an index lies beyond the iterable. + Raises ``ValueError`` for negative indices. + """ + + iterator = iter(iterable) + index_and_position = sorted(zip(indices, count())) + + if index_and_position and index_and_position[0][0] < 0: + raise ValueError('Indices must be non-negative') + + buffer = {} + iterator_position = -1 + next_to_emit = 0 + + for index, order in index_and_position: + advance = index - iterator_position + if advance: + try: + value = next(islice(iterator, advance - 1, None)) + except StopIteration: + raise IndexError(index) + iterator_position = index + + buffer[order] = value + + while next_to_emit in buffer: + yield buffer.pop(next_to_emit) + next_to_emit += 1 diff --git a/miniconda3/pkgs/more-itertools-10.8.0-py313h06a4308_0/lib/python3.13/site-packages/more_itertools/more.pyi b/miniconda3/pkgs/more-itertools-10.8.0-py313h06a4308_0/lib/python3.13/site-packages/more_itertools/more.pyi new file mode 100644 index 0000000000000000000000000000000000000000..b5e33f8b747f70ae8c842c07dca5005449241a62 --- /dev/null +++ b/miniconda3/pkgs/more-itertools-10.8.0-py313h06a4308_0/lib/python3.13/site-packages/more_itertools/more.pyi @@ -0,0 +1,949 @@ +"""Stubs for more_itertools.more""" + +from __future__ import annotations + +import sys +import types + +from collections.abc import ( + Container, + Hashable, + Iterable, + Iterator, + Mapping, + Reversible, + Sequence, + Sized, +) +from contextlib import AbstractContextManager +from typing import ( + Any, + Callable, + Generic, + TypeVar, + overload, + type_check_only, +) +from typing_extensions import Protocol + +__all__ = [ + 'AbortThread', + 'SequenceView', + 'UnequalIterablesError', + 'adjacent', + 'all_unique', + 'always_iterable', + 'always_reversible', + 'argmax', + 'argmin', + 'bucket', + 'callback_iter', + 'chunked', + 'chunked_even', + 'circular_shifts', + 'collapse', + 'combination_index', + 'combination_with_replacement_index', + 'consecutive_groups', + 'constrained_batches', + 'consumer', + 'count_cycle', + 'countable', + 'derangements', + 'dft', + 'difference', + 'distinct_combinations', + 'distinct_permutations', + 'distribute', + 'divide', + 'doublestarmap', + 'duplicates_everseen', + 'duplicates_justseen', + 'classify_unique', + 'exactly_n', + 'extract', + 'filter_except', + 'filter_map', + 'first', + 'gray_product', + 'groupby_transform', + 'ichunked', + 'iequals', + 'idft', + 'ilen', + 'interleave', + 'interleave_evenly', + 'interleave_longest', + 'interleave_randomly', + 'intersperse', + 'is_sorted', + 'islice_extended', + 'iterate', + 'iter_suppress', + 'join_mappings', + 'last', + 'locate', + 'longest_common_prefix', + 'lstrip', + 'make_decorator', + 'map_except', + 'map_if', + 'map_reduce', + 'mark_ends', + 'minmax', + 'nth_or_last', + 'nth_permutation', + 'nth_prime', + 'nth_product', + 'nth_combination_with_replacement', + 'numeric_range', + 'one', + 'only', + 'outer_product', + 'padded', + 'partial_product', + 'partitions', + 'peekable', + 'permutation_index', + 'powerset_of_sets', + 'product_index', + 'raise_', + 'repeat_each', + 'repeat_last', + 'replace', + 'rlocate', + 'rstrip', + 'run_length', + 'sample', + 'seekable', + 'set_partitions', + 'side_effect', + 'sliced', + 'sort_together', + 'split_after', + 'split_at', + 'split_before', + 'split_into', + 'split_when', + 'spy', + 'stagger', + 'strip', + 'strictly_n', + 'substrings', + 'substrings_indexes', + 'takewhile_inclusive', + 'time_limited', + 'unique_in_window', + 'unique_to_each', + 'unzip', + 'value_chain', + 'windowed', + 'windowed_complete', + 'with_iter', + 'zip_broadcast', + 'zip_equal', + 'zip_offset', +] + +# Type and type variable definitions +_T = TypeVar('_T') +_T1 = TypeVar('_T1') +_T2 = TypeVar('_T2') +_T3 = TypeVar('_T3') +_T4 = TypeVar('_T4') +_T5 = TypeVar('_T5') +_U = TypeVar('_U') +_V = TypeVar('_V') +_W = TypeVar('_W') +_T_co = TypeVar('_T_co', covariant=True) +_GenFn = TypeVar('_GenFn', bound=Callable[..., Iterator[Any]]) +_Raisable = BaseException | type[BaseException] + +# The type of isinstance's second argument (from typeshed builtins) +if sys.version_info >= (3, 10): + _ClassInfo = type | types.UnionType | tuple[_ClassInfo, ...] +else: + _ClassInfo = type | tuple[_ClassInfo, ...] + +@type_check_only +class _SizedIterable(Protocol[_T_co], Sized, Iterable[_T_co]): ... + +@type_check_only +class _SizedReversible(Protocol[_T_co], Sized, Reversible[_T_co]): ... + +@type_check_only +class _SupportsSlicing(Protocol[_T_co]): + def __getitem__(self, __k: slice) -> _T_co: ... + +def chunked( + iterable: Iterable[_T], n: int | None, strict: bool = ... +) -> Iterator[list[_T]]: ... +@overload +def first(iterable: Iterable[_T]) -> _T: ... +@overload +def first(iterable: Iterable[_T], default: _U) -> _T | _U: ... +@overload +def last(iterable: Iterable[_T]) -> _T: ... +@overload +def last(iterable: Iterable[_T], default: _U) -> _T | _U: ... +@overload +def nth_or_last(iterable: Iterable[_T], n: int) -> _T: ... +@overload +def nth_or_last(iterable: Iterable[_T], n: int, default: _U) -> _T | _U: ... + +class peekable(Generic[_T], Iterator[_T]): + def __init__(self, iterable: Iterable[_T]) -> None: ... + def __iter__(self) -> peekable[_T]: ... + def __bool__(self) -> bool: ... + @overload + def peek(self) -> _T: ... + @overload + def peek(self, default: _U) -> _T | _U: ... + def prepend(self, *items: _T) -> None: ... + def __next__(self) -> _T: ... + @overload + def __getitem__(self, index: int) -> _T: ... + @overload + def __getitem__(self, index: slice) -> list[_T]: ... + +def consumer(func: _GenFn) -> _GenFn: ... +def ilen(iterable: Iterable[_T]) -> int: ... +def iterate(func: Callable[[_T], _T], start: _T) -> Iterator[_T]: ... +def with_iter( + context_manager: AbstractContextManager[Iterable[_T]], +) -> Iterator[_T]: ... +def one( + iterable: Iterable[_T], + too_short: _Raisable | None = ..., + too_long: _Raisable | None = ..., +) -> _T: ... +def raise_(exception: _Raisable, *args: Any) -> None: ... +def strictly_n( + iterable: Iterable[_T], + n: int, + too_short: _GenFn | None = ..., + too_long: _GenFn | None = ..., +) -> list[_T]: ... +def distinct_permutations( + iterable: Iterable[_T], r: int | None = ... +) -> Iterator[tuple[_T, ...]]: ... +def derangements( + iterable: Iterable[_T], r: int | None = None +) -> Iterator[tuple[_T, ...]]: ... +def intersperse( + e: _U, iterable: Iterable[_T], n: int = ... +) -> Iterator[_T | _U]: ... +def unique_to_each(*iterables: Iterable[_T]) -> list[list[_T]]: ... +@overload +def windowed( + seq: Iterable[_T], n: int, *, step: int = ... +) -> Iterator[tuple[_T | None, ...]]: ... +@overload +def windowed( + seq: Iterable[_T], n: int, fillvalue: _U, step: int = ... +) -> Iterator[tuple[_T | _U, ...]]: ... +def substrings(iterable: Iterable[_T]) -> Iterator[tuple[_T, ...]]: ... +def substrings_indexes( + seq: Sequence[_T], reverse: bool = ... +) -> Iterator[tuple[Sequence[_T], int, int]]: ... + +class bucket(Generic[_T, _U], Container[_U]): + def __init__( + self, + iterable: Iterable[_T], + key: Callable[[_T], _U], + validator: Callable[[_U], object] | None = ..., + ) -> None: ... + def __contains__(self, value: object) -> bool: ... + def __iter__(self) -> Iterator[_U]: ... + def __getitem__(self, value: object) -> Iterator[_T]: ... + +def spy( + iterable: Iterable[_T], n: int = ... +) -> tuple[list[_T], Iterator[_T]]: ... +def interleave(*iterables: Iterable[_T]) -> Iterator[_T]: ... +def interleave_longest(*iterables: Iterable[_T]) -> Iterator[_T]: ... +def interleave_evenly( + iterables: list[Iterable[_T]], lengths: list[int] | None = ... +) -> Iterator[_T]: ... +def interleave_randomly(*iterables: Iterable[_T]) -> Iterable[_T]: ... +def collapse( + iterable: Iterable[Any], + base_type: _ClassInfo | None = ..., + levels: int | None = ..., +) -> Iterator[Any]: ... +@overload +def side_effect( + func: Callable[[_T], object], + iterable: Iterable[_T], + chunk_size: None = ..., + before: Callable[[], object] | None = ..., + after: Callable[[], object] | None = ..., +) -> Iterator[_T]: ... +@overload +def side_effect( + func: Callable[[list[_T]], object], + iterable: Iterable[_T], + chunk_size: int, + before: Callable[[], object] | None = ..., + after: Callable[[], object] | None = ..., +) -> Iterator[_T]: ... +def sliced( + seq: _SupportsSlicing[_T], n: int, strict: bool = ... +) -> Iterator[_T]: ... +def split_at( + iterable: Iterable[_T], + pred: Callable[[_T], object], + maxsplit: int = ..., + keep_separator: bool = ..., +) -> Iterator[list[_T]]: ... +def split_before( + iterable: Iterable[_T], pred: Callable[[_T], object], maxsplit: int = ... +) -> Iterator[list[_T]]: ... +def split_after( + iterable: Iterable[_T], pred: Callable[[_T], object], maxsplit: int = ... +) -> Iterator[list[_T]]: ... +def split_when( + iterable: Iterable[_T], + pred: Callable[[_T, _T], object], + maxsplit: int = ..., +) -> Iterator[list[_T]]: ... +def split_into( + iterable: Iterable[_T], sizes: Iterable[int | None] +) -> Iterator[list[_T]]: ... +@overload +def padded( + iterable: Iterable[_T], + *, + n: int | None = ..., + next_multiple: bool = ..., +) -> Iterator[_T | None]: ... +@overload +def padded( + iterable: Iterable[_T], + fillvalue: _U, + n: int | None = ..., + next_multiple: bool = ..., +) -> Iterator[_T | _U]: ... +@overload +def repeat_last(iterable: Iterable[_T]) -> Iterator[_T]: ... +@overload +def repeat_last(iterable: Iterable[_T], default: _U) -> Iterator[_T | _U]: ... +def distribute(n: int, iterable: Iterable[_T]) -> list[Iterator[_T]]: ... +@overload +def stagger( + iterable: Iterable[_T], + offsets: _SizedIterable[int] = ..., + longest: bool = ..., +) -> Iterator[tuple[_T | None, ...]]: ... +@overload +def stagger( + iterable: Iterable[_T], + offsets: _SizedIterable[int] = ..., + longest: bool = ..., + fillvalue: _U = ..., +) -> Iterator[tuple[_T | _U, ...]]: ... + +class UnequalIterablesError(ValueError): + def __init__(self, details: tuple[int, int, int] | None = ...) -> None: ... + +# zip_equal +@overload +def zip_equal(__iter1: Iterable[_T1]) -> Iterator[tuple[_T1]]: ... +@overload +def zip_equal( + __iter1: Iterable[_T1], __iter2: Iterable[_T2] +) -> Iterator[tuple[_T1, _T2]]: ... +@overload +def zip_equal( + __iter1: Iterable[_T1], __iter2: Iterable[_T2], __iter3: Iterable[_T3] +) -> Iterator[tuple[_T1, _T2, _T3]]: ... +@overload +def zip_equal( + __iter1: Iterable[_T1], + __iter2: Iterable[_T2], + __iter3: Iterable[_T3], + __iter4: Iterable[_T4], +) -> Iterator[tuple[_T1, _T2, _T3, _T4]]: ... +@overload +def zip_equal( + __iter1: Iterable[_T1], + __iter2: Iterable[_T2], + __iter3: Iterable[_T3], + __iter4: Iterable[_T4], + __iter5: Iterable[_T5], +) -> Iterator[tuple[_T1, _T2, _T3, _T4, _T5]]: ... +@overload +def zip_equal( + __iter1: Iterable[Any], + __iter2: Iterable[Any], + __iter3: Iterable[Any], + __iter4: Iterable[Any], + __iter5: Iterable[Any], + __iter6: Iterable[Any], + *iterables: Iterable[Any], +) -> Iterator[tuple[Any, ...]]: ... + +# zip_offset +@overload +def zip_offset( + __iter1: Iterable[_T1], + *, + offsets: _SizedIterable[int], + longest: bool = ..., + fillvalue: None = None, +) -> Iterator[tuple[_T1 | None]]: ... +@overload +def zip_offset( + __iter1: Iterable[_T1], + __iter2: Iterable[_T2], + *, + offsets: _SizedIterable[int], + longest: bool = ..., + fillvalue: None = None, +) -> Iterator[tuple[_T1 | None, _T2 | None]]: ... +@overload +def zip_offset( + __iter1: Iterable[_T], + __iter2: Iterable[_T], + __iter3: Iterable[_T], + *iterables: Iterable[_T], + offsets: _SizedIterable[int], + longest: bool = ..., + fillvalue: None = None, +) -> Iterator[tuple[_T | None, ...]]: ... +@overload +def zip_offset( + __iter1: Iterable[_T1], + *, + offsets: _SizedIterable[int], + longest: bool = ..., + fillvalue: _U, +) -> Iterator[tuple[_T1 | _U]]: ... +@overload +def zip_offset( + __iter1: Iterable[_T1], + __iter2: Iterable[_T2], + *, + offsets: _SizedIterable[int], + longest: bool = ..., + fillvalue: _U, +) -> Iterator[tuple[_T1 | _U, _T2 | _U]]: ... +@overload +def zip_offset( + __iter1: Iterable[_T], + __iter2: Iterable[_T], + __iter3: Iterable[_T], + *iterables: Iterable[_T], + offsets: _SizedIterable[int], + longest: bool = ..., + fillvalue: _U, +) -> Iterator[tuple[_T | _U, ...]]: ... +def sort_together( + iterables: Iterable[Iterable[_T]], + key_list: Iterable[int] = ..., + key: Callable[..., Any] | None = ..., + reverse: bool = ..., + strict: bool = ..., +) -> list[tuple[_T, ...]]: ... +def unzip(iterable: Iterable[Sequence[_T]]) -> tuple[Iterator[_T], ...]: ... +def divide(n: int, iterable: Iterable[_T]) -> list[Iterator[_T]]: ... +def always_iterable( + obj: object, + base_type: _ClassInfo | None = ..., +) -> Iterator[Any]: ... +def adjacent( + predicate: Callable[[_T], bool], + iterable: Iterable[_T], + distance: int = ..., +) -> Iterator[tuple[bool, _T]]: ... +@overload +def groupby_transform( + iterable: Iterable[_T], + keyfunc: None = None, + valuefunc: None = None, + reducefunc: None = None, +) -> Iterator[tuple[_T, Iterator[_T]]]: ... +@overload +def groupby_transform( + iterable: Iterable[_T], + keyfunc: Callable[[_T], _U], + valuefunc: None, + reducefunc: None, +) -> Iterator[tuple[_U, Iterator[_T]]]: ... +@overload +def groupby_transform( + iterable: Iterable[_T], + keyfunc: None, + valuefunc: Callable[[_T], _V], + reducefunc: None, +) -> Iterator[tuple[_T, Iterator[_V]]]: ... +@overload +def groupby_transform( + iterable: Iterable[_T], + keyfunc: Callable[[_T], _U], + valuefunc: Callable[[_T], _V], + reducefunc: None, +) -> Iterator[tuple[_U, Iterator[_V]]]: ... +@overload +def groupby_transform( + iterable: Iterable[_T], + keyfunc: None, + valuefunc: None, + reducefunc: Callable[[Iterator[_T]], _W], +) -> Iterator[tuple[_T, _W]]: ... +@overload +def groupby_transform( + iterable: Iterable[_T], + keyfunc: Callable[[_T], _U], + valuefunc: None, + reducefunc: Callable[[Iterator[_T]], _W], +) -> Iterator[tuple[_U, _W]]: ... +@overload +def groupby_transform( + iterable: Iterable[_T], + keyfunc: None, + valuefunc: Callable[[_T], _V], + reducefunc: Callable[[Iterator[_V]], _W], +) -> Iterator[tuple[_T, _W]]: ... +@overload +def groupby_transform( + iterable: Iterable[_T], + keyfunc: Callable[[_T], _U], + valuefunc: Callable[[_T], _V], + reducefunc: Callable[[Iterator[_V]], _W], +) -> Iterator[tuple[_U, _W]]: ... + +class numeric_range(Generic[_T, _U], Sequence[_T], Hashable, Reversible[_T]): + @overload + def __init__(self, __stop: _T) -> None: ... + @overload + def __init__(self, __start: _T, __stop: _T) -> None: ... + @overload + def __init__(self, __start: _T, __stop: _T, __step: _U) -> None: ... + def __bool__(self) -> bool: ... + def __contains__(self, elem: object) -> bool: ... + def __eq__(self, other: object) -> bool: ... + @overload + def __getitem__(self, key: int) -> _T: ... + @overload + def __getitem__(self, key: slice) -> numeric_range[_T, _U]: ... + def __hash__(self) -> int: ... + def __iter__(self) -> Iterator[_T]: ... + def __len__(self) -> int: ... + def __reduce__( + self, + ) -> tuple[type[numeric_range[_T, _U]], tuple[_T, _T, _U]]: ... + def __repr__(self) -> str: ... + def __reversed__(self) -> Iterator[_T]: ... + def count(self, value: _T) -> int: ... + def index(self, value: _T) -> int: ... # type: ignore + +def count_cycle( + iterable: Iterable[_T], n: int | None = ... +) -> Iterable[tuple[int, _T]]: ... +def mark_ends( + iterable: Iterable[_T], +) -> Iterable[tuple[bool, bool, _T]]: ... +def locate( + iterable: Iterable[_T], + pred: Callable[..., Any] = ..., + window_size: int | None = ..., +) -> Iterator[int]: ... +def lstrip( + iterable: Iterable[_T], pred: Callable[[_T], object] +) -> Iterator[_T]: ... +def rstrip( + iterable: Iterable[_T], pred: Callable[[_T], object] +) -> Iterator[_T]: ... +def strip( + iterable: Iterable[_T], pred: Callable[[_T], object] +) -> Iterator[_T]: ... + +class islice_extended(Generic[_T], Iterator[_T]): + def __init__(self, iterable: Iterable[_T], *args: int | None) -> None: ... + def __iter__(self) -> islice_extended[_T]: ... + def __next__(self) -> _T: ... + def __getitem__(self, index: slice) -> islice_extended[_T]: ... + +def always_reversible(iterable: Iterable[_T]) -> Iterator[_T]: ... +def consecutive_groups( + iterable: Iterable[_T], ordering: None | Callable[[_T], int] = ... +) -> Iterator[Iterator[_T]]: ... +@overload +def difference( + iterable: Iterable[_T], + func: Callable[[_T, _T], _U] = ..., + *, + initial: None = ..., +) -> Iterator[_T | _U]: ... +@overload +def difference( + iterable: Iterable[_T], func: Callable[[_T, _T], _U] = ..., *, initial: _U +) -> Iterator[_U]: ... + +class SequenceView(Generic[_T], Sequence[_T]): + def __init__(self, target: Sequence[_T]) -> None: ... + @overload + def __getitem__(self, index: int) -> _T: ... + @overload + def __getitem__(self, index: slice) -> Sequence[_T]: ... + def __len__(self) -> int: ... + +class seekable(Generic[_T], Iterator[_T]): + def __init__( + self, iterable: Iterable[_T], maxlen: int | None = ... + ) -> None: ... + def __iter__(self) -> seekable[_T]: ... + def __next__(self) -> _T: ... + def __bool__(self) -> bool: ... + @overload + def peek(self) -> _T: ... + @overload + def peek(self, default: _U) -> _T | _U: ... + def elements(self) -> SequenceView[_T]: ... + def seek(self, index: int) -> None: ... + def relative_seek(self, count: int) -> None: ... + +class run_length: + @staticmethod + def encode(iterable: Iterable[_T]) -> Iterator[tuple[_T, int]]: ... + @staticmethod + def decode(iterable: Iterable[tuple[_T, int]]) -> Iterator[_T]: ... + +def exactly_n( + iterable: Iterable[_T], n: int, predicate: Callable[[_T], object] = ... +) -> bool: ... +def circular_shifts( + iterable: Iterable[_T], steps: int = 1 +) -> list[tuple[_T, ...]]: ... +def make_decorator( + wrapping_func: Callable[..., _U], result_index: int = ... +) -> Callable[..., Callable[[Callable[..., Any]], Callable[..., _U]]]: ... +@overload +def map_reduce( + iterable: Iterable[_T], + keyfunc: Callable[[_T], _U], + valuefunc: None = ..., + reducefunc: None = ..., +) -> dict[_U, list[_T]]: ... +@overload +def map_reduce( + iterable: Iterable[_T], + keyfunc: Callable[[_T], _U], + valuefunc: Callable[[_T], _V], + reducefunc: None = ..., +) -> dict[_U, list[_V]]: ... +@overload +def map_reduce( + iterable: Iterable[_T], + keyfunc: Callable[[_T], _U], + valuefunc: None = ..., + reducefunc: Callable[[list[_T]], _W] = ..., +) -> dict[_U, _W]: ... +@overload +def map_reduce( + iterable: Iterable[_T], + keyfunc: Callable[[_T], _U], + valuefunc: Callable[[_T], _V], + reducefunc: Callable[[list[_V]], _W], +) -> dict[_U, _W]: ... +def rlocate( + iterable: Iterable[_T], + pred: Callable[..., object] = ..., + window_size: int | None = ..., +) -> Iterator[int]: ... +def replace( + iterable: Iterable[_T], + pred: Callable[..., object], + substitutes: Iterable[_U], + count: int | None = ..., + window_size: int = ..., +) -> Iterator[_T | _U]: ... +def partitions(iterable: Iterable[_T]) -> Iterator[list[list[_T]]]: ... +def set_partitions( + iterable: Iterable[_T], + k: int | None = ..., + min_size: int | None = ..., + max_size: int | None = ..., +) -> Iterator[list[list[_T]]]: ... + +class time_limited(Generic[_T], Iterator[_T]): + def __init__( + self, limit_seconds: float, iterable: Iterable[_T] + ) -> None: ... + def __iter__(self) -> islice_extended[_T]: ... + def __next__(self) -> _T: ... + +@overload +def only( + iterable: Iterable[_T], *, too_long: _Raisable | None = ... +) -> _T | None: ... +@overload +def only( + iterable: Iterable[_T], default: _U, too_long: _Raisable | None = ... +) -> _T | _U: ... +def ichunked(iterable: Iterable[_T], n: int) -> Iterator[Iterator[_T]]: ... +def distinct_combinations( + iterable: Iterable[_T], r: int +) -> Iterator[tuple[_T, ...]]: ... +def filter_except( + validator: Callable[[Any], object], + iterable: Iterable[_T], + *exceptions: type[BaseException], +) -> Iterator[_T]: ... +def map_except( + function: Callable[[Any], _U], + iterable: Iterable[_T], + *exceptions: type[BaseException], +) -> Iterator[_U]: ... +def map_if( + iterable: Iterable[Any], + pred: Callable[[Any], bool], + func: Callable[[Any], Any], + func_else: Callable[[Any], Any] | None = ..., +) -> Iterator[Any]: ... +def _sample_unweighted( + iterator: Iterator[_T], k: int, strict: bool +) -> list[_T]: ... +def _sample_counted( + population: Iterator[_T], k: int, counts: Iterable[int], strict: bool +) -> list[_T]: ... +def _sample_weighted( + iterator: Iterator[_T], k: int, weights: Iterator[float], strict: bool +) -> list[_T]: ... +def sample( + iterable: Iterable[_T], + k: int, + weights: Iterable[float] | None = ..., + *, + counts: Iterable[int] | None = ..., + strict: bool = False, +) -> list[_T]: ... +def is_sorted( + iterable: Iterable[_T], + key: Callable[[_T], _U] | None = ..., + reverse: bool = False, + strict: bool = False, +) -> bool: ... + +class AbortThread(BaseException): + pass + +class callback_iter(Generic[_T], Iterator[_T]): + def __init__( + self, + func: Callable[..., Any], + callback_kwd: str = ..., + wait_seconds: float = ..., + ) -> None: ... + def __enter__(self) -> callback_iter[_T]: ... + def __exit__( + self, + exc_type: type[BaseException] | None, + exc_value: BaseException | None, + traceback: types.TracebackType | None, + ) -> bool | None: ... + def __iter__(self) -> callback_iter[_T]: ... + def __next__(self) -> _T: ... + def _reader(self) -> Iterator[_T]: ... + @property + def done(self) -> bool: ... + @property + def result(self) -> Any: ... + +def windowed_complete( + iterable: Iterable[_T], n: int +) -> Iterator[tuple[tuple[_T, ...], tuple[_T, ...], tuple[_T, ...]]]: ... +def all_unique( + iterable: Iterable[_T], key: Callable[[_T], _U] | None = ... +) -> bool: ... +def nth_product(index: int, *args: Iterable[_T]) -> tuple[_T, ...]: ... +def nth_combination_with_replacement( + iterable: Iterable[_T], r: int, index: int +) -> tuple[_T, ...]: ... +def nth_permutation( + iterable: Iterable[_T], r: int, index: int +) -> tuple[_T, ...]: ... +def value_chain(*args: _T | Iterable[_T]) -> Iterable[_T]: ... +def product_index(element: Iterable[_T], *args: Iterable[_T]) -> int: ... +def combination_index( + element: Iterable[_T], iterable: Iterable[_T] +) -> int: ... +def combination_with_replacement_index( + element: Iterable[_T], iterable: Iterable[_T] +) -> int: ... +def permutation_index( + element: Iterable[_T], iterable: Iterable[_T] +) -> int: ... +def repeat_each(iterable: Iterable[_T], n: int = ...) -> Iterator[_T]: ... + +class countable(Generic[_T], Iterator[_T]): + def __init__(self, iterable: Iterable[_T]) -> None: ... + def __iter__(self) -> countable[_T]: ... + def __next__(self) -> _T: ... + items_seen: int + +def chunked_even(iterable: Iterable[_T], n: int) -> Iterator[list[_T]]: ... +@overload +def zip_broadcast( + __obj1: _T | Iterable[_T], + *, + scalar_types: _ClassInfo | None = ..., + strict: bool = ..., +) -> Iterable[tuple[_T, ...]]: ... +@overload +def zip_broadcast( + __obj1: _T | Iterable[_T], + __obj2: _T | Iterable[_T], + *, + scalar_types: _ClassInfo | None = ..., + strict: bool = ..., +) -> Iterable[tuple[_T, ...]]: ... +@overload +def zip_broadcast( + __obj1: _T | Iterable[_T], + __obj2: _T | Iterable[_T], + __obj3: _T | Iterable[_T], + *, + scalar_types: _ClassInfo | None = ..., + strict: bool = ..., +) -> Iterable[tuple[_T, ...]]: ... +@overload +def zip_broadcast( + __obj1: _T | Iterable[_T], + __obj2: _T | Iterable[_T], + __obj3: _T | Iterable[_T], + __obj4: _T | Iterable[_T], + *, + scalar_types: _ClassInfo | None = ..., + strict: bool = ..., +) -> Iterable[tuple[_T, ...]]: ... +@overload +def zip_broadcast( + __obj1: _T | Iterable[_T], + __obj2: _T | Iterable[_T], + __obj3: _T | Iterable[_T], + __obj4: _T | Iterable[_T], + __obj5: _T | Iterable[_T], + *, + scalar_types: _ClassInfo | None = ..., + strict: bool = ..., +) -> Iterable[tuple[_T, ...]]: ... +@overload +def zip_broadcast( + __obj1: _T | Iterable[_T], + __obj2: _T | Iterable[_T], + __obj3: _T | Iterable[_T], + __obj4: _T | Iterable[_T], + __obj5: _T | Iterable[_T], + __obj6: _T | Iterable[_T], + *objects: _T | Iterable[_T], + scalar_types: _ClassInfo | None = ..., + strict: bool = ..., +) -> Iterable[tuple[_T, ...]]: ... +def unique_in_window( + iterable: Iterable[_T], n: int, key: Callable[[_T], _U] | None = ... +) -> Iterator[_T]: ... +def duplicates_everseen( + iterable: Iterable[_T], key: Callable[[_T], _U] | None = ... +) -> Iterator[_T]: ... +def duplicates_justseen( + iterable: Iterable[_T], key: Callable[[_T], _U] | None = ... +) -> Iterator[_T]: ... +def classify_unique( + iterable: Iterable[_T], key: Callable[[_T], _U] | None = ... +) -> Iterator[tuple[_T, bool, bool]]: ... + +class _SupportsLessThan(Protocol): + def __lt__(self, __other: Any) -> bool: ... + +_SupportsLessThanT = TypeVar("_SupportsLessThanT", bound=_SupportsLessThan) + +@overload +def minmax( + iterable_or_value: Iterable[_SupportsLessThanT], *, key: None = None +) -> tuple[_SupportsLessThanT, _SupportsLessThanT]: ... +@overload +def minmax( + iterable_or_value: Iterable[_T], *, key: Callable[[_T], _SupportsLessThan] +) -> tuple[_T, _T]: ... +@overload +def minmax( + iterable_or_value: Iterable[_SupportsLessThanT], + *, + key: None = None, + default: _U, +) -> _U | tuple[_SupportsLessThanT, _SupportsLessThanT]: ... +@overload +def minmax( + iterable_or_value: Iterable[_T], + *, + key: Callable[[_T], _SupportsLessThan], + default: _U, +) -> _U | tuple[_T, _T]: ... +@overload +def minmax( + iterable_or_value: _SupportsLessThanT, + __other: _SupportsLessThanT, + *others: _SupportsLessThanT, +) -> tuple[_SupportsLessThanT, _SupportsLessThanT]: ... +@overload +def minmax( + iterable_or_value: _T, + __other: _T, + *others: _T, + key: Callable[[_T], _SupportsLessThan], +) -> tuple[_T, _T]: ... +def longest_common_prefix( + iterables: Iterable[Iterable[_T]], +) -> Iterator[_T]: ... +def iequals(*iterables: Iterable[Any]) -> bool: ... +def constrained_batches( + iterable: Iterable[_T], + max_size: int, + max_count: int | None = ..., + get_len: Callable[[_T], object] = ..., + strict: bool = ..., +) -> Iterator[tuple[_T]]: ... +def gray_product(*iterables: Iterable[_T]) -> Iterator[tuple[_T, ...]]: ... +def partial_product(*iterables: Iterable[_T]) -> Iterator[tuple[_T, ...]]: ... +def takewhile_inclusive( + predicate: Callable[[_T], bool], iterable: Iterable[_T] +) -> Iterator[_T]: ... +def outer_product( + func: Callable[[_T, _U], _V], + xs: Iterable[_T], + ys: Iterable[_U], + *args: Any, + **kwargs: Any, +) -> Iterator[tuple[_V, ...]]: ... +def iter_suppress( + iterable: Iterable[_T], + *exceptions: type[BaseException], +) -> Iterator[_T]: ... +def filter_map( + func: Callable[[_T], _V | None], + iterable: Iterable[_T], +) -> Iterator[_V]: ... +def powerset_of_sets(iterable: Iterable[_T]) -> Iterator[set[_T]]: ... +def join_mappings( + **field_to_map: Mapping[_T, _V], +) -> dict[_T, dict[str, _V]]: ... +def doublestarmap( + func: Callable[..., _T], + iterable: Iterable[Mapping[str, Any]], +) -> Iterator[_T]: ... +def dft(xarr: Sequence[complex]) -> Iterator[complex]: ... +def idft(Xarr: Sequence[complex]) -> Iterator[complex]: ... +def _nth_prime_ub(n: int) -> float: ... +def nth_prime(n: int, *, approximate: bool = ...) -> int: ... +def argmin( + iterable: Iterable[_T], *, key: Callable[[_T], _U] | None = ... +) -> int: ... +def argmax( + iterable: Iterable[_T], *, key: Callable[[_T], _U] | None = ... +) -> int: ... +def extract( + iterable: Iterable[_T], indices: Iterable[int] +) -> Iterator[_T]: ... diff --git a/miniconda3/pkgs/more-itertools-10.8.0-py313h06a4308_0/lib/python3.13/site-packages/more_itertools/py.typed b/miniconda3/pkgs/more-itertools-10.8.0-py313h06a4308_0/lib/python3.13/site-packages/more_itertools/py.typed new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/miniconda3/pkgs/more-itertools-10.8.0-py313h06a4308_0/lib/python3.13/site-packages/more_itertools/recipes.py b/miniconda3/pkgs/more-itertools-10.8.0-py313h06a4308_0/lib/python3.13/site-packages/more_itertools/recipes.py new file mode 100644 index 0000000000000000000000000000000000000000..dacf61407d454907d661edde2d774bee11cec92a --- /dev/null +++ b/miniconda3/pkgs/more-itertools-10.8.0-py313h06a4308_0/lib/python3.13/site-packages/more_itertools/recipes.py @@ -0,0 +1,1471 @@ +"""Imported from the recipes section of the itertools documentation. + +All functions taken from the recipes section of the itertools library docs +[1]_. +Some backward-compatible usability improvements have been made. + +.. [1] http://docs.python.org/library/itertools.html#recipes + +""" + +import random + +from bisect import bisect_left, insort +from collections import deque +from contextlib import suppress +from functools import lru_cache, partial, reduce +from heapq import heappush, heappushpop +from itertools import ( + accumulate, + chain, + combinations, + compress, + count, + cycle, + groupby, + islice, + product, + repeat, + starmap, + takewhile, + tee, + zip_longest, +) +from math import prod, comb, isqrt, gcd +from operator import mul, not_, itemgetter, getitem, index +from random import randrange, sample, choice +from sys import hexversion + +__all__ = [ + 'all_equal', + 'batched', + 'before_and_after', + 'consume', + 'convolve', + 'dotproduct', + 'first_true', + 'factor', + 'flatten', + 'grouper', + 'is_prime', + 'iter_except', + 'iter_index', + 'loops', + 'matmul', + 'multinomial', + 'ncycles', + 'nth', + 'nth_combination', + 'padnone', + 'pad_none', + 'pairwise', + 'partition', + 'polynomial_eval', + 'polynomial_from_roots', + 'polynomial_derivative', + 'powerset', + 'prepend', + 'quantify', + 'reshape', + 'random_combination_with_replacement', + 'random_combination', + 'random_permutation', + 'random_product', + 'repeatfunc', + 'roundrobin', + 'running_median', + 'sieve', + 'sliding_window', + 'subslices', + 'sum_of_squares', + 'tabulate', + 'tail', + 'take', + 'totient', + 'transpose', + 'triplewise', + 'unique', + 'unique_everseen', + 'unique_justseen', +] + +_marker = object() + + +# zip with strict is available for Python 3.10+ +try: + zip(strict=True) +except TypeError: # pragma: no cover + _zip_strict = zip +else: # pragma: no cover + _zip_strict = partial(zip, strict=True) + + +# math.sumprod is available for Python 3.12+ +try: + from math import sumprod as _sumprod +except ImportError: # pragma: no cover + _sumprod = lambda x, y: dotproduct(x, y) + + +# heapq max-heap functions are available for Python 3.14+ +try: + from heapq import heappush_max, heappushpop_max +except ImportError: # pragma: no cover + _max_heap_available = False +else: # pragma: no cover + _max_heap_available = True + + +def take(n, iterable): + """Return first *n* items of the *iterable* as a list. + + >>> take(3, range(10)) + [0, 1, 2] + + If there are fewer than *n* items in the iterable, all of them are + returned. + + >>> take(10, range(3)) + [0, 1, 2] + + """ + return list(islice(iterable, n)) + + +def tabulate(function, start=0): + """Return an iterator over the results of ``func(start)``, + ``func(start + 1)``, ``func(start + 2)``... + + *func* should be a function that accepts one integer argument. + + If *start* is not specified it defaults to 0. It will be incremented each + time the iterator is advanced. + + >>> square = lambda x: x ** 2 + >>> iterator = tabulate(square, -3) + >>> take(4, iterator) + [9, 4, 1, 0] + + """ + return map(function, count(start)) + + +def tail(n, iterable): + """Return an iterator over the last *n* items of *iterable*. + + >>> t = tail(3, 'ABCDEFG') + >>> list(t) + ['E', 'F', 'G'] + + """ + try: + size = len(iterable) + except TypeError: + return iter(deque(iterable, maxlen=n)) + else: + return islice(iterable, max(0, size - n), None) + + +def consume(iterator, n=None): + """Advance *iterable* by *n* steps. If *n* is ``None``, consume it + entirely. + + Efficiently exhausts an iterator without returning values. Defaults to + consuming the whole iterator, but an optional second argument may be + provided to limit consumption. + + >>> i = (x for x in range(10)) + >>> next(i) + 0 + >>> consume(i, 3) + >>> next(i) + 4 + >>> consume(i) + >>> next(i) + Traceback (most recent call last): + File "", line 1, in + StopIteration + + If the iterator has fewer items remaining than the provided limit, the + whole iterator will be consumed. + + >>> i = (x for x in range(3)) + >>> consume(i, 5) + >>> next(i) + Traceback (most recent call last): + File "", line 1, in + StopIteration + + """ + # Use functions that consume iterators at C speed. + if n is None: + # feed the entire iterator into a zero-length deque + deque(iterator, maxlen=0) + else: + # advance to the empty slice starting at position n + next(islice(iterator, n, n), None) + + +def nth(iterable, n, default=None): + """Returns the nth item or a default value. + + >>> l = range(10) + >>> nth(l, 3) + 3 + >>> nth(l, 20, "zebra") + 'zebra' + + """ + return next(islice(iterable, n, None), default) + + +def all_equal(iterable, key=None): + """ + Returns ``True`` if all the elements are equal to each other. + + >>> all_equal('aaaa') + True + >>> all_equal('aaab') + False + + A function that accepts a single argument and returns a transformed version + of each input item can be specified with *key*: + + >>> all_equal('AaaA', key=str.casefold) + True + >>> all_equal([1, 2, 3], key=lambda x: x < 10) + True + + """ + iterator = groupby(iterable, key) + for first in iterator: + for second in iterator: + return False + return True + return True + + +def quantify(iterable, pred=bool): + """Return the how many times the predicate is true. + + >>> quantify([True, False, True]) + 2 + + """ + return sum(map(pred, iterable)) + + +def pad_none(iterable): + """Returns the sequence of elements and then returns ``None`` indefinitely. + + >>> take(5, pad_none(range(3))) + [0, 1, 2, None, None] + + Useful for emulating the behavior of the built-in :func:`map` function. + + See also :func:`padded`. + + """ + return chain(iterable, repeat(None)) + + +padnone = pad_none + + +def ncycles(iterable, n): + """Returns the sequence elements *n* times + + >>> list(ncycles(["a", "b"], 3)) + ['a', 'b', 'a', 'b', 'a', 'b'] + + """ + return chain.from_iterable(repeat(tuple(iterable), n)) + + +def dotproduct(vec1, vec2): + """Returns the dot product of the two iterables. + + >>> dotproduct([10, 15, 12], [0.65, 0.80, 1.25]) + 33.5 + >>> 10 * 0.65 + 15 * 0.80 + 12 * 1.25 + 33.5 + + In Python 3.12 and later, use ``math.sumprod()`` instead. + """ + return sum(map(mul, vec1, vec2)) + + +def flatten(listOfLists): + """Return an iterator flattening one level of nesting in a list of lists. + + >>> list(flatten([[0, 1], [2, 3]])) + [0, 1, 2, 3] + + See also :func:`collapse`, which can flatten multiple levels of nesting. + + """ + return chain.from_iterable(listOfLists) + + +def repeatfunc(func, times=None, *args): + """Call *func* with *args* repeatedly, returning an iterable over the + results. + + If *times* is specified, the iterable will terminate after that many + repetitions: + + >>> from operator import add + >>> times = 4 + >>> args = 3, 5 + >>> list(repeatfunc(add, times, *args)) + [8, 8, 8, 8] + + If *times* is ``None`` the iterable will not terminate: + + >>> from random import randrange + >>> times = None + >>> args = 1, 11 + >>> take(6, repeatfunc(randrange, times, *args)) # doctest:+SKIP + [2, 4, 8, 1, 8, 4] + + """ + if times is None: + return starmap(func, repeat(args)) + return starmap(func, repeat(args, times)) + + +def _pairwise(iterable): + """Returns an iterator of paired items, overlapping, from the original + + >>> take(4, pairwise(count())) + [(0, 1), (1, 2), (2, 3), (3, 4)] + + On Python 3.10 and above, this is an alias for :func:`itertools.pairwise`. + + """ + a, b = tee(iterable) + next(b, None) + return zip(a, b) + + +try: + from itertools import pairwise as itertools_pairwise +except ImportError: # pragma: no cover + pairwise = _pairwise +else: # pragma: no cover + + def pairwise(iterable): + return itertools_pairwise(iterable) + + pairwise.__doc__ = _pairwise.__doc__ + + +class UnequalIterablesError(ValueError): + def __init__(self, details=None): + msg = 'Iterables have different lengths' + if details is not None: + msg += (': index 0 has length {}; index {} has length {}').format( + *details + ) + + super().__init__(msg) + + +def _zip_equal_generator(iterables): + for combo in zip_longest(*iterables, fillvalue=_marker): + for val in combo: + if val is _marker: + raise UnequalIterablesError() + yield combo + + +def _zip_equal(*iterables): + # Check whether the iterables are all the same size. + try: + first_size = len(iterables[0]) + for i, it in enumerate(iterables[1:], 1): + size = len(it) + if size != first_size: + raise UnequalIterablesError(details=(first_size, i, size)) + # All sizes are equal, we can use the built-in zip. + return zip(*iterables) + # If any one of the iterables didn't have a length, start reading + # them until one runs out. + except TypeError: + return _zip_equal_generator(iterables) + + +def grouper(iterable, n, incomplete='fill', fillvalue=None): + """Group elements from *iterable* into fixed-length groups of length *n*. + + >>> list(grouper('ABCDEF', 3)) + [('A', 'B', 'C'), ('D', 'E', 'F')] + + The keyword arguments *incomplete* and *fillvalue* control what happens for + iterables whose length is not a multiple of *n*. + + When *incomplete* is `'fill'`, the last group will contain instances of + *fillvalue*. + + >>> list(grouper('ABCDEFG', 3, incomplete='fill', fillvalue='x')) + [('A', 'B', 'C'), ('D', 'E', 'F'), ('G', 'x', 'x')] + + When *incomplete* is `'ignore'`, the last group will not be emitted. + + >>> list(grouper('ABCDEFG', 3, incomplete='ignore', fillvalue='x')) + [('A', 'B', 'C'), ('D', 'E', 'F')] + + When *incomplete* is `'strict'`, a subclass of `ValueError` will be raised. + + >>> iterator = grouper('ABCDEFG', 3, incomplete='strict') + >>> list(iterator) # doctest: +IGNORE_EXCEPTION_DETAIL + Traceback (most recent call last): + ... + UnequalIterablesError + + """ + iterators = [iter(iterable)] * n + if incomplete == 'fill': + return zip_longest(*iterators, fillvalue=fillvalue) + if incomplete == 'strict': + return _zip_equal(*iterators) + if incomplete == 'ignore': + return zip(*iterators) + else: + raise ValueError('Expected fill, strict, or ignore') + + +def roundrobin(*iterables): + """Visit input iterables in a cycle until each is exhausted. + + >>> list(roundrobin('ABC', 'D', 'EF')) + ['A', 'D', 'E', 'B', 'F', 'C'] + + This function produces the same output as :func:`interleave_longest`, but + may perform better for some inputs (in particular when the number of + iterables is small). + + """ + # Algorithm credited to George Sakkis + iterators = map(iter, iterables) + for num_active in range(len(iterables), 0, -1): + iterators = cycle(islice(iterators, num_active)) + yield from map(next, iterators) + + +def partition(pred, iterable): + """ + Returns a 2-tuple of iterables derived from the input iterable. + The first yields the items that have ``pred(item) == False``. + The second yields the items that have ``pred(item) == True``. + + >>> is_odd = lambda x: x % 2 != 0 + >>> iterable = range(10) + >>> even_items, odd_items = partition(is_odd, iterable) + >>> list(even_items), list(odd_items) + ([0, 2, 4, 6, 8], [1, 3, 5, 7, 9]) + + If *pred* is None, :func:`bool` is used. + + >>> iterable = [0, 1, False, True, '', ' '] + >>> false_items, true_items = partition(None, iterable) + >>> list(false_items), list(true_items) + ([0, False, ''], [1, True, ' ']) + + """ + if pred is None: + pred = bool + + t1, t2, p = tee(iterable, 3) + p1, p2 = tee(map(pred, p)) + return (compress(t1, map(not_, p1)), compress(t2, p2)) + + +def powerset(iterable): + """Yields all possible subsets of the iterable. + + >>> list(powerset([1, 2, 3])) + [(), (1,), (2,), (3,), (1, 2), (1, 3), (2, 3), (1, 2, 3)] + + :func:`powerset` will operate on iterables that aren't :class:`set` + instances, so repeated elements in the input will produce repeated elements + in the output. + + >>> seq = [1, 1, 0] + >>> list(powerset(seq)) + [(), (1,), (1,), (0,), (1, 1), (1, 0), (1, 0), (1, 1, 0)] + + For a variant that efficiently yields actual :class:`set` instances, see + :func:`powerset_of_sets`. + """ + s = list(iterable) + return chain.from_iterable(combinations(s, r) for r in range(len(s) + 1)) + + +def unique_everseen(iterable, key=None): + """ + Yield unique elements, preserving order. + + >>> list(unique_everseen('AAAABBBCCDAABBB')) + ['A', 'B', 'C', 'D'] + >>> list(unique_everseen('ABBCcAD', str.lower)) + ['A', 'B', 'C', 'D'] + + Sequences with a mix of hashable and unhashable items can be used. + The function will be slower (i.e., `O(n^2)`) for unhashable items. + + Remember that ``list`` objects are unhashable - you can use the *key* + parameter to transform the list to a tuple (which is hashable) to + avoid a slowdown. + + >>> iterable = ([1, 2], [2, 3], [1, 2]) + >>> list(unique_everseen(iterable)) # Slow + [[1, 2], [2, 3]] + >>> list(unique_everseen(iterable, key=tuple)) # Faster + [[1, 2], [2, 3]] + + Similarly, you may want to convert unhashable ``set`` objects with + ``key=frozenset``. For ``dict`` objects, + ``key=lambda x: frozenset(x.items())`` can be used. + + """ + seenset = set() + seenset_add = seenset.add + seenlist = [] + seenlist_add = seenlist.append + use_key = key is not None + + for element in iterable: + k = key(element) if use_key else element + try: + if k not in seenset: + seenset_add(k) + yield element + except TypeError: + if k not in seenlist: + seenlist_add(k) + yield element + + +def unique_justseen(iterable, key=None): + """Yields elements in order, ignoring serial duplicates + + >>> list(unique_justseen('AAAABBBCCDAABBB')) + ['A', 'B', 'C', 'D', 'A', 'B'] + >>> list(unique_justseen('ABBCcAD', str.lower)) + ['A', 'B', 'C', 'A', 'D'] + + """ + if key is None: + return map(itemgetter(0), groupby(iterable)) + + return map(next, map(itemgetter(1), groupby(iterable, key))) + + +def unique(iterable, key=None, reverse=False): + """Yields unique elements in sorted order. + + >>> list(unique([[1, 2], [3, 4], [1, 2]])) + [[1, 2], [3, 4]] + + *key* and *reverse* are passed to :func:`sorted`. + + >>> list(unique('ABBcCAD', str.casefold)) + ['A', 'B', 'c', 'D'] + >>> list(unique('ABBcCAD', str.casefold, reverse=True)) + ['D', 'c', 'B', 'A'] + + The elements in *iterable* need not be hashable, but they must be + comparable for sorting to work. + """ + sequenced = sorted(iterable, key=key, reverse=reverse) + return unique_justseen(sequenced, key=key) + + +def iter_except(func, exception, first=None): + """Yields results from a function repeatedly until an exception is raised. + + Converts a call-until-exception interface to an iterator interface. + Like ``iter(func, sentinel)``, but uses an exception instead of a sentinel + to end the loop. + + >>> l = [0, 1, 2] + >>> list(iter_except(l.pop, IndexError)) + [2, 1, 0] + + Multiple exceptions can be specified as a stopping condition: + + >>> l = [1, 2, 3, '...', 4, 5, 6] + >>> list(iter_except(lambda: 1 + l.pop(), (IndexError, TypeError))) + [7, 6, 5] + >>> list(iter_except(lambda: 1 + l.pop(), (IndexError, TypeError))) + [4, 3, 2] + >>> list(iter_except(lambda: 1 + l.pop(), (IndexError, TypeError))) + [] + + """ + with suppress(exception): + if first is not None: + yield first() + while True: + yield func() + + +def first_true(iterable, default=None, pred=None): + """ + Returns the first true value in the iterable. + + If no true value is found, returns *default* + + If *pred* is not None, returns the first item for which + ``pred(item) == True`` . + + >>> first_true(range(10)) + 1 + >>> first_true(range(10), pred=lambda x: x > 5) + 6 + >>> first_true(range(10), default='missing', pred=lambda x: x > 9) + 'missing' + + """ + return next(filter(pred, iterable), default) + + +def random_product(*args, repeat=1): + """Draw an item at random from each of the input iterables. + + >>> random_product('abc', range(4), 'XYZ') # doctest:+SKIP + ('c', 3, 'Z') + + If *repeat* is provided as a keyword argument, that many items will be + drawn from each iterable. + + >>> random_product('abcd', range(4), repeat=2) # doctest:+SKIP + ('a', 2, 'd', 3) + + This equivalent to taking a random selection from + ``itertools.product(*args, repeat=repeat)``. + + """ + pools = [tuple(pool) for pool in args] * repeat + return tuple(choice(pool) for pool in pools) + + +def random_permutation(iterable, r=None): + """Return a random *r* length permutation of the elements in *iterable*. + + If *r* is not specified or is ``None``, then *r* defaults to the length of + *iterable*. + + >>> random_permutation(range(5)) # doctest:+SKIP + (3, 4, 0, 1, 2) + + This equivalent to taking a random selection from + ``itertools.permutations(iterable, r)``. + + """ + pool = tuple(iterable) + r = len(pool) if r is None else r + return tuple(sample(pool, r)) + + +def random_combination(iterable, r): + """Return a random *r* length subsequence of the elements in *iterable*. + + >>> random_combination(range(5), 3) # doctest:+SKIP + (2, 3, 4) + + This equivalent to taking a random selection from + ``itertools.combinations(iterable, r)``. + + """ + pool = tuple(iterable) + n = len(pool) + indices = sorted(sample(range(n), r)) + return tuple(pool[i] for i in indices) + + +def random_combination_with_replacement(iterable, r): + """Return a random *r* length subsequence of elements in *iterable*, + allowing individual elements to be repeated. + + >>> random_combination_with_replacement(range(3), 5) # doctest:+SKIP + (0, 0, 1, 2, 2) + + This equivalent to taking a random selection from + ``itertools.combinations_with_replacement(iterable, r)``. + + """ + pool = tuple(iterable) + n = len(pool) + indices = sorted(randrange(n) for i in range(r)) + return tuple(pool[i] for i in indices) + + +def nth_combination(iterable, r, index): + """Equivalent to ``list(combinations(iterable, r))[index]``. + + The subsequences of *iterable* that are of length *r* can be ordered + lexicographically. :func:`nth_combination` computes the subsequence at + sort position *index* directly, without computing the previous + subsequences. + + >>> nth_combination(range(5), 3, 5) + (0, 3, 4) + + ``ValueError`` will be raised If *r* is negative or greater than the length + of *iterable*. + ``IndexError`` will be raised if the given *index* is invalid. + """ + pool = tuple(iterable) + n = len(pool) + if (r < 0) or (r > n): + raise ValueError + + c = 1 + k = min(r, n - r) + for i in range(1, k + 1): + c = c * (n - k + i) // i + + if index < 0: + index += c + + if (index < 0) or (index >= c): + raise IndexError + + result = [] + while r: + c, n, r = c * r // n, n - 1, r - 1 + while index >= c: + index -= c + c, n = c * (n - r) // n, n - 1 + result.append(pool[-1 - n]) + + return tuple(result) + + +def prepend(value, iterator): + """Yield *value*, followed by the elements in *iterator*. + + >>> value = '0' + >>> iterator = ['1', '2', '3'] + >>> list(prepend(value, iterator)) + ['0', '1', '2', '3'] + + To prepend multiple values, see :func:`itertools.chain` + or :func:`value_chain`. + + """ + return chain([value], iterator) + + +def convolve(signal, kernel): + """Discrete linear convolution of two iterables. + Equivalent to polynomial multiplication. + + For example, multiplying ``(x² -x - 20)`` by ``(x - 3)`` + gives ``(x³ -4x² -17x + 60)``. + + >>> list(convolve([1, -1, -20], [1, -3])) + [1, -4, -17, 60] + + Examples of popular kinds of kernels: + + * The kernel ``[0.25, 0.25, 0.25, 0.25]`` computes a moving average. + For image data, this blurs the image and reduces noise. + * The kernel ``[1/2, 0, -1/2]`` estimates the first derivative of + a function evaluated at evenly spaced inputs. + * The kernel ``[1, -2, 1]`` estimates the second derivative of a + function evaluated at evenly spaced inputs. + + Convolutions are mathematically commutative; however, the inputs are + evaluated differently. The signal is consumed lazily and can be + infinite. The kernel is fully consumed before the calculations begin. + + Supports all numeric types: int, float, complex, Decimal, Fraction. + + References: + + * Article: https://betterexplained.com/articles/intuitive-convolution/ + * Video by 3Blue1Brown: https://www.youtube.com/watch?v=KuXjwB4LzSA + + """ + # This implementation comes from an older version of the itertools + # documentation. While the newer implementation is a bit clearer, + # this one was kept because the inlined window logic is faster + # and it avoids an unnecessary deque-to-tuple conversion. + kernel = tuple(kernel)[::-1] + n = len(kernel) + window = deque([0], maxlen=n) * n + for x in chain(signal, repeat(0, n - 1)): + window.append(x) + yield _sumprod(kernel, window) + + +def before_and_after(predicate, it): + """A variant of :func:`takewhile` that allows complete access to the + remainder of the iterator. + + >>> it = iter('ABCdEfGhI') + >>> all_upper, remainder = before_and_after(str.isupper, it) + >>> ''.join(all_upper) + 'ABC' + >>> ''.join(remainder) # takewhile() would lose the 'd' + 'dEfGhI' + + Note that the first iterator must be fully consumed before the second + iterator can generate valid results. + """ + trues, after = tee(it) + trues = compress(takewhile(predicate, trues), zip(after)) + return trues, after + + +def triplewise(iterable): + """Return overlapping triplets from *iterable*. + + >>> list(triplewise('ABCDE')) + [('A', 'B', 'C'), ('B', 'C', 'D'), ('C', 'D', 'E')] + + """ + # This deviates from the itertools documentation recipe - see + # https://github.com/more-itertools/more-itertools/issues/889 + t1, t2, t3 = tee(iterable, 3) + next(t3, None) + next(t3, None) + next(t2, None) + return zip(t1, t2, t3) + + +def _sliding_window_islice(iterable, n): + # Fast path for small, non-zero values of n. + iterators = tee(iterable, n) + for i, iterator in enumerate(iterators): + next(islice(iterator, i, i), None) + return zip(*iterators) + + +def _sliding_window_deque(iterable, n): + # Normal path for other values of n. + iterator = iter(iterable) + window = deque(islice(iterator, n - 1), maxlen=n) + for x in iterator: + window.append(x) + yield tuple(window) + + +def sliding_window(iterable, n): + """Return a sliding window of width *n* over *iterable*. + + >>> list(sliding_window(range(6), 4)) + [(0, 1, 2, 3), (1, 2, 3, 4), (2, 3, 4, 5)] + + If *iterable* has fewer than *n* items, then nothing is yielded: + + >>> list(sliding_window(range(3), 4)) + [] + + For a variant with more features, see :func:`windowed`. + """ + if n > 20: + return _sliding_window_deque(iterable, n) + elif n > 2: + return _sliding_window_islice(iterable, n) + elif n == 2: + return pairwise(iterable) + elif n == 1: + return zip(iterable) + else: + raise ValueError(f'n should be at least one, not {n}') + + +def subslices(iterable): + """Return all contiguous non-empty subslices of *iterable*. + + >>> list(subslices('ABC')) + [['A'], ['A', 'B'], ['A', 'B', 'C'], ['B'], ['B', 'C'], ['C']] + + This is similar to :func:`substrings`, but emits items in a different + order. + """ + seq = list(iterable) + slices = starmap(slice, combinations(range(len(seq) + 1), 2)) + return map(getitem, repeat(seq), slices) + + +def polynomial_from_roots(roots): + """Compute a polynomial's coefficients from its roots. + + >>> roots = [5, -4, 3] # (x - 5) * (x + 4) * (x - 3) + >>> polynomial_from_roots(roots) # x³ - 4 x² - 17 x + 60 + [1, -4, -17, 60] + + Note that polynomial coefficients are specified in descending power order. + + Supports all numeric types: int, float, complex, Decimal, Fraction. + """ + + # This recipe differs from the one in itertools docs in that it + # applies list() after each call to convolve(). This avoids + # hitting stack limits with nested generators. + + poly = [1] + for root in roots: + poly = list(convolve(poly, (1, -root))) + return poly + + +def iter_index(iterable, value, start=0, stop=None): + """Yield the index of each place in *iterable* that *value* occurs, + beginning with index *start* and ending before index *stop*. + + + >>> list(iter_index('AABCADEAF', 'A')) + [0, 1, 4, 7] + >>> list(iter_index('AABCADEAF', 'A', 1)) # start index is inclusive + [1, 4, 7] + >>> list(iter_index('AABCADEAF', 'A', 1, 7)) # stop index is not inclusive + [1, 4] + + The behavior for non-scalar *values* matches the built-in Python types. + + >>> list(iter_index('ABCDABCD', 'AB')) + [0, 4] + >>> list(iter_index([0, 1, 2, 3, 0, 1, 2, 3], [0, 1])) + [] + >>> list(iter_index([[0, 1], [2, 3], [0, 1], [2, 3]], [0, 1])) + [0, 2] + + See :func:`locate` for a more general means of finding the indexes + associated with particular values. + + """ + seq_index = getattr(iterable, 'index', None) + if seq_index is None: + # Slow path for general iterables + iterator = islice(iterable, start, stop) + for i, element in enumerate(iterator, start): + if element is value or element == value: + yield i + else: + # Fast path for sequences + stop = len(iterable) if stop is None else stop + i = start - 1 + with suppress(ValueError): + while True: + yield (i := seq_index(value, i + 1, stop)) + + +def sieve(n): + """Yield the primes less than n. + + >>> list(sieve(30)) + [2, 3, 5, 7, 11, 13, 17, 19, 23, 29] + + """ + # This implementation comes from an older version of the itertools + # documentation. The newer implementation is easier to read but is + # less lazy. + if n > 2: + yield 2 + start = 3 + data = bytearray((0, 1)) * (n // 2) + for p in iter_index(data, 1, start, stop=isqrt(n) + 1): + yield from iter_index(data, 1, start, p * p) + data[p * p : n : p + p] = bytes(len(range(p * p, n, p + p))) + start = p * p + yield from iter_index(data, 1, start) + + +def _batched(iterable, n, *, strict=False): # pragma: no cover + """Batch data into tuples of length *n*. If the number of items in + *iterable* is not divisible by *n*: + * The last batch will be shorter if *strict* is ``False``. + * :exc:`ValueError` will be raised if *strict* is ``True``. + + >>> list(batched('ABCDEFG', 3)) + [('A', 'B', 'C'), ('D', 'E', 'F'), ('G',)] + + On Python 3.13 and above, this is an alias for :func:`itertools.batched`. + """ + if n < 1: + raise ValueError('n must be at least one') + iterator = iter(iterable) + while batch := tuple(islice(iterator, n)): + if strict and len(batch) != n: + raise ValueError('batched(): incomplete batch') + yield batch + + +if hexversion >= 0x30D00A2: # pragma: no cover + from itertools import batched as itertools_batched + + def batched(iterable, n, *, strict=False): + return itertools_batched(iterable, n, strict=strict) + + batched.__doc__ = _batched.__doc__ +else: # pragma: no cover + batched = _batched + + +def transpose(it): + """Swap the rows and columns of the input matrix. + + >>> list(transpose([(1, 2, 3), (11, 22, 33)])) + [(1, 11), (2, 22), (3, 33)] + + The caller should ensure that the dimensions of the input are compatible. + If the input is empty, no output will be produced. + """ + return _zip_strict(*it) + + +def _is_scalar(value, stringlike=(str, bytes)): + "Scalars are bytes, strings, and non-iterables." + try: + iter(value) + except TypeError: + return True + return isinstance(value, stringlike) + + +def _flatten_tensor(tensor): + "Depth-first iterator over scalars in a tensor." + iterator = iter(tensor) + while True: + try: + value = next(iterator) + except StopIteration: + return iterator + iterator = chain((value,), iterator) + if _is_scalar(value): + return iterator + iterator = chain.from_iterable(iterator) + + +def reshape(matrix, shape): + """Change the shape of a *matrix*. + + If *shape* is an integer, the matrix must be two dimensional + and the shape is interpreted as the desired number of columns: + + >>> matrix = [(0, 1), (2, 3), (4, 5)] + >>> cols = 3 + >>> list(reshape(matrix, cols)) + [(0, 1, 2), (3, 4, 5)] + + If *shape* is a tuple (or other iterable), the input matrix can have + any number of dimensions. It will first be flattened and then rebuilt + to the desired shape which can also be multidimensional: + + >>> matrix = [(0, 1), (2, 3), (4, 5)] # Start with a 3 x 2 matrix + + >>> list(reshape(matrix, (2, 3))) # Make a 2 x 3 matrix + [(0, 1, 2), (3, 4, 5)] + + >>> list(reshape(matrix, (6,))) # Make a vector of length six + [0, 1, 2, 3, 4, 5] + + >>> list(reshape(matrix, (2, 1, 3, 1))) # Make 2 x 1 x 3 x 1 tensor + [(((0,), (1,), (2,)),), (((3,), (4,), (5,)),)] + + Each dimension is assumed to be uniform, either all arrays or all scalars. + Flattening stops when the first value in a dimension is a scalar. + Scalars are bytes, strings, and non-iterables. + The reshape iterator stops when the requested shape is complete + or when the input is exhausted, whichever comes first. + + """ + if isinstance(shape, int): + return batched(chain.from_iterable(matrix), shape) + first_dim, *dims = shape + scalar_stream = _flatten_tensor(matrix) + reshaped = reduce(batched, reversed(dims), scalar_stream) + return islice(reshaped, first_dim) + + +def matmul(m1, m2): + """Multiply two matrices. + + >>> list(matmul([(7, 5), (3, 5)], [(2, 5), (7, 9)])) + [(49, 80), (41, 60)] + + The caller should ensure that the dimensions of the input matrices are + compatible with each other. + + Supports all numeric types: int, float, complex, Decimal, Fraction. + """ + n = len(m2[0]) + return batched(starmap(_sumprod, product(m1, transpose(m2))), n) + + +def _factor_pollard(n): + # Return a factor of n using Pollard's rho algorithm. + # Efficient when n is odd and composite. + for b in range(1, n): + x = y = 2 + d = 1 + while d == 1: + x = (x * x + b) % n + y = (y * y + b) % n + y = (y * y + b) % n + d = gcd(x - y, n) + if d != n: + return d + raise ValueError('prime or under 5') # pragma: no cover + + +_primes_below_211 = tuple(sieve(211)) + + +def factor(n): + """Yield the prime factors of n. + + >>> list(factor(360)) + [2, 2, 2, 3, 3, 5] + + Finds small factors with trial division. Larger factors are + either verified as prime with ``is_prime`` or split into + smaller factors with Pollard's rho algorithm. + """ + + # Corner case reduction + if n < 2: + return + + # Trial division reduction + for prime in _primes_below_211: + while not n % prime: + yield prime + n //= prime + + # Pollard's rho reduction + primes = [] + todo = [n] if n > 1 else [] + for n in todo: + if n < 211**2 or is_prime(n): + primes.append(n) + else: + fact = _factor_pollard(n) + todo += (fact, n // fact) + yield from sorted(primes) + + +def polynomial_eval(coefficients, x): + """Evaluate a polynomial at a specific value. + + Computes with better numeric stability than Horner's method. + + Evaluate ``x^3 - 4 * x^2 - 17 * x + 60`` at ``x = 2.5``: + + >>> coefficients = [1, -4, -17, 60] + >>> x = 2.5 + >>> polynomial_eval(coefficients, x) + 8.125 + + Note that polynomial coefficients are specified in descending power order. + + Supports all numeric types: int, float, complex, Decimal, Fraction. + """ + n = len(coefficients) + if n == 0: + return type(x)(0) + powers = map(pow, repeat(x), reversed(range(n))) + return _sumprod(coefficients, powers) + + +def sum_of_squares(it): + """Return the sum of the squares of the input values. + + >>> sum_of_squares([10, 20, 30]) + 1400 + + Supports all numeric types: int, float, complex, Decimal, Fraction. + """ + return _sumprod(*tee(it)) + + +def polynomial_derivative(coefficients): + """Compute the first derivative of a polynomial. + + Evaluate the derivative of ``x³ - 4 x² - 17 x + 60``: + + >>> coefficients = [1, -4, -17, 60] + >>> derivative_coefficients = polynomial_derivative(coefficients) + >>> derivative_coefficients + [3, -8, -17] + + Note that polynomial coefficients are specified in descending power order. + + Supports all numeric types: int, float, complex, Decimal, Fraction. + """ + n = len(coefficients) + powers = reversed(range(1, n)) + return list(map(mul, coefficients, powers)) + + +def totient(n): + """Return the count of natural numbers up to *n* that are coprime with *n*. + + Euler's totient function φ(n) gives the number of totatives. + Totative are integers k in the range 1 ≤ k ≤ n such that gcd(n, k) = 1. + + >>> n = 9 + >>> totient(n) + 6 + + >>> totatives = [x for x in range(1, n) if gcd(n, x) == 1] + >>> totatives + [1, 2, 4, 5, 7, 8] + >>> len(totatives) + 6 + + Reference: https://en.wikipedia.org/wiki/Euler%27s_totient_function + + """ + for prime in set(factor(n)): + n -= n // prime + return n + + +# Miller–Rabin primality test: https://oeis.org/A014233 +_perfect_tests = [ + (2047, (2,)), + (9080191, (31, 73)), + (4759123141, (2, 7, 61)), + (1122004669633, (2, 13, 23, 1662803)), + (2152302898747, (2, 3, 5, 7, 11)), + (3474749660383, (2, 3, 5, 7, 11, 13)), + (18446744073709551616, (2, 325, 9375, 28178, 450775, 9780504, 1795265022)), + ( + 3317044064679887385961981, + (2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41), + ), +] + + +@lru_cache +def _shift_to_odd(n): + 'Return s, d such that 2**s * d == n' + s = ((n - 1) ^ n).bit_length() - 1 + d = n >> s + assert (1 << s) * d == n and d & 1 and s >= 0 + return s, d + + +def _strong_probable_prime(n, base): + assert (n > 2) and (n & 1) and (2 <= base < n) + + s, d = _shift_to_odd(n - 1) + + x = pow(base, d, n) + if x == 1 or x == n - 1: + return True + + for _ in range(s - 1): + x = x * x % n + if x == n - 1: + return True + + return False + + +# Separate instance of Random() that doesn't share state +# with the default user instance of Random(). +_private_randrange = random.Random().randrange + + +def is_prime(n): + """Return ``True`` if *n* is prime and ``False`` otherwise. + + Basic examples: + + >>> is_prime(37) + True + >>> is_prime(3 * 13) + False + >>> is_prime(18_446_744_073_709_551_557) + True + + Find the next prime over one billion: + + >>> next(filter(is_prime, count(10**9))) + 1000000007 + + Generate random primes up to 200 bits and up to 60 decimal digits: + + >>> from random import seed, randrange, getrandbits + >>> seed(18675309) + + >>> next(filter(is_prime, map(getrandbits, repeat(200)))) + 893303929355758292373272075469392561129886005037663238028407 + + >>> next(filter(is_prime, map(randrange, repeat(10**60)))) + 269638077304026462407872868003560484232362454342414618963649 + + This function is exact for values of *n* below 10**24. For larger inputs, + the probabilistic Miller-Rabin primality test has a less than 1 in 2**128 + chance of a false positive. + """ + + if n < 17: + return n in {2, 3, 5, 7, 11, 13} + + if not (n & 1 and n % 3 and n % 5 and n % 7 and n % 11 and n % 13): + return False + + for limit, bases in _perfect_tests: + if n < limit: + break + else: + bases = (_private_randrange(2, n - 1) for i in range(64)) + + return all(_strong_probable_prime(n, base) for base in bases) + + +def loops(n): + """Returns an iterable with *n* elements for efficient looping. + Like ``range(n)`` but doesn't create integers. + + >>> i = 0 + >>> for _ in loops(5): + ... i += 1 + >>> i + 5 + + """ + return repeat(None, n) + + +def multinomial(*counts): + """Number of distinct arrangements of a multiset. + + The expression ``multinomial(3, 4, 2)`` has several equivalent + interpretations: + + * In the expansion of ``(a + b + c)⁹``, the coefficient of the + ``a³b⁴c²`` term is 1260. + + * There are 1260 distinct ways to arrange 9 balls consisting of 3 reds, 4 + greens, and 2 blues. + + * There are 1260 unique ways to place 9 distinct objects into three bins + with sizes 3, 4, and 2. + + The :func:`multinomial` function computes the length of + :func:`distinct_permutations`. For example, there are 83,160 distinct + anagrams of the word "abracadabra": + + >>> from more_itertools import distinct_permutations, ilen + >>> ilen(distinct_permutations('abracadabra')) + 83160 + + This can be computed directly from the letter counts, 5a 2b 2r 1c 1d: + + >>> from collections import Counter + >>> list(Counter('abracadabra').values()) + [5, 2, 2, 1, 1] + >>> multinomial(5, 2, 2, 1, 1) + 83160 + + A binomial coefficient is a special case of multinomial where there are + only two categories. For example, the number of ways to arrange 12 balls + with 5 reds and 7 blues is ``multinomial(5, 7)`` or ``math.comb(12, 5)``. + + Likewise, factorial is a special case of multinomial where + the multiplicities are all just 1 so that + ``multinomial(1, 1, 1, 1, 1, 1, 1) == math.factorial(7)``. + + Reference: https://en.wikipedia.org/wiki/Multinomial_theorem + + """ + return prod(map(comb, accumulate(counts), counts)) + + +def _running_median_minheap_and_maxheap(iterator): # pragma: no cover + "Non-windowed running_median() for Python 3.14+" + + read = iterator.__next__ + lo = [] # max-heap + hi = [] # min-heap (same size as or one smaller than lo) + + with suppress(StopIteration): + while True: + heappush_max(lo, heappushpop(hi, read())) + yield lo[0] + + heappush(hi, heappushpop_max(lo, read())) + yield (lo[0] + hi[0]) / 2 + + +def _running_median_minheap_only(iterator): # pragma: no cover + "Backport of non-windowed running_median() for Python 3.13 and prior." + + read = iterator.__next__ + lo = [] # max-heap (actually a minheap with negated values) + hi = [] # min-heap (same size as or one smaller than lo) + + with suppress(StopIteration): + while True: + heappush(lo, -heappushpop(hi, read())) + yield -lo[0] + + heappush(hi, -heappushpop(lo, -read())) + yield (hi[0] - lo[0]) / 2 + + +def _running_median_windowed(iterator, maxlen): + "Yield median of values in a sliding window." + + window = deque() + ordered = [] + + for x in iterator: + window.append(x) + insort(ordered, x) + + if len(ordered) > maxlen: + i = bisect_left(ordered, window.popleft()) + del ordered[i] + + n = len(ordered) + m = n // 2 + yield ordered[m] if n & 1 else (ordered[m - 1] + ordered[m]) / 2 + + +def running_median(iterable, *, maxlen=None): + """Cumulative median of values seen so far or values in a sliding window. + + Set *maxlen* to a positive integer to specify the maximum size + of the sliding window. The default of *None* is equivalent to + an unbounded window. + + For example: + + >>> list(running_median([5.0, 9.0, 4.0, 12.0, 8.0, 9.0])) + [5.0, 7.0, 5.0, 7.0, 8.0, 8.5] + >>> list(running_median([5.0, 9.0, 4.0, 12.0, 8.0, 9.0], maxlen=3)) + [5.0, 7.0, 5.0, 9.0, 8.0, 9.0] + + Supports numeric types such as int, float, Decimal, and Fraction, + but not complex numbers which are unorderable. + + On version Python 3.13 and prior, max-heaps are simulated with + negative values. The negation causes Decimal inputs to apply context + rounding, making the results slightly different than that obtained + by statistics.median(). + """ + + iterator = iter(iterable) + + if maxlen is not None: + maxlen = index(maxlen) + if maxlen <= 0: + raise ValueError('Window size should be positive') + return _running_median_windowed(iterator, maxlen) + + if not _max_heap_available: + return _running_median_minheap_only(iterator) # pragma: no cover + + return _running_median_minheap_and_maxheap(iterator) # pragma: no cover diff --git a/miniconda3/pkgs/more-itertools-10.8.0-py313h06a4308_0/lib/python3.13/site-packages/more_itertools/recipes.pyi b/miniconda3/pkgs/more-itertools-10.8.0-py313h06a4308_0/lib/python3.13/site-packages/more_itertools/recipes.pyi new file mode 100644 index 0000000000000000000000000000000000000000..de3d0a1777a547e986cba595de72f92b8e3cedbd --- /dev/null +++ b/miniconda3/pkgs/more-itertools-10.8.0-py313h06a4308_0/lib/python3.13/site-packages/more_itertools/recipes.pyi @@ -0,0 +1,205 @@ +"""Stubs for more_itertools.recipes""" + +from __future__ import annotations + +from collections.abc import Iterable, Iterator, Sequence +from decimal import Decimal +from fractions import Fraction +from typing import ( + Any, + Callable, + TypeVar, + overload, +) + +__all__ = [ + 'all_equal', + 'batched', + 'before_and_after', + 'consume', + 'convolve', + 'dotproduct', + 'first_true', + 'factor', + 'flatten', + 'grouper', + 'is_prime', + 'iter_except', + 'iter_index', + 'loops', + 'matmul', + 'multinomial', + 'ncycles', + 'nth', + 'nth_combination', + 'padnone', + 'pad_none', + 'pairwise', + 'partition', + 'polynomial_eval', + 'polynomial_from_roots', + 'polynomial_derivative', + 'powerset', + 'prepend', + 'quantify', + 'reshape', + 'random_combination_with_replacement', + 'random_combination', + 'random_permutation', + 'random_product', + 'repeatfunc', + 'roundrobin', + 'running_median', + 'sieve', + 'sliding_window', + 'subslices', + 'sum_of_squares', + 'tabulate', + 'tail', + 'take', + 'totient', + 'transpose', + 'triplewise', + 'unique', + 'unique_everseen', + 'unique_justseen', +] + +# Type and type variable definitions +_T = TypeVar('_T') +_T1 = TypeVar('_T1') +_T2 = TypeVar('_T2') +_U = TypeVar('_U') +_NumberT = TypeVar("_NumberT", float, Decimal, Fraction) + +def take(n: int, iterable: Iterable[_T]) -> list[_T]: ... +def tabulate( + function: Callable[[int], _T], start: int = ... +) -> Iterator[_T]: ... +def tail(n: int, iterable: Iterable[_T]) -> Iterator[_T]: ... +def consume(iterator: Iterable[_T], n: int | None = ...) -> None: ... +@overload +def nth(iterable: Iterable[_T], n: int) -> _T | None: ... +@overload +def nth(iterable: Iterable[_T], n: int, default: _U) -> _T | _U: ... +def all_equal( + iterable: Iterable[_T], key: Callable[[_T], _U] | None = ... +) -> bool: ... +def quantify( + iterable: Iterable[_T], pred: Callable[[_T], bool] = ... +) -> int: ... +def pad_none(iterable: Iterable[_T]) -> Iterator[_T | None]: ... +def padnone(iterable: Iterable[_T]) -> Iterator[_T | None]: ... +def ncycles(iterable: Iterable[_T], n: int) -> Iterator[_T]: ... +def dotproduct(vec1: Iterable[_T1], vec2: Iterable[_T2]) -> Any: ... +def flatten(listOfLists: Iterable[Iterable[_T]]) -> Iterator[_T]: ... +def repeatfunc( + func: Callable[..., _U], times: int | None = ..., *args: Any +) -> Iterator[_U]: ... +def pairwise(iterable: Iterable[_T]) -> Iterator[tuple[_T, _T]]: ... +def grouper( + iterable: Iterable[_T], + n: int, + incomplete: str = ..., + fillvalue: _U = ..., +) -> Iterator[tuple[_T | _U, ...]]: ... +def roundrobin(*iterables: Iterable[_T]) -> Iterator[_T]: ... +def partition( + pred: Callable[[_T], object] | None, iterable: Iterable[_T] +) -> tuple[Iterator[_T], Iterator[_T]]: ... +def powerset(iterable: Iterable[_T]) -> Iterator[tuple[_T, ...]]: ... +def unique_everseen( + iterable: Iterable[_T], key: Callable[[_T], _U] | None = ... +) -> Iterator[_T]: ... +def unique_justseen( + iterable: Iterable[_T], key: Callable[[_T], object] | None = ... +) -> Iterator[_T]: ... +def unique( + iterable: Iterable[_T], + key: Callable[[_T], object] | None = ..., + reverse: bool = False, +) -> Iterator[_T]: ... +@overload +def iter_except( + func: Callable[[], _T], + exception: type[BaseException] | tuple[type[BaseException], ...], + first: None = ..., +) -> Iterator[_T]: ... +@overload +def iter_except( + func: Callable[[], _T], + exception: type[BaseException] | tuple[type[BaseException], ...], + first: Callable[[], _U], +) -> Iterator[_T | _U]: ... +@overload +def first_true( + iterable: Iterable[_T], *, pred: Callable[[_T], object] | None = ... +) -> _T | None: ... +@overload +def first_true( + iterable: Iterable[_T], + default: _U, + pred: Callable[[_T], object] | None = ..., +) -> _T | _U: ... +def random_product( + *args: Iterable[_T], repeat: int = ... +) -> tuple[_T, ...]: ... +def random_permutation( + iterable: Iterable[_T], r: int | None = ... +) -> tuple[_T, ...]: ... +def random_combination(iterable: Iterable[_T], r: int) -> tuple[_T, ...]: ... +def random_combination_with_replacement( + iterable: Iterable[_T], r: int +) -> tuple[_T, ...]: ... +def nth_combination( + iterable: Iterable[_T], r: int, index: int +) -> tuple[_T, ...]: ... +def prepend(value: _T, iterator: Iterable[_U]) -> Iterator[_T | _U]: ... +def convolve(signal: Iterable[_T], kernel: Iterable[_T]) -> Iterator[_T]: ... +def before_and_after( + predicate: Callable[[_T], bool], it: Iterable[_T] +) -> tuple[Iterator[_T], Iterator[_T]]: ... +def triplewise(iterable: Iterable[_T]) -> Iterator[tuple[_T, _T, _T]]: ... +def sliding_window( + iterable: Iterable[_T], n: int +) -> Iterator[tuple[_T, ...]]: ... +def subslices(iterable: Iterable[_T]) -> Iterator[list[_T]]: ... +def polynomial_from_roots(roots: Sequence[_T]) -> list[_T]: ... +def iter_index( + iterable: Iterable[_T], + value: Any, + start: int | None = ..., + stop: int | None = ..., +) -> Iterator[int]: ... +def sieve(n: int) -> Iterator[int]: ... +def _batched( + iterable: Iterable[_T], n: int, *, strict: bool = False +) -> Iterator[tuple[_T, ...]]: ... + +batched = _batched + +def transpose( + it: Iterable[Iterable[_T]], +) -> Iterator[tuple[_T, ...]]: ... +@overload +def reshape( + matrix: Iterable[Iterable[_T]], shape: int +) -> Iterator[tuple[_T, ...]]: ... +@overload +def reshape(matrix: Iterable[Any], shape: Iterable[int]) -> Iterator[Any]: ... +def matmul(m1: Sequence[_T], m2: Sequence[_T]) -> Iterator[tuple[_T]]: ... +def _factor_trial(n: int) -> Iterator[int]: ... +def _factor_pollard(n: int) -> int: ... +def factor(n: int) -> Iterator[int]: ... +def polynomial_eval(coefficients: Sequence[_T], x: _U) -> _U: ... +def sum_of_squares(it: Iterable[_T]) -> _T: ... +def polynomial_derivative(coefficients: Sequence[_T]) -> list[_T]: ... +def totient(n: int) -> int: ... +def _shift_to_odd(n: int) -> tuple[int, int]: ... +def _strong_probable_prime(n: int, base: int) -> bool: ... +def is_prime(n: int) -> bool: ... +def loops(n: int) -> Iterator[None]: ... +def multinomial(*counts: int) -> int: ... +def running_median( + iterable: Iterable[_NumberT], *, maxlen: int | None = ... +) -> Iterator[_NumberT]: ...